Fault localization for build code errors in makefiles

Building is an important process in software development. In large software projects, build code has a high level of complexity, churn rate, and defect proneness. While several automated approaches exist to help developers in localizing faults in traditional source code and in detecting code smells in build code, fault localization techniques have not yet been developed for build code. In this work, we introduce MkFault, a tool to localize errors resulting in build crashes. MkFault monitors the execution traces from GNU Make statements that produce concrete build rules and the original code locations for each component of a rule (i.e., target, prerequisites, and recipe). It then uses a novel ranking algorithm to give suspiciousness scores to the original statements in the Makefile. In our empirical evaluation with real faults, we show that MkFault can help localize faults in Make code with high accuracy.

[1]  Hung Viet Nguyen,et al.  Build code analysis with symbolic evaluation , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[2]  Shane McIntosh,et al.  An empirical study of build maintenance effort , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[3]  Wolfgang De Meuter,et al.  Design recovery and maintenance of build systems , 2007, 2007 IEEE International Conference on Software Maintenance.