# Integrating Interactive Detection of Code Smells into Scrum: Feasibility, Benefits, and Challenges
## 6 Online Validation: Insights from a Controlled Experiment
### Results
#### 6.3.2 Code Smell Detection (Phase 2)  
The second phase of the experiment involved performing software development tasks with the support of the proposed approach that integrates ID into Scrum. The objective of this activity was to evaluate the effectiveness and practical feasibility of the approach in terms of productivity, code quality, collaboration among teams, and suitability for agile practices. Additionally, it aimed to verify if developers using the approach would result in more accurate and comprehensive detection of code smells compared to developers using the non-adapted Scrum framework. During the experimental activities, the participants were instructed to make two deliveries at the end of the second and third Sprint. Each delivery involved two artifacts: (i) the Java project implementing the specified requirements and functionalities, and (ii) a list containing 10 different types of code smells that the participating teams identified as maintainability issues. For each delivered project, an oracle containing a list of code smells representing maintainability problems was generated. By comparing these artifacts (i.e., the oracle versus the list of smells), it was possible to obtain the results related to True Positives (TP), False Positives (FP), and False Negatives (FN). Table 1 describes the results corresponding to each component. _The approach decreases the number of True Positives (TP)._ Participating teams using the approach detected 51 (first delivery) and 34 (second delivery) True Positives, whereas without the use of the approach, they detected 60 (1 st delivery) and 51 (2 nd delivery) True Positives. Therefore, using the approach contributes to a reduction of approximately 25% in the total number of TP (i.e., remaining code smells) in the code smell detection activity. The results related to the TP (alpha = 0.05, \(p\) = 0.0061, W = 0, MD = 4.77, \(Z=-2.3664\)) were statistically significant using the Wilcoxon test [38]. The proposed approach contributes to the reduction in TP due to several factors. One possible reason is that the approach encourages a proactive strategy for dealing with smells, emphasizing prevention and early detection. This means that the team is better prepared to avoid introducing smells and promptly correct them if they occur. This preventive mindset contributes to the decrease in detected smells and true positives. Another possible reason is that Scrum promotes an iterative and incremental development process, focusing on the continuous delivery of functional software. This allows teams the identification and address of smells in a more agile way as they progress in development. Integrating ID into Scrum reinforces the attention to code quality and the use of practices that help prevent the introduction of smells. _The approach decreases the number of False Positives (FP)._ It was found that participants identified 12 (in the first delivery) and 9 (in the second delivery) False Positives using the approach. On the other hand, when using the ID technique, participants identified 24 (in the first delivery) and 21 (in the second delivery) False Positives. It can be concluded, therefore, that the use of the approach can reduce the number of FP by up to 50%. It is important to mention that the statistical results related to FP (alpha = 0.05, \(p\) = 0.00032, W = 0, MD = \(-3.38\), \(Z=-3.407\)) obtained in experimental tasks were significant using the Wilcoxon test [38]. There are several reasons why the proposed approach contributes to reducing FP. Firstly, the approach emphasizes code inspection from the early stages of development.