apim igrator an api usage migration tool for android apps
play

APIM IGRATOR : An API-Usage Migration Tool for Android Apps Mattia - PowerPoint PPT Presentation

APIM IGRATOR : An API-Usage Migration Tool for Android Apps Mattia Fazzini Qi Xin Alessandro Orso Mobile Applications Platform Platform Tight Coupling Platforms Change Platforms Change Frequently Android Petit Four Cupcake Donut 1.1


  1. APIM IGRATOR : An API-Usage Migration Tool for Android Apps Mattia Fazzini Qi Xin Alessandro Orso

  2. Mobile Applications

  3. Platform

  4. Platform Tight Coupling

  5. Platforms Change

  6. Platforms Change Frequently Android Petit Four Cupcake Donut 1.1 Eclair Froyo Gingerbread Honeycomb Ice Cream Jelly Bean KitKat Lollipop Marshmallow Nougat Oreo Pie Android 10

  7. Adaptive Maintenance Platform New Platform App App Developer

  8. Platform Fragmentation Ice Cream Android 10 Jelly Bean KitKat Pie Lollipop Marshmallow Oreo Nougat

  9. Intuition Developer B App B Developer A App A Developer C App C

  10. Intuition Developer B App B Developer A App A Developer C App C

  11. Intuition Developer B App B Developer A App A Developer C App C

  12. API-Usage Migrations API-Usage Changes public NetworkInfo[] getAllNetworkInfo() Old API Usage public NetworkInfo[] getAllNetworkInfo() New API Usage public Network[] getAllNetworks() public NetworkInfo getNetworkInfo(Network network)

  13. API Updates API-Usage Changes public NetworkInfo[] getAllNetworkInfo() Old API Usage public NetworkInfo[] getAllNetworkInfo () New API Usage public Network[] getAllNetworks () public NetworkInfo getNetworkInfo ( Network network )

  14. API Updates API-Usage Changes public NetworkInfo[] getAllNetworkInfo() Old API Usage public NetworkInfo[] getAllNetworkInfo() New API Usage public Network[] getAllNetworks() public NetworkInfo getNetworkInfo(Network network)

  15. Migration Example Migration Example Before Migration Example After public boolean isConnected(Context cont) { public boolean isConnected(Context cont) { ConnectivityManager cm = ...; ConnectivityManager cm = ... ; NetworkInfo[] info = cm.getAllNetworkInfo(); if (VERSION.SDK_INT >= VERSION_CODES.M) { for (int i = 0; i < info.length; i++) { Network[] networks = cm.getAllNetworks(); if(info[i].isConnected()) { for (Network mNetwork : networks) { return true; NetworkInfo networkInfo = } } cm.getNetworkInfo(mNetwork); Toast.makeText(R.s.noNet).show(); if(networkInfo.isConnected()) { return false; Log.d(networkInfo.getTypeName()); } return true; } } } else { NetworkInfo[] info = cm.getAllNetworkInfo(); for (NetworkInfo anInfo : info) { if(anInfo.isConnected()) { Log.d(anInfo.getTypeName()); return true; } } } Toast.makeText(cont.getString(...)).show(); return false; }

  16. Migration Example Migration Example Before Migration Example After public boolean isConnected(Context cont) { public boolean isConnected(Context cont) { ConnectivityManager cm = ...; ConnectivityManager cm = ... ; NetworkInfo[] info = cm.getAllNetworkInfo(); if (VERSION.SDK_INT >= VERSION_CODES.M) { for (int i = 0; i < info.length; i++) { Network[] networks = cm.getAllNetworks(); if(info[i].isConnected()) { for (Network mNetwork : networks) { return true; NetworkInfo networkInfo = } } cm.getNetworkInfo(mNetwork); Toast.makeText(R.s.noNet).show(); if(networkInfo.isConnected()) { return false; Log.d(networkInfo.getTypeName()); } return true; } } } else { NetworkInfo[] info = cm.getAllNetworkInfo(); for (NetworkInfo anInfo : info) { if(anInfo.isConnected()) { Log.d(anInfo.getTypeName()); return true; } } } Toast.makeText(cont.getString(...)).show(); return false; }

  17. Migration Example Migration Example Before Migration Example After public boolean isConnected(Context cont) { public boolean isConnected(Context cont) { ConnectivityManager cm = ...; ConnectivityManager cm = ... ; NetworkInfo[] info = cm.getAllNetworkInfo(); if (VERSION.SDK_INT >= VERSION_CODES.M) { for (NetworkInfo anInfo : info) { Network[] networks = cm.getAllNetworks(); if(info[i].isConnected()) { for (Network mNetwork : networks) { return true; NetworkInfo networkInfo = } } cm.getNetworkInfo(mNetwork); Toast.makeText(R.s.noNet).show(); if(networkInfo.isConnected()) { return false; Log.d(networkInfo.getTypeName()); } return true; } } } else { NetworkInfo[] info = cm.getAllNetworkInfo(); for (NetworkInfo anInfo : info) { if(anInfo.isConnected()) { Log.d(anInfo.getTypeName()); return true; } } } Toast.makeText(cont.getString(...)).show(); return false; }

  18. APIM IGRATOR Overview API-Usage API-Usage Migration Examples Update Examples Generic Migration Analysis Search Analysis Migration Migration Examples Patches API-Usage Migration Report Migrate and Find migration Abstract migration Identify API validate API usages requiring examples for examples into migration in usages in target identified API generic migration target app app based on usages patches and rank patches them

  19. APIM IGRATOR Overview API-Usage API-Usage Migration Examples Update Examples Generic Migration Analysis Search Analysis Migration Migration Examples Patches API-Usage Migration Report Migrate and Find migration Abstract migration Identify API validate API usages requiring examples for examples into migration in usages in target identified API generic migration target app app based on usages patches and rank patches them

  20. APIM IGRATOR Overview API-Usage API-Usage Migration Examples Update Examples Generic Migration Analysis Search Analysis Migration Migration Examples Patches API-Usage Migration Report Migrate and Find migration Abstract migration Identify API validate API usages requiring examples for examples into migration in usages in target identified API generic migration target app app based on usages patches and rank patches them

  21. APIM IGRATOR Overview API-Usage API-Usage Migration Examples Update Examples Generic Migration Analysis Search Analysis Migration Migration Examples Patches API-Usage Migration Report Migrate and Find migration Abstract migration Identify API validate API usages requiring examples for examples into migration in usages in target identified API generic migration target app app based on usages patches and rank patches them

  22. APIM IGRATOR Overview API-Usage API-Usage Migration Examples Update Examples Generic Migration Analysis Search Analysis Migration Migration Examples Patches API-Usage Migration Report Migrate and Find migration Abstract migration Identify API validate API usages requiring examples for examples into migration in usages in target identified API generic migration target app app based on usages patches and rank patches them

  23. Empirical Evaluation Research Questions RQ1 (E FFECTIVENESS ) : Can APIM IGRATOR migrate API usages in real-world apps? RQ2 (E FFICIENCY ) : What is the cost of running APIM IGRATOR ? RQ2 (E FFICIENCY ) : What is the cost of running APIM IGRATOR ?

  24. Evaluation RQ1 (E FFECTIVENESS ) : Can APIM IGRATOR migrate API usages in real-world apps? • 17/20 (85%) successful update rate (for API usages) • 37/41 (90%) successful update rate (for API-usage occurrences) • 25/37 (68%) automatic validation rate (for API-usage occurrences) A PP E VOLVE is effective in automatically updating API usages. RQ2 (E FFICIENCY ) : What is the cost of running APIM IGRATOR ? Average Execution Time API-Usage Update Examples Update Examples API-Usage Analysis Search Analysis Update 28s 10h27m 2s204ms 20s The cost of the update examples search phase dominates the cost of the other phases.

  25. Summary

  26. Summary APIM IGRATOR VM https://zenodo.org/record/3668385

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend