Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword.

Slides:



Advertisements
Similar presentations
eClassifier: Tool for Taxonomies
Advertisements

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Identifying Source.
Module 12: Auditing SQL Server Environments
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University On the Effectiveness.
Model Checker In-The-Loop Flavio Lerda, Edmund M. Clarke Computer Science Department Jim Kapinski, Bruce H. Krogh Electrical & Computer Engineering MURI.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extracting Code.
Create Forms Lesson 5. Software Orientation Creating Forms A form is a database object –enter, edit, or display data from a table or query Providing.
MS Access: Database Concepts Instructor: Vicki Weidler.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Where Does This.
Managing Large RDF Graphs (Infinite Graph) Vaibhav Khadilkar Department of Computer Science, The University of Texas at Dallas FEARLESS engineering.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Mining Coding Patterns to Detect Crosscutting Concerns.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University ICSE 2003 Java.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A lightweight.
Computer Science Standard Level Mastery Aspects. Mastery Item Claimed JustificationWhere Listed Arrays Used to store the student data Lines P.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Criterion for.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Investigation.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Mining and Analysis of Control Structure Variant Clones Guo Qiao.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Code-Clone Analysis.
Hipikat: A Project Memory for Software Development The CISC 864 Analysis By Lionel Marks.
Your First Java Application Chapter 2. 2 Program Concepts Modern object-oriented programs help us build models to manage the complexity found in a problem.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
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.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University VerXCombo: An.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Retrieving Similar Code Fragments based on Identifier.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Towards Program.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University July 21, 2008WODA.
Project Deliverables CEN Engineering of Software 2.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Finding Code Clones.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Chapter 10: Introduction to Inheritance. Objectives Learn about the concept of inheritance Extend classes Override superclass methods Call constructors.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
Data and Knowledge Engineering Laboratory Clustered Segment Indexing for Pattern Searching on the Secondary Structure of Protein Sequences Minkoo Seo Sanghyun.
 Programming - the process of creating computer programs.
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Extracting Sequence.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Quick Test Professional 9.2. Testing Process Preparing to Record Recording Enhancing a Test Debugging Running the Test and Analyzing the Results Reporting.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Object-Oriented Design Concepts University of Sunderland.
Software Design and Development Development Methodoligies Computing Science.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Software Ingredients:
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Metric-based Approach for Reconstructing Methods.
Experience Report: System Log Analysis for Anomaly Detection
Naoya Ujihara1, Ali Ouni2, Takashi Ishio1, Katsuro Inoue1
Mining Application-Specific Coding Patterns for Software Maintenance
Your First Java Application
Tatsuya Miyake Takashi Ishio Katsuro Inoue
Module 5: Data Cleaning and Building Reports
Refactoring Support Tool: Cancer
Testing, debugging, and using support libraries
Recommending Verbs for Rename Method using Association Rule Mining
Inheritance and Polymorphism
MECH 3550 : Simulation & Visualization
Presentation transcript:

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword Search Tool Enhanced with Semantic Property Extraction Takashi Ishio grep Osaka University 1 A tool for developers who do not (cannot?) modularize concerns

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Research Background Code Clones: similar source code fragments created in a program –Reused functions/algorithms/idioms –Implementation of crosscutting concerns copy-and-modify bug 2

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A bug-fix process for code clones 1.A bug is reported by a user. 2.Developers identify the cause of the bug. 3.They inspect source code to find the same problem in other locations. Similar code fragments exist if modularization is not perfect. 4.They fix the bug and run a regression test. 5.They report the bug fix to the user. 3

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University How to find the same problem 1.A developer picks up keywords from the code fragment including the bug. 2.The developer executes grep with the search keywords. 3.The developer inspects all keyword occurrence and creates a list of “to-be-fixed” or “not-fix” for each occurrence. 4.The list is reviewed by another developer. 4

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Why developers prefer grep 100% recall with low precision A quantitative metric to ensure accountability. A recurrent bug makes users anger. What if users find a similar problem immediately after developers reported a bug fix …? There is no perfect system. 5

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Towards Efficient Inspection Developers’ requirement: 100% Recall (if keywords are correct) –Don’t exclude any code fragments Clustering the result of grep –Enable developers to inspect a group of similar code fragments at once Target: Java langauge 6

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: When JEdit sounds beep? 1.A user tried to edit a read-only text. (34 methods) 2.A user tried to move a caret but failed. (22 methods) Case 1 (class JEditBuffer) public void undo(…) { if(undoMgr == null) return; if(!isEditable()) { textArea.getToolkit().beep(); return; } … // undo the previous action } Case 2 (class TextPane) public void goToNextMarker(…) { java.util.List markers = … if(markers.isEmpty()) { getToolkit().beep(); return; } Marker marker = … textArea.moveCaretPosition( marker.getPosition()); … } Can we find these groups (semi-)automatically? 7

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University “Similarity” of code fragments Similar code fragments have common “properties”. –Behavioral Properties The code fragments call the same method. –Variation: Exactly same, same signature, same name The code fragments directly access the same field. –Structural Properties The code fragments are involved in the same class. The code fragments override the same method. 8

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Property Extraction Process We define each property as a predicate: P(m: method) => boolean The result of grep Select Java methods including the keywords B1(m) = m calls “isEditable”. B2(m) = m calls “moveCaretPosition”. B3(m) = … … S1(m) = m is defined in class “JEdit”. S2(m) = m have the name “set*”. S3(m) = … … Evaluate the properties 9

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Method-Property Table Methods found by grep (93 methods) Call beep (85 methods) Call isEditable (34 methods) Call moveCaretPosition (21 methods) Accesses undoMgr field (2 methods) JEditBuffer.undoXXX EditPane. goToNextMarker XX EditPane. goToPrevMarker XX Abbrevs. expandAbbrev XX Ananlyzed JEdit source code with a keyword “beep” 10

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Formal Concept Analysis FCA extracts all concepts (clusters). –Non-exclusive clustering A concept is a pair [M, P] –Every method in M satisfies all properties in P. –Any other method cannot satisfy at least one of the properties P. P1P2P3P4 M1XXXX M2XXXX M3XXXX 11

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Interactive analysis using FCA A limitation of FCA is the number of concepts (clusters). –too many concepts to show Interactive Analysis –Two basic tools: Find common properties among selected methods Find methods satisfying selected properties … instead of direct visualization of concepts 12

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Tool Demonstration Example Target: JEdit, a text editor –Anallyze when JEdit calls beep method. Command line arguments: java -cp jedit-bin Main jedit-source beep Analysis excludes JDK methods except for “beep” method. [Bytecode of JEdit] [Source] [grep keyword] 13

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University The Main Window: Method-Property Table A column corresponds to a property Each row corresponds to a Java method including a keyword The method of the row satisfies the property of the column The detail of a column is shown as a tool-tip Sorted by #methods satisfying the property 14

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Filters A right-click enables a filter. Now the window shows only the methods calling “isEditable”. An envelope icon indicates a method whose source code is not investigated yet. 15

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Excluding Inspected Methods This filter hides methods that satisfy the property. 16

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University After the first property is inspected, choose another property to inspect. Properties can be sorted by #methods satisfying each property. 17

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Is it effective? In the case of beep method of JEdit, 52 of 93 methods are covered by “isEditable” and “moveCaretPosition” methods. 18

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Conclusion and Future Work Our tool extracts common properties among code fragments. –Efficient code inspection with grep Future Work –Case study of the tool with an industrial team –Advanced aspect mining: extract “why” the code fragments are not modularized Is there any special properties? 19