Pith. sign in

REVIEW 7 cited by

Identifying Inaccurate Descriptions in LLM-generated Code Comments via Test Execution

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2406.14836 v1 pith:KJV7JVFY submitted 2024-06-21 cs.SE

Identifying Inaccurate Descriptions in LLM-generated Code Comments via Test Execution

classification cs.SE
keywords commentsaccuracycommentdocumentinaccuratetechniquesapproachbeen
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
read the original abstract

Software comments are critical for human understanding of software, and as such many comment generation techniques have been proposed. However, we find that a systematic evaluation of the factual accuracy of generated comments is rare; only subjective accuracy labels have been given. Evaluating comments generated by three Large Language Models (LLMs), we find that even for the best-performing LLM, roughly a fifth of its comments contained demonstrably inaccurate statements. While it seems code-comment consistency detection techniques should be able to detect inaccurate comments, we perform experiments demonstrating they have no statistically significant relationship with comment accuracy, underscoring the substantial difficulty of this problem. To tackle this, we propose the concept of document testing, in which a document is verified by using an LLM to generate tests based on the document, running those tests, and observing whether they pass or fail. Furthermore, we implement our concept to verify Java comments. Experiments demonstrate that our approach has a robust statistical relationship with comment accuracy, making headway into a problem where prior techniques failed. Qualitative evaluation also reveals the promise of our approach in gaining developer trust, while highlighting the limitations of our current implementation.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 7 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. CASCADE: Detecting Inconsistencies between Code and Documentation with Automatic Test Generation

    cs.SE 2026-04 unverdicted novelty 7.0

    CASCADE finds code-documentation mismatches by running LLM-generated tests from docs and confirming failure only when documentation-derived code succeeds on the same test.

  2. Programmers Are Poor and Overconfident Judges of LLM-Generated Assertions

    cs.SE 2026-07 accept novelty 6.5

    Developers are nearly three times more likely to correctly accept correct LLM assertions than to reject incorrect ones, and accompanying natural-language comments provide no net benefit and can increase overconfidence.

  3. The Hitchhiker's Guide to Monoculture

    cs.CY 2026-07 conditional novelty 6.0

    Code written for Kaggle contests has become substantially more similar in syntax since ChatGPT, converging heavily on seed 42, while the semantic diversity of solution approaches has not declined.

  4. XSearch: Explainable Code Search via Concept-to-Code Alignment

    cs.SE 2026-05 unverdicted novelty 6.0

    XSearch achieves explainable code search by breaking queries into functional concepts and matching them directly to code statements, delivering large gains on out-of-distribution benchmarks.

  5. XSearch: Explainable Code Search via Concept-to-Code Alignment

    cs.SE 2026-05 unverdicted novelty 6.0

    XSearch achieves 15x gains on out-of-distribution code search benchmarks by replacing global embedding similarity with explicit concept-to-statement alignment.

  6. Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code

    cs.SE 2026-05 conditional novelty 6.0

    Using a 61-feature readability model, LLM code matches or slightly exceeds human code in readability score, shows distinct issue patterns, and prompt design has limited influence.

  7. Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code

    cs.SE 2026-05 unverdicted novelty 5.0

    LLM-generated code matches human-written code in overall readability but exhibits different issue patterns, and prompt engineering has limited impact on improving it.