Revisiting and Improving Retrieval-Augmented Deep Assertion Generation
The DOI matches its Crossref record; 38 of the 38 references it cites were found in a registry or an index.
Abstract
Unit testing validates the correctness of the unit under test and has become an essential activity in software development process. A unit test consists of a test prefix that drives the unit under test into a particular state, and a test oracle (e.g., assertion), which specifies the behavior in that state. To reduce manual efforts in conducting unit testing, Yu et al. proposed an integrated approach (integration for short), combining information retrieval with a deep learning-based approach, to generate assertions for a unit test. Despite being promising, there is still a knowledge gap as to why or where integration works or does not work. In this paper, we describe an in-depth analysis of the effectiveness of integration. Our analysis shows that: ① The overall performance of integration is mainly due to its success in retrieving assertions. ② integration struggles to understand the semantic differences between the retrieved focal-test (focal-test includes a test prefix and a unit under test) and the input focal-test, resulting in many tokens being incorrectly modified; ③ integration is limited to specific types of edit operations (i.e., replacement) and cannot handle token addition or deletion. To improve the effectiveness of assertion generation, this paper proposes a novel retrieve-and-edit approach named EDITAS. Specifically, Editas first retrieves a similar focal-test from a pre-defined corpus and treats its assertion as a prototype. Then, Editas reuses the information in the prototype and edits the prototype automatically. Editas is more generalizable than integration because it can ❶ comprehensively understand the semantic differences between input and similar focal-tests; ❷ apply appropriate assertion edit patterns with greater flexibility; and ❸ generate more diverse edit actions than just replacement operations. We conduct experiments on two large-scale datasets and the experimental results demonstrate that Editas outperforms the state-of-the-art approaches, with an average improvement of 10.00%-87.48% and 3.30%-42.65% in accuracy and BLEU score, respectively.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Retrieve-and-edit [100], RepoFusion [243], and EDITAS [244] employ multiple encoders for retrieved contents or edit sequences, then fuse the information for subsequent decoder.”
From Retrieval-Augmented Generation for AI-Generated Content: A Survey (2024) · cites this paper as [244]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Hochreiter, S., & Schmidhuber, J. (1997) · Neural Computation · doi:10.1162/neco.1997.9.8.1735 · Cited by 102,318
Adam: A Method for Stochastic Optimization
Kingma, D. P., & Ba, J. (2014) · arXiv · doi:10.48550/arxiv.1412.6980 · Cited by 98,946
Measures of the Amount of Ecologic Association Between Species
Dice, L. R. (1945) · Ecology · doi:10.2307/1932409 · Cited by 11,874
Effective Approaches to Attention-based Neural Machine Translation
Luong, T., Pham, H., & Manning, C. D. (2015) · Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d15-1166 · Cited by 8,382
EvoSuite: automatic test suite generation for object-oriented software
Fraser, G., & Arcuri, A. (2011) · Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering · doi:10.1145/2025113.2025179 · Cited by 1,110
Regularizing and Optimizing LSTM Language Models
Merity, S., Keskar, N. S., & Socher, R. (2017) · arXiv · doi:10.48550/arxiv.1708.02182 · Cited by 697
A Novel Neural Source Code Representation Based on Abstract Syntax Tree
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., & Liu, X. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00086 · Cited by 655
Self-citationHu, X., Li, G., Xia, X., Lo, D., & Jin, Z. (2018) · Proceedings of the 26th Conference on Program Comprehension · doi:10.1145/3196321.3196334 · Cited by 621
Randoop: feedback-directed random testing for Java
Pacheco, C., & Ernst, M. D. (2007) · Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion · doi:10.1145/1297846.1297902 · Cited by 558
Gu, X., Zhang, H., & Kim, S. (2018) · Proceedings of the 40th International Conference on Software Engineering · doi:10.1145/3180155.3180167 · Cited by 547
Self-citationGu, X., Zhang, H., Zhang, D., & Kim, S. (2016) · Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2950290.2950334 · Cited by 485
Self-citationSEQUENCER: Sequence-to-Sequence Learning for End-to-End Program Repair
Chen, Z., Kommrusch, S. J., Tufano, M., Pouchet, L.-N., Poshyvanyk, D., & Monperrus, M. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2019.2940179 · Cited by 396
Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree
Wang, W., Li, G., Ma, B., Xia, X., & Jin, Z. (2020) · 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner48275.2020.9054857 · Cited by 287
Wei, H., & Li, M. (2017) · Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence · doi:10.24963/ijcai.2017/423 · Cited by 280
Retrieval-based neural source code summarization
Zhang, J., Wang, X., Zhang, H., Sun, H., & Liu, X. (2020) · Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering · doi:10.1145/3377811.3380383 · Cited by 275
Self-citationSummarizing Source Code with Transferred API Knowledge
Hu, X., Li, G., Xia, X., Lo, D., Lu, S., & Jin, Z. (2018) · Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence · doi:10.24963/ijcai.2018/314 · Cited by 263
DeepSim: deep learning code functional similarity
Zhao, G., & Huang, J. (2018) · Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3236024.3236068 · Cited by 261
Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
Mastropaolo, A., Scalabrino, S., Cooper, N., Nader Palacio, D., Poshyvanyk, D., Oliveto, R., & Bavota, G. (2021) · 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) · doi:10.1109/icse43902.2021.00041 · Cited by 247
Neural-machine-translation-based commit message generation: how far are we?
Liu, Z., Xia, X., Hassan, A. E., Lo, D., Xing, Z., & Wang, X. (2018) · Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/3238147.3238190 · Cited by 247
A Survey on Unit Testing Practices and Problems
Daka, E., & Fraser, G. (2014) · 2014 IEEE 25th International Symposium on Software Reliability Engineering · doi:10.1109/issre.2014.11 · Cited by 175
Boosting coverage-based fault localization via graph-based representation learning
Lou, Y., Zhu, Q., Dong, J., Li, X., Sun, Z., Hao, D., Zhang, L., & Zhang, L. (2021) · Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3468264.3468580 · Cited by 163
An Industrial Evaluation of Unit Test Generation: Finding Real Faults in a Financial Application
Almasi, M. M., Hemmati, H., Fraser, G., Arcuri, A., & Benefelds, J. (2017) · 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP) · doi:10.1109/icse-seip.2017.27 · Cited by 163
Tufano, M., Watson, C., Bavota, G., Di Penta, M., White, M., & Poshyvanyk, D. (2018) · Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/3238147.3240732 · Cited by 133
A Survey of Learning-based Automated Program Repair
Zhang, Q., Fang, C., Ma, Y., Sun, W., & Chen, Z. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3631974 · Cited by 132
Self-citationNeural Detection of Semantic Code Clones Via Tree-Based Convolution
Yu, H., Lam, W., Chen, L., Li, G., Xie, T., & Wang, Q. (2019) · 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2019.00021 · Cited by 128
TOGA: a neural method for test oracle generation
Dinella, E., Ryan, G., Mytkowicz, T., & Lahiri, S. K. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510141 · Cited by 118
On learning meaningful assert statements for unit test cases
Watson, C., Tufano, M., Moran, K., Bavota, G., & Poshyvanyk, D. (2020) · Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering · doi:10.1145/3377811.3380429 · Cited by 111
DeepDelta: learning to repair compilation errors
Mesbah, A., Rice, A., Johnston, E., Glorioso, N., & Aftandilian, E. (2019) · Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3338906.3340455 · Cited by 107
Generating accurate assert statements for unit test cases using pretrained transformers
Tufano, M., Drain, D., Svyatkovskiy, A., & Sundaresan, N. (2022) · Proceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test · doi:10.1145/3524481.3527220 · Cited by 99
HireBuild: an automatic approach to history-driven repair of build scripts
Hassan, F., & Wang, X. (2018) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3180155.3180181 · Cited by 91
Using Transfer Learning for Code-Related Tasks
Mastropaolo, A., Cooper, N., Palacio, D. N., Scalabrino, S., Poshyvanyk, D., Oliveto, R., & Bavota, G. (2023) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2022.3183297 · Cited by 72
Automated assertion generation via information retrieval and its integration with deep learning
Yu, H., Lou, Y., Sun, K., Ran, D., Xie, T., Hao, D., Li, Y., Li, G., & Wang, Q. (2022) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3510003.3510149 · Cited by 63
EditSum: A Retrieve-and-Edit Framework for Source Code Summarization
Li, J. A., Li, Y., Li, G., Hu, X., Xia, X., & Jin, Z. (2021) · 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase51524.2021.9678724 · Cited by 62
Understanding build issue resolution in practice: symptoms and fix patterns
Lou, Y., Chen, Z., Cao, Y., Hao, D., & Zhang, L. (2020) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3368089.3409760 · Cited by 57
Automating just-in-time comment updating
Liu, Z., Xia, X., Yan, M., & Li, S. (2020) · Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3324884.3416581 · Cited by 56 · cited 1×
“We follow a similar approach as in [39], [40], aligning the two tokenized focal-test sequences using a diff tool and creating an edit sequence based on the resulting alignment.”
MethodSelf-citationDeepCommenter: a deep code comment generation tool with hybrid lexical and syntactical information
Li, B., Yan, M., Xia, X., Hu, X., Li, G., & Lo, D. (2020) · Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3368089.3417926 · Cited by 35
Self-citationJust-In-Time Obsolete Comment Detection and Update
Liu, Z., Xia, X., Lo, D., Yan, M., & Li, S. (2023) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3138909 · Cited by 33
Self-citationIs ISSTA research relevant to industry?
Hartman, A. (2002) · ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) · doi:10.1145/566172.566207
Research works printed but not linked: 12
- hata, 2018, Learning to generate corrective patches using neural machine translation, CoRR, abs 1812 7170
- tanimoto, 1958, An elementary mathematical theory of classification and prediction
- srivastava, 2014, Dropout: a simple way to prevent neural networks from overfitting, J Mach Learn Res, 15, 1929
- grave, 2018, Learning word vectors for 157 languages, Proceedings of the Eleventh International Conference on Language Resources and Evaluation LREC 2018 Miyazaki Japan May 7–12 2018
- 2023, Word vectors for 157 languages
- 2021, Overlap-Wikipedia
- 2022, Integration Artifact
- thunes, 2019, Javalang
- zaremba, 2014, Recurrent neural network regularization, CoRR, abs 1409 2329
- 2022, ToGA Artifact
- 2022, A issue bug of ToGA Artifact
- planning, 2002, The economic impacts of inadequate infrastructure for software testing, National Institute of Standards and Technology, 1
Cited by
Retrieval-Augmented Generation for AI-Generated Content: A Survey
Zhao, P., Zhang, H., Yu, Q., Wang, Z., Geng, Y., Fu, F., Yang, L., Zhang, W., Jiang, J., & Cui, B. (2024) · arXiv · doi:10.48550/arxiv.2402.19473 · Cited by 240
“It filters out lower-quality data to maintain a high standard of information mapping, offering a variety of retrieval system options like TF-IDF, DPR, RAG, and BLINK + flair to support evidence-based predictions or citations according to task requirements.”
Self-citation
Metadata
- Authors
- Sun, W., Li, H., Yan, M., Lei, Y., & Zhang, H.
- Affiliations
- School of Big Data and Software Engineering, Chongqing University,Chongqing,China
- Venue
- 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)
- Publisher
- IEEE
- Published
- 2023-09-11
- Pages
- 1123-1135
- Cited by
- 17
- References
- 38
- Funders
- National Key Research and Development Project (2021YFB1714200)
- Fundamental Research Funds for the Central Universities (2022CDJDX-005)
- National Natural Science Foundation of China (62002034)
- Natural Science Foundation of Chongqing (cstc2021jcyj-msxmX0538)
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.