TL;DR
This paper presents a comprehensive systematic literature review of how Large Language Models (LLMs) are being applied to Software Engineering (SE) tasks. It categorizes LLMs, analyzes their usage in SE, discusses data handling, optimization techniques, and identifies key SE tasks where LLMs have shown promise, offering a roadmap for future research.
What Problem Does This Paper Address?
The rapid emergence of Large Language Models (LLMs) has led to a surge of research applying them to Software Engineering (SE) tasks. However, a clear, consolidated understanding of how LLMs are being used, what their impact is, and what the limitations are within SE is still developing. This paper addresses this gap by systematically reviewing existing literature to provide a comprehensive overview of LLM applications in SE, identify trends, and highlight areas for future investigation.
Methods
The authors conducted a Systematic Literature Review (SLR) following established methodologies. They searched multiple databases and venues, using a combination of automated and manual searches, including snowballing, to identify relevant papers. A rigorous selection process, including inclusion/exclusion criteria and quality assessment, was applied to a dataset of 395 research papers published between January 2017 and January 2024. The review focused on answering four key research questions (RQs) concerning LLM types, data handling, optimization/evaluation techniques, and specific SE tasks addressed.
Datasets
The paper discusses various datasets used for training and evaluating LLMs in SE. These are categorized into four main types:
- Open-source datasets: Publicly accessible collections (e.g., HumanEval, Stack Overflow posts, GitHub issues).
- Collected datasets: Compiled directly by researchers from various online sources.
- Constructed datasets: Modified or augmented existing datasets to fit specific research objectives.
- Industrial datasets: Proprietary data obtained from commercial entities.
The review found a strong reliance on open-source datasets, with only a small number of studies utilizing industrial datasets, suggesting a potential gap in bridging academic research with real-world industrial contexts.
Key Insights and Ideas
- Dominance of Decoder-Only LLMs: The trend in LLM architectures for SE has shifted significantly towards decoder-only models, especially in recent years, due to their strong generative capabilities.
- Text and Code are King: Text-based and code-based datasets are the most frequently used for training LLMs in SE, highlighting LLMs' proficiency in handling natural language and programming code.
- Tuning is Crucial: While general-purpose LLMs can be applied directly, fine-tuning techniques, particularly Parameter Efficient Fine-Tuning (PEFT) methods like LoRA, are essential for optimizing performance on specific SE tasks.
- Prompt Engineering is Key: Various prompt engineering techniques, such as few-shot and zero-shot prompting, are widely employed to guide LLMs without modifying their core parameters, significantly impacting performance.
- Software Development is the Main Arena: The majority of LLM applications in SE are concentrated in the software development phase, particularly in code generation and completion.
Key Results
- LLM Landscape: Over 70 different LLMs have been used in SE tasks, categorized into encoder-only, encoder-decoder, and decoder-only architectures. Decoder-only LLMs are the most prevalent.
- SE Task Distribution: LLMs are most widely applied in software development (56.65%), followed by software maintenance (22.71%) and software quality assurance (15.14%). Requirements engineering and software design are less explored.
- Task Focus: Generation tasks dominate LLM applications in SE (70.97%), followed by classification (21.61%).
- Data Handling: Open-source datasets are the most common source (62.83%), with text-based and code-based data types being most frequently utilized.
- Optimization: Parameter Efficient Fine-Tuning (PEFT) techniques are gaining prominence, and eight distinct prompt engineering techniques are identified.
- Evaluation: A variety of metrics are used, with BLEU and its variants being common for generation tasks, and Precision, Recall, and F1-score for classification.
Limitations and Future Work
The authors acknowledge several limitations:
- Paper Search Omission: Despite comprehensive search strategies, there's a possibility of missing relevant papers.
- Study Selection Bias: Potential biases in manual verification and quality assessment were mitigated by involving multiple reviewers and providing replication packages.
- Empirical Knowledge Bias: Subjective judgments in manual analysis are acknowledged, with efforts made to predefine categories and use literature to minimize bias.
Future work directions suggested include:
- Developing Domain-Specific LLMs: Creating specialized LLMs and datasets for niche SE domains, especially those with limited open-source data.
- Establishing a Comprehensive Evaluation Framework: A universal framework is needed for consistent LLM assessment in SE.
- Enhancing LLM Capabilities: Integrating new input forms (spoken language, diagrams, multimodal inputs) and expanding LLM applications to under-explored SE phases like requirements engineering and software design.
- Improving LLM Performance: Tackling domain-specific challenges, enhancing generalizability, and developing more robust evaluation metrics.
- Collaborative LLMs: Exploring approaches that integrate multiple LLMs or combine LLMs with other machine learning models for improved SE task performance.
- SE for LLMs (SE4LLM): Developing specialized SE practices for the development, optimization, and maintenance of LLMs themselves.
Summary updated