Research map / Large language models / Agents, code and math
Testing the Effect of Code Documentation on Large Language Model Code Understanding
William Macke, Michael Doyle
The MITRE Corporation
Read the paperPlace an idea next to itCheck your own paper ↗
10measured effects
1improved
2no clear effect
5hurt
2mixed
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| replace docstring with a random comment from another function (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test generation | unit test success rate: GPT-3.5 22.1% successes; GPT-4 68.1% successes (lowest of all variants) | Hurt |
| replace variable names with random strings (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test generation | unit test success rate | No clear effect |
| replace variable names with animal names (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test generation | unit test success rate: GPT-3.5 44.7% -> 40.6%; GPT-4 78.5% -> 76.6% | Hurt |
| add correct comments and docstring (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test generation | unit test success rate | No clear effect |
| add correct comments and docstring (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test line coverage | line coverage (%) | Improved |
| replace docstring with a random comment (ablation) | GPT-3.5 and GPT-4 · HumanEval unit-test line coverage | line coverage (%) | Hurt |
| keep only 10%, 25% or 50% of docstring lines instead of all (ablation) | GPT-4 · HumanEval unit-test generation | errors and failed tests | Mixed |
| keep only part of the docstring lines (ablation) | GPT-3.5 · HumanEval unit-test generation | runtime errors | Mixed |
| animal variable names (ablation) | GPT-3.5 · HumanEval unit-test line coverage | line coverage (%) | Hurt |
| keep only 10% of docstring lines (ablation) | GPT-3.5 · HumanEval unit-test line coverage | line coverage (%) | Hurt |
Open problems in code generation benchmarks
Do code benchmarks and methods hold beyond Python, small test sets and leaked data?
- Tested on Python or a few languages, so other languages are untested. · 25 papers state it
- Benchmarks are small, with a few dozen to a few hundred problems. · 14 papers state it
- Iterative or multi-step methods cost more tokens, latency and compute. · 12 papers state it
Closest papers by meaning
- To Code or Not To Code? Exploring Impact of Code in Pre-training (ICLR 2025 · similarity 0.88)
- Can LLM Replace Stack Overflow? A Study on Robustness and Reliability of Large Language Model Code Generation (AAAI 2024 · similarity 0.87)
- Evaluation of Large Language Models on Code Obfuscation (Student Abstract) (AAAI 2024 · similarity 0.87)
- Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding? (ICML 2025 · similarity 0.87)
- At Which Training Stage Does Code Data Help LLMs Reasoning? (ICLR 2024 · similarity 0.86)
- Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicates (ICML 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.