| | --- |
| | license: apache-2.0 |
| | task_categories: |
| | - text-generation |
| | configs: |
| | - config_name: default |
| | data_files: |
| | - split: test |
| | path: data/test-* |
| | dataset_info: |
| | features: |
| | - name: repo |
| | dtype: string |
| | - name: instance_id |
| | dtype: string |
| | - name: base_commit |
| | dtype: string |
| | - name: patch |
| | dtype: string |
| | - name: test_patch |
| | dtype: string |
| | - name: problem_statement |
| | dtype: string |
| | - name: hints_text |
| | dtype: string |
| | - name: created_at |
| | dtype: int64 |
| | - name: labels |
| | sequence: string |
| | - name: category |
| | dtype: string |
| | - name: edit_functions |
| | sequence: string |
| | - name: added_functions |
| | sequence: string |
| | - name: edit_functions_length |
| | dtype: int64 |
| | splits: |
| | - name: test |
| | num_bytes: 11007786 |
| | num_examples: 660 |
| | download_size: 3913633 |
| | dataset_size: 11007786 |
| | --- |
| | |
| | # LOC-BENCH: A Benchmark for Code Localization |
| |
|
| | <!-- Provide a quick summary of the dataset. --> |
| | LOC-BENCH is a dataset specifically designed for evaluating code localization methods in software repositories. |
| | LOC-BENCH provides a diverse set of issues, including bug reports, feature requests, security vulnerabilities, and performance optimizations. |
| |
|
| | Please refer to the official version [**`Loc-Bench_V1`**](https://huggingface.co/datasets/czlll/Loc-Bench_V1) for evaluating code localization methods and for easy comparison with our approach. |
| |
|
| | Code: https://github.com/gersteinlab/LocAgent |
| |
|
| | ## 📊 Details |
| | Compared to the [V0](https://huggingface.co/datasets/czlll/Loc-Bench_V0.1), it filters out examples that do not involve function-level code modifications and then supplements the dataset to restore it to the original size of 660 examples. |
| |
|
| | The table below shows the distribution of categories in the dataset. |
| |
|
| | | category | count | |
| | |:---------|:---------| |
| | | Bug Report | 275 | |
| | | Feature Request | 216 | |
| | | Performance Issue | 140 | |
| | | Security Vulnerability | 29 | |
| |
|
| |
|
| | ## 🔧 How to Use |
| | You can easily load LOC-BENCH using Hugging Face's datasets library: |
| | ``` |
| | from datasets import load_dataset |
| | |
| | dataset = load_dataset("czlll/Loc-Bench_V0.2", split="test") |
| | |
| | ``` |
| | ## 📄 Citation |
| | If you use LOC-BENCH in your research, please cite our paper: |
| | ``` |
| | @article{chen2025locagent, |
| | title={LocAgent: Graph-Guided LLM Agents for Code Localization}, |
| | author={Chen, Zhaoling and Tang,Xiangru and Deng,Gangda and Wu,Fang and Wu,Jialong and Jiang,Zhiwei and Prasanna,Viktor and Cohan,Arman and Wang,Xingyao}, |
| | journal={arXiv preprint arXiv:2503.09089}, |
| | year={2025} |
| | } |
| | ``` |