SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
A Preliminary Study of
Android Refactorings
Anthony Peruma
Rochester Institute of Technology
Rochester, New York, USA
axp6201@rit.edu
May 2019
Maintenance is essential for survival!
3.3 million (and growing) apps on the Google Play Store [1]
Consumers are spoilt for choice
The better the app, the higher (and longer) the usage
Apps that don’t evolve will be left behind
[1] I. Malavolta, R. Verdecchia, B. Filipovic, M. Bruntink and P. Lago, "How Maintainability Issues of Android Apps Evolve," 2018 ICSME
Code refactoring is an integral part of maintenance
“a disciplined technique for restructuring an existing body of code, altering its
internal structure without changing its external behavior” -- Martin Fowler
List<WebElement> findElements(context SearchContext)
{
………...….….….………...….….….….….….….….…
………...….….….………...….….….….….….….….…
………...….….….………...….….….….….….….….…
………...….….….………...….….….….….….….….…
………...….….….………...….….….….….….….….…
………...….….….………...….….….….….….….….…
}
void installSizzleJSExtension()
{ …. }
Existing Method
“Extracted” Method
void installJQueryExtension()
{ …. }
Renamed Method
Refactoring is rework, and rework hurts productivity and can be error prone
Research goal, objective & questions
Goal: understand the refactoring habits of app developers and how they differ
from traditional system developers
Objective: Better inform/educate app developers on the types of rework they
would face; this would lead to better preparedness during app design and
implementation
Research Questions:
● What are the most common refactoring operations Android app developers
apply on their source code elements?
● What are the reasons that motivate Android developers to refactor their
source code?
Methodology
Projects: 1,028
Avg. commits per app: 118.2
Avg. developers per app: 3.8
Avg. refactoring commits per app: 14.9
Avg. refactoring operations per app: 47.8
Avg. refactoring developers per app: 1.4
Tools/Technologies:
Refactoring detection: RefactoringMiner
Topic Modeling: latent Dirichlet allocation
(LDA); Python’s gensim library
RQ1: Most common refactoring operations
Elements of UI based datatypes tend to undergo more
refactorings - TextView, View, Intent, Context
Stas Negara, Nicholas Chen, Mohsen Vakilian, Ralph E. Johnson, and
Danny Dig. 2013. A comparative study of manual and automated
refactorings. ECOOP'13
Popularity of refactorings in traditional Java systems
Demonstrates the need to study Android apps
separately from traditional systems
RQ2: Reasons for code refactoring
LDA based analysis of refactoring commit messages to indicate why app
developers refactor their code
Other observations:
● Developers knowingly admit that the operations they performed are refactoring activities
Example: “Refactored seralize/deserialize (plain objects): moved to Reference…” when performing an Extract and Move Method
operation
● Developers rename source code elements as part of code cleanup activities (e.g., “cleanup from all the re-org”) or to
comply with coding standards/guidelines (“Rename member variables as per README's coding style”)
Summary
A preliminary study on Android apps that:
● Explored the types of refactoring operations performed by app developers
○ Provided a high-level comparison against traditional Java systems
● Highlighted the motivations that drive app developers to refactor their code
Future work:
● As a preliminary study, this work has opened up multiple avenues for future work
● A deep-dive investigation into the renaming habits of app developers
Artifacts from this study are available at: https://sites.google.com/g.rit.edu/refactoring
Thank You!
A Preliminary Study of Android Refactorings

Weitere ähnliche Inhalte

Ähnlich wie A Preliminary Study of Android Refactorings

04-Android Platform for Acedamics
04-Android Platform for Acedamics04-Android Platform for Acedamics
04-Android Platform for Acedamics
Sivaram P
 
Survey Paper Review By Bekalu vchgf.pptx
Survey Paper Review By Bekalu vchgf.pptxSurvey Paper Review By Bekalu vchgf.pptx
Survey Paper Review By Bekalu vchgf.pptx
zelalem77
 

Ähnlich wie A Preliminary Study of Android Refactorings (20)

L035478083
L035478083L035478083
L035478083
 
From requirements to ready to run
From requirements to ready to runFrom requirements to ready to run
From requirements to ready to run
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Developing reusable software components for distributed embedded systems
Developing reusable software components for distributed embedded systemsDeveloping reusable software components for distributed embedded systems
Developing reusable software components for distributed embedded systems
 
V5 i3201613
V5 i3201613V5 i3201613
V5 i3201613
 
An Approach to Calculate Reusability in Source Code Using Metrics
An Approach to Calculate Reusability in Source Code Using MetricsAn Approach to Calculate Reusability in Source Code Using Metrics
An Approach to Calculate Reusability in Source Code Using Metrics
 
D502023439
D502023439D502023439
D502023439
 
D502023439
D502023439D502023439
D502023439
 
Method-Level Code Clone Modification using Refactoring Techniques for Clone M...
Method-Level Code Clone Modification using Refactoring Techniques for Clone M...Method-Level Code Clone Modification using Refactoring Techniques for Clone M...
Method-Level Code Clone Modification using Refactoring Techniques for Clone M...
 
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITYA FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
A FRAMEWORK STUDIO FOR COMPONENT REUSABILITY
 
A Preliminary Field Study of Game Programming on Mobile Devices
A Preliminary Field Study of Game Programming on Mobile DevicesA Preliminary Field Study of Game Programming on Mobile Devices
A Preliminary Field Study of Game Programming on Mobile Devices
 
Ch16
Ch16Ch16
Ch16
 
OOP ppt.pdf
OOP ppt.pdfOOP ppt.pdf
OOP ppt.pdf
 
A Case Study Of A Reusable Component Collection
A Case Study Of A Reusable Component CollectionA Case Study Of A Reusable Component Collection
A Case Study Of A Reusable Component Collection
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
 
04-Android Platform for Acedamics
04-Android Platform for Acedamics04-Android Platform for Acedamics
04-Android Platform for Acedamics
 
A Survey of Software Reusability
A Survey of Software ReusabilityA Survey of Software Reusability
A Survey of Software Reusability
 
Se chapter 1,2,3 2 mark qa
Se chapter 1,2,3   2 mark  qaSe chapter 1,2,3   2 mark  qa
Se chapter 1,2,3 2 mark qa
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
Survey Paper Review By Bekalu vchgf.pptx
Survey Paper Review By Bekalu vchgf.pptxSurvey Paper Review By Bekalu vchgf.pptx
Survey Paper Review By Bekalu vchgf.pptx
 

Mehr von University of Hawai‘i at Mānoa

Mehr von University of Hawai‘i at Mānoa (20)

Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
Rename Chains: An Exploratory Study on the Occurrence and Characteristics of ...
 
A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]A Primer on High-Quality Identifier Naming [ASE 2022]
A Primer on High-Quality Identifier Naming [ASE 2022]
 
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
Supporting the Maintenance of Identifier Names: A Holistic Approach to High-Q...
 
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...Preparing for the  Academic Job Market:  Experience and Tips from  a Recent F...
Preparing for the Academic Job Market: Experience and Tips from a Recent F...
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
A Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier NamingA Primer on High-Quality Identifier Naming
A Primer on High-Quality Identifier Naming
 
Test Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to DetectionTest Anti-Patterns: From Definition to Detection
Test Anti-Patterns: From Definition to Detection
 
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
Refactoring Debt: Myth or Reality? An Exploratory Study on the Relationship B...
 
Understanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory StudyUnderstanding Digits in Identifier Names: An Exploratory Study
Understanding Digits in Identifier Names: An Exploratory Study
 
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics i...
 
IDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal ToolIDEAL: An Open-Source Identifier Name Appraisal Tool
IDEAL: An Open-Source Identifier Name Appraisal Tool
 
Using Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name EvolutionUsing Grammar Patterns to Interpret Test Method Name Evolution
Using Grammar Patterns to Interpret Test Method Name Evolution
 
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
On the Distribution of "Simple Stupid Bugs" in Unit Test Files: An Explorator...
 
Contextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit MessagesContextualizing Rename Decisions using Refactorings and Commit Messages
Contextualizing Rename Decisions using Refactorings and Commit Messages
 
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
An Exploratory Study on the Refactoring of Unit Test Files in Android Applica...
 
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...On the Distribution of Test Smells in Open Source Android Applications: An Ex...
On the Distribution of Test Smells in Open Source Android Applications: An Ex...
 
Permission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory StudyPermission Issues in Open-Source Android Apps: An Exploratory Study
Permission Issues in Open-Source Android Apps: An Exploratory Study
 
A Career In IT
A Career In ITA Career In IT
A Career In IT
 
Web Content Management - Introduction
Web Content Management - IntroductionWeb Content Management - Introduction
Web Content Management - Introduction
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 

Kürzlich hochgeladen

CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

A Preliminary Study of Android Refactorings

  • 1. A Preliminary Study of Android Refactorings Anthony Peruma Rochester Institute of Technology Rochester, New York, USA axp6201@rit.edu May 2019
  • 2. Maintenance is essential for survival! 3.3 million (and growing) apps on the Google Play Store [1] Consumers are spoilt for choice The better the app, the higher (and longer) the usage Apps that don’t evolve will be left behind [1] I. Malavolta, R. Verdecchia, B. Filipovic, M. Bruntink and P. Lago, "How Maintainability Issues of Android Apps Evolve," 2018 ICSME
  • 3. Code refactoring is an integral part of maintenance “a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior” -- Martin Fowler List<WebElement> findElements(context SearchContext) { ………...….….….………...….….….….….….….….… ………...….….….………...….….….….….….….….… ………...….….….………...….….….….….….….….… ………...….….….………...….….….….….….….….… ………...….….….………...….….….….….….….….… ………...….….….………...….….….….….….….….… } void installSizzleJSExtension() { …. } Existing Method “Extracted” Method void installJQueryExtension() { …. } Renamed Method Refactoring is rework, and rework hurts productivity and can be error prone
  • 4. Research goal, objective & questions Goal: understand the refactoring habits of app developers and how they differ from traditional system developers Objective: Better inform/educate app developers on the types of rework they would face; this would lead to better preparedness during app design and implementation Research Questions: ● What are the most common refactoring operations Android app developers apply on their source code elements? ● What are the reasons that motivate Android developers to refactor their source code?
  • 5. Methodology Projects: 1,028 Avg. commits per app: 118.2 Avg. developers per app: 3.8 Avg. refactoring commits per app: 14.9 Avg. refactoring operations per app: 47.8 Avg. refactoring developers per app: 1.4 Tools/Technologies: Refactoring detection: RefactoringMiner Topic Modeling: latent Dirichlet allocation (LDA); Python’s gensim library
  • 6. RQ1: Most common refactoring operations Elements of UI based datatypes tend to undergo more refactorings - TextView, View, Intent, Context Stas Negara, Nicholas Chen, Mohsen Vakilian, Ralph E. Johnson, and Danny Dig. 2013. A comparative study of manual and automated refactorings. ECOOP'13 Popularity of refactorings in traditional Java systems Demonstrates the need to study Android apps separately from traditional systems
  • 7. RQ2: Reasons for code refactoring LDA based analysis of refactoring commit messages to indicate why app developers refactor their code Other observations: ● Developers knowingly admit that the operations they performed are refactoring activities Example: “Refactored seralize/deserialize (plain objects): moved to Reference…” when performing an Extract and Move Method operation ● Developers rename source code elements as part of code cleanup activities (e.g., “cleanup from all the re-org”) or to comply with coding standards/guidelines (“Rename member variables as per README's coding style”)
  • 8. Summary A preliminary study on Android apps that: ● Explored the types of refactoring operations performed by app developers ○ Provided a high-level comparison against traditional Java systems ● Highlighted the motivations that drive app developers to refactor their code Future work: ● As a preliminary study, this work has opened up multiple avenues for future work ● A deep-dive investigation into the renaming habits of app developers Artifacts from this study are available at: https://sites.google.com/g.rit.edu/refactoring