cross language clone analysis team 2. team introduction task summary introduction scope of work...

26
Feasibility Study Cross Language Clone Analysis Team 2

Upload: norman-rodgers

Post on 06-Jan-2018

215 views

Category:

Documents


0 download

DESCRIPTION

 Allen Tucker  Patricia Bradford  Greg Rodgers  Brian Bentley  Ashley Chafin

TRANSCRIPT

Page 1: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Feasibility StudyCross Language Clone Analysis

Team 2

Page 2: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

• Team Introduction• Task Summary• Introduction• Scope of Work• Description of Related Research• Identification of User Benefits• Potential Markets• Potential Competition• Human Factors• Project and Development Issues• Intellectual Property• Risk Analysis• Project Scale-Down Factors• Conclusion/Next Steps

Agenda (Needs to be fixed once slides have been set)

Page 3: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Allen Tucker Patricia Bradford Greg Rodgers Brian Bentley Ashley Chafin

Our Team

Page 4: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Our Customers: Dr. Etzkorn and Dr. Kraft Customer Request:

◦ A tool that will abstract programs in C++, C#, Java, and (Python or VB) to the Dagstuhl Middle Metamodel, Microsoft CodeDOM or something similar, and detect cross-language clones.

Areas to Note: ◦ the user interface◦ easy comparisons of clones◦ visualization of clones◦ sub-clones◦ clone detection for large bodies of code

Task Summary

Page 5: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Software Clones: (Definitions from Wikipedia)

◦ Duplicate code: a sequence of source code that occurs more than once, either within a program or across different programs owned or maintained by the same entity.

◦ Clones: sequences of duplicate code.

“Clones are segments of code that are similar according to some definition of similarity.”

—Ira Baxter, 2002

Introduction

Page 6: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Simple Example

Introduction (cont.)

Page 7: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

3 Types of Clones:◦ Type 1: an exact copy without modifications

(except for whitespace and comments).

◦ Type 2: a syntactically identical copy only variable, type, or function identifiers have been

changed.

◦ Type 3: a copy with further modifications statements have been changed, added, or

removed.

Introduction (cont.)

Page 8: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

How clones are created:◦ copy and paste programming

◦ similar functionality, similar code

◦ plagiarism

Introduction (cont.)

Page 9: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

• A few of the problems associated with clones:– Code bulk affects comprehension– Large redundant code sections causes longer comprehension times or

no comprehension at all.

– Purpose masking– Can hide differences between code sections.– Can hide the specific purpose of each code section.

– Update anomalies– A modification to a redundant piece of code must be made for each

duplicate separately. – At best, coding and testing time are multiplied by the number of

duplications. – At worst, some locations may be missed.

Introduction(cont.)

Page 10: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Per our task, in order to find clones across different programming languages, we will have to first convert the code from each language over to a language independent object model.

Some Language Independent Object Models:◦ Dagstuhl Middle Metamodel (DMM)◦ Microsoft CodeDOM

Both of these models provide a language independent object model for representing the structure of source code.

Introduction (cont.)

Page 11: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Detecting clones across multiple programming languages is on the cutting edge of research.

A preliminary version of this was done by Dr. Kraft and his students for C# and VB.◦ They compared the Mono C# parser (written in C#) to the

Mono VB parser (written in VB).◦ Publication:

Nicholas A. Kraft, Brandon W. Bonds, Randy K. Smith: Cross-language Clone Detection. SEKE 2008: 54-59

Related Research

Page 12: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Three Step Process• Step 1 Code Translation

• Step 2 Clone Detection

• Step 3 Visualization

Task Understanding

Source Files Translator Common

Model

Common Model Inspector Detected

Clones

Detected Clones UI Clone

Visualization

Page 13: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Step 1: Code Translation◦ C#, C++, Java, VB (or Python)◦ CodeDOM

Step 2: Clone Detection◦ Leverage current clone detection techniques and

research

Step 3: Clone Visualization◦ Need for an intuitive user interface

Task Understanding (cont.)

Page 14: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

User Benefits Clone detection software suite that identifies, tracks,

and manages software clones

Multi-language support◦ C++, C#, Java and Python

Provides complete coverage for large bodies of code

Configurable for multi-application support◦ stand-alone◦ plug-in◦ backend service

Page 15: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

User Benefits (cont.) Extendible

Provides spatial relationships across varying code bases to help manage clones

Aids developer to help find places in the code that must be changed when the concern changes

Persists clones for easy retrieval

Helps keep software maintainable

Page 16: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Potential Markets Modularity is a key aspect in today’s software world. Divide software into a separation of concerns

◦ Software quality attributes as maintainability, reusability, testability, reliability and correctness.

But not all code is modular. Crosscutting concerns are functionality that is inherently

not modular and is spread throughout many modules◦ Example: logging

Identifying crosscutting concerns is an error-prone and time consuming task◦ Very important need to help maintenance code

Page 17: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Potential Markets (cont.) Could be the perfect tool for large modular code basis

Detect code that is a candidate for modularity

Track and manage crosscuts among all modular components

Could be configured to run with Configuration Management software◦ Continuously scan code base to manage software clones◦ Integrate with build scripts to generate clone reports◦ Integrate with bug tracking software to help identify related bugs

Page 18: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

• Currently no other products that provide our proposed functionality

Market Competition

Page 19: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Designing to meet user needs

◦ User center approach Need for an intuitive user interface Clone Visualization techniques

Human Factors

Page 20: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

The University of Alabama in Huntsville would own and manage any and all intellectual property associated with the research and developmental artifacts of this project.

Intellectual Property

Page 21: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Fast, Good, and Cheap…choose two.◦ Fast…time required

to deliver products◦ Good…quality of

product◦ Cheap…cost of

designing and building

Project and Development Issues

Page 22: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Complexity of problem proves more difficult than initial estimates.

Technology to be applied is neither well-established or has yet to be developed.

Unable to complete defined project scope within schedule.

Volatile user requirements leading to redefinition of project objectives.

Risk Analysis

Page 23: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Our initial approach…maximize existing open sourced developed items in order to reduce project timeline.

◦ Instability in harvested projects.

◦ Lack of support…documentation, forums, etc.

◦ Disjoint projects code bases.

◦ Non-existing code bases to harvest from.

Project Scale-Down Factors

Page 24: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Begin user story development (initial requirements)

Release Planning Starting spikes (C# and VB parsers)

Path Forward

Page 25: Cross Language Clone Analysis Team 2. Team Introduction Task Summary Introduction Scope of Work Description of Related Research Identification of User

Proposed Schedule