CoChat

Revisiting and Improving Retrieval-Augmented Deep Assertion Generation

Sun, Weifeng, Li, Hongyan, Yan, Meng, Lei, Yan, Zhang, Hongyu · 2023 · 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)
Cited by 17

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.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1109/ase56229.2023.00090

Cites

38 of 38 references verified0 citation errors · 0 not checkable

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.

A few free checks a day · papers already verified open instantly · results are public

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?

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

Research works printed but not linked: 12

  1. hata, 2018, Learning to generate corrective patches using neural machine translation, CoRR, abs 1812 7170
  2. tanimoto, 1958, An elementary mathematical theory of classification and prediction
  3. srivastava, 2014, Dropout: a simple way to prevent neural networks from overfitting, J Mach Learn Res, 15, 1929
  4. 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
  5. 2023, Word vectors for 157 languages
  6. 2021, Overlap-Wikipedia
  7. 2022, Integration Artifact
  8. thunes, 2019, Javalang
  9. zaremba, 2014, Recurrent neural network regularization, CoRR, abs 1409 2329
  10. 2022, ToGA Artifact
  11. 2022, A issue bug of ToGA Artifact
  12. 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

See all 17

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.