News reports about leaks of information stored by major applications – collected through their use by ordinary citizens – are common, leaving personal data (often sensitive) exposed. In most cases, said leaks stem from software operating errors capable of causing astronomical losses to companies, both financially and in terms of reputation. It is not surprising that more means and efforts are being directed to detect software errors still in the earlier stages of their life cycle, highlighting the importance of using good coding practices. In this sense, INESC TEC researcher Rui Rua has been working to create solutions that improve the performance of Android applications, by changing the source code.
Static and dynamic software analysis approaches are often used by programmers to evaluate functional and non-functional aspects of the software in question, its life cycle and development environment. In the first case, they usually resort to techniques to evaluate application codes and resources to detect bugs without running the software. Concerning dynamic analysis, it aims to evaluate the execution of the code, to identify anomalous behaviours.
Although they represent a common practice to evaluate and validate the code, when talking about the Android ecosystem, there was no standard tool that allowed programmers and researchers to perform the benchmarking processes in native Android software in an automated way. To fill this gap, Rui Rua, a researcher at INESC TEC, developed PyAnaDroid, a “tool that considers several test frameworks, and is able to perform blackbox and whitebox analysis through static and dynamic analysis approaches. This way, it supports various energy profilers and mechanisms for execution and validation of applications”, as explained by the researcher.
The goal was to “provide a standard and open-source tool that the community can reuse to carry out studies that analyse Android code”, said Rui Rua. This approach allows “future work to be easily replicated and to validate results”.
Described in the paper PyAnaDroid: A fully customizable execution pipeline for benchmarking Android Applications, the solution featured at The International Conference on Software Maintenance and Evolution (ICSME’23); this is a Core A conference — the second highest level in the ranking of computing conferences —, “acknowledged in the field of software engineering, bringing together academia, industry and government entities to discuss and debate ideas, experiences and recent challenges in software maintenance and evolution”, according to the INESC TEC researcher.
With a focus on use-cases, the paper suggests, among other proposals, “their application in large-scale studies involving the analysis of large sets of applications, to discover anomalous patterns in terms of energy behaviour, detect functional errors, among others”, said Rui Rua. The automation of the testing and analysis process of applications is another possibility that is now available to developers through the new tool.
Recently, another paper by the researcher at INESC TEC High-assurance Software Laboratory (HASLab) featured in the Empirical Software Engineering (EMSE) (Q1), one of the “journals with the most impact on the area of Software Engineering”. The publication frequently discloses “empirical studies involving the collection and analysis of data and experiences that can be used to characterise, evaluate, and reveal relationships between software development deliverables, practices, and technologies”.
With Rui Rua it was no different. A large-scale empirical study on mobile performance: Energy, Run-time and Memory is the largest literature study ever done on the execution and dynamic performance analysis of Android applications. In it, the author performs a large-scale analysis of open-source Android applications, towards discovering coding patterns and practices that can influence the performance of mobile applications.
“There are numerous smaller studies in the literature demonstrating that it is possible to use dynamic application analysis techniques to detect and locate anomalies in terms of performance and define standards”, stated the researcher. “There are also many studies that have shown that it is possible to achieve significant performance gains (namely, in terms of energy performance) by correcting inefficient coding standards“.
The research supported the construction of a large database that was made available and can be used in other studies. According to the researcher, the work led to several “science and development” conclusions with relevance to the community, e.g., the impact of certain development and maintenance activities on energy consumption, definition of library rankings considering performance, etc.
“The community can use them to improve the performance of Android applications. It is also a way to raise the community’s awareness and encourage the development of more sustainable software “, he concluded. The topic of energy-efficient software has been one of the major points of Rui Rua’s research work.
The INESC TEC researcher mentioned in this news piece is associated with INESC TEC and UMinho.