Loading...
Please wait, while we are loading the content...
Similar Documents
Comparing Commit Messages and Source Code Metrics for the Prediction Refactoring Activities
| Content Provider | MDPI |
|---|---|
| Author | Sagar, Priyadarshni Suresh AlOmar, Eman Abdulah Mkaouer, Mohamed Wiem Ouni, Ali Newman, Christian D. |
| Copyright Year | 2021 |
| Description | Understanding how developers refactor their code is critical to support the design improvement process of software. This paper investigates to what extent code metrics are good indicators for predicting refactoring activity in the source code. In order to perform this, we formulated the prediction of refactoring operation types as a multi-class classification problem. Our solution relies on measuring metrics extracted from committed code changes in order to extract the corresponding features (i.e., metric variations) that better represent each class (i.e., refactoring type) in order to automatically predict, for a given commit, the method-level type of refactoring being applied, namely Move Method, Rename Method, Extract Method, Inline Method, Pull-up Method, and Push-down Method. We compared various classifiers, in terms of their prediction performance, using a dataset of 5004 commits and extracted 800 Java projects. Our main findings show that the random forest model trained with code metrics resulted in the best average accuracy of 75%. However, we detected a variation in the results per class, which means that some refactoring types are harder to detect than others. |
| Starting Page | 289 |
| e-ISSN | 19994893 |
| DOI | 10.3390/a14100289 |
| Journal | Algorithms |
| Issue Number | 10 |
| Volume Number | 14 |
| Language | English |
| Publisher | MDPI |
| Publisher Date | 2021-09-30 |
| Access Restriction | Open |
| Subject Keyword | Algorithms Software Engineering Refactoring Software Quality Commits Software Metrics |
| Content Type | Text |
| Resource Type | Article |