{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,8]],"date-time":"2026-10-08T11:34:23Z","timestamp":1791459263129,"version":"4.3.4"},"reference-count":44,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2024,7,12]],"date-time":"2024-07-12T00:00:00Z","timestamp":1720742400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2024,7,12]]},"abstract":"<jats:p>\n                    Unit testing is widely recognized as an essential aspect of the software development process. Generating high-quality assertions automatically is one of the most important and challenging problems in automatic unit test generation. To generate high-quality assertions, deep-learning-based approaches have been proposed in recent years. For state-of-the-art\n                    <jats:bold>d<\/jats:bold>\n                    eep-\n                    <jats:bold>l<\/jats:bold>\n                    earning-based approaches for\n                    <jats:bold>a<\/jats:bold>\n                    ssertion\n                    <jats:bold>g<\/jats:bold>\n                    eneration (DLAGs), the focal method (i.e., the main method under test) for a unit test case plays an important role of being a required part of the input to these approaches. To use DLAGs in practice, there are two main ways to provide a focal method for these approaches: (1) manually providing a developer-intended focal method or (2) identifying a likely focal method from the given test prefix (i.e., complete unit test code excluding assertions) with test-to-code traceability techniques. However, the state-of-the-art DLAGs are all evaluated on the ATLAS dataset, where the focal method for a test case is assumed as the last non-JUnit-API method invoked in the complete unit test code (i.e., code from both the test prefix and assertion portion). There exist two issues of the existing empirical evaluations of DLAGs, causing inaccurate assessment of DLAGs toward adoption in practice. First, it is unclear whether the last method call before assertions (LCBA) technique can accurately reflect developer-intended focal methods. Second, when applying DLAGs in practice, the assertion portion of a unit test is not available as a part of the input to DLAGs (actually being the output of DLAGs); thus, the assumption made by the ATLAS dataset does not hold in practical scenarios of applying DLAGs. To address the first issue, we conduct a study of seven test-to-code traceability techniques in the scenario of assertion generation. We find that the LCBA technique is not the best among the seven techniques and can accurately identify focal methods with only 43.38% precision and 38.42% recall; thus, the LCBA technique cannot accurately reflect developer-intended focal methods, raising a concern on using the ATLAS dataset for evaluation. To address the second issue along with the concern raised by the preceding finding, we apply\n                    <jats:bold>all seven test-to-code traceability techniques<\/jats:bold>\n                    , respectively, to identify focal methods automatically from\n                    <jats:bold>only test prefixes<\/jats:bold>\n                    and construct a new dataset named ATLAS+ by replacing the existing focal methods in the ATLAS dataset with the focal methods identified by the seven traceability techniques, respectively. On a test set from new ATLAS+, we evaluate four state-of-the-art DLAGs trained on a training set from the ATLAS dataset. We find that all of the four DLAGs achieve lower accuracy on a test set in ATLAS+ than the corresponding test set in the ATLAS dataset, indicating that DLAGs should be (re)evaluated with a test set in ATLAS+, which better reflects practical scenarios of providing focal methods than the ATLAS dataset. In addition, we evaluate state-of-the-art DLAGs trained on training sets in ATLAS+. We find that using training sets in ATLAS+ helps effectively improve the accuracy of the ATLAS approach and T5 approach over these approaches trained using the corresponding training set from the ATLAS dataset.\n                  <\/jats:p>","DOI":"10.1145\/3660785","type":"journal-article","created":{"date-parts":[[2024,7,12]],"date-time":"2024-07-12T10:22:09Z","timestamp":1720779729000},"page":"1750-1771","source":"Crossref","is-referenced-by-count":17,"title":["An Empirical Study on Focal Methods in Deep-Learning-Based Approaches for Assertion Generation"],"prefix":"10.1145","volume":"1","author":[{"ORCID":"https:\/\/orcid.org\/0009-0002-1999-436X","authenticated-orcid":false,"given":"Yibo","family":"He","sequence":"first","affiliation":[{"name":"Peking University, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0798-1633","authenticated-orcid":false,"given":"Jiaming","family":"Huang","sequence":"additional","affiliation":[{"name":"Peking University, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3828-7612","authenticated-orcid":false,"given":"Hao","family":"Yu","sequence":"additional","affiliation":[{"name":"Peking University, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6731-216X","authenticated-orcid":false,"given":"Tao","family":"Xie","sequence":"additional","affiliation":[{"name":"Peking University, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2024,7,12]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"2024. https:\/\/github.com\/Yibo-He\/Artifact-ATLAS_Plus-FSE24."},{"key":"e_1_3_1_3_2","doi-asserted-by":"publisher","unstructured":"Miltiadis Allamanis. 2019. The Adverse Effects of Code Duplication in Machine Learning Models of Code. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas New Paradigms and Reflections on Programming and Software. 143\u2013153. https:\/\/doi.org\/10.1145\/3359591.3359735 10.1145\/3359591.3359735","DOI":"10.1145\/3359591.3359735"},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","unstructured":"M. Moein Almasi Hadi Hemmati Gordon Fraser Andrea Arcuri and Jundefinednis Benefelds. 2017. An Industrial Evaluation of Unit Test Generation: Finding Real Faults in a Financial Application. In Proceedings of the 39th IEEE\/ACM International Conference on Software Engineering: Software Engineering in Practice Track. 263\u2013272. https:\/\/doi.org\/10.1109\/ICSE-SEIP.2017.27 10.1109\/ICSE-SEIP.2017.27","DOI":"10.1109\/ICSE-SEIP.2017.27"},{"key":"e_1_3_1_5_2","doi-asserted-by":"publisher","unstructured":"Pietro Braione Giovanni Denaro and Mauro Pezz\u00e8. 2016. JBSE: A Symbolic Executor for Java Programs with Complex Heap Inputs. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. 1018\u20131022. https:\/\/doi.org\/10.1145\/2950290.2983940 10.1145\/2950290.2983940","DOI":"10.1145\/2950290.2983940"},{"key":"e_1_3_1_6_2","doi-asserted-by":"publisher","unstructured":"Ermira Daka and Gordon Fraser. 2014. A Survey on Unit Testing Practices and Problems. In Proceedings of the 25th IEEE International Symposium on Software Reliability Engineering. 201\u2013211. https:\/\/doi.org\/10.1109\/ISSRE.2014.11 10.1109\/ISSRE.2014.11","DOI":"10.1109\/ISSRE.2014.11"},{"key":"e_1_3_1_7_2","doi-asserted-by":"publisher","unstructured":"Elizabeth Dinella Gabriel Ryan Todd Mytkowicz and Shuvendu K. Lahiri. 2022. TOGA: A Neural Method for Test Oracle Generation. In Proceedings of the 44th IEEE\/ACM International Conference on Software Engineering. 2130\u20132141. https:\/\/doi.org\/10.1145\/3510003.3510141 10.1145\/3510003.3510141","DOI":"10.1145\/3510003.3510141"},{"key":"e_1_3_1_8_2","doi-asserted-by":"publisher","unstructured":"Gordon Fraser and Andrea Arcuri. 2011. EvoSuite: Automatic Test Suite Generation for Object-Oriented Software. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering. 416\u2013419. https:\/\/doi.org\/10.1145\/2025113.2025179 10.1145\/2025113.2025179","DOI":"10.1145\/2025113.2025179"},{"key":"e_1_3_1_9_2","volume-title":"Introduction to Modern Information Retrieval","author":"Gerard Salton","year":"1983","unstructured":"Salton Gerard and Michael J. McGill. 1983. Introduction to Modern Information Retrieval. McGraw-Hill College."},{"key":"e_1_3_1_10_2","doi-asserted-by":"publisher","unstructured":"Mohammad Ghafari Carlo Ghezzi and Konstantin Rubinov. 2015. Automatically Identifying Focal Methods Under Test in Unit Test Cases. In Proceedings of the 15th IEEE International Working Conference on Source Code Analysis and Manipulation. 61\u201370. https:\/\/doi.org\/10.1109\/SCAM.2015.7335402 10.1109\/SCAM.2015.7335402","DOI":"10.1109\/SCAM.2015.7335402"},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","unstructured":"Foyzul Hassan and Xiaoyin Wang. 2018. HireBuild: An Automatic Approach to History-Driven Repair of Build Scripts. In Proceedings of the 40th IEEE\/ACM International Conference on Software Engineering. 1078\u20131089. https:\/\/doi.org\/10.1145\/3180155.3180181 10.1145\/3180155.3180181","DOI":"10.1145\/3180155.3180181"},{"key":"e_1_3_1_12_2","doi-asserted-by":"publisher","unstructured":"Tianxing He Shengcheng Yu Ziyuan Wang Jieqiong Li and Zhenyu Chen. 2019. From Data Quality to Model Quality: An Exploratory Study on Deep Learning. In Proceedings of the 11th Asia-Pacific Symposium on Internetware. 1\u20136. https:\/\/doi.org\/10.1145\/3361242.3361260 10.1145\/3361242.3361260","DOI":"10.1145\/3361242.3361260"},{"key":"e_1_3_1_13_2","doi-asserted-by":"publisher","unstructured":"Ren\u00e9 Just Darioush Jalali and Michael D. Ernst. 2014. Defects4J: A Database of Existing Faults to Enable Controlled Testing Studies for Java Programs. In Proceedings of the 23rd ACM SIGSOFT International Symposium on Software Testing and Analysis. 437\u2013440. https:\/\/doi.org\/10.1145\/2610384.2628055 10.1145\/2610384.2628055","DOI":"10.1145\/2610384.2628055"},{"key":"e_1_3_1_14_2","doi-asserted-by":"publisher","unstructured":"Manabu Kamimura and Gail C. Murphy. 2013. Towards Generating Human-Oriented Summaries of Unit Test Cases. In Proceedings of the 21st IEEE International Conference on Program Comprehension. 215\u2013218. https:\/\/doi.org\/10.1109\/ICPC.2013.6613851 10.1109\/ICPC.2013.6613851","DOI":"10.1109\/ICPC.2013.6613851"},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","unstructured":"Mike Lewis Yinhan Liu Naman Goyal Marjan Ghazvininejad Abdelrahman Mohamed Omer Levy Ves Stoyanov and Luke Zettlemoyer. 2020. BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation Translation and Comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. 7871\u20137880. https:\/\/doi.org\/10.18653\/v1\/2020.acl-main.703 10.18653\/v1\/2020.acl-main.703","DOI":"10.18653\/v1\/2020.acl-main.703"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","unstructured":"Zhongxin Liu Kui Liu Xin Xia and Xiaohu Yang. 2023. Towards More Realistic Evaluation for Neural Test Oracle Generation. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis. 589\u2013600. https:\/\/doi.org\/10.1145\/3597926.3598080 10.1145\/3597926.3598080","DOI":"10.1145\/3597926.3598080"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","unstructured":"Yiling Lou Zhenpeng Chen Yanbin Cao Dan Hao and Lu Zhang. 2020. Understanding Build Issue Resolution in Practice: Symptoms and Fix Patterns. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 617\u2013628. https:\/\/doi.org\/10.1145\/3368089.3409760 10.1145\/3368089.3409760","DOI":"10.1145\/3368089.3409760"},{"key":"e_1_3_1_18_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2022.3183297"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","unstructured":"Antonio Mastropaolo Simone Scalabrino Nathan Cooper David Nader Palacio Denys Poshyvanyk Rocco Oliveto and Gabriele Bavota. 2021. Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks. In Proceedings of the 43rd IEEE\/ACM International Conference on Software Engineering. 336\u2013347. https:\/\/doi.org\/10.1109\/ICSE43902.2021.00041 10.1109\/ICSE43902.2021.00041","DOI":"10.1109\/ICSE43902.2021.00041"},{"key":"e_1_3_1_20_2","unstructured":"Microsoft. 2022. TOGA. https:\/\/github.com\/microsoft\/toga."},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","unstructured":"Aleksandar Milicevic Sasa Misailovic Darko Marinov and Sarfraz Khurshid. 2007. Korat: A Tool for Generating Structurally Complex Test Inputs. In Proceedings of the 29th IEEE\/ACM International Conference on Software Engineering. 771\u2013774. https:\/\/doi.org\/10.1109\/ICSE.2007.48 10.1109\/ICSE.2007.48","DOI":"10.1109\/ICSE.2007.48"},{"key":"e_1_3_1_22_2","unstructured":"Moses. 2017. Multi-BLEU. https:\/\/github.com\/moses-smt\/mosesdecoder\/blob\/master\/scripts\/generic\/multi-bleu.perl. Retrieved on March 28 2023."},{"key":"e_1_3_1_23_2","unstructured":"NVIDIA NGC. 2017. TensorFlow Container. https:\/\/catalog.ngc.nvidia.com\/orgs\/nvidia\/containers\/tensorflow. Retrieved on March 28 2023."},{"key":"e_1_3_1_24_2","unstructured":"OpenAI. 2022. ChatGPT. https:\/\/chat.openai.com."},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","unstructured":"Carlos Pacheco and Michael D. Ernst. 2007. Randoop: Feedback-Directed Random Testing for Java. In Companion to the 22nd ACM SIGPLAN Conference on Object-Oriented Programming Systems and Applications Companion. 815\u2013816. https:\/\/doi.org\/10.1145\/1297846.1297902 10.1145\/1297846.1297902","DOI":"10.1145\/1297846.1297902"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1109\/TR.2014.2338254"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","unstructured":"Abdallah Qusef Gabriele Bavota Rocco Oliveto Andrea De Lucia and David Binkley. 2011. SCOTCH: Test-to-code Traceability using Slicing and Conceptual Coupling. In Proceedings of the 27th IEEE International Conference on Software Maintenance. 63\u201372. https:\/\/doi.org\/10.1109\/ICSM.2011.6080773 10.1109\/ICSM.2011.6080773","DOI":"10.1109\/ICSM.2011.6080773"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","unstructured":"Abdallah Qusef Rocco Oliveto and Andrea De Lucia. 2010. Recovering Traceability Links between Unit Tests and Classes under Test: An Improved Method. In Proceedings of the 26th IEEE International Conference on Software Maintenance. 1\u201310. https:\/\/doi.org\/10.1109\/ICSM.2010.5609581 10.1109\/ICSM.2010.5609581","DOI":"10.1109\/ICSM.2010.5609581"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.5555\/3455716.3455856"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","unstructured":"Bart Van Rompaey and Serge Demeyer. 2009. Establishing Traceability Links between Unit Test Cases and Units under Test. In Proceedings of the 7th European Conference on Software Maintenance and Reengineering. 209\u2013218. https:\/\/doi.org\/10.1109\/CSMR.2009.39 10.1109\/CSMR.2009.39","DOI":"10.1109\/CSMR.2009.39"},{"key":"e_1_3_1_31_2","doi-asserted-by":"publisher","unstructured":"Sina Shamshiri. 2015. Automated Unit Test Generation for Evolving Software. In Proceedings of the 10th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 1038\u20131041. https:\/\/doi.org\/10.1145\/2786805.2803196 10.1145\/2786805.2803196","DOI":"10.1145\/2786805.2803196"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/3607183"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","unstructured":"Ilya Sutskever Oriol Vinyals and Quoc V. Le. 2014. Sequence to Sequence Learning with Neural Networks. In Proceedings of the 27th International Conference on Neural Information Processing Systems. 3104\u20133112. https:\/\/doi.org\/10.48550\/arXiv.1409.3215 10.48550\/arXiv.1409.3215","DOI":"10.48550\/arXiv.1409.3215"},{"key":"e_1_3_1_34_2","unstructured":"T. T. Tanimoto. 1958. An Elementary Mathematical Theory of Classification and Prediction. IBM Internal Report."},{"key":"e_1_3_1_35_2","unstructured":"Chris Thunes. 2019. Javalang. https:\/\/github.com\/c2nes\/javalang. Retrieved on March 28 2023."},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","unstructured":"Michele Tufano Shao Kun Deng Neel Sundaresan and Alexey Svyatkovskiy. 2022. Methods2Test: A Dataset of Focal Methods Mapped to Test Cases. In Proceedings of the 19th IEEE\/ACM International Conference on Mining Software Repositories. 299\u2013303. https:\/\/doi.org\/10.1145\/3524842.3528009 10.1145\/3524842.3528009","DOI":"10.1145\/3524842.3528009"},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","unstructured":"Michele Tufano Dawn Drain Alexey Svyatkovskiy and Neel Sundaresan. 2022. Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformers. In Proceedings of the 17th IEEE\/ACM International Conference on Automation of Software Test. 54\u201364. https:\/\/doi.org\/10.1145\/3524481.3527220 10.1145\/3524481.3527220","DOI":"10.1145\/3524481.3527220"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","unstructured":"Sinan Wang Ming Wen Yepang Liu Ying Wang and Rongxin Wu. 2021. Understanding and Facilitating the Co-Evolution of Production and Test Code. In Proceedings of the 28th IEEE International Conference on Software Analysis Evolution and Reengineering. 272\u2013283. https:\/\/doi.org\/10.1109\/SANER50967.2021.00033 10.1109\/SANER50967.2021.00033","DOI":"10.1109\/SANER50967.2021.00033"},{"key":"e_1_3_1_39_2","unstructured":"Cody Watson. 2019. ATLAS Appendix. https:\/\/sites.google.com\/view\/atlas-nmt\/home. RetrievedonMarch28 2023."},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","unstructured":"Cody Watson Michele Tufano Kevin Moran Gabriele Bavota and Denys Poshyvanyk. 2020. On Learning Meaningful Assert Statements for Unit Test Cases. In Proceedings of the 42nd IEEE\/ACM International Conference on Software Engineering. 1398\u20131409. https:\/\/doi.org\/10.1145\/3377811.3380429 10.1145\/3377811.3380429","DOI":"10.1145\/3377811.3380429"},{"key":"e_1_3_1_41_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-021-10079-1"},{"key":"e_1_3_1_42_2","doi-asserted-by":"publisher","unstructured":"Robert White Jens Krinke and Raymond Tan. 2020. Establishing Multilevel Test-to-Code Traceability Links. In Proceedings of the 42nd IEEE\/ACM International Conference on Software Engineering. 861\u2013872. https:\/\/doi.org\/10.1145\/3377811.3380921 10.1145\/3377811.3380921","DOI":"10.1145\/3377811.3380921"},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","unstructured":"Tao Xie. 2006. Augmenting Automatically Generated Unit-Test Suites with Regression Oracle Checking. In Proceedings of the 20th European Conference on Object-Oriented Programming. 380\u2013403. https:\/\/doi.org\/10.1007\/11785477_23 10.1007\/11785477_23","DOI":"10.1007\/11785477_23"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","unstructured":"Hao Yu Yiling Lou Ke Sun Dezhi Ran Tao Xie Dan Hao Ying Li Ge Li and Qianxiang Wang. 2022. Automated Assertion Generation via Information Retrieval and Its Integration with Deep Learning. In Proceedings of the 44th IEEE\/ACM International Conference on Software Engineering. 163\u2013174. https:\/\/doi.org\/10.1145\/3510003.3510149 10.1145\/3510003.3510149","DOI":"10.1145\/3510003.3510149"},{"key":"e_1_3_1_45_2","doi-asserted-by":"publisher","unstructured":"Benwen Zhang Emily Hill and James Clause. 2016. Towards Automatically Generating Descriptive Names for Unit Tests. In Proceedings of the 31st IEEE\/ACM International Conference on Automated Software Engineering. 625\u2013636. https:\/\/doi.org\/10.1145\/2970276.2970342 10.1145\/2970276.2970342","DOI":"10.1145\/2970276.2970342"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3660785","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3660785","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T07:59:21Z","timestamp":1770191961000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3660785"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,7,12]]},"references-count":44,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2024,7,12]]}},"alternative-id":["10.1145\/3660785"],"URL":"https:\/\/doi.org\/10.1145\/3660785","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,7,12]]}}}