Code Smell Co-occurrences: A Systematic Mapping
Code smells co-occurrences, i.e., occurrences of more than one code smell in the same class or method, can be better indicators of design problems for software quality. Despite its importance as an indicator of design problems, we have little known about the impact of removing the smells co-occurrence via software refactoring on internal quality attributes, such as coupling, cohesion, complexity, and inheritance. There are several literature reviews on code smells and refactoring. However, we did not identify any literature review investigating the impact of co-occurring code smells in primary studies. Thus, this work presents a systematic mapping of code smell co-occurrences state of the art. To guide the mapping, we defined the following research questions: (i) Which code smells are most tend to co-occur?; (ii) How are code smells co-occurrences refactored?; (iii) What is the impact of code smell co-occurrences on internal quality attributes?; (iv) Which datasets are considered to analyze code smells co-occurrences?; (v) How are code smells co-occurrences detected?; and, (vi) What are the most common code smells co-occurrences?. With main findings, we identified that the code smells that most co-occur are: Feature Envy (19 co-occurrences), Long Method (14 co-occurrences), Long Parameter List (11 co-occurrences) and God Class (11 co-occurrences). No studies were found to answer how the code smells co-occurrences are refactored and the co-occurrences that most impacted the quality attributes, all of which were negative. Only three datasets were considered in the studies to analyze the code smell co-occurrences. Manual detection of co-occurrences is the most used. The co-occurrences Class Data Should Be Private + Feature Envy and Feature Envy + Long Method were the most common co-occurrences in the studies.