Abstract
Automated program repair (APR) is a concept of automatically fixing bugs in source code to free developers from the burden of debugging. One of the issues facing search-based APR is that repaired code contains wasteful or meaningless statements that do not affect external behavior. This paper proposes a concept named source code tidying that eliminates wasteful statements in source code repaired by search-based APR. Our proposed method applies pre-defined tidying rules to repaired code and evaluates the effect of tidying using source code metrics such as lines of code. By repeating this process based on a genetic algorithm, unnatural and full of wasteful source code is gradually brought close to natural with preserving its behavior. Our method will be involved in a process of APR by improving the readability of repaired code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
References
Assiri, F.Y., Bieman, J.M.: An assessment of the quality of automated program operator repair. In: Proceedings of International Conference on Software Testing, Verification and Validation, pp. 273–282 (2014)
Dallmeier, V., Zeller, A., Meyer, B.: Generating fixes from object behavior anomalies. In: Proceedings of International Conference on Automated Software Engineering, pp. 550–554 (2009)
Ferrante, J., Ottenstein, K.J., Warren, J.D.: The program dependence graph and its use in optimization. ACM Trans. on Program. Lang. Syst. 9(3), 319–349 (1987)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (1999)
Gazzola, L., Micucci, D., Mariani, L.: Automatic software repair: a survey. IEEE Trans. on Softw. Eng. 45(1), 34–67 (2019)
Goues, C.L., Nguyen, T., Forrest, S., Weimer, W.: GenProg: a generic method for automatic software repair. IEEE Trans. on Softw. Eng. 38(1), 54–72 (2012)
Higo, Y., et al.: kGenProg: a high-performance, high-extensibility and high-portability APR system. In: Proceedings of Asia-Pacific Software Engineering Conference, pp. 697–698 (2018)
Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. on Softw. Eng. 37(5), 649–678 (2010)
Nguyen, H.D.T., Qi, D., Roychoudhury, A., Chandra, S.: Semfix: program repair via semantic analysis. In: Proceedings of International Conference on Software Engineering, pp. 772–781 (2013)
Romano, S., Vendome, C., Scanniello, G., Poshyvanyk, D.: A multi-study investigation into dead code. IEEE Trans. on Softw. Eng. 46(1), 71–99 (2020)
Rountev, A.: Precise identification of side-effect-free methods in java. In: Proceedings of International Conference on Software Maintenance, pp. 82–91 (2004)
Xuan, J., Martinez, M., et al.: Nopol: automatic repair of conditional statement bugs in java programs. IEEE Trans. Softw. Eng. 43(1), 34–55 (2017)
Acknowledgments
This research was partially supported by JSPS KAKENHI Japan (Grant Number: JP21H04877, JP20H04166, JP21K18302, JP21K11829, JP21K11820, JP22H03567, and JP22K11985).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Iwase, T., Matsumoto, S., Kusumoto, S. (2022). Tidy Up Your Source Code! Eliminating Wasteful Statements in Automatically Repaired Source Code. In: Taibi, D., Kuhrmann, M., Mikkonen, T., Klünder, J., Abrahamsson, P. (eds) Product-Focused Software Process Improvement. PROFES 2022. Lecture Notes in Computer Science, vol 13709. Springer, Cham. https://doi.org/10.1007/978-3-031-21388-5_40
Download citation
DOI: https://doi.org/10.1007/978-3-031-21388-5_40
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-21387-8
Online ISBN: 978-3-031-21388-5
eBook Packages: Computer ScienceComputer Science (R0)