Skip to content

Commit

Permalink
Add more logging messages to provide update on progress
Browse files Browse the repository at this point in the history
  • Loading branch information
sianghwee committed Jan 22, 2022
1 parent 23a7f2c commit 26d2353
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/java/example/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,28 @@ static void handleSingleProject(String projectFullName) throws Exception{
Revision work = regression.getWork();
File workDir = sourceCodeManager.checkout(work, projectDir, projectFullName);
work.setLocalCodeDir(workDir);


count += 1;
System.out.println(String.format("Handling %s: %d/%d", projectFullName, count, regressionList.size()));

List<Revision> needToTestMigrateRevisionList = Arrays.asList(new Revision[]{buggy, ric, work});
migrateTestAndDependency(rfc, needToTestMigrateRevisionList, regression.getTestCase());

//testWithJacoco
System.out.println("\tProcessing rfc");
Runner rfcRunner = new Runner(rfcDir, regression.getTestCase());
List<CoverNode> rfcCoveredMethodList = rfcRunner.getCoverNodes();

System.out.println("\tProcessing work");
Runner workRunner = new Runner(workDir, regression.getTestCase());
List<CoverNode> workCoveredMethodList = workRunner.getCoverNodes();

System.out.println("\tProcessing buggy");
Runner buggyRunner = new Runner(buggyDir, regression.getTestCase());
List<CoverNode> buggyCoveredMethodList = buggyRunner.getCoverNodes();
List<String> buggyErrorMessages = buggyRunner.getErrorMessages();

System.out.println("\tProcessing ric");
Runner ricRunner = new Runner(ricDir, regression.getTestCase());
List<CoverNode> ricCoveredMethodList = ricRunner.getCoverNodes();

Expand Down Expand Up @@ -110,8 +117,7 @@ static void handleSingleProject(String projectFullName) throws Exception{
projectFullName, rfc.getCommitID(), buggy.getCommitID(), ric.getCommitID(),
work.getCommitID(), r_rscore, r_wscore, b_rscore, errorsMsgs);
MysqlManager.executeUpdate(updateQuery);
count += 1;
System.out.println(String.format("Handled %s: %d/%d", projectFullName, count, regressionList.size()));
System.out.println("Done");
}
System.out.println();
}
Expand Down

0 comments on commit 26d2353

Please sign in to comment.