With Jeff Gray and Ira Baxter Robert Tairas Visualization of Clone Detection Results Eclipse Technology Exchange Workshop OOPSLA 2006 Portland, Oregon.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
© 2008 by Borland Software Corp; made available under the EPL v1.0 | 17 March 2008 Introduction to the Graphical Modeling Framework Artem Tikhomirov, Borland.
Introduction to Eclipse plugin development for CSU 670 course project, Selector language (Xaspect) editor plugin implementation.
DEV-2: Getting Started with OpenEdge® Architect – Part I
Semantic Mutation Testing John A. Clark, Haitao Dan, Robert M Hierons.
Brief Introduction to Java and C# Dahai Guo Oracle Certified Java Programmer (SCJP) Associate Professor and Program Director Software Engineering Program.
ETX Workshop OOPSLA 2003 Prism pattern recognition for aspect mining Prism is Research in Software Modularization Charles Zhang and Hans-Arno Jacobsen.
Building New SOA and AJAX- Based Business Applications Mark Barnard R&D Manager – Natural Business Services Software AG (Canada) Inc.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
Content-Based Image Retrieval (CBIR) Student: Mihaela David Professor: Michael Eckmann Most of the database images in this presentation are from the Annotated.
Programming What is a program? –A set of instructions –Understood by a computer.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Case Study: Starting the Student Registration System Chapter 3.
Java Review Structure of a graphics program. Computer Graphics and User Interfaces Java is Object-Oriented A program uses objects to model the solution.
Stimulating reuse with an automated active code search tool Júlio Lins – André Santos (Advisor) –
An Overview of Computers and Programming
An ide for teaching and learning prolog
CS 355 – Programming Languages
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University DCCFinder: A Very- Large Scale Code Clone Analysis.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
1 Research Groups : KEEL: A Software Tool to Assess Evolutionary Algorithms for Data Mining Problems SCI 2 SMetrology and Models Intelligent.
Robotics Simulation (Skynet) Andrew Townsend Advisor: Professor Grant Braught.
Final Year Project Interim Presentation Software Visualisation and Comparison Tool Presented By : Shane Lillis, , 4th Year Computer Engineering.
Visual Basic 101.
Marcel Casado NCAR/RAP WEATHER WARNING TOOL NCAR.
GumTree Feature Overview Tony Lam Data Acquisition Team Bragg Institute eScience Workshop 2006.
Graph Visualization Plug-in for Eclipse Gong Jun CCIS Northeastern Univ 10/2003 How To Finish your Project within Four Weeks.
FotoGazmic Software (From left to right: Chad Zbinden, Josey Baker, Rob Mills, Myra Bergman, Tinate Dejtiranukul)
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Domain-Specific Development Stuart Kent, Senior Program Manager, DSL Tools, Visual Studio Team System, Microsoft.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Cross Language Clone Analysis Team 2 October 27, 2010.
Chapter 6 Programming Languages (2) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Team Jeopardy Objective ä Name the topics described ä Make the correct team noise when you want to answer ä Answer in the form of a question.
Selected Topics in Software Engineering - Distributed Software Development.
CERN - IT Department CH-1211 Genève 23 Switzerland t DB Development Tools Benthic SQL Developer Application Express WLCG Service Reliability.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr.
Visual Linker ARD presentation. slide 2  Background and Vision  Problem Domain  Stakeholders  Functional Requirements  Non Functional.
BUILD ON THE POLYGLOT COMPILER FRAMEWORK MIHAL BRUMBULLI 7th Workshop “SEERE” Montenegro-Risan 9-14 September 2007 SimJ Programming Language.
Technical Presentation
Background Nowadays, different software systems developed in- house are growing; companies or organization is facing problems of new collaborations and.
Applications Development
Eclipse 24-Apr-17.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Celluloid An interactive media sequencing language.
07/10/2007 VDCT Status Update EPICS Collaboration, October 2007 Knoxville, Tennessee
Scientific Programmes Committee Centre for Aerospace Systems Design & Engineering Amitay Isaacs Department of Aerospace Engineering Indian Institute of.
Faculty Advisor – Dr. Suraj Kothari Client – Jon Mathews Team Members – Chaz Beck Marcus Rosenow Shaun Brockhoff Jason Lackore.
May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr.
 Software Clones:( Definitions from Wikipedia) ◦ Duplicate code: a sequence of source code that occurs more than once, either within a program or across.
Cross Language Clone Analysis Team 2 February 3, 2011.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
The PLA Model: On the Combination of Product-Line Analyses 강태준.
Introduction: From Nand to Tetris
Exception and Event Handling
CSCI-235 Micro-Computer Applications
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
COSC-4840 Software Engineering
Software engineering USER INTERFACE DESIGN.
CIS16 Application Development Programming with Visual Basic
Chapter 7 –Implementation Issues
Presentation transcript:

with Jeff Gray and Ira Baxter Robert Tairas Visualization of Clone Detection Results Eclipse Technology Exchange Workshop OOPSLA 2006 Portland, Oregon

2 Code Clones A sequence of statements that are duplicated in multiple locations in a program _____ _______ _________ ___ ______ ___ ______ _____ ________ ___ ______ _________ ____ _______ ______ _________ _____ _______ ________ ___ _________ ______ _______ _____ _________ _______ ___ ______ ________ __________ _______ ____ _______ ________ ___ _________ ______ ____ ______ _________ _____ ____ ________ ____ __________ _______ ___ ________ ___ _________ ______ _____ ________ ___ ______ _________ ______ _______ ______ _______ _________ _______ ___ ________ ___ _________ ____ Source Code ________ ___ _________ ______ Cloned Code

3 Clones in Source Code Copy-and-paste parts of code from one location to another  The copied code already works correctly  No time to be efficient Research shows that 5-10% of large scale computer programs are clones (Baxter, 98) _____ _______ _________ ___ ______ ___ ______ _____ ________ ___ ______ _________ ____ _______ ______ _________ _____ _______ ________ ___ _________ ______ _______ _____ _________ _______ ___ ______ ________ __________ _______ ____ _______ ________ ___ _________ ______ ____ ______ _________ _____ ____ ________ ____ __________ _______ ___ ________ ___ _________ ______ _____ ________ ___ ______ _________ ______ _______ ______ _______ _________ _______ ___ ________ ___ _________ ____ Source Code

4 Supporting Tool: CloneDR Commercial clone detection tool developed by Semantic Designs Finds clones by examining the abstract syntax tree representation of a program Java version freely available at:

5 Supporting tool: AJDT Visualiser Plugin Part of the AspectJ Development Tools (AJDT) project AJDT Visualiser website: An extension point to pass information: Bars: Implement IContentProvider Interface Stripes: Implement IMarkupProvider Interface Visualiser View

6 Clone Detection Results === Tree Clone Tuple ==== Tuple with 7 clones, 3 parameters; similarity = #4#10f577d0#97986c0 Clone 1: 6 lines from Line 43 to 48 File: c:/temp/runtime-EclipseApplication/JHotDraw/src/org/jhotdraw/contrib/WindowMenu.java new AbstractCommand("Cascade", newEditor) { public void execute() { WindowMenu.this.desktop.cascadeFrames(); } public boolean isExecutable() { return super.isExecutable() && (WindowMenu.this.desktop.getAllFrames().length > 0); } #4#10f577d0#979d860 Clone 2: 6 lines from Line 51 to 56 File: c:/temp/runtime-EclipseApplication/JHotDraw/src/org/jhotdraw/contrib/WindowMenu.java new AbstractCommand("Tile", newEditor) { public void execute() { WindowMenu.this.desktop.tileFramesHorizontally(); } public boolean isExecutable() { return super.isExecutable() && (WindowMenu.this.desktop.getAllFrames().length > 0); } #4#10f577d0#9e77f40 Clone 3: 7 lines from Line 52 to 58 File: c:/temp/runtime-EclipseApplication/JHotDraw/src/org/jhotdraw/contrib/CTXWindowMenu.java new AbstractCommand("Cascade", newEditor) { public void execute() { CTXWindowMenu.this.desktop.cascadeFrames(); } public boolean isExecutable() { return super.isExecutable() && (CTXWindowMenu.this.desktop.getAllFrames().length > 0); } …

7 Process Detection Info View Detected Clones View Detected Clones View Config Wizard Results Text File Parser CloneDR Eclipse Platform Clone Detection Results Plugin AJDT Visualiser Plugin Initially, user is assisted by detection process configuration wizard. 2.CloneDR executes and generates a text file containing its results. These results are parsed by the plugin. 3.Detection statistics sent to information view and detected clones sent to both textual and graphical view (step 3).

8 Configuration Wizard The detection of clones can run on all files or just on pre- selected files The detection settings for CloneDR are also set in the wizard Wizard generates a configuration file that will be used by CloneDR

9 Detection Information Statistical information about the clone detection procedure itself in addition to the configuration settings are displayed in the clone detection results information view.

10 List of Clones Clone information:  grouped by similarity  source file  starting line number  ending line number Not new, Simian and SimScan plugins also provide similar reporting

11 Visualiser View Bars: Source files Stripes (Kinds): Clones Mouse over:  Length of clone  Other clones in the same clone group

12 Visualiser View Additional Options:  Display all bars containing the same clones as in the selected bar  Display all bars containing the selected clone  Open the file containing the selected clone  Open all files containing clones in the same clone group as the selected clone

13 The Big Picture

14 Case Study Performed on open source applications  JavaGenes, scientific evolutionary software  JHotDraw, a GUI framework Understanding the results  Clone group in the same class (JavaGenes)

15 Case Study Understanding the results (continued)  Ubitiquous clones (JHotDraw), methods that: return a new Rectangle object draw two ovals (including setting their colors) setting the undo and redo flags for the drawing view

16 Future Work A more structured view of the source code files  For OO languages, classes could be displayed in UML-like form. Demarcation of methods in bars representing source files  Displaying the borders of methods in the view can assist in determining which clones are method-level clones. Tighter integration of CloneDR in Eclipse  Simplify and speed up the detection and visualization process. CloneDR

17 Thank you. Questions? Visualization of Clone Detection Results: Clone Detection Literature: SoftCom Laboratory: