Just-In-Time Software Defect Prediction Approach Based on Fine-grained Code Representation and Feature Fusion
Just-in-time software defect prediction(JIT-SDP)aims to predict the defect tendency of software changes at the time when they are first committed.Such predictions are made on a single program change rather than on a coarse granularity.It has been widely used in fields such as continuous testing due to its immediacy and traceability.Existing JIT-SDP studies extract fea-tures from code changes at a coarse granularity,merely marking the changed lines without fine-grained tagging.Moreover,studies based on commit content are limited to simple concatenation of features extracted from commit messages and code changes,lac-king deep alignment in feature space.This makes the prediction results tend to be disturbed by noise when the quality of commit-ted message cannot be guaranteed.Existing methods also fail to fully utilize artificial features designed by domain experts and se-mantic syntax structure information in commit content at the same time,thus not fully leveraging existing features.To address these problems,a JIT-SDP approach based on fine-grained code changes and feature fusion is proposed.The method introduces new change embeddings to represent code changes at a fine granularity.By designing a feature alignment module,the impact of noise in low-quality commit message on performance is reduced.Meanwhile,neural networks are used to learn domain-specific knowledge from artificial features and fully utilize existing features.Experimental results show that compared to existing me-thods,this approach improves significantly on three performance metrics.