JOURNAL ARTICLE

Source Code Metrics for Software Defects Prediction

Abstract

In current research, there are contrasting results about the applicability of software source code metrics as features for defect prediction models. The goal of the paper is to evaluate the adoption of software metrics in models for software defect prediction, identifying the impact of individual source code metrics. With an empirical study on 275 release versions of 39 Java projects mined from GitHub, we compute 12 software metrics and collect software defect information. We train and compare three defect classification models. The results across all projects indicate that Decision Tree (DT) and Random Forest (RF) classifiers show the best results. Among the highest-performing individual metrics are NOC, NPA, DIT, and LCOM5. While other metrics, such as CBO, do not bring significant improvements to the models.

Keywords:
Computer science Software metric Software bug Java Source code Software quality Software Decision tree Predictive modelling Code (set theory) Random forest Data mining Software engineering Software development Machine learning Programming language Set (abstract data type)

Metrics

6
Cited By
3.71
FWCI (Field Weighted Citation Impact)
16
Refs
0.92
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Software Engineering Research
Physical Sciences →  Computer Science →  Information Systems
Software Reliability and Analysis Research
Physical Sciences →  Computer Science →  Software
Software System Performance and Reliability
Physical Sciences →  Computer Science →  Computer Networks and Communications

Related Documents

BOOK-CHAPTER

Software Defect Prediction Based on Source Code Metrics Time Series

Łukasz Puławski

Lecture notes in computer science Year: 2011 Pages: 104-120
JOURNAL ARTICLE

Web service QoS prediction using improved software source code metrics

Sarathkumar RangarajanHuai LiuHua Wang

Journal:   PLoS ONE Year: 2020 Vol: 15 (1)Pages: e0226867-e0226867
DISSERTATION

Augmenting source code with software metrics

Harward, Matthew

University:   University of Canterbury Research Repository (University of Canterbury) Year: 2009
© 2026 ScienceGate Book Chapters — All rights reserved.