Too trivial to test? An inverse view on defect prediction to identify methods with low fault risk
ISSN der Zeitschrift
Gesellschaft für Informatik e.V.
To cope with the scarce resources for testing, teams can apply defect prediction to identify fault-prone code regions. However, defect prediction tends to low precision in cross-project prediction scenarios. We take an inverse view on defect prediction and aim to identify methods that can be deferred when testing because they contain hardly any faults due to their code being \"trivial\". We compute code metrics and apply association rule mining to create rules for identifying methods with low fault risk (LFR) and assess our approach with six Java open-source projects containing precise fault data at the method level. Our results show that inverse defect prediction can identify approx. 32-44% of the methods of a project to have a LFR; on average, they are about six times less likely to contain a fault than other methods. Our approach identifies methods that can be treated with less priority in testing activities and is well applicable in cross-project prediction scenarios.