Upload
roberta-arcoverde
View
542
Download
1
Embed Size (px)
DESCRIPTION
my presentation at the 4th Workshop on Refactoring Tools, May 2011
Citation preview
OPUS GroupLES | DI |PUC-Rio - Brazil
Understanding the Longevity of Code SmellsPreliminary Results of an Exploratory Survey
Roberta Arcoverde – [email protected] Garcia – [email protected]
Eduardo Figueiredo – [email protected]
ICSE.11
why?
April 8, 2023 Roberta @ OPUS Group 2
code smells entail evidence of bad quality code harder to read and maintain
some [patterns of] smells seem to be “ignored”
why?
April 8, 2023 Roberta @ OPUS Group 3
code smells entail evidence of bad quality code harder to read and maintain
some [patterns of] smells seem to be “ignored”
? refactoring habits
smell longevity
[1] How we refactor and how we know it. Murphy-Hill et al. [ICSE 2010]
objective
April 8, 2023 Roberta @ OPUS Group 4
perform a first exploratory study to identify
which factors influence longevity of code smells, based on refactoring habits
refactoring habits
how often code is refactored? which refactorings are prioritized? is refactoring applied as an isolate activity? which refactorings are considered to be harder to
apply? how often and when refactoring tools are used?
April 8, 2023 Roberta @ OPUS Group 5
? refactoring habits
smell longevity
which factors influence refactoring habits
nature of software being developed reusable assets (frameworks, libraries, software
product lines) standalone applications
use of TDD developer’s experience
April 8, 2023 Roberta @ OPUS Group 6
? refactoring habits
smell longevity
survey setting - questionnaire
April 8, 2023 Roberta @ OPUS Group 7
1 - identification of developer profile• experience• kind of projects they work with• use of TDD
2 - refactoring habits• use of refactoring tools• commonly found smells• floss refactoring
3 - classifying refactorings• difficulty• frequency• importance (priority)
participants
April 8, 2023 Roberta @ OPUS Group 8
agile development teams framework developers = 33 answers
participants distribution
April 8, 2023 Roberta @ OPUS Group 9
participants distribution - TDD
April 8, 2023 Roberta @ OPUS Group 10
most recurring smells
April 8, 2023 Roberta @ OPUS Group 11
duplicated code – 78% (26) long methods – 78% (26) inadequate naming – 69% (23) god classes – 42% (14)
same results for developers of reusable assets and standalone applications...
...regardless of experience level
how often refactoring tools are used...
April 8, 2023 Roberta @ OPUS Group 12
...and reasons for not using them
April 8, 2023 Roberta @ OPUS Group 13
tool does not support the desired refactoring – 41% they did not know any refactoring tool – 37% tools do not allow them to easily follow the effects of
refactoring – 28% it’s not easy to test whether the system’s behaviour
was preserved – 22%
classifying refactorings - difficulty
April 8, 2023 Roberta @ OPUS Group 14
concluding remarks
April 8, 2023 15Roberta @ OPUS Group
nature of the software being developed influences refactoring habits
reusable assets developers consider the possibility of breaking APIs before refactoring
refactoring prioritization is fairly different when we consider reusable assets versus standalone applications
refactoring scope is considered
concluding remarks
visualization mechanisms improvements are needed
testing whether the code transformation preserved behaviour is not easy
specific tools or features could be investigated for refactorings of libraries, frameworks and software product lines
April 8, 2023 Roberta @ OPUS Group 16
thank you
questions?
April 8, 2023 Roberta @ OPUS Group 17
classifying refactorings - priority
April 8, 2023 Roberta @ OPUS Group 18
classifying refactorings - frequency
April 8, 2023 Roberta @ OPUS Group 19