Abstract:Bug location is the key step in the software defect repair. With the rapid development of complex computer software and network, how to fast and efficiently locate bugs related code has become a pressing problem. This paper studies the existing bug localization method based on information retrieval technologies and a two-phase bug localization method based on defect repair history was proposed. The method pays more attention to the defect repair's local phenomenon. This method does not only rely on text similarity, but also more concern about the defect fix behavior, change of information, code characteristics and other factors. Based on information retrieval and defect prediction this method is proposed to improve the accuracy of defect location. At the end of the paper, two open source projects are conducted to validate the feasibility and effectiveness of the method.