Classifying code quality in Java-based open source software projects using machine learning techniques and contribution analysis

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

National Engineering Research & Development Center of Sri Lanka : Ekala

Abstract

Geographically dispersed volunteer teams can achieve collaborative and transparent processes with Open Source Software Development (OSSD). While it outperforms traditional methodologies, challenges remain in preserving code quality, managing third-party dependencies, leading to compatibility issues, and inconsistencies in developer contributions that can lead to code redundancies. Java as the foundation of software development, has fostered numerous open-source projects, enhancing research dependability. This research proposes a machine learning model that classifies code quality in Java-based open-source software projects by analyzing contribution metrics. Popular machine learning techniques used for software quality prediction, such as Regression, Decision Trees, Random Forest, Support Vector Machine and Bayesian Learning, XGBoost and Multi-Layer Perceptron are used, as well as established software quality metrics to measure the developer’s contribution using source code such as Lines of Code (LOC), Coupling Between Objects (CBO), Response for a Class (RFC), etc. The proposed model was evaluated using a dataset, containing over 200,000 observations and software metrics extracted from open source projects. Performance was measured using Precision, Accuracy, Recall and F1-Score. XGBoost shows the highest model accuracy, with 82%. The system was built using XGBoost, which allows developers and others to upload Java files. Based on the derived quality metrics, the system classifies the code quality into three categories: high, medium, and low. This analysis enhances Java OSSD projects by accurately evaluating code contributions, ensuring reliability and sustainability. Refining code review, prioritizing refactoring, and leveraging the best ML approach to classify code quality can strengthen development processes and advance OSSD efficiency.

Description

Citation

p.28-39

Endorsement

Review

Supplemented By

Referenced By