Program: 168191
Project: 168191
Buggy source:
public void countWords(String inputFile,File oFile,File spssFile) throws IOException {
  File iFile=new File(inputFile);
  if (iFile.isDirectory()) {
    return;
  }
  logger.info("String_Node_Str" + inputFile);
  appendLog("String_Node_Str" + inputFile);
  HashMap<String,HashSet<String>> wordCategories=new HashMap<String,HashSet<String>>();
  long startTime=System.currentTimeMillis();
  BufferedReader br=new BufferedReader(new FileReader(iFile));
  HashMap<String,Integer> map=new HashMap<String,Integer>();
  String currentLine;
  int totalWords=0;
  int sixltr=0;
  int noOfLines=0;
  int numerals=0;
  weirdDashCount=0;
  period=comma=colon=semiC=qMark=exclam=dash=quote=apostro=parenth=otherP=allPct=0;
  while ((currentLine=br.readLine()) != null) {
    Matcher eolMatcher=eol.matcher(currentLine);
    while (eolMatcher.find())     noOfLines++;
    period=period + StringUtils.countMatches(currentLine,"String_Node_Str");
    comma=comma + StringUtils.countMatches(currentLine,"String_Node_Str");
    colon=colon + StringUtils.countMatches(currentLine,"String_Node_Str");
    semiC=semiC + StringUtils.countMatches(currentLine,"String_Node_Str");
    qMark=qMark + StringUtils.countMatches(currentLine,"String_Node_Str");
    exclam=exclam + StringUtils.countMatches(currentLine,"String_Node_Str");
    dash=dash + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    apostro=apostro + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    for (    char c : "String_Node_Str".toCharArray()) {
      otherP=otherP + StringUtils.countMatches(currentLine,String.valueOf(c));
    }
    System.out.println();
    int[] i=process(currentLine,map);
    totalWords=totalWords + i[0];
    sixltr=sixltr + i[1];
    numerals=numerals + i[2];
  }
  allPct=allPct + period + comma+ colon+ semiC+ qMark+ exclam+ dash+ quote+ apostro+ parenth+ otherP;
  br.close();
  logger.info("String_Node_Str" + totalWords);
  logger.info("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  appendLog("String_Node_Str" + totalWords);
  appendLog("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  HashMap<String,Integer> catCount=new HashMap<String,Integer>();
  List<Integer> currCategories;
  int dicCount=0;
  String currCategoryName="String_Node_Str";
  for (  String currWord : map.keySet()) {
    if (currWord == null || currWord.equals("String_Node_Str"))     continue;
    currCategories=categorizer.query(currWord.toLowerCase());
    if (currCategories != null) {
      dicCount=dicCount + map.get(currWord);
      for (      int i : currCategories) {
        currCategoryName=categories.get(i);
        if (catCount.get(currCategoryName) != null) {
          catCount.put(currCategoryName,catCount.get(currCategoryName) + map.get(currWord));
        }
 else {
          catCount.put(currCategoryName,map.get(currWord));
        }
        HashSet<String> currWordCategories=wordCategories.get(currWord);
        if (currWordCategories != null) {
          wordCategories.get(currWord).add(currCategoryName);
        }
 else {
          currWordCategories=new HashSet<String>();
          currWordCategories.add(currCategoryName);
          wordCategories.put(currWord,currWordCategories);
        }
      }
    }
 else {
    }
  }
  if (doWordDistribution)   calculateWordDistribution(map,catCount,wordCategories,inputFile,oFile);
  if (noOfLines == 0)   noOfLines=1;
  writeToFile(oFile,iFile.getName(),totalWords,totalWords / (double)noOfLines,(sixltr * 100) / (double)totalWords,(dicCount * 100) / (float)totalWords,(numerals * 100) / (double)totalWords,catCount);
  if (doSpss)   writeToSpss(spssFile,iFile.getName(),totalWords,totalWords / (float)noOfLines,(sixltr * 100) / (float)totalWords,(dicCount * 100) / (double)totalWords,catCount);
}

Fixed version (ground truth):
public void countWords(String inputFile,File oFile,File spssFile) throws IOException {
  File iFile=new File(inputFile);
  if (iFile.isDirectory()) {
    return;
  }
  logger.info("String_Node_Str" + inputFile);
  appendLog("String_Node_Str" + inputFile);
  HashMap<String,HashSet<String>> wordCategories=new HashMap<String,HashSet<String>>();
  long startTime=System.currentTimeMillis();
  BufferedReader br=new BufferedReader(new FileReader(iFile));
  HashMap<String,Integer> map=new HashMap<String,Integer>();
  String currentLine;
  int totalWords=0;
  int sixltr=0;
  int noOfLines=0;
  int numerals=0;
  weirdDashCount=0;
  period=comma=colon=semiC=qMark=exclam=dash=quote=apostro=parenth=otherP=allPct=0;
  while ((currentLine=br.readLine()) != null) {
    Matcher eolMatcher=eol.matcher(currentLine);
    while (eolMatcher.find())     noOfLines++;
    period=period + StringUtils.countMatches(currentLine,"String_Node_Str");
    comma=comma + StringUtils.countMatches(currentLine,"String_Node_Str");
    colon=colon + StringUtils.countMatches(currentLine,"String_Node_Str");
    semiC=semiC + StringUtils.countMatches(currentLine,"String_Node_Str");
    qMark=qMark + StringUtils.countMatches(currentLine,"String_Node_Str");
    exclam=exclam + StringUtils.countMatches(currentLine,"String_Node_Str");
    dash=dash + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    quote=quote + StringUtils.countMatches(currentLine,"String_Node_Str");
    apostro=apostro + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    parenth=parenth + StringUtils.countMatches(currentLine,"String_Node_Str");
    for (    char c : "String_Node_Str".toCharArray()) {
      otherP=otherP + StringUtils.countMatches(currentLine,String.valueOf(c));
    }
    System.out.println();
    int[] i=process(currentLine,map);
    totalWords=totalWords + i[0];
    sixltr=sixltr + i[1];
    numerals=numerals + i[2];
  }
  allPct=allPct + period + comma+ colon+ semiC+ qMark+ exclam+ dash+ quote+ apostro+ parenth+ otherP;
  br.close();
  logger.info("String_Node_Str" + totalWords);
  logger.info("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  appendLog("String_Node_Str" + totalWords);
  appendLog("String_Node_Str" + (System.currentTimeMillis() - startTime) + "String_Node_Str");
  HashMap<String,Integer> catCount=new HashMap<String,Integer>();
  List<Integer> currCategories;
  int dicCount=0;
  String currCategoryName="String_Node_Str";
  for (  String currWord : map.keySet()) {
    if (currWord == null || currWord.equals("String_Node_Str"))     continue;
    currCategories=categorizer.query(currWord.toLowerCase());
    if (currCategories != null) {
      dicCount=dicCount + map.get(currWord);
      for (      int i : currCategories) {
        currCategoryName=categories.get(i);
        if (catCount.get(currCategoryName) != null) {
          catCount.put(currCategoryName,catCount.get(currCategoryName) + map.get(currWord));
        }
 else {
          catCount.put(currCategoryName,map.get(currWord));
        }
        HashSet<String> currWordCategories=wordCategories.get(currWord);
        if (currWordCategories != null) {
          wordCategories.get(currWord).add(currCategoryName);
        }
 else {
          currWordCategories=new HashSet<String>();
          currWordCategories.add(currCategoryName);
          wordCategories.put(currWord,currWordCategories);
        }
      }
    }
 else {
    }
  }
  if (doWordDistribution)   calculateWordDistribution(map,catCount,wordCategories,inputFile,oFile);
  if (noOfLines == 0)   noOfLines=1;
  writeToFile(oFile,iFile.getName(),totalWords,totalWords / (double)noOfLines,(sixltr * 100) / (double)totalWords,(dicCount * 100) / (float)totalWords,(numerals * 100) / (double)totalWords,catCount);
  if (doSpss)   writeToSpss(spssFile,iFile.getName(),totalWords,totalWords / (float)noOfLines,(sixltr * 100) / (float)totalWords,(dicCount * 100) / (double)totalWords,catCount);
}