Preliminary Study on the Reproducibility of Fix Templates in Static Analysis Tool

Published: 01 Jan 2023, Last Modified: 02 Sept 2025CSEE&T 2023EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Automated Program Repair (APR) automatically generates patches for identified defects. As a result, APR can encourage novice students to learn coding by providing appropriate patches. Since students have their coding conventions, we should be able to deal with many types of defects. Existing studies have used predefined RuleId-driven templates to automatically fix defects in Static Analysis Tools(SATs). However, the community periodically adds, deletes, or changes SAT’s RuleIds. This is difficult for existing RuleId-based templates to reflect those changes immediately. Existing studies only cover about 10 RuleIds, making it difficult to address all defects faced by all students. Therefore, it is necessary to establish appropriate criteria for classifying templates. The SAT has a predefined format for how Error Messages are written, and since Error Messages contain fixing actions, defects with similar Error Messages tend to have similar fixing actions. These characteristics of the Error Message are suitable for reproducible template classification criteria. Our preliminary study demonstrated that by classifying patterns based on Error Messages, we could effectively address various defects, including those in different programming languages, using a single template. This means that if a newly added RuleId corresponds to an Error Message format already in the predefined Error Message-based template, it can be modified without additional effort. We plan to construct reproducible templates for each Error Message and provide ongoing patching of defects to students.
Loading