Traceability Transformed: Generating more Accurate Links with Pre-Trained BERT Models

被引:87
作者
Lin, Jinfeng [1 ]
Liu, Yalin [1 ]
Zeng, Qingkai [1 ]
Jiang, Meng [1 ]
Cleland-Huang, Jane [1 ]
机构
[1] Univ Notre Dame, Comp Sci & Engn, Notre Dame, IN 46556 USA
来源
2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2021) | 2021年
基金
美国国家科学基金会;
关键词
Software traceability; deep learning; language; models;
D O I
10.1109/ICSE43902.2021.00040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Software traceability establishes and leverages associations between diverse development artifacts. Researchers have proposed the use of deep learning trace models to link natural language artifacts, such as requirements and issue descriptions, to source code; however, their effectiveness has been restricted by availability of labeled data and efficiency at runtime. In this study, we propose a novel framework called Trace BERT (T-BERT) to generate trace links between source code and natural language artifacts. To address data sparsity, we leverage a three-step training strategy to enable trace models to transfer knowledge from a closely related Software Engineering challenge, which has a rich dataset, to produce trace links with much higher accuracy than has previously been achieved. We then apply the T-BERT framework to recover links between issues and commits in Open Source Projects. We comparatively evaluated accuracy and efficiency of three BERT architectures. Results show that a Single-BERT architecture generated the most accurate links, while a Siamese-BERT architecture produced comparable results with significantly less execution time. Furthermore, by learning and transferring knowledge, all three models in the framework outperform classical IR trace models. On the three evaluated real-word OSS projects, the best T-BERT stably outperformed the VSM model with average improvements of 60.31% measured using Mean Average Precision (MAP). RNN severely underperformed on these projects due to insufficient training data, while T-BERT overcame this problem by using pretrained language models and transfer learning.
引用
收藏
页码:324 / 335
页数:12
相关论文
共 40 条
[1]   code2vec: Learning Distributed Representations of Code [J].
Alon, Uri ;
Zilberstein, Meital ;
Levy, Omer ;
Yahav, Eran .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[2]  
[Anonymous], 2013, DEV SAFETY CRITICAL
[3]  
[Anonymous], Food Additives Contaminants
[4]   Recovering traceability links between code and documentation [J].
Antoniol, G ;
Canfora, G ;
Casazza, G ;
De Lucia, A ;
Merlo, E .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (10) :970-983
[5]  
Asuncion H.U., 2010, P 32 ACM IEEE INT C, V1, P95, DOI [DOI 10.1145/1806799.1806817, 10.1145/1806799.1806817]
[6]  
Borg M., 2017, PROC GRAND CHALLENGE, P48
[7]  
Bowman Samuel R., 2015, P 2015 C EMPIRICAL M, P632, DOI 10.18653/v1/D15-1075
[8]  
Chen Ting, 2020, ARXIV
[9]  
Clark Kevin, 2020, ELECTRA PRETRAINING, DOI DOI 10.48550/ARXIV.2003.10555
[10]  
Cleland-Huang J., 2012, 2012 IEEE 20th International Requirements Engineering Conference (RE 2012), P231, DOI 10.1109/RE.2012.6345809