Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/3340730.3340753acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Sniffing Android code smells: an association rules mining-based approach

Published: 25 May 2019 Publication History

Abstract

Interest in mobile applications (mobile apps) has grown significantly in recent years and has become an important part of the software development market. Indeed, mobile apps become more and more complex and evolve constantly, while their development time decreases. This complexity and time pressure might lead developers to adopt bad design and implementation choices, which are known as code smells. Code smells in mobile apps could lead to performance issues such as overconsumption of hardware resources (CPU, RAM, battery) or even downtime and crashes. Some tools have been proposed for the detection of code smells in Android apps, such as Paprika or a Doctor tools. These tools rely on metrics-based detection rules, which are defined manually according to code smell definitions. However, manually defined rules might be inaccurate and subjective because they are based on user interpretations. In this paper, we present a tool-based approach, called Fakie, which allows the automatic inference of detection rules by analysing code smells data using an association rules algorithm: FP-Growth. We validated Fakie by applying it on a manually analysed validation dataset of 48 opensource mobile apps. We were able to generate detection rules for a dozen code smells, with an average F-measure of 0.95. After all of that, we performed an empirical study by applying Fakie on 2,993 apps downloaded from AndroZoo, a repository of mobile apps.

References

[1]
M. Fowler, K. Beck, J. Brant, W. Opdyke, and D. Roberts, Refactoring: improving the design of existing code. Addison-Wesley Professional, 1999.
[2]
G. Xie, J. Chen, and I. Neamtiu, "Towards a better understanding of software evolution: An empirical study on open source software," in Software Maintenance, 2009. ICSM 2009. IEEE International Conference on. IEEE, 2009, pp. 51--60.
[3]
A. Yamashita and L. Moonen, "Do code smells reflect important maintainability aspects?" in Software Maintenance (ICSM), 2012 28th IEEE International Conference on. IEEE, 2012, pp. 306--315.
[4]
A. Yamashit a and L. Moonen, "Exploring the impact of inter-smell relations on software maintainability: An empirical study," in Software Engineering (ICSE), 2013 35th International Conference on. IEEE, 2013, pp. 682--691.
[5]
M. Linares-Vásquez, G. Bavota, C. Bernal-Cárdenas, M. Di Penta, R. Oliveto, and D. Poshyvanyk, "Api change and fault proneness: a threat to the success of android apps," in Proceedings of the 2013 9th joint meeting on foundations of software engineering. ACM, 2013, pp. 477--487.
[6]
J. Reimann, M. Brylski, and U. Aßmann, "A tool-supported quality smell catalogue for android developers," in Proc. of the conference Modellierung 2014 in the Workshop Modellbasierte und modellgetriebene Softwaremodernisierung-MMSM, vol. 2014, 2014.
[7]
G. Hecht, O. Benomar, R. Rouvoy, N. Moha, and L. Duchien, "Tracking the software quality of android applications along their evolution (t)," in Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on. IEEE, 2015, pp. 236--247.
[8]
F. Palomba, D. Di Nucci, A. Panichella, A. Zaidman, and A. De Lucia, "Lightweight detection of android-specific code smells: The adoctor project," in Software Analysis, Evolution and Reengineering (SANER), 2017 IEEE 24th International Conference on. IEEE, 2017, pp. 487--491.
[9]
"F-Droid," Online; accessed February-2019, https://f-droid.org/.
[10]
K. Allix, T. F. Bissyandé, J. Klein, and Y. Le Traon, "Androzoo: Collecting millions of android apps for the research community," in Proceedings of the 13th International Conference on Mining Software Repositories. ACM, 2016, pp. 468--471.
[11]
K. Aggarwal, Y. Singh, A. Kaur, and R. Malhotra, "Empirical analysis for investigating the effect of object-oriented metrics on fault proneness: a replicated case study," Software process: Improvement and practice, vol. 14, no. 1, pp. 39--62, 2009.
[12]
V. R. Basili, L. C. Briand, and W. L. Melo, "A validation of object-oriented design metrics as quality indicators," IEEE Transactions on software engineering, vol. 22, no. 10, pp. 751--761, 1996.
[13]
W. Li and R. Shatnawi, "An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution," Journal of systems and software, vol. 80, no. 7, pp. 1120--1128, 2007.
[14]
Y. Singh, A. Kaur, and R. Malhotra, "Empirical validation of object-oriented metrics for predicting fault proneness models," Software quality journal, vol. 18, no. 1, p. 3, 2010.
[15]
S. R. Chidamber and C. F. Kemerer, "A metrics suite for object oriented design," IEEE Transactions on software engineering, vol. 20, no. 6, pp. 476--493, 1994.
[16]
N. Moha, Y.-G. Gueheneuc, L. Duchien, and A.-F. Le Meur, "Decor: A method for the specification and detection of code and design smells," IEEE Transactions on Software Engineering, vol. 36, no. 1, pp. 20--36, 2010.
[17]
S. C. Kothari, L. Bishop, J. Sauceda, and G. Daugherty, "A pattern-based framework for software anomaly detection," Software Quality Journal, vol. 12, no. 2, pp. 99--120, 2004.
[18]
A. Maiga, N. Ali, N. Bhattacharya, A. Sabané, Y.-G. Guéhéneuc, G. Antoniol, and E. Aïmeur, "Support vector machines for anti-pattern detection," in Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering. ACM, 2012, pp. 278--281.
[19]
A. Maiga, N. Ali, N. Bhattacharya, A. Sabane, Y.-G. Gueheneuc, and E. Aimeur, "Smurf: A svm-based incremental anti-pattern detection approach," in Reverse engineering (WCRE), 2012 19th working conference on. IEEE, 2012, pp. 466--475.
[20]
F. Khomh, S. Vaucher, Y.-G. Guéhéneuc, and H. Sahraoui, "Bdtex: A gqm-based bayesian approach for the detection of antipatterns," Journal of Systems and Software, vol. 84, no. 4, pp. 559--572, 2011.
[21]
F. Palomba, R. Oliveto, and A. De Lucia, "Investigating code smell co-occurrences using association rule learning: A replicated study," in Machine Learning Techniques for Software Quality Evaluation (MaLTeSQuE), IEEE Workshop on. IEEE, 2017, pp. 8--13.
[22]
R. Agrawal, R. Srikant et al., "Fast algorithms for mining association rules," in Proc. 20th int. conf. very large data bases, VLDB, vol. 1215, 1994, pp. 487--499.
[23]
F. Palomba, G. Bavota, M. Di Penta, R. Oliveto, D. Poshyvanyk, and A. De Lucia, "Mining version histories for detecting code smells," IEEE Transactions on Software Engineering, vol. 41, no. 5, pp. 462--489, 2015.
[24]
S. Fu and B. Shen, "Code bad smell detection through evolutionary data mining," in Empirical Software Engineering and Measurement (ESEM), 2015 ACM/IEEE International Symposium on. IEEE, 2015, pp. 1--9.
[25]
F. A. Fontana, M. V. Mäntylä, M. Zanoni, and A. Marino, "Comparing and experimenting machine learning techniques for code smell detection," Empirical Software Engineering, vol. 21, no. 3, pp. 1143--1191, 2016.
[26]
F. A. Fontana, M. Zanoni, A. Marino, and M. V. Mantyla, "Code smell detection: Towards a machine learning-based approach," in Software Maintenance (ICSM), 2013 29th IEEE International Conference on. IEEE, 2013, pp. 396--399.
[27]
A. Bartel, J. Klein, Y. Le Traon, and M. Monperrus, "Dexpler: converting android dalvik bytecode to jimple for static analysis with soot," in Proceedings of the ACM SIGPLAN International Workshop on State of the Art in Java Program analysis. ACM, 2012, pp. 27--38.
[28]
"Neo4j," Online; accessed February-2019, https://neo4j.com.
[29]
J. W. Tukey, Exploratory data analysis. Reading, Mass., 1977, vol. 2.
[30]
J. Han, J. Pei, and Y. Yin, "Mining frequent patterns without candidate generation," in ACM sigmod record, vol. 29, no. 2. ACM, 2000, pp. 1--12.
[31]
R. Agrawal, T. Imieliński, and A. Swami, "Mining association rules between sets of items in large databases," in Acm sigmod record, vol. 22, no. 2. ACM, 1993, pp. 207--216.
[32]
I. H. Witten, E. Frank, M. A. Hall, and C. J. Pal, Data Mining: Practical machine learning tools and techniques. Morgan Kaufmann, 2016.
[33]
C. Goutte and E. Gaussier, "A probabilistic interpretation of precision, recall and f-score, with implication for evaluation," in European Conference on Information Retrieval. Springer, 2005, pp. 345--359.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MOBILESoft '19: Proceedings of the 6th International Conference on Mobile Software Engineering and Systems
May 2019
187 pages

Sponsors

Publisher

IEEE Press

Publication History

Published: 25 May 2019

Check for updates

Author Tags

  1. Android
  2. association rules
  3. code smells
  4. detection
  5. mobile applications

Qualifiers

  • Research-article

Conference

ICSE '19
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 92
    Total Downloads
  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Sep 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media