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

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

  • 1.
    Using Fuzzy CodeSearch 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 thisStudy: Which parts of the source code did developers discuss? 3
  • 4.
    Objective in thisStudy: 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.
  • 10.
  • 11.
  • 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.
  • 24.
    X Change LogAnalysis 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 LogAnalysis 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 LogAnalysis 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: FuzzyCode 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: FuzzyCode 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: FuzzyCode 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
  • 30.
  • 31.
  • 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 ourApproach 13
  • 35.
    Evaluation of ourApproach 1) Quantitative Do developers talk about the things they end up changing? 13
  • 36.
    Evaluation of ourApproach 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: Eclipse2.0 - 3.2 A Change-Log Analysis B Fuzzy Code Search 14
  • 38.
    Case Study: Eclipse2.0 - 3.2 A Change-Log Analysis 16,722 23,079 B Fuzzy Code Search Discussions Files 14
  • 39.
    Case Study: Eclipse2.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: Eclipse2.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
  • 41.
  • 42.
    Bug Reports (211,843) BugReports containing Code (33,301) 16
  • 43.
    Bug Reports (211,843) BugReports containing Code (33,301) A Clone Detection Based Approach (2,980) 17
  • 44.
    Bug Reports (211,843) BugReports 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) BugReports 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.
  • 48.
  • 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
  • 50.
  • 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.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.