›› 2016, Vol. 31 ›› Issue (5): 869-882.doi: 10.1007/s11390-016-1670-2

• Special Section on Software Systems 2016 • Previous Articles     Next Articles

Prioritizing Test Cases for Memory Leaks in Android Applications

Ju Qian(钱巨)1,2,3, Member, CCF, and Di Zhou(周迪)1,3   

  1. 1 College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China;
    2 State Key Laboratory of Software Engineering, Wuhan University, Wuhan 430072, China;
    3 Collaborative Innovation Center of Novel Software Technology and Industrialization, Nanjing 210023, China
  • Received:2016-03-20 Revised:2016-07-17 Online:2016-09-05 Published:2016-09-05
  • About author:Ju Qian received his B.S. and Ph.D. degrees in computer science from Southeast University, Nanjing, in 2003 and 2009, respectively. He is currently an associate professor in the College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing. His research interests include program analysis, software testing, debugging, and evolution.
  • Supported by:

    This work was supported by the Defense Industrial Technology Development Program of China under Grant Nos. JCKY2016- 206B001 and JCKY2014206C002, the Open Project of State Key Laboratory of Software Engineering of Wuhan University under Grant No. SKLSE2014-10-13, and the Fundamental Research Funds of Nanjing University of Aeronautics and Astronautics under Grant No. NS2013088.

Mobile applications usually can only access limited amount of memory. Improper use of the memory can cause memory leaks, which may lead to performance slowdowns or even cause applications to be unexpectedly killed. Although a large body of research has been devoted into the memory leak diagnosing techniques after leaks have been discovered, it is still challenging to find out the memory leak phenomena at first. Testing is the most widely used technique for failure discovery. However, traditional testing techniques are not directed for the discovery of memory leaks. They may spend lots of time on testing unlikely leaking executions and therefore can be inefficient. To address the problem, we propose a novel approach to prioritize test cases according to their likelihood to cause memory leaks in a given test suite. It firstly builds a prediction model to determine whether each test can potentially lead to memory leaks based on machine learning on selected code features. Then, for each input test case, we partly run it to get its code features and predict its likelihood to cause leaks. The most suspicious test cases will be suggested to run at first in order to reveal memory leak faults as soon as possible. Experimental evaluation on several Android applications shows that our approach is effective.

[1] Šor V, Srirama S N. Memory leak detection in Java: Taxonomy and classification of approaches. Journal of Systems and Software, 2014, 96: 139-151.

[2] Pienaar J A, Hundt R. JSWhiz: Static analysis for JavaScript memory leaks. In Proc. the IEEE/ACM International Symposium on Code Generation and Optimization (CGO), February 2013, pp.11:1-11:11.

[3] Yan D, Xu G, Yang S, Rountev A. LeakChecker: Practical static memory leak detection for managed languages. In Proc. the IEEE/ACM International Symposium on Code Generation and Optimization (CGO), February 2014, pp.87-97.

[4] Jump M, McKinley K S. Detecting memory leaks in managed languages with Cork. Software: Practice and Experience, 2010, 40(1): 1-22.

[5] De Pauw W, Sevitsky G. Visualizing reference patterns for solving memory leaks in Java. In Proc. the 13th European Conference on Object-Oriented Programming (ECOOP), June 1999, pp.116-134.

[6] Xu G, Bond M D, Qin F, Rountev A. LeakChaser: Helping programmers narrow down causes of memory leaks. In Proc. the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ), June 2011, pp.270-282.

[7] Rayside D, Mendel L. Object ownership profiling: A technique for finding and fixing memory leaks. In Proc. the 22nd IEEE/ACM International Conference on Automated Software Engineering (ASE), November 2007, pp.194-203.

[8] Mitchell N, Sevitsky G. LeakBot: An automated and lightweight tool for diagnosing memory leaks in large Java applications. In Proc. the 17th European Conference on Object-Oriented Computing (ECOOP), July 2003, pp.351-377.

[9] Maxwell E K, Back G, Ramakrishnan N. Diagnosing memory leaks using graph mining on heap dumps. In Proc. the 16th International Conference on Knowledge Discovery and Data Mining (KDD), July 2010, pp.115-124.

[10] Bond M D, McKinley K S. Bell: Bit-encoding online memory leak detection. In Proc. the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), October 2006, pp.61-72.

[11] Xu G, Rountev A. Precise memory leak detection for Java software using container profiling. ACM Transactions on Software Engineering and Methodology (TOSEM), 2013, 22(3): Article No. 17.

[12] Guo C, Zhang J, Yan J, Zhang Z, Zhang Y. Characterizing and detecting resource leaks in Android applications. In Proc. the 28th IEEE/ACM International Conference on Automated Software Engineering (ASE), November 2013, pp.389-398.

[13] Yan D, Yang S, Rountev A. Systematic testing for resource leaks in Android applications. In Proc. the 24th IEEE International Symposium on Software Reliability Engineering (ISSRE), November 2013, pp.411-420.

[14] Zhang H, Wu H, Rountev A. Automated test generation for detection of leaks in Android applications. In Proc. the 11th IEEE/ACM International Workshop on Automation of Software Test (AST), May 2016, pp.64-70.

[15] Shahriar H, North S, Mawangi E. Testing of memory leak in Android applications. In Proc. the 15th IEEE International Symposium on High-Assurance Systems Engineering (HASE), January 2014, pp.176-183.

[16] Park J, Choi B. Automated memory leakage detection in Android based systems. International Journal of Control and Automation, 2012, 5(2): 35-42

[17] Vallée-Rai R, Co P, Gaghon E et al. Soot – A Java optimization framework. In Proc. the IBM Centre for Advanced Studies Conference (CASCON), November 1999, Article No. 13.

[18] Joachims T. Optimizing search engines using ClickThrough data. In Proc. the ACM Conference on Knowledge Discovery and Data Mining (KDD), July 2002, pp.133-142.

[19] Yang W, Prasad M, Xie T. A grey-box approach for automated GUI-model generation of mobile applications. In Proc. the International Conference on Fundamental Approaches to Software Engineering (FASE), March 2013, pp.250-265.

[20] Zhang P, Elbaum S. Amplifying tests to validate exception handling code. In Proc. the 34th International Conference on Software Engineering (ICSE), June 2012, pp.595-605.

[21] Xie Y, Aiken A. Context-and path-sensitive memory leak detection. In Proc. the 10th European Software Engineering Conference Held Jointly with the 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, September 2005, pp.115-125.

[22] Dor N, Rodeh M, Sagiv S. Checking cleanness in linked lists. In Proc. the International Static Analysis Symposium (SAS), June 29-July 1, 2000, pp.115-134

[23] Heine D L, Lam M S. A practical flow-sensitive and contextsensitive C and C++ memory leak detector. In Proc. the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ), June 2003, pp.168-181.

[24] Sui Y, Ye D, Xue J. Static memory leak detection using fullsparse value-flow analysis. In Proc. the International Symposium on Software Testing and Analysis (ISSTA), July 2012, pp.254-264.

[25] Hastings R, Joyce B. Purify: Fast detection of memory leaks and access errors. In Proc. the Winter USENIX Conference, January 1992, pp.125-138

[26] Jung C, Lee S, Raman E et al. Automated memory leak detection for production use. In Proc. the 36th International Conference on Software Engineering (ICSE), May 31-June 7, 2014, pp.825-836.

[27] Lee S, Jung C, Pande S. Detecting memory leaks through introspective dynamic behavior modelling using machine learning. In Proc. the 36th International Conference on Software Engineering, May 31-June 7, 2014, pp.814-824.

[28] Li M, Chen Y,Wang L, Xu G. Dynamically validating static memory leak warnings. In Proc. the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA), July 2013, pp.112-122.

[29] Gao Q, Xiong Y, Mi Y, Zhang L, Yang W, Zhou Z, Xie B, Mei H. Safe memory-leak fixing for C programs. In Proc. the 37th International Conference on Software Engineering (ICSE), May 2015, pp.459-470.
No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] Jin Lan; Yang Yuanyuan;. A Modified Version of Chordal Ring[J]. , 1986, 1(3): 15 -32 .
[2] Fan Zhihua;. Vectorization for Loops with Three-Forked Jumps[J]. , 1988, 3(3): 186 -202 .
[3] Zhu Mingyuan;. Two Congruent Semantics for Prolog with CUT[J]. , 1990, 5(1): 82 -91 .
[4] Guo Qingping; Y. Paker;. Communication Analysis and Granularity Assessment for a Transputer-Based System[J]. , 1990, 5(4): 347 -362 .
[5] Zhou Yong; Tang Zesheng;. Constructing Isosurfaces from 3D Data Sets Taking Account of Depth Sorting of Polyhedra[J]. , 1994, 9(2): 117 -127 .
[6] Cao Cungen;. Expansion Nets and Expansion Processes of Elementary Net Systems[J]. , 1995, 10(4): 325 -333 .
[7] Liao Lejian; Shi Zhongzhi;. Minimal Model Semantics for Sorted Constraint Representation[J]. , 1995, 10(5): 439 -446 .
[8] Zhao Yu; Zhang Qiong; Xiang Hui; Shi Jiaosing; He Zhijun;. A Simplified Model for Generating 3D Realistic Sound in the Multimedia and Virtual Reality Systems[J]. , 1996, 11(4): 461 -470 .
[9] Wang Yun; Gu Guanqun; Dui Jiyin;. Research on Protocol Migration[J]. , 1996, 11(6): 601 -606 .
[10] Cheng Qi; Zhu Hong;. MNP: A Class of NP Optimization Problems[J]. , 1997, 12(4): 306 -313 .

ISSN 1000-9000(Print)

         1860-4749(Online)
CN 11-2296/TP

Home
Editorial Board
Author Guidelines
Subscription
Journal of Computer Science and Technology
Institute of Computing Technology, Chinese Academy of Sciences
P.O. Box 2704, Beijing 100190 P.R. China
Tel.:86-10-62610746
E-mail: jcst@ict.ac.cn
 
  Copyright ©2015 JCST, All Rights Reserved