EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Cross‐Project Defect Prediction Using Transfer Learning with Long Short‐Term Memory Networks

Hongwei Tao, Lianyou Fu, Qiaoling Cao, Xiaoxu Niu, Haoran Chen, Songtao Shang, Yang Xian

IET Software · 2024-01 · 2024 (1)

DOI: 10.1049/2024/5550801 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IET Software, online erschienen am 18.03.2024. Verfasst von Hongwei Tao und 6 weiteren Autor:innen. Die Arbeit wurde bisher 14-mal zitiert (Crossref) und nennt 61 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: National Natural Science Foundation of China, Zhengzhou University of Light Industry, Henan Provincial Science and Technology Research Project.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

With the increasing number of software projects, within‐project defect prediction (WPDP) has already been unable to meet the demand, and cross‐project defect prediction (CPDP) is playing an increasingly significant role in the area of software engineering. The classic CPDP methods mainly concentrated on applying metric features to predict defects. However, these approaches failed to consider the rich semantic information, which usually contains the relationship between software defects and context. Since traditional methods are unable to exploit this characteristic, their performance is often unsatisfactory. In this paper, a transfer long short‐term memory (TLSTM) network model is first proposed. Transfer semantic features are extracted by adding a transfer learning algorithm to the long short‐term memory (LSTM) network. Then, the traditional metric features and semantic features are combined for CPDP. First, the abstract syntax trees (AST) are generated based on the source codes. Second, the AST node contents are converted into integer vectors as inputs to the TLSTM model. Then, the semantic features of the program can be extracted by TLSTM. On the other hand, transferable metric features are extracted by transfer component analysis (TCA). Finally, the semantic features and metric features are combined and input into the logical regression (LR) classifier for training. The presented TLSTM model performs better on the f ‐measure indicator than other machine and deep learning models, according to the outcomes of several open‐source projects of the PROMISE repository. The TLSTM model built with a single feature achieves 0.7% and 2.1% improvement on Log4j‐1.2 and Xalan‐2.7, respectively. When using combined features to train the prediction model, we call this model a transfer long short‐term memory for defect prediction (DPTLSTM). DPTLSTM achieves a 2.9% and 5% improvement on Synapse‐1.2 and Xerces‐1.4.4, respectively. Both prove the superiority of the proposed model on the CPDP task. This is because LSTM capture long‐term dependencies in sequence data and extract features that contain source code structure and context information. It can be concluded that: (1) the TLSTM model has the advantage of preserving information, which can better retain the semantic features related to software defects; (2) compared with the CPDP model trained with traditional metric features, the performance of the model can validly enhance by combining semantic features and metric features.

Förderung

  • National Natural Science Foundation of China
  • Zhengzhou University of Light Industry
  • Henan Provincial Science and Technology Research Project

Zitieren

APA

Tao, H., Fu, L., Cao, Q., Niu, X., Chen, H., Shang, S., & Xian, Y. (2024). Cross‐Project Defect Prediction Using Transfer Learning with Long Short‐Term Memory Networks. IET Software, 2024(1). https://doi.org/10.1049/2024/5550801

Vancouver

Tao H, Fu L, Cao Q, Niu X, Chen H, Shang S, et al. Cross‐Project Defect Prediction Using Transfer Learning with Long Short‐Term Memory Networks. IET Software. 2024;2024(1). doi:10.1049/2024/5550801

BibTeX
@article{Tao2024,
  author = {Tao, Hongwei and Fu, Lianyou and Cao, Qiaoling and Niu, Xiaoxu and Chen, Haoran and Shang, Songtao and Xian, Yang},
  title = {Cross‐Project Defect Prediction Using Transfer Learning with Long Short‐Term Memory Networks},
  journal = {IET Software},
  year = {2024},
  volume = {2024},
  number = {1},
  doi = {10.1049/2024/5550801}
}
Kostenlos starten →