Preventive Software Maintenance: The Past, the Present, the Future
description
Transcript of Preventive Software Maintenance: The Past, the Present, the Future
![Page 1: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/1.jpg)
1
Preventive Software Maintenance: The Past, the Present, the Future
Nikolaos TsantalisComputer Science & Software Engineering
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 2: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/2.jpg)
2
Preventive Software Maintenance
Changes aiming to improve the future maintainability and reliability of the software system.
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
Why is it so necessary?
![Page 3: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/3.jpg)
Software aging
Refactoring
![Page 4: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/4.jpg)
4Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
![Page 5: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/5.jpg)
5
Martin FowlerRefactoring
Duplicated Code:“If you see the same code structure in more than one place, … find a way to unify them.”
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 6: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/6.jpg)
6Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
2001
![Page 7: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/7.jpg)
7
Frank Simon, Claus LewerentzMetrics Based Refactoring
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
CSMR MostInfluential
Paper Award
![Page 8: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/8.jpg)
8Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
20012003
![Page 9: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/9.jpg)
9
Tom Tourwé, Tom MensLogic Meta Programming
Code smell definition for Inappropriate InterfaceinappropriateInterface(?class,?interface,?subclasses) :- findall(<?itf,?scs>, commonSubclassInterface(?class,?itf,?scs), ?result), removeDuplicates(?result,?nodups), member(<?interface,?subclasses>,?nodups)
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 10: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/10.jpg)
10Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
20012003
2005
![Page 11: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/11.jpg)
11
Radu MarinescuDetection Strategies
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 12: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/12.jpg)
12Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
20012003
20052008
![Page 13: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/13.jpg)
13
Mel O’Keeffe, Mel Ó CinnéideSearch-based Refactoring
• Treat the improvement of object-oriented design as a search problem in the space of alternative designs
• The move in the search space is achieved by modeling refactorings (inheritance-related)
• Apply search algorithms using QMOOD as the fitness function (rank alternative designs)
• The outcome is a sequence of refactorings leading to the optimal design
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 14: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/14.jpg)
14Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
20012003
20052008
2009
![Page 15: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/15.jpg)
15
Naouel Moha, Yann-Gaël GuéhéneucDECOR
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 16: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/16.jpg)
16Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
1999
The Past
20012003
20052008
2009
LIMITATION
![Page 17: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/17.jpg)
17
Refactoring Opportunities
Advantages:Feasible and behavior preserving solutions
to design problemsRanking and prioritizing solutions based on
their expected effect on design qualityA more holistic approach for preventive
maintenance
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 18: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/18.jpg)
18
My research
Focused on the automatic detectionof refactoring opportunities
for 4 major design problems
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 19: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/19.jpg)
19
#1 Misallocatedbehavior in classes
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
IEEE TSE, 2009
![Page 20: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/20.jpg)
20
Context
+ method() {state.method();
}
- type : int- STATE_A : int = 1 - STATE_B : int = 2
#2 Conditional logicvs. Polymorphism
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
State
+method()
StateB+method() {
}
StateA+method() {
}
Context
+ method() {
}
- state : int- STATE_A : int = 1 - STATE_B : int = 2
doStateA();if state == STATE_A
elseif state == STATE_B doStateB();
state
JSS, 2010
![Page 21: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/21.jpg)
21
#3 Long & Complex methods
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
JSS, 2011
![Page 22: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/22.jpg)
22
#4 Large & Complex classes
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
70 methods15 fields900 LOC
19 methods11 fields
JSS, 2012
![Page 23: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/23.jpg)
23
#5 Software Clones
• Goal: Given two clones, find the optimal way to refactor them:– Matching by minimizing the differences– Explain the rationale of the solution to the user– Apply the solution automatically in a behavior
preserving way– Suggest possible design changes to make the
clones “refactorable”
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 24: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/24.jpg)
24Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
16 academic licensesSince the beginning of 2011 …
5,000 applied refactorings
![Page 25: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/25.jpg)
25
State-of-the-art commercial tools
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
Computer-aided refactoring
![Page 26: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/26.jpg)
26Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
So, tools are adopted
What’s next?
Management ofMaintenance Activities
![Page 27: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/27.jpg)
27
The present
Technical debt management• “Debt” is the effect of incomplete, immature, or
inadequate maintenance activities• Delayed tasks may bring a short-term benefit
(higher productivity, shorter release time)• Might have to be paid back in the future with
“Interest” (increased effort)• “Principal” is the effort to pay off the debt
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 28: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/28.jpg)
28
The present
Clone management• Tracking clones as project evolves• Verifying the consistent modification of clones• Updating clones and groups as project evolves• Assessing the harmfulness of clones
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 29: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/29.jpg)
29
My perspective
Every code smell involves a certain riskfor future maintainability
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
What is the risk of leavinga code smell in the system?
![Page 30: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/30.jpg)
30
Risk Assessment
• Likelihood of occurrence of the risky event• Exposure of the system to the event• Consequence of the event
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
Risk = Likelihood × Exposure × Consequence
![Page 31: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/31.jpg)
31
Likelihood estimation
• Risky events changes driven by code smells– Ex. 1: Fixing the same bug in a clone group– Ex. 2: Making a method more “envy” to another class
• Intuition: code that changes frequently due to a design flaw imposes a high risk to the maintainability of a system• Likelihood proneness to code smell driven
changes (estimated from the history of changes)
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 32: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/32.jpg)
32
Exposure estimation
• Intuition: the more extensively a module is used, the more extensive the propagation of code smell driven changes to dependent modules
• Exposure the number and strength of incoming dependencies (estimated from static and dynamic analysis)
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 33: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/33.jpg)
33
Consequence estimation
• Consequence cost of code smell driven changes (effort, time, money).
From the opposite perspective:• Consequence effect of removing the code
smell.• Estimated by computing the impact of the
corresponding refactoring on metrics.
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
![Page 34: Preventive Software Maintenance: The Past, the Present, the Future](https://reader033.fdocuments.net/reader033/viewer/2022051118/56816384550346895dd46b71/html5/thumbnails/34.jpg)
34
Thank you!!
Consortium for Software Engineering Research2013 Spring Meeting, Montréal, Québec, Canada
Visit our project athttp://jdeodorant.com