Learning a classifier for prediction of maintainability based on static analysis tools

Markus Schnappinger, Mohd Hafeez Osman, Alexander Pretschner, Arnaud Fietzke

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

19 Scopus citations

Abstract

Static Code Analysis Tools are a popular aid to monitor and control the quality of software systems. Still, these tools only provide a large number of measurements that have to be interpreted by the developers in order to obtain insights about the actual quality of the software. In cooperation with professional quality analysts, we manually inspected source code from three different projects and evaluated its maintainability. We then trained machine learning algorithms to predict the human maintainability evaluation of program classes based on code metrics. The code metrics include structural metrics such as nesting depth, cloning information and abstractions like the number of code smells. We evaluated this approach on a dataset of more than 115,000 Lines of Code. Our model is able to predict up to 81% of the threefold labels correctly and achieves a precision of 80%. Thus, we believe this is a promising contribution towards automated maintainability prediction. In addition, we analyzed the attributes in our created dataset and identified the features with the highest predictive power, i.e. code clones, method length, and the number of alerts raised by the tool Teamscale. This insight provides valuable help for users needing to prioritize tool measurements.

Original languageEnglish
Title of host publicationProceedings - 2019 IEEE/ACM 27th International Conference on Program Comprehension, ICPC 2019
PublisherIEEE Computer Society
Pages243-248
Number of pages6
ISBN (Electronic)9781728115191
DOIs
StatePublished - May 2019
Event27th IEEE/ACM International Conference on Program Comprehension, ICPC 2019 - Montreal, Canada
Duration: 25 May 2019 → …

Publication series

NameIEEE International Conference on Program Comprehension
Volume2019-May

Conference

Conference27th IEEE/ACM International Conference on Program Comprehension, ICPC 2019
Country/TerritoryCanada
CityMontreal
Period25/05/19 → …

Keywords

  • Code Comprehension
  • Maintenance Tools
  • Software Maintenance
  • Software Quality
  • Static Code Analysis

Fingerprint

Dive into the research topics of 'Learning a classifier for prediction of maintainability based on static analysis tools'. Together they form a unique fingerprint.

Cite this