Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of.

Slides:



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

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of.
Min Zhang School of Computer Science University of Hertfordshire
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extracting Code.
A Tool Support to Merge Similar Methods with a Cohesion Metric COB ○ Masakazu Ioka 1, Norihiro Yoshida 2, Tomoo Masai 1,Yoshiki Higo 1, Katsuro Inoue 1.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Prototype of.
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 Cross-application.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
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.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A lightweight.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Advanced Programing practices
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.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A clone detection approach for a collection of similar.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Do Practitioners.
1 PARSEWeb: A Programmer Assistant for Reusing Open Source Code on the Web Suresh Thummalapenta and Tao Xie Department of Computer Science North Carolina.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Multi-Objective.
Sadegh Aliakbary Sharif University of Technology Spring 2012.
Mining and Analysis of Control Structure Variant Clones Guo Qiao.
Refactoring Improving the structure of existing code Refactoring1.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Detection and evolution analysis of code clones for.
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.
Refactoring1 Refactoring DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY February 6, 2009.
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.
MARTIN P. ROBILLARD, McGill University, Canada ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 17, no. 4, August 2008 Presented.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Development of.
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.
1 CSC/ECE 517 Fall 2010 Lec. 3 Overview of Eclipse Lectures Lecture 2 “Lecture 0” Lecture 3 1.Overview 2.Installing and Running 3.Building and Running.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University 1 Towards an Investigation of Opportunities for Refactoring.
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.
Exploiting Code Search Engines to Improve Programmer Productivity and Quality Suresh Thummalapenta Advisor: Dr. Tao Xie Department of Computer Science.
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.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University An Empirical Study of Out-dated Third-party Code.
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.
What kind of and how clones are refactored? A case study of three OSS projects WRT2012 June 1, Eunjong Choi†, Norihiro Yoshida‡, Katsuro Inoue†
Refactoring1 Improving the structure of existing code.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Towards a Collection of Refactoring Patterns Based.
Do Metrics Help to Identify Refactoring? Jean-Guy Schneider Rajesh Vasa
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.
Estimating Code Size After a Complete Code-Clone Merge Buford Edwards III, Yuhao Wu, Makoto Matsushita, Katsuro Inoue 1 Graduate School of Information.
Why We Refactor? Confessions of GitHub Contributors
Naoya Ujihara1, Ali Ouni2, Takashi Ishio1, Katsuro Inoue1
Do Developers Focus on Severe Code Smells?
Rename Local Variable Refactoring Instances
Ruru Yue1, Na Meng2, Qianxiang Wang1 1Peking University 2Virginia Tech
Yuta Nakamura1, Eunjong Choi1, Norihiro Yoshida2,
○Yuichi Semura1, Norihiro Yoshida2, Eunjong Choi3, Katsuro Inoue1
: Clone Refactoring Davood Mazinanian Nikolaos Tsantalis Raphael Stein
Improving the structure of existing code
On Refactoring Support Based on Code Clone Dependency Relation
Component 11 Unit 7: Building Order Sets
Dotri Quoc†, Kazuo Kobori†, Norihiro Yoshida
ITE “A” GROUP 2 ENCAPSULATION.
Presentation transcript:

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of Refactorings are Co-occurred? An Analysis of Eclipse Usage Datasets Tsubasa Saika 1, Eunjong Choi 1, Norihiro Yoshida 2, Akira Goto 1, Shusuke Haruna 1, Katsuro Inoue 1 1 Osaka University, Japan 2 Nagoya University, Japan 1

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Refactoring Changing internal structure of software without altering the external behavior [1] Improving the maintainability of a software system 2 [1] M. Fowler , “Refactoring:Improving the Design of Existing Code.” Addison Wesley , Complicated Source code Complicated Source code Sophisticated Source code Sophisticated Source code Refactoring Developer Same external behavior Easy to be maintained

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Refactoring Support Tools Manually performed refactoring is not only time- consuming but also error-prone. [2] Several IDEs support many kinds of refactoring patterns. –Eclipse, IntelliJ IDEA, NetBeans, etc. 3 [2] G. Bavota et al. “When does a refactoring induce bugs? an empirical study.” in Proc. of SCAM , 2012 Don’t do by hand Use support tools

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Related Work To improve refactoring support tools, Murphy-Hill et al. investigated Eclipse usage datasets. They found that developers often repeat same kinds of refactoring. [3] However, it has not been examined what different kinds of refactoring are frequently co-occurred in their datasets. 4 [3] E. Murphy-Hill et al. “How we refactor, and how we know it,” IEEE Trans. Softw. Eng., 2012

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example of Co-occurred Refactoring E.g.) Move and Rename –A developer moves a class to another package and then renames its name consecutively. –A developer needs to repeatedly select the class then invoke refactoring feature and configure its setting 55 Renames the class name Package1 ClassA.java Package2 ClassB.java Move ClassA.java Rename Moves the class to another package Step1 Step2

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Research Motivation Existing refactoring support tools do not support consecutively co-occurred refactoring. Supporting co-occurred refactoring should improve software development efficiency. 6 To develop the tool, the most frequently co-occurred refactoring should be clarified.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Overview of Research Investigated the refactoring tool usages Step1. Identifying frequency of co-occurred refactorings in the software development history Step2. Analyzing details of frequently co-occurred refactorings Devised suggestions for improving refactoring support tools based on the investigation results 7

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Analyzed Datasets Usage data of Eclipse which includes usage logs of the refactoring features –Users: usage record of Eclipse users [4] –Mylyn: usage record of Mylyn plug-in developers 8 Dataset name # developrsPeriod# performed refactoring # types of refactoring Users41 Jul ~ Sep Mylyn8 Feb ~ Aug [4] G.C. Murphy et al. “How Are Java Software Developers Using the Eclipse IDE?” IEEE Software, 2006.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Step1: Identifying Frequently Co-occurred Refactorings 1.Identified co-occurred refactoring combinations –regarded refactorings successively occurred within 90 seconds as co-occurred refactorings 2.Investigated the number of instances for each combinations of co-occurred refactorings 9 Developer Over 90s Within 90s Co-occurred Refactorings Move Rename

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Frequently Co-occurred Refactoring Different combinations between Rename, Move, and Extract are the most frequent. 10 Users Mylyn rankrefactoring 1refactoring 2# performed 1Extract MethodRename52 2Extract Local VariableRename33 3Extract Local VariableExtract Method29 4Extract Local VariableInline28 5MoveRename27 rankrefactoring 1refactoring 2# performed 1MoveRename115 2Move static MemberRename21 3Extract ConstantRename14 4Extract InterfaceMove14 5MoveMove static Member12

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Step2: Details of Co-occurred Refactoring (1/2) Investigated details of frequently co-occurred refactorings to devise tool supports –Only Mylyn dataset contains information about program elements altered by refactoring instances. Classified the targets of each refactoring into three types  “Same”, “Related”, “Others” 11

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Step2: Details of Co-occurred Refactoring (2/2) Same: each refactoring alters the same program element Related: targets have similar names or belong to the same package / class 12 int number; int getNumber(){ return number; } int id; 1. Rename Field 2. Rename Method int getId(){ return id; } Similar Names

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 13 refactoring 1refactoring 2 # performed# Investigated# same# related MoveRename Type Rename FieldRename Method Rename TypeRename Method MoveRename Package Rename TypeRename Field Move Static Member Rename Field Extract InterfaceMove Rename Local Variable Rename Field Result of Detailed Investigation refactoring 1refactoring 2 # performed# Investigated# same# related MoveRename Type Rename FieldRename Method Rename TypeRename Method MoveRename Package Rename TypeRename Field Move Static Member Rename Field Extract InterfaceMove Rename Local Variable Rename Field refactoring 1refactoring 2 # performed# Investigated# same# related MoveRename Type Rename FieldRename Method Rename TypeRename Method MoveRename Package Rename TypeRename Field Move Static Member Rename Field Extract InterfaceMove Rename Local Variable Rename Field

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Details of (Move, Rename) When targets are classified as “Same” –Rename the program element that was previously moved 14 mylyn.tasks.ui ProjectPreferences LinkProvider.java mylyn.internal.tasks.ui.properties ProjectProperties LinkProvider.java ProjectPreferences LinkProvider.java Package Class Moves the class to other Package Renames the class name

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Suggestions for Supporting (Move, Rename) Providing feature that simultaneously supports Move and Rename –Appending a text field for new name to the dialog of Move refactoring 15 Dialog of Move Refactoring Dialog of Rename Refactoring

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Rename refactorings are often performed together. –regardless of types of targeted program elements –altering “Related” program elements (similarly named) e.g.) Rename Field and Rename Local Variable 16 Details of (Rename, Rename) TaskElementLabelProvider(…){ … compositeImages … } wideImages compositeImages wideImages Rename TaskElementLabelProvider.java Field Local Variabe Same Name

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Developing a refactoring feature for renaming several program elements regardless of their types –Currently only the Rename refactoring intended for class can update similarly named elements automatically. –There is no such support for Rename refactoring intended for other types of program elements 17 Suggestions for Supporting (Rename, Rename)

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Conclusion & Future Work Conclusions –This study investigated consecutively co-occurred refactoring combinations. –We devised suggestion for the improvement of the refactoring feature of Eclipse. Future Works  Collecting additional datasets to achieve generality  Developing and examining a refactoring support tool according to our investigation results 18