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 条
  • [31] Architecture and implementation of a distributed multimedia annotation environment: Practical experiences using Java']Java
    Benz, H
    Fischer, S
    Mecklenburg, R
    DISTRIBUTED APPLICATIONS AND INTEROPERABLE SYSTEMS, 1997, : 49 - 59
  • [32] Certifying a java']java type resolution function using program transformation, annotation, and reflection
    Winter, Victor
    Reinke, Carl
    Guerrero, Jonathan
    SOFTWARE QUALITY JOURNAL, 2016, 24 (01) : 115 - 135
  • [33] Using Program Transformation, Annotation, and Reflection to Certify a Java']Java Type Resolution Function
    Winter, Victor L.
    Reinke, Carl
    Guerrero, Jonathan
    2014 IEEE 15TH INTERNATIONAL SYMPOSIUM ON HIGH-ASSURANCE SYSTEMS ENGINEERING (HASE), 2014, : 137 - 145
  • [34] Transaction level modeling of network protocols using Java']Java
    Aly, SG
    MSV'04 & AMCS'04, PROCEEDINGS, 2004, : 221 - 226
  • [35] Java']Java Archives Search Engine Using Byte Code as Information Source
    Karnalim, Oscar
    Mandala, Rila
    2014 INTERNATIONAL CONFERENCE ON DATA AND SOFTWARE ENGINEERING (ICODSE), 2014,
  • [36] Modeling Backpropagation Neural Network for Rainfall Prediction in Tengger East Java']Java
    Wahyuni, Ida
    Adam, Nakhel Rifqi
    Mahmudy, Wayan Firdaus
    Iriany, Atiek
    2017 INTERNATIONAL CONFERENCE ON SUSTAINABLE INFORMATION ENGINEERING AND TECHNOLOGY (SIET), 2017, : 170 - 175
  • [37] Distributed object oriented neural network simulator in JAVA']JAVA: A research tool
    Abunawass, AM
    Rosenberg, SE
    INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL I AND II, 1999, : 513 - 516
  • [38] Implementing dynamic language features in Java']Java using dynamic code generation
    Breuel, TM
    TOOLS 39: TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES AND SYSTEMS, PROCEEDINGS: SOFTWARE TECHNOLOGY FOR THE AGE OF THE INTERNET, 2001, 39 : 143 - 152
  • [39] Creating a Java']Java design and code convention mentor using evolutionary computation
    Depradine, C
    IJCNN'01: INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS, VOLS 1-4, PROCEEDINGS, 2001, : 756 - 760
  • [40] Kava - Using byte code rewriting to add behavioural reflection to Java']Java
    Welch, I
    Stroud, RJ
    6TH USENIX CONFERENCE OF OBJECT-ORIENTED TECHNOLOGIES AND SYSTEMS (COOTS 01), 2001, : 119 - 130