CC2Vec: Distributed Representations of Code Changes
arXiv:2003.05620 · doi:10.1145/3377811.3380361
Abstract
Existing work on software patches often use features specific to a single task. These works often rely on manually identified features, and human effort is required to identify these features for each task. In this work, we propose CC2Vec, a neural network model that learns a representation of code changes guided by their accompanying log messages, which represent the semantic intent of the code changes. CC2Vec models the hierarchical structure of a code change with the help of the attention mechanism and uses multiple comparison functions to identify the differences between the removed and added code. To evaluate if CC2Vec can produce a distributed representation of code changes that is general and useful for multiple tasks on software patches, we use the vectors produced by CC2Vec for three tasks: log message generation, bug fixing patch identification, and just-in-time defect prediction. In all tasks, the models using CC2Vec outperform the state-of-the-art techniques.
References in corpus (4)
Cited by in corpus (13)
- CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Commit2Vec: Learning Distributed Representations of Code Changes
- Invalidator: Automated Patch Correctness Assessment via Semantic and Syntactic Reasoning
- Test case prioritization using test case diversification and fault-proneness estimations
- Predictive Mutation Analysis via Natural Language Channel in Source Code
- Defectors: A Large, Diverse Python Dataset for Defect Prediction
- Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctness
- Feature Sets in Just-in-Time Defect Prediction: An Empirical Evaluation
- On the Usage of Continual Learning for Out-of-Distribution Generalization in Pre-trained Language Models of Code
- Utilizing Source Code Syntax Patterns to Detect Bug Inducing Commits using Machine Learning Models
- Automated Description Generation for Software Patches
- Encoding Version History Context for Better Code Representation
- Code Revert Prediction with Graph Neural Networks: A Case Study at J.P. Morgan Chase