Naoya Ujihara1, Ali Ouni2, Takashi Ishio1, Katsuro Inoue1

Slides:



Advertisements
Similar presentations
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Identifying Source.
Advertisements

Ranking Refactoring Suggestions based on Historical Volatility Nikolaos Tsantalis Alexander Chatzigeorgiou University of Macedonia Thessaloniki, Greece.
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
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.
Architecture Eclipse Framework with Plugin Concept JTransformer Plugin Analysis + Transformation interface: logical Program.language keeps representation.
Investigating the Evolution of Bad Smells in Object-Oriented Code Alexander Chatzigeorgiou Anastasios Manakos University of Macedonia Thessaloniki, Greece.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Measuring Copying.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Industrial Application.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University ICSE 2003 Java.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Finding Similar.
2006/09/19AOAsia 21 Towards Locating a Functional Concern Based on a Program Slicing Technique Takashi Ishio 1,2, Ryusuke Niitani 2 and Katsuro Inoue 2.
Lecture Notes - Copyright © S. C. Kothari, All rights reserved.1 Summary Lecture CPRE 416-Software Evolution and Maintenance-Lecture 6.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of.
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 A Multi-Objective.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Method to Detect License Inconsistencies for Large-
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Applying Clone.
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.
Debug Concern Navigator Masaru Shiozuka(Kyushu Institute of Technology, Japan) Naoyasu Ubayashi(Kyushu University, Japan) Yasutaka Kamei(Kyushu University,
Refactoring1 Improving the structure of existing code.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University VerXCombo: An.
Recovering Design Technical Debt from Source Code Comments Department of Computer Science and Software Engineering Concordia University Montreal, Canada.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Retrieving Similar Code Fragments based on Identifier.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University 1 Towards an Assessment of the Quality of Refactoring.
Refactoring. Refactoring Overview  What is refactoring?  What are four good reasons to refactor?  When should you refactor?  What is a bad smell (relative.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University July 21, 2008WODA.
Copyright © 2015 NTT DATA Corporation Kazuo Kobori, NTT DATA Corporation Makoto Matsushita, Osaka University Katsuro Inoue, Osaka University SANER2015.
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.
Chapter 5: Software Re-Engineering Omar Meqdadi SE 3860 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Software Tag:
Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Classification.
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.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Recommending Adaptive Changes for Framework Evolution Barthélémy Dagenais and Martin P. Robillard ICSE08 Dec 4 th, 2008 Presented by EJ Park.
On Experimenting refactoring tools to remove code smells Xp 2015 workshop.
Static Analysis Introduction Emerson Murphy-Hill.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Detection of License Inconsistencies in Free and.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Metric-based Approach for Reconstructing Methods.
Search-Based Peer Reviewers Recommendation in Modern Code Review 32 nd IEEE International Conference on Software Maintenance and Evolution (ICSME) 2016.
Continuous Testing in Eclipse
CS230 Tutorial Week 4.
Why We Refactor? Confessions of GitHub Contributors
David Shepherd, Zachary P. Fry, Emily Hill, Lori Pollock, and K
Do Developers Focus on Severe Code Smells?
Yuta Nakamura1, Eunjong Choi1, Norihiro Yoshida2,
Boris Todorov1, Raula Gaikovina Kula2, Takashi Ishio2, Katsuro Inoue1
Software Refactoring Group
Tatsuya Miyake Takashi Ishio Katsuro Inoue
Visualizing the Evolution of Systems and their Library Dependencies
Mock Object Creation for Test Factoring
Predicting Fault-Prone Modules Based on Metrics Transitions
Refactoring Support Tool: Cancer
Quaid-i-Azam University
X10 Future Plans & Discussion
Recommending Verbs for Rename Method using Association Rule Mining
On Refactoring Support Based on Code Clone Dependency Relation
Dotri Quoc†, Kazuo Kobori†, Norihiro Yoshida
MAPO: Mining and Recommending API Usage Patterns
Recommending Adaptive Changes for Framework Evolution
SeeSoft A Visualization Tool..
PADLA: A Dynamic Log Level Adapter Using Online Phase Detection
Near-Omniscient Debugging for Java Using Size-Limited Execution Trace
Presentation transcript:

c-JRefRec: Change-Based Identification of Move Method refactoring Opportunities Naoya Ujihara1, Ali Ouni2, Takashi Ishio1, Katsuro Inoue1 1Osaka University, Japan 2United Arab Emirates University, UAE

Background: Refactoring Move method refactoring class1 class2 class1 class2 method1 method2 method2 method1 It is easy to understand and change the methods

Existing refactoring recommendation tools Existing refactoring tools recommend ‘global’ refactoring solutions Inspecting a resultant list is time-consuming and error-prone Candidates irrelevant to a change task are not useful

The proposed approach c-JRefRec: change task based Java Refactoring Recommendation An eclipse plug-in analyzes source code changes recommends refactoring for files related to changes Modified Java Files

Static analysis Source code : method : field We Extract method calls and field accesses from the source code and generate a dependency graph.

Class State View Each line shows the numbers of methods, edges, client classes, and dependent classes.

Class State View The current task added 6 methods 26 edges #clients #dependents org.jfree.chart.axis.Axis 71(+6) 452(+26) 32(0) 8(+1) The current task added 6 methods 26 edges 1 dependent class to org.jfree.chart.axis.Axis class. The number of client classes is not changed.

Move Method Refactoring Candidates View Each line shows a refactoring candidate and its effect to modularity metrics.

Move Method Refactoring Candidates View Source Method Target Class Δedges (source class) Δclients (source class) Δdependents (source class) org.jfree.chart.axis.Axis#labelAnchorH() org.jfree.chart.axis.AxisLabelLocation -2 +0 Δedges (target class) Δclients (target class) Δdependents (target class Semantic Similarity (source class) Semantic Similarity (target class) -2 16.6% 61.8% This refactoring removes 2 edges from the source class and the target class. The content of the method is similar to the target class.

Demo scenario A change task for JFreeChart A class org.jfree.chart.axis.AxisLabelLocation is created. The new class has 5 fields and 5 methods. An existing class org.jfree.chart.axis.Axis is modified. 1 field and 6 methods are added. 2 methods are modified.

Demonstration

Demonstration

Demonstration

Demonstration

Experiment Target systems: JUnit, JFreeChart and JMeter We manually injected Feature Envy instances and used our tool and JDeodorant to remove them. Precision Recall c-JRefRec 0.48 0.73 JDeodorant 0.38 0.25 Detect Feature Envy Precision Recall c-JRefRec 0.42 0.68 JDedotrant 0.38 0.25 Identify move method refactoring

Summary We proposed a move method refactoring recommendation tool based on a change task. http://sel.ist.osaka-u.ac.jp/people/naoya-u/c-JRefRec/ Empirical evaluation on 3 open source projects Precision 0.42 Recall 0.68 Future work Conduct an empirical study in real world scenarios and get more feedback Extend our tool to support more code smell and refactoring operations

たくさんの候補

Why did our tool get better results than existing methods In some case, JDeodorant recommended no move method refactoring candidates for the classes related to the change task. (In many case, our tool recommended some move method refactoring candidates for the method.) I haven't researched it is good or bad for developers yet.

What is the difference with the existing method Our tool supports refactoring activity during a software change task by showing structural metrics of classes related to the task and recommending only local move method refactoring candidates.

How much candidate is recommended It depends on the number of files to be modified. At each commit, 3 to 22 candidates were recommended in our experiment.