Introduction Bugs in software is a problem that grows over time if they are not dealt with in an early stage, therefore it is desirable to find bugs as early as possible. Bugs usually correlate with low software quality, which can be measured with different code metrics. The goal of this thesis is to find out if machine learning can be used to predict bugs, using code metric trends. Method To achieve the thesis goal a program was developed, which will be called Bloodhound, that analyses code metric trends to predict bugs using the machine learning algorithm k nearest neighbour. The code metrics required to do so is extracted using the program cdbs, which in turn uses the program SonarQube to create the source code metrics. Results Bloodhound were trained with a time-frame of 42 days between the dates June 1, 2016 to July 13, 2016 containing 202 commits and 312 changed files from the JabRef repository. The files were changed on average 1.5 times. Bloodhound never found more than 25% of the bugs and of its bug predictions, was right at most 42% of the time. Conclusion Bloodhound did not succeed in predicting bugs. But that was most likely because the time frame was too short to generate any significant trends.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kau-84333 |
Date | January 2021 |
Creators | Rehnholm, Gustav, Rysjö, Felix |
Publisher | Karlstads universitet, Institutionen för matematik och datavetenskap (from 2013), Karlstads universitet, Institutionen för matematik och datavetenskap (from 2013) |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.0017 seconds