14
LES | DI | PUC-Rio - Brasil OPUS Research Group Refactoring Impact on Software Maintainability Diego Cedrim

Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

LES | DI | PUC-Rio - Brasil OPUS Research Group

Refactoring Impact on Software Maintainability

Diego Cedrim

Page 2: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing
Page 3: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

–Martin Fowler

“A change made to the internal structure of software to make it easier to understand and

cheaper to modify without changing its observable behavior.”

3

Page 4: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

–Kent Beck

“A code smell is a surface indication that usually corresponds to a deeper problem in the

system.”

4

Page 5: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Refactoring is the process of improving the structure of a program without changing its behavior

Code smells can be used as an indication of relevant structural problems

Refactoring can be used to remove code smells

Software maintainability is increased when code smells are removed

Refactoring / Code Smells

5

Page 6: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Do refactoring activities improve software maintainability after the

transformations?

Page 7: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing
Page 8: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Dataset: 13 versions of the version histories of OODT, Heath Watcher and Mobile Media systems

Method: for each pair of versions, we compute the number of anomalies before and after each refactoring

Analysis: observe the behavior of increasing or decreasing number of anomalies

Used Solving Method

8

Page 9: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Code Smells Number After Refactoring

9

Increased Decreased Unchanged

24

910

Page 10: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Inspiration

10

Page 11: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

RQ1: Do refactoring activities improve software maintainability after the transformations?

RQ2: Is there any pattern between refactoring types and created/removed code smells?

Research Questions

11

Page 12: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Ref-Finder: Refactoring Activities Collection

!

PMD: Code smell detector

!

Target: GitHub

New Solving Method

12

Page 13: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

Ref-Finder run as a Eclipse plugin

How to run it outside of Eclipse?

!

False positives/negatives

Unsolved Problems

13

Page 14: Refactoring Impact on Software Maintainabilityinf2921/2014_2/docs/works/inicial/Work_Diego.p… · Refactoring is the process of improving the structure of a program without changing

LES | DI | PUC-Rio - Brasil OPUS Research Group

Refactoring Impact on Software Maintainability

Diego Cedrim