Files in this item

FilesDescriptionFormat

application/pdf

application/pdfYuLin_ETAL_Async.pdf (511kB)
(no description provided)PDF

Description

Title:Retrofitting Concurrency for Android Applications through Refactoring
Author(s):Lin, Yu; Radoi, Cosmin; Dig, Danny
Subject(s):Refactoring, Android, Concurrency
Abstract:Running compute-intensive or blocking I/O operations in the UI event thread of smartphone apps can severely degrade responsiveness. Despite the fact that Android supports writing concurrent code via AsyncTask, we know little about how developers use AsyncTask to improve responsiveness. To understand how AsyncTask is used/underused/misused in practice, we first conduct a formative study using a corpus of 104 open-source Android apps comprising 1.34M SLOC. Our study shows that even though half of the apps use AsyncTask, there are hundreds of places where they missed opportunities to encapsulate long-running operations in AsyncTask. Second, 46% of the usages are manually refactored. However,the refactored code contains concurrency bugs (such as data races) and performance bugs (concurrent code still executes sequentially). Inspired by these findings, we designed, developed, and evaluated Asynchronizer, an automated refactoring tool that enables developers to extract long-running operations into AsyncTask. Asynchronizer uses a points-to static analysis to determine the safety of the transformation. Our empirical evaluation shows that Asynchronizer is (i) highly applicable, (ii) accurate, (iii) safer than manual refactoring (iv) it saves development effort, (v) its results have been accepted by the open-source developers. This shows that Asynchronizer is useful.
Issue Date:2014-06-03
Genre:Technical Report
Article
Type:Text
Language:English
URI:http://hdl.handle.net/2142/49882
Publication Status:published or submitted for publication
Peer Reviewed:is peer reviewed
Date Available in IDEALS:2014-06-03


This item appears in the following Collection(s)

Item Statistics