Using Graph Neural Network to Analyse and Detect Annotation Misuse in Java']Java Code

被引:0
|
作者
Yang, Jingbo [1 ]
Ji, Xin [2 ]
Wu, Wenjun [3 ]
Ren, Jian [1 ]
Zhang, Kui [4 ]
Zhang, Wenya [2 ]
Wang, Qingliang [2 ]
Dong, Tingting [5 ]
机构
[1] Beihang Univ, Sch Comp Sci & Engn, Beijing, Peoples R China
[2] State Grid Nanjing Power Supply Co, Nanjing, Peoples R China
[3] Beihang Univ, Inst Artificial Intelligence, Beijing, Peoples R China
[4] Beihang Univ, State Key Lab Complex & Crit Software Environm, Beijing, Peoples R China
[5] China Elect Power Res Inst, Beijing, Peoples R China
关键词
!text type='Java']Java[!/text] annotation; Stack Overflow; Statistic analysis; Misuse detection; GNN;
D O I
10.1007/978-981-97-5663-6_11
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Annotations have been widely applied in Java projects to support agile development, expecially in software enterprises. Developers make full use of annotations to conveniently implement special functions such as creating objects, operating database and providing URL links for network requests and so on. However, analyzing the usage of annotations in Java code data is not easy for developers, and the misuse of annotations can sometimes cause serious problems for their Java programs. Traditional statistic analysis method usually relies on the frequency of code and may not perform well in low frequent data. In this paper, we focus on leveraging graph neural network (GNN) to analyse and grasp Java annotation usage knowledge and detect misused annotations. Firstly, to better represent the project structure and the annotation usage knowledge, a novel annotation usage project structure graph (AUPSG) is designed. Secondly, using AUPSG, a structure-aware GNN based model is proposed to analyze and acquire knowledge of annotation usage during the training stage. This is achieved by categorizing code nodes at the class, method, field, and parameter levels into suitable annotations. With the learnt knowledge, the proposed model can more accurately detect annotation misuse. Finally, two annotation misuse datasets, each of which includes 150 independent Java projects/files, are curated to evaluate different annotation misuse detection methods. The performance evaluation results demonstrate that our method can achieve better performance than state-of-the-art baseline models in terms of precision, recall, and F1.
引用
收藏
页码:120 / 131
页数:12
相关论文
共 50 条
  • [41] A CASE tool platform - Using an XML representation of Java']Java source code
    Maruyama, K
    Yamamoto, S
    FOURTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2004, : 158 - 167
  • [42] BejaGNN: behavior-based Java malware detection via graph neural network
    Pengbin Feng
    Li Yang
    Di Lu
    Ning Xi
    Jianfeng Ma
    The Journal of Supercomputing, 2023, 79 : 15390 - 15414
  • [43] A resource management system for network computing using Java']Java
    Maheswaran, M
    Chen, H
    Pradhan, S
    Pantel, P
    Zheng, L
    Min, R
    Groner, T
    PROCEEDINGS OF THE FIFTH JOINT CONFERENCE ON INFORMATION SCIENCES, VOLS 1 AND 2, 2000, : 453 - 456
  • [44] Network and web services security concepts using Java']Java
    Srinivas, R
    FIRST LATIN AMERICAN WEB CONGRESS, PROCEEDINGS, 2003, : 238 - 238
  • [45] Enhanced Graph Neural Networks for Vulnerability Detection in Java']Java via Advanced Subgraph Construction
    Foulef, Rosmael Zidane Lekeufack
    Marchetto, Alessandro
    TESTING SOFTWARE AND SYSTEMS, ICTSS 2024, 2025, 15383 : 131 - 148
  • [46] Graph representation learning and software homology matching based A study of JAVA']JAVA code vulnerability detection techniques
    Yang, Yibin
    Bo, Xin
    Wang, Zitong
    Shao, Xinrui
    Xie, Xinjie
    2023 2ND ASIA CONFERENCE ON ALGORITHMS, COMPUTING AND MACHINE LEARNING, CACML 2023, 2023, : 131 - 142
  • [47] Teaching network performance measurement using Java']Java when the students don't already know Java']Java
    Conrad, PT
    Greenstein, B
    INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, VOLS I-V, PROCEEDINGS, 1999, : 74 - 80
  • [48] The Integration Platform Development Of System Code for CFETR Using Java']Java, MYSQL and Optimus
    Wang, Shenji
    Ye, Minyou
    Wang, Zhongwei
    Mao, Shifeng
    Xu, Kun
    Xu, Guoliang
    Liu, Li
    2015 IEEE 26TH SYMPOSIUM ON FUSION ENGINEERING (SOFE), 2015,
  • [49] Code Aggregate Graph: Effective Representation for Graph Neural Networks to Detect Vulnerable Code
    Nguyen, Hoang Viet
    Zheng, Junjun
    Inomata, Atsuo
    Uehara, Tetsutaro
    IEEE Access, 2022, 10 : 123786 - 123800
  • [50] Preventing reverse engineering threat in Java']Java using byte code obfuscation techniques
    Memon, Jan M.
    Shams-ul-Arfeen
    Mughal, Asghar
    Memon, Faisal
    SECOND INTERNATIONAL CONFERENCE ON EMERGING TECHNOLOGIES 2006, PROCEEDINGS, 2006, : 689 - +