Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

API compatibility issues in Android: Causes and effectiveness of data-driven detection techniques

Published: 01 November 2020 Publication History

Abstract

Android fragmentation is a well-known issue referring to the adoption of different versions in the multitude of devices supporting such an operating system. Each Android version features a set of APIs provided to developers. These APIs are subject to changes and may cause compatibility issues. To support app developers, approaches have been proposed to automatically identify API compatibility issues. CiD, the state-of-the-art approach, is a data-driven solution learning how to detect those issues by analyzing the change history of Android APIs (“API side” learning). In this paper (extension of our MSR 2019 paper), we present an alternative data-driven approach, named ACRyL. ACRyL learns from changes implemented in apps in response to API changes (“client side” learning). When comparing these two solutions on 668 apps, for a total of 11,863 snapshots, we found that there is no clear winner, since the two techniques are highly complementary, and none of them provides a comprehensive support in detecting API compatibility issues: ACRyL achieves a precision of 7.0% (28.0%, when considering only the severe warnings), while CiD achieves a precision of 18.4%. This calls for more research in this field, and led us to run a second empirical study in which we manually analyze 500 pull-requests likely related to the fixing of compatibility issues, documenting the root cause behind the fixed issue. The most common causes are related to changes in the Android APIs ( 87%), while about 13% of the issues are related to external causes, such as build and distribution, dependencies, and the app itself. The provided empirical knowledge can inform the building of better tools for the detection of API compatibility issues.

References

[1]
Amann S, Nadi S, Nguyen HA, Nguyen TN, Mezini M (2016) MUBench: A benchmark for API-misuse detectors. In: Proceedings of the 13th IEEE/ACM Working Conference on Mining Software Repositories, MSR. 10.1109/MSR.2016.055, pp 464–467
[2]
Amann S, Nguyen HA, Nadi S, Nguyen TN, Mezini M (2018) A systematic evaluation of static API-misuse detectors. IEEE Transactions on Software Engineering, 10.1109/TSE.2018.2827384
[3]
Backes M, Bugiel S, Derr E, McDaniel P, Octeau D, Weisgerber S (2016) On demystifying the android application framework: Re-visiting android permission specification analysis. In: 25th {USENIX} security symposium ({USENIX} security 16), pp 1101–1118
[4]
Bartel A, Klein J, Le Traon Y, Monperrus M (2012) Automatically securing permission-based software by reducing the attack surface: An application to android. In: 2012 Proceedings of the 27th IEEE/ACM international conference on automated software engineering. IEEE, pp 274–277
[5]
Bavota G, Linares-Vásquez M, Bernal-Cárdenas CE, Penta MD, Oliveto R, and Poshyvanyk D The impact of API change- and fault-proneness on the user ratings of Android apps IEEE Trans Softw Eng 2015 41 4 384-407
[6]
Brito G, Hora A, Valente MT, Robbes R (2016) Do developers deprecate APIs with replacement messages? A large-scale analysis on java systems. In: Proceedings of the 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER. 10.1109/SANER.2016.99, vol 1, pp 360–369
[7]
Choudhary SR, Gorla A, Orso A (2015) Automated test input generation for Android: Are we there yet?. In: Proceedings of the 30th IEEE/ACM international conference on automated software engineering, IEEE Computer Society, ASE, pp 429–440, 10.1109/ASE.2015.89
[8]
Dilhara M, Cai H, Jenkins J (2018) Automated detection and repair of incompatible uses of runtime permissions in android apps. In: Proceedings of the 5th International Conference on Mobile Software Engineering and Systems. ACM, pp 67–71
[9]
Fazzini M, Orso A (2017) Automated cross-platform inconsistency detection for mobile apps. In: Proceedings of the 32Nd IEEE/ACM international conference on automated software engineering. IEEE Press, pp 308–318
[10]
Han D, Zhang C, Fan X, Hindle A, Wong K, Stroulia E (2012) Understanding android fragmentation with topic analysis of vendor-specific bugs. In: Proceedings of the 19th working conference on reverse engineering. WCRE, pp 83–92 10.1109/WCRE.2012.18
[11]
He D, Li L, Wang L, Zheng H, Li G, Xue J (2018) Understanding and detecting evolution-induced compatibility issues in Android apps. In: Proceedings of the 33rd ACM/IEEE international conference on automated software engineering. ACM, ASE, pp 167–177, 10.1145/3238147.3238185
[12]
Joorabchi ME, Mesbah A, Kruchten P (2013) Real challenges in mobile app development. In: Proceedings of the ACM/IEEE International symposium on empirical software engineering and measurement. ESEM, pp 15–24 10.1109/ESEM.2013.9
[13]
Li L, Bissyandé TF, Le Traon Y, Klein J (2016) Accessing inaccessible Android APIs: An empirical study. In: Proceedings of the IEEE international conference on software maintenance and evolution. ICSME, pp 411–422 10.1109/ICSME.2016.35
[14]
Li L, Bissyandé TF, Wang H, Klein J (2018a) CiD: Automating the detection of API-related compatibility issues in Android apps. In: Proceedings of the 27th ACM SIGSOFT international symposium on software testing and analysis. ISSTA, pp 153–163
[15]
Li L, Gao J, Bissyandé TF, Ma L, Xia X, Klein J (2018b) Characterising deprecated Android APIs. In: Proceedings of the 15th international conference on mining software repositories. MSR, pp 254–264
[16]
Linares-Vásquez M, Bavota G, Bernal-Cárdenas C, Di Penta M, Oliveto R, Poshyvanyk D (2013) API change and fault proneness: A threat to the success of Android apps. In: Proceedings of the 9th Joint meeting on foundations of software engineering. ACM, ESEC/FSE, pp 477–487, 10.1145/2491411.2491428
[17]
Linares-Vásquez M, Bavota G, Di Penta M, Oliveto R, Poshyvanyk D (2014) How do API changes trigger stack overflow discussions? a study on the Android SDK. In: Proceedings of the 22nd International Conference on Program Comprehension. ACM, ICPC, pp 83–94, 10.1145/2597008.2597155
[18]
Linares-Vásquez M, Moran K, Poshyvanyk D (2017) Continuous, evolutionary and large-scale: A new perspective for automated mobile app testing. In: Proceedings of the IEEE International Conference on Software Maintenance and Evolution. ICSME, pp 399–410 10.1109/ICSME.2017.27
[19]
Luo T, Wu J, Yang M, Zhao S, Wu Y, Wang Y (2018) MAD-API: Detection, Correction and explanation of API misuses in distributed android applications. In: Proceedings of the 7th International conference on artificial intelligence and mobile services. Springer International Publishing, pp 123–140
[20]
McDonnell T, Ray B, Kim M (2013 ) An empirical study of API stability and adoption in the Android ecosystem. In: Proceedings of the IEEE international conference on software maintenance. 10.1109/ICSM.2013.18. IEEE Computer Society, ICSM, pp 70–79
[21]
Mutchler P, Safaei Y, Doupé A, Mitchell J (2016) Target fragmentation in Android apps. In: Proceedings of the IEEE Security and Privacy Workshops, SPW, pp 204–213, 10.1109/SPW.2016.31
[22]
Robbes R, Lungu M, Röthlisberger D (2012) How do developers react to API deprecation?: The case of a Smalltalk ecosystem. In: Proceedings of the 20th ACM SIGSOFT International Symposium on the Foundations of Software Engineering. ACM, FSE, pp 56:1–56:11 10.1145/2393596.2393662
[23]
Sawant AA, Robbes R, Bacchelli A (2016) On the reaction to deprecation of 25,357 clients of 4 + 1 popular java APIs. In: Proceedings of the IEEE International Conference on Software Maintenance and Evolution, ICSME, pp 400–410 10.1109/ICSME.2016.64
[24]
Scalabrino S, Bavota G, Linares-Vásquez M, Lanza M, Oliveto R (2019) Data-driven solutions to detect API compatibility issues in android: an empirical study. In: Proceedings of the 16th International Conference on Mining Software Repositories, MSR 2019, 26–27 May 2019, Montreal, Canada pp 288–298
[25]
Scalabrino S, Bavota G, Linares-Vásquez M, Piantadosi V, Lanza M, Oliveto R (2020) Replication package. https://dibt.unimol.it/report/acryl-emse/
[26]
Spencer D (2009) Card sorting: Designing usable categories. Rosenfeld Media
[27]
Wei L, Liu Y, Cheung SC (2016) Taming Android fragmentation: Characterizing and detecting compatibility issues for Android apps. In: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, ASE, pp 226–237
[28]
Wu D, Liu X, Xu J, Lo D, Gao D (2017) Measuring the declared SDK versions and their consistency with API calls in Android apps. In: Proceedings of the International Conference on Wireless Algorithms, Systems, and Applications. Springer International Publishing, pp 678–690
[29]
Zhang Z, Cai H (2019) A look into developer intentions for app compatibility in android. In: 2019 IEEE/ACM 6th international conference on mobile software engineering and systems, MOBILESoft. IEEE, pp 40–44
[30]
Zhou J, Walker R J (2016) API Deprecation: a retrospective analysis and detection method for code examples on the web. In: Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, FSE, pp 266-277, 10.1145/2950290.2950298
[31]
Zhou X, Lee Y, Zhang N, Naveed M, Wang X (2014) The peril of fragmentation: Security hazards in Android device driver customizations. In: Proceedings of the IEEE Symposium on Security and Privacy. IEEE Computer Society, SP, pp 409–423, 10.1109/SP.2014.33

Cited By

View all
  • (2023)Automatically Detecting Incompatible Android APIsACM Transactions on Software Engineering and Methodology10.1145/362473733:1(1-33)Online publication date: 23-Nov-2023
  • (2023)Test Report Generation for Android App Testing Via Heterogeneous Data AnalysisIEEE Transactions on Software Engineering10.1109/TSE.2023.323724749:5(3032-3051)Online publication date: 1-May-2023
  • (2023)Compatibility Issue Detection for Android Apps Based on Path-Sensitive Semantic AnalysisProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00033(257-269)Online publication date: 14-May-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Empirical Software Engineering
Empirical Software Engineering  Volume 25, Issue 6
Nov 2020
1119 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 November 2020

Author Tags

  1. Android
  2. API compatibility issues
  3. Empirical study
  4. Taxonomy

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Automatically Detecting Incompatible Android APIsACM Transactions on Software Engineering and Methodology10.1145/362473733:1(1-33)Online publication date: 23-Nov-2023
  • (2023)Test Report Generation for Android App Testing Via Heterogeneous Data AnalysisIEEE Transactions on Software Engineering10.1109/TSE.2023.323724749:5(3032-3051)Online publication date: 1-May-2023
  • (2023)Compatibility Issue Detection for Android Apps Based on Path-Sensitive Semantic AnalysisProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00033(257-269)Online publication date: 14-May-2023
  • (2023)CiD4HMOS: A Solution to HarmonyOS Compatibility IssuesProceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE56229.2023.00134(2006-2017)Online publication date: 11-Nov-2023
  • (2023)A large-scale empirical study on mobile performance: energy, run-time and memoryEmpirical Software Engineering10.1007/s10664-023-10391-y29:1Online publication date: 27-Dec-2023
  • (2023)On Deprecated API Usages: An Exploratory Study of Top-Starred Projects on GitHubProduct-Focused Software Process Improvement10.1007/978-3-031-49266-2_29(415-431)Online publication date: 11-Dec-2023
  • (2022)Mining Android API Usage to Generate Unit Test Cases for Pinpointing Compatibility IssuesProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3561151(1-13)Online publication date: 10-Oct-2022
  • (2022)Android API Field Evolution and Its Induced Compatibility IssuesProceedings of the 16th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement10.1145/3544902.3546242(34-44)Online publication date: 19-Sep-2022
  • (2022)Automatically detecting API-induced compatibility issues in Android apps: a comparative analysis (replicability study)Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534407(617-628)Online publication date: 18-Jul-2022

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media