Font Size: a A A

Research On Automatic Repair Patch Uncertainty Measurement Based On Evidence Theory

Posted on:2023-04-10Degree:MasterType:Thesis
Country:ChinaCandidate:W H WangFull Text:PDF
GTID:2558306845491194Subject:Electronic information
Abstract/Summary:PDF Full Text Request
With the birth of software,version iteration and update,the scale of software gradually expands.At the same time,the complexity and quantity of software defects are also increasing.Software defects are inevitable,and the cost of software maintenance and repair is very high in the whole software life cycle.At present,some Automated Program Repair(APR)techniques have been proposed in order to reduce the cost of repairing defects.However,due to the fitting problem in the repair of APR tools,the patches output by APR tools are uncertain.It is impossible to guarantee that the patches are completely correct,and manual verification is necessary to get the truly correct patches.To improve the automation degree of APR tools(reduce manual verification workload)and guide APR tools to generate patches with higher accuracy and closer to those written by developers,it is necessary to evaluate the uncertainty of automatic patch repair effectively.This thesis focuses on the existing APR technology,models the whole automatic repair process,and combines Dempster Shafer(DS)evidence theory for information fusion to evaluate patch uncertainty.The main contributions of this thesis are as follows:(1)By modeling the entire repair process,the evaluation model structure is obtained,which enhances the systematic and rationality of the patch uncertainty evaluation method.The whole repair process is divided into independent sub-processes,defect location,patch generation and patch verification.For each repair sub-process,atomic nodes(patch features that have great influence on the correctness of patches)are determined.Finally,the basic structure of patch uncertainty evaluation model is obtained.(2)For each atomic node in the patch evaluation model structure,design the atomic node data collection method.Firstly,in the defect location stage,the patch position order is proposed for measurement.Design tools collect this data.Secondly,in the patch generation stage,the patch template is proposed for measurement.By analyzing the existing correct patch/plausible and template repair rules,the patches are classified according to the template.And then collect the repair template information used by the patch.Finally,in the patch verification stage,line coverage,instruction coverage,method coverage and class coverage of the verification test are proposed for measurement.Use Jacoco and extend it accordingly to generate coverage report.Collect the data of atomic nodes in this stage through coverage report,and design automation script to automate the process of generating coverage data.(3)Data preprocessing rules are defined by analyzing atomic node data.Add the weight coefficient of the atomic node(the degree of influence on the evaluation result).Accordingly,the patch uncertainty assessment method based on DS evidence theory is proposed.Treating individual atomic nodes as evidence sources in DS evidence theory.The basic probability distribution rules and data preprocessing rules are defined,and then the synthesis rules of DS evidence theory are used for data fusion.Finally,the degree of confidence in the correctness of the automatic patch and the judgment are output to evaluate the patch uncertainty.Build an experimental environment to reproduce the repair tool TBar(Template-Based Automated Program Repair).Using the defect dataset Defects4 J,the proposed patch evaluation model and method are validated.Experiments show that the patch uncertainty evaluation method proposed in this thesis is better than the commonly used machine learning classification methods for patch evaluation.
Keywords/Search Tags:Automated Program Repair, Patch Uncertainty, Evaluation Model, Weight Coefficient, Data Fusion
PDF Full Text Request
Related items