Skip to main content

To Improve Code Structure by Identifying Move Method Opportunities Using Frequent Usage Patterns in Source-Code

  • Conference paper
  • First Online:
Advanced Informatics for Computing Research (ICAICR 2018)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 955))

  • 1282 Accesses

Abstract

A smelly code is generally an indication of the poor quality of the software and it increases the understandability and maintenance efforts at the software programmer’s end. One technique to improve the quality is refactoring. Therefore, in this paper, we have identified the Feature Envy code smell and applied the corresponding Move Method refactoring. The code smell is tackled using the Frequent Usage Patterns (FUP’s) present in the source-code of the software. The FUP’s are identified at the method level and theyrepresent the set of member variables that are used by it either directly or indirectly. The identified FUP data is further used to cluster different methods using a newly proposed Clustering algorithm. Moreover, the proposed approach is successfully tested and evaluated on three standard open-source object-oriented software. The obtained results after evaluation confirm the ability of our proposed approach in enhancing the quality of the underlying software system.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Fuggetta, A.: Software process: a roadmap. In: Proceedings Conference on the Future of Software Engineering, Limerick, Ireland, pp. 25–34 (2000)

    Google Scholar 

  2. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (1999)

    Google Scholar 

  3. D’Ambros, M., Bacchelli, A., Lanza, M.: On the impact of design flaws on software defects. In: 10th International Conference on Quality Software (QSIC), pp. 23–31 (2010)

    Google Scholar 

  4. Sjoberg, D.I., Yamashita, A., Anda, B., Mockus, A., Dyba, T.: Quantifying the effect of code smells on maintenance effort. IEEE Trans. Softw. Eng. 39(8), 1144–1156 (2013)

    Article  Google Scholar 

  5. Counsell, S., Hamza, H., Hierons, R.M.: An Empirical investigation of code smell ‘deception’ and research contextualization through Paul’s criteria. J. Comput. Inf. Technol.-CIT 18 4, 333–340 (2010)

    Article  Google Scholar 

  6. Khomh, F., Penta, M.D., Guéhéneuc, Y.: An exploratory study of the impact of code smells on software change proneness. In: Proceedings of the 16th Working Conference on Reverse Engineering (WCRE), 13–16 October. IEEE Computer Society Press, Lille (2009)

    Google Scholar 

  7. Chatzigeorgiou, A., Manakos, A.: Investigating the evolution of bad smells in object-oriented code. In: 7th International Conference on Quality of Information and Communications Technology (QUATIC), pp. 106–115 (2010)

    Google Scholar 

  8. Bansiya, J., Davis, C.G.: A hierarchical model for object-oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1), 4–17 (2002)

    Article  Google Scholar 

  9. Oliveto, R., Gethers, M., Bavota, G., Poshyvanyk, D., Lucia, A. De.: Identifying method friendships to remove the feature envy bad smell. In: 33rd International Conference on Software Engineering (ICSE), pp. 820–823 (2011)

    Google Scholar 

  10. Chang, J., Blei, D.: Hierarchical relational models for document networks. Ann. Appl. Stat. 4, 124–150 (2010)

    Article  MathSciNet  Google Scholar 

  11. Tsantalis, N., Chaikalis, T., Chatzigeorgiou, A.: JDeodorant: identification and removal of typechecking bad smells. In: Proceedings of CSMR, pp. 329–331 (2008)

    Google Scholar 

  12. Marinescu, C., Marinescu, R., Mihancea, P., Ratiu, D., Wettel, R.: iPlasma: an integrated platform for quality assessment of object-oriented design. In: Proceedings of 21st International Conference on Software Maintenance (ICSM) (2005)

    Google Scholar 

  13. InFusion. http://www.intooitus.com/inFusion.html

  14. Mitchell, B.S., Traverso, M., Mancoridis, S.: An architecture for distributing the computation of software clustering algorithms. In: Proceedings of the IEEE/IFIP Conference on Software Architecture (2001)

    Google Scholar 

  15. Rathee, A., Chhabra, J.K.: Improving cohesion of a software system by performing usage pattern-based clustering. In: International Conference on Smart Computing and Communication (ICSCC), vol. 125, pp. 740–746. Elsevier (2018). Proc. Comput. Sci.

    Google Scholar 

  16. Palomba, F., Bavota, G., Penta, M.D., Fasano, F., Oliveto, R., Lucia, A.D.: A large-scale empirical study on the lifecycle of code smell co-occurrences. Inf. Softw. Technol. 99, 1–10 (2018)

    Article  Google Scholar 

  17. Taibi, D., Janes, A., Lenarduzzi, V.: How developers perceive smells in source code: a replicated study. Inf. Softw. Technol. 92, 223–235 (2017)

    Article  Google Scholar 

  18. Singh, S., Kaur, S.: A systematic literature review: refactoring for disclosing code smells in object oriented software. Ain Shams Eng. J. (2017, in press)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Randeep Singh .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Singh, R., Kumar, A. (2019). To Improve Code Structure by Identifying Move Method Opportunities Using Frequent Usage Patterns in Source-Code. In: Luhach, A., Singh, D., Hsiung, PA., Hawari, K., Lingras, P., Singh, P. (eds) Advanced Informatics for Computing Research. ICAICR 2018. Communications in Computer and Information Science, vol 955. Springer, Singapore. https://doi.org/10.1007/978-981-13-3140-4_29

Download citation

  • DOI: https://doi.org/10.1007/978-981-13-3140-4_29

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-13-3139-8

  • Online ISBN: 978-981-13-3140-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics