fehmi fehmi jaafar jaafar yann yann ga l ga l gu h neuc
play

Fehmi Fehmi Jaafar Jaafar, Yann , Yann- -Gal Gal Guhneuc - PowerPoint PPT Presentation

Fehmi Fehmi Jaafar Jaafar, Yann , Yann- -Gal Gal Guhneuc Guhneuc, Sylvie Hamel, and , Sylvie Hamel, and Fehmi Fehmi Jaafar Jaafar , Yann , Yann - - Gal Gal Guhneuc Guhneuc , Sylvie Hamel, and , Sylvie


  1. Fehmi Fehmi Jaafar Jaafar, Yann , Yann- -Gaël Gaël Guéhéneuc Guéhéneuc, Sylvie Hamel, and , Sylvie Hamel, and Fehmi Fehmi Jaafar Jaafar , Yann , Yann - - Gaël Gaël Guéhéneuc Guéhéneuc , Sylvie Hamel, and , Sylvie Hamel, and Foutse Foutse Foutse Foutse Khomh Khomh Khomh Khomh Université de Montréal École Polytechnique de Montréal Quebec Canada 1

  2. 1. 1. Introduction Introduction 1. 1. Introduction Introduction 2. 2. 2. Related 2. Related Related Related Work Work Work Work 3. Problem 3. 3. 3. Problem Problem Problem Statement Statement Statement Statement 4. 4. Empirical 4. 4. Empirical 4. 4. 4. 4. Empirical Study Empirical Empirical Empirical Study Empirical Empirical Study Study Study Study Study Study 5. Research 5. 5. 5. Research Research Research Questions Questions Questions Questions 6. Results 6. Results 6. 6. Results Results 7. 7. 7. 7. Ongoing Ongoing Work Ongoing Ongoing Work Work Work 8. 8. 8. 8. Conclusion Conclusion Conclusion Conclusion 2

  3. Anti-patterns describe poor solutions to design and implementation problems which are claimed to make object oriented systems hard to maintain. Anti-patterns indicate weaknesses in design that may slow down development or increase the risk of faults or failures in the future. Classes in anti-patterns have some dependencies , such as static elationships, that may propagate potential problems to other classes. 3

  4. Change-Log Approaches [1] use process metrics extracted from the versioning system, assuming that recently or frequently changed classes are the most probable source of faults. Code-Metrics approaches [2] use source code metrics , assuming that complex or larger classes are more fault-prone. Ostrand et al. [3] found that 20% of classes contains 80% of faults. At the same Ostrand et al. [3] found that 20% of classes contains 80% of faults. At the same time, these 20% of classes accounted for 50% of the source code. Assuming that all classes are considered to have the same likelihood for fault- proneness is not realistic. We conjecture that, dependencies with design defects can impact the fault- proneness of classes. [1] A. E. Hassan, “Predicting faults using the complexity of code changes,” in Proceedings of the 31st International Conference on Software Engineering, 2009. [2] R. Moser, W. Pedrycz, and G. Succi, “A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction,” in Proceedings of the 30th international conference on Software engineering, 2008 [3] T. Ostrand, E. Weyuker, and R. Bell, “Predicting the location and number of faults in large software systems,” Software Engineering, IEEE Transactions, 2005. 4

  5. Most previous fault prediction approaches were proposed to analyse fault- proneness using complexity code metrics and-or change metrics. While existing work has shown that anti-patterns are problematic, we believe that more attention should be focused on static and co-change relationships between anti-patterns classes and other classes without antipatterns. We conjecture that, static and co-change relationships with anti-patterns can We conjecture that, static and co-change relationships with anti-patterns can impact the fault-proneness classes without anti-patterns. 5

  6. The class GoClassToNavigableClass. java belongs to a Blob anti-pattern in ArgoUML0.26. Concurrently, this class is co-changed with the class GoClassToAssociatedClass.java. Yet, in the Bugzilla database of ArgoUML, the bug ID55057 confirms that the two classes are related to the same fault. 6

  7. Given a java program, we extracted its class diagrams using an existing tool PADL [3] . We use the DEtection for CORrection approach DÉCOR [4] , to specify and detect anti- patterns. We use the Ptidej tool suite to detect anti-patterns static relationships. We use the Ptidej tool suite to detect anti-patterns static relationships. We use Macocha [5] to mine software repositories and identify classes that are co- changing with anti-patterns. [3] Y.-G. Guéhéneuc and G. Antoniol, “DeMIMA: A multilayered framework for design pattern identification,” Transactions on Software Engineering (TSE), vol. 34, no. 5, pp. 667–684, 2008. [4] Naouel Moha, Y.-G. Guéhéneuc, L. Duchien, and A.-F. Le Meur, “DECOR: A method for the specification and detection of code and design smells,” Transactions on Software Engineering (TSE), 2010. [5] F. Jaafar, Y. Guéhéneuc, S. Hamel, and G. Antoniol, “An exploratory study of macro co-changes,” in Working Conference on Reverse Engineering (WCRE). IEEE, 2011, 7

  8. 8

  9. RQ1: Are classes that have static relationships with anti-patterns more fault- prone than other classes? We test whether the proportion of classes in ArgoUML, JFreeChart, and XercesJ that have static relationships with anti-patterns classes have (or do not have) significantly more faults than those that do not have static relationships with anti-patterns classes. RQ2: Are classes that co-change with anti-patterns more fault-prone than other classes? We test whether the proportion of co-changed classes with anti-patterns in ArgoUML, JFreeChart, and XercesJ have (or do not have) significantly more faults than the other classes. 9

  10. We use Fisher’s exact test to check two hypothesis. We also compute the odds ratio that indicates the likelihood for an event to occur. H RQ 10 : The proportions of faults carried by classes having static relationships with anti-patterns and other classes are the same. with anti-patterns and other classes are the same. H RQ20 : The proportions of faults involving classes having co-change dependencies with anti-patterns and other classes are the same. 10

  11. 11

  12. 12

  13. 13

  14. RQ1: Are classes that have static relationships with anti-patterns more fault-prone than other classes? For the three systems, the p-value is less then 0.05 and the likelihood that a class with static relationship(s) with anti-patterns experiences a fault (i.e., odds ratio) is about two times higher than the likelihood that other classes odds ratio) is about two times higher than the likelihood that other classes experience faults. We can answer positively to RQ1 as follows: classes having static relationships with anti-patterns are significantly more fault-prone than other classes. 14

  15. RQ2: Are classes that co-change with anti-patterns more fault-prone than other classes? The result of Fisher’s exact test and odds ratios when testing HRQ20 are significant. For all the three systems, the p-value is less than 0.05 and the likelihood that a class co-changing with anti-patterns experiences a fault likelihood that a class co-changing with anti-patterns experiences a fault (i.e., odds ratios) is about two and half times higher than the likelihood that other classes experience faults. We can answer positively to RQ2 as follows: classes co-changing with anti- patterns are significantly more fault-prone than other classes. 15

  16. Other observations: We do not detect any class having static dependencies (use, association, aggregation, and composition relationships) or co-changed with SpaghettiCode. We observe that classes having static relationships with Blob, ComplexClass, We observe that classes having static relationships with Blob, ComplexClass, and SwissArmyKnife are significantly more fault prone than other classes with similar complexity, change history, and code size. Many anti-patterns’ relationships were with classes playing roles in design patterns. We found that classes that are co-changing with anti-patterns classes are significantly more fault prone than other classes with similar complexity, change history, and code size. 16

  17. Relating anti-patterns dependencies and change-proneness. Using these results to improve faults detection tools. Prevent change in anti-patterns classes. Replicating our study on other systems to assess the generalizability of our results, Studying the effect of knowing and using the relationships of anti-patterns and design patterns in maintenance tasks and comprehension effort. 17

  18. We provide empirical evidence of the relationships between anti-patterns dependencies and fault proneness. We found that: We found that: We found that: We found that: • Having static relationships with anti-patterns can significantly increase fault-proneness. • Classes having co-change dependencies with anti-patterns are more fault prone than others. We provide a basis for future research to understand the causes and the eventual consequences of these findings. 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend