Cited by 33Software Engineering ResearchTopic ModelingSoftware Engineering Techniques and Practices

Correlating Automated and Human Evaluation of Code Documentation Generation Quality

Open access
Hu, Xing, Chen, Qiuyuan, Wang, Haoye, Xia, Xin, Lo, David, Zimmermann, Thomas·2022·ACM Transactions on Software Engineering and Methodology

Abstract

Automatic code documentation generation has been a crucial task in the field of software engineering. It not only relieves developers from writing code documentation but also helps them to understand programs better. Specifically, deep-learning-based techniques that leverage large-scale source code corpora have been widely used in code documentation generation. These works tend to use automatic metrics (such as BLEU, METEOR, ROUGE, CIDEr, and SPICE) to evaluate different models. These metrics compare generated documentation to reference texts by measuring the overlapping words. Unfortunately, there is no evidence demonstrating the correlation between these metrics and human judgment. We conduct experiments on two popular code documentation generation tasks, code comment generation and commit message generation, to investigate the presence or absence of correlations between these metrics and human judgments. For each task, we replicate three state-of-the-art approaches and the generated documentation is evaluated automatically in terms of BLEU, METEOR, ROUGE-L, CIDEr, and SPICE. We also ask 24 participants to rate the generated documentation considering three aspects (i.e., language, content, and effectiveness). Each participant is given Java methods or commit diffs along with the target documentation to be rated. The results show that the ranking of generated documentation from automatic metrics is different from that evaluated by human annotators. Thus, these automatic metrics are not reliable enough to replace human evaluation for code documentation generation tasks. In addition, METEOR shows the strongest correlation (with moderate Pearson correlation r about 0.7) to human evaluation metrics. However, it is still much lower than the correlation observed between different annotators (with a high Pearson correlation r about 0.8) and correlations that are reported in the literature for other tasks (e.g., Neural Machine Translation [ 39 ]). Our study points to the need to develop specialized automated evaluation metrics that can correlate more closely to human evaluation metrics for code generation tasks.

Integrity signals

Registry

Crossref · 10.1145/3502853

Cites

45 of 45 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

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?

  • InCoder-1b has relatively fewer parameters, and it is still challenging for it to understand and capture the content and associations of multiple examples in the input.

    “The reason may be that InCoder-1b has relatively fewer parameters, and it is still challenging for it to understand and capture the content and associations of multiple examples in the input [30].”
  • Traditional NLP metrics such as ROUGE, METEOR, and BLEU are known to poorly correlate with human evaluations of natural language generations.

    “Traditional NLP metrics such as ROUGE, METEOR, and BLEU—which simply count n-gram overlap between generated and reference text—are known to poorly correlate with human evaluations of natural language generations83–85.”

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Hu, X., Chen, Q., Wang, H., Xia, X., Lo, D., & Zimmermann, T.
Affiliations
  • Zhejiang University (CN)
  • Monash University (AU)
  • Singapore Management University (SG)
  • Microsoft (United States) (US)
Venue
ACM Transactions on Software Engineering and Methodology
Published
2022-07-28
Volume
31
Issue
4
Pages
1-28
ISSN
  • 1049-331X (ISSN-L)
  • 1557-7392
OpenAlex
W4281400706
Cited by
33
References
45
Citations by year
2026: 3 · 2025: 10 · 2024: 12 · 2023: 7 · 2022: 1
FWCI
7.43
Type
journal article
Language
en
Open access
Locations
  • ACM Transactions on Software Engineering and Methodology (publishedVersion)
  • Singapore Management University Institutional Knowledge (InK) (Singapore Management University) (submittedVersion, other-oa)
Funders
  • National Science Foundation of China (U20A20173)
  • National Research Foundation, Singapore
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
Keywords
automatic evaluation metrics, human evaluation, code comment generation, commit message generation, meteors, BLEU, ROUGE-L, cider, spices, Java methods, annotation agreement

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