Program: 45272
Project: 45272
Buggy source:
/** 
 * Runs the download news task -- news is downloaded from all active news feeds across all registered users. 
 */
public void run(){
  if (GlobalConstants.testing() || GlobalConstants.isTrue("String_Node_Str"))   return;
  if (SiteCrawlerTask.checkCrawlersFile())   return;
  if (_log.isInfoEnabled()) {
    _log.info("String_Node_Str");
    _log.info("String_Node_Str" + _count + "String_Node_Str"+ (new java.util.Date()));
  }
  _count++;
  ThreadManager.recordThread(Thread.currentThread());
  _downloadedNews=new ConcurrentHashMap<String,Collection>();
  _completedDownloadsCount=0;
  _completedIssuesCount=0;
  try {
    ExecutorService tpool=Executors.newFixedThreadPool(DOWNLOAD_MAX_THREADS);
    int feedCount=0;
    Collection<Feed> activeFeeds=Feed.getActiveFeeds();
    for (    Feed f : activeFeeds) {
      feedCount++;
      tpool.execute(new FeedDownloader(f));
    }
    while (_completedDownloadsCount < feedCount) {
      StringUtils.sleep(30);
      _log.info("String_Node_Str" + _completedDownloadsCount + "String_Node_Str"+ feedCount+ "String_Node_Str");
    }
    if (!shutDownThreadPool(tpool))     return;
    tpool=Executors.newFixedThreadPool(CLASSIFY_MAX_THREADS);
    int issueCount=0;
    Collection<User> users=User.getAllUsers();
    for (    User u : users) {
      try {
        u.doPreDownloadBookkeeping();
        Collection<Issue> issues=u.getIssues();
        if (issues != null) {
          for (          Issue i : issues) {
            tpool.execute(new NewsClassifier(i));
            issueCount++;
          }
        }
      }
 catch (      Exception e) {
        _log.error("String_Node_Str" + u.getUid(),e);
      }
    }
    while (_completedIssuesCount < issueCount) {
      StringUtils.sleep(30);
      _log.info("String_Node_Str" + _completedIssuesCount + "String_Node_Str"+ issueCount+ "String_Node_Str");
    }
    for (    User u : users) {
      u.doPostDownloadBookkeeping();
      if (_log.isInfoEnabled())       _log.info("String_Node_Str" + u.getUid() + "String_Node_Str");
    }
    shutDownThreadPool(tpool);
  }
  finally {
    _lastDownloadTime=new Date();
    ThreadManager.removeThread(Thread.currentThread());
    _downloadedNews=null;
    newsrack.web.BrowseAction.setIssueUpdateLists();
  }
}

Fixed version (ground truth):
/** 
 * Runs the download news task -- news is downloaded from all active news feeds across all registered users. 
 */
public void run(){
  if (GlobalConstants.testing() || GlobalConstants.isTrue("String_Node_Str"))   return;
  if (SiteCrawlerTask.checkCrawlersFile())   return;
  if (_log.isInfoEnabled()) {
    _log.info("String_Node_Str");
    _log.info("String_Node_Str" + _count + "String_Node_Str"+ (new java.util.Date()));
  }
  _count++;
  ThreadManager.recordThread(Thread.currentThread());
  _downloadedNews=new ConcurrentHashMap<String,Collection>();
  _completedDownloadsCount=0;
  _completedIssuesCount=0;
  try {
    ExecutorService tpool=Executors.newFixedThreadPool(DOWNLOAD_MAX_THREADS);
    int feedCount=0;
    Collection<Feed> activeFeeds=Feed.getActiveFeeds();
    for (    Feed f : activeFeeds) {
      feedCount++;
      tpool.execute(new FeedDownloader(f));
    }
    int noChangeIntervals=0;
    int prev=0;
    while (_completedDownloadsCount < feedCount) {
      StringUtils.sleep(30);
      _log.info("String_Node_Str" + _completedDownloadsCount + "String_Node_Str"+ feedCount+ "String_Node_Str");
      if (_completedDownloadsCount == prev) {
        noChangeIntervals++;
        if (noChangeIntervals == 60) {
          _log.error("String_Node_Str");
          break;
        }
      }
 else {
        prev=_completedDownloadsCount;
        noChangeIntervals=0;
      }
    }
    if (!shutDownThreadPool(tpool))     return;
    tpool=Executors.newFixedThreadPool(CLASSIFY_MAX_THREADS);
    int issueCount=0;
    Collection<User> users=User.getAllUsers();
    for (    User u : users) {
      try {
        u.doPreDownloadBookkeeping();
      }
 catch (      Exception e) {
        _log.error("String_Node_Str",e);
      }
    }
    List<Issue> issues=User.getAllValidatedIssues();
    for (    Issue i : issues) {
      tpool.execute(new NewsClassifier(i));
      issueCount++;
    }
    noChangeIntervals=0;
    prev=0;
    while (_completedIssuesCount < issueCount) {
      StringUtils.sleep(30);
      _log.info("String_Node_Str" + _completedIssuesCount + "String_Node_Str"+ issueCount+ "String_Node_Str");
      if (_completedIssuesCount == prev) {
        noChangeIntervals++;
        if (noChangeIntervals == 60) {
          _log.error("String_Node_Str");
          break;
        }
      }
 else {
        prev=_completedIssuesCount;
        noChangeIntervals=0;
      }
    }
    for (    User u : users)     u.doPostDownloadBookkeeping();
    shutDownThreadPool(tpool);
  }
  finally {
    _lastDownloadTime=new Date();
    ThreadManager.removeThread(Thread.currentThread());
    _downloadedNews=null;
  }
}