Localizing exception faults in Android applications

Document Type : Article

Authors

Department of Computer Engineering, Sharif University of Technology, Tehran, Iran.

Abstract

In software programs, most of the time, there is a chance of faults in general, and exception faults in particular. Localizing those pieces of code which are responsible for a particular fault is one of the most complicated tasks and it can make incorrect results if done manually. Semi-automated and fully-automated techniques have been introduced to overcome this issue. However, despite recent advances in fault localization techniques, they are not necessarily applicable to Android applications because of their special characteristics like context-awareness, use of sensors, being executable on various mobile devices, limited hardware resources, and so on. To this aim, in this paper, we introduce a semi-automated hybrid method that combines static and dynamic analysis to localize exception faults in Android applications. Our evaluations with a number of open source Android applications of different sizes with various exceptions show that our proposed technique can correctly identify the root causes of occurred exceptions. These results indicate that our proposed approach is effective in practice in localizing exception faults in Android applications.

Keywords

Main Subjects


Refrences:
1.https://sites.google.com/site/exceptionfaultlocalization/, Supporting Materials (2016).
2. Barr, E.T., Vo, T., Le, V., and Su, Z. Automatic detection of oating-point exceptions", In ACM SIGPLAN Notices, 48, ACM, pp. 549-560 (2013).
3. Berkhin, P. A survey of clustering data mining techniques", In Grouping Multidimensional Data. Springer, pp. 25-71 (2006). 4. Briand, L.C., Labiche, Y., and Liu, X. Using machine learning to support debugging with tarantula", In Software Reliability, 2007. ISSRE'07. The 18th IEEE International Symposium on IEEE, pp. 137-146 (2007). 5. Easterbrook, S., Singer, J., Storey, M.-A., and Damian, D. Selecting empirical methods for software engineering research", In Guide to Advanced Empirical Software Engineering, Springer, pp. 285-311 (2008). 6. Egele, M., Kruegel, C., Kirda, E., and Vigna, G. PiOS: Detecting privacy leaks in iOS applications", In NDSS, pp. 177-183 (2011). 7. Gibler, C., Crussell, J., Erickson, J., and Chen, H. AndroidLeaks: automatically detecting potential privacy leaks in Android applications on a large scale", International Conference on Trust and Trustworthy Computing, Springer, pp. 291-307 (2012). 8. Gottschalk, M., Jose_ok, M., Jelschen, J., and Winter, A. Removing energy code smells with reengineering services", 208, pp. 441-455 (2012). 9. Habibi, E. and Mirian-Hosseinabadi, S.-H. Eventdriven web application testing based on model-based mutation testing", Information and Software Technology, 67, pp. 159-179 (2015). 10. Harrold, M.J., Rothermel, G., Sayre, K., Wu, R., and Yi, L. An empirical investigation of the relationship between spectra di_erences and regression faults", Software Testing Veri_cation and Reliability, 10(3), pp. 171-194 (2000). 11. Hu, C. and Neamtiu, I. Automating GUI testing for Android applications", In Proceedings of the 6th International Workshop on Automation of Software Test ACM, pp. 77-83 (2011). 12. Jiang, S., Zhang, H., Wang, Q., and Zhang, Y. A debugging approach for Java runtime exceptions based on program slicing and stack traces", In Quality Software (QSIC), 2010 10th International Conference on, IEEE, pp. 393-398 (2010). 13. Jones, J.A. and Harrold, M.J. Empirical evaluation of the tarantula automatic fault-localization technique", In Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, ACM, pp. 273-282 (2005). 14. Jones, J.A., Harrold, M.J., and Stasko, J. Visualization of test information to assist fault localization", In Proceedings of the 24th International Conference on Software Engineering, ACM, pp. 467-477 (2002). 15. Lee, H.J., Naish, L., and Ramamohanarao, K. The e_ectiveness of using non redundant test cases with program spectra for bug localization", In Computer Science and Information Technology, 2009. ICCSIT 2009. 2nd IEEE International Conference on, IEEE, pp. 127-134 (2009). 16. Linares-V_asquez, M., Vendome, C., Luo, Q., and Poshyvanyk, D. How developers detect and _x performance bottlenecks in Android apps", In Proceedings of the International Conference on Software Maintenance and Evolution, IEEE, pp. 352-361 (2015). 17. Mao, X., Lei, Y., Dai, Z., Qi, Y., and Wang, C. Slicebased statistical fault localization", Journal of Systems and Software, 89, pp. 51-62 (2014). 18. Mirzaei, H. and Heydarnoori, A. Exception fault localization in android applications", In Mobile Software Engineering and Systems (MOBILESoft), 2015 2nd ACM International Conference on, IEEE, pp. 156-157 (2015). 19. Moon, S., Kim, Y., Kim, M., and Yoo, S. Ask the mutants: Mutating faulty programs for fault localization", In Software Testing, Veri_cation and Validation (ICST), 2014 IEEE Seventh International Conference on, IEEE, pp. 153-162 (2014). H. Mirzaei and A. Heydarnoori/Scientia Iranica, Transactions D: Computer Science & ... 26 (2019) 1567{1588 1587 20. Moran, K., Linares-V_asquez, M., Bernal-C_ardenas, C., Vendome, C., and Poshyvanyk, D. Automatically discovering, reporting and reproducing android application crashes", In Software Testing, Veri_cation and Validation (ICST), 2016 IEEE International Conference on, IEEE, pp. 33-44 (2016). 21. Muccini, H., Di Francesco, A., and Esposito, P. Software testing of mobile applications: Challenges and future research directions", In Proceedings of the 7th International Workshop on Automation of Software Test, IEEE Press, pp. 29-35 (2012). 22. Myers, G.J., Sandler, C., and Badgett, T. The Art of Software Testing, John Wiley & Sons (2011). 23. Nessa, S., Abedin, M., Wong, W.E., Khan, L., and Qi, Y. Software fault localization using N-gram analysis", In Wireless Algorithms, Systems, and Applications. Springer, pp. 548-559 (2008). 24. Papadakis, M. and Le Traon, Y. Metallaxis-FL: mutation-based fault localization", Software Testing, Veri_cation and Reliability, 25(5-7), pp. 605{628 (2015). 25. Pathak, A., Hu, Y.C., and Zhang, M. Bootstrapping energy debugging on smartphones: a _rst look at energy bugs in mobile devices", In Proceedings of the 10th Workshop on Hot Topics in Networks, ACM, p. 5 (2011). 26. Pathak, A., Jindal, A., Hu, Y.C., and Midki_, S.P. What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps", In Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services, ACM, pp. 267-280 (2012). 27. Payet, _E., and Spoto, F. Static analysis of Android programs", Information and Software Technology, 54(11), pp. 1192-1201 (2012). 28. Platon, O. Smart C# debugger: Debugging C# programs using model based diagnosis", University Politehnica of Bucharest Scienti_c Bulletin, Series C: Electrical Engineering, 69(1), pp. 45-60 (2007). 29. Saha, R.K., Lease, M., Khurshid, S., and Perry, D.E. Improving bug localization using structured information retrieval", In Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on, IEEE, pp. 345-355 (2013). 30. Shu, T., Ye, T., Ding, Z., and Xia, J. Fault localization based on statement frequency", Information Sciences, 360, pp., 43-56 (2016). 31. Sinha, S., Shah, H., Gorg, C., Jiang, S., Kim, M., and Harrold, M.J. Fault localization and repair for Java runtime exceptions", In Proceedings of the Eighteenth International Symposium on Software Testing and Analysis, ACM, pp. 153-164 (2009). 32. Takala, T., Katara, M., and Harty, J. Experiences of system-level model-based gui testing of an android application", In Software Testing, Veri_cation and Validation (ICST), 2011 IEEE Fourth International Conference on, IEEE, pp. 377-386 (2011). 33. Tantithamthavorn, C., Teekavanich, R., Ihara, A., and Matsumoto, K.-I. Mining a change history to quickly identify bug locations: A case study of the Eclipse project ", In Software Reliability Engineering Workshops (ISSREW), 2013 IEEE International Symposium on, IEEE, pp. 108-113 (2013). 34. Thomas, S.W., Nagappan, M., Blostein, D., and Hassan, A.E. The impact of classi_er con_guration and classi_er combination on bug localization", IEEE Transactions on Software Engineering, 39(10), pp. 1427-1443 (2013). 35. Tip, F. A survey of program slicing techniques", Journal of Programming Languages, 3(3), pp. 121-189 (1995). 36. Vekris, P., Jhala, R., Lerner, S., and Agarwal, Y. Towards verifying android apps for the absence of no-sleep energy bugs", In HotPower, USENIX Association, p. 3 (2012). 37. Wen, W. Software fault localization based on program slicing spectrum", In Software Engineering (ICSE), 2012 34th International Conference on, IEEE, pp. 1511-1514 (2012). 38. Wong, W.E. and Debroy, V., A Survey of Software Fault Localization, Tech. Rep. UTDCS-45, Department of Computer Science, University of Texas at Dallas (2009). 39. Wong, W.E., and Qi, Y. BP neural network-based e_ective fault localization", International Journal of Software Engineering and Knowledge Engineering, 19(04), pp. 573{597 (2009). 40. Wu, R., Zhang, H., Cheung, S.-C., and Kim, S. CrashLocator: locating crashing faults based on crash stacks", In Proceedings of the International Symposium on Software Testing and Analysis, ACM, pp. 204-214 (2014). 41. Xu, Z., Zhang, J., and Xu, Z. Memory leak detection based on memory state transition graph", In Software Engineering Conference (APSEC), 2011 18th Asia Paci_c, IEEE, pp. 33-40 (2011). 42. Xuan, J. and Monperrus, M. Learning to combine multiple ranking metrics for fault localization", In Software Maintenance and Evolution (ICSME), 2014 IEEE International Conference on, IEEE, pp. 191-200 (2014). 43. Xuan, J. and Monperrus, M. Test case puri_cation for improving fault localization", In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, ACM, pp. 52-63 (2014). 44. Yang, W., Prasad, M.R., and Xie, T. A greybox approach for automated GUI-model generation of mobile applications", In Fundamental Approaches to Software Engineering, Springer, pp. 250-265 (2013). 1588 H. Mirzaei and A. Heydarnoori/Scientia Iranica, Transactions D: Computer Science & ... 26 (2019) 1567{1588 45. Yi, Q., Yang, Z., Liu, J., Zhao, C., and Wang, C. Explaining software failures by cascade fault localization", ACM Transactions on Design Automation of Electronic Systems (TODAES), 20(3), p. 41 (2015). 46. Zeller, A. Isolating cause-e_ect chains from computer programs", In Proceedings of the 10th ACM SIGSOFT Symposium on Foundations of Software Engineering, ACM, pp. 1-10 (2002). 47. Zhang, X., Gupta, N., and Gupta, R. Locating faults through automated predicate switching", In Proceedings of the 28th International Conference on Software Engineering, ACM, pp. 272{281 (2006). 48. Zhang, Y. and Santelices, R. Prioritized static slicing and its application to fault localization", Journal of Systems and Software, 114, pp. 38-53 (2016). 49. Zhong, H. and Su, Z. An empirical study on real bug _xes", In Proceedings of the 37th International Conference on Software Engineering-Volume 1, IEEE Press, pp. 913-923 (2015). 50. Zhu, L.-Z., Yin, B.-B., and Cai, K.-Y. Software fault localization based on centrality measures", In Computer Software and Applications Conference Workshops (COMPSACW), 2011 IEEE 35th Annual, IEEE, pp. 37-42 (2011).