76 research outputs found
Rohelisema tarkvaratehnoloogia poole tarkvaraanalĂŒĂŒsi abil
Mobiilirakendused, mis ei tĂŒhjenda akut, saavad tavaliselt head kasutajahinnangud. Mobiilirakenduste energiatĂ”husaks muutmiseks on avaldatud mitmeid refaktoreerimis- suuniseid ja tööriistu, mis aitavad rakenduse koodi optimeerida. Neid suuniseid ei saa aga seoses energiatĂ”hususega ĂŒldistada, sest kĂ”igi kontekstide kohta ei ole piisavalt energiaga seotud andmeid. Olemasolevad energiatĂ”hususe parandamise tööriistad/profiilid on enamasti prototĂŒĂŒbid, mis kohalduvad ainult vĂ€ikese alamhulga energiaga seotud probleemide suhtes. Lisaks kĂ€sitlevad olemasolevad suunised ja tööriistad energiaprobleeme peamiselt a posteriori ehk tagantjĂ€rele, kui need on juba lĂ€htekoodi sees. Android rakenduse koodi saab pĂ”hijoontes jagada kaheks osaks: kohandatud kood ja korduvkasutatav kood. Kohandatud kood on igal rakendusel ainulaadne. Korduvkasutatav kood hĂ”lmab kolmandate poolte teeke, mis on rakendustesse lisatud arendusprotessi kiirendamiseks. Alustuseks hindame mitmete lĂ€htekoodi halbade lĂ”hnade refaktoreerimiste energiatarbimist Androidi rakendustes. SeejĂ€rel teeme empiirilise uuringu Androidi rakendustes kasutatavate kolmandate osapoolte vĂ”rguteekide energiamĂ”ju kohta. Pakume ĂŒldisi kontekstilisi suuniseid, mida vĂ”iks rakenduste arendamisel kasutada. Lisaks teeme sĂŒstemaatilise kirjanduse ĂŒlevaate, et teha kindlaks ja uurida nĂŒĂŒdisaegseid tugitööriistu, mis on rohelise Androidi arendamiseks saadaval. Selle uuringu ja varem lĂ€bi viidud katsete pĂ”hjal toome esile riistvarapĂ”histe energiamÔÔtmiste jÀÀdvustamise ja taasesitamise probleemid. Arendame tugitööriista ARENA, mis vĂ”ib aidata koguda energiaandmeid ja analĂŒĂŒsida Androidi rakenduste energiatarbimist. Viimasena töötame vĂ€lja tugitööriista REHAB, et soovitada arendajatele energiatĂ”husaid kolmanda osapoole vĂ”rguteekeMobile apps that do not drain the battery usually get good user ratings. To make mobile apps energy efficient many refactoring guidelines and tools are published that help optimize the app code. However, these guidelines cannot be generalized w.r.t energy efficiency, as there is not enough energy-related data for every context. Existing energy enhancement tools/profilers are mostly prototypes applicable to only a small subset of energy-related problems. In addition, the existing guidelines and tools mostly address the energy issues a posteriori, i.e., once they have already been introduced into the code.
Android app code can be roughly divided into two parts: the custom code and the reusable code. Custom code is unique to each app. Reusable code includes third-party libraries that are included in apps to speed up the development process. We start by evaluating the energy consumption of various code smell refactorings in native Android apps. Then we conduct an empirical study on the energy impact of third-party network libraries used in Android apps. We provide generalized contextual guidelines that could be used during app development
Further, we conduct a systematic literature review to identify and study the current state of the art support tools available to aid green Android development. Based on this study and the experiments we conducted before, we highlight the problems in capturing and reproducing hardware-based energy measurements. We develop the support tool âARENAâ that could help gather energy data and analyze the energy consumption of Android apps. Last, we develop the support tool âREHABâ to recommend energy efficient third-party network libraries to developers.https://www.ester.ee/record=b547174
Cohesion Metrics for Improving Software Quality
Abstract
Software product metrics aim at measuring the quality of software. Modu-
larity is an essential factor in software quality. In this work, metrics related
to modularity and especially cohesion of the modules, are considered. The
existing metrics are evaluated, and several new alternatives are proposed.
The idea of cohesion of modules is that a module or a class should consist
of related parts. The closely related principle of coupling says that the
relationships between modules should be minimized.
First, internal cohesion metrics are considered. The relations that are
internal to classes are shown to be useless for quality measurement. Second,
we consider external relationships for cohesion. A detailed analysis using
design patterns and refactorings conïŹrms that external cohesion is a better
quality indicator than internal. Third, motivated by the successes (and
problems) of external cohesion metrics, another kind of metric is proposed
that represents the quality of modularity of software. This metric can be
applied to refactorings related to classes, resulting in a refactoring suggestion
system.
To describe the metrics formally, a notation for programs is developed.
Because of the recursive nature of programming languages, the properties of
programs are most compactly represented using grammars and formal lan-
guages. Also the tools that were used for metrics calculation are described.Siirretty Doriast
Handling High-Level Model Changes Using Search Based Software Engineering
Model-Driven Engineering (MDE) considers models as first-class artifacts during the software
lifecycle. The number of available tools, techniques, and approaches for MDE is increasing as its
use gains traction in driving quality, and controlling cost in evolution of large software systems.
Software models, defined as code abstractions, are iteratively refined, restructured, and evolved.
This is due to many reasons such as fixing defects in design, reflecting changes in requirements,
and modifying a design to enhance existing features.
In this work, we focus on four main problems related to the evolution of software models: 1) the
detection of applied model changes, 2) merging parallel evolved models, 3) detection of design
defects in merged model, and 4) the recommendation of new changes to fix defects in software
models.
Regarding the first contribution, a-posteriori multi-objective change detection approach has been
proposed for evolved models. The changes are expressed in terms of atomic and composite
refactoring operations. The majority of existing approaches detects atomic changes but do not
adequately address composite changes which mask atomic operations in intermediate models.
For the second contribution, several approaches exist to construct a merged model by
incorporating all non-conflicting operations of evolved models. Conflicts arise when the
application of one operation disables the applicability of another one. The essence of the problem
is to identify and prioritize conflicting operations based on importance and context â a gap in
existing approaches. This work proposes a multi-objective formulation of model merging that
aims to maximize the number of successfully applied merged operations.
For the third and fourth contributions, the majority of existing works focuses on refactoring at
source code level, and does not exploit the benefits of software design optimization at model
level. However, refactoring at model level is inherently more challenging due to difficulty in
assessing the potential impact on structural and behavioral features of the software system. This requires analysis of class and activity diagrams to appraise the overall system quality, feasibility,
and inter-diagram consistency. This work focuses on designing, implementing, and evaluating a
multi-objective refactoring framework for detection and fixing of design defects in software
models.Ph.D.Information Systems Engineering, College of Engineering and Computer ScienceUniversity of Michigan-Dearbornhttp://deepblue.lib.umich.edu/bitstream/2027.42/136077/1/Usman Mansoor Final.pdfDescription of Usman Mansoor Final.pdf : Dissertatio
Automated Improvement of Software Design by Search-Based Refactoring
Le coĂ»t de maintenance du logiciel est estimĂ© Ă plus de 70% du coĂ»t total du systĂšme, en raison de nombreux facteurs, y compris les besoins des nouveaux utilisateurs, lâadoption de
nouvelles technologies et la qualitĂ© des systĂšmes logiciels. De ces facteurs, la qualitĂ© est celle que nous pouvons contrĂŽler et continuellement amĂ©liorer pour empĂȘcher la dĂ©gradation de la performance et la rĂ©duction de lâefficacitĂ© (par exemple, la dĂ©gradation de la conception
du logiciel). De plus, pour rester compĂ©titive, lâindustrie du logiciel a raccourci ses cycles de lancement afin de fournir de nouveaux produits et fonctionnalitĂ©s plus rapidement, ce qui entraĂźne une pression accrue sur les Ă©quipes de dĂ©veloppeurs et une accĂ©lĂ©ration de lâĂ©volution
de la conception du systĂšme. Une façon dâempĂȘcher la dĂ©gradation du logiciel est lâidentification et la correction des anti-patrons qui sont des indicateurs de mauvaise qualitĂ© de conception. Pour amĂ©liorer la qualitĂ© de la conception et supprimer les anti-patrons, les
développeurs effectuent de petites transformations préservant le comportement (c.-à -d., refactoring).
Le refactoring manuel est coĂ»teux, car il nĂ©cessite (1) dâidentifier les entitĂ©s de code qui doivent ĂȘtre refactorisĂ©es ; (2) gĂ©nĂ©rer des opĂ©rations de refactoring pour les classes identifiĂ©es Ă lâĂ©tape prĂ©cĂ©dente ; (3) trouver le bon ordre dâapplication des refactorings gĂ©nĂ©rĂ©s,
pour maximiser le bĂ©nĂ©fice pour la qualitĂ© du code et minimiser les conflits. Ainsi, les chercheurs et les praticiens ont formulĂ© le refactoring comme un problĂšme dâoptimisation et utilisent des techniques basĂ©es sur la recherche pour proposer des approches (semi) automatisĂ©es pour le rĂ©soudre. Dans cette thĂšse, je propose plusieurs mĂ©thodes pour rĂ©soudre les principaux problĂšmes
des outils existants, afin dâaider les dĂ©veloppeurs dans leurs activitĂ©s de maintenance et dâassurance qualitĂ©.
Ma thĂšse est quâil est possible dâamĂ©liorer le refactoring automatisĂ© en considĂ©rant de nouvelles dimensions : (1) le contexte de tĂąche du dĂ©veloppeur pour prioriser le refactoring des classes pertinentes ; (2) lâeffort du test pour rĂ©duire le coĂ»t des tests aprĂšs le refactoring ; (3)
lâidentification de conflit entre opĂ©rations de refactoring afin de rĂ©duire le coĂ»t de refactoring ; et (4) lâefficacitĂ© Ă©nergĂ©tique pour amĂ©liorer la consommation dâĂ©nergie des applications mobiles aprĂšs refactoring.----------ABSTRACT: Software maintenance cost is estimated to be more than 70% of the total cost of system, because of many factors, including new userâs requirements, the adoption of new technologies and the quality of software systems. From these factors, quality is the one that we can control and continually improved to prevent degradation of performance and reduction of effectiveness (a.k.a. design decay). Moreover, to stay competitive, the software industry has
shortened its release cycles to deliver new products and features faster, which results in more pressure on developer teams and the acceleration of systemâs design evolution. One way to prevent design decay is the identification and correction of anti-patterns which are indicators of poor design quality. To improve design quality and remove anti-patterns, developers perform small behavior-preserving transformations (a.k.a. refactoring). Manual refactoring is
expensive, as it requires to (1) identify the code entities that need to be refactored; (2) generate refactoring operations for classes identified in the previous step; (3) find the correct order of application of the refactorings generated, to maximize the quality effect and to minimize
conflicts. Hence, researchers and practitioners have formulated refactoring as an optimization problem and use search-based techniques to propose (semi)automated approaches to solve it. In this dissertation, we propose several approaches to tackle some of the major issues in
existing refactoring tools, to assist developers in their maintenance and quality assurance activities
An Empirical Study on the Impact of Deep Parameters on Mobile App Energy Usage
Improving software performance through configuration parameter tuning is a common activity during software maintenance. Beyond traditional performance metrics like latency, mobile app developers are interested in reducing app energy usage. Some mobile apps have centralized locations for parameter tuning, similar to databases and operating systems, but it is common for mobile apps to have hundreds of parameters scattered around the source code. The correlation between these deep parameters and app energy usage is unclear. Researchers have studied the energy effects of deep parameters in specific modules, but we lack a systematic understanding of the energy impact of mobile deep parameters.
In this paper we empirically investigate this topic, combining a developer survey with systematic energy measurements. Our motivational survey of 25 Android developers suggests that developers do not understand, and largely ignore, the energy impact of deep parameters. To assess the potential implications of this practice, we propose a deep parameter energy profiling framework that can analyze the energy impact of deep parameters in an app. Our framework identifies deep parameters, mutates them based on our parameter value selection scheme, and performs reliable energy impact analysis. Applying the framework to 16 popular Android apps, we discovered that deep parameter-induced energy inefficiency is rare. We found only 2 out of 1644 deep parameters for which a different value would significantly improve its app\u27s energy efficiency. A detailed analysis found that most deep parameters have either no energy impact, limited energy impact, or an energy impact only under extreme values. Our study suggests that it is generally safe for developers to ignore the energy impact when choosing deep parameter values in mobile apps
Towards energy-aware coding practices for Android
This paper studies how the use of different coding practices when developing Android applications influence energy consumption. We consider two common Java/Android programming practices, namely string operations and (non) cached image loading, and we show the energy profile of different coding practices for doing them. With string operations, we compare the performance of the usage of the standard String class to the usage of the StringBuilder class, while with our second practice we evaluate the benefits of image caching with asynchronous loading. We externally measure energy consumption of the example applications using the Trepn profiler application by Qualcomm. Our preliminary results show that selected coding practices do significantly affect energy consumption, in the particular cases of our practice selection, this difference varies between 20% and 50%.This work is funded by the Slovak Research and
Development Agency under the contract No. SK-PT2015-0037 and by the Portugal-Slovakia Cooperation FCT
Project (Ref. 441), and by the ERDF â European Regional
Development Fund through the Operational Programme
for Competitiveness and Internationalisation - COMPETE
2020 Programme and by National Funds through the
Portuguese funding agency, FCT â FundacĂŁo para a
CiĂȘncia e a Tecnologia within project POCI-01-0145-
FEDER-016718
Automated refactoring for Java concurrency
In multicore era, programmers exploit concurrent programming to gain performance and responsiveness benefits. However, concurrent programs are difficult to write: the programmer has to balance two conflicting forces, thread safety and performance.
To make concurrent programming easier, modern programming languages provide many kinds of concurrent constructs, such as threads, asynchronous tasks, concurrent collections, etc. However, despite the existence of these concurrent constructs, we know little about how developers use them. On the other hand, although existing API documentation teach developers how to use concurrent constructs, developers can still misuse and underuse them.
In this dissertation, we study the use, misuse, and underuse of two types of commonly used Java concurrent constructs: Java concurrent collections and Android async constructs. Our studies show that even though concurrent constructs are widely used in practice, developers still misuse and underuse them, causing semantic and performance bugs.
We propose and develop a refactoring toolset to help developers correctly use concurrent constructs. The toolset is composed of three automated refactorings: (i) detecting and fixing the misuses of Java concurrent collections, (ii) retro fitting concurrency for existing sequential Android code via a basic Android async construct, and (iii) converting inappropriately used basic Android async constructs to appropriately enhanced constructs for Android apps. Refactorings (i) and (iii) aim to fix misused constructs while refactoring (ii) aims to eliminate underuses.
First, we cataloged nine commonly misused check-then-act idioms of Java concurrent collections, and show the correct usage of each idiom. We implemented the detection strategies
in a tool, CTADetector, that finds and fi xes misused check-then-act idioms. We
applied CTADetector to 28 widely used open source Java projects (comprising 6.4 million lines of code) that use Java concurrent collections. CTADetector discovered and fixed 60
bugs. These bugs were con firmed by developers and the fixes were accepted.
Second, we conducted a formative study on how a basic Android async construct, AsyncTask, is used, misused, and underused in Android apps. Based on the study, we designed, developed, and evaluated Asynchronizer, an automated refactoring tool that enables developers to retrofit concurrency into Android apps. The refactoring uses a points-to static
analysis to determine the safety of the refactoring. We applied Asynchronizer to perform 123 refactorings in 19 widely used Android apps; their developers accepted 40 refactorings in 7 projects.
Third, we conducted a formative study on a corpus of 611 widely-used Android apps to map the asynchronous landscape of Android apps, understand how developers retrofi t concurrency in Android apps, and learn about barriers encountered by developers. Based on this study, we designed, implemented, and evaluated AsyncDroid, a refactoring tool which enables Android developers to transform existing improperly-used async constructs into correct constructs. We submitted 45 refactoring patches generated by AsyncDroid in 7 widely used Android projects, and developers accepted 15 of them.
Finally, we released all tools as open-source plugins for the widely used Eclipse IDE which has millions of Java users. Moreover, we also integrated CTADetector and AsyncDroid with a static analysis platform, ShipShape, that is developed by Google. Google envisions ShipShape to become a widely-used platform. Any app developer that wants to check code quality, for example before submitting an app to the app store, would run ShipShape on
her code base. We expect that by contributing new async analyzers to ShipShape, millions of app developers would bene t by being able to execute our analysis and transformations on their code
SPELLing out energy leaks: Aiding developers locate energy inefficient code
Although hardware is generally seen as the main culprit for a computer's energy usage, software too has a tremendous impact on the energy spent. Unfortunately, there is still not enough support for software developers so they can make their code more energy-aware.This paper proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code. This technique was implemented in the SPELL toolkit.Finally, in order to evaluate our technique, we conducted an empirical study where we asked participants to optimize the energy efficiency of a software system using our tool, while also having two other groups using no tool assistance and a profiler, respectively. We showed statistical evidence that developers using our technique were able to improve the energy efficiency by 43% on average, and even out performing a profiler for energy optimization. (C) 2019 Elsevier Inc. All rights reserved.This work is funded by the ERDF -European Regional Development Fund through the Operational Programme for Competitiveness and Internationalization -COMPETE 2020 Programme within project POCI-01-0145-FEDER-006961, and by National Funds through the Portuguese funding agency, FCT -Fundacao para a Ciencia e a Tecnologia within project POCI010145FEDER016718, UID/EEA/50014/2013, and by FCT grant SFRH/BD/132485/2017. This work is also supported by operation Centro010145FEDER000019 -C4 -Centro de Competencias em Cloud Computing, cofinanced by the European Regional Development Fund (ERDF) through the Programa Operacional Regional do Centro (Centro 2020), in the scope of the Sistema de Apoio a Investigacao Cientifica e Tecnologica -Programas Integrados de IC&DT, and the first author was financed by post-doc grant referencia C4_SMDS_L1-1_D
- âŠ