Enhancing Clone Refactoring Tools for Software Engineering

Slide Note
Embed
Share

The formal tool demonstration session at ICSE 2016 presented insights into clone refactoring, highlighting the impacts of clones on software maintenance. The session discussed the harmful aspects of clones, such as error-proneness and increased maintenance costs, as well as the benefits, such as improved maintainability and reduced bugs. It emphasized the importance of clone management and the need for better clone refactoring tools to support developers in exploring clone groups, understanding clone relations, and safely refactoring clones.


Uploaded on Oct 08, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. : Clone Refactoring 38th International Conference on Software Engineering (ICSE'2016) Formal Tool Demonstration Session Davood Mazinanian Nikolaos Tsantalis Raphael Stein Zackary Valenta Department of Computer Science and Software Engineering Concordia University ICSE 2016 | Austin | May 19, 2016 1/20

  2. Clones are harmful Error-prone due to inconsistent updates (Juergens et al. @ ICSE 09) Increase maintenance effort and cost (Lozano et al. @ ICSM 08) Change-prone (Mondal et al. @ ACM SAC 12) ICSE 2016 | Austin | May 19, 2016 2/20

  3. Clones are good Positive impact on maintainability (Kasper & Godfrey @ EMSE 08) Less buggy Less effort to fix bugs (Rahman, Bird & Devanbu @ EMSE 12) ICSE 2016 | Austin | May 19, 2016 3/20

  4. Clone management Clones that change frequently & are buggy mightneed some refactoring ICSE 2016 | Austin | May 19, 2016 4/20

  5. Motivation Current clone refactoring support is poor Tairas & Gray (IST 12) studied 1,200 Type-II clones detected in 9 open-source projects: 10% could be refactored by Eclipse CeDAR(IST 12) refactored 19% We need better clone refactoring tools ICSE 2016 | Austin | May 19, 2016 5/20

  6. Our goal Help developers: 1. Explore clone groups and understand their relations 2. Inspect and understand the differences between clones 3. Refactor safely the clones ICSE 2016 | Austin | May 19, 2016 6/20

  7. Clone Group Exploration features ICSE 2016 | Austin | May 19, 2016 7/20

  8. Clone import ICSE 2016 | Austin | May 19, 2016 8/20

  9. Subclone information ICSE 2016 | Austin | May 19, 2016 9/20

  10. Clone filtering ICSE 2016 | Austin | May 19, 2016 10/20

  11. Clone monitoring ICSE 2016 | Austin | May 19, 2016 11/20

  12. Clone Pair Visualization features ICSE 2016 | Austin | May 19, 2016 12/20

  13. Our approach Assessing the Refactorability of Software Clones, IEEE TSE, Nov. 2015 Detected clones Refactorable clones if (orientation == VERTICAL) { Line2D line = new Line2D.Double(); double x0 = dataArea.getMinX(); double x1 = dataArea.getMaxX(); g2.setPaint(im.getOutlinePaint()); g2.setStroke(im.getOutlineStroke()); } differences common if (orientation == VERTICAL) { Line2D line = new Line2D.Double(); double x0 = dataArea.getMinX(); double x1 = dataArea.getMaxX(); g2.setPaint(im.getOutlinePaint()); g2.setStroke(im.getOutlineStroke()); } elseif(orientation == HORIZONTAL) { Line2D line = new Line2D.Double(); double y0 = dataArea.getMinY(); double y1 = dataArea.getMaxY(); g2.setPaint(im.getOutlinePaint()); g2.setStroke(im.getOutlineStroke()); } unmapped statements nesting trees Control Structure Matching PDG Precondition Examination Mapping ICSE 2016 | Austin | May 19, 2016 13/20

  14. Clone pair visualization ICSE 2016 | Austin | May 19, 2016 14/20

  15. Semantic tooltips ICSE 2016 | Austin | May 19, 2016 15/20

  16. Renamed variables ICSE 2016 | Austin | May 19, 2016 16/20

  17. Clone Pair Refactoring features ICSE 2016 | Austin | May 19, 2016 17/20

  18. Automatic clone refactoring Based on the location of the clones, the best refactoring strategy is automatically determined 1. Extract Method (same file) 2. Pull Up Method (common superclass) a) Template Method (clones call local methods) b) Extract Superclass (external common superclass) 3. Introduce Utility Method (static clones) ICSE 2016 | Austin | May 19, 2016 18/20

  19. Refactoring Preview ICSE 2016 | Austin | May 19, 2016 19/20

  20. Future work Support multi-clone refactoring (>2 clones) Explore lambda expressions Automated refactoring engine testing ICSE 2016 | Austin | May 19, 2016 20/20

  21. Visit our project at http://jdeodorant.org ICSE 2016 | Austin | May 19, 2016 21/20

  22. Advanced matches ICSE 2016 | Austin | May 19, 2016 22/20

  23. Advanced matches ICSE 2016 | Austin | May 19, 2016 23/20

More Related Content