Towards a Refactoring Benchmark Serge Demeyer Lab on Reengineering (LORE) University of Antwerp...
-
Upload
damon-rogers -
Category
Documents
-
view
216 -
download
0
description
Transcript of Towards a Refactoring Benchmark Serge Demeyer Lab on Reengineering (LORE) University of Antwerp...
Towards a Refactoring Benchmark
Serge DemeyerLab on Reengineering (LORE)
University of AntwerpPresentation for the ELISA - Workshop
(September 2003, Amsterdam - The Netherlands)
© Serge Demeyer 2
TransformSelf Type Checks
Test providertype Test self type Test external
attribute
TransformClient Type Checks
Transform Conditionalsinto Registration
Testnull values
IntroduceNull Object
Factor OutStrategy
Factor OutState
Test object state
Story #1
© Serge Demeyer 3
Boxes: ClassesWidth: # methods addedHeight: # methods overriddenColor: # method extended
Story #2
© Serge Demeyer 4
A
Bt()u()v()w()
Split B into X and B'A'
Xt()u()
B'v()w()
/* Hierarchy nesting level increased */(delta_HNL(B') > 0) and
/* Number of methods decreased */((delta_NOM(B') < 0)/* Number of attributes decreased */or (delta_NOA(B') < 0))
Story #3
© Serge Demeyer 5
Classification
Curative(i.e. Which refactorings are good ?How do tools support refactoring ?)
Retrospective(i.e. Which Refactorings
have been Applied ?)
Predictive(i.e. Where to applyWhich Refactoring ?)
© Serge Demeyer 6
Characteristics• Life Cycle
(analysis, design, ...)• Evolution
(scale, #iterations, ...)• Domain
(problem, solution, ...)
Case
stu
dies
•To
y Ex
ampl
e(L
AN -S
imul
atio
n)•
Indu
stria
l Sys
tem
(Visu
alW
orks
& S
wing
)•
Publ
ic Do
mai
n(H
otDr
aw &
ET+
+)•
Open
-sou
rce
(Moz
illa)
Benchmark proposal
© Serge Demeyer 7
Case Study: LAN Simulation
0.0
0.1 0.1r
0.2r0.2
0.nr0.n
0.3rr
0.nrr 0.nr...r
Add functionality
Refactor
© Serge Demeyer 8
Case Study: LAN Simulation
0.0
0.1 0.1r
0.2r0.2
0.nr0.n
0.3rr
0.nrr 0.nr...r
Curative ?• Version 0.x is "better" than version 0.x-1 ?• Does tool P support 0.x 0.x+1 ?
Predictive ?• Does technique Q predict 0.x 0.x+1 ?
Retrospective ?• Does technique R dicover 0.x 0.x+1 ?
© Serge Demeyer 9
Discussion
• Does it makes sense to work out this LAN benchmark ?– Would you use it ? o yes o no