SlideShare a Scribd company logo
Software Analytics for Mobile Applications
Insights & Lessons Learned




Roberto Minelli & Michele Lanza
REVEAL @ Faculty of Informatics
University of Lugano, Switzerland




 Università
 della
 Svizzera
 italiana      R   E   V   E   A   L
Software   Analytics...
...to Mobile
     Applications
...to Mobile
               Applications




Apps are software systems
aimed at smartphones, tablet
PCs, and other handheld devices
Apps are written in different
         Languages...
C++
                               Java


           Objective-C
      C#                 C/C++, Java, etc.
Apps are written in different
           Languages...
 C++
                                 Java


             Objective-C
       C#                  C/C++, Java, etc.

...and distributed via different
App Stores
The marketplace
   is vast



1,000,000
apps to download
$4.5 billions   “Mobile application and its global impact”
                R. Islam, R. Islam, and T. Mazumder [IJEST 2010].
in 2009
$4.5 billions         “Mobile application and its global impact”
                      R. Islam, R. Islam, and T. Mazumder [IJEST 2010].
in 2009
                      “Mobile application sales to reach $17.5bn by 2012”
                      http://news.bbc.co.uk




                $17.5in billions
                        2012
$4.5 billions         “Mobile application and its global impact”
                      R. Islam, R. Islam, and T. Mazumder [IJEST 2010].
in 2009
                      “Mobile application sales to reach $17.5bn by 2012”
                      http://news.bbc.co.uk

                      “Global mobile application market (2010- 2015)”
                      Markets and Markets, August 2010.




                $17.5in billions
                        2012




                  $25 billions                                 in 2015
Apps are becoming more
    popular...
...and evolve
      over time...
...thus maintenance
           is critical!
“Programs, Life Cycles, and
Laws of Software Evolution”



         1980           1981   1982
“Software evolution observations
        based on product release history”
                        “Implications of evolution metrics
                           on software maintenance”
          “Metrics and laws of software
          evolution - the nineties view”
 “Laws of software                                           “Evolution in open source
evolution revisited”                                          software: A case study”


     1996              1997         1998            1999             2000           20
2006   2007   2008   2009   2010   2011
S A MO A
                   Software Analytics for MObile Applications



             “Software Analytics for Mobile
                Applications – Insights &
                   Lessons Learned”



0   2011   2012             2013
S A MO A
A web-based software analytics tool for apps
Software Analytics
for MObile A pplications
S A MO A
http://samoa.inf.usi.ch
Source Code

Evolution

Use of
3 rd   Party Libraries
Source Code

Evolution

Use of
3 rd   Party Libraries
Source Code

Evolution

Use of
3 rd   Party Libraries
Snapshot   view
<manifest xmlns:androi
                        d="http://schemas.
 android.com/apk/res/an
                        droid"
  package="ch.inf.andro
                         id.app"
  android:versionCode=
                        "1"
  android:versionName=
                         "1.0">
  <application android>
    <activity
     android:name="android
                             VNC"
     android:label="@string/
                             title_info">
     <intent-filter>
        <action android:name=
                                 "android.intent.action.M
        <category                                         AIN" />
android:name="android
                       .intent.category.LAUN
                                                CHER" />
     </intent-filter>
   </activity>
   <activity
     android:name=".Anoth
                            erActivity"
     android:theme="@andr
                             oid:style/Theme.Dialog"
     android:label="@string/
                             title_details" />
   <activity
    android:name=".YetAno
                             therActivity"
    android:launchMode="s
                             ingleTop"
    android:label="@string/
                            title_configure"
    android:windowSoftInpu
                             tMode="stateHidden">
  </activity>
</application>




 Manifest.xml
Snapshot     view


History   view
Snapshot     view


History   view



Ecosystem view
S A MO A

DEMO
http://samoa.inf.usi.ch
BACK-END                                               FRONT-END



                                 Source code model extraction                            SAMOA
 SVN
  SVN
   SVN
    SVN
                                AST generator    MSE generator           JSON retrieval               d3.js



                                 AST parser       MSE parser               JavaScript/
                                                                                                    HTML/CSS
                                                                          jQuery/PHP
Data acquisition


   Java SVN                                                      JSON                    Internet
    crawler                                                      Files




        Metrics extraction


  AST-based          MSE-based
   metrics            metrics
The
Outcome
www.F-Droid.org
...Android apps
Name                    Rate         Installs          Start rev.        End rev.         Size (LOC)
Alogcat                        4.6          >100k                    2               48           876
Andless                        4.2          >100k                    2               93          2372
Android VNC                    4.3              >1m                  2              203          4949
Anstop                         N/A              N/A                  2               61          1142
AppSoundmanager                4.5              >50k                 1              157          1605
AppsOrganizer                  4.6              >1m                  3              191          8321
CSIPSimple                     4.4          >100k                    2          1415            20777
Diskusage                      4.7              >50k                 2               69          4749
Mythdroid                      N/A              N/A                 76              640          6114
Mythmote                       4.6              >10k                 2              281          1593
Open GPS Tracker               4.2          >100k                    2          1255             9754
Opensudoku                     4.6              >1m                 15              415          3813
Replicaisland                  4.2              >1m                  2                7         14192
Ringdroid                      4.6          >10m                     2               66          3516
Search Light                   4.7          >100k                    2                4           272
Share My Position              4.6              >10k                 2               76           468
SIPDroid                       4.0          >500k                   50              620         14019
Solitaire for Android          4.3          >10m                     2               30          3343
Zirco Browser                  3.8              >10k                65              457          6429
Zxing                          4.3          >50m                569             2257             3407
Metric    Description
NOP       The Number of Packages of a project.
NOC       The Number of Classes defined by the user.
NOM       The Number of Methods defined by the user.
LOC       The number of (non-empty) Lines of Code.
CYCLO     McCabe’s Cyclomatic Complexity.
CALLS     The number of (distinct) Method Calls.
FANOUT    The Number of Called Classes.
ANDC      The Average Number of Derived Classes. The metric does not count interfaces.
          The Average Hierarchy Height of a system. A class is a root class if it is not an
AHH
          interface and not derived from user-defined classes.
          The Number of Internal Calls, i.e., invocations of methods that implement
INTC
          internal behavior
EXTC      The Number of External Calls, i.e., invocations that refer to 3rd-party libraries.
NOCE      The Number of Core Elements.
CORELOC   The sum of LOC of core elements.
COMMITS   The Number of Commits of an app.
CALLR     The ratio between INTC and EXTC.
CORER     The ratio between CoreLOC and LOC.
Metric         Description
NOP            The Number of Packages of a project.
NOC            The Number of Classes defined by the user.
NOM            The Number of Methods defined by the user.
LOC            The number of (non-empty) Lines of Code.
CYCLO          McCabe’s Cyclomatic Complexity.
CALLS          The number of (distinct) Method Calls.
FANOUT         The Number of Called Classes.
ANDC           The Average Number of Derived Classes. The metric does not count interfaces.
               The Average Hierarchy Height of a system. A class is a root class if it is not an
AHH
               interface and not derived from user-defined classes.
               The Number of Internal Calls, i.e., invocations of methods that implement
INTC
               internal behavior
EXTC           The Number of External Calls, i.e., invocations that refer to 3rd-party libraries.
NOCE           The Number of Core Elements.
CORELOC        The sum of LOC of core elements.
COMMITS        The Number of Commits of an app.
CALLR          The ratio between INTC and EXTC.
CORER          The ratio between CoreLOC and LOC.

“Object-oriented Software Metrics”                           “Object-Oriented Metrics in Practice”
        M. Lorenz and J. Kidd, 1994                          M. Lanza and R. Marinescu, 2006
Metric        Description
NOP           The Number of Packages of a project.
NOC           The Number of Classes defined by the user.
NOM           The Number of Methods defined by the user.
LOC           The number of (non-empty) Lines of Code.
CYCLO         McCabe’s Cyclomatic Complexity.
CALLS         The number of (distinct) Method Calls.
FANOUT        The Number of Called Classes.
ANDC          The Average Number of Derived Classes. The metric does not count interfaces.
              The Average Hierarchy Height of a system. A class is a root class if it is not an
AHH
              interface and not derived from user-defined classes.
              The Number of Internal Calls, i.e., invocations of methods that implement
INTC
              internal behavior
EXTC          The Number of External Calls, i.e., invocations that refer to 3rd-party libraries.
NOCE          The Number of Core Elements.
CORELOC       The sum of LOC of core elements.
COMMITS       The Number of Commits of an app.
CALLR         The ratio between INTC and EXTC.
CORER         The ratio between CoreLOC and LOC.

“Software Analytics for Mobile Applications”
           Roberto Minelli, MSc Thesis, 2012
Catalogue    o f c h a r a c t e r is t ic s
                                                             of apps




                       S A MO A
                        Software Analytics for
                                               MObile Applications


“Software Analytics for Mobile Applications”
           Roberto Minelli, MSc Thesis, 2012
Insights &
Lessons Learned
Apps are smaller than traditional software systems.

                    Facts:
                    ✴Average size is 5.6 kLOC.
                    ✴Smallest app is <300LOC.
                    ✴Largest app is ~20kLOC.

                    Implications:
                    ✴Often apps have few functionalities,
                    thus a few classes are enough to build
                    them...
                    ✴...but it seems they are not trivial to
                    comprehend and maintain.
Apps are inherently complex, mostly because they
rely on third-party libraries.

                   Facts:
                   ✴External calls are about 2/3 of all
                   method invocations.
                   ✴In some apps external calls are more
                   than 75% of the total.
                   Implications:
                   ✴To comprehend apps, analysts must
                   understand the behavior of the 3rd
                   party libraries, complicating program
                   comprehension and maintenance.
The size and complexity of apps grow in correlation
with the addition of third-party method invocations.

                    Facts:
                    ✴The correlation between number of
                    external calls and complexity
                    number is high (x = 0.82).
                    ✴The correlation between number of
                    LOC and complexity number is also
                    high (x = 0.84).
                    Implications:
                    ✴The growth of an app can be
                    connected with the usage of the
                    external libraries.
The use of inheritance is almost absent in apps.


                          Average Hierarchy Height (AHH)   = 0.09
We studied breadth and depth of the inheritance...
             Average Number of Derived Classes (ANDC)   = 0.19

Facts:
✴The apps in our corpus have very small average values for
both these metrics.
✴Apps tend to be small, thus there is little potential for
inheritance.
Implications:
✴We suspect that if they evolve over a long time, they will
grow in size, according the Lehman’s software evolution laws.
Some apps contain the entire source code of third-
party libraries.

                    Facts:
                    ✴In Java systems 3rd party libraries
                    are reused by referencing JARs.
                    ✴In some apps developers directly
                    import the entire source code of 3rd
                    party libraries.
                    Implications:
                    ✴Copying external code into a
                    system can have a series of legal
                    consequences.
Some developers use versioning systems only at
  later stages of the development.

                     Facts:
                     ✴It is a good practice to put software
                     projects under revision control early.
                     ✴On average, the LOC of the first
(a)
                     revision represents ca. 1/3 of the LOC
                     at the end of the evolution.
                     ✴The quality of any software analysis is
      (b)   (c)
                     connected to the quality of the
                     available data.
Some developers use versioning systems only at
  later stages of the development.

                               Facts:
                               ✴It is a good practice to put software
                               projects under revision control early.
            “Initial add, corresponds to
                                 On average, the LOC of the first
                market version✴1.8”.
(a)
                               revision represents ca. 1/3 of the LOC
                               at the end of the evolution.
                               ✴The quality of any software analysis is
      (b)       (c)
                               connected to the quality of the
                               available data.
Some developers use versioning systems only at
  later stages of the development.

                       Facts:
                       ✴It is a good practice to put software
                       projects under revision control early.
                       ✴On average, the LOC of the first
(a)
                       revision represents ca. 1/3 of the LOC
                       at the end of the evolution.
                       ✴The quality of any software analysis is
      (b)   (c)
                       connected to the quality of the
                       available data.


Implications:
✴Incomplete histories make retrospective software evolution
analysis difficult.
Developers often break the connection between
Android manifest and source code.

                   Facts:
                   ✴As all software systems, apps are also
    “core drop”    made up of pieces which are not
                   source code.
                   ✴The manifest file identifies core
                   elements of an app.
                   ✴Developers must manually maintain
                   this file in sync with the source code.
Developers often break the connection between
Android manifest and source code.

                   Facts:
                   ✴As all software systems, apps are also
                   made up of pieces which are not
                   source code.
                   ✴The manifest file identifies core
              “unbroke the app after the big
               subpackage reshuffle of ’09:
                   elements of an app.
              Updated manifest entries [...]”
                   ✴Developers must manually maintain
                   this file in sync with the source code.
Developers often break the connection between
 Android manifest and source code.

                       Facts:
                       ✴As all software systems, apps are also
                       made up of pieces which are not
                       source code.
                       ✴The manifest file identifies core
                       elements of an app.
                       ✴Developers must manually maintain
                       this file in sync with the source code.
Implications:
✴We believe that the maintenance and understanding of such
pieces will become a concern.
                              “An empirical study of build maintenance effort”
                              S. McIntosh et al., [ICSE 2009]
Development guidelines are often ignored.

                            Facts:
                            ✴Software systems should conform to
                            a set of sound guiding principles.
                            ✴In Android, one of such guidelines is
                            that an app must have only one main
                            activity.
                            Implications:
                            ✴Multiple main activities are multiple
                            entry points, complicating the
                            comprehension of apps.


  “Default” main activity      Activity     Main activity     Service
Some apps are only composed of the core.

                                       Facts:
                                       ✴On average, CORELOC represent ca.
                                       half of the size of an entire app.
                                       ✴In our corpus 25% of the apps have
                                       more than 70% of CORELOC.
                                       Implications:
                                       ✴Those apps violate basic design
                                       guidelines (i.e., separation of
                                       concerns and encapsulation).
                                       ✴“God activities”, like god classes, are
                                       a maintenance problem.
“Object-Oriented Design Heuristics”
                      A. Riel, 1996.
...for Mobile                Apps are written in different
Software Analytics for Mobile Applications
Insights & Lessons Learned
                                                                                                                Applications                    Languages...
                                                                                                                                      C++
                                                                                                                                                                                                Java
Roberto Minelli & Michele Lanza
REVEAL @ Faculty of Informatics
University of Lugano, Switzerland                                                                                                                     Objective-C
                                                                                                                                            C#                                            C/C++, Java, etc.
                                                                                                  Apps are software systems
                                                                                                  aimed at smartphones, tablet       ...and distributed via different
 Università
 della
 Svizzera
 italiana      R   E   V   E   A   L
                                                                                                  PCs, and other handheld devices.
                                                                                                                                     App Stores
$4.5 billions
in 2009
                                       “Mobile application and its global impact”
                                       R. Islam, R. Islam, and T. Mazumder [IJEST 2010].

                                       “Mobile application sales to reach $17.5bn by 2012”
                                                                                                                                                  S A MO A
                                                                                                                                                  Software Analytics for MObile Applications

                                       http://news.bbc.co.uk                                                                                     http://samoa.inf.usi.ch
                                       “Global mobile application market (2010- 2015)”
                                       Markets and Markets, August 2010.




                       $17.5in billions
                               2012




                                                                                               ...thus maintenance
                               $25 billions                                     in 2015                   is critical!

Source Code                                                                                  Snapshot        view                    Insights &
                                                                                                                                     Lessons Learned
Evolution                                                                                    History    view


Use of
3rd Party Libraries                                                                          Ecosystem view
Apps are inherently complex, mostly because they                            The size and complexity of apps grow in correlation
 Apps are smaller than traditional software systems.                                                                                                           with the addition of third-party method invocations.
                                                                                   rely on third-party libraries.

                         Facts:                                                                                Facts:                                                                               Facts:
                         ✴Average size is 5.6 kLOC.                                                            ✴External calls are about 2/3 of all                                                 ✴The correlation between number of
                         ✴Smallest app is <300LOC.                                                             method invocations.                                                                  external calls and complexity
                         ✴Largest app is ~20kLOC.                                                              ✴In some apps external calls are more                                                number is high (x = 0.82).
                                                                                                               than 75% of the total.                                                               ✴The correlation between number of
                         Implications:
                                                                                                                                                                                                    LOC and complexity number is also
                         ✴Often apps have few functionalities,                                                 Implications:                                                                        high (x = 0.84).
                         thus a few classes are enough to build                                                ✴To comprehend apps, analysts must
                         them...                                                                               understand the behavior of the 3rd                                                   Implications:
                         ✴...but it seems they are not trivial to                                              party libraries, complicating program                                                ✴The growth of an app can be
                         comprehend and maintain.                                                              comprehension and maintenance.                                                       connected with the usage of the
                                                                                                                                                                                                    external libraries.




                                                                                   Some apps contain the entire source code of third-                          Some developers use versioning systems only at
 The use of inheritance is almost absent in apps.                                  party libraries.                                                            later stages of the development.

                          Average Hierarchy Height (AHH)              = 0.09                                   Facts:                                                                               Facts:
                                                                                                               ✴In Java systems 3rd party libraries                                                 ✴It is a good practice to put software
We studied breadth and depth of the inheritance...
                                                                                                               are reused by referencing JARs.                                                      projects under revision control early.
             Average Number of Derived Classes (ANDC)            = 0.19                                        ✴In some apps developers directly                                                    ✴On average, the LOC of the first
                                                                                                               import the entire source code of 3rd                                                 revision represents ca. 1/3 of the LOC
                                                                                                                                                             (a)


Facts:                                                                                                         party libraries.                                                                     at the end of the evolution.
✴The apps in our corpus have very small average values for                                                                                                                                          ✴The quality of any software analysis is
both these metrics.                                                                                            Implications:                                       (b)            (c)
                                                                                                                                                                                                    connected to the quality of the
✴Apps tend to be small, thus there is little potential for                                                     ✴Copying external code into a
                                                                                                                                                                                                    available data.
inheritance.                                                                                                   system can have a series of legal
                                                                                                               consequences.
Implications:
                                                                                                                                                             Implications:
✴We suspect that if they evolve over a long time, they will
                                                                                                                                                             ✴Incomplete histories make retrospective software evolution
grow in size, according the Lehman’s software evolution laws.
                                                                                                                                                             analysis difficult.



 Developers often break the connection between
 Android manifest and source code.                                                 Development guidelines are often ignored.                                   Some apps are only composed of the core.

                         Facts:                                                                                Facts:                                                                               Facts:
                         ✴As all software systems, apps are also                                               ✴Software systems should conform to                                                  ✴On average, CORELOC represent ca.
                         made up of pieces which are not                                                       a set of sound guiding principles.                                                   half of the size of an entire app.
                         source code.                                                                          ✴In Android, one of such guidelines is                                               ✴In our corpus 25% of the apps have
                         ✴The manifest file identifies core                                                    that an app must have only one main                                                  more than 70% of CORELOC.
                         elements of an app.                                                                   activity.
                         ✴Developers must manually maintain
                                                                                                                                                                                                    Implications:
                                                                                                               Implications:                                                                        ✴Those apps violate basic design
                         this file in sync with the source code.
                                                                                                               ✴Multiple main activities are multiple                                               guidelines (i.e., separation of
Implications:                                                                                                  entry points, complicating the                                                       concerns and encapsulation).
✴We believe that the maintenance and understanding of such                                                     comprehension of apps.                                                               ✴“God activities”, like god classes, are
pieces will become a concern.                                                                                                                                                                       a maintenance problem.
                                                                                                                                                             “Object-Oriented Design Heuristics”
                                “An empirical study of build maintenance effort”                                                                                                   A. Riel, 1996.
                                S. McIntosh et al., [ICSE 2009]                      “Default” main activity      Activity     Main activity       Service

More Related Content

Similar to Software Analytics for Mobile Applications – Insights & Lessons Learned [CSMR2013]

Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)
ClubHack
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
Roy Clarkson
 
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay ScreensLiferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Denis Signoretto
 
Outsmarting smartphones
Outsmarting smartphonesOutsmarting smartphones
Outsmarting smartphones
SensePost
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better Performance
Elif Boncuk
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
Michael Angelo Rivera
 
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Skills Matter
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
hugs
 
001-Mobile Application.pptx
001-Mobile Application.pptx001-Mobile Application.pptx
001-Mobile Application.pptx
AhmedDarre
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
PERKYTORIALS
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
Peter van der Linden
 
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele PecorariMobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Olivier DASINI
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
Mohammed Adam
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
Sauce Labs
 
Mobile is slow - Over the Air 2013
Mobile is slow - Over the Air 2013Mobile is slow - Over the Air 2013
Mobile is slow - Over the Air 2013
Jon Arne Sæterås
 
Android Basics
Android BasicsAndroid Basics
Android Basics
Arvind Sahu
 
Mobile testingartifacts
Mobile testingartifactsMobile testingartifacts
Mobile testingartifactsPragya Rastogi
 
Gradle for Android Developers
Gradle for Android DevelopersGradle for Android Developers
Gradle for Android Developers
Josiah Renaudin
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic framework
Swaminathan Vetri
 

Similar to Software Analytics for Mobile Applications – Insights & Lessons Learned [CSMR2013] (20)

Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)Hacking your Droid (Aditya Gupta)
Hacking your Droid (Aditya Gupta)
 
Native Android Development Practices
Native Android Development PracticesNative Android Development Practices
Native Android Development Practices
 
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay ScreensLiferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
Liferay Italy Symposium 2015 Liferay Mobile SDK and Liferay Screens
 
Outsmarting smartphones
Outsmarting smartphonesOutsmarting smartphones
Outsmarting smartphones
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better Performance
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
Droidcon: Sean Owen: Driving Downloads via Intents- 29/10/2010
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
001-Mobile Application.pptx
001-Mobile Application.pptx001-Mobile Application.pptx
001-Mobile Application.pptx
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Intro to Android Programming
Intro to Android ProgrammingIntro to Android Programming
Intro to Android Programming
 
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele PecorariMobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
 
Android Penetration testing - Day 2
 Android Penetration testing - Day 2 Android Penetration testing - Day 2
Android Penetration testing - Day 2
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
 
Mobile is slow - Over the Air 2013
Mobile is slow - Over the Air 2013Mobile is slow - Over the Air 2013
Mobile is slow - Over the Air 2013
 
Android Basics
Android BasicsAndroid Basics
Android Basics
 
Mobile testingartifacts
Mobile testingartifactsMobile testingartifacts
Mobile testingartifacts
 
Gradle for Android Developers
Gradle for Android DevelopersGradle for Android Developers
Gradle for Android Developers
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic framework
 

More from Roberto Minelli

SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
Roberto Minelli
 
DFlow is dead. Long live Tako!
DFlow is dead. Long live Tako!DFlow is dead. Long live Tako!
DFlow is dead. Long live Tako!
Roberto Minelli
 
Traduzioni: Ieri, Oggi e Domani

Traduzioni: Ieri, Oggi e Domani
Traduzioni: Ieri, Oggi e Domani

Traduzioni: Ieri, Oggi e Domani

Roberto Minelli
 
Come Creare un Talk in Stile TED

Come Creare un Talk in Stile TED
Come Creare un Talk in Stile TED

Come Creare un Talk in Stile TED

Roberto Minelli
 
Interaction-Aware Development Environments
Interaction-Aware Development EnvironmentsInteraction-Aware Development Environments
Interaction-Aware Development Environments
Roberto Minelli
 
Visualizing the Evolution of Working Sets
Visualizing the Evolution of Working SetsVisualizing the Evolution of Working Sets
Visualizing the Evolution of Working Sets
Roberto Minelli
 
Taming the IDE with Fine-Grained Interaction Data
Taming the IDE with Fine-Grained Interaction Data    Taming the IDE with Fine-Grained Interaction Data
Taming the IDE with Fine-Grained Interaction Data
Roberto Minelli
 
Measuring Navigation Efficiency in the IDE
Measuring Navigation Efficiency in the IDEMeasuring Navigation Efficiency in the IDE
Measuring Navigation Efficiency in the IDE
Roberto Minelli
 
Mining IDE Interaction Data
Mining IDE Interaction DataMining IDE Interaction Data
Mining IDE Interaction Data
Roberto Minelli
 
Interaction-Aware Development Environments
 Interaction-Aware Development Environments Interaction-Aware Development Environments
Interaction-Aware Development Environments
Roberto Minelli
 
The Plague Doctor: A Promising Cure for the Window Plague
The Plague Doctor: A Promising Cure for the Window PlagueThe Plague Doctor: A Promising Cure for the Window Plague
The Plague Doctor: A Promising Cure for the Window Plague
Roberto Minelli
 
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
Roberto Minelli
 
Free Hugs — Praising developers for their actions [ICSE2015]
Free Hugs — Praising developers for their actions  [ICSE2015]Free Hugs — Praising developers for their actions  [ICSE2015]
Free Hugs — Praising developers for their actions [ICSE2015]
Roberto Minelli
 
Quantifying Program Comprehension with Interaction Data [QSIC2014]
Quantifying Program Comprehension with Interaction Data [QSIC2014]Quantifying Program Comprehension with Interaction Data [QSIC2014]
Quantifying Program Comprehension with Interaction Data [QSIC2014]
Roberto Minelli
 
Visualizing Developer Interactions [VISSOFT2014]
Visualizing Developer Interactions [VISSOFT2014]Visualizing Developer Interactions [VISSOFT2014]
Visualizing Developer Interactions [VISSOFT2014]
Roberto Minelli
 
Visual Storytelling of Development Sessions [ICSME2014]
Visual Storytelling of Development Sessions [ICSME2014] Visual Storytelling of Development Sessions [ICSME2014]
Visual Storytelling of Development Sessions [ICSME2014]
Roberto Minelli
 
Towards Self-Adaptive IDEs [ICSME2014]
Towards Self-Adaptive IDEs [ICSME2014]Towards Self-Adaptive IDEs [ICSME2014]
Towards Self-Adaptive IDEs [ICSME2014]
Roberto Minelli
 
Visualizing the Workflow of Developers [VISSOFT2013]
Visualizing the Workflow of Developers [VISSOFT2013]Visualizing the Workflow of Developers [VISSOFT2013]
Visualizing the Workflow of Developers [VISSOFT2013]
Roberto Minelli
 

More from Roberto Minelli (18)

SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
SYN: Ultra-Scale
Software Evolution Comprehension [ICPC 2023]
 
DFlow is dead. Long live Tako!
DFlow is dead. Long live Tako!DFlow is dead. Long live Tako!
DFlow is dead. Long live Tako!
 
Traduzioni: Ieri, Oggi e Domani

Traduzioni: Ieri, Oggi e Domani
Traduzioni: Ieri, Oggi e Domani

Traduzioni: Ieri, Oggi e Domani

 
Come Creare un Talk in Stile TED

Come Creare un Talk in Stile TED
Come Creare un Talk in Stile TED

Come Creare un Talk in Stile TED

 
Interaction-Aware Development Environments
Interaction-Aware Development EnvironmentsInteraction-Aware Development Environments
Interaction-Aware Development Environments
 
Visualizing the Evolution of Working Sets
Visualizing the Evolution of Working SetsVisualizing the Evolution of Working Sets
Visualizing the Evolution of Working Sets
 
Taming the IDE with Fine-Grained Interaction Data
Taming the IDE with Fine-Grained Interaction Data    Taming the IDE with Fine-Grained Interaction Data
Taming the IDE with Fine-Grained Interaction Data
 
Measuring Navigation Efficiency in the IDE
Measuring Navigation Efficiency in the IDEMeasuring Navigation Efficiency in the IDE
Measuring Navigation Efficiency in the IDE
 
Mining IDE Interaction Data
Mining IDE Interaction DataMining IDE Interaction Data
Mining IDE Interaction Data
 
Interaction-Aware Development Environments
 Interaction-Aware Development Environments Interaction-Aware Development Environments
Interaction-Aware Development Environments
 
The Plague Doctor: A Promising Cure for the Window Plague
The Plague Doctor: A Promising Cure for the Window PlagueThe Plague Doctor: A Promising Cure for the Window Plague
The Plague Doctor: A Promising Cure for the Window Plague
 
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
I Know What You Did Last Summer – An Investigation of How Developers Spend Th...
 
Free Hugs — Praising developers for their actions [ICSE2015]
Free Hugs — Praising developers for their actions  [ICSE2015]Free Hugs — Praising developers for their actions  [ICSE2015]
Free Hugs — Praising developers for their actions [ICSE2015]
 
Quantifying Program Comprehension with Interaction Data [QSIC2014]
Quantifying Program Comprehension with Interaction Data [QSIC2014]Quantifying Program Comprehension with Interaction Data [QSIC2014]
Quantifying Program Comprehension with Interaction Data [QSIC2014]
 
Visualizing Developer Interactions [VISSOFT2014]
Visualizing Developer Interactions [VISSOFT2014]Visualizing Developer Interactions [VISSOFT2014]
Visualizing Developer Interactions [VISSOFT2014]
 
Visual Storytelling of Development Sessions [ICSME2014]
Visual Storytelling of Development Sessions [ICSME2014] Visual Storytelling of Development Sessions [ICSME2014]
Visual Storytelling of Development Sessions [ICSME2014]
 
Towards Self-Adaptive IDEs [ICSME2014]
Towards Self-Adaptive IDEs [ICSME2014]Towards Self-Adaptive IDEs [ICSME2014]
Towards Self-Adaptive IDEs [ICSME2014]
 
Visualizing the Workflow of Developers [VISSOFT2013]
Visualizing the Workflow of Developers [VISSOFT2013]Visualizing the Workflow of Developers [VISSOFT2013]
Visualizing the Workflow of Developers [VISSOFT2013]
 

Recently uploaded

DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
JezreelCabil2
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Software Analytics for Mobile Applications – Insights & Lessons Learned [CSMR2013]

  • 1. Software Analytics for Mobile Applications Insights & Lessons Learned Roberto Minelli & Michele Lanza REVEAL @ Faculty of Informatics University of Lugano, Switzerland Università della Svizzera italiana R E V E A L
  • 2. Software Analytics...
  • 3. ...to Mobile Applications
  • 4. ...to Mobile Applications Apps are software systems aimed at smartphones, tablet PCs, and other handheld devices
  • 5. Apps are written in different Languages... C++ Java Objective-C C# C/C++, Java, etc.
  • 6. Apps are written in different Languages... C++ Java Objective-C C# C/C++, Java, etc. ...and distributed via different App Stores
  • 7. The marketplace is vast 1,000,000 apps to download
  • 8. $4.5 billions “Mobile application and its global impact” R. Islam, R. Islam, and T. Mazumder [IJEST 2010]. in 2009
  • 9. $4.5 billions “Mobile application and its global impact” R. Islam, R. Islam, and T. Mazumder [IJEST 2010]. in 2009 “Mobile application sales to reach $17.5bn by 2012” http://news.bbc.co.uk $17.5in billions 2012
  • 10. $4.5 billions “Mobile application and its global impact” R. Islam, R. Islam, and T. Mazumder [IJEST 2010]. in 2009 “Mobile application sales to reach $17.5bn by 2012” http://news.bbc.co.uk “Global mobile application market (2010- 2015)” Markets and Markets, August 2010. $17.5in billions 2012 $25 billions in 2015
  • 11. Apps are becoming more popular...
  • 12. ...and evolve over time...
  • 13. ...thus maintenance is critical!
  • 14. “Programs, Life Cycles, and Laws of Software Evolution” 1980 1981 1982
  • 15. “Software evolution observations based on product release history” “Implications of evolution metrics on software maintenance” “Metrics and laws of software evolution - the nineties view” “Laws of software “Evolution in open source evolution revisited” software: A case study” 1996 1997 1998 1999 2000 20
  • 16. 2006 2007 2008 2009 2010 2011
  • 17. S A MO A Software Analytics for MObile Applications “Software Analytics for Mobile Applications – Insights & Lessons Learned” 0 2011 2012 2013
  • 18. S A MO A A web-based software analytics tool for apps
  • 20. S A MO A http://samoa.inf.usi.ch
  • 21. Source Code Evolution Use of 3 rd Party Libraries
  • 22. Source Code Evolution Use of 3 rd Party Libraries
  • 23. Source Code Evolution Use of 3 rd Party Libraries
  • 24.
  • 25. Snapshot view
  • 26. <manifest xmlns:androi d="http://schemas. android.com/apk/res/an droid" package="ch.inf.andro id.app" android:versionCode= "1" android:versionName= "1.0"> <application android> <activity android:name="android VNC" android:label="@string/ title_info"> <intent-filter> <action android:name= "android.intent.action.M <category AIN" /> android:name="android .intent.category.LAUN CHER" /> </intent-filter> </activity> <activity android:name=".Anoth erActivity" android:theme="@andr oid:style/Theme.Dialog" android:label="@string/ title_details" /> <activity android:name=".YetAno therActivity" android:launchMode="s ingleTop" android:label="@string/ title_configure" android:windowSoftInpu tMode="stateHidden"> </activity> </application> Manifest.xml
  • 27. Snapshot view History view
  • 28. Snapshot view History view Ecosystem view
  • 29. S A MO A DEMO http://samoa.inf.usi.ch
  • 30. BACK-END FRONT-END Source code model extraction SAMOA SVN SVN SVN SVN AST generator MSE generator JSON retrieval d3.js AST parser MSE parser JavaScript/ HTML/CSS jQuery/PHP Data acquisition Java SVN JSON Internet crawler Files Metrics extraction AST-based MSE-based metrics metrics
  • 34. Name Rate Installs Start rev. End rev. Size (LOC) Alogcat 4.6 >100k 2 48 876 Andless 4.2 >100k 2 93 2372 Android VNC 4.3 >1m 2 203 4949 Anstop N/A N/A 2 61 1142 AppSoundmanager 4.5 >50k 1 157 1605 AppsOrganizer 4.6 >1m 3 191 8321 CSIPSimple 4.4 >100k 2 1415 20777 Diskusage 4.7 >50k 2 69 4749 Mythdroid N/A N/A 76 640 6114 Mythmote 4.6 >10k 2 281 1593 Open GPS Tracker 4.2 >100k 2 1255 9754 Opensudoku 4.6 >1m 15 415 3813 Replicaisland 4.2 >1m 2 7 14192 Ringdroid 4.6 >10m 2 66 3516 Search Light 4.7 >100k 2 4 272 Share My Position 4.6 >10k 2 76 468 SIPDroid 4.0 >500k 50 620 14019 Solitaire for Android 4.3 >10m 2 30 3343 Zirco Browser 3.8 >10k 65 457 6429 Zxing 4.3 >50m 569 2257 3407
  • 35. Metric Description NOP The Number of Packages of a project. NOC The Number of Classes defined by the user. NOM The Number of Methods defined by the user. LOC The number of (non-empty) Lines of Code. CYCLO McCabe’s Cyclomatic Complexity. CALLS The number of (distinct) Method Calls. FANOUT The Number of Called Classes. ANDC The Average Number of Derived Classes. The metric does not count interfaces. The Average Hierarchy Height of a system. A class is a root class if it is not an AHH interface and not derived from user-defined classes. The Number of Internal Calls, i.e., invocations of methods that implement INTC internal behavior EXTC The Number of External Calls, i.e., invocations that refer to 3rd-party libraries. NOCE The Number of Core Elements. CORELOC The sum of LOC of core elements. COMMITS The Number of Commits of an app. CALLR The ratio between INTC and EXTC. CORER The ratio between CoreLOC and LOC.
  • 36. Metric Description NOP The Number of Packages of a project. NOC The Number of Classes defined by the user. NOM The Number of Methods defined by the user. LOC The number of (non-empty) Lines of Code. CYCLO McCabe’s Cyclomatic Complexity. CALLS The number of (distinct) Method Calls. FANOUT The Number of Called Classes. ANDC The Average Number of Derived Classes. The metric does not count interfaces. The Average Hierarchy Height of a system. A class is a root class if it is not an AHH interface and not derived from user-defined classes. The Number of Internal Calls, i.e., invocations of methods that implement INTC internal behavior EXTC The Number of External Calls, i.e., invocations that refer to 3rd-party libraries. NOCE The Number of Core Elements. CORELOC The sum of LOC of core elements. COMMITS The Number of Commits of an app. CALLR The ratio between INTC and EXTC. CORER The ratio between CoreLOC and LOC. “Object-oriented Software Metrics” “Object-Oriented Metrics in Practice” M. Lorenz and J. Kidd, 1994 M. Lanza and R. Marinescu, 2006
  • 37. Metric Description NOP The Number of Packages of a project. NOC The Number of Classes defined by the user. NOM The Number of Methods defined by the user. LOC The number of (non-empty) Lines of Code. CYCLO McCabe’s Cyclomatic Complexity. CALLS The number of (distinct) Method Calls. FANOUT The Number of Called Classes. ANDC The Average Number of Derived Classes. The metric does not count interfaces. The Average Hierarchy Height of a system. A class is a root class if it is not an AHH interface and not derived from user-defined classes. The Number of Internal Calls, i.e., invocations of methods that implement INTC internal behavior EXTC The Number of External Calls, i.e., invocations that refer to 3rd-party libraries. NOCE The Number of Core Elements. CORELOC The sum of LOC of core elements. COMMITS The Number of Commits of an app. CALLR The ratio between INTC and EXTC. CORER The ratio between CoreLOC and LOC. “Software Analytics for Mobile Applications” Roberto Minelli, MSc Thesis, 2012
  • 38. Catalogue o f c h a r a c t e r is t ic s of apps S A MO A Software Analytics for MObile Applications “Software Analytics for Mobile Applications” Roberto Minelli, MSc Thesis, 2012
  • 40. Apps are smaller than traditional software systems. Facts: ✴Average size is 5.6 kLOC. ✴Smallest app is <300LOC. ✴Largest app is ~20kLOC. Implications: ✴Often apps have few functionalities, thus a few classes are enough to build them... ✴...but it seems they are not trivial to comprehend and maintain.
  • 41. Apps are inherently complex, mostly because they rely on third-party libraries. Facts: ✴External calls are about 2/3 of all method invocations. ✴In some apps external calls are more than 75% of the total. Implications: ✴To comprehend apps, analysts must understand the behavior of the 3rd party libraries, complicating program comprehension and maintenance.
  • 42. The size and complexity of apps grow in correlation with the addition of third-party method invocations. Facts: ✴The correlation between number of external calls and complexity number is high (x = 0.82). ✴The correlation between number of LOC and complexity number is also high (x = 0.84). Implications: ✴The growth of an app can be connected with the usage of the external libraries.
  • 43. The use of inheritance is almost absent in apps. Average Hierarchy Height (AHH) = 0.09 We studied breadth and depth of the inheritance... Average Number of Derived Classes (ANDC) = 0.19 Facts: ✴The apps in our corpus have very small average values for both these metrics. ✴Apps tend to be small, thus there is little potential for inheritance. Implications: ✴We suspect that if they evolve over a long time, they will grow in size, according the Lehman’s software evolution laws.
  • 44. Some apps contain the entire source code of third- party libraries. Facts: ✴In Java systems 3rd party libraries are reused by referencing JARs. ✴In some apps developers directly import the entire source code of 3rd party libraries. Implications: ✴Copying external code into a system can have a series of legal consequences.
  • 45. Some developers use versioning systems only at later stages of the development. Facts: ✴It is a good practice to put software projects under revision control early. ✴On average, the LOC of the first (a) revision represents ca. 1/3 of the LOC at the end of the evolution. ✴The quality of any software analysis is (b) (c) connected to the quality of the available data.
  • 46. Some developers use versioning systems only at later stages of the development. Facts: ✴It is a good practice to put software projects under revision control early. “Initial add, corresponds to On average, the LOC of the first market version✴1.8”. (a) revision represents ca. 1/3 of the LOC at the end of the evolution. ✴The quality of any software analysis is (b) (c) connected to the quality of the available data.
  • 47. Some developers use versioning systems only at later stages of the development. Facts: ✴It is a good practice to put software projects under revision control early. ✴On average, the LOC of the first (a) revision represents ca. 1/3 of the LOC at the end of the evolution. ✴The quality of any software analysis is (b) (c) connected to the quality of the available data. Implications: ✴Incomplete histories make retrospective software evolution analysis difficult.
  • 48. Developers often break the connection between Android manifest and source code. Facts: ✴As all software systems, apps are also “core drop” made up of pieces which are not source code. ✴The manifest file identifies core elements of an app. ✴Developers must manually maintain this file in sync with the source code.
  • 49. Developers often break the connection between Android manifest and source code. Facts: ✴As all software systems, apps are also made up of pieces which are not source code. ✴The manifest file identifies core “unbroke the app after the big subpackage reshuffle of ’09: elements of an app. Updated manifest entries [...]” ✴Developers must manually maintain this file in sync with the source code.
  • 50. Developers often break the connection between Android manifest and source code. Facts: ✴As all software systems, apps are also made up of pieces which are not source code. ✴The manifest file identifies core elements of an app. ✴Developers must manually maintain this file in sync with the source code. Implications: ✴We believe that the maintenance and understanding of such pieces will become a concern. “An empirical study of build maintenance effort” S. McIntosh et al., [ICSE 2009]
  • 51. Development guidelines are often ignored. Facts: ✴Software systems should conform to a set of sound guiding principles. ✴In Android, one of such guidelines is that an app must have only one main activity. Implications: ✴Multiple main activities are multiple entry points, complicating the comprehension of apps. “Default” main activity Activity Main activity Service
  • 52. Some apps are only composed of the core. Facts: ✴On average, CORELOC represent ca. half of the size of an entire app. ✴In our corpus 25% of the apps have more than 70% of CORELOC. Implications: ✴Those apps violate basic design guidelines (i.e., separation of concerns and encapsulation). ✴“God activities”, like god classes, are a maintenance problem. “Object-Oriented Design Heuristics” A. Riel, 1996.
  • 53. ...for Mobile Apps are written in different Software Analytics for Mobile Applications Insights & Lessons Learned Applications Languages... C++ Java Roberto Minelli & Michele Lanza REVEAL @ Faculty of Informatics University of Lugano, Switzerland Objective-C C# C/C++, Java, etc. Apps are software systems aimed at smartphones, tablet ...and distributed via different Università della Svizzera italiana R E V E A L PCs, and other handheld devices. App Stores $4.5 billions in 2009 “Mobile application and its global impact” R. Islam, R. Islam, and T. Mazumder [IJEST 2010]. “Mobile application sales to reach $17.5bn by 2012” S A MO A Software Analytics for MObile Applications http://news.bbc.co.uk http://samoa.inf.usi.ch “Global mobile application market (2010- 2015)” Markets and Markets, August 2010. $17.5in billions 2012 ...thus maintenance $25 billions in 2015 is critical! Source Code Snapshot view Insights & Lessons Learned Evolution History view Use of 3rd Party Libraries Ecosystem view
  • 54. Apps are inherently complex, mostly because they The size and complexity of apps grow in correlation Apps are smaller than traditional software systems. with the addition of third-party method invocations. rely on third-party libraries. Facts: Facts: Facts: ✴Average size is 5.6 kLOC. ✴External calls are about 2/3 of all ✴The correlation between number of ✴Smallest app is <300LOC. method invocations. external calls and complexity ✴Largest app is ~20kLOC. ✴In some apps external calls are more number is high (x = 0.82). than 75% of the total. ✴The correlation between number of Implications: LOC and complexity number is also ✴Often apps have few functionalities, Implications: high (x = 0.84). thus a few classes are enough to build ✴To comprehend apps, analysts must them... understand the behavior of the 3rd Implications: ✴...but it seems they are not trivial to party libraries, complicating program ✴The growth of an app can be comprehend and maintain. comprehension and maintenance. connected with the usage of the external libraries. Some apps contain the entire source code of third- Some developers use versioning systems only at The use of inheritance is almost absent in apps. party libraries. later stages of the development. Average Hierarchy Height (AHH) = 0.09 Facts: Facts: ✴In Java systems 3rd party libraries ✴It is a good practice to put software We studied breadth and depth of the inheritance... are reused by referencing JARs. projects under revision control early. Average Number of Derived Classes (ANDC) = 0.19 ✴In some apps developers directly ✴On average, the LOC of the first import the entire source code of 3rd revision represents ca. 1/3 of the LOC (a) Facts: party libraries. at the end of the evolution. ✴The apps in our corpus have very small average values for ✴The quality of any software analysis is both these metrics. Implications: (b) (c) connected to the quality of the ✴Apps tend to be small, thus there is little potential for ✴Copying external code into a available data. inheritance. system can have a series of legal consequences. Implications: Implications: ✴We suspect that if they evolve over a long time, they will ✴Incomplete histories make retrospective software evolution grow in size, according the Lehman’s software evolution laws. analysis difficult. Developers often break the connection between Android manifest and source code. Development guidelines are often ignored. Some apps are only composed of the core. Facts: Facts: Facts: ✴As all software systems, apps are also ✴Software systems should conform to ✴On average, CORELOC represent ca. made up of pieces which are not a set of sound guiding principles. half of the size of an entire app. source code. ✴In Android, one of such guidelines is ✴In our corpus 25% of the apps have ✴The manifest file identifies core that an app must have only one main more than 70% of CORELOC. elements of an app. activity. ✴Developers must manually maintain Implications: Implications: ✴Those apps violate basic design this file in sync with the source code. ✴Multiple main activities are multiple guidelines (i.e., separation of Implications: entry points, complicating the concerns and encapsulation). ✴We believe that the maintenance and understanding of such comprehension of apps. ✴“God activities”, like god classes, are pieces will become a concern. a maintenance problem. “Object-Oriented Design Heuristics” “An empirical study of build maintenance effort” A. Riel, 1996. S. McIntosh et al., [ICSE 2009] “Default” main activity Activity Main activity Service