How Java']Java APIs break - An empirical study

被引:34
|
作者
Jezek, Kamil [1 ]
Dietrich, Jens [2 ]
Brada, Premek [1 ]
机构
[1] Univ W Bohemia, Fac Sci Appl, European Ctr Excellence, NTIS, Plzen 30614, Czech Republic
[2] Massey Univ, Sch Engn & Adv Technol, Palmerston North, New Zealand
关键词
Binary compatibility; API evolution; Backward compatibility; Byte-code; !text type='Java']Java[!/text; COMPATIBILITY;
D O I
10.1016/j.infsof.2015.02.014
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: It has become common practice to build programs by using libraries. While the benefits of reuse are well known, an often overlooked risk are system runtime failures due to API changes in libraries that evolve independently. Traditionally, the consistency between a program and the libraries it uses is checked at build time when the entire system is compiled and tested. However, the trend towards partially upgrading systems by redeploying only evolved library versions results in situations where these crucial verification steps are skipped. For Java programs, partial upgrades create additional interesting problems as the compiler and the virtual machine use different rule sets to enforce contracts between the providers and the consumers of APIs. Objective: We have studied the extent of the problem in real world programs. We were interested in two aspects: the compatibility of API changes as libraries evolve, and the impact this has on programs using these libraries. Method: This study is based on the qualitas corpus version 20120401. A data set consisting of 109 Java open-source programs and 564 program versions was used from this corpus. We have investigated two types of library dependencies: explicit dependencies to embedded libraries, and dependencies defined by symbolic references in Maven build files that are resolved at build time. We have used JaCC for API analysis, this tool is based on the popular ASM byte code analysis library. Results: We found that for most of the programs we investigated, APIs are unstable as incompatible changes are common. Surprisingly, there are more compatibility problems in projects that use automated dependency resolution. However, we found only a few cases where this has an actual impact on other programs using such an API. Conclusion: It is concluded that API instability is common and causes problems for programs using these APIs. Therefore, better tools and methods are needed to safeguard library evolution. (C) 2015 Elsevier B.V. All rights reserved.
引用
收藏
页码:129 / 146
页数:18
相关论文
共 50 条
  • [1] Why and How Java']Java Developers Break APIs
    Brito, Aline
    Xavier, Laerte
    Hora, Andre
    Valente, Marco Tulio
    [J]. 2018 25TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2018), 2018, : 255 - 265
  • [2] How Fields are Used in Java']Java: An Empirical Study
    Tempero, Ewan
    [J]. ASWEC 2009: 20TH AUSTRALIAN SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2009, : 91 - 100
  • [3] How do Java']Java programs use inheritance? An empirical study of inheritance in Java']Java software
    Tempero, Ewan
    Noble, James
    Melton, Hayden
    [J]. ECOOP 2008 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2008, 5142 : 667 - +
  • [4] How fields are used in java: An empirical study
    Department of Computer Science, University of Auckland, Auckland, New Zealand
    [J]. Proc Aust Software Eng Conf ASWEC, (91-100):
  • [5] How annotations are used in Java: An empirical study
    Department of Computer Science, Federal University of Minas Gerais , Brazil
    [J]. SEKE - Proc. Int. Conf. Softw. Eng. Knowl. Eng., (426-431):
  • [6] Will Java']Java break Windows?
    Gilder, G
    [J]. FORBES, 1997, : 122 - &
  • [7] An empirical study of Java']Java bytecode programs
    Collberg, Christian
    Myles, Ginger
    Stepp, Michael
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2007, 37 (06): : 581 - 641
  • [8] An Empirical Study of Method Chaining in Java']Java
    Nakamaru, Tomoki
    Matsunaga, Tomomasa
    Yamazaki, Tetsuro
    Akiyama, Soramichi
    Chiba, Shigeru
    [J]. 2020 IEEE/ACM 17TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2020, : 93 - 102
  • [9] Copyrightability of Java']Java APIs Revisited
    Samuelson, Pamela
    [J]. COMMUNICATIONS OF THE ACM, 2015, 58 (03) : 22 - 24
  • [10] Naming Practices in Java']Java Projects: An Empirical Study
    Gresta, Remo
    Durelli, Vinicius
    Cirilo, Elder
    [J]. PROCEEDINGS OF THE 20TH BRAZILIAN SYMPOSIUM ON SOFTWARE QUALITY, SBOS 2021, 2021,