SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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)
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

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)

Hinweis der Redaktion

  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