| Software debugging run through the entire software development cycle, which consumes more than50%of the development and maintenance effort. Fault localization is one of the most difficult and time-consuming task. Aimed at locating faults in software, fault-localization approach analyzes and locates faults by running suitable test cases. Obviously, the quality of the test cases and the method of fault analysis determine the effectiveness of fault localization. Therefore, the test cases reduction approach for fault localization, the fault-localization approach with high fault localization effectiveness, a suitable fault comprehension to help programmer understand the reason why a faulty statement cause failures, and the analysis of faults propagated by data dependence have great significance in theory and application for automated software debugging and maintenance. Moreover, the effectiveness and efficiency of software debugging can be increased, the reliability and quality of software can be improved, and the cost of software maintenance can de decreased.This dissertation investigates the following key technologies: test cases reduction, fault-localization method, fault comprehension, and fault-propagation analysis approach.A test cases reduction approach oriented to fault-localization requirements is proposed to provide suitable test cases for fault localization. Firstly, it reduces the test cases based on statement coverage information and fault localizaition requirement vector. The effect of failed test cases for fault localization is fully considered, and the test cases that have little or no relevant to fault-localization requirements are removed based on statement coverage information. Next, it reduces the test cases based on execution path. The concrete execution path of the program is analyzed, and loop standardization is proposed to increase the distributionevenness of execution coverage rate. Experimental results show that the proposed method can reduce the number of test cases and improve the effectiveness of fault localization.A fault localization approach based on state dependency probabilistic model is proposed to locate the faults relevant to control dependence of program. This approach proposes state dependency to better represent the execution dependence information between program elements based on the analysis the concreate execution state of each statement. Furthermore, a state dependency probabilistic model is proposed to analyze the state dependency information between program elements. This approach locates the faults relevant to control dependence by differentiating the state dependencies between passed and failed test cases. Experimental results show that the proposed method has greater fault-localization effectiveness, and satisfactory results are also achieved when locating the faults relevant to control dependence of program even when a few test cases are available.A fault localization approach based on joint dependency probabilistic model is proposed to locate the faults relevant to data dependence of program. Firstly, a concept called joint dependency network is proposed to better analyze the statistical dependence probabilistic information between program elements, which fully considers the structure of program. Based on the analysis of control dependences and data dependences, a joint dependency probabilistic model is proposed according to joint dependency network, and the joint dependencies between program elements at runtime are analyzed. Finally, it locates the faults relevant to data dependence by differentiating the joint dependencies between passed and failed test cases. Experimental results show that the proposed fault-localization approach has greater fault-localization effectiveness. Moreover, our approach is highly effective in fault localization even when a few test cases are available.A fault-comprehension and fault-propagation analysis approach based on the analysis of context is proposed to help programmer understand why a faulty statement cause failure and analyze the faults propagated by data dependence. Firstly, this method analyzes the execution context and the joint dependence of the suspicious statements based on fault localization, and the context information (the state of the suspicious statements when it exhibits unexpected behavior and the most suspicious data dependency) is generated to help programmers comprehend the behaviors of the fault. Next, a fault-propagation analysis approach is proposed based on the analysis of joint dependence to analyze the faults propagated by data dependence. Experimental results show that the fault-comprehension approach provides useful information to comprehend the faults, and introduce the fault-propagation analysis approach in fault localization can improve the effectiveness of fault localization when locating the faults propagated by data dependence.In conclusion, an automated fault localization approach combining test cases reduction with probabilistic graph modeling is proposed in this dissertation. It provides a new idea and method for solving the following problems: provide suitable test cases oriented to fault localization requirements, locate faults accurately, help programmer understand why a faulty statement cause failure, and analyze the faults propagated by data dependence. |