Samoa — A Visual Software Analytics Platform for Mobile Applications Roberto Minelli and Michele Lanza REVEAL @ Faculty of Informatics — University of Lugano, Switzerland Abstract—Mobile applications, also known as apps, are ded- icated software systems that run on handheld devices, such as smartphones and tablet computers. The apps business has in a few years turned into a multi-billion dollar market. From a soft- ware engineering perspective apps represent a new phenomenon, and there is a need for tools and techniques to analyze apps. We present Samoa, a visual web-based software analytics platform for mobile applications. It mines software repositories of apps and uses a set of visualization techniques to present the mined data. We describe Samoa, detail the analyses it supports, and describe a methodology to understand apps from a structural and historical perspective. The website of Samoa, containing the screencast of the tool demo, is located at http://samoa.inf.usi.ch/about I. Introduction Mobile applications, or apps, are custom software systems running on handheld devices, i.e., smartphones and tablet PCs. The world of apps is variegated: Each vendor imposes a number of constraints (e.g., the programming language and development environment to be used), provides specific design guidelines, and offers its own distribution channel (e.g., Android’s Google Play, Apple’s App Store). The market of apps is remarkable: Apps generated a revenue of $4.5 billion USD in 2009 [1], and the business is expected to be worth $25 billion USD [2] a few years from now. The Apple and Google stores provide ca. one million apps for download. With their increasing popularity, apps are becoming an important software engineering domain. Apps represent a new phenomenon but, as any software system, they will inevitably face evolution, maintenance, and comprehension problems. It is unclear whether existing approaches for program comprehension and maintenance [3], [4], [5] can be ported to apps, since they were devised before apps existed. We devised a novel approach to analyze apps [6] and implemented Samoa, a web-based software analytics platform for apps 1 .Samoa mines software repositories of apps and uses a set of visualization techniques to present the mined data. Samoa offers a catalogue of custom views to understand the structure and evolution of apps. Both analysts and developers interested in comprehending apps can benefit from these visualizations. We used Samoa to investigate part of the F-Droid repository 2 . We discovered, for example, that inheritance is essentially unused in apps, that apps heavily rely on 3 rd -party APIs, and that most apps are short-lived single developer projects. 1 See http://samoa.inf.usi.ch 2 See http://f-droid.org Related work. Since the first apps were developed only a few years ago, there is little directly related work. Ruiz et al. focused on software design aspects of apps, namely on reuse by inheritance and class reuse [7]. They divided apps in categories (e.g., casino, personalization, photography), and found that more than 60% of all classes in each category appear in more than two other apps. Hundreds of apps were entirely reused by other apps in the same category. Harman et al. introduced “App Store Mining” [8], a novel form of software repository mining. They mined the Blackberry app store and studied a number of correlations between different features of apps. Differently from Harman et al. we want to focus on the source code of apps, rather than on app stores. Our goal is to understand the differences between apps and traditional software systems, and the implications for the maintenance and comprehension of apps. The novelty of apps explains the small amount of related work, but also calls for novel tools and techniques to analyze apps. We present Samoa, our visual web-based software analytics platform for mobile applications. Samoa leverages three factors for the analysis: source code, usage of 3 rd -party libraries, and historical data. Samoa presents the data to the user by means of a catalogue of interactive visualizations. The views are enriched with traditional software metrics complemented by domain-specific ones. Samoa provides a custom snapshot view to depict a specific revision of one app, a evolution view to present historical aspects of one app, and ecosystem views to depict several apps at once. II. Samoa:AVisual Software Analytics Platform for Apps Figure 1 depicts the main user interface of Samoa presenting a snapshot view of the Alogcat application. The UI is composed of five parts: a (1) Selection panel that allows the user to pick the app to be analyzed, and to switch between the different visualizations Samoa provides; a (2) Metrics panel which summarizes a set of metrics in sync with the visualization, being a specific revision of an app (i.e., snapshot) or global measurements about the apps ecosystem; a (3) Revision info panel that displays information about a specific revision of an app; an (4) Entity panel displaying additional details about the entity in focus; and the (5) Main view, the remaining surface dedicated to the interactive views. Figure 1 illustrates also how we enhance the view using colors and metrics.