SlideShare une entreprise Scribd logo
1  sur  42
Network vs. Code Metrics
to Predict Defects: A Replication Study



      Rahul Premraj             Kim Herzig
  VU University Amsterdam   Saarland University
The Original Study




Proceedings of the International Conference on
    Software Engineering (ICSE, May 2008).
The Original Study


Bug Database



                  code quality

Version Archive                  defect prediction
                                      model




 Source Code
                  code metrics
The Original Study

               model




code metrics      network metrics   combined metrics
The Original Study

               model




code metrics      network metrics   combined metrics

Network metrics outperformed code metrics!
What are Network Metrics?

                                         Code artifacts
•   Consider code artifacts                                             /**
                                                                         * Used by {@link #getThreadInformation()} for a traversal search of
                                                                         * {@link Thread}s/{@link ThreadGroup}s
                                                                         *
                                                                         * @param group
                                                                         * @param level
                                                                         * @return
                                                                         */
                                                                        private String visit(final ThreadGroup group,
                                                                             final int level) {
                                                                           // Get threads in `group'
                                                                           StringBuilder builder = new StringBuilder();
                                                                           int numThreads = group.activeCount();
                                                                           Thread[] threads = new Thread[numThreads * 2];
                                                                           numThreads = group.enumerate(threads, false);




    as communicating
                                                                            StringBuilder indent = new StringBuilder();
                                                                            for (int i = 0; i < level; ++i) {
                                                                              indent.append(" ");
                                                                            }

                                                                            // Enumerate each thread in `group'
                                                                            for (int i = 0; i < numThreads; i++) {
                                                                              // Get thread
                                                                              Thread thread = threads[i];
                                                                              builder.append(indent);
                                                                              builder.append("|-");
                                                                              builder.append(thread.getName()).append(" [");
                                                                              builder.append(thread.getClass().getSimpleName()).append("], ");
                                                                              builder.append(thread.getPriority()).append(", ");
                                                                              builder.append(thread.getState().name());
                                                                              builder.append(FileUtils.lineSeparator);
                                                                              for (StackTraceElement element : thread.getStackTrace()) {
                                                                                builder.append(indent);
                                                                                builder.append("| ");
                                                                                builder.append(element.toString());
                                                                                builder.append(FileUtils.lineSeparator);
                                                                              }
                                                                              // builder.append(FileUtils.lineSeparator);
                                                                            }

                                                                            // Get thread subgroups of `group'




    actors
                                                                            int numGroups = group.activeGroupCount();                                   /**
                                                                            ThreadGroup[] groups = new ThreadGroup[numGroups * 2];                       * Used by {@link #getThreadInformation()} for a traversal search of
                                                                            numGroups = group.enumerate(groups, false);                                  * {@link Thread}s/{@link ThreadGroup}s
                                                                                                                                                         *
                                                                            // Recursively visit each subgroup                                           * @param group
                                                                            for (int i = 0; i < numGroups; i++) {                                        * @param level
                                                                              builder.append(indent);                                                    * @return
                                                                              builder.append(visit(groups[i], level + 1));                               */
                                                                            }                                                                           private String visit(final ThreadGroup group,
                                                                                                                                                             final int level) {
                                                                            return builder.toString();                                                     // Get threads in `group'
                                                                        }                                                                                  StringBuilder builder = new StringBuilder();
                                                                                                                                                           int numThreads = group.activeCount();
                                                                                                                                                           Thread[] threads = new Thread[numThreads * 2];
                                                                                                                                                           numThreads = group.enumerate(threads, false);

                                                                                                                                                            StringBuilder indent = new StringBuilder();
                                                                                                                                                            for (int i = 0; i < level; ++i) {
                                                                                                                                                              indent.append(" ");
                                                                                                                                                            }

                                                                                                                                                            // Enumerate each thread in `group'
                                                                                                                                                            for (int i = 0; i < numThreads; i++) {
                                                                                                                                                              // Get thread
                                                                                                                                                              Thread thread = threads[i];
                                                                                                                                                              builder.append(indent);
                                                                                                                                                              builder.append("|-");
                                                                                                                                                              builder.append(thread.getName()).append(" [");
                                                                                                                                                              builder.append(thread.getClass().getSimpleName()).append("], ");
                                                                                                                                                              builder.append(thread.getPriority()).append(", ");
                                                                                                                                                              builder.append(thread.getState().name());
                                                                                                                                                              builder.append(FileUtils.lineSeparator);
                                                                                                                                                              for (StackTraceElement element : thread.getStackTrace()) {
                              /**                                                                                                                               builder.append(indent);
                               * Used by {@link #getThreadInformation()} for a traversal search of                                                              builder.append("| ");
                               * {@link Thread}s/{@link ThreadGroup}s                                                                                           builder.append(element.toString());
                               *                                                                                                                                builder.append(FileUtils.lineSeparator);
                               * @param group                                                                                                                 }
                               * @param level                                                                                                                 // builder.append(FileUtils.lineSeparator);
                               * @return                                                                                                                    }
                               */




    Reuse metrics from
                              private String visit(final ThreadGroup group,                                                                                 // Get thread subgroups of `group'
                                   final int level) {                                                                                                       int numGroups = group.activeGroupCount();




•
                                 // Get threads in `group'                                                                                                  ThreadGroup[] groups = new ThreadGroup[numGroups * 2];
                                 StringBuilder builder = new StringBuilder();                                                                               numGroups = group.enumerate(groups, false);
                                 int numThreads = group.activeCount();
                                 Thread[] threads = new Thread[numThreads * 2];                                                                             // Recursively visit each subgroup
                                 numThreads = group.enumerate(threads, false);                                                                              for (int i = 0; i < numGroups; i++) {
                                                                                                                                                                                                                           /**
                                                                                                                                                              builder.append(indent);
                                                                                                                                                                                                                            * Used by {@link #getThreadInformation()} for a traversal search of
                                  StringBuilder indent = new StringBuilder();                                                                                 builder.append(visit(groups[i], level + 1));
                                                                                                                                                                                                                            * {@link Thread}s/{@link ThreadGroup}s
                                  for (int i = 0; i < level; ++i) {                                                                                         }
                                                                                                                                                                                                                            *
                                    indent.append(" ");
                                                                                                                                                                                                                            * @param group
                                  }                                                                                                                         return builder.toString();
                                                                                                                                                                                                                            * @param level
                                                                                                                                                        }
                                                                                                                                                                                                                            * @return
                                  // Enumerate each thread in `group'
                                                                                                                                                                                                                            */
                                  for (int i = 0; i < numThreads; i++) {
                                                                                                                                                                                                                           private String visit(final ThreadGroup group,
                                    // Get thread
                                                                                                                                                                                                                                final int level) {
                                    Thread thread = threads[i];
                                                                                                                                                                                                                              // Get threads in `group'
                                    builder.append(indent);
                                                                                                                                                                                                                              StringBuilder builder = new StringBuilder();
                                    builder.append("|-");
                                                                                                                                                                                                                              int numThreads = group.activeCount();
                                    builder.append(thread.getName()).append(" [");
                                                                                                                                                                                                                              Thread[] threads = new Thread[numThreads * 2];
                                    builder.append(thread.getClass().getSimpleName()).append("], ");
                                                                                                                                                                                                                              numThreads = group.enumerate(threads, false);
                                    builder.append(thread.getPriority()).append(", ");
                                    builder.append(thread.getState().name());
                                                                                                                                                                                                                               StringBuilder indent = new StringBuilder();
                                    builder.append(FileUtils.lineSeparator);
                                                                                                                                                                                                                               for (int i = 0; i < level; ++i) {
                                    for (StackTraceElement element : thread.getStackTrace()) {
                                                                                                                                                                                                                                 indent.append(" ");
                                      builder.append(indent);
                                                                                                                                                                                                                               }




    social networks based
                                      builder.append("| ");                                                                             /**
                                      builder.append(element.toString());                                                                * Used by {@link #getThreadInformation()} for a traversal search of                   // Enumerate each thread in `group'
                                      builder.append(FileUtils.lineSeparator);                                                           * {@link Thread}s/{@link ThreadGroup}s                                                for (int i = 0; i < numThreads; i++) {
                                    }                                                                                                    *                                                                                       // Get thread
                                    // builder.append(FileUtils.lineSeparator);                                                          * @param group                                                                          Thread thread = threads[i];
                                  }                                                                                                      * @param level                                                                          builder.append(indent);
                                                                                                                                         * @return                                                                               builder.append("|-");
                                  // Get thread subgroups of `group'                                                                     */                                                                                      builder.append(thread.getName()).append(" [");
                                  int numGroups = group.activeGroupCount();                                                             private String visit(final ThreadGroup group,                                            builder.append(thread.getClass().getSimpleName()).append("], ");
                                  ThreadGroup[] groups = new ThreadGroup[numGroups * 2];                                                     final int level) {                                                                  builder.append(thread.getPriority()).append(", ");
                                  numGroups = group.enumerate(groups, false);                                                              // Get threads in `group'                                                             builder.append(thread.getState().name());
                                                                                                                                           StringBuilder builder = new StringBuilder();                                          builder.append(FileUtils.lineSeparator);
                                  // Recursively visit each subgroup                                                                       int numThreads = group.activeCount();                                                 for (StackTraceElement element : thread.getStackTrace()) {
                                  for (int i = 0; i < numGroups; i++) {                                                                    Thread[] threads = new Thread[numThreads * 2];                                          builder.append(indent);
                                    builder.append(indent);                                                                                numThreads = group.enumerate(threads, false);                                           builder.append("| ");
                                    builder.append(visit(groups[i], level + 1));
                                                                                                                                                                                                                                   builder.append(element.toString());
                                  }                                                                                                         StringBuilder indent = new StringBuilder();                                            builder.append(FileUtils.lineSeparator);
                                                                                                                                            for (int i = 0; i < level; ++i) {                                                    }
                                  return builder.toString();                                                                                  indent.append(" ");                                                                // builder.append(FileUtils.lineSeparator);
                              }                                                                                                             }                                                                                  }

                                                                                                                                            // Enumerate each thread in `group'                                                // Get thread subgroups of `group'
                                                                                                                                            for (int i = 0; i < numThreads; i++) {                                             int numGroups = group.activeGroupCount();
                                                                                                                                              // Get thread                                                                    ThreadGroup[] groups = new ThreadGroup[numGroups * 2];
                                                                                                                                              Thread thread = threads[i];                                                      numGroups = group.enumerate(groups, false);
                                                                                                                                              builder.append(indent);




    on code dependency
                                                                                                                                              builder.append("|-");                                                            // Recursively visit each subgroup
                                                                                                                                              builder.append(thread.getName()).append(" [");                                   for (int i = 0; i < numGroups; i++) {
                                                                                                                                              builder.append(thread.getClass().getSimpleName()).append("], ");                   builder.append(indent);
                                                                                                                                              builder.append(thread.getPriority()).append(", ");                                 builder.append(visit(groups[i], level + 1));
                                             /**                                                                                              builder.append(thread.getState().name());                                        }
                                              * Used by {@link #getThreadInformation()} for a traversal search of                             builder.append(FileUtils.lineSeparator);
                                              * {@link Thread}s/{@link ThreadGroup}s                                                          for (StackTraceElement element : thread.getStackTrace()) {                       return builder.toString();
                                              *                                                                                                 builder.append(indent);                                                    }
                                              * @param group                                                                                    builder.append("| ");
                                              * @param level                                                                                    builder.append(element.toString());
                                              * @return                                                                                         builder.append(FileUtils.lineSeparator);
                                              */                                                                                              }
                                             private String visit(final ThreadGroup group,                                                    // builder.append(FileUtils.lineSeparator);
                                                  final int level) {                                                                        }
                                                // Get threads in `group'
                                                StringBuilder builder = new StringBuilder();                                                // Get thread subgroups of `group'
                                                int numThreads = group.activeCount();                                                       int numGroups = group.activeGroupCount();
                                                Thread[] threads = new Thread[numThreads * 2];                                              ThreadGroup[] groups = new ThreadGroup[numGroups * 2];
                                                numThreads = group.enumerate(threads, false);                                               numGroups = group.enumerate(groups, false);

                                                 StringBuilder indent = new StringBuilder();                                                // Recursively visit each subgroup
                                                 for (int i = 0; i < level; ++i) {                                                          for (int i = 0; i < numGroups; i++) {
                                                   indent.append(" ");                                                                        builder.append(indent);
                                                 }                                                                                            builder.append(visit(groups[i], level + 1));
                                                                                                                                            }
                                                 // Enumerate each thread in `group'




    graph
                                                 for (int i = 0; i < numThreads; i++) {                                                     return builder.toString();
                                                   // Get thread                                                                        }
                                                   Thread thread = threads[i];
                                                   builder.append(indent);
                                                   builder.append("|-");
                                                   builder.append(thread.getName()).append(" [");
                                                   builder.append(thread.getClass().getSimpleName()).append("], ");
                                                   builder.append(thread.getPriority()).append(", ");
                                                   builder.append(thread.getState().name());
                                                   builder.append(FileUtils.lineSeparator);
                                                   for (StackTraceElement element : thread.getStackTrace()) {
                                                     builder.append(indent);
                                                     builder.append("| ");
                                                     builder.append(element.toString());
                                                     builder.append(FileUtils.lineSeparator);
                                                   }
                                                   // builder.append(FileUtils.lineSeparator);
                                                 }

                                                 // Get thread subgroups of `group'
                                                 int numGroups = group.activeGroupCount();
                                                 ThreadGroup[] groups = new ThreadGroup[numGroups * 2];
                                                 numGroups = group.enumerate(groups, false);

                                                 // Recursively visit each subgroup
                                                 for (int i = 0; i < numGroups; i++) {
                                                   builder.append(indent);
                                                   builder.append(visit(groups[i], level + 1));
                                                 }

                                                 return builder.toString();
                                             }
Contributions
network vs. code metrics
Contributions
                   network vs. code metrics

•   using random sampling on same release
    (similar to Z&N)
Contributions
                   network vs. code metrics

•   using random sampling on same release
    (similar to Z&N)

•   across different releases of same project
    (forward prediction)
Contributions
                   network vs. code metrics

•   using random sampling on same release
    (similar to Z&N)

•   across different releases of same project
    (forward prediction)

•   across different projects
    (cross project prediction)
Contributions
                   network vs. code metrics

•   using random sampling on same release
    (similar to Z&N)

•   across different releases of same project
    (forward prediction)
                                                    ati on
•   across different projects                  cs itu
                                         is ti
    (cross project prediction)      re al
Data Collection
                                   gs
                                bu
                              se
                           ea
                  e

                           el
                  m

                        t-r




                                code metrics     network metrics
              na

                      os
            e

                   #p
            fil




                                   ●●●                ●●●
code files

            ●●●




                                        combined metrics

                                   ●●●                ●●●
Data Collection
                                   gs
                                bu
                              se
                           ea
                  e

                           el
                  m

                        t-r




                                code metrics     network metrics
              na

                      os
            e

                   #p
            fil




                                   ●●●                ●●●
code files

            ●●●




                                        combined metrics

                                   ●●●                ●●●             code metrics           network metrics
                                               number                        9                        25
                                           granularity                class/method                   class
                                                                                      [1]                      [2]
                                                tools                 Understand                  UCINET
                                                                   LoC, NumMethods, FanIn/   Ego-network, structural
                                            examples                      FanOut               metrics, centrality

  [1] Understand, Scientific Toolworks Inc. (Version 2.0, Build 505, http://www.scitools.com/)
  [2] UCINET: Social Network Analysis Software, Analytic Technologies (http://www.analytictech.com/ucinet/)
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Data Collection: Differences
                       our study                Z&N
   Language                Java                    C/C++
                    JRuby, ArgoUML,
    Projects                             Windows 2003 Server
                          Eclipse
  Granularity           source file                  binary
                             9                         12
 Code Metrics     aggregated from class/ some specific for C/C
                      method level                    ++
    ... Tool           Understand          Microsoft in house
Network Metrics           mostly the same (minor differences)
    ... Tool                         UCINET
Experimental Setup
One Release Classi cation
          Stratified repeated holdout setup


                               •   Randomly splitting data set
                               •   Preserving the proportion of
One Release                        positive and negative instances
 Data Set
                               •   300 independent training and
                                   testing sets
                               •   Repeat for code, network and
         training data (2/3)       combined metrics (900 training and
                                   testing sets)
   testing data (1/3)
Forward Prediction
                 Closest to real world situation


                   e.g. JRuby 1.0                e.g. JRuby 1.1
                 release N                   release N+1
                                                                     time


                    release N                   release N+1
                   training set                  testing set




          Repeated for all possible combinations.
Releases must be from same project. Testing release must be later than testing release.
Cross-Project Prediction
                           Are defect predictions transferable?



                            release M                    release N
Project X




                                                                                  Project Y
            e.g. ArgoUML




                                                                         e.g. Eclipse
                              training set                 testing set




             Repeated for all combinations of projects
                                      (only one version per project)
Results

•   Reporting prediction
    measures as box plot

•   Reporting results of best
    model

•   non-parametric statistical
    test (Kruskal-Wallis)
One Release Classi cation
                 JRuby 1.0                     JRuby 1.1                     ArgoUML 0.24                   ArgoUML 0.26                          Eclipse 2.1                     Eclipse 3.0
1.0

0.8




                                                                                                                                                                                                           Precision
0.6

0.4

0.2
              (svmRadial)                        (svmRadial)                     (svmRadial)
0.0   (svmRadial)      (svmRadial)     (multinom)         (svmRadial)   (svmRadial)          (treebag)   (nb)   (svmRadial) (treebag)   (rpart)    (multinom) (multinom)    (rpart) (svmRadial) (rpart)

1.0

0.8

0.6




                                                                                                                                                                                                           Recall
0.4

0.2

0.0    (rpart)      (nb)     (nb)       (treebag) (treebag) (treebag)     (nb)    (treebag)    (nb)      (nb)      (nb)       (nb)        (nb)        (nb)       (nb)      (treebag) (treebag) (treebag)

1.0

0.8




                                                                                                                                                                                                           F-measure
0.6

0.4

0.2

0.0    (rpart)      (nb)   (treebag)   (treebag) (treebag) (treebag)      (nb)    (treebag) (treebag)    (nb)      (nb)       (nb)        (nb)        (nb)      (nb)       (treebag) (treebag) (treebag)

       Code Network          All        Code Network          All        Code Network          All       Code Network         All       Code Network             All       Code Network           All
One Release Classi cation
                 JRuby 1.0                     JRuby 1.1                     ArgoUML 0.24                   ArgoUML 0.26                          Eclipse 2.1                     Eclipse 3.0
1.0

0.8




                                                                                                                                                                                                           Precision
0.6

0.4

0.2
              (svmRadial)
                               •Network metrics outperform code
                                                 (svmRadial)                     (svmRadial)
0.0
1.0
      (svmRadial)      (svmRadial)

                                       metrics!
                                       (multinom)         (svmRadial)   (svmRadial)          (treebag)   (nb)   (svmRadial) (treebag)   (rpart)    (multinom) (multinom)    (rpart) (svmRadial) (rpart)




0.8

0.6                            •Using all metrics together offers no




                                                                                                                                                                                                           Recall
0.4

0.2
                                       improvement!
0.0

                               •Higher accuracy for the smaller
       (rpart)      (nb)     (nb)       (treebag) (treebag) (treebag)     (nb)    (treebag)    (nb)      (nb)      (nb)       (nb)        (nb)        (nb)       (nb)      (treebag) (treebag) (treebag)

1.0

0.8
                                       projects in comparison to Eclipse!




                                                                                                                                                                                                           F-measure
0.6

0.4

0.2

0.0    (rpart)      (nb)   (treebag)   (treebag) (treebag) (treebag)      (nb)    (treebag) (treebag)    (nb)      (nb)       (nb)        (nb)        (nb)      (nb)       (treebag) (treebag) (treebag)

       Code Network          All        Code Network          All        Code Network          All       Code Network         All       Code Network             All       Code Network           All
Forward Prediction
                                         Code       Network       All
        JRuby 1.0 to predict 1.1       ArgoUML 0.24 to predict 0.26       Eclipse 2.1 to predict 3.0
1.0

0.8

0.6

0.4

0.2

0.0
      Precision   Recall   F-measure   Precision   Recall   F-measure   Precision   Recall   F-measure
Forward Prediction
                                                  Code       Network       All
                 JRuby 1.0 to predict 1.1       ArgoUML 0.24 to predict 0.26       Eclipse 2.1 to predict 3.0
         1.0

         0.8

         0.6

         0.4

         0.2

         0.0
               Precision   Recall   F-measure   Precision   Recall   F-measure   Precision   Recall   F-measure




                                    JRuby                             ArgoUML                                     Eclipse
Network vs.                better recall                             worse recall
  Code
All vs. Code               worse recall                              better recall                    worse recall & F-
                                                                                                         measure
Forward Prediction
                                                  Code       Network       All
                 JRuby 1.0 to predict 1.1       ArgoUML 0.24 to predict 0.26       Eclipse 2.1 to predict 3.0
         1.0

         0.8

         0.6

         0.4

         0.2

         0.0
               Precision   Recall   F-measure   Precision   Recall   F-measure   Precision   Recall   F-measure




                                    JRuby                             ArgoUML                                     Eclipse
            All three metrics sets appear to have
Network vs.
            comparably prediction accuracy.
                  better recall  worse recall
  Code
                       (no statistically significant differences: ANOVA test)
All vs. Code               worse recall                              better recall                    worse recall & F-
                                                                                                         measure
Cross-Project Prediction
                                        Code      Network      All
             Train: JRuby 1.1            Train: ArgoUML 0.26           Train: Eclipse 3.0
  1.0

  0.8




                                                                                                 Test: JRuby 1.1
  0.6

  0.4

  0.2

  0.0
  1.0




                                                                                                 Test: ArgoUML 0.26
  0.8

  0.6

  0.4

  0.2

  0.0
  1.0

  0.8




                                                                                                 Test: Eclipse 3.0
  0.6

  0.4

  0.2

  0.0
        Precision   Recall F-measure Precision   Recall F-measure Precision   Recall F-measure
Cross-Project Prediction
                                        Code      Network      All
             Train: JRuby 1.1            Train: ArgoUML 0.26           Train: Eclipse 3.0
  1.0

  0.8




                                                                                                 Test: JRuby 1.1
  0.6

  0.4

  0.2


 •Combined metrics do not work well!
  0.0
  1.0




                                                                                                 Test: ArgoUML 0.26
  0.8

  0.6


 •Except Eclipse predicting Jruby no
  0.4

  0.2

   statistical difference (ANOVA test)
  0.0
  1.0

  0.8




                                                                                                 Test: Eclipse 3.0
  0.6

  0.4

  0.2

  0.0
        Precision   Recall F-measure Precision   Recall F-measure Precision   Recall F-measure
In uencial Metrics
                Measured by area under ROC curve
                  using the combined metrics set


•   4/6 cases, all top 10 metrics were network
    metrics
    ‣   Except: JRuby 1.0, ArgoUML 0.26, and Eclipse 2.1

•   No pattern with respect to presence or
    ranking
[1]                     [2]
                                  Z&N                   our study               Bird et al.             Tosun et al.

       Language                C/C++                      Java              C/C++, Java C/C++, Java
     Granularity                Binary                     File                 Package                     File
                                             Network vs. Code metrics using ...
     one release
      prediction                                                                                               ▼
       forward
      prediction                                              ▼
    cross-project
     prediction                                               ▼
                                 Network metrics performance with respect to ...
     project size                                                                                            ▼
[1] Bird, C., Nagappan, N., Gall, H. and Murphy, B. 2009. Putting It All Together: Using Socio-technical Networks to Predict
    Failures. In Proceedings of the 20th International Symposium on Software Reliability Engineering (ISSRE 2009)
[2] Tosun, A., Burak Turhan and Bener, A. 2009. Validation of network measures as indicators of defective modules in
    software systems. In Proceedings of the 5th International Conference on Predictor Models in Software Engineering
    (PROMISE '09)
[1]                     [2]
                                  Z&N                   our study               Bird et al.             Tosun et al.

       Language                C/C++                      Java              C/C++, Java C/C++, Java
     Granularity                Binary                     File                 Package                     File
                                             Network vs. Code metrics using ...
     one release
      prediction
                   Code metrics might be preferable because:                                                   ▼
             • more easy to collect ▼
       forward
      prediction
             •
    cross-projectfewer in numbers
     prediction                       ▼
             • faster to train prediction model with respect to ...
                       Network metrics performance
     project size                                                                                            ▼
[1] Bird, C., Nagappan, N., Gall, H. and Murphy, B. 2009. Putting It All Together: Using Socio-technical Networks to Predict
    Failures. In Proceedings of the 20th International Symposium on Software Reliability Engineering (ISSRE 2009)
[2] Tosun, A., Burak Turhan and Bener, A. 2009. Validation of network measures as indicators of defective modules in
    software systems. In Proceedings of the 5th International Conference on Predictor Models in Software Engineering
    (PROMISE '09)
Network vs. Code Metrics  to Predict Defects: A Replication Study
Network vs. Code Metrics  to Predict Defects: A Replication Study
Network vs. Code Metrics  to Predict Defects: A Replication Study
Network vs. Code Metrics  to Predict Defects: A Replication Study
Network vs. Code Metrics  to Predict Defects: A Replication Study

Contenu connexe

Tendances

Brief Summary Of C++
Brief Summary Of C++Brief Summary Of C++
Brief Summary Of C++Haris Lye
 
Java class 6
Java class 6Java class 6
Java class 6Edureka!
 
Python 3.6 Features 20161207
Python 3.6 Features 20161207Python 3.6 Features 20161207
Python 3.6 Features 20161207Jay Coskey
 
A toolbox for statical analysis and transformation of OSGi bundles
A toolbox for statical analysis and transformation of OSGi bundlesA toolbox for statical analysis and transformation of OSGi bundles
A toolbox for statical analysis and transformation of OSGi bundlesOSGi User Group France
 
XSLT 1 and XPath Quick Reference (from mulberrytech.com)
XSLT 1 and XPath Quick Reference (from mulberrytech.com)XSLT 1 and XPath Quick Reference (from mulberrytech.com)
XSLT 1 and XPath Quick Reference (from mulberrytech.com)FrescatiStory
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Jay Coskey
 
PyCon NZ 2013 - Advanced Methods For Creating Decorators
PyCon NZ 2013 - Advanced Methods For Creating DecoratorsPyCon NZ 2013 - Advanced Methods For Creating Decorators
PyCon NZ 2013 - Advanced Methods For Creating DecoratorsGraham Dumpleton
 
Java class 3
Java class 3Java class 3
Java class 3Edureka!
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsMuhammadTalha436
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and PackagesDamian T. Gordon
 
Free simulation sandipchaudhari_2006
Free simulation sandipchaudhari_2006Free simulation sandipchaudhari_2006
Free simulation sandipchaudhari_2006Sandip Chaudhari
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)SURBHI SAROHA
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++Prof Ansari
 
Java Unit 2 (Part 2)
Java Unit 2 (Part 2)Java Unit 2 (Part 2)
Java Unit 2 (Part 2)SURBHI SAROHA
 

Tendances (20)

Threads
ThreadsThreads
Threads
 
Brief Summary Of C++
Brief Summary Of C++Brief Summary Of C++
Brief Summary Of C++
 
Java class 6
Java class 6Java class 6
Java class 6
 
Python 3.6 Features 20161207
Python 3.6 Features 20161207Python 3.6 Features 20161207
Python 3.6 Features 20161207
 
A toolbox for statical analysis and transformation of OSGi bundles
A toolbox for statical analysis and transformation of OSGi bundlesA toolbox for statical analysis and transformation of OSGi bundles
A toolbox for statical analysis and transformation of OSGi bundles
 
Python modules
Python modulesPython modules
Python modules
 
XSLT 1 and XPath Quick Reference (from mulberrytech.com)
XSLT 1 and XPath Quick Reference (from mulberrytech.com)XSLT 1 and XPath Quick Reference (from mulberrytech.com)
XSLT 1 and XPath Quick Reference (from mulberrytech.com)
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2
 
PyCon NZ 2013 - Advanced Methods For Creating Decorators
PyCon NZ 2013 - Advanced Methods For Creating DecoratorsPyCon NZ 2013 - Advanced Methods For Creating Decorators
PyCon NZ 2013 - Advanced Methods For Creating Decorators
 
Advance python
Advance pythonAdvance python
Advance python
 
Java class 3
Java class 3Java class 3
Java class 3
 
Wrapper classes
Wrapper classesWrapper classes
Wrapper classes
 
Xtext Eclipse Con
Xtext Eclipse ConXtext Eclipse Con
Xtext Eclipse Con
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
Free simulation sandipchaudhari_2006
Free simulation sandipchaudhari_2006Free simulation sandipchaudhari_2006
Free simulation sandipchaudhari_2006
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)
 
Java Unit 2(Part 1)
Java Unit 2(Part 1)Java Unit 2(Part 1)
Java Unit 2(Part 1)
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++
 
Java Unit 2 (Part 2)
Java Unit 2 (Part 2)Java Unit 2 (Part 2)
Java Unit 2 (Part 2)
 

En vedette

South Florida HDI Virtual Event: IT Alignment and Value Network Metrics
South Florida HDI Virtual Event:  IT Alignment and Value Network MetricsSouth Florida HDI Virtual Event:  IT Alignment and Value Network Metrics
South Florida HDI Virtual Event: IT Alignment and Value Network MetricsEddie Vidal
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance TuningRicardo Santos
 
Introduction to Zabbix - Company, Product, Services and Use Cases
Introduction to Zabbix - Company, Product, Services and Use CasesIntroduction to Zabbix - Company, Product, Services and Use Cases
Introduction to Zabbix - Company, Product, Services and Use CasesZabbix
 
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21Mantas Klasavicius
 
Infrastructure as Code @BuildStuff2013
Infrastructure as Code @BuildStuff2013Infrastructure as Code @BuildStuff2013
Infrastructure as Code @BuildStuff2013Mantas Klasavicius
 

En vedette (8)

South Florida HDI Virtual Event: IT Alignment and Value Network Metrics
South Florida HDI Virtual Event:  IT Alignment and Value Network MetricsSouth Florida HDI Virtual Event:  IT Alignment and Value Network Metrics
South Florida HDI Virtual Event: IT Alignment and Value Network Metrics
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
Introduction to Zabbix - Company, Product, Services and Use Cases
Introduction to Zabbix - Company, Product, Services and Use CasesIntroduction to Zabbix - Company, Product, Services and Use Cases
Introduction to Zabbix - Company, Product, Services and Use Cases
 
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21
Adform case: from 0 to business metrics(Zabbix conference 2012) 2012.09.21
 
Infrastructure as Code @BuildStuff2013
Infrastructure as Code @BuildStuff2013Infrastructure as Code @BuildStuff2013
Infrastructure as Code @BuildStuff2013
 
Intro to vagrant
Intro to vagrantIntro to vagrant
Intro to vagrant
 
Logs management
Logs managementLogs management
Logs management
 

Similaire à Network vs. Code Metrics to Predict Defects: A Replication Study

Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdf
Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdfPart 1 - Written AnswersDownload the GridWriter.zip file and exami.pdf
Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdfkamdinrossihoungma74
 
Please I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfPlease I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfasenterprisestyagi
 
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기Arawn Park
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfShaiAlmog1
 
Given Starter Fileimport java.util.Arrays; Encapsulates.pdf
Given Starter Fileimport java.util.Arrays;   Encapsulates.pdfGiven Starter Fileimport java.util.Arrays;   Encapsulates.pdf
Given Starter Fileimport java.util.Arrays; Encapsulates.pdfarchanaemporium
 
OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdfakkhan101
 
Create a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxCreate a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxrajahchelsey
 
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfplease navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfaioils
 
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdf
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdfPlease Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdf
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdfajaycosmeticslg
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfinfo309708
 
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHoward Lewis Ship
 
Please write in C++ and should be able to compile and debug.Thank yo.pdf
Please write in C++ and should be able to compile and debug.Thank yo.pdfPlease write in C++ and should be able to compile and debug.Thank yo.pdf
Please write in C++ and should be able to compile and debug.Thank yo.pdfajaycosmeticslg
 

Similaire à Network vs. Code Metrics to Predict Defects: A Replication Study (20)

Grid gain paper
Grid gain paperGrid gain paper
Grid gain paper
 
Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdf
Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdfPart 1 - Written AnswersDownload the GridWriter.zip file and exami.pdf
Part 1 - Written AnswersDownload the GridWriter.zip file and exami.pdf
 
DCN Practical
DCN PracticalDCN Practical
DCN Practical
 
Please I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdfPlease I am trying to get this code to output in -txt file- I need you.pdf
Please I am trying to get this code to output in -txt file- I need you.pdf
 
#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기#살아있다 #자프링외길12년차 #코프링2개월생존기
#살아있다 #자프링외길12년차 #코프링2개월생존기
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
iOS Session-2
iOS Session-2iOS Session-2
iOS Session-2
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
Given Starter Fileimport java.util.Arrays; Encapsulates.pdf
Given Starter Fileimport java.util.Arrays;   Encapsulates.pdfGiven Starter Fileimport java.util.Arrays;   Encapsulates.pdf
Given Starter Fileimport java.util.Arrays; Encapsulates.pdf
 
Intake 38 3
Intake 38 3Intake 38 3
Intake 38 3
 
OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
 
Create a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docxCreate a Queue class that implements a queue abstraction. A queue is.docx
Create a Queue class that implements a queue abstraction. A queue is.docx
 
Jersey Guice AOP
Jersey Guice AOPJersey Guice AOP
Jersey Guice AOP
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
 
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfplease navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
 
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdf
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdfPlease Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdf
Please Write in CPP.Thank youCreate a class called BinaryTreeDeque.pdf
 
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdfGetting StartedCreate a class called Lab8. Use the same setup for .pdf
Getting StartedCreate a class called Lab8. Use the same setup for .pdf
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
 
Please write in C++ and should be able to compile and debug.Thank yo.pdf
Please write in C++ and should be able to compile and debug.Thank yo.pdfPlease write in C++ and should be able to compile and debug.Thank yo.pdf
Please write in C++ and should be able to compile and debug.Thank yo.pdf
 

Plus de Kim Herzig

Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016Kim Herzig
 
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Kim Herzig
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015Kim Herzig
 
Code Ownership and Software Quality: A Replication Study @ MSR 2015
Code Ownership and Software Quality: A Replication Study @ MSR 2015Code Ownership and Software Quality: A Replication Study @ MSR 2015
Code Ownership and Software Quality: A Replication Study @ MSR 2015Kim Herzig
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectpredictionKim Herzig
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...Kim Herzig
 
Predicting Defects Using Change Genealogies (ISSE 2013)
Predicting Defects Using Change Genealogies (ISSE 2013)Predicting Defects Using Change Genealogies (ISSE 2013)
Predicting Defects Using Change Genealogies (ISSE 2013)Kim Herzig
 
Mining and Untangling Change Genealogies (PhD Defense Talk)
Mining and Untangling Change Genealogies (PhD Defense Talk)Mining and Untangling Change Genealogies (PhD Defense Talk)
Mining and Untangling Change Genealogies (PhD Defense Talk)Kim Herzig
 
The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code ChangesKim Herzig
 
Mining Cause Effect Chains from Version Archives - ISSRE 2011
Mining Cause Effect Chains from Version Archives - ISSRE 2011Mining Cause Effect Chains from Version Archives - ISSRE 2011
Mining Cause Effect Chains from Version Archives - ISSRE 2011Kim Herzig
 
Capturing the Long Term Impact of Changes
Capturing the Long Term Impact of ChangesCapturing the Long Term Impact of Changes
Capturing the Long Term Impact of ChangesKim Herzig
 
Software Engineering Course 2009 - Mining Software Archives
Software Engineering Course 2009 - Mining Software ArchivesSoftware Engineering Course 2009 - Mining Software Archives
Software Engineering Course 2009 - Mining Software ArchivesKim Herzig
 

Plus de Kim Herzig (12)

Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
 
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
Empirically Detecting False Test Alarms Using Association Rules @ ICSE 2015
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
 
Code Ownership and Software Quality: A Replication Study @ MSR 2015
Code Ownership and Software Quality: A Replication Study @ MSR 2015Code Ownership and Software Quality: A Replication Study @ MSR 2015
Code Ownership and Software Quality: A Replication Study @ MSR 2015
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectprediction
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
 
Predicting Defects Using Change Genealogies (ISSE 2013)
Predicting Defects Using Change Genealogies (ISSE 2013)Predicting Defects Using Change Genealogies (ISSE 2013)
Predicting Defects Using Change Genealogies (ISSE 2013)
 
Mining and Untangling Change Genealogies (PhD Defense Talk)
Mining and Untangling Change Genealogies (PhD Defense Talk)Mining and Untangling Change Genealogies (PhD Defense Talk)
Mining and Untangling Change Genealogies (PhD Defense Talk)
 
The Impact of Tangled Code Changes
The Impact of Tangled Code ChangesThe Impact of Tangled Code Changes
The Impact of Tangled Code Changes
 
Mining Cause Effect Chains from Version Archives - ISSRE 2011
Mining Cause Effect Chains from Version Archives - ISSRE 2011Mining Cause Effect Chains from Version Archives - ISSRE 2011
Mining Cause Effect Chains from Version Archives - ISSRE 2011
 
Capturing the Long Term Impact of Changes
Capturing the Long Term Impact of ChangesCapturing the Long Term Impact of Changes
Capturing the Long Term Impact of Changes
 
Software Engineering Course 2009 - Mining Software Archives
Software Engineering Course 2009 - Mining Software ArchivesSoftware Engineering Course 2009 - Mining Software Archives
Software Engineering Course 2009 - Mining Software Archives
 

Dernier

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

Network vs. Code Metrics to Predict Defects: A Replication Study

  • 1. Network vs. Code Metrics to Predict Defects: A Replication Study Rahul Premraj Kim Herzig VU University Amsterdam Saarland University
  • 2. The Original Study Proceedings of the International Conference on Software Engineering (ICSE, May 2008).
  • 3. The Original Study Bug Database code quality Version Archive defect prediction model Source Code code metrics
  • 4. The Original Study model code metrics network metrics combined metrics
  • 5. The Original Study model code metrics network metrics combined metrics Network metrics outperformed code metrics!
  • 6. What are Network Metrics? Code artifacts • Consider code artifacts /** * Used by {@link #getThreadInformation()} for a traversal search of * {@link Thread}s/{@link ThreadGroup}s * * @param group * @param level * @return */ private String visit(final ThreadGroup group, final int level) { // Get threads in `group' StringBuilder builder = new StringBuilder(); int numThreads = group.activeCount(); Thread[] threads = new Thread[numThreads * 2]; numThreads = group.enumerate(threads, false); as communicating StringBuilder indent = new StringBuilder(); for (int i = 0; i < level; ++i) { indent.append(" "); } // Enumerate each thread in `group' for (int i = 0; i < numThreads; i++) { // Get thread Thread thread = threads[i]; builder.append(indent); builder.append("|-"); builder.append(thread.getName()).append(" ["); builder.append(thread.getClass().getSimpleName()).append("], "); builder.append(thread.getPriority()).append(", "); builder.append(thread.getState().name()); builder.append(FileUtils.lineSeparator); for (StackTraceElement element : thread.getStackTrace()) { builder.append(indent); builder.append("| "); builder.append(element.toString()); builder.append(FileUtils.lineSeparator); } // builder.append(FileUtils.lineSeparator); } // Get thread subgroups of `group' actors int numGroups = group.activeGroupCount(); /** ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; * Used by {@link #getThreadInformation()} for a traversal search of numGroups = group.enumerate(groups, false); * {@link Thread}s/{@link ThreadGroup}s * // Recursively visit each subgroup * @param group for (int i = 0; i < numGroups; i++) { * @param level builder.append(indent); * @return builder.append(visit(groups[i], level + 1)); */ } private String visit(final ThreadGroup group, final int level) { return builder.toString(); // Get threads in `group' } StringBuilder builder = new StringBuilder(); int numThreads = group.activeCount(); Thread[] threads = new Thread[numThreads * 2]; numThreads = group.enumerate(threads, false); StringBuilder indent = new StringBuilder(); for (int i = 0; i < level; ++i) { indent.append(" "); } // Enumerate each thread in `group' for (int i = 0; i < numThreads; i++) { // Get thread Thread thread = threads[i]; builder.append(indent); builder.append("|-"); builder.append(thread.getName()).append(" ["); builder.append(thread.getClass().getSimpleName()).append("], "); builder.append(thread.getPriority()).append(", "); builder.append(thread.getState().name()); builder.append(FileUtils.lineSeparator); for (StackTraceElement element : thread.getStackTrace()) { /** builder.append(indent); * Used by {@link #getThreadInformation()} for a traversal search of builder.append("| "); * {@link Thread}s/{@link ThreadGroup}s builder.append(element.toString()); * builder.append(FileUtils.lineSeparator); * @param group } * @param level // builder.append(FileUtils.lineSeparator); * @return } */ Reuse metrics from private String visit(final ThreadGroup group, // Get thread subgroups of `group' final int level) { int numGroups = group.activeGroupCount(); • // Get threads in `group' ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; StringBuilder builder = new StringBuilder(); numGroups = group.enumerate(groups, false); int numThreads = group.activeCount(); Thread[] threads = new Thread[numThreads * 2]; // Recursively visit each subgroup numThreads = group.enumerate(threads, false); for (int i = 0; i < numGroups; i++) { /** builder.append(indent); * Used by {@link #getThreadInformation()} for a traversal search of StringBuilder indent = new StringBuilder(); builder.append(visit(groups[i], level + 1)); * {@link Thread}s/{@link ThreadGroup}s for (int i = 0; i < level; ++i) { } * indent.append(" "); * @param group } return builder.toString(); * @param level } * @return // Enumerate each thread in `group' */ for (int i = 0; i < numThreads; i++) { private String visit(final ThreadGroup group, // Get thread final int level) { Thread thread = threads[i]; // Get threads in `group' builder.append(indent); StringBuilder builder = new StringBuilder(); builder.append("|-"); int numThreads = group.activeCount(); builder.append(thread.getName()).append(" ["); Thread[] threads = new Thread[numThreads * 2]; builder.append(thread.getClass().getSimpleName()).append("], "); numThreads = group.enumerate(threads, false); builder.append(thread.getPriority()).append(", "); builder.append(thread.getState().name()); StringBuilder indent = new StringBuilder(); builder.append(FileUtils.lineSeparator); for (int i = 0; i < level; ++i) { for (StackTraceElement element : thread.getStackTrace()) { indent.append(" "); builder.append(indent); } social networks based builder.append("| "); /** builder.append(element.toString()); * Used by {@link #getThreadInformation()} for a traversal search of // Enumerate each thread in `group' builder.append(FileUtils.lineSeparator); * {@link Thread}s/{@link ThreadGroup}s for (int i = 0; i < numThreads; i++) { } * // Get thread // builder.append(FileUtils.lineSeparator); * @param group Thread thread = threads[i]; } * @param level builder.append(indent); * @return builder.append("|-"); // Get thread subgroups of `group' */ builder.append(thread.getName()).append(" ["); int numGroups = group.activeGroupCount(); private String visit(final ThreadGroup group, builder.append(thread.getClass().getSimpleName()).append("], "); ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; final int level) { builder.append(thread.getPriority()).append(", "); numGroups = group.enumerate(groups, false); // Get threads in `group' builder.append(thread.getState().name()); StringBuilder builder = new StringBuilder(); builder.append(FileUtils.lineSeparator); // Recursively visit each subgroup int numThreads = group.activeCount(); for (StackTraceElement element : thread.getStackTrace()) { for (int i = 0; i < numGroups; i++) { Thread[] threads = new Thread[numThreads * 2]; builder.append(indent); builder.append(indent); numThreads = group.enumerate(threads, false); builder.append("| "); builder.append(visit(groups[i], level + 1)); builder.append(element.toString()); } StringBuilder indent = new StringBuilder(); builder.append(FileUtils.lineSeparator); for (int i = 0; i < level; ++i) { } return builder.toString(); indent.append(" "); // builder.append(FileUtils.lineSeparator); } } } // Enumerate each thread in `group' // Get thread subgroups of `group' for (int i = 0; i < numThreads; i++) { int numGroups = group.activeGroupCount(); // Get thread ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; Thread thread = threads[i]; numGroups = group.enumerate(groups, false); builder.append(indent); on code dependency builder.append("|-"); // Recursively visit each subgroup builder.append(thread.getName()).append(" ["); for (int i = 0; i < numGroups; i++) { builder.append(thread.getClass().getSimpleName()).append("], "); builder.append(indent); builder.append(thread.getPriority()).append(", "); builder.append(visit(groups[i], level + 1)); /** builder.append(thread.getState().name()); } * Used by {@link #getThreadInformation()} for a traversal search of builder.append(FileUtils.lineSeparator); * {@link Thread}s/{@link ThreadGroup}s for (StackTraceElement element : thread.getStackTrace()) { return builder.toString(); * builder.append(indent); } * @param group builder.append("| "); * @param level builder.append(element.toString()); * @return builder.append(FileUtils.lineSeparator); */ } private String visit(final ThreadGroup group, // builder.append(FileUtils.lineSeparator); final int level) { } // Get threads in `group' StringBuilder builder = new StringBuilder(); // Get thread subgroups of `group' int numThreads = group.activeCount(); int numGroups = group.activeGroupCount(); Thread[] threads = new Thread[numThreads * 2]; ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; numThreads = group.enumerate(threads, false); numGroups = group.enumerate(groups, false); StringBuilder indent = new StringBuilder(); // Recursively visit each subgroup for (int i = 0; i < level; ++i) { for (int i = 0; i < numGroups; i++) { indent.append(" "); builder.append(indent); } builder.append(visit(groups[i], level + 1)); } // Enumerate each thread in `group' graph for (int i = 0; i < numThreads; i++) { return builder.toString(); // Get thread } Thread thread = threads[i]; builder.append(indent); builder.append("|-"); builder.append(thread.getName()).append(" ["); builder.append(thread.getClass().getSimpleName()).append("], "); builder.append(thread.getPriority()).append(", "); builder.append(thread.getState().name()); builder.append(FileUtils.lineSeparator); for (StackTraceElement element : thread.getStackTrace()) { builder.append(indent); builder.append("| "); builder.append(element.toString()); builder.append(FileUtils.lineSeparator); } // builder.append(FileUtils.lineSeparator); } // Get thread subgroups of `group' int numGroups = group.activeGroupCount(); ThreadGroup[] groups = new ThreadGroup[numGroups * 2]; numGroups = group.enumerate(groups, false); // Recursively visit each subgroup for (int i = 0; i < numGroups; i++) { builder.append(indent); builder.append(visit(groups[i], level + 1)); } return builder.toString(); }
  • 8. Contributions network vs. code metrics • using random sampling on same release (similar to Z&N)
  • 9. Contributions network vs. code metrics • using random sampling on same release (similar to Z&N) • across different releases of same project (forward prediction)
  • 10. Contributions network vs. code metrics • using random sampling on same release (similar to Z&N) • across different releases of same project (forward prediction) • across different projects (cross project prediction)
  • 11. Contributions network vs. code metrics • using random sampling on same release (similar to Z&N) • across different releases of same project (forward prediction) ati on • across different projects cs itu is ti (cross project prediction) re al
  • 12. Data Collection gs bu se ea e el m t-r code metrics network metrics na os e #p fil ●●● ●●● code files ●●● combined metrics ●●● ●●●
  • 13. Data Collection gs bu se ea e el m t-r code metrics network metrics na os e #p fil ●●● ●●● code files ●●● combined metrics ●●● ●●● code metrics network metrics number 9 25 granularity class/method class [1] [2] tools Understand UCINET LoC, NumMethods, FanIn/ Ego-network, structural examples FanOut metrics, centrality [1] Understand, Scientific Toolworks Inc. (Version 2.0, Build 505, http://www.scitools.com/) [2] UCINET: Social Network Analysis Software, Analytic Technologies (http://www.analytictech.com/ucinet/)
  • 14. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 15. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 16. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 17. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 18. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 19. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 20. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 21. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 22. Data Collection: Differences our study Z&N Language Java C/C++ JRuby, ArgoUML, Projects Windows 2003 Server Eclipse Granularity source file binary 9 12 Code Metrics aggregated from class/ some specific for C/C method level ++ ... Tool Understand Microsoft in house Network Metrics mostly the same (minor differences) ... Tool UCINET
  • 24. One Release Classi cation Stratified repeated holdout setup • Randomly splitting data set • Preserving the proportion of One Release positive and negative instances Data Set • 300 independent training and testing sets • Repeat for code, network and training data (2/3) combined metrics (900 training and testing sets) testing data (1/3)
  • 25. Forward Prediction Closest to real world situation e.g. JRuby 1.0 e.g. JRuby 1.1 release N release N+1 time release N release N+1 training set testing set Repeated for all possible combinations. Releases must be from same project. Testing release must be later than testing release.
  • 26. Cross-Project Prediction Are defect predictions transferable? release M release N Project X Project Y e.g. ArgoUML e.g. Eclipse training set testing set Repeated for all combinations of projects (only one version per project)
  • 27. Results • Reporting prediction measures as box plot • Reporting results of best model • non-parametric statistical test (Kruskal-Wallis)
  • 28. One Release Classi cation JRuby 1.0 JRuby 1.1 ArgoUML 0.24 ArgoUML 0.26 Eclipse 2.1 Eclipse 3.0 1.0 0.8 Precision 0.6 0.4 0.2 (svmRadial) (svmRadial) (svmRadial) 0.0 (svmRadial) (svmRadial) (multinom) (svmRadial) (svmRadial) (treebag) (nb) (svmRadial) (treebag) (rpart) (multinom) (multinom) (rpart) (svmRadial) (rpart) 1.0 0.8 0.6 Recall 0.4 0.2 0.0 (rpart) (nb) (nb) (treebag) (treebag) (treebag) (nb) (treebag) (nb) (nb) (nb) (nb) (nb) (nb) (nb) (treebag) (treebag) (treebag) 1.0 0.8 F-measure 0.6 0.4 0.2 0.0 (rpart) (nb) (treebag) (treebag) (treebag) (treebag) (nb) (treebag) (treebag) (nb) (nb) (nb) (nb) (nb) (nb) (treebag) (treebag) (treebag) Code Network All Code Network All Code Network All Code Network All Code Network All Code Network All
  • 29. One Release Classi cation JRuby 1.0 JRuby 1.1 ArgoUML 0.24 ArgoUML 0.26 Eclipse 2.1 Eclipse 3.0 1.0 0.8 Precision 0.6 0.4 0.2 (svmRadial) •Network metrics outperform code (svmRadial) (svmRadial) 0.0 1.0 (svmRadial) (svmRadial) metrics! (multinom) (svmRadial) (svmRadial) (treebag) (nb) (svmRadial) (treebag) (rpart) (multinom) (multinom) (rpart) (svmRadial) (rpart) 0.8 0.6 •Using all metrics together offers no Recall 0.4 0.2 improvement! 0.0 •Higher accuracy for the smaller (rpart) (nb) (nb) (treebag) (treebag) (treebag) (nb) (treebag) (nb) (nb) (nb) (nb) (nb) (nb) (nb) (treebag) (treebag) (treebag) 1.0 0.8 projects in comparison to Eclipse! F-measure 0.6 0.4 0.2 0.0 (rpart) (nb) (treebag) (treebag) (treebag) (treebag) (nb) (treebag) (treebag) (nb) (nb) (nb) (nb) (nb) (nb) (treebag) (treebag) (treebag) Code Network All Code Network All Code Network All Code Network All Code Network All Code Network All
  • 30. Forward Prediction Code Network All JRuby 1.0 to predict 1.1 ArgoUML 0.24 to predict 0.26 Eclipse 2.1 to predict 3.0 1.0 0.8 0.6 0.4 0.2 0.0 Precision Recall F-measure Precision Recall F-measure Precision Recall F-measure
  • 31. Forward Prediction Code Network All JRuby 1.0 to predict 1.1 ArgoUML 0.24 to predict 0.26 Eclipse 2.1 to predict 3.0 1.0 0.8 0.6 0.4 0.2 0.0 Precision Recall F-measure Precision Recall F-measure Precision Recall F-measure JRuby ArgoUML Eclipse Network vs. better recall worse recall Code All vs. Code worse recall better recall worse recall & F- measure
  • 32. Forward Prediction Code Network All JRuby 1.0 to predict 1.1 ArgoUML 0.24 to predict 0.26 Eclipse 2.1 to predict 3.0 1.0 0.8 0.6 0.4 0.2 0.0 Precision Recall F-measure Precision Recall F-measure Precision Recall F-measure JRuby ArgoUML Eclipse All three metrics sets appear to have Network vs. comparably prediction accuracy. better recall worse recall Code (no statistically significant differences: ANOVA test) All vs. Code worse recall better recall worse recall & F- measure
  • 33. Cross-Project Prediction Code Network All Train: JRuby 1.1 Train: ArgoUML 0.26 Train: Eclipse 3.0 1.0 0.8 Test: JRuby 1.1 0.6 0.4 0.2 0.0 1.0 Test: ArgoUML 0.26 0.8 0.6 0.4 0.2 0.0 1.0 0.8 Test: Eclipse 3.0 0.6 0.4 0.2 0.0 Precision Recall F-measure Precision Recall F-measure Precision Recall F-measure
  • 34. Cross-Project Prediction Code Network All Train: JRuby 1.1 Train: ArgoUML 0.26 Train: Eclipse 3.0 1.0 0.8 Test: JRuby 1.1 0.6 0.4 0.2 •Combined metrics do not work well! 0.0 1.0 Test: ArgoUML 0.26 0.8 0.6 •Except Eclipse predicting Jruby no 0.4 0.2 statistical difference (ANOVA test) 0.0 1.0 0.8 Test: Eclipse 3.0 0.6 0.4 0.2 0.0 Precision Recall F-measure Precision Recall F-measure Precision Recall F-measure
  • 35. In uencial Metrics Measured by area under ROC curve using the combined metrics set • 4/6 cases, all top 10 metrics were network metrics ‣ Except: JRuby 1.0, ArgoUML 0.26, and Eclipse 2.1 • No pattern with respect to presence or ranking
  • 36. [1] [2] Z&N our study Bird et al. Tosun et al. Language C/C++ Java C/C++, Java C/C++, Java Granularity Binary File Package File Network vs. Code metrics using ... one release prediction ▼ forward prediction ▼ cross-project prediction ▼ Network metrics performance with respect to ... project size ▼ [1] Bird, C., Nagappan, N., Gall, H. and Murphy, B. 2009. Putting It All Together: Using Socio-technical Networks to Predict Failures. In Proceedings of the 20th International Symposium on Software Reliability Engineering (ISSRE 2009) [2] Tosun, A., Burak Turhan and Bener, A. 2009. Validation of network measures as indicators of defective modules in software systems. In Proceedings of the 5th International Conference on Predictor Models in Software Engineering (PROMISE '09)
  • 37. [1] [2] Z&N our study Bird et al. Tosun et al. Language C/C++ Java C/C++, Java C/C++, Java Granularity Binary File Package File Network vs. Code metrics using ... one release prediction Code metrics might be preferable because: ▼ • more easy to collect ▼ forward prediction • cross-projectfewer in numbers prediction ▼ • faster to train prediction model with respect to ... Network metrics performance project size ▼ [1] Bird, C., Nagappan, N., Gall, H. and Murphy, B. 2009. Putting It All Together: Using Socio-technical Networks to Predict Failures. In Proceedings of the 20th International Symposium on Software Reliability Engineering (ISSRE 2009) [2] Tosun, A., Burak Turhan and Bener, A. 2009. Validation of network measures as indicators of defective modules in software systems. In Proceedings of the 5th International Conference on Predictor Models in Software Engineering (PROMISE '09)

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. The function computes a ROC curve by first applying a series of cutoffs for each metric and then computing the sensitivity and specificity for each cutoff point. The importance of the metric is then determined by computing the area under the ROC curve.\n
  38. The function computes a ROC curve by first applying a series of cutoffs for each metric and then computing the sensitivity and specificity for each cutoff point. The importance of the metric is then determined by computing the area under the ROC curve.\n
  39. The function computes a ROC curve by first applying a series of cutoffs for each metric and then computing the sensitivity and specificity for each cutoff point. The importance of the metric is then determined by computing the area under the ROC curve.\n
  40. The function computes a ROC curve by first applying a series of cutoffs for each metric and then computing the sensitivity and specificity for each cutoff point. The importance of the metric is then determined by computing the area under the ROC curve.\n