Change log.error to System.err.

This commit is contained in:
Kui LIU
2017-09-14 18:58:17 +02:00
parent 1868a4b61e
commit 42113d2fc3
5 changed files with 10 additions and 10 deletions
@@ -214,7 +214,7 @@ public class FixedViolationHunkParser extends FixedViolationParser {
} }
if (bugEndLine - bugStartLine > Configuration.HUNK_SIZE || fixEndLine - fixStartLine > Configuration.HUNK_SIZE) { if (bugEndLine - bugStartLine > Configuration.HUNK_SIZE || fixEndLine - fixStartLine > Configuration.HUNK_SIZE) {
this.largeHunk ++; this.largeHunk ++;
log.error("#LargeHunk: " + revFile.getName()); System.err.println("#LargeHunk: " + revFile.getName());
continue; continue;
} }
@@ -55,7 +55,7 @@ public class FixedViolationParser extends Parser {
if (gumTreeResults == null) { if (gumTreeResults == null) {
return null; return null;
} else if (gumTreeResults.size() == 0){ } else if (gumTreeResults.size() == 0){
log.error("#NoSourceCodeChange: " + revFile.getName()); System.err.println("#NoSourceCodeChange: " + revFile.getName());
return actionSets; return actionSets;
} else { } else {
// Regroup GumTre results. // Regroup GumTre results.
@@ -75,7 +75,7 @@ public class FixedViolationParser extends Parser {
actionSets = sorter.sortAscending(); actionSets = sorter.sortAscending();
if (actionSets.size() == 0) { if (actionSets.size() == 0) {
log.error("#NoStatementChange: " + revFile.getName()); System.err.println("#NoStatementChange: " + revFile.getName());
} }
return actionSets; return actionSets;
@@ -44,7 +44,7 @@ public class AkkaParser {
ActorSystem system = null; ActorSystem system = null;
ActorRef parsingActor = null; ActorRef parsingActor = null;
int numberOfWorkers = 200; int numberOfWorkers = 400;
final WorkMessage msg = new WorkMessage(0, msgFiles); final WorkMessage msg = new WorkMessage(0, msgFiles);
try { try {
log.info("Akka begins..."); log.info("Akka begins...");
@@ -89,7 +89,7 @@ public class ParseFixPatternWorker extends UntypedActor {
File positionFile = msgFile.getPositionFile(); File positionFile = msgFile.getPositionFile();
if (revFile.getName().toLowerCase().contains("test")) { if (revFile.getName().toLowerCase().contains("test")) {
testAlarms += countAlarms(positionFile); testAlarms += countAlarms(positionFile);
log.error("#TestViolation: " + revFile.getName()); System.err.println("#TestViolation: " + revFile.getName());
// continue; // continue;
} }
// Parser parser = null; // Parser parser = null;
@@ -121,7 +121,7 @@ public class ParseFixPatternWorker extends UntypedActor {
if ("".equals(editScript)) { if ("".equals(editScript)) {
if (parser.resultType == 1) { if (parser.resultType == 1) {
nullGumTreeResults += countAlarms(positionFile); nullGumTreeResults += countAlarms(positionFile);
log.error("#NullGumTreeResult: " + revFile.getName()); System.err.println("#NullGumTreeResult: " + revFile.getName());
} else if (parser.resultType == 2) { } else if (parser.resultType == 2) {
noSourceCodeChanges += countAlarms(positionFile); noSourceCodeChanges += countAlarms(positionFile);
} }
@@ -154,15 +154,15 @@ public class ParseFixPatternWorker extends UntypedActor {
// err.println("task timed out"); // err.println("task timed out");
future.cancel(true); future.cancel(true);
expNums += countAlarms(positionFile); expNums += countAlarms(positionFile);
log.error("#Timeout: " + revFile.getName()); System.err.println("#Timeout: " + revFile.getName());
} catch (InterruptedException e) { } catch (InterruptedException e) {
expNums += countAlarms(positionFile); expNums += countAlarms(positionFile);
// err.println("task interrupted"); // err.println("task interrupted");
log.error("#TimeInterrupted: " + revFile.getName()); System.err.println("#TimeInterrupted: " + revFile.getName());
} catch (ExecutionException e) { } catch (ExecutionException e) {
expNums += countAlarms(positionFile); expNums += countAlarms(positionFile);
// err.println("task aborted"); // err.println("task aborted");
log.error("#TimeAborted: " + revFile.getName()); System.err.println("#TimeAborted: " + revFile.getName());
} finally { } finally {
executor.shutdownNow(); executor.shutdownNow();
} }
@@ -440,7 +440,7 @@ public class HunkActionFilter {
violation.getActionSets().addAll(matchedActionSets); violation.getActionSets().addAll(matchedActionSets);
selectedViolations.add(violation); selectedViolations.add(violation);
} else { } else {
log.error("#NullMatchedGumTreeResult: " + revFile.getName().replace("#", "/") + " : " +violation.getStartLineNum() + " : " + System.err.println("#NullMatchedGumTreeResult: " + revFile.getName().replace("#", "/") + " : " +violation.getStartLineNum() + " : " +
violation.getEndLineNum() + " : " + violation.getAlarmType()); violation.getEndLineNum() + " : " + violation.getAlarmType());
} }
} }