SlideShare a Scribd company logo
Using Fuzzy Code Search to Link
Code Fragments in Discussions to
          Source Code

Nicolas Bettenburg Stephen W. Thomas Ahmed E. Hassan
                          Queen’s University
              Software Analysis and Intelligence Lab (SAIL)
                       Kingston, Ontario, Canada
“Given enough eyeballs,
  all bugs are shallow.”
       Eric S. Raymond - The Cathedral and the Bazaar




                                                        2
Objective in this Study:


Which parts of the
 source code did
   developers
    discuss?


                             3
Objective in this Study:


           Which parts of the
            source code did
              developers
               discuss?
Finding Associations of Discussions with Source Code Files


                                                             3
Communication   Source Code
  Repository      Archive
                              4
Communication   Source Code
  Repository      Archive
                              4
Untitled                                                                                                12-03-15 2:55 PM



                           Untitled                                                                                             12-03-15 2:55 PM


                                             this.opt_withObsolete = opt_withObsolete;
                                      Untitled
                                      }                                                                                                    12-03-15 2:55 PM

                                      /* (non-Javadoc)
                                                    this.opt_withObsolete = opt_withObsolete;
                                        * @see main.IExperiment#getDescription()
                                             Untitled                                                                                        12-03-15 2:55 PM
                                              }
                                        */
                                      public String getDescription() {
                                              /* (non-Javadoc)
                                           String description = "We want to run an experiment all those bug
                                                             this.opt_withObsolete = opt_withObsolete;
                                                * @see main.IExperiment#getDescription()
                                                 reports.nt"
                                                       }
                                                */
                                                 + "We extract the complete stacktrace information to study fix
                                              public String getDescription() {
                                                      location and stacktrace interplay.nt";
                                                       /* (non-Javadoc)
                                                    String description = "We want to run an experiment all those bug
                                                                       this.opt_withObsolete = opt_withObsolete;
                                           return description;
                                                         * @see main.IExperiment#getDescription()
                                                          reports.nt"
                                                                 }
                                      }                  */
                                                          + "We extract the complete stacktrace information to study fix
                                                       public String getDescription() {
                                                                location and stacktrace interplay.nt";
                                                                 /* (non-Javadoc)
                                      /* (non-Javadoc) String description = "We want to run an experiment all those bug
                                                    return description;
                                                                   * @see main.IExperiment#getDescription()
                                        * @see main.IExperiment#run()
                                                                    reports.nt"
                                              }                    */
                                        */                          + "We extract the complete stacktrace information to study fix
                                                                 public String getDescription() {
                                      public boolean run() {              location and stacktrace interplay.nt";
                                              /* (non-Javadoc) String description = "We want to run an experiment all those bug
                                           final boolean return = Main.isCli_withDebugMessages();
                                                               DEBUG description;
                                                * @see main.IExperiment#run()reports.nt"
                                                       }
                                                */                           + "We extract the complete stacktrace information to study fix
                                           // Select an appropriate database name on the server depending on the
                                              public boolean run() {             location and stacktrace interplay.nt";
                                                 project demanded via command line options
                                                       /* (non-Javadoc)
                                                    final boolean return = Main.isCli_withDebugMessages();
                                                                         DEBUG description;
                                           String dbName = "";
                                                         * @see main.IExperiment#run()
                                                                 }
                                           if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                         */
                                                    // Select an appropriate database name on the server depending on the
                                                 dbName = "eclipse-december-2007";
                                                       public boolean run() {
                                                          project demanded via command line options
                                                                 /* (non-Javadoc)
                                           else {            final boolean DEBUG = Main.isCli_withDebugMessages();
                                                    String dbName = "";
                                                                   * @see main.IExperiment#run()
                                                 System.out.println("We currently only support the Eclipse database
                                                    if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                   */
                                                      !"); // Select an appropriate database name on the server depending on the
                                                          dbName = "eclipse-december-2007";
                                                                 public boolean run() {
                                                 System.exit(0);    project demanded via command line options
                                                    else {             final boolean DEBUG = Main.isCli_withDebugMessages();
                                           }                 String dbName = "";
                                                          System.out.println("We currently only support the Eclipse database
                                                             if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                !"); // Select an appropriate database name on the server depending on the
                                                                    dbName = "eclipse-december-2007";
                                                          System.exit(0);    project demanded via command line options
                                           // Create the else {Database Connection
                                                    }                  String dbName = "";
                                           DatabaseConnector System.out.println("We currently only support the Eclipse database
                                                                     dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                       if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                 Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                          !");
                                                                             dbName = "eclipse-december-2007";
                                           dbc.initialize(); System.exit(0);
                                                    // Create the else { Database Connection
                                           if (!dbc.connect()) {
                                                             }
                                                    DatabaseConnector System.out.println("We currently only support the Eclipse database
                                                                              dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                 System.out.println("Could not connect to database. Check host, port
                                                          Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                 !");
                                                      , username and password.");
                                                    dbc.initialize(); System.exit(0);
                                                 System.exit(1);
                                                             // Create the Database Connection
                                                    if (!dbc.connect()) {
                                                                       }
                                           }                 DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                          System.out.println("Could not connect to database. Check host, port
                                                                    Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                , username and password.");
                                           // Fetch a number of Bug Report unique IDs belonging to the following
                                                             dbc.initialize();
                                                          System.exit(1);
                                                                       // Create the Database Connection
                                                 query       if (!dbc.connect()) {
                                                    }                  DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                           String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port
                                                                    System.out.println("Could bug_id FROM bugzilla_bugs
                                                                             Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                          , username and password.");
                                                    // Fetch a number of Bug Report unique IDs belonging to the following
                                                                       dbc.initialize();
                                                 LIMIT " + Main.getCli_amount();
                                                                    System.exit(1);
                                                          query        if (!dbc.connect()) {
                                           int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                             }
                                                    String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port
                                                                             System.out.println("Could bug_id FROM bugzilla_bugs
                                           int lastID = bugIDs[bugIDs.length -1];
                                                          WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                 , username and password.");
                                                             // Fetch a number of Bug Report unique IDs belonging to the following
                                                          LIMIT " + Main.getCli_amount();
                                                                             System.exit(1);
                                           if (DEBUG)               query
                                                    int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                       }
                                                 System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs
                                                             String setSelectionQuery = "SELECT DISTINCT bug_id FROM
                                                    int lastID = bugIDs[bugIDs.length -1];
                                                      reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC
                                                                    WHERE bug_id > " + Main.getCli_startID()      " ORDER +
                                                                       // Fetch a number of Bug Report unique IDs belonging to the following
                                                      Main.getCli_startID());
                                                                    LIMIT " + Main.getCli_amount();
                                                    if (DEBUG)               query
                                                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                          System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs
                                                                       String setSelectionQuery = "SELECT DISTINCT bug_id FROM
                                           // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel
                                                             int lastID = from the database using
                                                                reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC
                                                                             WHERE bug_id > " + Main.getCli_startID()    " ORDER +
                                                 threads.
                                                                Main.getCli_startID());
                                                                             LIMIT " + Main.getCli_amount();
                                                             if (DEBUG)
                                                                       int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                    System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                    // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel
                                                                       int lastID = from the database using
                                                                          reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                          threads.
                                                                          Main.getCli_startID());
                                                                       if (DEBUG)
                                                                             System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                             // Collect the bug reports from the database using up to 100Page 2 of 4
                                                                                                                                parallel
                                                                                 reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                    threads.
                                                                                 Main.getCli_startID());

                                                                // Collect the bug reports from the database using up to 100Page 2 of 4
                                                                                                                             parallel
                                                                    threads.


                                                                                                                                                Page 2 of 4



                                                                                                                                                        Page 2 of 4




Communication                                                                          Source Code
  Repository                                                                             Archive
                                                                                                                                                                      4
Untitled                                                                                                12-03-15 2:55 PM



                                          Untitled                                                                                             12-03-15 2:55 PM


                                                            this.opt_withObsolete = opt_withObsolete;
                                                     Untitled
                                                     }                                                                                                    12-03-15 2:55 PM

                                                     /* (non-Javadoc)
                                                                   this.opt_withObsolete = opt_withObsolete;
                                                       * @see main.IExperiment#getDescription()
                                                            Untitled                                                                                        12-03-15 2:55 PM
                                                             }
                                                       */
                                                     public String getDescription() {
                                                             /* (non-Javadoc)
                                                          String description = "We want to run an experiment all those bug
                                                                            this.opt_withObsolete = opt_withObsolete;
                                                               * @see main.IExperiment#getDescription()
                                                                reports.nt"
                                                                      }
                                                               */
                                                                + "We extract the complete stacktrace information to study fix
                                                             public String getDescription() {
                                                                     location and stacktrace interplay.nt";
                                                                      /* (non-Javadoc)
                                                                   String description = "We want to run an experiment all those bug
                                                                                      this.opt_withObsolete = opt_withObsolete;
                                                          return description;
                                                                        * @see main.IExperiment#getDescription()
                                                                         reports.nt"
                                                                                }
                                                     }                  */
                                                                         + "We extract the complete stacktrace information to study fix
                                                                      public String getDescription() {
                                                                               location and stacktrace interplay.nt";
                                                                                /* (non-Javadoc)
                                                     /* (non-Javadoc) String description = "We want to run an experiment all those bug
                                                                   return description;
                                                                                  * @see main.IExperiment#getDescription()
                                                       * @see main.IExperiment#run()
                                                                                   reports.nt"
                                                             }                    */
                                                       */                          + "We extract the complete stacktrace information to study fix
                                                                                public String getDescription() {
                                                     public boolean run() {              location and stacktrace interplay.nt";
                                                             /* (non-Javadoc) String description = "We want to run an experiment all those bug
                                                          final boolean return = Main.isCli_withDebugMessages();
                                                                              DEBUG description;
                                                               * @see main.IExperiment#run()reports.nt"
                                                                      }
                                                               */                           + "We extract the complete stacktrace information to study fix
                                                          // Select an appropriate database name on the server depending on the
                                                             public boolean run() {             location and stacktrace interplay.nt";
                                                                project demanded via command line options
                                                                      /* (non-Javadoc)




                Traceability
                                                                   final boolean return = Main.isCli_withDebugMessages();
                                                                                        DEBUG description;
                                                          String dbName = "";
                                                                        * @see main.IExperiment#run()
                                                                                }
                                                          if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                        */
                                                                   // Select an appropriate database name on the server depending on the
                                                                dbName = "eclipse-december-2007";
                                                                      public boolean run() {
                                                                         project demanded via command line options
                                                                                /* (non-Javadoc)
                                                          else {            final boolean DEBUG = Main.isCli_withDebugMessages();
                                                                   String dbName = "";
                                                                                  * @see main.IExperiment#run()
                                                                System.out.println("We currently only support the Eclipse database
                                                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                  */
                                                                     !"); // Select an appropriate database name on the server depending on the
                                                                         dbName = "eclipse-december-2007";
                                                                                public boolean run() {
                                                                System.exit(0);    project demanded via command line options
                                                                   else {             final boolean DEBUG = Main.isCli_withDebugMessages();
                                                          }                 String dbName = "";
                                                                         System.out.println("We currently only support the Eclipse database
                                                                            if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                               !"); // Select an appropriate database name on the server depending on the
                                                                                   dbName = "eclipse-december-2007";
                                                                         System.exit(0);    project demanded via command line options
                                                          // Create the else {Database Connection
                                                                   }                  String dbName = "";
                                                          DatabaseConnector System.out.println("We currently only support the Eclipse database
                                                                                    dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                      if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                         !");
                                                                                            dbName = "eclipse-december-2007";
                                                          dbc.initialize(); System.exit(0);
                                                                   // Create the else { Database Connection
                                                          if (!dbc.connect()) {
                                                                            }
                                                                   DatabaseConnector System.out.println("We currently only support the Eclipse database
                                                                                             dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                System.out.println("Could not connect to database. Check host, port
                                                                         Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                                !");
                                                                     , username and password.");
                                                                   dbc.initialize(); System.exit(0);




                   Links
                                                                System.exit(1);
                                                                            // Create the Database Connection
                                                                   if (!dbc.connect()) {
                                                                                      }
                                                          }                 DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                         System.out.println("Could not connect to database. Check host, port
                                                                                   Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                               , username and password.");
                                                          // Fetch a number of Bug Report unique IDs belonging to the following
                                                                            dbc.initialize();
                                                                         System.exit(1);
                                                                                      // Create the Database Connection
                                                                query       if (!dbc.connect()) {
                                                                   }                  DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                          String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port
                                                                                   System.out.println("Could bug_id FROM bugzilla_bugs
                                                                                            Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                         , username and password.");
                                                                   // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                      dbc.initialize();
                                                                LIMIT " + Main.getCli_amount();
                                                                                   System.exit(1);
                                                                         query        if (!dbc.connect()) {
                                                          int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                            }
                                                                   String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port
                                                                                            System.out.println("Could bug_id FROM bugzilla_bugs
                                                          int lastID = bugIDs[bugIDs.length -1];
                                                                         WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                                , username and password.");
                                                                            // Fetch a number of Bug Report unique IDs belonging to the following
                                                                         LIMIT " + Main.getCli_amount();
                                                                                            System.exit(1);
                                                          if (DEBUG)               query
                                                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                      }
                                                                System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs
                                                                            String setSelectionQuery = "SELECT DISTINCT bug_id FROM
                                                                   int lastID = bugIDs[bugIDs.length -1];
                                                                     reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC
                                                                                   WHERE bug_id > " + Main.getCli_startID()      " ORDER +
                                                                                      // Fetch a number of Bug Report unique IDs belonging to the following
                                                                     Main.getCli_startID());
                                                                                   LIMIT " + Main.getCli_amount();
                                                                   if (DEBUG)               query
                                                                            int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                         System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs
                                                                                      String setSelectionQuery = "SELECT DISTINCT bug_id FROM
                                                          // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel
                                                                            int lastID = from the database using
                                                                               reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC
                                                                                            WHERE bug_id > " + Main.getCli_startID()    " ORDER +
                                                                threads.
                                                                               Main.getCli_startID());
                                                                                            LIMIT " + Main.getCli_amount();
                                                                            if (DEBUG)
                                                                                      int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                   // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel
                                                                                      int lastID = from the database using
                                                                                         reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                         threads.
                                                                                         Main.getCli_startID());
                                                                                      if (DEBUG)
                                                                                            System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                            // Collect the bug reports from the database using up to 100Page 2 of 4
                                                                                                                                               parallel
                                                                                                reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                   threads.
                                                                                                Main.getCli_startID());

                                                                               // Collect the bug reports from the database using up to 100Page 2 of 4
                                                                                                                                            parallel
                                                                                   threads.


                                                                                                                                                               Page 2 of 4



                                                                                                                                                                       Page 2 of 4




Communication                                                                                         Source Code
  Repository                                                                                            Archive
                                                                                                                                                                                     4
5
5
org.eclipse.swt/Eclipse_SWT/win32/org/eclipse/swt/widgets/Button.java


                                                                   5
3   Approaches in the Past

         Change Log Analysis

         Information Retrieval

         Lightweight Textual Analysis


                                        6
Change Log Analysis




                                                                                                                                                Untitled                                                                                    12-03-15 2:55 PM




                                                                                                                                                                   this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                 * @see main.IExperiment#getDescription()
                                                                                                                                                                 */
                                                                                                                                                               public String getDescription() {
                                                                                                                                                                    String description = "We want to run an experiment all those bug
                                                                                                                                                                        reports.nt"
                                                                                                                                                                        + "We extract the complete stacktrace information to study fix
                                                                                                                                                                            location and stacktrace interplay.nt";
                                                                                                                                                                    return description;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                * @see main.IExperiment#run()




                                                                                                                                                                                                                                                               LUCENE-2297: allow reader
                                                                                                                                                                */
                                                                                                                                                               public boolean run() {
                                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();

                                                                                                                                                                   // Select an appropriate database name on the server depending on the
                                                                     Untitled                                                                               12-03-15 2:55project demanded via command line options
                                                                                                                                                                          PM
                                                                                                                                                                   String dbName = "";
                                                                                                                                                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                         dbName = "eclipse-december-2007";
                                                                                                                                                                   else {
                                                                                                                                                                         System.out.println("We currently only support the Eclipse database
                                                                                                                                                                             !");
                                                                                      this.opt_withObsolete = opt_withObsolete;                                          System.exit(0);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)
                                                                                    * @see main.IExperiment#getDescription()                                       // Create the Database Connection
                                                                                    */                                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                  public String getDescription() {                                                     Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                       String description = "We want to run an experiment all those bug            dbc.initialize();
                                                                                           reports.nt"                                                           if (!dbc.connect()) {




                                                                                                                                                                                                                                                               pooling to be enabled (through
                                                                                           + "We extract the complete stacktrace information to study fix              System.out.println("Could not connect to database. Check host, port
                                                                                               location and stacktrace interplay.nt";                                    , username and password.");
                                                                                       return description;                                                             System.exit(1);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)                                                                 // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                   * @see main.IExperiment#run()                                                       query
                                                                                   */                                                                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                  public boolean run() {                                                               WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                      final boolean DEBUG = Main.isCli_withDebugMessages();                            LIMIT " + Main.getCli_amount();
                                                                                                                                                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                      // Select an appropriate database name on the server depending on the        int lastID = bugIDs[bugIDs.length -1];
                                                                                          project demanded via command line options
                                                                                      String dbName = "";                                                          if (DEBUG)
                                                                                      if (Main.getCli_project().equalsIgnoreCase("eclipse"))                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                          dbName = "eclipse-december-2007";                                                reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                      else {                                                                               Main.getCli_startID());
                                                                                          System.out.println("We currently only support the Eclipse database
                                                                                              !");                                                                 // Collect the bug reports from the database using up to 100 parallel
                                                                                          System.exit(0);                                                              threads.
                                                                                      }




                                                                                                                                                                                                                                                               IndexWriterConfig) even if
              Untitled                                                                // Create the DatabasePM
                                                                                                 12-03-15 2:55 Connection
                                                                                                                               Untitled
                                                                                      DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                                12-03-15 2:55 PM
                                                                                          Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                      dbc.initialize();                                                                                                                                          Page 2 of 4
                                                                                      if (!dbc.connect()) {
                                                                                          System.out.println("Could not connect to database. Check host, port
                             this.opt_withObsolete = opt_withObsolete;                        , username and password.");
                         }                                                                System.exit(1);                                        this.opt_withObsolete = opt_withObsolete;
                                                                                      }                                                      }
                         /* (non-Javadoc)
                           * @see main.IExperiment#getDescription()                    // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                                                                              /* (non-Javadoc)
                           */                                                              query                                                * @see main.IExperiment#getDescription()
                         public String getDescription() {                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs
                                                                                           WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() {
                              String description = "We want to run an experiment all those bug                                                 BY bug_id ASC
                                  reports.nt"                                            LIMIT " + Main.getCli_amount();                         String description = "We want to run an experiment all those bug
                                                                                       int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                  + "We extract the complete stacktrace information to study fix                                                       reports.nt"
                                      location and stacktrace interplay.nt";         int lastID = bugIDs[bugIDs.length -1];                          + "We extract the complete stacktrace information to study fix
                              return description;                                                                                                          location and stacktrace interplay.nt";
                                                                                       if (DEBUG)




                                                                                                                                                                                                                                                               you're not pulling NRT reader.
                         }                                                                                                                         return description;
                                                                                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                                                                              }
                         /* (non-Javadoc)                                                      reports from " + Main.getCli_dbHost() + " starting with ID " +
                           * @see main.IExperiment#run()                                       Main.getCli_startID());                        /* (non-Javadoc)
                           */                                                                                                                   * @see main.IExperiment#run()
                         public boolean run() {                                        // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                */
                              final boolean DEBUG = Main.isCli_withDebugMessages();        threads.                                           public boolean run() {
                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();
                              // Select an appropriate database name on the server depending on the
                                  project demanded via command line options                                                                        // Select an appropriate database name on the server depending on the
                              String dbName = "";                                                                                                      project demanded via command line options
                              if (Main.getCli_project().equalsIgnoreCase("eclipse"))                                                               String dbName = "";
                                  dbName = "eclipse-december-2007";                                                                                if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                 Page 2 of 4
                              else {                                                                                                                   dbName = "eclipse-december-2007";
                                  System.out.println("We currently only support the Eclipse database                                               else {
                                      !");                                                                                                             System.out.println("We currently only support the Eclipse database
                                  System.exit(0);                                                                                                          !");
                              }                                                                                                                        System.exit(0);
                                                                                                                                                   }

                             // Create the Database Connection
                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                  // Create the Database Connection
                                 Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                             dbc.initialize();                                                                                                        Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                             if (!dbc.connect()) {                                                                                                dbc.initialize();
                                 System.out.println("Could not connect to database. Check host, port                                              if (!dbc.connect()) {
                                     , username and password.");                                                                                      System.out.println("Could not connect to database. Check host, port
                                 System.exit(1);                                                                                                          , username and password.");
                             }                                                                                                                        System.exit(1);
                                                                                                                                                  }
                             // Fetch a number of Bug Report unique IDs belonging to the following
                                 query                                                                                                            // Fetch a number of Bug Report unique IDs belonging to the following
                             String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs                                                    query
                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC                                                 String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                 LIMIT " + Main.getCli_amount();                                                                                      WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);                                                                   LIMIT " + Main.getCli_amount();
                             int lastID = bugIDs[bugIDs.length -1];                                                                               int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                  int lastID = bugIDs[bugIDs.length -1];
                             if (DEBUG)
                                 System.out.println("* Attempting to fetch " + bugIDs.length + "                                                  if (DEBUG)
                                     reports from " + Main.getCli_dbHost() + " starting with ID " +                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                     Main.getCli_startID());                                                                                              reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                                                                                          Main.getCli_startID());
                             // Collect the bug reports from the database using up to 100 parallel
                                 threads.                                                                                                         // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                      threads.




    SVN
                                                                                                       Page 2 of 4
                                                                                                                                                                                                                              Page 2 of 4




                                                                                                                                                                                                                                                                                                7
Change Log Analysis




                                                                                                                                                Untitled                                                                                    12-03-15 2:55 PM




                                                                                                                                                                   this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                 * @see main.IExperiment#getDescription()
                                                                                                                                                                 */
                                                                                                                                                               public String getDescription() {
                                                                                                                                                                    String description = "We want to run an experiment all those bug
                                                                                                                                                                        reports.nt"
                                                                                                                                                                        + "We extract the complete stacktrace information to study fix
                                                                                                                                                                            location and stacktrace interplay.nt";
                                                                                                                                                                    return description;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                * @see main.IExperiment#run()




                                                                                                                                                                                                                                                               LUCENE-2297: allow reader
                                                                                                                                                                */
                                                                                                                                                               public boolean run() {
                                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();

                                                                                                                                                                   // Select an appropriate database name on the server depending on the
                                                                     Untitled                                                                               12-03-15 2:55project demanded via command line options
                                                                                                                                                                          PM
                                                                                                                                                                   String dbName = "";
                                                                                                                                                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                         dbName = "eclipse-december-2007";
                                                                                                                                                                   else {
                                                                                                                                                                         System.out.println("We currently only support the Eclipse database
                                                                                                                                                                             !");
                                                                                      this.opt_withObsolete = opt_withObsolete;                                          System.exit(0);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)
                                                                                    * @see main.IExperiment#getDescription()                                       // Create the Database Connection
                                                                                    */                                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                  public String getDescription() {                                                     Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                       String description = "We want to run an experiment all those bug            dbc.initialize();
                                                                                           reports.nt"                                                           if (!dbc.connect()) {




                                                                                                                                                                                                                                                               pooling to be enabled (through
                                                                                           + "We extract the complete stacktrace information to study fix              System.out.println("Could not connect to database. Check host, port
                                                                                               location and stacktrace interplay.nt";                                    , username and password.");
                                                                                       return description;                                                             System.exit(1);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)                                                                 // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                   * @see main.IExperiment#run()                                                       query
                                                                                   */                                                                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                  public boolean run() {                                                               WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                      final boolean DEBUG = Main.isCli_withDebugMessages();                            LIMIT " + Main.getCli_amount();
                                                                                                                                                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                      // Select an appropriate database name on the server depending on the        int lastID = bugIDs[bugIDs.length -1];
                                                                                          project demanded via command line options
                                                                                      String dbName = "";                                                          if (DEBUG)
                                                                                      if (Main.getCli_project().equalsIgnoreCase("eclipse"))                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                          dbName = "eclipse-december-2007";                                                reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                      else {                                                                               Main.getCli_startID());
                                                                                          System.out.println("We currently only support the Eclipse database
                                                                                              !");                                                                 // Collect the bug reports from the database using up to 100 parallel
                                                                                          System.exit(0);                                                              threads.
                                                                                      }




                                                                                                                                                                                                                                                               IndexWriterConfig) even if
              Untitled                                                                // Create the DatabasePM
                                                                                                 12-03-15 2:55 Connection
                                                                                                                               Untitled
                                                                                      DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                                12-03-15 2:55 PM
                                                                                          Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                      dbc.initialize();                                                                                                                                          Page 2 of 4
                                                                                      if (!dbc.connect()) {
                                                                                          System.out.println("Could not connect to database. Check host, port
                             this.opt_withObsolete = opt_withObsolete;                        , username and password.");
                         }                                                                System.exit(1);                                        this.opt_withObsolete = opt_withObsolete;
                                                                                      }                                                      }
                         /* (non-Javadoc)
                           * @see main.IExperiment#getDescription()                    // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                                                                              /* (non-Javadoc)
                           */                                                              query                                                * @see main.IExperiment#getDescription()
                         public String getDescription() {                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs
                                                                                           WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() {
                              String description = "We want to run an experiment all those bug                                                 BY bug_id ASC
                                  reports.nt"                                            LIMIT " + Main.getCli_amount();                         String description = "We want to run an experiment all those bug
                                                                                       int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                  + "We extract the complete stacktrace information to study fix                                                       reports.nt"
                                      location and stacktrace interplay.nt";         int lastID = bugIDs[bugIDs.length -1];                          + "We extract the complete stacktrace information to study fix
                              return description;                                                                                                          location and stacktrace interplay.nt";
                                                                                       if (DEBUG)




                                                                                                                                                                                                                                                               you're not pulling NRT reader.
                         }                                                                                                                         return description;
                                                                                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                                                                              }
                         /* (non-Javadoc)                                                      reports from " + Main.getCli_dbHost() + " starting with ID " +
                           * @see main.IExperiment#run()                                       Main.getCli_startID());                        /* (non-Javadoc)
                           */                                                                                                                   * @see main.IExperiment#run()
                         public boolean run() {                                        // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                */
                              final boolean DEBUG = Main.isCli_withDebugMessages();        threads.                                           public boolean run() {
                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();
                              // Select an appropriate database name on the server depending on the
                                  project demanded via command line options                                                                        // Select an appropriate database name on the server depending on the
                              String dbName = "";                                                                                                      project demanded via command line options
                              if (Main.getCli_project().equalsIgnoreCase("eclipse"))                                                               String dbName = "";
                                  dbName = "eclipse-december-2007";                                                                                if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                 Page 2 of 4
                              else {                                                                                                                   dbName = "eclipse-december-2007";
                                  System.out.println("We currently only support the Eclipse database                                               else {
                                      !");                                                                                                             System.out.println("We currently only support the Eclipse database
                                  System.exit(0);                                                                                                          !");
                              }                                                                                                                        System.exit(0);
                                                                                                                                                   }

                             // Create the Database Connection
                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                  // Create the Database Connection
                                 Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                             dbc.initialize();                                                                                                        Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                             if (!dbc.connect()) {                                                                                                dbc.initialize();
                                 System.out.println("Could not connect to database. Check host, port                                              if (!dbc.connect()) {
                                     , username and password.");                                                                                      System.out.println("Could not connect to database. Check host, port
                                 System.exit(1);                                                                                                          , username and password.");
                             }                                                                                                                        System.exit(1);
                                                                                                                                                  }
                             // Fetch a number of Bug Report unique IDs belonging to the following
                                 query                                                                                                            // Fetch a number of Bug Report unique IDs belonging to the following
                             String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs                                                    query
                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC                                                 String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                 LIMIT " + Main.getCli_amount();                                                                                      WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);                                                                   LIMIT " + Main.getCli_amount();
                             int lastID = bugIDs[bugIDs.length -1];                                                                               int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                  int lastID = bugIDs[bugIDs.length -1];
                             if (DEBUG)
                                 System.out.println("* Attempting to fetch " + bugIDs.length + "                                                  if (DEBUG)
                                     reports from " + Main.getCli_dbHost() + " starting with ID " +                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                     Main.getCli_startID());                                                                                              reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                                                                                          Main.getCli_startID());
                             // Collect the bug reports from the database using up to 100 parallel
                                 threads.                                                                                                         // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                      threads.




    SVN
                                                                                                       Page 2 of 4
                                                                                                                                                                                                                              Page 2 of 4




                                                                                                                                                                                                                                                                                                7
Change Log Analysis

                                                                                                                                                                                                                                                                 Bug Report
                                                                                                                                                                                                                                                                  #LUCENE-2297




                                                                                                                                                Untitled                                                                                    12-03-15 2:55 PM




                                                                                                                                                                   this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                 * @see main.IExperiment#getDescription()
                                                                                                                                                                 */
                                                                                                                                                               public String getDescription() {
                                                                                                                                                                    String description = "We want to run an experiment all those bug
                                                                                                                                                                        reports.nt"
                                                                                                                                                                        + "We extract the complete stacktrace information to study fix
                                                                                                                                                                            location and stacktrace interplay.nt";
                                                                                                                                                                    return description;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                * @see main.IExperiment#run()




                                                                                                                                                                                                                                                               LUCENE-2297: allow reader
                                                                                                                                                                */
                                                                                                                                                               public boolean run() {
                                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();

                                                                                                                                                                   // Select an appropriate database name on the server depending on the
                                                                     Untitled                                                                               12-03-15 2:55project demanded via command line options
                                                                                                                                                                          PM
                                                                                                                                                                   String dbName = "";
                                                                                                                                                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                         dbName = "eclipse-december-2007";
                                                                                                                                                                   else {
                                                                                                                                                                         System.out.println("We currently only support the Eclipse database
                                                                                                                                                                             !");
                                                                                      this.opt_withObsolete = opt_withObsolete;                                          System.exit(0);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)
                                                                                    * @see main.IExperiment#getDescription()                                       // Create the Database Connection
                                                                                    */                                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                  public String getDescription() {                                                     Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                       String description = "We want to run an experiment all those bug            dbc.initialize();
                                                                                           reports.nt"                                                           if (!dbc.connect()) {




                                                                                                                                                                                                                                                               pooling to be enabled (through
                                                                                           + "We extract the complete stacktrace information to study fix              System.out.println("Could not connect to database. Check host, port
                                                                                               location and stacktrace interplay.nt";                                    , username and password.");
                                                                                       return description;                                                             System.exit(1);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)                                                                 // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                   * @see main.IExperiment#run()                                                       query
                                                                                   */                                                                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                  public boolean run() {                                                               WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                      final boolean DEBUG = Main.isCli_withDebugMessages();                            LIMIT " + Main.getCli_amount();
                                                                                                                                                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                      // Select an appropriate database name on the server depending on the        int lastID = bugIDs[bugIDs.length -1];
                                                                                          project demanded via command line options
                                                                                      String dbName = "";                                                          if (DEBUG)
                                                                                      if (Main.getCli_project().equalsIgnoreCase("eclipse"))                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                          dbName = "eclipse-december-2007";                                                reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                      else {                                                                               Main.getCli_startID());
                                                                                          System.out.println("We currently only support the Eclipse database
                                                                                              !");                                                                 // Collect the bug reports from the database using up to 100 parallel
                                                                                          System.exit(0);                                                              threads.
                                                                                      }




                                                                                                                                                                                                                                                               IndexWriterConfig) even if
              Untitled                                                                // Create the DatabasePM
                                                                                                 12-03-15 2:55 Connection
                                                                                                                               Untitled
                                                                                      DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                                12-03-15 2:55 PM
                                                                                          Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                      dbc.initialize();                                                                                                                                          Page 2 of 4
                                                                                      if (!dbc.connect()) {
                                                                                          System.out.println("Could not connect to database. Check host, port
                             this.opt_withObsolete = opt_withObsolete;                        , username and password.");
                         }                                                                System.exit(1);                                        this.opt_withObsolete = opt_withObsolete;
                                                                                      }                                                      }
                         /* (non-Javadoc)
                           * @see main.IExperiment#getDescription()                    // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                                                                              /* (non-Javadoc)
                           */                                                              query                                                * @see main.IExperiment#getDescription()
                         public String getDescription() {                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs
                                                                                           WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() {
                              String description = "We want to run an experiment all those bug                                                 BY bug_id ASC
                                  reports.nt"                                            LIMIT " + Main.getCli_amount();                         String description = "We want to run an experiment all those bug
                                                                                       int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                  + "We extract the complete stacktrace information to study fix                                                       reports.nt"
                                      location and stacktrace interplay.nt";         int lastID = bugIDs[bugIDs.length -1];                          + "We extract the complete stacktrace information to study fix
                              return description;                                                                                                          location and stacktrace interplay.nt";
                                                                                       if (DEBUG)




                                                                                                                                                                                                                                                               you're not pulling NRT reader.
                         }                                                                                                                         return description;
                                                                                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                                                                              }
                         /* (non-Javadoc)                                                      reports from " + Main.getCli_dbHost() + " starting with ID " +
                           * @see main.IExperiment#run()                                       Main.getCli_startID());                        /* (non-Javadoc)
                           */                                                                                                                   * @see main.IExperiment#run()
                         public boolean run() {                                        // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                */
                              final boolean DEBUG = Main.isCli_withDebugMessages();        threads.                                           public boolean run() {
                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();
                              // Select an appropriate database name on the server depending on the
                                  project demanded via command line options                                                                        // Select an appropriate database name on the server depending on the
                              String dbName = "";                                                                                                      project demanded via command line options
                              if (Main.getCli_project().equalsIgnoreCase("eclipse"))                                                               String dbName = "";
                                  dbName = "eclipse-december-2007";                                                                                if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                 Page 2 of 4
                              else {                                                                                                                   dbName = "eclipse-december-2007";
                                  System.out.println("We currently only support the Eclipse database                                               else {
                                      !");                                                                                                             System.out.println("We currently only support the Eclipse database
                                  System.exit(0);                                                                                                          !");
                              }                                                                                                                        System.exit(0);
                                                                                                                                                   }

                             // Create the Database Connection
                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                  // Create the Database Connection
                                 Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                             dbc.initialize();                                                                                                        Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                             if (!dbc.connect()) {                                                                                                dbc.initialize();
                                 System.out.println("Could not connect to database. Check host, port                                              if (!dbc.connect()) {
                                     , username and password.");                                                                                      System.out.println("Could not connect to database. Check host, port
                                 System.exit(1);                                                                                                          , username and password.");
                             }                                                                                                                        System.exit(1);
                                                                                                                                                  }
                             // Fetch a number of Bug Report unique IDs belonging to the following
                                 query                                                                                                            // Fetch a number of Bug Report unique IDs belonging to the following
                             String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs                                                    query
                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC                                                 String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                 LIMIT " + Main.getCli_amount();                                                                                      WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);                                                                   LIMIT " + Main.getCli_amount();
                             int lastID = bugIDs[bugIDs.length -1];                                                                               int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                  int lastID = bugIDs[bugIDs.length -1];
                             if (DEBUG)
                                 System.out.println("* Attempting to fetch " + bugIDs.length + "                                                  if (DEBUG)
                                     reports from " + Main.getCli_dbHost() + " starting with ID " +                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                     Main.getCli_startID());                                                                                              reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                                                                                          Main.getCli_startID());
                             // Collect the bug reports from the database using up to 100 parallel
                                 threads.                                                                                                         // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                      threads.




    SVN
                                                                                                       Page 2 of 4
                                                                                                                                                                                                                              Page 2 of 4




                                                                                                                                                                                                                                                                                                7
Change Log Analysis

                                                                                                                                                                                                                                                                 Bug Report
                                                                                                                                                                                                                                                                  #LUCENE-2297




                                                                                                                                                Untitled                                                                                    12-03-15 2:55 PM




                                                                                                                                                                   this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                 * @see main.IExperiment#getDescription()
                                                                                                                                                                 */
                                                                                                                                                               public String getDescription() {
                                                                                                                                                                    String description = "We want to run an experiment all those bug
                                                                                                                                                                        reports.nt"
                                                                                                                                                                        + "We extract the complete stacktrace information to study fix
                                                                                                                                                                            location and stacktrace interplay.nt";
                                                                                                                                                                    return description;
                                                                                                                                                               }

                                                                                                                                                               /* (non-Javadoc)
                                                                                                                                                                * @see main.IExperiment#run()




                                                                                                                                                                                                                                                               LUCENE-2297: allow reader
                                                                                                                                                                */
                                                                                                                                                               public boolean run() {
                                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();

                                                                                                                                                                   // Select an appropriate database name on the server depending on the
                                                                     Untitled                                                                               12-03-15 2:55project demanded via command line options
                                                                                                                                                                          PM
                                                                                                                                                                   String dbName = "";
                                                                                                                                                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                         dbName = "eclipse-december-2007";
                                                                                                                                                                   else {
                                                                                                                                                                         System.out.println("We currently only support the Eclipse database
                                                                                                                                                                             !");
                                                                                      this.opt_withObsolete = opt_withObsolete;                                          System.exit(0);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)
                                                                                    * @see main.IExperiment#getDescription()                                       // Create the Database Connection
                                                                                    */                                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                  public String getDescription() {                                                     Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                       String description = "We want to run an experiment all those bug            dbc.initialize();
                                                                                           reports.nt"                                                           if (!dbc.connect()) {




                                                                                                                                                                                                                                                               pooling to be enabled (through
                                                                                           + "We extract the complete stacktrace information to study fix              System.out.println("Could not connect to database. Check host, port
                                                                                               location and stacktrace interplay.nt";                                    , username and password.");
                                                                                       return description;                                                             System.exit(1);
                                                                                  }                                                                                }
                                                                                  /* (non-Javadoc)                                                                 // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                   * @see main.IExperiment#run()                                                       query
                                                                                   */                                                                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                  public boolean run() {                                                               WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                      final boolean DEBUG = Main.isCli_withDebugMessages();                            LIMIT " + Main.getCli_amount();
                                                                                                                                                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                      // Select an appropriate database name on the server depending on the        int lastID = bugIDs[bugIDs.length -1];
                                                                                          project demanded via command line options
                                                                                      String dbName = "";                                                          if (DEBUG)
                                                                                      if (Main.getCli_project().equalsIgnoreCase("eclipse"))                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                          dbName = "eclipse-december-2007";                                                reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                      else {                                                                               Main.getCli_startID());
                                                                                          System.out.println("We currently only support the Eclipse database
                                                                                              !");                                                                 // Collect the bug reports from the database using up to 100 parallel
                                                                                          System.exit(0);                                                              threads.
                                                                                      }




                                                                                                                                                                                                                                                               IndexWriterConfig) even if
              Untitled                                                                // Create the DatabasePM
                                                                                                 12-03-15 2:55 Connection
                                                                                                                               Untitled
                                                                                      DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                                12-03-15 2:55 PM
                                                                                          Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                      dbc.initialize();                                                                                                                                          Page 2 of 4
                                                                                      if (!dbc.connect()) {
                                                                                          System.out.println("Could not connect to database. Check host, port
                             this.opt_withObsolete = opt_withObsolete;                        , username and password.");
                         }                                                                System.exit(1);                                        this.opt_withObsolete = opt_withObsolete;
                                                                                      }                                                      }
                         /* (non-Javadoc)
                           * @see main.IExperiment#getDescription()                    // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                                                                              /* (non-Javadoc)
                           */                                                              query                                                * @see main.IExperiment#getDescription()
                         public String getDescription() {                              String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs
                                                                                           WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() {
                              String description = "We want to run an experiment all those bug                                                 BY bug_id ASC
                                  reports.nt"                                            LIMIT " + Main.getCli_amount();                         String description = "We want to run an experiment all those bug
                                                                                       int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                  + "We extract the complete stacktrace information to study fix                                                       reports.nt"
                                      location and stacktrace interplay.nt";         int lastID = bugIDs[bugIDs.length -1];                          + "We extract the complete stacktrace information to study fix
                              return description;                                                                                                          location and stacktrace interplay.nt";
                                                                                       if (DEBUG)




                                                                                                                                                                                                                                                               you're not pulling NRT reader.
                         }                                                                                                                         return description;
                                                                                           System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                                                                              }
                         /* (non-Javadoc)                                                      reports from " + Main.getCli_dbHost() + " starting with ID " +
                           * @see main.IExperiment#run()                                       Main.getCli_startID());                        /* (non-Javadoc)
                           */                                                                                                                   * @see main.IExperiment#run()
                         public boolean run() {                                        // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                */
                              final boolean DEBUG = Main.isCli_withDebugMessages();        threads.                                           public boolean run() {
                                                                                                                                                   final boolean DEBUG = Main.isCli_withDebugMessages();
                              // Select an appropriate database name on the server depending on the
                                  project demanded via command line options                                                                        // Select an appropriate database name on the server depending on the
                              String dbName = "";                                                                                                      project demanded via command line options
                              if (Main.getCli_project().equalsIgnoreCase("eclipse"))                                                               String dbName = "";
                                  dbName = "eclipse-december-2007";                                                                                if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                 Page 2 of 4
                              else {                                                                                                                   dbName = "eclipse-december-2007";
                                  System.out.println("We currently only support the Eclipse database                                               else {
                                      !");                                                                                                             System.out.println("We currently only support the Eclipse database
                                  System.exit(0);                                                                                                          !");
                              }                                                                                                                        System.exit(0);
                                                                                                                                                   }

                             // Create the Database Connection
                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),                                                  // Create the Database Connection
                                 Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);                                                             DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                             dbc.initialize();                                                                                                        Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                             if (!dbc.connect()) {                                                                                                dbc.initialize();
                                 System.out.println("Could not connect to database. Check host, port                                              if (!dbc.connect()) {
                                     , username and password.");                                                                                      System.out.println("Could not connect to database. Check host, port
                                 System.exit(1);                                                                                                          , username and password.");
                             }                                                                                                                        System.exit(1);
                                                                                                                                                  }
                             // Fetch a number of Bug Report unique IDs belonging to the following
                                 query                                                                                                            // Fetch a number of Bug Report unique IDs belonging to the following
                             String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs                                                    query
                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC                                                 String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                 LIMIT " + Main.getCli_amount();                                                                                      WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);                                                                   LIMIT " + Main.getCli_amount();
                             int lastID = bugIDs[bugIDs.length -1];                                                                               int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                  int lastID = bugIDs[bugIDs.length -1];
                             if (DEBUG)
                                 System.out.println("* Attempting to fetch " + bugIDs.length + "                                                  if (DEBUG)
                                     reports from " + Main.getCli_dbHost() + " starting with ID " +                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                     Main.getCli_startID());                                                                                              reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                                                                                          Main.getCli_startID());
                             // Collect the bug reports from the database using up to 100 parallel
                                 threads.                                                                                                         // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                      threads.




    SVN
                                                                                                       Page 2 of 4
                                                                                                                                                                                                                              Page 2 of 4




                                                                                                                                                                                                                                                                                                7
Information Retrieval
Description                              Map<Integer, BugReport> bugReports
Jared Burns 2002-11-01 14:56:40 EST      = dbc.getReportsConcurrent(bugIDs,
Build 20021031(, 30, and 29)             Main.isCli_withDiscussions(),
Linux-GTK                                Main.isCli_withAttachments(),
                                         true); // Instantiate Output
Very often (in recent builds), when I    Class // This time we will need to
perform   an  action   that  requires    use some XML Outputter for the
establishing a connection to the         Stacktraces
dev.eclipse.org   CVS   server,   the    Experiment_Structural_Logger logger
progress dialog appears but it stalls    = new Experiment_Structural_Logger
before any progress is made. I have      (); DataExportUtility dexutil = new
to hit Cancel, wait 10+ seconds (I       DataExportUtility(); XMLOutputter
just switch apps), and then try again    outputter = new XMLOutputter
or it never                              (Format.getPrettyFormat()); Element
connects.                                rootElement = new Element
                                         ("CVS"); // Process the Reports if
This happens to me most often when I     (Main.getCli_project
click the "Synchronize all CVS           ().equalsIgnoreCase("eclipse"))
projects..."   button.   The    dialog   { for (int id : bugIDs) { }
appears and says "Authenticating over    BugReport currentReport =
extssh", but the progress monitor        bugReports.get(id); Element
never budges.                            reportElement = new Element
                    Discussion           ("Report");                 Code
                                                                               8
Information Retrieval
Description                              Map<Integer, BugReport> bugReports
Jared Burns 2002-11-01 14:56:40 EST      = dbc.getReportsConcurrent(bugIDs,
Build 20021031(, 30, and 29)             Main.isCli_withDiscussions(),
Linux-GTK                                Main.isCli_withAttachments(),
                                         true); // Instantiate Output
Very often (in recent builds), when I    Class // This time we will need to
perform   an  action   that  requires    use some XML Outputter for the
establishing a connection to the         Stacktraces
dev.eclipse.org   CVS   server,   the    Experiment_Structural_Logger logger
progress dialog appears but it stalls    = new Experiment_Structural_Logger
before any progress is made. I have      (); DataExportUtility dexutil = new
to hit Cancel, wait 10+ seconds (I       DataExportUtility(); XMLOutputter
just switch apps), and then try again    outputter = new XMLOutputter
or it never                              (Format.getPrettyFormat()); Element
connects.                                rootElement = new Element
                                         ("CVS"); // Process the Reports if
This happens to me most often when I     (Main.getCli_project
click the "Synchronize all CVS           ().equalsIgnoreCase("eclipse"))
projects..."   button.   The    dialog   { for (int id : bugIDs) { }
appears and says "Authenticating over    BugReport currentReport =
extssh", but the progress monitor        bugReports.get(id); Element
never budges.                            reportElement = new Element
                    Discussion           ("Report");                 Code
                                                                               8
Information Retrieval
Description                              Map<Integer, BugReport> bugReports
Jared Burns 2002-11-01 14:56:40 EST      = dbc.getReportsConcurrent(bugIDs,
Build 20021031(, 30, and 29)             Main.isCli_withDiscussions(),
Linux-GTK                                Main.isCli_withAttachments(),
                                         true); // Instantiate Output
Very often (in recent builds), when I    Class // This time we will need to
perform   an  action   that  requires    use some XML Outputter for the
establishing a connection to the         Stacktraces
dev.eclipse.org   CVS   server,   the    Experiment_Structural_Logger logger
progress dialog appears but it stalls    = new Experiment_Structural_Logger
before any progress is made. I have      (); DataExportUtility dexutil = new
to hit Cancel, wait 10+ seconds (I       DataExportUtility(); XMLOutputter
just switch apps), and then try again    outputter = new XMLOutputter
or it never                              (Format.getPrettyFormat()); Element
connects.                                rootElement = new Element
                                         ("CVS"); // Process the Reports if
This happens to me most often when I     (Main.getCli_project
click the "Synchronize all CVS           ().equalsIgnoreCase("eclipse"))
projects..."   button.   The    dialog   { for (int id : bugIDs) { }
appears and says "Authenticating over    BugReport currentReport =
extssh", but the progress monitor        bugReports.get(id); Element
never budges.                            reportElement = new Element
                    Discussion           ("Report");                 Code
                                                                               8
Information Retrieval
Description                              Map<Integer, BugReport> bugReports
Jared Burns 2002-11-01 14:56:40 EST      = dbc.getReportsConcurrent(bugIDs,
Build 20021031(, 30, and 29)             Main.isCli_withDiscussions(),
Linux-GTK                                Main.isCli_withAttachments(),
                                         true); // Instantiate Output
Very often (in recent builds), when I    Class // This time we will need to
perform   an  action   that  requires    use some XML Outputter for the
establishing a connection to the         Stacktraces
dev.eclipse.org   CVS   server,   the    Experiment_Structural_Logger logger
progress dialog appears but it stalls    = new Experiment_Structural_Logger
before any progress is made. I have      (); DataExportUtility dexutil = new
to hit Cancel, wait 10+ seconds (I       DataExportUtility(); XMLOutputter
just switch apps), and then try again    outputter = new XMLOutputter
or it never                              (Format.getPrettyFormat()); Element
connects.                                rootElement = new Element
                                         ("CVS"); // Process the Reports if
This happens to me most often when I     (Main.getCli_project
click the "Synchronize all CVS           ().equalsIgnoreCase("eclipse"))
projects..."   button.   The    dialog   { for (int id : bugIDs) { }
appears and says "Authenticating over    BugReport currentReport =
extssh", but the progress monitor        bugReports.get(id); Element
never budges.                            reportElement = new Element
                    Discussion           ("Report");                 Code
                                                                               8
Lightweight Textual Analysis



 I20041130-0800

 Wrong compiler error when interface overrides two methods with same signature
 but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it
 with "Unhandled exception type IOException".

 public class Over {
     void x() throws ZipException {
         IandJ ij= new K();
         ij.m(); //wrong compile error
     }
     void y() throws ZipException {
         K k= new K();
         k.m();
     }
 }

 interface I { void m() throws IOException; }
 interface J { void m() throws ZipException; }
 interface IandJ extends I, J {} // swap I and J to make compile error disappear
 class K implements IandJ { public void m() throws ZipException { } }




                                                                                   9
Lightweight Textual Analysis

                                                ZipExcept
     K.java                  Over.java           ion.java              I.java      J.java




 I20041130-0800

 Wrong compiler error when interface overrides two methods with same signature     IOExcepti
 but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it    on.java
 with "Unhandled exception type IOException".

 public class Over {
     void x() throws ZipException {
         IandJ ij= new K();
         ij.m(); //wrong compile error
     }
     void y() throws ZipException {
         K k= new K();
         k.m();
     }
 }

 interface I { void m() throws IOException; }
 interface J { void m() throws ZipException; }
 interface IandJ extends I, J {} // swap I and J to make compile error disappear
 class K implements IandJ { public void m() throws ZipException { } }




                                                                                               9
10
X Change Log Analysis
    Generalizeability: Only works for Bug Reports
    Granularity: Associates complete discussion thread
    Precision: Link to all files changed in commit
    Conceptual Mismatch: Ignores the actual discussions!




                                                           10
X Change Log Analysis
    Generalizeability: Only works for Bug Reports
    Granularity: Associates complete discussion thread
    Precision: Link to all files changed in commit
    Conceptual Mismatch: Ignores the actual discussions!



X Information Retrieval
    Generalizeability: Works for all kinds of documents
    Granularity: Which granularity level to choose?
    Precision: Lots and lots of false positives!
    Conceptual Mismatch: Links unrelated documents!




                                                           10
X Change Log Analysis
    Generalizeability: Only works for Bug Reports
    Granularity: Associates complete discussion thread
    Precision: Link to all files changed in commit
    Conceptual Mismatch: Ignores the actual discussions!



X Information Retrieval
    Generalizeability: Works for all kinds of documents
    Granularity: Which granularity level to choose?
    Precision: Lots and lots of false positives!
    Conceptual Mismatch: Links unrelated documents!


X Lightweight Textual Analysis
    Generalizeability: Works for all kinds of documents
    Granularity: Very fine-grained
    Precision: Up to 95% precision [Bacchelli-ICSE10]
    Conceptual Mismatch: Links to every class mentioned
                                                           10
In this Paper:
Fuzzy Code Search
                                                              ZipExcept                     IOExcepti
I20041130-0800                           K.java   Over.java    ion.java   I.java   J.java    on.java

Wrong compiler error when interface overrides two methods with same signature
but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it
with "Unhandled exception type IOException".

public class Over {
    void x() throws ZipException {
        IandJ ij= new K();
        ij.m(); //wrong compile error
    }
    void y() throws ZipException {
        K k= new K();
        k.m();
    }
}

interface I { void m() throws IOException; }
interface J { void m() throws ZipException; }
interface IandJ extends I, J {} // swap I and J to make compile error disappear
class K implements IandJ { public void m() throws ZipException { } }

                                                                                                        11
In this Paper:
Fuzzy Code Search
                                                              ZipExcept                     IOExcepti
I20041130-0800                           K.java   Over.java    ion.java   I.java   J.java    on.java

Wrong compiler error when interface overrides two methods with same signature
but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it
with "Unhandled exception type IOException".

public class Over {
    void x() throws ZipException {
        IandJ ij= new K();
        ij.m(); //wrong compile error
    }
    void y() throws ZipException {
        K k= new K();
        k.m();
    }
}

interface I { void m() throws IOException; }
interface J { void m() throws ZipException; }
interface IandJ extends I, J {} // swap I and J to make compile error disappear
class K implements IandJ { public void m() throws ZipException { } }

                                                                                                        11
In this Paper:
Fuzzy Code Search
                                                              ZipExcept                     IOExcepti
I20041130-0800                           K.java   Over.java    ion.java   I.java   J.java    on.java

Wrong compiler error when interface overrides two methods with same signature
but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it
with "Unhandled exception type IOException".

public class Over {
    void x() throws ZipException {
        IandJ ij= new K();
        ij.m(); //wrong compile error                                                                   X.java
    }
    void y() throws ZipException {
        K k= new K();
        k.m();
    }
}                                                                                                       Y.java

interface I { void m() throws IOException; }
interface J { void m() throws ZipException; }
interface IandJ extends I, J {} // swap I and J to make compile error disappear
class K implements IandJ { public void m() throws ZipException { } }

                                                                                                                 11
Fuzzy Code Search
Approach




Discussion



                    12
Fuzzy Code Search
Approach




Discussion


             infoZilla tool
                              12
Fuzzy Code Search
Approach




                              Code Fragments
Discussion


             infoZilla tool
                                           12
Fuzzy Code Search
                                                                                                                                                                             Untitled                                                                                12-03-15 2:55 PM




                                                                                                                                                                                            this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                                                        }
                                                                                                                                                                                                Untitled                                                                                 12-03-15 2:55 PM
                                                                                                                                                                                        /* (non-Javadoc)
                                                                                                                                                                                          * @see main.IExperiment#getDescription()
                                                                                                                                                                                          */
                                                                                                                                                                                        public String getDescription() {
                                                                                                                                                                                             String description = "We want to run an experiment all those bug
                                                                                                                                                                                                 reports.nt"       this.opt_withObsolete = opt_withObsolete;
                                                                                                                                                                                                 + "We extract} the complete stacktrace information to study fix
                                                                                                                                                                                                       location and stacktrace interplay.nt";
                                                                                                                                                                                             return description; (non-Javadoc)
                                                                                                                                                                                                                /*
                                                                                                                                                                                        }                         * @see main.IExperiment#getDescription()
                                                                                                                                                                                                                  */
                                                                                                                                                                                        /* (non-Javadoc)        public String getDescription() {
                                                                                                                                                                                          * @see main.IExperiment#run() description = "We want to run an experiment all those bug
                                                                                                                                                                                                                     String
                                                                                                                                                                                          */                              reports.nt"
                                                                                                                                                                                        public boolean run() {            + "We extract the complete stacktrace information to study fix
                                                                                                                                                                                             final boolean DEBUG = Main.isCli_withDebugMessages();interplay.nt";
                                                                                                                                                                                                                              location and stacktrace
                                                                                                                                                                                                                     return description;




                                                                                                                                                                                                                                                                                                             Clone Detection
                                                                                                                                                                                             // Select an appropriate database name on the server depending on the
                                                                                                                                                                                                                }
                                                                                                                                                                                                 project demanded via command line options
                                                                                                                                                                                             String dbName = ""; (non-Javadoc)
                                                                                                                                                                                                                /*
                                                                                                                                                                                             if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                                                                  * @see main.IExperiment#run()
                                                                                                                                                                                                 dbName = "eclipse-december-2007";
                                                                                                                                                                                                                  */
                                                                                                                                                                                             else {             public boolean run() {
                                                                                                                                                                                                 System.out.println("We boolean DEBUG = support the Eclipse database
                                                                                                                                                                                                                     final currently only Main.isCli_withDebugMessages();
                                                                                                                                                                                                       !");
                                                                                                                                                                                                 System.exit(0); // Select an appropriate database name on the server depending on the
                                                                                                                                                                                             }                            project demanded via command line options
                                                                                                                                                                                                                     String dbName = "";
                                                                                                                                                                                                                     if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                                                                                                                             // Create the Database Connection "eclipse-december-2007";
                                                                                                                                                                                                                          dbName =
                                                                                                                                                                                             DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(),
                                                                                                                                                                                                                       = new
                                                                                                                                                                                                 Main.getCli_dbUser(),System.out.println("We currently only support the Eclipse database
                                                                                                                                                                                                                           Main.getCli_dbPass(), dbName);
                                                                                                                                                                                             dbc.initialize();                !");
                                                                                                                                                                                             if (!dbc.connect()) {        System.exit(0);
                                                                                                                                                                                                 System.out.println("Could not connect to database. Check host, port
                                                                                                                                                                                                                     }
                                                                                                                                                                                                       , username and password.");
                                                                                                                                                                                                 System.exit(1);
                                                                                                                                                                                             }                       // Create the Database Connection
                                                                                                                                                                                                                     DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                                                                                                                                                             // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                                                                                                                                                          Report unique IDs belonging to the following
                                                                                                                                                                                                 query               dbc.initialize();
                                                                                                                                                                                             String setSelectionQuery(!dbc.connect()) {
                                                                                                                                                                                                                     if   = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                                                                                                                                 WHERE bug_id > " + Main.getCli_startID() + " ORDER connect to ASC
                                                                                                                                                                                                                          System.out.println("Could not BY bug_id database. Check host, port
                                                                                                                                                                                                 LIMIT " + Main.getCli_amount();




Approach
                                                                                                                                                                                                                              , username and password.");
                                                                                                                                                                                             int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                                                                                          System.exit(1);
                                                                                                                                                                                             int lastID = bugIDs[bugIDs.length -1];
                                                                                                                                                                                                                     }

                                                                                                                                                                                            if (DEBUG)           // Fetch a number of Bug Report unique IDs belonging to the following
                                                                                                                                                                                                System.out.println("*query
                                                                                                                                                                                                                      Attempting to fetch " + bugIDs.length + "
                                                                                                                                                                                                    reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs
                                                                                                                                                                                                                 " + Main.getCli_dbHost() + " starting with bug_id
                                                                                                                                                                                                    Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                                                                                                                                                     WHERE
                                                                                                                                                                                                                     LIMIT " + Main.getCli_amount();
                                                                                                                                                                                            // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                                                                                                                                                                 int[] from the database using up to 100 parallel
                                                                                                                                                                                                threads.         int lastID = bugIDs[bugIDs.length -1];

                                                                                                                                                                                                                  if (DEBUG)
                                                                                                                                                                                                                      System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                                                                                                                                                          reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                                                                                                                                                          Main.getCli_startID());
                                                                                                                                                                                                                                                                      Page 2 of 4
                                                                                                                                                                                                                  // Collect the bug reports from the database using up to 100 parallel
                                                                                                                                                                                                                      threads.




                                                                                                                                                                                                                                                                                               Page 2 of 4
                   Untitled                                                                                  12-03-15 2:55 PM




                                   this.opt_withObsolete = opt_withObsolete;
                              }
                                      Untitled                                                                                       12-03-15 2:55 PM
                              /* (non-Javadoc)
                                * @see main.IExperiment#getDescription()
                                */
                              public String getDescription() {
                                   String description = "We want to run an experiment all those bug
                                       reports.nt"       this.opt_withObsolete = opt_withObsolete;
                                       + "We extract} the complete stacktrace information to study fix
                                             location and stacktrace interplay.nt";
                                                               Untitled                                                                                  12-03-15 2:55 PM
                                   return description; (non-Javadoc)
                                                      /*
                              }                         * @see main.IExperiment#getDescription()
                                                        */
                              /* (non-Javadoc)        public String getDescription() {
                                * @see main.IExperiment#run() description = "We want to run an experiment all those bug
                                                           String
                                */                              reports.nt"       this.opt_withObsolete = opt_withObsolete;
                              public boolean run() {            + "We extract} the complete stacktrace information to study fix
                                   final boolean DEBUG = Main.isCli_withDebugMessages();interplay.nt";
                                                                      location and stacktrace
                                                           return description; (non-Javadoc)
                                                                               /*
                                   // Select an appropriate database name on the server depending on the
                                                      }                          * @see main.IExperiment#getDescription()
                                       project demanded via command line options
                                                                                 */
                                   String dbName = ""; (non-Javadoc)
                                                      /*                       public String getDescription() {
                                   if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                        * @see main.IExperiment#run() description = "We want to run an experiment all those bug
                                                                                    String
                                       dbName = "eclipse-december-2007";
                                                        */                               reports.nt"
                                   else {             public boolean run() {             + "We extract the complete stacktrace information to study fix
                                       System.out.println("We boolean DEBUG = support the Eclipse database
                                                           final currently only Main.isCli_withDebugMessages();interplay.nt";
                                                                                             location and stacktrace
                                             !");
                                                                                    return description;
                                       System.exit(0); // Select an appropriate database name on the server depending on the
                                                                               }
                                   }                            project demanded via command line options
                                                           String dbName = ""; (non-Javadoc)
                                                                               /*
                                                           if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                                                 * @see main.IExperiment#run()
                                   // Create the Database Connection "eclipse-december-2007";
                                                                dbName =         */
                                   DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(),
                                                             = new
                                                                               public boolean run() {
                                       Main.getCli_dbUser(),System.out.println("We currently only support the Eclipse database
                                                                 Main.getCli_dbPass(), dbName);
                                                                                    final boolean DEBUG = Main.isCli_withDebugMessages();
                                   dbc.initialize();                  !");
                                   if (!dbc.connect()) {        System.exit(0); // Select an appropriate database name on the server depending on the
                                       System.out.println("Could not connect to database. Check host, port
                                                           }                             project demanded via command line options
                                             , username and password.");
                                                                                    String dbName = "";
                                       System.exit(1);
                                                                                    if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                   }                       // Create the Database Connection "eclipse-december-2007";
                                                                                         dbName =
                                                           DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(),
                                                                                      = new
                                   // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                Report unique IDs belonging to the following
                                                                                         System.out.println("We currently only support the Eclipse database
                                       query               dbc.initialize();                 !");
                                   String setSelectionQuery(!dbc.connect()) {
                                                           if   = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                                                         System.exit(0);
                                       WHERE bug_id > " + Main.getCli_startID() + " ORDER connect to ASC
                                                                System.out.println("Could not BY bug_id database. Check host, port
                                                                                    }
                                       LIMIT " + Main.getCli_amount();, username and password.");
                                   int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                System.exit(1);
                                   int lastID = bugIDs[bugIDs.length -1];
                                                           }                        // Create the Database Connection
                                                                                    DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                   if (DEBUG)              // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                                                         Report unique IDs belonging to the following
                                       System.out.println("*queryAttempting to fetch " + bugIDs.length + "
                                                                                    dbc.initialize();
                                             reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs
                                                           " + Main.getCli_dbHost() + " starting with bug_id
                                                                                    if (!dbc.connect()) {
                                             Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                WHERE                    System.out.println("Could not connect to database. Check host, port
                                                                LIMIT " + Main.getCli_amount();
                                                                                             , username and password.");
                                   // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                           int[] from the database using up to 100 parallel
                                                                                         System.exit(1);
                                       threads.            int lastID = bugIDs[bugIDs.length -1];
                                                                                    }

                                                         if (DEBUG)           // Fetch a number of Bug Report unique IDs belonging to the following
                                                             System.out.println("*query
                                                                                   Attempting to fetch " + bugIDs.length + "
                                                                 reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs
                                                                              " + Main.getCli_dbHost() + " starting with bug_id
                                                                 Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                                                  WHERE
                                                                                  LIMIT " + Main.getCli_amount(); 2 of 4
                                                                                                             Page
                                                         // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                                              int[] from the database using up to 100 parallel
                                                             threads.         int lastID = bugIDs[bugIDs.length -1];

                                                                               if (DEBUG)
                                                                                   System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                                       reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                                       Main.getCli_startID());
                                                                                                                                   Page 2 of 4
                                                                               // Collect the bug reports from the database using up to 100 parallel
                                                                                   threads.




                                                                                                                                                               Page 2 of 4




                                     Untitled                                                                                       12-03-15 2:55 PM




                                                         this.opt_withObsolete = opt_withObsolete;
                                                    }

                                                    /* (non-Javadoc)
                                                      * @see main.IExperiment#getDescription()
                                                      */
                                                    public String getDescription() {
                                                         String description = "We want to run an experiment all those bug
                                                             reports.nt"
                                                             + "We extract the complete stacktrace information to study fix
                                                                 location and stacktrace interplay.nt";
                                                         return description;
                                                    }

                                                    /* (non-Javadoc)
                                                     * @see main.IExperiment#run()
                                                     */
                                                    public boolean run() {
                                                        final boolean DEBUG = Main.isCli_withDebugMessages();

                                                         // Select an appropriate database name on the server depending on the
                                                             project demanded via command line options
                                                         String dbName = "";
                                                         if (Main.getCli_project().equalsIgnoreCase("eclipse"))
                                                             dbName = "eclipse-december-2007";
                                                         else {
                                                             System.out.println("We currently only support the Eclipse database
                                                                 !");
                                                             System.exit(0);
                                                         }


                                                         // Create the Database Connection
                                                         DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(),
                                                             Main.getCli_dbUser(), Main.getCli_dbPass(), dbName);
                                                         dbc.initialize();
                                                         if (!dbc.connect()) {
                                                             System.out.println("Could not connect to database. Check host, port
                                                                 , username and password.");
                                                             System.exit(1);
                                                         }

                                                         // Fetch a number of Bug Report unique IDs belonging to the following
                                                             query
                                                         String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs
                                                             WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC
                                                             LIMIT " + Main.getCli_amount();
                                                         int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery);
                                                         int lastID = bugIDs[bugIDs.length -1];

                                                         if (DEBUG)
                                                             System.out.println("* Attempting to fetch " + bugIDs.length + "
                                                                 reports from " + Main.getCli_dbHost() + " starting with ID " +
                                                                 Main.getCli_startID());

                                                         // Collect the bug reports from the database using up to 100 parallel
                                                             threads.




                                                                                                                                         Page 2 of 4




                                                                                                                                                                                                                                                                                                             Code Fragments
Discussion


             infoZilla tool
                                                                                                                                                                                                                                                                                                                           12
Evaluation of our Approach




                             13
Evaluation of our Approach

   1) Quantitative
     Do developers talk about the things they
     end up changing?




                                                13
Evaluation of our Approach

   1) Quantitative
     Do developers talk about the things they
     end up changing?


   2) Qualitative
     Which parts of the code do developers
     talk about the most?
                                                13
Case Study: Eclipse 2.0 - 3.2



     A
Change-Log Analysis
                          B
                      Fuzzy Code Search




                                          14
Case Study: Eclipse 2.0 - 3.2



      A
Change-Log Analysis
   16,722     23,079
                           B
                       Fuzzy Code Search

Discussions    Files



                                           14
Case Study: Eclipse 2.0 - 3.2



      A
Change-Log Analysis
   16,722     23,079
                              B
                        Fuzzy Code Search
                          3,865      13,581
Discussions    Files   Discussions    Files



                                              14
Case Study: Eclipse 2.0 - 3.2



      A
Change-Log Analysis
   16,722      23,079
                                    B
                              Fuzzy Code Search
                                3,865      13,581
Discussions     Files        Discussions    Files


              Q: Is A a Superset of B ?
                                                    14
Bug Reports (211,843)




                        15
Bug Reports (211,843)




Bug Reports containing
    Code (33,301)




                                    16
Bug Reports (211,843)




Bug Reports containing
    Code (33,301)


             A
    Clone Detection
    Based Approach
        (2,980)




                                    17
Bug Reports (211,843)




Bug Reports containing
    Code (33,301)


             A                             B
    Clone Detection                 Change Log Analysis
    Based Approach                    Based Approach
        (2,980)                          (16,722)




                                                          18
Bug Reports (211,843)




Bug Reports containing
    Code (33,301)


             A                             B
    Clone Detection                 Change Log Analysis
    Based Approach       507          Based Approach
        (2,980)                          (16,722)




                                                          19
Bug Reports (211,843)




      Bug Reports containing
          Code (33,301)


                   A                             B
          Clone Detection                 Change Log Analysis
          Based Approach       507          Based Approach



                                sa  re
              (2,980)                          (16,722)




                        p: Link
               ov e rla         nt!
          al l           iffere
   ry sm ually d
Ve        ce pt
     c on
                                                                19
20
20
of c ode
                     y re-use           ts.
            e: h eav           sion tes
 I n Eclips            reg res
             o cr eate
    ppe ts t
sni




                                              20
Fuzzy Code Search




                    21
Fuzzy Code Search
    Finds conceptually different links:




                                          21
Fuzzy Code Search
    Finds conceptually different links:
      What Developers really talk about




                                          21
Fuzzy Code Search
    Finds conceptually different links:
      What Developers really talk about
      Not what they end up changing




                                          21
Fuzzy Code Search
    Finds conceptually different links:
      What Developers really talk about
      Not what they end up changing
      Not what their code references



                                          21
22
22
22
22
22
Thanks!




          22

More Related Content

ODP
EJB 3.0 Walkthrough (2006)
PPTX
Oleksandr Valetskyy - DI vs. IoC
PDF
Ejb3 Dan Hinojosa
PPT
Refactoring Jdbc Programming
PPT
Executing Sql Commands
PPTX
C++11 Multithreading - Futures
PPTX
Core Data Performance Guide Line
PDF
Java Programming - 04 object oriented in java
EJB 3.0 Walkthrough (2006)
Oleksandr Valetskyy - DI vs. IoC
Ejb3 Dan Hinojosa
Refactoring Jdbc Programming
Executing Sql Commands
C++11 Multithreading - Futures
Core Data Performance Guide Line
Java Programming - 04 object oriented in java

What's hot (20)

ODP
Java Persistence API
PPT
Sqlapi0.1
PDF
Magic methods
PPTX
Spring data jpa
PDF
Nhibernate Part 2
PDF
spring-tutorial
PPT
Executing Sql Commands
PPTX
Jdk 7 4-forkjoin
PDF
Hoisting Nested Functions
PDF
Hoisting Nested Functions
PPTX
Migrating to JUnit 5
PDF
Java8 - Interfaces, evolved
KEY
Test-driven development for TYPO3 (T3DD11)
PDF
FunctionalInterfaces
PDF
Testing the frontend
PPTX
Creational pattern 2
ODP
Intro to Testing in Zope, Plone
PDF
Unit Testing Standards - Recommended Best Practices
PDF
How Does Kubernetes Build OpenAPI Specifications?
Java Persistence API
Sqlapi0.1
Magic methods
Spring data jpa
Nhibernate Part 2
spring-tutorial
Executing Sql Commands
Jdk 7 4-forkjoin
Hoisting Nested Functions
Hoisting Nested Functions
Migrating to JUnit 5
Java8 - Interfaces, evolved
Test-driven development for TYPO3 (T3DD11)
FunctionalInterfaces
Testing the frontend
Creational pattern 2
Intro to Testing in Zope, Plone
Unit Testing Standards - Recommended Best Practices
How Does Kubernetes Build OpenAPI Specifications?
Ad

Viewers also liked (7)

PDF
Managing Community Contributions: Lessons Learned from a Case Study on Andro...
PDF
A Lightweight Approach to Uncover Technical Information in Unstructured Data
PDF
Mining Development Repositories to Study the Impact of Collaboration on Softw...
PDF
Ph.D. Dissertation - Studying the Impact of Developer Communication on the Qu...
PDF
Studying the impact of Social Structures on Software Quality
PDF
Think Locally, Act Gobally - Improving Defect and Effort Prediction Models
PDF
Ahmad Hasan CV
Managing Community Contributions: Lessons Learned from a Case Study on Andro...
A Lightweight Approach to Uncover Technical Information in Unstructured Data
Mining Development Repositories to Study the Impact of Collaboration on Softw...
Ph.D. Dissertation - Studying the Impact of Developer Communication on the Qu...
Studying the impact of Social Structures on Software Quality
Think Locally, Act Gobally - Improving Defect and Effort Prediction Models
Ahmad Hasan CV
Ad

Similar to Using Fuzzy Code Search to Link Code Fragments in Discussions to Source Code (20)

PDF
Csmr2012 bettenburg presentation
PDF
Nick Sieger JRuby Concurrency EMRubyConf 2011
PPT
Junit and testNG
PDF
Spock: A Highly Logical Way To Test
PPSX
Writing code that writes code - Nguyen Luong
PPSX
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
PPT
Spring data
PPT
比XML更好用的Java Annotation
PDF
PDF
create a new interface called DropoutStackADT for representing a dro.pdf
PDF
ODP
Ast transformations
PDF
Spock: Test Well and Prosper
PDF
(1)Objective Binary Search Tree traversal (2 points)Use traversal.pdf
PPT
Core java concepts
PDF
Java9 Beyond Modularity - Java 9 más allá de la modularidad
PDF
55j7
PDF
create-netflix-clone-02-server.pdf
PPTX
preparecallablepptx__2023_09_11_14_40_58pptx__2024_09_23_11_14_59.pptx
PDF
Annotation Processing - Demystifying Java's Dark Arts
Csmr2012 bettenburg presentation
Nick Sieger JRuby Concurrency EMRubyConf 2011
Junit and testNG
Spock: A Highly Logical Way To Test
Writing code that writes code - Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
Spring data
比XML更好用的Java Annotation
create a new interface called DropoutStackADT for representing a dro.pdf
Ast transformations
Spock: Test Well and Prosper
(1)Objective Binary Search Tree traversal (2 points)Use traversal.pdf
Core java concepts
Java9 Beyond Modularity - Java 9 más allá de la modularidad
55j7
create-netflix-clone-02-server.pdf
preparecallablepptx__2023_09_11_14_40_58pptx__2024_09_23_11_14_59.pptx
Annotation Processing - Demystifying Java's Dark Arts

More from Nicolas Bettenburg (15)

PDF
10 Year Impact Award Presentation - Duplicate Bug Reports Considered Harmful ...
PDF
PDF
An Empirical Study on Inconsistent Changes to Code Clones at Release Level
PDF
An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...
PDF
Fuzzy Logic in Smart Homes
PDF
Finding Paths in Large Spaces - A* and Hierarchical A*
PDF
Automatic Identification of Bug Introducing Changes
PDF
Cloning Considered Harmful Considered Harmful
PDF
Approximation Algorithms
PDF
Predictors of Customer Perceived Quality
PDF
Extracting Structural Information from Bug Reports.
PDF
Computing Accuracy Precision And Recall
PDF
Duplicate Bug Reports Considered Harmful ... Really?
PDF
The Quality of Bug Reports in Eclipse ETX'07
PDF
Metropolis Instant Radiosity
10 Year Impact Award Presentation - Duplicate Bug Reports Considered Harmful ...
An Empirical Study on Inconsistent Changes to Code Clones at Release Level
An Empirical Study on the Risks of Using Off-the-Shelf Techniques for Process...
Fuzzy Logic in Smart Homes
Finding Paths in Large Spaces - A* and Hierarchical A*
Automatic Identification of Bug Introducing Changes
Cloning Considered Harmful Considered Harmful
Approximation Algorithms
Predictors of Customer Perceived Quality
Extracting Structural Information from Bug Reports.
Computing Accuracy Precision And Recall
Duplicate Bug Reports Considered Harmful ... Really?
The Quality of Bug Reports in Eclipse ETX'07
Metropolis Instant Radiosity

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Presentation on HIE in infants and its manifestations
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Lesson notes of climatology university.
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Computing-Curriculum for Schools in Ghana
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Presentation on HIE in infants and its manifestations
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
VCE English Exam - Section C Student Revision Booklet
Microbial disease of the cardiovascular and lymphatic systems
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Classroom Observation Tools for Teachers
Module 4: Burden of Disease Tutorial Slides S2 2025
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Abdominal Access Techniques with Prof. Dr. R K Mishra
Lesson notes of climatology university.
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Computing-Curriculum for Schools in Ghana
FourierSeries-QuestionsWithAnswers(Part-A).pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Using Fuzzy Code Search to Link Code Fragments in Discussions to Source Code

  • 1. Using Fuzzy Code Search to Link Code Fragments in Discussions to Source Code Nicolas Bettenburg Stephen W. Thomas Ahmed E. Hassan Queen’s University Software Analysis and Intelligence Lab (SAIL) Kingston, Ontario, Canada
  • 2. “Given enough eyeballs, all bugs are shallow.” Eric S. Raymond - The Cathedral and the Bazaar 2
  • 3. Objective in this Study: Which parts of the source code did developers discuss? 3
  • 4. Objective in this Study: Which parts of the source code did developers discuss? Finding Associations of Discussions with Source Code Files 3
  • 5. Communication Source Code Repository Archive 4
  • 6. Communication Source Code Repository Archive 4
  • 7. Untitled 12-03-15 2:55 PM Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; Untitled } 12-03-15 2:55 PM /* (non-Javadoc) this.opt_withObsolete = opt_withObsolete; * @see main.IExperiment#getDescription() Untitled 12-03-15 2:55 PM } */ public String getDescription() { /* (non-Javadoc) String description = "We want to run an experiment all those bug this.opt_withObsolete = opt_withObsolete; * @see main.IExperiment#getDescription() reports.nt" } */ + "We extract the complete stacktrace information to study fix public String getDescription() { location and stacktrace interplay.nt"; /* (non-Javadoc) String description = "We want to run an experiment all those bug this.opt_withObsolete = opt_withObsolete; return description; * @see main.IExperiment#getDescription() reports.nt" } } */ + "We extract the complete stacktrace information to study fix public String getDescription() { location and stacktrace interplay.nt"; /* (non-Javadoc) /* (non-Javadoc) String description = "We want to run an experiment all those bug return description; * @see main.IExperiment#getDescription() * @see main.IExperiment#run() reports.nt" } */ */ + "We extract the complete stacktrace information to study fix public String getDescription() { public boolean run() { location and stacktrace interplay.nt"; /* (non-Javadoc) String description = "We want to run an experiment all those bug final boolean return = Main.isCli_withDebugMessages(); DEBUG description; * @see main.IExperiment#run()reports.nt" } */ + "We extract the complete stacktrace information to study fix // Select an appropriate database name on the server depending on the public boolean run() { location and stacktrace interplay.nt"; project demanded via command line options /* (non-Javadoc) final boolean return = Main.isCli_withDebugMessages(); DEBUG description; String dbName = ""; * @see main.IExperiment#run() } if (Main.getCli_project().equalsIgnoreCase("eclipse")) */ // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; public boolean run() { project demanded via command line options /* (non-Javadoc) else { final boolean DEBUG = Main.isCli_withDebugMessages(); String dbName = ""; * @see main.IExperiment#run() System.out.println("We currently only support the Eclipse database if (Main.getCli_project().equalsIgnoreCase("eclipse")) */ !"); // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; public boolean run() { System.exit(0); project demanded via command line options else { final boolean DEBUG = Main.isCli_withDebugMessages(); } String dbName = ""; System.out.println("We currently only support the Eclipse database if (Main.getCli_project().equalsIgnoreCase("eclipse")) !"); // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; System.exit(0); project demanded via command line options // Create the else {Database Connection } String dbName = ""; DatabaseConnector System.out.println("We currently only support the Eclipse database dbc = new DatabaseConnector(Main.getCli_dbHost(), if (Main.getCli_project().equalsIgnoreCase("eclipse")) Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); !"); dbName = "eclipse-december-2007"; dbc.initialize(); System.exit(0); // Create the else { Database Connection if (!dbc.connect()) { } DatabaseConnector System.out.println("We currently only support the Eclipse database dbc = new DatabaseConnector(Main.getCli_dbHost(), System.out.println("Could not connect to database. Check host, port Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); !"); , username and password."); dbc.initialize(); System.exit(0); System.exit(1); // Create the Database Connection if (!dbc.connect()) { } } DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), System.out.println("Could not connect to database. Check host, port Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following dbc.initialize(); System.exit(1); // Create the Database Connection query if (!dbc.connect()) { } DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port System.out.println("Could bug_id FROM bugzilla_bugs Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following dbc.initialize(); LIMIT " + Main.getCli_amount(); System.exit(1); query if (!dbc.connect()) { int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); } String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port System.out.println("Could bug_id FROM bugzilla_bugs int lastID = bugIDs[bugIDs.length -1]; WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following LIMIT " + Main.getCli_amount(); System.exit(1); if (DEBUG) query int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); } System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs String setSelectionQuery = "SELECT DISTINCT bug_id FROM int lastID = bugIDs[bugIDs.length -1]; reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC WHERE bug_id > " + Main.getCli_startID() " ORDER + // Fetch a number of Bug Report unique IDs belonging to the following Main.getCli_startID()); LIMIT " + Main.getCli_amount(); if (DEBUG) query int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs String setSelectionQuery = "SELECT DISTINCT bug_id FROM // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel int lastID = from the database using reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC WHERE bug_id > " + Main.getCli_startID() " ORDER + threads. Main.getCli_startID()); LIMIT " + Main.getCli_amount(); if (DEBUG) int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.out.println("* Attempting to fetch " + bugIDs.length + " // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel int lastID = from the database using reports from " + Main.getCli_dbHost() + " starting with ID " + threads. Main.getCli_startID()); if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " // Collect the bug reports from the database using up to 100Page 2 of 4 parallel reports from " + Main.getCli_dbHost() + " starting with ID " + threads. Main.getCli_startID()); // Collect the bug reports from the database using up to 100Page 2 of 4 parallel threads. Page 2 of 4 Page 2 of 4 Communication Source Code Repository Archive 4
  • 8. Untitled 12-03-15 2:55 PM Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; Untitled } 12-03-15 2:55 PM /* (non-Javadoc) this.opt_withObsolete = opt_withObsolete; * @see main.IExperiment#getDescription() Untitled 12-03-15 2:55 PM } */ public String getDescription() { /* (non-Javadoc) String description = "We want to run an experiment all those bug this.opt_withObsolete = opt_withObsolete; * @see main.IExperiment#getDescription() reports.nt" } */ + "We extract the complete stacktrace information to study fix public String getDescription() { location and stacktrace interplay.nt"; /* (non-Javadoc) String description = "We want to run an experiment all those bug this.opt_withObsolete = opt_withObsolete; return description; * @see main.IExperiment#getDescription() reports.nt" } } */ + "We extract the complete stacktrace information to study fix public String getDescription() { location and stacktrace interplay.nt"; /* (non-Javadoc) /* (non-Javadoc) String description = "We want to run an experiment all those bug return description; * @see main.IExperiment#getDescription() * @see main.IExperiment#run() reports.nt" } */ */ + "We extract the complete stacktrace information to study fix public String getDescription() { public boolean run() { location and stacktrace interplay.nt"; /* (non-Javadoc) String description = "We want to run an experiment all those bug final boolean return = Main.isCli_withDebugMessages(); DEBUG description; * @see main.IExperiment#run()reports.nt" } */ + "We extract the complete stacktrace information to study fix // Select an appropriate database name on the server depending on the public boolean run() { location and stacktrace interplay.nt"; project demanded via command line options /* (non-Javadoc) Traceability final boolean return = Main.isCli_withDebugMessages(); DEBUG description; String dbName = ""; * @see main.IExperiment#run() } if (Main.getCli_project().equalsIgnoreCase("eclipse")) */ // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; public boolean run() { project demanded via command line options /* (non-Javadoc) else { final boolean DEBUG = Main.isCli_withDebugMessages(); String dbName = ""; * @see main.IExperiment#run() System.out.println("We currently only support the Eclipse database if (Main.getCli_project().equalsIgnoreCase("eclipse")) */ !"); // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; public boolean run() { System.exit(0); project demanded via command line options else { final boolean DEBUG = Main.isCli_withDebugMessages(); } String dbName = ""; System.out.println("We currently only support the Eclipse database if (Main.getCli_project().equalsIgnoreCase("eclipse")) !"); // Select an appropriate database name on the server depending on the dbName = "eclipse-december-2007"; System.exit(0); project demanded via command line options // Create the else {Database Connection } String dbName = ""; DatabaseConnector System.out.println("We currently only support the Eclipse database dbc = new DatabaseConnector(Main.getCli_dbHost(), if (Main.getCli_project().equalsIgnoreCase("eclipse")) Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); !"); dbName = "eclipse-december-2007"; dbc.initialize(); System.exit(0); // Create the else { Database Connection if (!dbc.connect()) { } DatabaseConnector System.out.println("We currently only support the Eclipse database dbc = new DatabaseConnector(Main.getCli_dbHost(), System.out.println("Could not connect to database. Check host, port Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); !"); , username and password."); dbc.initialize(); System.exit(0); Links System.exit(1); // Create the Database Connection if (!dbc.connect()) { } } DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), System.out.println("Could not connect to database. Check host, port Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following dbc.initialize(); System.exit(1); // Create the Database Connection query if (!dbc.connect()) { } DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port System.out.println("Could bug_id FROM bugzilla_bugs Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following dbc.initialize(); LIMIT " + Main.getCli_amount(); System.exit(1); query if (!dbc.connect()) { int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); } String setSelectionQuery = "SELECT DISTINCT not connect to database. Check host, port System.out.println("Could bug_id FROM bugzilla_bugs int lastID = bugIDs[bugIDs.length -1]; WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC , username and password."); // Fetch a number of Bug Report unique IDs belonging to the following LIMIT " + Main.getCli_amount(); System.exit(1); if (DEBUG) query int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); } System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs String setSelectionQuery = "SELECT DISTINCT bug_id FROM int lastID = bugIDs[bugIDs.length -1]; reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC WHERE bug_id > " + Main.getCli_startID() " ORDER + // Fetch a number of Bug Report unique IDs belonging to the following Main.getCli_startID()); LIMIT " + Main.getCli_amount(); if (DEBUG) query int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.out.println("* Attempting to fetch " + bugIDs.length + " bugzilla_bugs String setSelectionQuery = "SELECT DISTINCT bug_id FROM // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel int lastID = from the database using reports from " + Main.getCli_dbHost() + " starting +with ID " BY bug_id ASC WHERE bug_id > " + Main.getCli_startID() " ORDER + threads. Main.getCli_startID()); LIMIT " + Main.getCli_amount(); if (DEBUG) int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.out.println("* Attempting to fetch " + bugIDs.length + " // Collect the bug reports bugIDs[bugIDs.length -1];up to 100 parallel int lastID = from the database using reports from " + Main.getCli_dbHost() + " starting with ID " + threads. Main.getCli_startID()); if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " // Collect the bug reports from the database using up to 100Page 2 of 4 parallel reports from " + Main.getCli_dbHost() + " starting with ID " + threads. Main.getCli_startID()); // Collect the bug reports from the database using up to 100Page 2 of 4 parallel threads. Page 2 of 4 Page 2 of 4 Communication Source Code Repository Archive 4
  • 9. 5
  • 10. 5
  • 12. 3 Approaches in the Past Change Log Analysis Information Retrieval Lightweight Textual Analysis 6
  • 13. Change Log Analysis Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" + "We extract the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; } /* (non-Javadoc) * @see main.IExperiment#run() LUCENE-2297: allow reader */ public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the Untitled 12-03-15 2:55project demanded via command line options PM String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) dbName = "eclipse-december-2007"; else { System.out.println("We currently only support the Eclipse database !"); this.opt_withObsolete = opt_withObsolete; System.exit(0); } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Create the Database Connection */ DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), public String getDescription() { Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); String description = "We want to run an experiment all those bug dbc.initialize(); reports.nt" if (!dbc.connect()) { pooling to be enabled (through + "We extract the complete stacktrace information to study fix System.out.println("Could not connect to database. Check host, port location and stacktrace interplay.nt"; , username and password."); return description; System.exit(1); } } /* (non-Javadoc) // Fetch a number of Bug Report unique IDs belonging to the following * @see main.IExperiment#run() query */ String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs public boolean run() { WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC final boolean DEBUG = Main.isCli_withDebugMessages(); LIMIT " + Main.getCli_amount(); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); // Select an appropriate database name on the server depending on the int lastID = bugIDs[bugIDs.length -1]; project demanded via command line options String dbName = ""; if (DEBUG) if (Main.getCli_project().equalsIgnoreCase("eclipse")) System.out.println("* Attempting to fetch " + bugIDs.length + " dbName = "eclipse-december-2007"; reports from " + Main.getCli_dbHost() + " starting with ID " + else { Main.getCli_startID()); System.out.println("We currently only support the Eclipse database !"); // Collect the bug reports from the database using up to 100 parallel System.exit(0); threads. } IndexWriterConfig) even if Untitled // Create the DatabasePM 12-03-15 2:55 Connection Untitled DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), 12-03-15 2:55 PM Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); dbc.initialize(); Page 2 of 4 if (!dbc.connect()) { System.out.println("Could not connect to database. Check host, port this.opt_withObsolete = opt_withObsolete; , username and password."); } System.exit(1); this.opt_withObsolete = opt_withObsolete; } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Fetch a number of Bug Report unique IDs belonging to the following /* (non-Javadoc) */ query * @see main.IExperiment#getDescription() public String getDescription() { String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() { String description = "We want to run an experiment all those bug BY bug_id ASC reports.nt" LIMIT " + Main.getCli_amount(); String description = "We want to run an experiment all those bug int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); + "We extract the complete stacktrace information to study fix reports.nt" location and stacktrace interplay.nt"; int lastID = bugIDs[bugIDs.length -1]; + "We extract the complete stacktrace information to study fix return description; location and stacktrace interplay.nt"; if (DEBUG) you're not pulling NRT reader. } return description; System.out.println("* Attempting to fetch " + bugIDs.length + " } /* (non-Javadoc) reports from " + Main.getCli_dbHost() + " starting with ID " + * @see main.IExperiment#run() Main.getCli_startID()); /* (non-Javadoc) */ * @see main.IExperiment#run() public boolean run() { // Collect the bug reports from the database using up to 100 parallel */ final boolean DEBUG = Main.isCli_withDebugMessages(); threads. public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the project demanded via command line options // Select an appropriate database name on the server depending on the String dbName = ""; project demanded via command line options if (Main.getCli_project().equalsIgnoreCase("eclipse")) String dbName = ""; dbName = "eclipse-december-2007"; if (Main.getCli_project().equalsIgnoreCase("eclipse")) Page 2 of 4 else { dbName = "eclipse-december-2007"; System.out.println("We currently only support the Eclipse database else { !"); System.out.println("We currently only support the Eclipse database System.exit(0); !"); } System.exit(0); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), // Create the Database Connection Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), dbc.initialize(); Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); if (!dbc.connect()) { dbc.initialize(); System.out.println("Could not connect to database. Check host, port if (!dbc.connect()) { , username and password."); System.out.println("Could not connect to database. Check host, port System.exit(1); , username and password."); } System.exit(1); } // Fetch a number of Bug Report unique IDs belonging to the following query // Fetch a number of Bug Report unique IDs belonging to the following String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs query WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs LIMIT " + Main.getCli_amount(); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); LIMIT " + Main.getCli_amount(); int lastID = bugIDs[bugIDs.length -1]; int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " if (DEBUG) reports from " + Main.getCli_dbHost() + " starting with ID " + System.out.println("* Attempting to fetch " + bugIDs.length + " Main.getCli_startID()); reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); // Collect the bug reports from the database using up to 100 parallel threads. // Collect the bug reports from the database using up to 100 parallel threads. SVN Page 2 of 4 Page 2 of 4 7
  • 14. Change Log Analysis Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" + "We extract the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; } /* (non-Javadoc) * @see main.IExperiment#run() LUCENE-2297: allow reader */ public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the Untitled 12-03-15 2:55project demanded via command line options PM String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) dbName = "eclipse-december-2007"; else { System.out.println("We currently only support the Eclipse database !"); this.opt_withObsolete = opt_withObsolete; System.exit(0); } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Create the Database Connection */ DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), public String getDescription() { Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); String description = "We want to run an experiment all those bug dbc.initialize(); reports.nt" if (!dbc.connect()) { pooling to be enabled (through + "We extract the complete stacktrace information to study fix System.out.println("Could not connect to database. Check host, port location and stacktrace interplay.nt"; , username and password."); return description; System.exit(1); } } /* (non-Javadoc) // Fetch a number of Bug Report unique IDs belonging to the following * @see main.IExperiment#run() query */ String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs public boolean run() { WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC final boolean DEBUG = Main.isCli_withDebugMessages(); LIMIT " + Main.getCli_amount(); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); // Select an appropriate database name on the server depending on the int lastID = bugIDs[bugIDs.length -1]; project demanded via command line options String dbName = ""; if (DEBUG) if (Main.getCli_project().equalsIgnoreCase("eclipse")) System.out.println("* Attempting to fetch " + bugIDs.length + " dbName = "eclipse-december-2007"; reports from " + Main.getCli_dbHost() + " starting with ID " + else { Main.getCli_startID()); System.out.println("We currently only support the Eclipse database !"); // Collect the bug reports from the database using up to 100 parallel System.exit(0); threads. } IndexWriterConfig) even if Untitled // Create the DatabasePM 12-03-15 2:55 Connection Untitled DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), 12-03-15 2:55 PM Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); dbc.initialize(); Page 2 of 4 if (!dbc.connect()) { System.out.println("Could not connect to database. Check host, port this.opt_withObsolete = opt_withObsolete; , username and password."); } System.exit(1); this.opt_withObsolete = opt_withObsolete; } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Fetch a number of Bug Report unique IDs belonging to the following /* (non-Javadoc) */ query * @see main.IExperiment#getDescription() public String getDescription() { String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() { String description = "We want to run an experiment all those bug BY bug_id ASC reports.nt" LIMIT " + Main.getCli_amount(); String description = "We want to run an experiment all those bug int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); + "We extract the complete stacktrace information to study fix reports.nt" location and stacktrace interplay.nt"; int lastID = bugIDs[bugIDs.length -1]; + "We extract the complete stacktrace information to study fix return description; location and stacktrace interplay.nt"; if (DEBUG) you're not pulling NRT reader. } return description; System.out.println("* Attempting to fetch " + bugIDs.length + " } /* (non-Javadoc) reports from " + Main.getCli_dbHost() + " starting with ID " + * @see main.IExperiment#run() Main.getCli_startID()); /* (non-Javadoc) */ * @see main.IExperiment#run() public boolean run() { // Collect the bug reports from the database using up to 100 parallel */ final boolean DEBUG = Main.isCli_withDebugMessages(); threads. public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the project demanded via command line options // Select an appropriate database name on the server depending on the String dbName = ""; project demanded via command line options if (Main.getCli_project().equalsIgnoreCase("eclipse")) String dbName = ""; dbName = "eclipse-december-2007"; if (Main.getCli_project().equalsIgnoreCase("eclipse")) Page 2 of 4 else { dbName = "eclipse-december-2007"; System.out.println("We currently only support the Eclipse database else { !"); System.out.println("We currently only support the Eclipse database System.exit(0); !"); } System.exit(0); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), // Create the Database Connection Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), dbc.initialize(); Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); if (!dbc.connect()) { dbc.initialize(); System.out.println("Could not connect to database. Check host, port if (!dbc.connect()) { , username and password."); System.out.println("Could not connect to database. Check host, port System.exit(1); , username and password."); } System.exit(1); } // Fetch a number of Bug Report unique IDs belonging to the following query // Fetch a number of Bug Report unique IDs belonging to the following String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs query WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs LIMIT " + Main.getCli_amount(); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); LIMIT " + Main.getCli_amount(); int lastID = bugIDs[bugIDs.length -1]; int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " if (DEBUG) reports from " + Main.getCli_dbHost() + " starting with ID " + System.out.println("* Attempting to fetch " + bugIDs.length + " Main.getCli_startID()); reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); // Collect the bug reports from the database using up to 100 parallel threads. // Collect the bug reports from the database using up to 100 parallel threads. SVN Page 2 of 4 Page 2 of 4 7
  • 15. Change Log Analysis Bug Report #LUCENE-2297 Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" + "We extract the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; } /* (non-Javadoc) * @see main.IExperiment#run() LUCENE-2297: allow reader */ public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the Untitled 12-03-15 2:55project demanded via command line options PM String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) dbName = "eclipse-december-2007"; else { System.out.println("We currently only support the Eclipse database !"); this.opt_withObsolete = opt_withObsolete; System.exit(0); } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Create the Database Connection */ DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), public String getDescription() { Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); String description = "We want to run an experiment all those bug dbc.initialize(); reports.nt" if (!dbc.connect()) { pooling to be enabled (through + "We extract the complete stacktrace information to study fix System.out.println("Could not connect to database. Check host, port location and stacktrace interplay.nt"; , username and password."); return description; System.exit(1); } } /* (non-Javadoc) // Fetch a number of Bug Report unique IDs belonging to the following * @see main.IExperiment#run() query */ String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs public boolean run() { WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC final boolean DEBUG = Main.isCli_withDebugMessages(); LIMIT " + Main.getCli_amount(); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); // Select an appropriate database name on the server depending on the int lastID = bugIDs[bugIDs.length -1]; project demanded via command line options String dbName = ""; if (DEBUG) if (Main.getCli_project().equalsIgnoreCase("eclipse")) System.out.println("* Attempting to fetch " + bugIDs.length + " dbName = "eclipse-december-2007"; reports from " + Main.getCli_dbHost() + " starting with ID " + else { Main.getCli_startID()); System.out.println("We currently only support the Eclipse database !"); // Collect the bug reports from the database using up to 100 parallel System.exit(0); threads. } IndexWriterConfig) even if Untitled // Create the DatabasePM 12-03-15 2:55 Connection Untitled DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), 12-03-15 2:55 PM Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); dbc.initialize(); Page 2 of 4 if (!dbc.connect()) { System.out.println("Could not connect to database. Check host, port this.opt_withObsolete = opt_withObsolete; , username and password."); } System.exit(1); this.opt_withObsolete = opt_withObsolete; } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Fetch a number of Bug Report unique IDs belonging to the following /* (non-Javadoc) */ query * @see main.IExperiment#getDescription() public String getDescription() { String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() { String description = "We want to run an experiment all those bug BY bug_id ASC reports.nt" LIMIT " + Main.getCli_amount(); String description = "We want to run an experiment all those bug int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); + "We extract the complete stacktrace information to study fix reports.nt" location and stacktrace interplay.nt"; int lastID = bugIDs[bugIDs.length -1]; + "We extract the complete stacktrace information to study fix return description; location and stacktrace interplay.nt"; if (DEBUG) you're not pulling NRT reader. } return description; System.out.println("* Attempting to fetch " + bugIDs.length + " } /* (non-Javadoc) reports from " + Main.getCli_dbHost() + " starting with ID " + * @see main.IExperiment#run() Main.getCli_startID()); /* (non-Javadoc) */ * @see main.IExperiment#run() public boolean run() { // Collect the bug reports from the database using up to 100 parallel */ final boolean DEBUG = Main.isCli_withDebugMessages(); threads. public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the project demanded via command line options // Select an appropriate database name on the server depending on the String dbName = ""; project demanded via command line options if (Main.getCli_project().equalsIgnoreCase("eclipse")) String dbName = ""; dbName = "eclipse-december-2007"; if (Main.getCli_project().equalsIgnoreCase("eclipse")) Page 2 of 4 else { dbName = "eclipse-december-2007"; System.out.println("We currently only support the Eclipse database else { !"); System.out.println("We currently only support the Eclipse database System.exit(0); !"); } System.exit(0); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), // Create the Database Connection Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), dbc.initialize(); Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); if (!dbc.connect()) { dbc.initialize(); System.out.println("Could not connect to database. Check host, port if (!dbc.connect()) { , username and password."); System.out.println("Could not connect to database. Check host, port System.exit(1); , username and password."); } System.exit(1); } // Fetch a number of Bug Report unique IDs belonging to the following query // Fetch a number of Bug Report unique IDs belonging to the following String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs query WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs LIMIT " + Main.getCli_amount(); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); LIMIT " + Main.getCli_amount(); int lastID = bugIDs[bugIDs.length -1]; int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " if (DEBUG) reports from " + Main.getCli_dbHost() + " starting with ID " + System.out.println("* Attempting to fetch " + bugIDs.length + " Main.getCli_startID()); reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); // Collect the bug reports from the database using up to 100 parallel threads. // Collect the bug reports from the database using up to 100 parallel threads. SVN Page 2 of 4 Page 2 of 4 7
  • 16. Change Log Analysis Bug Report #LUCENE-2297 Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" + "We extract the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; } /* (non-Javadoc) * @see main.IExperiment#run() LUCENE-2297: allow reader */ public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the Untitled 12-03-15 2:55project demanded via command line options PM String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) dbName = "eclipse-december-2007"; else { System.out.println("We currently only support the Eclipse database !"); this.opt_withObsolete = opt_withObsolete; System.exit(0); } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Create the Database Connection */ DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), public String getDescription() { Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); String description = "We want to run an experiment all those bug dbc.initialize(); reports.nt" if (!dbc.connect()) { pooling to be enabled (through + "We extract the complete stacktrace information to study fix System.out.println("Could not connect to database. Check host, port location and stacktrace interplay.nt"; , username and password."); return description; System.exit(1); } } /* (non-Javadoc) // Fetch a number of Bug Report unique IDs belonging to the following * @see main.IExperiment#run() query */ String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs public boolean run() { WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC final boolean DEBUG = Main.isCli_withDebugMessages(); LIMIT " + Main.getCli_amount(); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); // Select an appropriate database name on the server depending on the int lastID = bugIDs[bugIDs.length -1]; project demanded via command line options String dbName = ""; if (DEBUG) if (Main.getCli_project().equalsIgnoreCase("eclipse")) System.out.println("* Attempting to fetch " + bugIDs.length + " dbName = "eclipse-december-2007"; reports from " + Main.getCli_dbHost() + " starting with ID " + else { Main.getCli_startID()); System.out.println("We currently only support the Eclipse database !"); // Collect the bug reports from the database using up to 100 parallel System.exit(0); threads. } IndexWriterConfig) even if Untitled // Create the DatabasePM 12-03-15 2:55 Connection Untitled DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), 12-03-15 2:55 PM Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); dbc.initialize(); Page 2 of 4 if (!dbc.connect()) { System.out.println("Could not connect to database. Check host, port this.opt_withObsolete = opt_withObsolete; , username and password."); } System.exit(1); this.opt_withObsolete = opt_withObsolete; } } /* (non-Javadoc) * @see main.IExperiment#getDescription() // Fetch a number of Bug Report unique IDs belonging to the following /* (non-Javadoc) */ query * @see main.IExperiment#getDescription() public String getDescription() { String setSelectionQuery = "SELECT DISTINCT bug_id FROM */bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER public String getDescription() { String description = "We want to run an experiment all those bug BY bug_id ASC reports.nt" LIMIT " + Main.getCli_amount(); String description = "We want to run an experiment all those bug int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); + "We extract the complete stacktrace information to study fix reports.nt" location and stacktrace interplay.nt"; int lastID = bugIDs[bugIDs.length -1]; + "We extract the complete stacktrace information to study fix return description; location and stacktrace interplay.nt"; if (DEBUG) you're not pulling NRT reader. } return description; System.out.println("* Attempting to fetch " + bugIDs.length + " } /* (non-Javadoc) reports from " + Main.getCli_dbHost() + " starting with ID " + * @see main.IExperiment#run() Main.getCli_startID()); /* (non-Javadoc) */ * @see main.IExperiment#run() public boolean run() { // Collect the bug reports from the database using up to 100 parallel */ final boolean DEBUG = Main.isCli_withDebugMessages(); threads. public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the project demanded via command line options // Select an appropriate database name on the server depending on the String dbName = ""; project demanded via command line options if (Main.getCli_project().equalsIgnoreCase("eclipse")) String dbName = ""; dbName = "eclipse-december-2007"; if (Main.getCli_project().equalsIgnoreCase("eclipse")) Page 2 of 4 else { dbName = "eclipse-december-2007"; System.out.println("We currently only support the Eclipse database else { !"); System.out.println("We currently only support the Eclipse database System.exit(0); !"); } System.exit(0); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), // Create the Database Connection Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), dbc.initialize(); Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); if (!dbc.connect()) { dbc.initialize(); System.out.println("Could not connect to database. Check host, port if (!dbc.connect()) { , username and password."); System.out.println("Could not connect to database. Check host, port System.exit(1); , username and password."); } System.exit(1); } // Fetch a number of Bug Report unique IDs belonging to the following query // Fetch a number of Bug Report unique IDs belonging to the following String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs query WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs LIMIT " + Main.getCli_amount(); WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); LIMIT " + Main.getCli_amount(); int lastID = bugIDs[bugIDs.length -1]; int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " if (DEBUG) reports from " + Main.getCli_dbHost() + " starting with ID " + System.out.println("* Attempting to fetch " + bugIDs.length + " Main.getCli_startID()); reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); // Collect the bug reports from the database using up to 100 parallel threads. // Collect the bug reports from the database using up to 100 parallel threads. SVN Page 2 of 4 Page 2 of 4 7
  • 17. Information Retrieval Description Map<Integer, BugReport> bugReports Jared Burns 2002-11-01 14:56:40 EST = dbc.getReportsConcurrent(bugIDs, Build 20021031(, 30, and 29) Main.isCli_withDiscussions(), Linux-GTK Main.isCli_withAttachments(), true); // Instantiate Output Very often (in recent builds), when I Class // This time we will need to perform an action that requires use some XML Outputter for the establishing a connection to the Stacktraces dev.eclipse.org CVS server, the Experiment_Structural_Logger logger progress dialog appears but it stalls = new Experiment_Structural_Logger before any progress is made. I have (); DataExportUtility dexutil = new to hit Cancel, wait 10+ seconds (I DataExportUtility(); XMLOutputter just switch apps), and then try again outputter = new XMLOutputter or it never (Format.getPrettyFormat()); Element connects. rootElement = new Element ("CVS"); // Process the Reports if This happens to me most often when I (Main.getCli_project click the "Synchronize all CVS ().equalsIgnoreCase("eclipse")) projects..." button. The dialog { for (int id : bugIDs) { } appears and says "Authenticating over BugReport currentReport = extssh", but the progress monitor bugReports.get(id); Element never budges. reportElement = new Element Discussion ("Report"); Code 8
  • 18. Information Retrieval Description Map<Integer, BugReport> bugReports Jared Burns 2002-11-01 14:56:40 EST = dbc.getReportsConcurrent(bugIDs, Build 20021031(, 30, and 29) Main.isCli_withDiscussions(), Linux-GTK Main.isCli_withAttachments(), true); // Instantiate Output Very often (in recent builds), when I Class // This time we will need to perform an action that requires use some XML Outputter for the establishing a connection to the Stacktraces dev.eclipse.org CVS server, the Experiment_Structural_Logger logger progress dialog appears but it stalls = new Experiment_Structural_Logger before any progress is made. I have (); DataExportUtility dexutil = new to hit Cancel, wait 10+ seconds (I DataExportUtility(); XMLOutputter just switch apps), and then try again outputter = new XMLOutputter or it never (Format.getPrettyFormat()); Element connects. rootElement = new Element ("CVS"); // Process the Reports if This happens to me most often when I (Main.getCli_project click the "Synchronize all CVS ().equalsIgnoreCase("eclipse")) projects..." button. The dialog { for (int id : bugIDs) { } appears and says "Authenticating over BugReport currentReport = extssh", but the progress monitor bugReports.get(id); Element never budges. reportElement = new Element Discussion ("Report"); Code 8
  • 19. Information Retrieval Description Map<Integer, BugReport> bugReports Jared Burns 2002-11-01 14:56:40 EST = dbc.getReportsConcurrent(bugIDs, Build 20021031(, 30, and 29) Main.isCli_withDiscussions(), Linux-GTK Main.isCli_withAttachments(), true); // Instantiate Output Very often (in recent builds), when I Class // This time we will need to perform an action that requires use some XML Outputter for the establishing a connection to the Stacktraces dev.eclipse.org CVS server, the Experiment_Structural_Logger logger progress dialog appears but it stalls = new Experiment_Structural_Logger before any progress is made. I have (); DataExportUtility dexutil = new to hit Cancel, wait 10+ seconds (I DataExportUtility(); XMLOutputter just switch apps), and then try again outputter = new XMLOutputter or it never (Format.getPrettyFormat()); Element connects. rootElement = new Element ("CVS"); // Process the Reports if This happens to me most often when I (Main.getCli_project click the "Synchronize all CVS ().equalsIgnoreCase("eclipse")) projects..." button. The dialog { for (int id : bugIDs) { } appears and says "Authenticating over BugReport currentReport = extssh", but the progress monitor bugReports.get(id); Element never budges. reportElement = new Element Discussion ("Report"); Code 8
  • 20. Information Retrieval Description Map<Integer, BugReport> bugReports Jared Burns 2002-11-01 14:56:40 EST = dbc.getReportsConcurrent(bugIDs, Build 20021031(, 30, and 29) Main.isCli_withDiscussions(), Linux-GTK Main.isCli_withAttachments(), true); // Instantiate Output Very often (in recent builds), when I Class // This time we will need to perform an action that requires use some XML Outputter for the establishing a connection to the Stacktraces dev.eclipse.org CVS server, the Experiment_Structural_Logger logger progress dialog appears but it stalls = new Experiment_Structural_Logger before any progress is made. I have (); DataExportUtility dexutil = new to hit Cancel, wait 10+ seconds (I DataExportUtility(); XMLOutputter just switch apps), and then try again outputter = new XMLOutputter or it never (Format.getPrettyFormat()); Element connects. rootElement = new Element ("CVS"); // Process the Reports if This happens to me most often when I (Main.getCli_project click the "Synchronize all CVS ().equalsIgnoreCase("eclipse")) projects..." button. The dialog { for (int id : bugIDs) { } appears and says "Authenticating over BugReport currentReport = extssh", but the progress monitor bugReports.get(id); Element never budges. reportElement = new Element Discussion ("Report"); Code 8
  • 21. Lightweight Textual Analysis I20041130-0800 Wrong compiler error when interface overrides two methods with same signature but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it with "Unhandled exception type IOException". public class Over { void x() throws ZipException { IandJ ij= new K(); ij.m(); //wrong compile error } void y() throws ZipException { K k= new K(); k.m(); } } interface I { void m() throws IOException; } interface J { void m() throws ZipException; } interface IandJ extends I, J {} // swap I and J to make compile error disappear class K implements IandJ { public void m() throws ZipException { } } 9
  • 22. Lightweight Textual Analysis ZipExcept K.java Over.java ion.java I.java J.java I20041130-0800 Wrong compiler error when interface overrides two methods with same signature IOExcepti but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it on.java with "Unhandled exception type IOException". public class Over { void x() throws ZipException { IandJ ij= new K(); ij.m(); //wrong compile error } void y() throws ZipException { K k= new K(); k.m(); } } interface I { void m() throws IOException; } interface J { void m() throws ZipException; } interface IandJ extends I, J {} // swap I and J to make compile error disappear class K implements IandJ { public void m() throws ZipException { } } 9
  • 23. 10
  • 24. X Change Log Analysis Generalizeability: Only works for Bug Reports Granularity: Associates complete discussion thread Precision: Link to all files changed in commit Conceptual Mismatch: Ignores the actual discussions! 10
  • 25. X Change Log Analysis Generalizeability: Only works for Bug Reports Granularity: Associates complete discussion thread Precision: Link to all files changed in commit Conceptual Mismatch: Ignores the actual discussions! X Information Retrieval Generalizeability: Works for all kinds of documents Granularity: Which granularity level to choose? Precision: Lots and lots of false positives! Conceptual Mismatch: Links unrelated documents! 10
  • 26. X Change Log Analysis Generalizeability: Only works for Bug Reports Granularity: Associates complete discussion thread Precision: Link to all files changed in commit Conceptual Mismatch: Ignores the actual discussions! X Information Retrieval Generalizeability: Works for all kinds of documents Granularity: Which granularity level to choose? Precision: Lots and lots of false positives! Conceptual Mismatch: Links unrelated documents! X Lightweight Textual Analysis Generalizeability: Works for all kinds of documents Granularity: Very fine-grained Precision: Up to 95% precision [Bacchelli-ICSE10] Conceptual Mismatch: Links to every class mentioned 10
  • 27. In this Paper: Fuzzy Code Search ZipExcept IOExcepti I20041130-0800 K.java Over.java ion.java I.java J.java on.java Wrong compiler error when interface overrides two methods with same signature but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it with "Unhandled exception type IOException". public class Over { void x() throws ZipException { IandJ ij= new K(); ij.m(); //wrong compile error } void y() throws ZipException { K k= new K(); k.m(); } } interface I { void m() throws IOException; } interface J { void m() throws ZipException; } interface IandJ extends I, J {} // swap I and J to make compile error disappear class K implements IandJ { public void m() throws ZipException { } } 11
  • 28. In this Paper: Fuzzy Code Search ZipExcept IOExcepti I20041130-0800 K.java Over.java ion.java I.java J.java on.java Wrong compiler error when interface overrides two methods with same signature but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it with "Unhandled exception type IOException". public class Over { void x() throws ZipException { IandJ ij= new K(); ij.m(); //wrong compile error } void y() throws ZipException { K k= new K(); k.m(); } } interface I { void m() throws IOException; } interface J { void m() throws ZipException; } interface IandJ extends I, J {} // swap I and J to make compile error disappear class K implements IandJ { public void m() throws ZipException { } } 11
  • 29. In this Paper: Fuzzy Code Search ZipExcept IOExcepti I20041130-0800 K.java Over.java ion.java I.java J.java on.java Wrong compiler error when interface overrides two methods with same signature but different thrown exceptions: The call to ij.m() is OK, but eclipse flags it with "Unhandled exception type IOException". public class Over { void x() throws ZipException { IandJ ij= new K(); ij.m(); //wrong compile error X.java } void y() throws ZipException { K k= new K(); k.m(); } } Y.java interface I { void m() throws IOException; } interface J { void m() throws ZipException; } interface IandJ extends I, J {} // swap I and J to make compile error disappear class K implements IandJ { public void m() throws ZipException { } } 11
  • 32. Fuzzy Code Search Approach Code Fragments Discussion infoZilla tool 12
  • 33. Fuzzy Code Search Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } Untitled 12-03-15 2:55 PM /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" this.opt_withObsolete = opt_withObsolete; + "We extract} the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; (non-Javadoc) /* } * @see main.IExperiment#getDescription() */ /* (non-Javadoc) public String getDescription() { * @see main.IExperiment#run() description = "We want to run an experiment all those bug String */ reports.nt" public boolean run() { + "We extract the complete stacktrace information to study fix final boolean DEBUG = Main.isCli_withDebugMessages();interplay.nt"; location and stacktrace return description; Clone Detection // Select an appropriate database name on the server depending on the } project demanded via command line options String dbName = ""; (non-Javadoc) /* if (Main.getCli_project().equalsIgnoreCase("eclipse")) * @see main.IExperiment#run() dbName = "eclipse-december-2007"; */ else { public boolean run() { System.out.println("We boolean DEBUG = support the Eclipse database final currently only Main.isCli_withDebugMessages(); !"); System.exit(0); // Select an appropriate database name on the server depending on the } project demanded via command line options String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) // Create the Database Connection "eclipse-december-2007"; dbName = DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(), = new Main.getCli_dbUser(),System.out.println("We currently only support the Eclipse database Main.getCli_dbPass(), dbName); dbc.initialize(); !"); if (!dbc.connect()) { System.exit(0); System.out.println("Could not connect to database. Check host, port } , username and password."); System.exit(1); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); Report unique IDs belonging to the following query dbc.initialize(); String setSelectionQuery(!dbc.connect()) { if = "SELECT DISTINCT bug_id FROM bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER connect to ASC System.out.println("Could not BY bug_id database. Check host, port LIMIT " + Main.getCli_amount(); Approach , username and password."); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.exit(1); int lastID = bugIDs[bugIDs.length -1]; } if (DEBUG) // Fetch a number of Bug Report unique IDs belonging to the following System.out.println("*query Attempting to fetch " + bugIDs.length + " reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs " + Main.getCli_dbHost() + " starting with bug_id Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC WHERE LIMIT " + Main.getCli_amount(); // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int[] from the database using up to 100 parallel threads. int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); Page 2 of 4 // Collect the bug reports from the database using up to 100 parallel threads. Page 2 of 4 Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } Untitled 12-03-15 2:55 PM /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" this.opt_withObsolete = opt_withObsolete; + "We extract} the complete stacktrace information to study fix location and stacktrace interplay.nt"; Untitled 12-03-15 2:55 PM return description; (non-Javadoc) /* } * @see main.IExperiment#getDescription() */ /* (non-Javadoc) public String getDescription() { * @see main.IExperiment#run() description = "We want to run an experiment all those bug String */ reports.nt" this.opt_withObsolete = opt_withObsolete; public boolean run() { + "We extract} the complete stacktrace information to study fix final boolean DEBUG = Main.isCli_withDebugMessages();interplay.nt"; location and stacktrace return description; (non-Javadoc) /* // Select an appropriate database name on the server depending on the } * @see main.IExperiment#getDescription() project demanded via command line options */ String dbName = ""; (non-Javadoc) /* public String getDescription() { if (Main.getCli_project().equalsIgnoreCase("eclipse")) * @see main.IExperiment#run() description = "We want to run an experiment all those bug String dbName = "eclipse-december-2007"; */ reports.nt" else { public boolean run() { + "We extract the complete stacktrace information to study fix System.out.println("We boolean DEBUG = support the Eclipse database final currently only Main.isCli_withDebugMessages();interplay.nt"; location and stacktrace !"); return description; System.exit(0); // Select an appropriate database name on the server depending on the } } project demanded via command line options String dbName = ""; (non-Javadoc) /* if (Main.getCli_project().equalsIgnoreCase("eclipse")) * @see main.IExperiment#run() // Create the Database Connection "eclipse-december-2007"; dbName = */ DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(), = new public boolean run() { Main.getCli_dbUser(),System.out.println("We currently only support the Eclipse database Main.getCli_dbPass(), dbName); final boolean DEBUG = Main.isCli_withDebugMessages(); dbc.initialize(); !"); if (!dbc.connect()) { System.exit(0); // Select an appropriate database name on the server depending on the System.out.println("Could not connect to database. Check host, port } project demanded via command line options , username and password."); String dbName = ""; System.exit(1); if (Main.getCli_project().equalsIgnoreCase("eclipse")) } // Create the Database Connection "eclipse-december-2007"; dbName = DatabaseConnector dbcelse { DatabaseConnector(Main.getCli_dbHost(), = new // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); Report unique IDs belonging to the following System.out.println("We currently only support the Eclipse database query dbc.initialize(); !"); String setSelectionQuery(!dbc.connect()) { if = "SELECT DISTINCT bug_id FROM bugzilla_bugs System.exit(0); WHERE bug_id > " + Main.getCli_startID() + " ORDER connect to ASC System.out.println("Could not BY bug_id database. Check host, port } LIMIT " + Main.getCli_amount();, username and password."); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); System.exit(1); int lastID = bugIDs[bugIDs.length -1]; } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), if (DEBUG) // Fetch a number of Bug Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); Report unique IDs belonging to the following System.out.println("*queryAttempting to fetch " + bugIDs.length + " dbc.initialize(); reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs " + Main.getCli_dbHost() + " starting with bug_id if (!dbc.connect()) { Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC WHERE System.out.println("Could not connect to database. Check host, port LIMIT " + Main.getCli_amount(); , username and password."); // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int[] from the database using up to 100 parallel System.exit(1); threads. int lastID = bugIDs[bugIDs.length -1]; } if (DEBUG) // Fetch a number of Bug Report unique IDs belonging to the following System.out.println("*query Attempting to fetch " + bugIDs.length + " reports from String setSelectionQuery = "SELECT DISTINCT ID " + FROM bugzilla_bugs " + Main.getCli_dbHost() + " starting with bug_id Main.getCli_startID());bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC WHERE LIMIT " + Main.getCli_amount(); 2 of 4 Page // Collect the bug reports bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int[] from the database using up to 100 parallel threads. int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); Page 2 of 4 // Collect the bug reports from the database using up to 100 parallel threads. Page 2 of 4 Untitled 12-03-15 2:55 PM this.opt_withObsolete = opt_withObsolete; } /* (non-Javadoc) * @see main.IExperiment#getDescription() */ public String getDescription() { String description = "We want to run an experiment all those bug reports.nt" + "We extract the complete stacktrace information to study fix location and stacktrace interplay.nt"; return description; } /* (non-Javadoc) * @see main.IExperiment#run() */ public boolean run() { final boolean DEBUG = Main.isCli_withDebugMessages(); // Select an appropriate database name on the server depending on the project demanded via command line options String dbName = ""; if (Main.getCli_project().equalsIgnoreCase("eclipse")) dbName = "eclipse-december-2007"; else { System.out.println("We currently only support the Eclipse database !"); System.exit(0); } // Create the Database Connection DatabaseConnector dbc = new DatabaseConnector(Main.getCli_dbHost(), Main.getCli_dbUser(), Main.getCli_dbPass(), dbName); dbc.initialize(); if (!dbc.connect()) { System.out.println("Could not connect to database. Check host, port , username and password."); System.exit(1); } // Fetch a number of Bug Report unique IDs belonging to the following query String setSelectionQuery = "SELECT DISTINCT bug_id FROM bugzilla_bugs WHERE bug_id > " + Main.getCli_startID() + " ORDER BY bug_id ASC LIMIT " + Main.getCli_amount(); int[] bugIDs = dbc.getIdSetByQuery(setSelectionQuery); int lastID = bugIDs[bugIDs.length -1]; if (DEBUG) System.out.println("* Attempting to fetch " + bugIDs.length + " reports from " + Main.getCli_dbHost() + " starting with ID " + Main.getCli_startID()); // Collect the bug reports from the database using up to 100 parallel threads. Page 2 of 4 Code Fragments Discussion infoZilla tool 12
  • 34. Evaluation of our Approach 13
  • 35. Evaluation of our Approach 1) Quantitative Do developers talk about the things they end up changing? 13
  • 36. Evaluation of our Approach 1) Quantitative Do developers talk about the things they end up changing? 2) Qualitative Which parts of the code do developers talk about the most? 13
  • 37. Case Study: Eclipse 2.0 - 3.2 A Change-Log Analysis B Fuzzy Code Search 14
  • 38. Case Study: Eclipse 2.0 - 3.2 A Change-Log Analysis 16,722 23,079 B Fuzzy Code Search Discussions Files 14
  • 39. Case Study: Eclipse 2.0 - 3.2 A Change-Log Analysis 16,722 23,079 B Fuzzy Code Search 3,865 13,581 Discussions Files Discussions Files 14
  • 40. Case Study: Eclipse 2.0 - 3.2 A Change-Log Analysis 16,722 23,079 B Fuzzy Code Search 3,865 13,581 Discussions Files Discussions Files Q: Is A a Superset of B ? 14
  • 42. Bug Reports (211,843) Bug Reports containing Code (33,301) 16
  • 43. Bug Reports (211,843) Bug Reports containing Code (33,301) A Clone Detection Based Approach (2,980) 17
  • 44. Bug Reports (211,843) Bug Reports containing Code (33,301) A B Clone Detection Change Log Analysis Based Approach Based Approach (2,980) (16,722) 18
  • 45. Bug Reports (211,843) Bug Reports containing Code (33,301) A B Clone Detection Change Log Analysis Based Approach 507 Based Approach (2,980) (16,722) 19
  • 46. Bug Reports (211,843) Bug Reports containing Code (33,301) A B Clone Detection Change Log Analysis Based Approach 507 Based Approach sa re (2,980) (16,722) p: Link ov e rla nt! al l iffere ry sm ually d Ve ce pt c on 19
  • 47. 20
  • 48. 20
  • 49. of c ode y re-use ts. e: h eav sion tes I n Eclips reg res o cr eate ppe ts t sni 20
  • 51. Fuzzy Code Search Finds conceptually different links: 21
  • 52. Fuzzy Code Search Finds conceptually different links: What Developers really talk about 21
  • 53. Fuzzy Code Search Finds conceptually different links: What Developers really talk about Not what they end up changing 21
  • 54. Fuzzy Code Search Finds conceptually different links: What Developers really talk about Not what they end up changing Not what their code references 21
  • 55. 22
  • 56. 22
  • 57. 22
  • 58. 22
  • 59. 22
  • 60. Thanks! 22