Skip to main content

Tidy Up Your Source Code! Eliminating Wasteful Statements in Automatically Repaired Source Code

  • Conference paper
  • First Online:
Product-Focused Software Process Improvement (PROFES 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13709))

  • 1436 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://atcoder.jp/.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (1999)

    Google Scholar 

  5. Gazzola, L., Micucci, D., Mariani, L.: Automatic software repair: a survey. IEEE Trans. on Softw. Eng. 45(1), 34–67 (2019)

    Article  Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. 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)

    Google Scholar 

  8. Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. on Softw. Eng. 37(5), 649–678 (2010)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Article  Google Scholar 

  11. Rountev, A.: Precise identification of side-effect-free methods in java. In: Proceedings of International Conference on Software Maintenance, pp. 82–91 (2004)

    Google Scholar 

  12. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Takumi Iwase .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics