LintEval: Benchmarking LLMs on Linter-Guided File Refactoring
Organizations: School of Computer Science, Peking University · Key Lab of HCST (PKU), MOE; SCS, Peking University · School of Software Engineering, Beijing Jiaotong University
Abstract
Linters are widely used in code maintenance and real-time IDE editing to surface lint alerts related to performance, style, error-prone, and other patterns in source files. However, existing code benchmarks do not explicitly evaluate linter-guided file refactoring, where models must reduce lint alerts in source files with correct initial functionality while satisfying functionality preservation. We introduce LintEval, a multilingual benchmark for linter-guided file refactoring across C++, Python, and Java, comprising 13,061 programs with correct initial functionality and 171,662 lint alerts extracted using language-specific linters. LintEval jointly evaluates functionality preservation, lint alert reduction, new alert avoidance, and edit minimality. Experiments reveal a persistent trade-off: closed-source commercial models reach up to 90.4% Reduction@P but achieve only 67.1%-68.3% Pass@1, while several open-source small models show low or negative Reduction@P. A controlled fine-tuning study further shows that supervision format matters: refactoring-oriented SFT raises Qwen2.5-Coder-7B Reduction@P from 24.7% to 76.0%. LintEval enables controlled evaluation of models that improve source files under functionality preservation.
Figures & tables
| Metric | Value |
| Unique problems | 3,999 |
| Samples | 13,061 |
| Total lint alerts | 171,662 |
| Avg. alerts per sample | 13.1 |
| Avg. LOC per sample | 61.0 |
| Unique alert types | 396 |
| Model | Pass@1 ( ) | Reduction@P ( ) | New@P ( ) | Line@P ( ) | LinePerFix@P ( ) |
| Copy-Original | 100.0% | 0.0% | 0.0% | 0.0 | – |
| Rule-Based Fixers | 76.3% | 25.9% | 0.6% | 71.4 | 51.7 |
| GPT-5.2 | 67.1% | 87.8% | 7.3% | 71.7 | 16.9 |
| GPT-5.4-mini | 68.3% | 90.4% | 5.6% | 60.2 | 14.2 |
| DeepSeek-v3.2 | 57.6% | 73.0% | 6.7% | 45.4 | 13.8 |
| Qwen2.5-Coder-32B | 61.7% | 57.1% | 8.1% | 33.3 | 12.6 |
| Pass Cases | Failure Cases | |||||||
| Model | Reduction@P | New@P | Line@P | LinePerFix@P | Reduction@F | New@F | Line@F | LinePerFix@F |
| GPT-5.2 | 87.8% | 7.3% | 71.7 | 16.9 | 86.8% | 6.3% | 65.5 | 17.1 |
| GPT-5.4-mini | 90.4% | 5.6% | 60.2 | 14.2 | 89.2% | 4.6% | 69.0 | 13.9 |
| DeepSeek-v3.2 | 73.0% | 6.7% | 45.4 | 13.8 | 41.6% | 6.5% | 23.6 | 12.4 |
| Qwen2.5-Coder-32B | 57.1% | 8.1% | 33.3 | 12.6 | 45.3% | 13.7% | 30.4 | 10.4 |
| Qwen2.5-Coder-0.5B | -1.2% | 10.5% | 17.2 | 9.5 | -169.1% | 11.7% | 13.4 | 131.7 |
| Model | Pass@1 | Reduction@P |
| Qwen3-4B | 45.8 | 32.0 |
| Qwen3-8B | 33.3 | 70.7 |
| Qwen3.5-9B | 37.5 | 31.3 |
| Qwen3.6-27B | 64.3 | 62.0 |
| Qwen3.6-35B-A3B | 65.3 | 61.5 |
| With Alerts | No Alerts | |||||||||
| Model | Pass@1 | Reduction@P | New@P | Line@P | LinePerFix@P | Pass@1 | Reduction@P | New@P | Line@P | LinePerFix@P |
| GPT-5.4-mini | 68.3 | 90.4 | 5.6 | 60.2 | 14.2 | 95.4 | 45.4 | 46.8 | 69.0 | 15.5 |
| DeepSeek-v3.2 | 57.6 | 73.0 | 6.7 | 45.4 | 13.8 | 62.5 | 49.9 | 10.1 | 81.6 | 40.5 |
| Qwen2.5-Coder-0.5B | 48.8 | -1.2 | 10.5 | 17.2 | 9.5 | 60.0 | -1.0 | 3.4 | 10.5 | 74.4 |
| Qwen2.5-Coder-7B | 53.0 | 24.7 | 12.7 | 32.5 | 12.7 | 64.5 | 9.2 | 3.6 | 31.0 | 42.9 |
| Model | Format | Pass@1 | Reduction@P | New@P | Line@P | LinePerFix@P |
| 0.5B | Base | 48.8% | -1.2% | 10.5% | 17.2 | 9.5 |
| A+L A ′ | 37.8% | 79.9% | 8.4% | 42.0 | 15.9 | |
| Q A | 45.2% | -1.0% | 2.5% | 2.6 | 30.8 | |
| Q A ′ | 40.8% | 9.1% | 3.7% | 11.9 | 16.3 | |
| 3B | Base | 52.0% | 9.5% | 11.2% | 27.9 | 12.8 |
| A+L A ′ | 60.4% | 85.0% | 6.6% | 56.1 | 16.0 |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Round 1 P / R | Round 3 P / R | Change R / P |
| GPT-5.4-mini | 67.5 / 77.9 | 65.9 / 86.9 | +9.0 / -1.6 |
| DeepSeek-v3.2 | 67.1 / 71.3 | 63.3 / 81.3 | +10.0 / -3.8 |
| Qwen2.5-Coder-7B | 56.4 / 18.7 | 55.2 / 20.6 | +1.9 / -1.2 |
| Model | Build | Run | TO | Wrong | 90% | 0% |
| GPT-5.4-mini | 10.5 | 5.3 | 1.8 | 82.5 | 19.1 | 2.1 |
| DeepSeek-v3.2 | 28.1 | 6.2 | 1.6 | 64.1 | 22.0 | 4.9 |
| Qwen2.5-Coder-7B | 26.3 | 13.2 | 1.3 | 59.2 | 17.8 | 6.7 |
| Qwen2.5-Coder-0.5B | 40.8 | 9.7 | 0.0 | 49.5 | 15.7 | 13.7 |
| Size | Language | Pass@1 diff. | Reduction@P diff. |
| Qwen2.5-Coder-0.5B | C++ | -22.5 | +89.6 |
| Qwen2.5-Coder-0.5B | Python | +1.5 | +78.9 |
| Qwen2.5-Coder-0.5B | Java | -5.9 | +56.6 |
| Qwen2.5-Coder-3B | C++ | -4.5 | +81.2 |
| Qwen2.5-Coder-3B | Python | +23.1 | +73.7 |
| Qwen2.5-Coder-3B | Java | +11.8 | +63.3 |
| Setting | Pass@1 | Reduction@P |
| Qwen2.5-Coder-3B LoRA | 59.0 | 84.0 |
| Qwen2.5-Coder-3B full-parameter | 63.7 | 85.8 |
| DeepSeek-Coder-6.7B Base | 25.3 | 19.0 |
| DeepSeek-Coder-6.7B A+L A ′ | 61.2 | 79.0 |
| DeepSeek-Coder-6.7B Q A | 24.9 | 13.0 |
| DeepSeek-Coder-6.7B Q A ′ | 8.6 | 18.4 |
| Language | Linter | Rule Family | Linter Version | Compiler/Runtime |
| C++ | clang-tidy | bugprone, performance, modernize, readability | 22.1.0 | g++ 13.3.0 |
| Python | Pylint | error, performance, refactor, convention | 4.0.5 | Python 3.12.10 |
| Java | PMD | Error Prone, Performance, Design, Code Style | 7.12.0 | OpenJDK 21.0.10 |
| Category | Lint Alerts | C++ (clang-tidy) | Python (Pylint) | Java (PMD) |
| Error-prone | 18,434 | bugprone-* | error | Error Prone , Security |
| Performance | 17,776 | performance-* | performance | Performance , Multithreading |
| Refactor | 17,977 | modernize-* | refactor | Design |
| Style | 115,458 | readability-* | convention | Code Style , Best Practices |
| Other | 2,017 | other | other | other |
| C++ | Python | |||||||
| Model | Pass@1 | Reduction@P | New@P | LinePerFix@P | Pass@1 | Reduction@P | New@P | LinePerFix@P |
| GPT-5.2 | 67.2% | 94.9% | 1.3% | 23.4 | 64.5% | 84.4% | 9.7% | 11.6 |
| GPT-5.4-mini | 69.7% | 95.6% | 0.9% | 20.7 | 65.5% | 86.5% | 8.4% | 9.8 |
| DeepSeek-v3.2 | 68.0% | 76.6% | 1.7% | 10.7 | 46.8% | 70.6% | 9.7% | 14.5 |
| Qwen2.5-Coder-32B | 64.3% | 58.6% | 2.1% | 12.9 | 58.1% | 63.5% | 16.2% | 10.1 |
| Qwen2.5-Coder-0.5B | 63.9% | 1.5% | 0.1% | 3.2 | 32.5% | -7.2% | 28.2% | 14.9 |
| Model | Pass@1 | Reduction@P | New@P | LinePerFix@P |
| GPT-5.2 | 76.5% | 77.5% | 17.1% | 18.8 |
| GPT-5.4-mini | 72.5% | 81.7% | 15.1% | 13.4 |
| DeepSeek-v3.2 | 51.0% | 63.7% | 20.5% | 20.0 |
| Qwen2.5-Coder-32B | 62.7% | 37.2% | 14.7% | 22.1 |
| Qwen2.5-Coder-0.5B | 41.2% | -3.6% | 31.3% | 16.7 |
| Qwen2.5-Coder-3B | 49.0% | 8.5% | 29.6% | 15.3 |
| Error-prone | Performance | Refactor | |||||||
| Model | Pass@1 | Reduction@P | New@P | Pass@1 | Reduction@P | New@P | Pass@1 | Reduction@P | New@P |
| GPT-5.2 | 63.3% | 83.0% | 0.7% | 65.8% | 88.9% | 1.3% | 62.0% | 59.3% | 10.5% |
| GPT-5.4-mini | 64.9% | 84.4% | 0.0% | 66.7% | 90.3% | 0.2% | 60.8% | 72.5% | 11.0% |
| DeepSeek-v3.2 | 59.6% | 46.1% | 0.0% | 53.9% | 77.6% | 0.7% | 53.0% | 53.6% | 10.7% |
| Qwen2.5-Coder-32B | 61.3% | 33.3% | 1.3% | 60.2% | 73.5% | 4.2% | 51.9% | 55.6% | 3.7% |
| Qwen2.5-Coder-0.5B | 54.7% | 3.5% | 0.0% | 52.1% | -0.4% | 0.8% | 49.4% | 0.6% | 1.8% |
| Style | Other | |||||
| Model | Pass@1 | Reduction@P | New@P | Pass@1 | Reduction@P | New@P |
| GPT-5.2 | 65.8% | 91.4% | 0.0% | 58.0% | 100.0% | 0.0% |
| GPT-5.4-mini | 66.9% | 93.0% | 0.0% | 62.0% | 100.0% | 0.0% |
| DeepSeek-v3.2 | 55.5% | 79.7% | 1.0% | 64.0% | 98.4% | 0.0% |
| Qwen2.5-Coder-32B | 61.3% | 59.0% | 0.5% | 61.7% | 95.3% | 0.0% |
| Qwen2.5-Coder-0.5B | 46.5% | -0.4% | 2.2% | 61.7% | 3.0% | 0.0% |
| 1 alert | 2–5 alerts | |||||||
| Model | Pass@1 | Reduction@P | New@P | LinePerFix@P | Pass@1 | Reduction@P | New@P | LinePerFix@P |
| GPT-5.2 | 79.5% | 64.5% | 35.5% | 21.9 | 71.7% | 82.5% | 10.0% | 13.1 |
| GPT-5.4-mini | 82.1% | 62.5% | 34.4% | 12.9 | 75.1% | 83.0% | 8.1% | 9.1 |
| DeepSeek-v3.2 | 61.5% | 69.4% | 13.9% | 17.1 | 63.0% | 68.1% | 9.5% | 9.4 |
| Qwen2.5-Coder-32B | 82.1% | 46.9% | 40.6% | 11.2 | 70.5% | 61.4% | 16.6% | 9.0 |
| Qwen2.5-Coder-0.5B | 59.0% | 22.9% | 11.4% | 17.2 | 55.5% | 8.7% | 12.7% | 8.9 |
| 6–10 alerts | 10 alerts | |||||||
| Model | Pass@1 | Reduction@P | New@P | LinePerFix@P | Pass@1 | Reduction@P | New@P | LinePerFix@P |
| GPT-5.2 | 60.0% | 87.2% | 8.7% | 13.7 | 64.5% | 89.0% | 6.3% | 19.3 |
| GPT-5.4-mini | 60.0% | 88.7% | 6.9% | 10.1 | 63.9% | 92.1% | 4.7% | 17.5 |
| DeepSeek-v3.2 | 54.2% | 75.5% | 4.6% | 12.7 | 53.6% | 73.6% | 6.4% | 16.3 |
| Qwen2.5-Coder-32B | 55.0% | 69.4% | 8.3% | 11.1 | 52.4% | 53.1% | 5.7% | 16.1 |
| Qwen2.5-Coder-0.5B | 46.7% | -2.8% | 13.6% | 11.1 | 41.0% | -4.1% | 8.9% | 8.2 |
| Fixed alerts by category | #Fix | #New | Fix/New | ||||
| Format (3B) | E-prone | Perf | Refac | Style | Total | Actual | Ratio |
| Base | 8 | 47 | 39 | 254 | 360 | 261 | 1.4 |
| A+L A ′ | 229 | 241 | 138 | 1803 | 2453 | 189 | 13.0 |
| Q A | 6 | 20 | 14 | 237 | 281 | 98 | 2.9 |
| Q A ′ | 12 | 104 | 14 | 167 | 304 | 585 | 0.5 |
| Language | #Samples | Avg. Messages | Rule Types | Linter |
| C++ | 538 | 10.4 | 89 | clang-tidy |
| Python | 416 | 8.9 | 72 | Pylint |
| Java | 242 | 18.8 | 63 | PMD |
| Total | 1,196 | 11.6 | 224 | – |