Font Size: a A A

Context Sensitive Method Of Automatic Repairing Students' Programs

Posted on:2021-03-04Degree:MasterType:Thesis
Country:ChinaCandidate:Q YuanFull Text:PDF
GTID:2427330611498166Subject:Computer technology
Abstract/Summary:PDF Full Text Request
In recent years,the online learning environment has become popular increasingly,and is gradually used as a means in the teaching of college students' programming.However,the existing online programming system can only judge the validity of the submitted program,and is unable to find the cause of the error and make corrections.Therefore,this article studies the application of automatic program repair in student programs,mainly for the code of Java programming courses.Defective programs Different from industrial defective systems with the characteristics of large code size,approximate correctness,small patches,and most test cases can pass,students' programs may contain high error density and conceptual errors lack of key statements.Industrial methods compare the test cases to locate the error to achieve the repair function,but the students' programs may not pass any test case.Hence the repair methods of the industry are not suitable for repairing the student program generally.The code of the students' programs is used to be brief and the quantity is usually large.Providing templates to repair,and tapping the template from the correct student program could make the template program more diverse.However,lots of solutions could be refer to one programming problem.The answers given by students may differ in implementation algorithms,correctness,and grammar usage.Choosing different template programs as example programs will directly affect the correctness and rate of repairment.The topic uses quantities of correct template programs collected from online programming systems.The "programming wisdom" in programs can provide rich information for automatic program repair.In response to the above problems,this article completed the following work:A method of mining template programs is proposed to find the template programs among massive samples.This study uses context information of programs in order to distinguish whether the equivalent programs are different in syntax or implementation.Then the sets of template programs could be constructed by clustering algorithm.The results show that accuracy of the method reaches 93.4%.The paper proposes a variable mapping method by combining dynamic execution and context analysis to solve the issue of the equivalent variables between student programs and template programs.The method considers both the value sequence of variables and the context information of the variables in runtime to make more accurate variable matching.Experiment shows that the accuracy of matching reaches 93.7%which is 53.5% higher than previous method.Lastly,the paper proposes an advanced genetic programming algorithm to solve the lack of cross-operation's flexibility and explosion of search space's size,andimprove the quality and diversity of variants.In addition,the method could select different variants with the ability of passing test case more comprehensive and reduce the time cost compared to previous studies.The results demonstrate the advanced algorithm improve performance in fitness and efficiency of bug fix.The fitness could reach 94.5% in the runtime of 8.9 seconds on average.
Keywords/Search Tags:automatic program repair, template mining, variable mapping, genetic programming
PDF Full Text Request
Related items