1 / 153

Presentation 7

Presentation 7. Cross Language Clone Analysis Team 2 November 22, 2010. Agenda. Feasibility Study Release Plan Architecture Parsing CodeDOM Clone Analysis Testing Demonstration Team Collaboration Path Forward. Our Team. Allen Tucker Patricia Bradford Greg Rodgers Brian Bentley

Télécharger la présentation

Presentation 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Presentation 7 Cross Language Clone Analysis Team 2 November 22, 2010

  2. Agenda • Feasibility Study • Release Plan • Architecture • Parsing • CodeDOM • Clone Analysis • Testing • Demonstration • Team Collaboration • Path Forward

  3. Our Team • Allen Tucker • Patricia Bradford • Greg Rodgers • Brian Bentley • Ashley Chafin

  4. Feasibility Study Our evaluation of the project to determine the difficulty in carrying out the task.

  5. Task Summary • 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

  6. Task Summary (cont.) • 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.

  7. Related Research • 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

  8. Task Understanding • Three Step Process • Step 1 Code Translation • Step 2 Clone Detection • Step 3 Visualization Common Model Translator Source Files Detected Clones Inspector Common Model Clone Visualization UI Detected Clones

  9. Task Understanding (cont.) • 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

  10. Clone Detection as a Product • Commercial Product • What are the benefits of Software Clone Detection? • Main Goal: Decrease Coding Errors (bugs)

  11. Benefits • Fact: Modularity is a key characteristic in today’s software world • Why? Allows us to divide software into a decomposed separation of concerns • Attributes to maintainability, reusability, testability and reliability • Clone Detection allows us to detect common software spread across large bodies of code • Identify code that is subject to further modularity

  12. Benefits (cont) • But not all code can be cleanly decomposed • Crosscutting Concerns • Responsible for tangling and scattering (code duplication) an implementation • Logging • Scattered across Unrelated Functions • How do you Manage large areas of (usually) Duplicated Crosscuts? • Errors, Changes

  13. Benefits (cont) • Aspect Oriented Programming • Modularize Crosscuts using Advice and Join Points • Example: Spring Framework • Identifying Aspects (crosscuts) • Time Consuming task • Use Clone Detection to Identify Aspects • Define Rule

  14. Benefits (cont) • Summarize • What? • Detect code that is a candidate for modularity • Identify Crosscuts in modules • Am I a candidate for ASP? • How? • Continuous Integration • Generate Reports every time new code is added

  15. Features • Clone Detection Software Suite • Identifies • Tracks • Manages Software Clones • Multi-language support • C++ • C# • Java

  16. Features (cont) • Provides complete code coverage • Multi-Application Support • Stand-alone • Plug-in based (Eclipse) • Backend service (Ant task)

  17. Features (cont) • Extendible • Built on a Plug-in Framework • Add new languages • Easy to Navigate between Clones • Persists Clones for easy Retrieval

  18. Human Factors • Designing to meet user needs • User center approach • Need for an intuitive user interface • Clone Visualization techniques

  19. Intellectual Property 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.

  20. Project and Development Issues • Fast, Good, and Cheap…choose two. • Fast…time required to deliver products • Good…quality of product • Cheap…cost of designing and building

  21. Risk Analysis • 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.

  22. Project Scale-Down Factors • 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.

  23. Release Plan Release Plan and User Stories

  24. User Story Approach • User Stories Applied…Mike Cohn suggested formal approach • As a (role) I want (something) so that (benefit). • Quality Attributes • Independent • Negotiable • Valuable to user or customers • Estimatable • Small • Testable

  25. Re-tooled User Stories • Came out with original Release Plan on 9/15/20 • Due to customer wants/needs, we had to re-tool our user stories. • Dr. Etzkorn’s main concerns: • Load source code and translate to a language independent model • Analyze the translated source code for clones • Results from meeting: • Created two new user stories (see next two slides) • These two user stories have been pushed to the front of our card stack

  26. Analysis

  27. CS 666 Studio I User Stories Phase I

  28. Summary • ~ 68 remaining development days • Focus on top 3 user stories • Focus on Translation and Analysis

  29. Source Code Load & Translate 017 1 14 Days As an analyst I want the to load and translate my source code projectsso I can analyze the source for clones.

  30. Source Code Analyze 018 1 14 Days As an analyst I want the to analyze my source code projectsso I can see the clones.

  31. Code Clone Highlights 002 1 14 Days As a analyst I want the capability to have the source code associated with clones highlighted within source files so that they are easy to identify.

  32. CS 668 Software Studio II Phase II

  33. Summary • ~ 80 development days • Focus on next 5 user stories • Focus on analysis capabilities

  34. Auto-Navigate 013 2 7 Days As a developer I want the capability to auto-browse to the code segment associated with a clone so I do not have to manually search for it.

  35. Visual Reports 003 1 21 Days As a analyst I want the capability to generate reports on clones within projects in a number of formats (e.g. html, cvs, etc.)so that I can include them in presentations.

  36. Clone Density Graph 014 1 21 Days As an analyst I want the capability to have a projects clone density reported in a graph form so I can visually see the distribution of detected clones within a project.

  37. Project Management 001 10 5 Days As a analyst I want the capability to load and manage multiple projectswithin the application so that I can perform analysis on them at various times without having to reload them.

  38. Analysis Options 005 3 20 Days As a analyst I want the capability to view summary analysis data (e.g. clones per file, package, projects, etc.) so that I can identify the distribution of clones within a project.

  39. Follow-On Work Future Capabilities

  40. Project Language Auto-Detection 010 8 14 Days As an analyst I want the capability to have the language of a source code project auto-detected so I do not have to define it.

  41. Clone Categorization 008 5 14 Days As an analyst I want the capability to have the detected clones categorized by a number of criteria (e.g. type, priority, etc.) so that work prioritization can be established.

  42. False Positive Identification 004 7 14 Days As a analyst I want the capability to label a prospective clone as a false positive so that it will be ignored in analysis and reports.

  43. Development Environment Integration 007 4 30 Days As a developer I want the capability to integrate the clone detection tool directly into my development environment (e.g. eclipse, netbeans, visual studio, etc.) so that I have a single application with all development tools integrated.

  44. Project History 012 6 21 Days As an analyst I want the capability to see project change history (e.g. initial project, xx clones found, clone id yyy removed, project updated, xx new clones found, etc.) so I can assess the impact of code changes within a project.

  45. Detection Updates 011 9 21 Days As an analyst I want the capability to update a projects associated source code and the tool to detect these changes and offer a detection re-do so I can make corrections to clones and see resolutions in action.

  46. Interactive Help 015 10 21 Days As a general user I want an interactive help system with context sensitive search so I can learn the system with ease.

  47. Build Environment Integration 006 10 30 Days As a configuration manager I want the capability to integrate clone detection into an automated build environment (e.g. ant, nmake, msbuild, etc.) so that I can view reports on a code projects as they are built.

  48. Dropped User Stories Cut By Customer

  49. Source Code Association 009 11 5 Days As an analyst I want the capability to retain or not to retain the associated source code with a project so I can reduce my project size footprint. Customer priority of 11 (Normal range is 1 – 10)…indicated would cut from scope.

  50. Current Tasks Requirements & Models

More Related