Skip to main content

Classification of Changes Based on API

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

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

  • 1454 Accesses

Abstract

In software maintenance process, software libraries are occasionally updated, and their APIs may also be updated. API changes can be classified into two categories: changes that break backward compatibility (in short, breaking changes) and changes that maintain backward compatibility (in short, maintaining changes). Detecting API changes and determining whether each is a breaking or maintaining change is useful for code reviews and release note generations. Since it is burdensome to check API changes manually, research on automatic detection of API changes has been conducted. APIDiff is a tool that automatically detects API changes and classifies the detected changes into breaking and maintaining ones. APIDiff takes two versions of a Java library as input, and it detects API changes based on the similarity of the input code. Each detected change is classified into the two kinds of changes. However, since APIDiff identifies breaking changes for each type of change, it tends to fail to correctly classify changes if multiple changes were conducted to a single API. On the other hand, our proposed technique in this paper groups changes by APIs and checks whether each group contains changes that break backward compatibility. Classifying API changes more correctly by our technique will be helpful for release note generations in maintenance process. We conducted experiments on eight open-source software and confirmed that our technique could detect API changes more correctly than APIDiff. We also confirmed that the proposed technique could classify API changes more correctly into breaking and maintaining ones than APIDiff.

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://github.com/aserg-ufmg/apidiff.

  2. 2.

    https://github.com/tsantalis/RefactoringMiner.

  3. 3.

    https://github.com/kusumotolab/APIMiner.

References

  1. Brito, A., Xavier, L., Hora, A., Valente, M.T.: APIDiff: detecting API breaking changes. In: Proceedings of International Conference on Software Analytics, Evolution, Reengineering, pp. 507–511 (2018)

    Google Scholar 

  2. Brito, A., Xavier, L., Hora, A., Valente, M.T.: Why and how Java developers break APIs. In: Proceedings of International Conference on Software Analytics, Evolution, Reengineering, pp. 255–265 (2018)

    Google Scholar 

  3. Cedrim, D., et al.: Understanding the impact of refactoring on smells: a longitudinal study of 23 software projects. In: Proceedings of Joint Meeting on Foundations of Software Engineering, pp. 465–475 (2017)

    Google Scholar 

  4. Dig, D., Johnson, R.: How do APIs evolve? A story of refactoring. Softw. Maint., Evol. Res. Pract. 18(2), 83–107 (2006)

    Google Scholar 

  5. Li, L., Bissyandé, T.F., Wang, H., Klein, J.: CiD: automating the detection of API-related compatibility issues in android apps. In: Proceedings of ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 153–163 (2018)

    Google Scholar 

  6. Michail, A.: Data mining library reuse patterns in user-selected applications. In: Proceedings of International Conference on Automated Software Engineering, pp. 24–33 (1999)

    Google Scholar 

  7. Moreno, L., Bavota, G., Penta, M.D., Oliveto, R., Marcus, A., Canfora, G.: ARENA: an approach for the automated generation of release notes. IEEE Trans. Softw. Eng. 43(2), 106–127 (2017)

    Article  Google Scholar 

  8. Silva, D., Valente, M.T.: RefDiff: detecting refactorings in version histories. In: Proceedings of IEEE/ACM International Conference on Mining Software Repositories, pp. 269–279 (2017)

    Google Scholar 

  9. Tsantalis, N., Ketkar, A., Dig, D.: RefactoringMiner 2.0. IEEE Trans. Softw. Eng. 1–21 (2020)

    Google Scholar 

  10. Xavier, L., Brito, A., Hora, A., Valente, M.T.: Historical and impact analysis of API breaking changes: a large-scale study. In: Proceedings of International Conference on Software Analysing, Evolution, Reengineering, pp. 138–147 (2017)

    Google Scholar 

  11. Xavier, L., Hora, A., Valente, M.T.: Why do we break APIs? First answers from developers. In: Proceedings of International Conference on Software Analysing, Evolution, Reengineering, pp. 392–396 (2017)

    Google Scholar 

Download references

Acknowledgment

This research was supported by JSPS KAKENHI Japan (JP20H04166, JP21K18302, JP21K11820, JP21H04877, JP22H03567, JP22K11985)

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Masashi Iriyama .

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

Iriyama, M., Higo, Y., Kusumoto, S. (2022). Classification of Changes Based on API. 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_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-21388-5_5

  • 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