The existing machine learning-based requirements traceability approaches suffer from instability. This paper proposes an Ensemble Learning Trace Approach (EMTrace) based on neural network ensemble learning and semantic-enhanced features,to alleviate these issues. The approach transforms the requirements traceability problem into a classification task by leveraging multiple machine learning classifiers for prediction. These classifiers are integrated, and weights are assigned to their predictions to establish trace links. To automatically obtain the weights of each base model, this paper constructs a neural network-based meta-learner and trains it using the predictions of each base model. Additionally, to accurately represent the trace links between artifacts, the EMTrace approach uses multiple word embedding and sentence embedding models to extract the semantic information of software artifacts and enhance the semantic representation of trace link features. Experimental results demonstrate that the EMTrace approach effectively improves the stability and performance of requirements traceability, achieving a 0.162 improvement in F1 compared to the optimal baseline method.
EMTrace方法使用Word2vec[34]、Golve[35]、Fasttext[36]、Embedding from Language Models(ELMo)[37]、Sentence-Bert(SBert)[38]生成链接特征,其中Word2vec、Fasttext、Golve、ELMo为词嵌入模型,SBert为句子嵌入模型。通过选择多个文本嵌入模型可以从多个角度捕捉软件制品中的语义信息,有助于更好地理解和表达文本之间的语义关系,从而提高有效链接排名的准确性。其计算流程如下:
GOTELO C Z, FINKELSTEINC W. An analysis of the requirements traceability problem[C]//Proceedings of IEEE International Conference on Requirements Engineering. New York: IEEE Press, 2002: 94-101. DOI: 10.1109/ICRE.1994.292398 .
[2]
REMPELP, MÄDERP. Preventing defects: The impact of requirements traceability completeness on software quality[J]. IEEE Transactions on Software Engineering, 2017, 43(8): 777-797. DOI: 10.1109/TSE.2016.2622264 .
[3]
NIUN, BHOWMIKT, LIUH, et al. Traceability-enabled refactoring for managing just-in-time requirements[C]//2014 IEEE 22nd International Requirements Engineering Conference (RE). New York: IEEE Press, 2014: 133-142. DOI: 10.1109/RE.2014.6912255 .
[4]
ARORAC, SABETZADEHM, GOKNILA, et al. Change impact analysis for Natural Language requirements: An NLP approach[C]//2015 IEEE 23rd International Requirements Engineering Conference (RE). New York: IEEE Press, 2015: 6-15. DOI: 10.1109/RE.2015.7320403 .
[5]
HAUKSDOTTIRD, VERMEHRENA, SAVOLAINENJ. Requirements reuse at Danfoss[C]//2012 20th IEEE International Requirements Engineering Conference (RE). New York: IEEE Press, 2012: 309-314. DOI: 10.1109/RE.2012.6345820 .
[6]
LAFIM, ALRAWASHEDT, HAMMADA M. Automated test cases generation from requirements specification[C]//2021 International Conference on Information Technology (ICIT). New York: IEEE Press, 2021: 852-857. DOI: 10.1109/ICIT52682.2021.9491761 .
[7]
HAMMOUDIM, MAYR-DORNC, MASHKOORA, et al. On the effect of incompleteness to check requirement-to-method traces[DB/OL].[2023-10-10]. DOI: 10.1145/3412841.3442021 .
[8]
BORGM, RUNESONP, ARDÖA. Recovering from a decade: A systematic mapping of information retrieval approaches to software traceability[J]. Empirical Software Engineering, 2014, 19(6): 1565-1616. DOI: 10.1007/s10664-013-9255-y .
[9]
ANTONIOLG, CANFORAG, CASAZZAG, et al. Recovering traceability links between code and documentation[J]. IEEE Transactions on Software Engineering, 2002, 28(10): 970-983. DOI: 10.1109/TSE.2002.1041053 .
[10]
ZHAOT, CAOQ H, SUNQ. An improved approach to traceability recovery based on word embeddings[C]//2017 24th Asia-Pacific Software Engineering Conference (APSEC). New York: IEEE Press, 2017: 81-89. DOI: 10.1109/APSEC.2017.14 .
[11]
MILLSC. Automating traceability link recovery through classification[DB/OL].[2023-10-10]. DOI: 10.1145/3106237.3121280 .
[12]
MILLSC, HAIDUCS. The impact of retrieval direction on IR-based traceability link recovery[C]//2017 IEEE/ACM 39th International Conference on Software Engineering: New Ideas and Emerging Technologies Results Track (ICSE-NIER). New York: IEEE Press, 2017: 51-54. DOI: 10.1109/ICSE-NIER.2017.14 .
[13]
WANGB C, DENGY, LUOR Q, et al. An empirical study on source code feature extraction in preprocessing of IR-based requirements traceability[C]//2022 IEEE 22nd International Conference on Software Quality, Reliability and Security (QRS). New York: IEEE Press, 2022: 1069-1078. DOI: 10.1109/QRS57517.2022.00110 .
[14]
LIX, WANGB C, WANH, et al. Applications of machine learning in requirements traceability: A systematic mapping study[C]//Proceedings of the 35th International Conference on Software Engineering and Knowledge Engineering. Pennsylvania:KSI Research Inc,2023:566-571. DOI: 10.18293/SEKE2023-135 .
WANGY, HUK, JIANGB, et al. A systematic literature review of software traceability links automation techniques[J]. Chinese Journal of Computers, 2023, 46(9): 1919-1946. DOI: 10.11897/SP.J.1016.2023.01919(Ch ).
[17]
MILLSC, HAIDUCS. A machine learning approach for determining the validity of traceability links[C]//2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C). New York: IEEE Press, 2017: 121-123. DOI: 10.1109/ICSE-C.2017.86 .
[18]
HAYESJ H, DEKHTYARA, SUNDARAMS K. Advancing candidate link generation for requirements tracing: The study of methods[J]. IEEE Transactions on Software Engineering, 2006, 32(1): 4-19. DOI: 10.1109/TSE.2006.3 .
CHENL, WANGD D, WANGQ, et al. Enhancing requirements traceability recovery via a graph mining-based expansion learning[J]. Journal of Computer Research and Development, 2021, 58(4): 777-793. DOI: 10.7544/issn1000-1239.2021.20200733(Ch ).
[21]
RAGHAVANV V, WONGS K M. A critical analysis of vector space model for information retrieval[J]. Journal of the American Society for Information Science, 1986, 37(5): 279-287. DOI: 10.1002/(sici)1097-4571(198609)37: 5279: aid-asi1>3.0.co;2-q .
[22]
HOFMANNT. Probabilistic latent semantic indexing[C]//Proceedings of the 22nd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval. New York: ACM, 1999: 50-57. DOI: 10.1145/312624.312649 .
[23]
ASUNCIONH U, ASUNCIONA U, TAYLORR N. Software traceability with topic modeling[C]//Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering. New York: ACM, 2010: 95-104. DOI: 10.1145/1806799.1806817 .
YUR W, DENGD W, WANGZ. Interaction and graph attention network-based model for code search[J]. Journal of Wuhan University (Natural Science Edition), 2023, 69(6): 757-766. DOI: 10.14188/j.1671-8836.2022.0298(Ch ).
[26]
SETTIMIR, CLELAND-HUANGJ, KHADRA OBEN, et al. Supporting software evolution through dynamically retrieving traces to UML artifacts[C]//Proceedings of 7th International Workshop on Principles of Software Evolution. New York: IEEE Press, 2004: 49-54. DOI: 10.1109/IWPSE.2004.1334768 .
[27]
GIBIECM, CZAUDERNAA, CLELAND-HUANGJ. Towards mining replacement queries for hard-to-retrieve traces[DB/OL].[2023-10-10]. DOI: 10.1145/1858996.1859046 .
[28]
CHENX F, HOSKINGJ, GRUNDYJ. A combination approach for enhancing automated traceability (NIER track)[C]//2011 33rd International Conference on Software Engineering (ICSE). New York: IEEE Press, 2011: 912-915. DOI:10.1145/1985793.1985943 .
[29]
LIT, WANGS H, LILLISD, et al. Combining machine learning and logical reasoning to improve requirements traceability recovery[J]. Applied Sciences, 2020, 10(20): 7253. DOI: 10.3390/app10207253 .
[30]
GUOJ, CHENGJ H, CLELAND-HUANGJ. Semantically enhanced software traceability using deep learning techniques[C]//2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE). New York: IEEE Press, 2017: 3-14. DOI: 10.1109/ICSE.2017.9 .
[31]
FALESSID, CANTONEG, CANFORAG. Empirical principles and an industrial case study in retrieving equivalent requirements via natural language processing techniques[J]. IEEE Transactions on Software Engineering, 2013, 39(1): 18-44. DOI: 10.1109/TSE.2011.122 .
[32]
GADELHAG, RAMALHOF, MASSONIT. Traceability recovery between bug reports and test cases—A Mozilla Firefox case study[J]. Automated Software Engineering, 2021, 28(2): 8. DOI: 10.1007/s10515-021-00287-w .
[33]
WANGB C, WANGH, LUOR Q, et al. A systematic mapping study of information retrieval approaches applied to requirements trace recovery[DB/OL].[2023-10-10]. DOI: 10.18293/seke2022-098 .
[34]
HAIDUCS, BAVOTAG, OLIVETOR, et al. Automatic query performance assessment during the retrieval of software artifacts[C]//Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering. New York: ACM, 2012: 90-99. DOI: 10.1145/2351676.2351690 .
[35]
HAIDUCS, DE ROSAG, BAVOTAG, et al. Query quality prediction and reformulation for source code search: The Refoqus tool[C]//2013 35th International Conference on Software Engineering (ICSE). New York: IEEE Press, 2013: 1307-1310. DOI: 10.1109/ICSE.2013.6606704 .
[36]
MILLSC, BAVOTAG, HAIDUCS, et al. Predicting query quality for applications of text retrieval to software engineering tasks[J]. ACM Transactions on Software Engineering and Methodology, 2017,26(1): 1–45. DOI: 10.1145/3078841 .
[37]
MIKOLOVT, SUTSKEVERI, CHENK, et al. Distributed representations of words and phrases and their compositionality[DB/OL].[2023-10-10].DOI: 10.48550/arXiv.1310.4546 .
[38]
PENNINGTONJ, SOCHERR, MANNINGC. Glove: Global vectors for word representation[C]//Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). Stroudsburg: Association for Computational Linguistics, 2014: 1532-1543. DOI: 10.3115/v1/d14-1162 .
[39]
BOJANOWSKIP, GRAVEE, JOULINA, et al. Enriching word vectors with subword information[J]. Transactions of the Association for Computational Linguistics, 2017, 5: 135-146. DOI: 10.1162/tacl_a_00051 .
[40]
PETERSM, NEUMANNM, IYYERM, et al. Deep contextualized word representations[C]//Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). Stroudsburg: Association for Computational Linguistics, 2018: 2227-2237. DOI: 10.18653/v1/n18-1202 .
[41]
REIMERSN, GUREVYCHI. Sentence-BERT: Sentence embeddings using siamese BERT-Networks[C]//Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing. Stroudsburg: Association for Computational Linguistics, 2019: 3982-3992. DOI: 10.18653/v1/d19-1410 .
CAPOBIANCOG, DE LUCIAA, OLIVETOR, et al. Improving IR-based traceability recovery via noun-based indexing of software artifacts[J]. Journal of Software: Evolution and Process, 2013, 25(7): 743-762. DOI: 10.1002/smr.1564 .
[46]
LORMANSM, VAN DEURSENA. Can LSI help reconstructing requirements traceability in design and test? [C]//Conference on Software Maintenance and Reengineering (CSMR'06). New York: IEEE Press, 2006: 47-56. DOI: 10.1109/CSMR.2006.13 .
[47]
CHENL, WANGD D, WANGJ J, et al. Enhancing unsupervised requirements traceability with sequential semantics[C]//2019 26th Asia-Pacific Software Engineering Conference(APSEC). New York: IEEE Press, 2019: 23-30. DOI: 10.1109/APSEC48747.2019.00013 .
[48]
LINJ F, LIUY L, ZENGQ K, et al. Traceability transformed: Generating more accurate links with pre-trained BERT models[C]//2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE). New York: IEEE Press, 2021: 324-335. DOI: 10.1109/ICSE43902.2021.00040 .
[49]
CASANOVAJ M, PRESEDO QUINDIMILM A, BARREIROÁ. Overall comparison at the standard levels of recall of multiple retrieval methods with the Friedman test[M]// Advances in Information Retrieval. Berlin: Springer, 2007: 682-685. DOI: 10.1007/978-3-540-71496-5_68 .
HUC H, PENGR, WANGB C. A survey of requirement tracking method based on information retrieval[J]. Computer Applications and Software, 2017, 34(10): 20-28. DOI: 10.3969/j.issn.1000-386x.2017.10.004 (Ch ).
[52]
GUOJ, CHENGJ H, CLELAND-HUANGJ. Semantically enhanced software traceability using deep learning techniques[C]//2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE). New York: IEEE Press, 2017: 3-14. DOI: 10.1109/ICSE.2017.9 .