Research on Software Debugging Techniques Based on the Combination of Machine Learning and Program Analysis
- Author
- ZhangCheng
- Advisor
- ZhaoJianJun
- School
- Shanghai Jiaotong University
- Major
- Computer Software and Theory
- Classification
- TP311.53 Software Maintenance
- Degree
- Doctoral dissertation
- Year
- 2013
- Downloads
- 127
- Citations
- 0
- Program Debugging
- Fault Localization
- bug fixing
- programanalysis
- Control Flow Analysis
- Data Flow Analysis
- Program slicing
- MachineLearning
- data mining
- Nearest Neighbor Query
- Log analysis
- recommendationsystem
- code completion
- API parameter
Abstract
A crucial problem in software engineering is how to improve thecorrectness of programs. Due to the intrinsic complexity of software systemsand their bugs, currently there does not exist a universal approach that canensure the absolute correctness of programs. When bugs cause runtimefailures, they usually need to be localized and fixed via program debugging.Real-world program debugging requires considerable human effort and isconducted in an interactive and iterative style. Over50%of the softwaredevelopment and maintenance cost is taken by program debugging. Therefore,improvement of the effectiveness of program debugging techniques is helpfulto boost the program correctness and reduce the cost of software developmentand maintenance.Regarding the importance of program debugging and the relatively loweffectiveness of existing debugging techniques, this thesis has proposed aseries of novel techniques based on the combination of program analysis andmachine learning, in order to improve the effectiveness and usability ofdebugging techniques. The proposed techniques aim to support the wholeprocess of realistic interactive and iterative debugging scenarios. Taking intoaccount the characteristics of different debugging phases, this thesis focuseson the research of static bug detection, static and dynamic program slicing,interactive debugging based on logs and breakpoints and automatic coderecommendation.Aiming at the problem of high false positive rate in static bug detection,the thesis proposes the approach of refining and extending the control flow graph, making it more suitable for screening and prioritizing static warningsso that debugging developers can get more accurate bug warnings at thebeginning of their debugging activities. In the refinement of control flowgraph, the thesis is the first to invent an infeasible path detection techniquevia mining branch correlations using machine learning. The technique gathersdynamic branch data via program instrumentation, mines potential branchcorrelations using association rule learning, and checks the feasibility of eachprogram path by evaluating its consistency with the potential correlations.The technique does not need to analyze complex path conditions and thus issuitable for large-scale programs which contain complex branch predicatesand able to detect infeasible paths that can be hard to detect for existingapproaches. In the extension of control flow graph, the thesis focuses onprobabilistic control flow graphs. Aiming at the inability of existingapproaches to handle virtual function calls in object-oriented programs, thethesis is the first to propose the technique, named Festival, to estimatedynamic call frequencies of virtual functions based on static program features.Using a set of training programs, Festival extracts feature values thatrepresenting design intensions, obtains call frequencies of virtual functions,and builds an artificial neural network model based on the two kinds of data,in order to describe the relations between static features and dynamicfrequencies. For a test program whose virtual function frequencies are to beestimated, Festival only needs to extract its static features and feed them tothe model as input. Then the output of the model is used to represent thefrequency estimation. Besides remedying the short-coming of existingapproaches on handling object-oriented programs, Festival does not requireexecuting test programs and thus is independent of the quality of input data,making it free of the common limitation of dynamic techniques.To aid interactive debugging, this thesis proposes automatic techniquesfor analyzing, refining, and generating logs and breakpoints, in order toalleviate the problem of these commonly used debugging tools in costing toomuch human effort. In log analysis, this thesis has identified two major problems in the use of logs, namely1) too much redundant logs and2)missing critical logs, and is the first to propose the log slicing technique basedon the combination of dynamic information extracted from logs andtraditional static program slicing. In addition, the thesis proposes logrefinement based on log slicing. Log slicing is able to prune redundant logs aswell as compacting program slices. Log refinement automatically choosesprogram locations to insert new logging statements which can remedy thecritical information missed in the existing logs. Moreover, aiming at theproblem of high computational complexity of program slicing which makes ithardly usable in interactive debugging, this thesis proposes to split the processof program slicing into two phases: offline phase and online phase. In theoffline phase various static analyses are performed and their results are stored,while in the online phase program slices are computed in real time based onthe results of offline analyses. As a result, the wait time of debuggingdevelopers can be shortened significantly, enabling the application of logslicing in interactive debugging. Meanwhile, the technique uses incrementaland demand-driven data flow analysis algorithms to ensure the consistencybetween offline analysis results and the latest programs. Besides log analysis,this thesis proposes an automatic breakpoint generation technique based onthe synergy of nearest neighbor queries, dynamic program slicing andmemory graph analysis techniques, which can save the manual effort to setbreakpoints. In the proposed technique, the nearest neighbor query methodand dynamic program slicing are combined to select breakpoint locationsautomatically. In addition, the idea of generating breakpoint conditions usingmemory graph analysis at particular locations and opportunities is firstlyinvented by this thesis. The automatically generated breakpoints can shedlight on statements and program states relevant to bugs, providing debuggingdevelopers with comprehensive auxiliary information in their familiarrepresentation.In bug fixing, this thesis proposes to solve the problems of loweffectiveness of bug fixing caused by programmers’ unfamiliarity with program code, using real-time code recommendation. The thesis is the first topoint out the importance of recommending API parameters and propose asolution, named Precise, based on the combination of program analysis anddata mining. Based on data analysis on large-scale real-world programs, thethesis has proposed a group of empirical rules which effectively restricts thesearch space of candidate parameters, making Precise infeasible and practical.By analyzing, abstracting, and then transforming the code of trainingprograms, Precise builds a parameter usage instance database. For eachrequest of parameter recommendation, Precise uses the context of request toperform nearest neighbor queries to retrieve, from the database, the abstractparameter usage patterns in similar contexts, concretizes them, and providesadaptive parameter recommendations in real time. Because API parameterselection is an essential part of using APIs and the existing coderecommendation techniques only focus on recommending API methods,Precise has filled a gap in the field of code recommendation. Moreover, theempirical results obtained in the research on Precise provide valuablereference information for subsequent related works.
Table of contents
Summary 6-9
ABSTRACT 9-19
first chapter 19-35
1.1 Background and Significance 19 - 21
1.2 Status and analysis 21-28
1.2.1 manual debugging 21-23
1.2.2 debugging program analysis method based 23-25 ??
1.2.3 debugging method based on machine learning techniques 25-27
1.2.4 existing Problems issues 27-28
1.3 research , content and methods 28-30
1.4 thesis work and research 30-34
1.4.1 The main work 30-33
1.4. two main innovations and research results 33-34
1.5 paper structure 34-35
Chapter II program analysis and machine learning background knowledge 35-57
2.1 program analysis background knowledge of 35-45
2.1.1 analysis of the basic concepts of the program 35-40
2.1.2 static program analysis 40-44
2.1.3 dynamic program analysis and dynamic slicing 44-45
2.2 machine learning background knowledge 45-56
2.2.1 machine Learning the basic concept 45-48
2.2.2 Introduction to machine learning techniques commonly 48-54
2.2.3 assessment 54-56
2.3 Summary 56-57
Chapter III control flow graph refinement and expansion 57-94
3.1 unreachable path detection 57-70 <br / > 3.1.1 Introduction 57-60
3.1.2 unreachable path detection instance 60-62
3.1.3 based on data mining unreachable path detection method 62-66
3.1.4 experimental evaluation and discussion 66-69
3.1.5 deficiencies and improve existing programs 69-70
3.2 virtual function call frequency estimation 70-92
3.2.1 Introduction 70-73
3.2.2 virtual function call examples 73-75
3.2.3 based evidence of the virtual function call target frequency prediction method Festival 75-82
3.2.4 experimental evaluation and discussion 82-92
3.3 potential scenarios 92 - 93
3.4 Summary 93-94
Chapter IV defect location -based log analysis method 94-110
4.1 Introduction 94-96
4.1.1 background 94
4.1.2 existing Problems 94-95
4.1.3 The main 95
4.1.4 This chapter structure 95-96
4.2 application scenarios and assumptions 96-97
4.3 log slice 97-100
4.4 log refined 100-103
4.5 slices using online analysis to improve the efficiency of 103-105
4.6 experimental evaluation 105-108
4.6.1 AutoLog preliminary experiments 105-106
4.6.2 MoonBox preliminary experiments 106-108
4.7 limitations and propagation direction 108-109
4.8 Summary 109 -110
Chapter automatic breakpoints for debugging generation technology 110-126
5.1 Introduction 110-112
5.1.1 background 110
5.1.2 existing Problems 110-111
5.1.3 The main 111-112
5.1.4 chapter structure 112 <br / > 5.2 nearest neighbor search and program execution trace memory map 112-114
5.3 select the breakpoint location 114-115
5.4 generates a breakpoint condition 115 - design and implementation of 118
5.5 tools 118-120
5.6 experimental evaluation 120-125
5.6.1 user survey design 120-121
5.6.2 assessment results and discussion 121-125
5.7 of this chapter subsections 125-126
Chapter VI automatic parameter can assist bug fixes recommended 126-150
6.1 Introduction 126-129
6.1.1 background 126-127
6.1.2 existing Problems 127-129 <br / > 6.1.3 The main 129
6.1.4 chapter structure 129
6.2 API parameters research 129-131
6.3 automatic parameter Recommend method 131-139
6.3.1 range Control rules 132-133
6.3.2 build parameters instance database 133-137
6.3. 3 generate candidate parameter 137-139
6.4 experimental evaluation 139-149
6.4.1 objective experiment 140-147
6.4.2 user survey 147-149
6.5 summary 149-150
Chapter VII Full Summary 150-155
7.1 The main work 150 -152
7.2 Next job Outlook 152-155
References during 155-164
PhD has been published or accepted papers 164 -165
Thanks 165-166
Related dissertations
- VoD System User Loyalty Evolution Analysis Based on Large-scale Data Mining
- The Study of Online Condition Assessment and Fault Localization for Large Scale Wind Turbine Based on SCADA System
- Continuous Online Program Slicing
- Research on Dependence Analysis and Software Testing
- Automatic path-oriented test data generation method
- The Design and Implementation of a Static Analysis System in Source Code
- Study and Implement on Basic Data Type Analysis in Static Binary Translation
- Global flow analysis in parallel reconfigurable systems
- The Method and Implementation of Automatic Cluster Level Test Cases Generation for Object-Oriented Software
- The Key Technology Research and Implemention of Decompiler C-Decompiler
- Dynamic taint based on information flow analysis technique
- Abstract syntax tree based on GCC C source semantic text analysis method
- Research and Realization on Static Detection for XSS Vulnerability Based on JSP
- The Effect of Investors’ Home Attention On Stock Return
- Foreground Transaction Operational Risk Warning System Research on Hunan Rural Credit Cooperative
- Research on the Problems and Countermeasures in System Operation of Basic Personal Credit Information Database
- Predicting Customer Churn in Mobile Telecommunications
- The Accurate Narketing Platform Research Basing on Flow Business Data Mining of Shenxun Information Technology Company
- Research of Listing Corporation Financial Fraud Identification Model Based on Data Mining
- A Comparative Study of Financial Distress Warning of Listed Companies Bases on BP Neural Network and Logistic Model