The DOI matches its DataCite record.
Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation
Open accessAbstract
Large language models (LLMs) have demonstrated strong performance on function-level code generation benchmarks, yet real-world software development increasingly demands class-level implementations that integrate multiple methods, attributes, and dependencies within authentic project contexts. This gap between benchmark performance and practical utility raises critical questions about LLMs' readiness for production code assistance, particularly regarding their ability to generalize across familiar and novel codebases. We introduce a benchmark derived from real-world open-source repositories, comprising classes divided into seen and unseen partitions to evaluate generalization under practical conditions. We systematically examine how input specification completeness and retrieval-augmented generation affect class-level correctness across multiple state-of-the-art LLMs. Our evaluation reveals a substantial performance gap: while LLMs achieve 84 to 89% correctness on synthetic benchmarks, they attain only 25 to 34% on real-world class tasks, with minimal distinction between familiar and novel codebases. Comprehensive documentation provides marginal improvements (1 to 3%), whereas retrieval augmentation yields greater gains (4 to 7%) by supplying concrete implementation patterns. Error analysis identifies AttributeError, TypeError, and AssertionError as dominant failure modes, with distinct patterns between synthetic and real-world scenarios. These findings provide actionable insights for enhancing context modelling, documentation strategies, and retrieval integration in production code assistance tools.
Overview
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
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?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“For example, recent analyses demonstrate that while benchmark scores can remain stable under fixed test conditions, absolute effectiveness might often decline significantly when inputs are varied or rendered more flexible [345].”
From A Survey of Large Language Models (2026) · cites this paper as [345]
Experimental — accuracy not yet measured
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
Still being checked.
Research works printed but not linked: 46
- S. Agarwal, L. Ahmad, J. Ai, S. Altman, A. Applebaum, E. Arbus, R. K. Arora, Y. Bai, B. Baker, H. Bao, et al. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025. · arXiv
- J. Austin, A. Odena, M. Nye, M. Bosma, H. Michalewski, D. Dohan, E. Jiang, C. Cai, M. Terry, Q. Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. · arXiv
- Y. Benjamini and Y. Hochberg. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal statistical society: series B (Methodological), 57(1):289-300, 1995.
- B. W. Boehm. Software engineering economics. IEEE transactions on Software Engineering, (1):4-21, 1984.
- I. Bouzenia, P. Devanbu, and M. Pradel. Repairagent: An autonomous, llm-based agent for program repair. arXiv preprint arXiv:2403.17134, 2024. · arXiv
- M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. D. O. Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. · arXiv
- N. Cliff. Dominance statistics: Ordinal analyses to answer ordinal questions. Psychological bulletin, 114(3):494, 1993.
- H. Cramér. Mathematical methods of statistics, volume 9. Princeton university press, 1999.
- X. Du, M. Liu, K. Wang, H. Wang, J. Liu, Y. Chen, J. Feng, C. Sha, X. Peng, and Y. Lou. Classeval: A manually-crafted benchmark for evaluating llms on class-level code generation. arXiv preprint arXiv:2308.01861, 2023. · arXiv
- R. A. Fisher. On the interpretation of 𝜒 2 from contingency tables, and the calculation of p. Journal of the royal statistical society, 85(1):87-94, 1922.
- R. A. Fisher. Statistical methods for research workers. In Breakthroughs in statistics: Methodology and distribution, pages 66-70. Springer, 1970.
- M. Friedman. The use of ranks to avoid the assumption of normality implicit in the analysis of variance. Journal of the american statistical association, 32(200):675-701, 1937.
- M. Friedman. A comparison of alternative tests of significance for the problem of m rankings. The annals of mathematical statistics, 11(1):86-92, 1940.
- R. Golman and G. Loewenstein. Information gaps: A theory of preferences regarding the presence and absence of information. Decision, 5(3):143, 2018.
- D. Guo, S. Ren, S. Lu, Z. Feng, D. Tang, S. Liu, L. Zhou, N. Duan, A. Svyatkovskiy, S. Fu, et al. Graphcodebert: Pre-training code representations with data flow. arXiv preprint arXiv:2009.08366, 2020. · arXiv
- D. Hendrycks, S. Basart, S. Kadavath, M. Mazeika, A. Arora, E. Guo, C. Burns, S. Puranik, H. He, D. Song, et al. Measuring coding challenge competence with apps. arXiv preprint arXiv:2105.09938, 2021. · arXiv
- B. Hui, J. Yang, Z. Cui, J. Yang, D. Liu, L. Zhang, T. Liu, J. Zhang, B. Yu, K. Lu, et al. Qwen2. 5-coder technical report. arXiv preprint arXiv:2409.12186, 2024. · arXiv
- H. Husain, H.-H. Wu, T. Gazit, M. Allamanis, and M. Brockschmidt. Codesearchnet challenge: Evaluating the state of semantic code search. arXiv preprint arXiv:1909.09436, 2019. · arXiv
- J. Jiang, F. Wang, J. Shen, S. Kim, and S. Kim. A survey on large language models for code generation. arXiv preprint arXiv:2406.00515, 2024. · arXiv
- W. H. Kruskal and W. A. Wallis. Use of ranks in one-criterion variance analysis. Journal of the American statistical Association, 47(260):583-621, 1952.
- N. M. Laird and J. H. Ware. Random-effects models for longitudinal data. Biometrics, pages 963-974, 1982.
- J. Li, X. Shi, K. Zhang, L. Li, G. Li, Z. Tao, F. Liu, C. Tao, and Z. Jin. Coderag: Supportive code retrieval on bigraph for real-world code generation. arXiv preprint arXiv:2504.10046, 2025. · arXiv
- R. Li, L. B. Allal, Y. Zi, N. Muennighoff, D. Kocetkov, C. Mou, M. Marone, C. Akiki, J. Li, J. Chim, et al. Starcoder: may the source be with you! arXiv preprint arXiv:2305.06161, 2023. · arXiv
- A. Liu, B. Feng, B. Xue, B. Wang, B. Wu, C. Lu, C. Zhao, C. Deng, C. Zhang, C. Ruan, et al. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437, 2024. · arXiv
- G. Loewenstein. The psychology of curiosity: A review and reinterpretation. Psychological bulletin, 116(1):75, 1994.
- S. Lukasczyk and G. Fraser. Pynguin: Automated unit test generation for python. In Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings, pages 168-172, 2022.
- G. Macbeth, E. Razumiejczyk, and R. D. Ledesma. Cliff's delta calculator: A non-parametric effect size program for two groups of observations. Universitas Psychologica, 10(2):545-555, 2011.
- H. B. Mann and D. R. Whitney. On a test of whether one of two random variables is stochastically larger than the other. The annals of mathematical statistics, pages 50-60, 1947.
- N. Munaiah, S. Kroh, C. Cabrey, and M. Nagappan. Curating github for engineered software projects. Empirical Software Engineering, 22(6):3219-3253, 2017.
- A. Panichella, F. M. Kifetew, and P. Tonella. Automated test case generation as a many-objective optimisation problem with dynamic selection of the targets. IEEE Transactions on Software Engineering, 44(2):122-158, 2017.
- K. Pearson. X. on the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 50(302):157-175, 1900.
- M. Rahman, S. Khatoonabadi, A. Abdellatif, and E. Shihab. Automatic detection of llm-generated code: A case study of claude 3 haiku. arXiv preprint arXiv:2409.01382, 2024. · arXiv
- K. Ronanki, S. Arvidsson, and J. Axell. Prompt engineering guidelines for using large language models in requirements engineering. In Euromicro Conference on Software Engineering and Advanced Applications, pages 245-262. Springer, 2025.
- P. Sahoo, A. K. Singh, S. Saha, V. Jain, S. Mondal, and A. Chadha. A systematic survey of prompt engineering in large language models: Techniques and applications. arXiv preprint arXiv:2402.07927, 2024. · arXiv
- S. S. Shapiro and M. B. Wilk. An analysis of variance test for normality (complete samples). Biometrika, 52(3-4):591-611, 1965.
- I. Sommerville. Software engineering (ed.). America: Pearson Education Inc, 2011.
- F. Tambon, A. Moradi-Dakhel, A. Nikanjam, F. Khomh, M. C. Desmarais, and G. Antoniol. Bugs in large language models generated code: An empirical study. Empirical Software Engineering, 30(3):65, 2025.
- Y. Tao, Y. Qin, and Y. Liu. Retrieval-augmented code generation: A survey with focus on repository-level approaches. arXiv preprint arXiv:2510.04905, 2025. · arXiv
- C. Tony, N. E. Díaz Ferreyra, M. Mutas, S. Dhif, and R. Scandariato. Prompting techniques for secure code generation: A systematic investigation. ACM Transactions on Software Engineering and Methodology, 34(8):1-53, 2025.
- Y. Wang, H. Le, A. D. Gotmare, N. D. Bui, J. Li, and S. C. Hoi. Codet5+: Open code large language models for code understanding and generation. arXiv preprint arXiv:2305.07922, 2023. · arXiv
- F. Wilcoxon. Individual comparisons by ranking methods. In Breakthroughs in statistics: Methodology and distribution, pages 196-202. Springer, 1992.
- T. Xiao, Y. Fan, F. Calefato, C. Treude, R. G. Kula, H. Hata, and S. Baltes. Self-admitted genai usage in open-source software. arXiv preprint arXiv:2507.10422, 2025. · arXiv
- G. Yang, Y. Zhou, W. Cheng, X. Zhang, X. Chen, T. Y. Zhuo, K. Liu, X. Zhou, D. Lo, and T. Chen. Less is more: Docstring compression in code generation. arXiv preprint arXiv:2410.22793, 2024. · arXiv
- Z. Yang, S. Chen, C. Gao, Z. Li, X. Hu, K. Liu, and X. Xia. An empirical study of retrieval-augmented code generation: Challenges and opportunities. ACM Transactions on Software Engineering and Methodology, 2025.
- S. Yeo, Y.-S. Ma, S. C. Kim, H. Jun, and T. Kim. Framework for evaluating code generation ability of large language models. Etri Journal, 46(1):106-117, 2024.
- H. Yu, B. Shen, D. Ran, J. Zhang, Q. Zhang, Y. Ma, G. Liang, Y. Li, Q. Wang, and T. Xie. Codereval: A benchmark of pragmatic code generation with generative pre-trained models. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, pages 1-12, 2024.
Cited by
Sorted by citations
A Survey of Large Language Models
Zhao, W. X., Zhou, K., Li, J., Tang, T., Dong, Z., Hou, Y., Zhang, B., Min, Y., Zhang, J., Liu, P., et al. (2026) · Frontiers of Computer Science · doi:10.1007/s11704-026-60308-3 · Cited by 2,093
ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generation
Chen, Y., Xie, C., Shi, Y., Zeng, W., Wang, Y., Zhang, H., & Gu, X. (2026) · ACM International Conference on AI-Powered Software (AIware) · doi:10.1145/3805760.3814925 · Cited by 3
A Technology for Generating and Evaluating the Quality of Source Code Using Large Language Models
Pastukh, O., Yatsyshyn, V. V., & Zadvornyi, O. (2026) · Cybernetics and Systems Analysis · doi:10.1007/s10559-026-00876-1
Revisiting LLMs on New Feature Implementation in Real-World Software Development Practices
Li, J., Huang, T.-X., Zhao, T., Wang, Y.-M., Zhang, Y.-R., Hu, A.-S., Zhang, K., Wang, L., Sheng, Z.-N., Liu, K., et al. (2026) · Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3832783.3837511
Metadata
- Authors
- Rahman, M., Khatoonabadi, S., & Shihab, E.
- Affiliations
- Concordia University (CA)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2025
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2510.26130
- OpenAlex
- W7103171761
- Cited by
- 3
- References
- 0
- Citations by year
- 2026: 3
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- Locations
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- 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
- large language models, synthetic benchmark, retrieval-augmented generation, program correctness, error analysis, open source projects, code completion
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
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation. https://app.cochat.ai/papers/10.48550/arxiv.2510.26130
- The paper
- Rahman, M., Khatoonabadi, S., & Shihab, E. (2025). Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation. arXiv. https://doi.org/10.48550/arxiv.2510.26130