Gen AI in Business - Global Trends Report 2024.pdf
Understanding the Longevity of Code Smells - Preliminary Results of an Explanatory Survey
1. Understanding the Longevity of Code SmellsPreliminary Results of an Exploratory Survey Roberta Arcoverde – rarcoverde@inf.puc-rio.br Alessandro Garcia – afgarcia@inf.puc-rio.br Eduardo Figueiredo – figueiredo@dcc.ufmg.br ICSE.11
2. why? May 11 Roberta @ OPUS Group 2 codesmellsentailevidenceofbadqualitycode harder to readandmaintain some [patternsof] smellsseem to be “ignored”
3. why? May 11 Roberta @ OPUS Group 3 codesmellsentailevidenceofbadqualitycode harder to readandmaintain some [patternsof] smellsseem to be “ignored” [1] How we refactor and how we know it. Murphy-Hill et al. [ICSE 2010]
4. objective May 11 Roberta @ OPUS Group 4 perform a firstexploratorystudy to identify which factors influence longevity of code smells, based on refactoring habits
5. refactoring habits howoftencode is refactored? which refactorings are prioritized? is refactoringapplied as anisolateactivity? which refactorings are considered to beharder to apply? howoftenandwhenrefactoringtools are used? May 11 Roberta @ OPUS Group 5
6. which factors influence refactoring habits natureof software beingdeveloped reusableassets (frameworks, libraries, software productlines) standalone applications use of TDD developer’sexperience May 11 Roberta @ OPUS Group 6
11. most recurring smells May 11 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
13. ...and reasons for not using them May 11 Roberta @ OPUS Group 13 tool does notsupportthedesiredrefactoring – 41% theydidnotknowanyrefactoringtool – 37% tools do notallowthem to easilyfollowtheeffectsofrefactoring – 28% it’snoteasy to testwhetherthesystem’sbehaviourwaspreserved – 22%
15. concluding remarks May 11 15 Roberta @ 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
16. concluding remarks visualizationmechanismsimprovements are needed testingwhetherthecodetransformationpreservedbehaviour is noteasy specifictoolsorfeaturescouldbeinvestigated for refactorings oflibraries, frameworks and software productlines May 11 Roberta @ OPUS Group 16
Good afternoon. Thank you for coming to my presentation. My name is Roberta, I’m a MSc student at PUC-Rio and I will present an exploratory study towards understanding the longevity of code smells
The first question comes to our mind is why investigating codesmellslongevity?As we all know, Code smells are symptoms in the source code that possibly indicates a deeper maintainability problem – making code harder to read and to maintain. And yet, some patterns of smells seem to be, either deliberately or not, ignored (or not dealt with as promptly as others), so they linger in code longer than others. There is, however, little knowledge about the factors that are likely to influence this longevity. Understanding which and why those refactoring candidates are neglected can help us identify improvements for refactoring tools and IDEs.1st thing comes to mind whyAs we know, code smells are..And yet, some patterns of smells seems to be, deliberately, or not, ignored..There is little knowledge about factors that are likely to influenceUnderstanding which and why those refactoring candidates are neglected…
Previous studies were dedicated to understanding the state of practice of refactoring, identifying how and when they are commonly applied. Our investigation wants to complement such studies, by revealing recurring factors which lead developers to not worry about certain code smells, and we do so based on their refactoring habits.
We sent the questionnaire to companies and colleagues in order to diversify the answers.This study was carried out in october 2010, and we had 33 answers from different groups of developers, from Academy, agile development teams, software factories and also from open source framework developers.