: Clone Refactoring Davood Mazinanian Nikolaos Tsantalis Raphael Stein

Slides:



Advertisements
Similar presentations
Duplicate code detection using Clone Digger Peter Bulychev Lomonosov Moscow State University CS department.
Advertisements

Refactoring Clones: A New Perspective Nikolaos Tsantalis and Giri Panamoottil Krishnan Computer Science & Software Engineering.
Unification and Refactoring of Clones Giri Panamoottil Krishnan and Nikolaos Tsantalis Department of Computer Science & Software Engineering Clone images.
Discovering Refactoring Opportunities in Cascading Style Sheets Davood Mazinanian Nikolaos Tsantalis Ali Mesbah Concordia University, Montréal, Canada.
An empirical study on the use of CSS Preprocessors Davood Mazinanian - Nikolaos Tsantalis Department of Computer Science and Software Engineering Concordia.
CS 3500 SE - 1 Software Engineering: It’s Much More Than Programming! Sources: “Software Engineering: A Practitioner’s Approach - Fourth Edition” Pressman,
Code Smell Research: History and Future Directions Second PLOW Installment - March 5, Nikolaos Tsantalis Computer Science & Software Engineering.
Reverse Engineering © SERG Code Cloning: Detection, Classification, and Refactoring.
Improving the Unification of Software Clones Using Tree & Graph Matching Algorithms Giri Panamoottil Krishnan Supervisor: Dr. Nikolaos Tsantalis
Preventive Software Maintenance: The Past, the Present, the Future Nikolaos Tsantalis Computer Science & Software Engineering Consortium for Software Engineering.
Barak Agiv Itamar Ben-Zaken Barak Nahum Vladislav Smolensky Academic Advisor: Yuval Elovici Professional Advisor: Mira Balaban.
An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications Adrian Pop and Peter Fritzson Programming.
Demo of Software Refactoring with Eclipse Giriprasad Sridhara CISC 879 Spring 2007 May
OpenModelica Development Environment with Eclipse Integration Adrian Pop, Peter Fritzson, Andreas Remar, Elmir Jagudin, David Akhvlediani Programming Environment.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Industrial Application.
A Comparative Analysis of the Efficiency of Change Metrics and Static Code Attributes for Defect Prediction Raimund Moser, Witold Pedrycz, Giancarlo Succi.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Finding Similar.
1 v1.6 08/02/2006 Overview of Eclipse Lectures 1.Overview 2.Installing and Running 3.Building and Running Java Classes 4.Refactoring 5.Debugging 6.Testing.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of.
CD in Natural Language Software Artifacts 1 Clone Detection in Natural Language Software Artifacts: Techniques and Applications Elmar Juergens November.
Advanced Programing practices
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Criterion for.
Software Engineering CS3003
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A clone detection approach for a collection of similar.
Mining and Analysis of Control Structure Variant Clones Guo Qiao.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
Refactoring Improving the structure of existing code Refactoring1.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Detection and evolution analysis of code clones for.
Effective Detection of Self- admitted Technical Debt Everton S. Maldonado Emad Shihab Department of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Applying Clone.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Inoue Laboratory Eunjong Choi 1 Investigating Clone.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University How to extract.
Refactoring1 Refactoring DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY February 6, 2009.
Gerrit Schutte OHIM 9th of December, 2011 Trademark terminology control.
Refactoring1 Improving the structure of existing code.
Recovering Design Technical Debt from Source Code Comments Department of Computer Science and Software Engineering Concordia University Montreal, Canada.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University 1 Towards an Assessment of the Quality of Refactoring.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University 1 Towards an Investigation of Opportunities for Refactoring.
Duplicate code detection using anti-unification Peter Bulychev Moscow State University Marius Minea Institute eAustria, Timisoara.
Com S 362: Object-Oriented Analysis and Design Refactoring.
Industrial Project (236504) Advanced programming tools for refactoring Java code in Eclipse Student: Alexander Libov Supervisor: Dr. Ran Ettinger, IBM.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Survey of Tools to Support Safe Adaptation with Validation Alain Esteva-Ramirez School of Computing and Information Sciences Florida International University.
What kind of and how clones are refactored? A case study of three OSS projects WRT2012 June 1, Eunjong Choi†, Norihiro Yoshida‡, Katsuro Inoue†
Refactoring1 Improving the structure of existing code.
DevCOP: A Software Certificate Management System for Eclipse Mark Sherriff and Laurie Williams North Carolina State University ISSRE ’06 November 10, 2006.
Estimating Code Size After a Complete Code-Clone Merge Buford Edwards III, Yuhao Wu, Makoto Matsushita, Katsuro Inoue 1 Graduate School of Information.
An empirical study on the use of CSS Preprocessors Davood Mazinanian Nikolaos Tsantalis Department of Computer Science and Software Engineering Concordia.
Migrating CSS to Preprocessors by Introducing Mixins
Module Road Map Refactoring Why Refactoring? Examples
Why We Refactor? Confessions of GitHub Contributors
Detecting Table Clones and Smells in Spreadsheets
A Refactoring Technique for Large Groups of Software Clones
Clone Refactoring with Lambda Expressions
Rename Local Variable Refactoring Instances
Real-Time Attack Detection in CPS
Accurate and Efficient Refactoring Detection in Commit History
Overview of Eclipse Lectures
Software Refactoring Group
CSc4730/6730 Scientific Visualization
Improving the structure of existing code
ReSharper Dainius Kreivys.
Assessing the Refactorability of Software Clones
Developer Productivity: What’s New in C# 6
On Refactoring Support Based on Code Clone Dependency Relation
Java IDE Dwight Deugo Nesa Matic Portions of the notes for this lecture include excerpts from.
Samir Behara, Senior Developer, EBSCO
Presentation transcript:

: Clone Refactoring Davood Mazinanian Nikolaos Tsantalis Raphael Stein 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

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)

Clones are good Positive impact on maintainability (Kasper & Godfrey @ EMSE’08) Less buggy Less effort to fix bugs (Rahman, Bird & Devanbu @ EMSE’12)

Clone management Clones that change frequently & are buggy might need some refactoring so that we don’t have to apply the same changes multiple times.

Motivation We need better clone refactoring tools 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

Our goal Help developers: Explore clone groups and understand their relations Inspect and understand the differences between clones Refactor safely the clones

Clone Group Exploration features

Clone import The import wizard checks if the clone fragments actually exist in the examined project. And fixes the clone instances that are syntactically incomplete (e.g., missing closing brackets, incomplete statements)

Subclone information Group A is a subclone of group B, if every clone instance in A is a subclone (i.e., a partial code fragment) of an instance in B.

Clone filtering Group A is a subclone of group B, if every clone instance in A is a subclone (i.e., a partial code fragment) of an instance in B.

Clone monitoring

Clone Pair Visualization features

Our approach Assessing the Refactorability of Software Clones, IEEE TSE, Nov. 2015 common nesting trees differences unmapped statements Control Structure Matching PDG Mapping Precondition Examination

Clone pair visualization In yellow color, we highlight the differences between matched statements. In red color, we highlight the statements that could not be matched. In green color we highlight semantically equivalent statements (statement having a different AST structure, but identical functionality)

Semantic tooltips

Renamed variables

Clone Pair Refactoring features

Automatic clone refactoring Based on the location of the clones, the best refactoring strategy is automatically determined Extract Method (same file) Pull Up Method (common superclass) Template Method (clones call local methods) Extract Superclass (external common superclass) Introduce Utility Method (static clones)

Refactoring Preview

Future work Support multi-clone refactoring (>2 clones) Explore lambda expressions Automated refactoring engine testing

Visit our project at http://jdeodorant.org

Advanced matches

Advanced matches