Program: 89705
Project: 89705
Buggy source:
/** 
 * Updates the members from a   {@link CrawlProgressMessage} instance.
 * @param msg the  {@link CrawlProgressMessage} to process.
 */
public static StartedJobInfo build(CrawlProgressMessage msg){
  String harvestName=HarvestDefinitionDAO.getInstance().read(msg.getHarvestID()).getName();
  StartedJobInfo sji=new StartedJobInfo(harvestName,msg.getJobID());
  CrawlServiceInfo heritrixInfo=msg.getHeritrixStatus();
  CrawlServiceJobInfo jobInfo=msg.getJobStatus();
  CrawlStatus newStatus=msg.getStatus();
switch (newStatus) {
case PRE_CRAWL:
    sji.activeQueuesCount=0;
  sji.activeToeCount=0;
sji.alertsCount=0;
sji.currentProcessedDocsPerSec=0;
sji.currentProcessedKBPerSec=0;
sji.downloadedFilesCount=0;
sji.elapsedSeconds=0;
sji.hostUrl="String_Node_Str";
sji.processedDocsPerSec=0;
sji.processedKBPerSec=0;
sji.progress=0;
sji.queuedFilesCount=0;
sji.totalQueuesCount=0;
break;
case CRAWLER_ACTIVE:
case CRAWLER_PAUSING:
case CRAWLER_PAUSED:
double discoveredCount=jobInfo.getDiscoveredFilesCount();
double downloadedCount=jobInfo.getDownloadedFilesCount();
sji.progress=100 * downloadedCount / discoveredCount;
String frontierShortReport=jobInfo.getFrontierShortReport();
if (frontierShortReport != null) {
try {
Object[] params=FRONTIER_SHORT_FMT.parse(frontierShortReport);
sji.totalQueuesCount=Long.parseLong((String)params[0]);
sji.activeQueuesCount=Long.parseLong((String)params[1]);
sji.retiredQueuesCount=Long.parseLong((String)params[6]);
sji.exhaustedQueuesCount=Long.parseLong((String)params[7]);
}
 catch (ParseException e) {
throw new ArgumentNotValid(frontierShortReport,e);
}
}
sji.activeToeCount=jobInfo.getActiveToeCount();
sji.alertsCount=heritrixInfo.getAlertCount();
sji.currentProcessedDocsPerSec=jobInfo.getCurrentProcessedDocsPerSec();
sji.currentProcessedKBPerSec=jobInfo.getCurrentProcessedKBPerSec();
sji.downloadedFilesCount=jobInfo.getDownloadedFilesCount();
sji.elapsedSeconds=jobInfo.getElapsedSeconds();
sji.hostUrl=msg.getHostUrl();
sji.processedDocsPerSec=jobInfo.getProcessedDocsPerSec();
sji.processedKBPerSec=jobInfo.getProcessedKBPerSec();
sji.queuedFilesCount=jobInfo.getQueuedUriCount();
break;
case CRAWLING_FINISHED:
sji.progress=100;
sji.hostUrl="String_Node_Str";
sji.activeQueuesCount=0;
sji.activeToeCount=0;
sji.currentProcessedDocsPerSec=0;
sji.currentProcessedKBPerSec=0;
sji.processedDocsPerSec=0;
sji.processedKBPerSec=0;
sji.queuedFilesCount=0;
sji.totalQueuesCount=0;
break;
}
sji.status=newStatus;
return sji;
}

Fixed version (ground truth):
/** 
 * Updates the members from a   {@link CrawlProgressMessage} instance.
 * @param msg the  {@link CrawlProgressMessage} to process.
 */
public static StartedJobInfo build(CrawlProgressMessage msg){
  ArgumentNotValid.checkNotNull(msg,"String_Node_Str");
  String harvestName=HarvestDefinitionDAO.getInstance().getHarvestName(msg.getHarvestID());
  StartedJobInfo sji=new StartedJobInfo(harvestName,msg.getJobID());
  CrawlServiceInfo heritrixInfo=msg.getHeritrixStatus();
  CrawlServiceJobInfo jobInfo=msg.getJobStatus();
  CrawlStatus newStatus=msg.getStatus();
switch (newStatus) {
case PRE_CRAWL:
    sji.activeQueuesCount=0;
  sji.activeToeCount=0;
sji.alertsCount=0;
sji.currentProcessedDocsPerSec=0;
sji.currentProcessedKBPerSec=0;
sji.downloadedFilesCount=0;
sji.elapsedSeconds=0;
sji.hostUrl="String_Node_Str";
sji.processedDocsPerSec=0;
sji.processedKBPerSec=0;
sji.progress=0;
sji.queuedFilesCount=0;
sji.totalQueuesCount=0;
break;
case CRAWLER_ACTIVE:
case CRAWLER_PAUSING:
case CRAWLER_PAUSED:
double discoveredCount=jobInfo.getDiscoveredFilesCount();
double downloadedCount=jobInfo.getDownloadedFilesCount();
sji.progress=100 * downloadedCount / discoveredCount;
String frontierShortReport=jobInfo.getFrontierShortReport();
if (frontierShortReport != null) {
try {
Object[] params=FRONTIER_SHORT_FMT.parse(frontierShortReport);
sji.totalQueuesCount=Long.parseLong((String)params[0]);
sji.activeQueuesCount=Long.parseLong((String)params[1]);
sji.retiredQueuesCount=Long.parseLong((String)params[6]);
sji.exhaustedQueuesCount=Long.parseLong((String)params[7]);
}
 catch (ParseException e) {
throw new ArgumentNotValid(frontierShortReport,e);
}
}
sji.activeToeCount=jobInfo.getActiveToeCount();
sji.alertsCount=heritrixInfo.getAlertCount();
sji.currentProcessedDocsPerSec=jobInfo.getCurrentProcessedDocsPerSec();
sji.currentProcessedKBPerSec=jobInfo.getCurrentProcessedKBPerSec();
sji.downloadedFilesCount=jobInfo.getDownloadedFilesCount();
sji.elapsedSeconds=jobInfo.getElapsedSeconds();
sji.hostUrl=msg.getHostUrl();
sji.processedDocsPerSec=jobInfo.getProcessedDocsPerSec();
sji.processedKBPerSec=jobInfo.getProcessedKBPerSec();
sji.queuedFilesCount=jobInfo.getQueuedUriCount();
break;
case CRAWLING_FINISHED:
sji.progress=100;
sji.hostUrl="String_Node_Str";
sji.activeQueuesCount=0;
sji.activeToeCount=0;
sji.currentProcessedDocsPerSec=0;
sji.currentProcessedKBPerSec=0;
sji.processedDocsPerSec=0;
sji.processedKBPerSec=0;
sji.queuedFilesCount=0;
sji.totalQueuesCount=0;
break;
}
sji.status=newStatus;
return sji;
}