StarCharter: A Tool for Mining Concept Recipes

Similar documents
Mining framework concepts from application code

Recitation 02/02/07 Defining Classes and Methods. Chapter 4

Chapter 13. Applets and HTML. HTML Applets. Chapter 13 Java: an Introduction to Computer Science & Programming - Walter Savitch 1

Defining Classes and Methods

Introduction. Introduction

Java Swing Introduction

An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a

Java Swing. Lists Trees Tables Styled Text Components Progress Indicators Component Organizers

When Modeling meets Productivity. Sven Efftinge - itemis

Class 16: The Swing Event Model

CSC 1214: Object-Oriented Programming

Original GUIs. IntroGUI 1

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing

Agenda. Container and Component

CS 251 Intermediate Programming GUIs: Components and Layout

TABLE OF CONTENTS CHAPTER NO. TITLE PAGENO. LIST OF TABLES LIST OF FIGURES LIST OF ABRIVATION

Introduction to Computation and Problem Solving

1. What is Jav a? simple

Graphical User Interfaces in Java

MIT AITI Swing Event Model Lecture 17

The first applet we shall build will ask the user how many times the die is to be tossed. The request is made by utilizing a JoptionPane input form:

Introduction to the JAVA UI classes Advanced HCI IAT351

Command-Line Applications. GUI Libraries GUI-related classes are defined primarily in the java.awt and the javax.swing packages.

Lab 4. D0010E Object-Oriented Programming and Design. Today s lecture. GUI programming in

Lecture 7: Relevance Feedback and Query Expansion

17 GUI API: Container 18 Hello world with a GUI 19 GUI API: JLabel 20 GUI API: Container: add() 21 Hello world with a GUI 22 GUI API: JFrame: setdefau

GUI and its COmponent Textfield, Button & Label. By Iqtidar Ali

FrUiT: IDE Support for Framework Understanding

ImgSeek: Capturing User s Intent For Internet Image Search

Graphical User Interface (GUI)

Class 14: Introduction to the Swing Toolkit

Control Flow: Overview CSE3461. An Example of Sequential Control. Control Flow: Revisited. Control Flow Paradigms: Reacting to the User

Visual Data Mining. Overview. Apr. 24, 2007 Visual Analytics presentation Julia Nam

Graphic Interface Programming II Using Swing and OOP more advanced issues. Uppsala universitet

Swing Programming Example Number 2

11/6/15. Objec&ves. RouleQe. Assign 8: Understanding Code. Assign 8: Bug. Assignment 8 Ques&ons? PROGRAMMING PARADIGMS

Using NetBeans IDE for Desktop Development. Geertjan Wielenga

Feature Location via Information Retrieval based Filtering of a Single Scenario Execution Trace

Object-Oriented Programming: Revision. Revision / Graphics / Subversion. Ewan Klein. Inf1 :: 2008/09

Using Information Retrieval to Support Software Evolution

Basic Keywords Practice Session

Magento Technical Guidelines

EDA 2015 Bruxelles 2 3 avril 2015

Lab #1: A Quick Introduction to the Eclipse IDE

Effective Latent Space Graph-based Re-ranking Model with Global Consistency

Customer Clustering using RFM analysis

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Slides From Lecture Notes for Chapter 8. Introduction to Data Mining

EFFECTIVE EFFICIENT BOOLEAN RETRIEVAL

Extract Slice Refactoring. Rani Ettinger, Programming Tools Group, May 19th, 2003

MSBI Online Training (SSIS & SSRS & SSAS)

+! Today. Lecture 3: ArrayList & Standard Java Graphics 1/26/14! n Reading. n Objectives. n Reminders. n Standard Java Graphics (on course webpage)

CHAKRA IT SOLUTIONS TO LEARN ABOUT OUR UNIQUE TRAINING PROCESS:

You will not be tested on JUnit or the Eclipse debugger. The exam does not cover interfaces.

Quality Assurance User Interface Modeling

Graphics programming. COM6516 Object Oriented Programming and Design Adam Funk (originally Kirill Bogdanov & Mark Stevenson)

H212 Introduction to Software Systems Honors

MSBI (SSIS, SSRS, SSAS) Course Content

Pen Tool, Fill Layers, Color Range, Levels Adjustments, Magic Wand tool, and shadowing techniques

Navigating Large Source Files Using a Fisheye View

Implementing and Maintaining Microsoft SQL Server 2008 Analysis Services

CS 106A, Lecture 24 Interactors and NameSurfer

After completing this course, participants will be able to:

Semantic Web. Ontology Engineering and Evaluation. Morteza Amini. Sharif University of Technology Fall 93-94

UNIT -1 UNIT -II. Q. 4 Why is entity-relationship modeling technique not suitable for the data warehouse? How is dimensional modeling different?

10778A: Implementing Data Models and Reports with Microsoft SQL Server 2012

Sketchpad. Plan for Today. Class 22: Graphical User Interfaces IBM 705 (1954) Computer as Clerk : Augmenting Human Intellect

Graphic User Interfaces. - GUI concepts - Swing - AWT

XPath. Asst. Prof. Dr. Kanda Runapongsa Saikaew Dept. of Computer Engineering Khon Kaen University

JFrame & JLabel. By Iqtidar Ali

Interfaces & Polymorphism part 2: Collections, Comparators, and More fun with Java graphics

Automatically Generating Refactorings to Suppport API Evolution

Improving the Performance of Search Engine With Respect To Content Mining Kr.Jansi, L.Radha

Clustering. Bruno Martins. 1 st Semester 2012/2013

Graphical User Interface (GUI)

Multiple Dimensional Visualization

TTTK Program Design and Problem Solving Tutorial 3 (GUI & Event Handlings)

Interactive PMCube Explorer

Visualization and text mining of patent and non-patent data

1.00 Lecture 14. Lecture Preview

WP6: The European Raw Materials Intelligence Capacity Platform (EU-RMICP)

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Dr. Sushil Garg Professor, Dept. of Computer Science & Applications, College City, India

Simplifying your upgrade and consolidation to BW/4HANA. Pravin Gupta (Teklink International Inc.) Bhanu Gupta (Molex LLC)

JAVA NOTES GRAPHICAL USER INTERFACES

Introduction p. 1 What is the World Wide Web? p. 1 A Brief History of the Web and the Internet p. 2 Web Data Mining p. 4 What is Data Mining? p.

Java Applets This is not a Java course! (You re supposed to know about Java.)

Sql Fact Constellation Schema In Data Warehouse With Example

6234A - Implementing and Maintaining Microsoft SQL Server 2008 Analysis Services

Process Monitoring using Three Dimensional Computed Tomography and Automatic Image Processing

CS 343: Artificial Intelligence

Window Interfaces Using Swing Objects

Unit 6: Graphical User Interface

Handout 14 Graphical User Interface (GUI) with Swing, Event Handling

6232B: Implementing a Microsoft SQL Server 2008 R2 Database

Everyday Activity. Course Content. Objectives of Lecture 13 Search Engine

Swing. By Iqtidar Ali

WA1278 Introduction to Java Using Eclipse

Teaching London Computing

Methods (Deitel chapter 6)

Mining Crosscutting Concerns through Random Walks

Transcription:

StarCharter: A Tool for Mining Concept Recipes Steven She ECE750-T05: Static Analysis for Software Engineering November 28 st, 2008 Steven She StarCharter:A Tool for Mining Concept Recipes 1/22

Outline 1 Introduction 2 Concept Slicing 3 Data Mining 4 Walkthrough 5 Conclusions Steven She StarCharter:A Tool for Mining Concept Recipes 2/22

What is StarCharter? Makes a recipe describing framework usage using examples Steven She StarCharter:A Tool for Mining Concept Recipes 3/22

What is StarCharter? Makes a recipe describing framework usage using examples Steven She StarCharter:A Tool for Mining Concept Recipes 3/22

What is StarCharter? Makes a recipe describing framework usage using examples Steven She StarCharter:A Tool for Mining Concept Recipes 3/22

What sets StarCharter apart? Constructs a single recipe Recipe is a probabilistic model Used for tool support or framework modeling Address usage of white-box frameworks Steven She StarCharter:A Tool for Mining Concept Recipes 4/22

Overview Query Provide hints for finding concept events Concept Slicing Find related events Data Mining Find usage patterns among multiple examples Recipe Output a single probabilistic model describing usage Steven She StarCharter:A Tool for Mining Concept Recipes 5/22

Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code Steven She StarCharter:A Tool for Mining Concept Recipes 6/22

Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code Concept Slicer with Query Steven She StarCharter:A Tool for Mining Concept Recipes 6/22

Concept Slicing Reduce an example to a minimal set of statements that retains the specified behaviour Source code Concept Slicer with Query Relevant Events Steven She StarCharter:A Tool for Mining Concept Recipes 6/22

Forward Slice 1 public class HelloWorld extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 Image smiley; 5 6 public HelloWorld() { 7 smiley = getimage(getcodebase(), "images/smilegif"); 8 Container contentpane = getcontentpane(); 9 JLabel hwlabel = new JLabel(HELLO_WORLD); 10 contentpaneadd(hwlabel); 11 play(getcodebase(), "audio/woohoowav"); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 7/22

Forward Slice 1 public class HelloWorld extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 Image smiley; 5 6 public HelloWorld() { 7 smiley = getimage(getcodebase(), "images/smilegif"); 8 Container contentpane = getcontentpane(); 9 JLabel hwlabel = new JLabel(HELLO_WORLD); 10 contentpaneadd(hwlabel); 11 play(getcodebase(), "audio/woohoowav"); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 7/22

Backward Slice 1 public class HelloWorld extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 Image smiley; 5 6 public HelloWorld() { 7 smiley = getimage(getcodebase(), "images/smilegif"); 8 Container contentpane = getcontentpane(); 9 JLabel hwlabel = new JLabel(HELLO_WORLD); 10 contentpaneadd(hwlabel); 11 play(getcodebase(), "audio/woohoowav"); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 7/22

Backward Slice 1 public class HelloWorld extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 Image smiley; 5 6 public HelloWorld() { 7 smiley = getimage(getcodebase(), "images/smilegif"); 8 Container contentpane = getcontentpane(); 9 JLabel hwlabel = new JLabel(HELLO_WORLD); 10 contentpaneadd(hwlabel); 11 play(getcodebase(), "audio/woohoowav"); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 7/22

Unrelated Statements 1 public class HelloWorld extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 Image smiley; 5 6 public HelloWorld() { 7 smiley = getimage(getcodebase(), "images/smilegif"); 8 Container contentpane = getcontentpane(); 9 JLabel hwlabel = new JLabel(HELLO_WORLD); 10 contentpaneadd(hwlabel); 11 play(getcodebase(), "audio/woohoowav"); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 7/22

Framework Slicing Framework: javaxswing* 1 public class HelloWorldPresentation extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 5 public HelloWorldPresentation() { 6 Container contentpane = getcontentpane(); 7 JLabel hwlabel = new JLabel(HELLO_WORLD); 8 StringBuilder builder = new StringBuilder(HELLO_WORLD); 9 Formatter fmt = new Formatter(builder); 10 fmtformat("%s %s", HELLO_WORLD, HELLO_WORLD); 11 contentpaneadd(hwlabel); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 8/22

Framework Slicing Framework: javaxswing* 1 public class HelloWorldPresentation extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 5 public HelloWorldPresentation() { 6 Container contentpane = getcontentpane(); 7 JLabel hwlabel = new JLabel(HELLO_WORLD); 8 StringBuilder builder = new StringBuilder(HELLO_WORLD); 9 Formatter fmt = new Formatter(builder); 10 fmtformat("%s %s", HELLO_WORLD, HELLO_WORLD); 11 contentpaneadd(hwlabel); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 8/22

Framework Slicing Framework: javaxswing* 1 public class HelloWorldPresentation extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 5 public HelloWorldPresentation() { 6 Container contentpane = getcontentpane(); 7 JLabel hwlabel = new JLabel(HELLO_WORLD); 8 StringBuilder builder = new StringBuilder(HELLO_WORLD); 9 Formatter fmt = new Formatter(builder); 10 fmtformat("%s %s", HELLO_WORLD, HELLO_WORLD); 11 contentpaneadd(hwlabel); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 8/22

Framework Slicing Framework: javaxswing* 1 public class HelloWorldPresentation extends JApplet { 2 3 public static final String HELLO_WORLD = "Hello World!"; 4 5 public HelloWorldPresentation() { 6 Container contentpane = getcontentpane(); 7 JLabel hwlabel = new JLabel(HELLO_WORLD); 8 StringBuilder builder = new StringBuilder(HELLO_WORLD); 9 Formatter fmt = new Formatter(builder); 10 fmtformat("%s %s", HELLO_WORLD, HELLO_WORLD); 11 contentpaneadd(hwlabel); 12 } 13 } Steven She StarCharter:A Tool for Mining Concept Recipes 8/22

Sliced Events Example Location Event HelloWorld constructor add(component) HelloWorld constructor new JLabel(String) HelloWorld constructor getcontentpane() Store both the event and its location Steven She StarCharter:A Tool for Mining Concept Recipes 9/22

Concept Slicing Source code Concept Slicer with Query Relevant Events Steven She StarCharter:A Tool for Mining Concept Recipes 10/22

Creating the Recipe Events 1 Events 2 Events 3 Events 4 Sliced Events Steven She StarCharter:A Tool for Mining Concept Recipes 11/22

Creating the Recipe Events 1 Events 2 Events 3 Events 4 Sliced Events Data Miner Steven She StarCharter:A Tool for Mining Concept Recipes 11/22

Creating the Recipe Events 1 Events 2 Events 3 Events 4 Sliced Events Data Miner Recipe Steven She StarCharter:A Tool for Mining Concept Recipes 11/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Association Rule conf calls:getcontentpane() calls:add(component) 50% Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Association Rule conf calls:getcontentpane() calls:add(component) 50% new:label calls:add(component) 100% Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Association Rule conf calls:getcontentpane() calls:add(component) 50% new:label calls:add(component) 100% Hello World paint constructor 100% Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Association Rule conf calls:getcontentpane() calls:add(component) 50% new:label calls:add(component) 100% Hello World paint constructor 100% Hello World constructor 67% Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Feature Model Mining Mine for probabilistic expressions called Association Rules Association Rule conf calls:getcontentpane() calls:add(component) 50% new:label calls:add(component) 100% Hello World paint constructor 100% Hello World constructor 67% paint constructor 100% Steven She StarCharter:A Tool for Mining Concept Recipes 12/22

Mined Recipe Steven She StarCharter:A Tool for Mining Concept Recipes 13/22

Step 1: Input Query User stars a line of code in a framework application Extension: Possible to star several statements Steven She StarCharter:A Tool for Mining Concept Recipes 14/22

Step 1: Input Query User stars a line of code in a framework application Extension: Possible to star several statements Steven She StarCharter:A Tool for Mining Concept Recipes 14/22

Step 2: Find Related Usages Search the project for other instances of the starred code Scope currently restricted to a single class Use the Eclipse JDT SearchEngine Steven She StarCharter:A Tool for Mining Concept Recipes 15/22

Step 2: Find Related Usages Calls: References to calls of the same name class A { Formatter x = ; xformat(" ", x, y, z); } class B { Formatter y = ; yformat("hello %s!", x); } Steven She StarCharter:A Tool for Mining Concept Recipes 16/22

Step 2: Find Related Usages Variables: Assigned the same type or literal class A { JLabel label = new JLabel("Hello World!"); } class B { JLabel label = new JLabel("Test", LEFT); } Steven She StarCharter:A Tool for Mining Concept Recipes 17/22

Step 3: Slice Related Expression Input to Slicer: expression, class Construct a dependency graph for each class Nodes are expressions Edges are data dependence and control dependence Reachability determines slice example Steven She StarCharter:A Tool for Mining Concept Recipes 18/22

Step 3: Slice Related Expression Input to Slicer: expression, class Construct a dependency graph for each class Nodes are expressions Edges are data dependence and control dependence Reachability determines slice example Steven She StarCharter:A Tool for Mining Concept Recipes 18/22

Step 4: Data Mining One Slice is One Configuration Each expression in slice is a feature Expressions in the slice are unordered Also mine on structural properties Steven She StarCharter:A Tool for Mining Concept Recipes 19/22

Uses for the Tool 1 An enhanced search for references in Eclipse Ranks usages by comparing a related usage with the recipe Similar to PARSEWeb's clustering 2 The recipe is a model The recipe can be used for modelling FSMLs 3 Recipe as an expert system Using Herman's tool, it can act like FrUiT Steven She StarCharter:A Tool for Mining Concept Recipes 20/22

Uses for the Tool 1 An enhanced search for references in Eclipse Ranks usages by comparing a related usage with the recipe Similar to PARSEWeb's clustering 2 The recipe is a model The recipe can be used for modelling FSMLs 3 Recipe as an expert system Using Herman's tool, it can act like FrUiT Steven She StarCharter:A Tool for Mining Concept Recipes 20/22

Uses for the Tool 1 An enhanced search for references in Eclipse Ranks usages by comparing a related usage with the recipe Similar to PARSEWeb's clustering 2 The recipe is a model The recipe can be used for modelling FSMLs 3 Recipe as an expert system Using Herman's tool, it can act like FrUiT Steven She StarCharter:A Tool for Mining Concept Recipes 20/22

Conclusions Query Concept Slicing Data Mining Recipe Constructs a recipe from a set of examples Slicing finds related statements given a query Data mining merges sliced events from each example into a recipe Steven She StarCharter:A Tool for Mining Concept Recipes 21/22

Future Work Adding control dependence Fuzzy matching for literals Semantics for queries When is concept slicing useful? Steven She StarCharter:A Tool for Mining Concept Recipes 22/22