EALink: An Efficient and Accurate Pre-Trained Framework for Issue-Commit Link Recovery

Chenyuan Zhang, Yanlin Wang, Zhao Wei, Yong Xu, Juhong Wang, Hui Li, Rongrong Ji

Abstract

Software traceability—the ability to link requirements, issues, and code changes—is fundamental to effective software maintenance and evolution. However, manual link recovery is error-prone and often neglected by developers. While deep learning models like BERT have shown promise in automating this process, they suffer from high computational overhead and sensitivity to code noise. This paper introduces EALink, a framework that combines knowledge distillation with contrastive learning to provide a lightweight yet highly accurate solution for issue-commit link recovery. EALink outperforms existing state-of-the-art models by significant margins while reducing inference time from hours to minutes.

Introduction

In modern software development, maintaining links between issue reports (e.g., bug reports or feature requests) and the specific commits that address them is critical for impact analysis, vulnerability tracking, and project management. Despite their importance, these links are frequently missing because developers often forget to include issue IDs in their commit messages.

Automated Link Recovery (ALR) aims to bridge this gap. Recent approaches have shifted from traditional information retrieval (IR) techniques to large-scale pre-trained models (PTMs) like CodeBERT. However, these heavy-duty models face significant practical hurdles: they are computationally expensive, struggle with the inherent noise in code changes, and often fail to capture the complex relationships between multiple commits solving a single issue.

Existing deep learning approaches for link recovery face four primary challenges:

  1. High Computational Overhead: Large models with 12 or more layers are too slow for real-time use in large-scale industrial repositories.
  2. Neglected Inter-commit Correlations: Most models evaluate issue-commit pairs in isolation, ignoring the fact that a single issue is frequently resolved through a sequence of related commits.
  3. Code Noise: Commits often include changes to non-essential files (e.g., documentation, test scripts) that do not reflect the core logic of the issue, leading to false signals.
  4. Suboptimal Training Data: Current methods often generate negative training samples (false links) based on simple time intervals, which can introduce noise into the training process.

To address these limitations, EALink introduces several architectural innovations designed to balance efficiency and precision.

Knowledge Distillation

To solve the overhead problem, EALink employs knowledge distillation. It uses a massive 12-layer CodeBERT model as a "teacher" to train a compact 2-layer "student" model. This process allows the smaller model to retain the semantic understanding of the larger model while drastically reducing the parameter count and inference latency.

Contrastive Learning and Correlation Modeling

EALink moves beyond one-to-one matching by utilizing contrastive learning. The model is trained to recognize that all commits associated with a specific issue should cluster together in a vector space, while commits from unrelated issues should be pushed further away. This captures the "one-to-many" relationship inherent in software development.

Denoising via Auxiliary Tasks

To mitigate the impact of noisy files within a commit, EALink incorporates an auxiliary issue-code task. The model learns to predict whether a specific file within a commit is relevant to the issue description. This fine-grained supervision helps the model focus on the most significant code changes rather than auxiliary file updates.

Similarity-based Negative Sampling

Instead of selecting random commits as negative samples, EALink identifies issues that are semantically dissimilar to the target issue and uses their associated commits as "hard" negatives. This provides a cleaner and more challenging training signal, improving the model's discriminative power.

Experimental Evaluation

The researchers evaluated EALink using a newly constructed large-scale dataset derived from six prominent Apache projects: Ambari, Calcite, Groovy, Ignite, Isis, and Netbeans. This dataset comprises over 56,000 issues and 172,000 commits, offering a more diverse and rigorous benchmark than previous studies.

Results and Performance

EALink demonstrated substantial improvements over the previous state-of-the-art model, T-BERT:

  • Accuracy: EALink achieved improvements ranging from 15.23% to 408.65% across key metrics, including Precision@1 and Mean Reciprocal Rank (MRR).
  • Inference Speed: In a real-world test on the "Isis" project, EALink processed 1,000 recovery queries in just 126 seconds. In contrast, T-BERT required 44,353 seconds (over 12 hours) to complete the same task.
  • Training Efficiency: EALink required only 14 hours of training, compared to 138 hours for T-BERT on identical hardware.

Conclusion

EALink represents a significant advancement in software traceability. By proving that a distilled, 2-layer model can outperform a full-sized BERT model, the authors demonstrate that specialized software engineering tasks do not always require massive, over-parameterized models. Future work will focus on extending EALink to support multiple programming languages beyond Java and exploring its application in linking other software artifacts, such as requirements and test cases.

Summary updated

BibTeX
@inproceedings{zhang2023ealink,
  author = {Chenyuan Zhang and Yanlin Wang and Zhao Wei and Yong Xu and Juhong Wang and Hui Li and Rongrong Ji},
  title = {{EALink: An Efficient and Accurate Pre-Trained Framework for Issue-Commit Link Recovery}},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00059},
}
Figure