Discovering code smells in Javascript software using clustering techniques
Abstract
The presence of code smells in software projects has negative consequences with respect to the code's cohesion and maintainability. Therefore, the analysis of techniques used to discover and detect code smells automatically is an increasingly explored topic. A semi-automatic tool which allows to discover bug patterns and eventual code smells in JavaScript code is the BugAID. The purpose of this work was to contribute with the BugAID tool in the task of discovering code smells which are common in the development of JavaScript software through the BE ++ module. The proposed BE ++ module proved effectiveness in identifying code smells which involve small code changes discovering 5 common code smells within the refactor group. These code smells are candidates for inclusion in code smells detection tools to prevent issues in JavaScript software development.
References
Carroll JB, D. P. . R. B. e. (1971). The american heritage word frequency book. New York: American, Heritage Publishing Co.
Christen, P. (2006). A comparison of personal name matching: Techniques and practical issues. In Sixth IEEE International Conference on Data Mining - Workshops (ICDMW’06), pages 290–294.
de MACEDO, C. M. (2019). Aplicação de algoritmos de agrupamento para descoberta de padrões de defeito em software javascript. Master’s thesis, Dissertação (Mestrado em Sistemas de Informação) - Escola de Artes, Ciências e Humanidades, University of São Paulo, São Paulo, 2018.
FARD, A. M. and MESBAH, A. (2013). Jsnose: Detecting javascript code smells. In 2013 IEEE 13th International Working Conference on Source Code Analysis and Manipulation (SCAM), pages 116–125.
Fowler, M. (1999). Refactoring: Improving the Design of Existing Code. Addison- Wesley, Boston, MA, USA.
Frey, B. J. and Dueck, D. (2007). Clustering by passing messages between data points. Science, 315(5814):972–976.
Hanam, Q., Brito, F. S. d. M., and Mesbah, A. (2016). Discovering bug patterns in javascript. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2016, pages 144–156, New York, NY, USA. ACM.
MacCormack, A. and Sturtevant, D. (2016). Technical debt and system architecture: The impact of coupling on defect-related activity. Journal of Systems and Software, 120.
Mikolov, T., Chen, K., Corrado, G. S., and Dean, J. (2013). Efficient estimation of word representations in vector space. CoRR, abs/1301.3781.
Pfeifer, U., Poersch, T., and Fuhr, N. (1996). Retrieval effectiveness of proper name search methods. Inf. Process. Manage., 32(6):667–679.
Rosenberg, A. and Hirschberg, J. (2007). V-measure: A conditional entropy-based external cluster evaluation measure. pages 410–420.
Saboury, A., Musavi, P., Khomh, F., and Antoniol, G. (2017). An empirical study of code smells in javascript projects. In 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), pages 294–305.
