Saved in:
Bibliographic Details
Main Authors: Liang, Shanchao, Hu, Yiran, Jiang, Nan, Tan, Lin
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2410.21647
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911020757286912
author Liang, Shanchao
Hu, Yiran
Jiang, Nan
Tan, Lin
author_facet Liang, Shanchao
Hu, Yiran
Jiang, Nan
Tan, Lin
contents Recently, a number of repository-level code generation benchmarks-such as CoderEval, DevEval, RepoEval, RepoBench, and LongCodeArena-have emerged to evaluate the capabilities of large language models (LLMs) beyond standalone benchmarks like HumanEval and MBPP. Thus, a natural question is, would LLMs have similar performance in real world coding tasks as their performance in these benchmarks? Unfortunately, one cannot answer this question, since these benchmarks consist of short completions, synthetic examples, or focus on limited scale repositories, failing to represent real-world coding tasks. To address these challenges, we create REPOCOD, a Python code-generation benchmark containing complex tasks with realistic dependencies in real-world large projects and appropriate metrics for evaluating source code. It includes 980 whole-function generation tasks from 11 popular projects, 50.8% of which require repository-level context. REPOCOD includes 314 developer-written test cases per instance for better evaluation. We evaluate ten LLMs on REPOCOD and find that none achieves more than 30% pass@1 on REPOCOD, indicating the necessity of building stronger LLMs that can help developers in real-world software development. In addition, we found that retrieval-augmented generation achieves better results than using target function dependencies as context.
format Preprint
id arxiv_https___arxiv_org_abs_2410_21647
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'
Liang, Shanchao
Hu, Yiran
Jiang, Nan
Tan, Lin
Software Engineering
Computation and Language
Recently, a number of repository-level code generation benchmarks-such as CoderEval, DevEval, RepoEval, RepoBench, and LongCodeArena-have emerged to evaluate the capabilities of large language models (LLMs) beyond standalone benchmarks like HumanEval and MBPP. Thus, a natural question is, would LLMs have similar performance in real world coding tasks as their performance in these benchmarks? Unfortunately, one cannot answer this question, since these benchmarks consist of short completions, synthetic examples, or focus on limited scale repositories, failing to represent real-world coding tasks. To address these challenges, we create REPOCOD, a Python code-generation benchmark containing complex tasks with realistic dependencies in real-world large projects and appropriate metrics for evaluating source code. It includes 980 whole-function generation tasks from 11 popular projects, 50.8% of which require repository-level context. REPOCOD includes 314 developer-written test cases per instance for better evaluation. We evaluate ten LLMs on REPOCOD and find that none achieves more than 30% pass@1 on REPOCOD, indicating the necessity of building stronger LLMs that can help developers in real-world software development. In addition, we found that retrieval-augmented generation achieves better results than using target function dependencies as context.
title Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'
topic Software Engineering
Computation and Language
url https://arxiv.org/abs/2410.21647