TL;DR
This paper provides a comprehensive survey of how deep learning (DL) is being applied to software engineering (SE) tasks. It analyzes trends, categorizes DL techniques, and identifies key challenges and opportunities, offering a valuable roadmap for researchers and practitioners looking to leverage DL in SE.
What Problem Does This Paper Address?
Software engineering (SE) is a vast field with numerous complex tasks, from requirements analysis to software maintenance. While deep learning (DL) has shown remarkable success in areas like image recognition and natural language processing, its application in SE has been growing rapidly but lacks a unified overview. This paper addresses the need for a systematic survey to understand the current landscape of DL in SE, identify common practices, highlight challenges, and point towards future research directions. Without such a survey, it's difficult for researchers and practitioners to grasp the full potential and current state of DL in SE, leading to fragmented efforts and missed opportunities.
Methods
The authors conducted a systematic literature review (SLR) of 142 relevant papers published between 2006 and July 2020. They defined specific research questions (RQs) to guide their analysis, covering publication trends, DL techniques used, factors affecting training, and the SE tasks and phases DL has facilitated. Their methodology involved a rigorous search string, selection of reputable publication venues, and strict inclusion/exclusion criteria to ensure the quality and relevance of the selected studies. Data extraction and analysis were performed by multiple researchers to ensure accuracy.
Datasets
The paper discusses various datasets used in DL for SE. A significant portion (45%) of studies utilized open-source datasets, often from platforms like GitHub (51% of collected datasets). Other sources included industry datasets (4%), constructed datasets (18%), and system/project-specific data. The data types varied widely, with code-based data (source code, metrics, comments, defects, test cases) being the most prevalent (82.3% when combined with text-based data). Text-based data (bug reports, requirements documentation) was also common. The paper notes that the availability of large, labeled datasets remains a challenge, and many studies rely on repeated use of existing datasets.
Key Insights and Ideas
- Booming Trend: The application of DL in SE has seen a significant surge, particularly since 2015, with a notable increase in publications.
- Conference Dominance: Conference proceedings are the primary venue for DL in SE research, with SANER being the most popular.
- Popular Architectures: Layered architectures, especially RNNs (LSTM being the most popular) and CNNs, are the most frequently used DL architectures in SE.
- Data is King (and Scarce): While DL excels with large datasets, the availability of high-quality, labeled SE data is a major bottleneck. Many studies rely on open-source data, but this can lead to a lack of validation on real-world industry data.
- Transparency is Lacking: A significant challenge is the "black-box" nature of DL models. Many studies don't adequately explain their architectural choices or the reasoning behind them, hindering reproducibility and trust.
- Overfitting is a Concern: Techniques like cross-validation, regularization, and dropout are widely employed to combat overfitting, a common issue in DL.
- SE Activities Covered: Software testing and debugging, and software maintenance are the most heavily researched SE activities using DL. Software requirements and design are comparatively under-explored.
- Task Types: Classification and generation tasks dominate DL applications in SE, accounting for nearly 80% of studies.
Key Results
- Publication Growth: The number of DL-related SE publications has grown substantially, with a significant increase from 2015 to 2019.
- DL Techniques: Over 30 different DNNs were identified, with RNNs, CNNs, and FNNs being the most popular families.
- Model Selection: Characteristic-based selection (69%) is the most common strategy for choosing DL models, followed by referring to prior studies (25%).
- Dataset Sources: GitHub is the most frequent source for collected datasets (51%).
- Evaluation Metrics: Precision, recall, F1-measure, and accuracy are the most commonly used metrics for evaluating DL models in SE.
- Reproducibility: Only 37.3% of studies provided replication packages, highlighting a challenge for reproducibility.
Limitations and Future Work
The authors acknowledge potential limitations in data collection bias and the possibility of missing relevant studies due to the vastness of SE research. They suggest several future research directions:
- Expanding DL to Under-Researched Areas: Applying DL to software requirements and design, which are currently less explored.
- Improving Transparency: Developing new methods and studies to explain the decision-making processes of DNNs, making them more understandable and trustworthy for software engineers.
- Addressing Data Hunger: Exploring techniques for learning with less data, such as meta-learning, and encouraging the creation of widely accepted, labeled SE datasets.
- Performance Comparison: Conducting empirical studies to compare the performance of DL algorithms against traditional techniques for various SE tasks.
- Industry Validation: Encouraging more collaboration for validating DL models on real-world industry data, not just open-source datasets.
Summary updated