An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software

Luis Paulo da Silva Carvalho, Renato Novais, Laís do Nascimento Salvador, Manoel Gomes de Mendonça Neto

2017

Abstract

Code Smells indicate potential flaws in software design that can lead to costly consequences. To mitigate the bad effects of Code Smells, it is necessary to detect and fix defective code. Programmatic processing of Code Smells is not new. Previous works have focused on detection and representation to support the analysis of faulty software. However, such works are based on a syntactic operation, without taking advantage on semantic properties of the software. On the other hand, there are several ways to provide semantic support in software development as a whole. Ontologies, for example, have recently been usedl. The application of ontologies for inferring semantic mechanisms to aid software engineers in dealing with smells may be of great value. As little attention has been given to this, we propose an ontology-based approach to analyze the occurrence of Code Smells in software projects. First, we present a comprehensive ontology that is capable of representing Code Smells and their association with software projects. We also introduce a tool that can manipulate our ontology in order to provide processing of Code Smells as it mines software source-code. Finally, we conducted an initial evaluation of our approach in a real usage scenario with two large open-source software repositories.

References

  1. Abburu, S. (2012). A survey on ontology reasoners and comparison. International Journal of Computer Applications, 57(17).
  2. Chandrasekaran, B., Josephson, J. R., and Benjamins, V. R. (1999). What are ontologies, and why do we need them? IEEE Intelligent Systems, 14(1):20-26.
  3. Chatzigeorgiou, A. and Manakos, A. (2014). Investigating the evolution of code smells in object-oriented systems. Innov. Syst. Softw. Eng., 10(1):3-18.
  4. Cheng, Y.-P. and Liao, J.-R. (2007). An ontology-based taxonomy of bad code smells. In Proceedings of the third conference on IASTED International Conference: Advances in Computer Science and Technology, Phuket, Thailand.
  5. Civili, C., Console, M., De Giacomo, G., Lembo, D., Lenzerini, M., Lepore, L., Mancini, R., Poggi, A., Rosati, R., Ruzzi, M., Santarelli, V., and Savo, D. F. (2013). Mastro studio: Managing ontology-based data access applications. Proc. VLDB Endow., 6(12):1314-1317.
  6. Daraio, C., Lenzerini, M., Leporelli, C., Naggar, P., Bonaccorsi, A., and Bartolucci, A. (2016). The advantages of an ontology-based data management approach: openness, interoperability and data quality. Scientometrics, pages 1-15.
  7. de los Angeles Martin, M. and Olsina, L. (2003). Towards an ontology for software metrics and indicators as the foundation for a cataloging web system. In Proceedings of the IEEE/LEOS 3rd International Conference on Numerical Simulation of Semiconductor Optoelectronic Devices (IEEE Cat. No.03EX726), pages 103- 113.
  8. Djuric, D., Gas?evic, D., and Devedz?ic, V. (2005). Ontology modeling and mda. Journal of Object technology, 4(1):109-128.
  9. Fenske, W., Schulze, S., Meyer, D., and Saake, G. (2015). When code smells twice as much: Metric-based detection of variability-aware code smells. In Source Code Analysis and Manipulation (SCAM), 2015 IEEE 15th International Working Conference on, pages 171-180.
  10. Fernandes, E., Oliveira, J., Vale, G., Paiva, T., and Figueiredo, E. (2016). A review-based comparative study of bad smell detection tools. In Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, page 18. ACM.
  11. Fowler, M. (1997). Refactoring: Improving the design of existing code. In 11th European Conference. Jyväskylä, Finland.
  12. Gruber, T. R. (1993). A translation approach to portable ontology specifications. 5:199-220.
  13. Horrocks, I., Motik, B., and Wang, Z. (2012). The hermit owl reasoner. In ORE.
  14. Kiefer, C., Bernstein, A., and Tappolet, J. (2007). Mining software repositories with isparol and a software evolution ontology. In Proceedings of the Fourth International Workshop on Mining Software Repositories, page 10. IEEE Computer Society.
  15. Lanza, M. and Marinescu, R. (2010). Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, and Improve the Design of ObjectOriented Systems. Springer Publishing Company, Incorporated, 1st edition.
  16. Luo, Y., Hoss, A., and Carver, D. L. (2010). An ontological identification of relationships between antipatterns and code smells. In Aerospace Conference, 2010 IEEE, pages 1-10. IEEE.
  17. McCabe, T. J. (1976). A complexity measure. IEEE Transactions on Software Engineering, (4):308-320.
  18. Mendes, T. S., Almeida, D., Alves, N., Spnola, R., Novais, R., and Mendona, M. (2015). Visminertd an open source tool to support the monitoring of the technical debt evolution using software visualization. In 17th International Conference on Enterprise Information Systems. ICEIS.
  19. Moha, N., Gueheneuc, Y. G., Duchien, L., and Meur, A. F. L. (2010). Decor: A method for the specification and detection of code and design smells. IEEE Transactions on Software Engineering, 36(1):20-36.
  20. Olbrich, S. M., Cruzes, D. S., and Sjøberg, D. I. (2010). Are all code smells harmful? a study of god classes and brain classes in the evolution of three open source systems. In Software Maintenance (ICSM), 2010 IEEE International Conference on, pages 1-10. IEEE.
  21. Palomba, F., Bavota, G., Di Penta, M., Oliveto, R., and De Lucia, A. (2014). Do they really smell bad? a study on developers' perception of bad code smells. ICSME, 14:101-110.
  22. Rieß, C., Heino, N., Tramp, S., and Auer, S. (2010). Evopat - pattern-based evolution and refactoring of rdf knowledge bases. In Proceedings of the 9th International Semantic Web Conference on The Semantic Web - Volume Part I, ISWC'10, pages 647-662, Berlin, Heidelberg. Springer-Verlag.
  23. Sivaraman, K. (2014). Effective web based elearning. Middle-East Journal of Scientific Research, 19(8):1024-1027.
  24. Smith, C. U. and Williams, L. G. (2000). Software performance antipatterns. In Proceedings of the 2Nd International Workshop on Software and Performance, WOSP 7800, pages 127-136, New York, NY, USA. ACM.
  25. Staab, S. and Studer, R. (2013). Handbook on ontologies. Springer Science & Business Media.
  26. Tappolet, J., Kiefer, C., and Bernstein, A. (2010). Semantic web enabled software analysis. Web Semant., 8(2- 3):225-240.
  27. Tufano, M., Palomba, F., Bavota, G., Oliveto, R., Di Penta, M., De Lucia, A., and Poshyvanyk, D. (2015). When and why your code starts to smell bad. In Proceedings of the 37th International Conference on Software Engineering - Volume 1, ICSE 7815, pages 403-414, Piscataway, NJ, USA. IEEE Press.
  28. Van Emden, E. and Moonen, L. (2002). Java quality assurance by detecting code smells. In Reverse Engineering, 2002. Proceedings. Ninth Working Conference on, pages 97-106. IEEE.
Download


Paper Citation


in Harvard Style

Paulo da Silva Carvalho L., Novais R., do Nascimento Salvador L. and Gomes de Mendonça Neto M. (2017). An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software . In Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS, ISBN 978-989-758-248-6, pages 155-165. DOI: 10.5220/0006359901550165


in Bibtex Style

@conference{iceis17,
author={Luis Paulo da Silva Carvalho and Renato Novais and Laís do Nascimento Salvador and Manoel Gomes de Mendonça Neto},
title={An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software},
booktitle={Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS,},
year={2017},
pages={155-165},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0006359901550165},
isbn={978-989-758-248-6},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS,
TI - An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software
SN - 978-989-758-248-6
AU - Paulo da Silva Carvalho L.
AU - Novais R.
AU - do Nascimento Salvador L.
AU - Gomes de Mendonça Neto M.
PY - 2017
SP - 155
EP - 165
DO - 10.5220/0006359901550165