Code-Survey: An LLM-Driven Methodology for Analyzing Large-Scale Codebases
<|reference_start|>Code-Survey: An LLM-Driven Methodology for Analyzing Large-Scale Codebases: Modern software systems like the Linux kernel are among the world's largest and most intricate codebases, continually evolving with new features and increasing complexity. Understanding these systems poses significant challenges due to their scale and the unstructured nature of development artifacts such as commits and mailing list discussions. We introduce Code-Survey, the first LLM-driven methodology designed to systematically explore and analyze large-scale codebases. The central principle behind Code-Survey is to treat LLMs as human participants, acknowledging that software development is also a social activity and thereby enabling the application of established social science techniques. By carefully designing surveys, Code-Survey transforms unstructured data, such as commits, emails, into organized, structured, and analyzable datasets. This enables quantitative analysis of complex software evolution and uncovers valuable insights related to design, implementation, maintenance, reliability, and security.   To demonstrate the effectiveness of Code-Survey, we apply it to the Linux kernel's eBPF subsystem. We construct the Linux-bpf dataset, comprising over 670 features and 16,000 commits from the Linux community. Our quantitative analysis uncovers important insights into the evolution of eBPF, such as development patterns, feature interdependencies, and areas requiring attention for reliability and security. The insights have been initially validated by eBPF experts. Furthermore, Code-Survey can be directly applied to other subsystems within Linux and to other large-scale software projects. By providing a versatile tool for systematic analysis, Code-Survey facilitates a deeper understanding of complex software systems, enabling improvements across a variety of domains and supporting a wide range of empirical studies. The code and dataset is open-sourced.<|reference_end|>
@article{zheng2024code-survey:,
    title={Code-Survey: An LLM-Driven Methodology for Analyzing Large-Scale
  Codebases},
    author={Yusheng Zheng, Yiwei Yang, Haoqin Tu, Yuxi Huang},
    journal={arXiv preprint arXiv:2410.01837},
    year={2024},
    archivePrefix={arXiv},
    eprint={2410.01837},
    primaryClass={cs.SE}
}