Program: 168119
Project: 168119
Buggy source:
/** 
 * Process a CorpusClass of Twitter JSON type. Remove function on completing support for Generic JSON files.
 * @param corpusClass
 */
private void processTwitter(CorpusClass corpusClass){
  JSONParser jParser;
  String corpusClassPath=corpusClass.getTacitLocation();
  String tempDir="String_Node_Str";
  String tempFile="String_Node_Str";
  Date dateobj=new Date();
  if (doPreprocessing)   tempFile=tempPPFileLoc + "String_Node_Str" + System.currentTimeMillis()+ "String_Node_Str";
 else {
    tempDir=ppFilesLoc + System.getProperty("String_Node_Str") + "String_Node_Str"+ dateobj.getTime();
    new File(tempDir).mkdir();
  }
  jParser=new JSONParser();
  dateobj=new Date();
  File[] fileList=new File(corpusClassPath).listFiles();
  for (int i=0; i < fileList.length; i++) {
    try {
      String fileName=fileList[i].getAbsolutePath();
      if (!fileList[i].getAbsolutePath().endsWith("String_Node_Str"))       continue;
      JSONArray objects=(JSONArray)jParser.parse(new FileReader(fileName));
      int j=0;
      for (      Object obj : objects) {
        JSONObject twitterStream=(JSONObject)obj;
        if (!processQuery(corpusClass,twitterStream))         continue;
        dateobj=new Date();
        File file;
        if (doPreprocessing) {
          file=new File(tempFile);
        }
 else {
          file=new File(tempDir + System.getProperty("String_Node_Str") + "String_Node_Str"+ j+ "String_Node_Str"+ df.format(dateobj));
        }
        if (file.exists()) {
          file.delete();
        }
        FileWriter fw=new FileWriter(file.getAbsoluteFile());
        BufferedWriter bw=new BufferedWriter(fw);
        String tweet=twitterStream.get("String_Node_Str").toString();
        bw.write(tweet);
        bw.close();
        if (doPreprocessing) {
          outputFiles.add(processFile(tempFile,"String_Node_Str" + j + "String_Node_Str"+ df.format(dateobj)));
        }
 else {
          outputFiles.add(checkfiletype(file.getAbsolutePath()));
        }
        j++;
      }
    }
 catch (    JsonParseException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
catch (    ParseException e) {
      e.printStackTrace();
    }
  }
  if (new File(tempFile).exists()) {
    new File(tempFile).delete();
  }
}

Fixed version (ground truth):
/** 
 * Process a CorpusClass of Twitter JSON type. Remove function on completing support for Generic JSON files.
 * @param corpusClass
 * @throws TikaException 
 */
private void processTwitter(CorpusClass corpusClass) throws TikaException {
  JSONParser jParser;
  String corpusClassPath=corpusClass.getTacitLocation();
  String tempDir="String_Node_Str";
  String tempFile="String_Node_Str";
  Date dateobj=new Date();
  if (doPreprocessing)   tempFile=tempPPFileLoc + "String_Node_Str" + System.currentTimeMillis()+ "String_Node_Str";
 else {
    tempDir=ppFilesLoc + System.getProperty("String_Node_Str") + "String_Node_Str"+ dateobj.getTime();
    new File(tempDir).mkdir();
  }
  jParser=new JSONParser();
  dateobj=new Date();
  File[] fileList=new File(corpusClassPath).listFiles();
  for (int i=0; i < fileList.length; i++) {
    try {
      String fileName=fileList[i].getAbsolutePath();
      if (!fileList[i].getAbsolutePath().endsWith("String_Node_Str"))       continue;
      JSONArray objects=(JSONArray)jParser.parse(new FileReader(fileName));
      int j=0;
      for (      Object obj : objects) {
        JSONObject twitterStream=(JSONObject)obj;
        if (!processQuery(corpusClass,twitterStream))         continue;
        dateobj=new Date();
        File file;
        if (doPreprocessing) {
          file=new File(tempFile);
        }
 else {
          file=new File(tempDir + System.getProperty("String_Node_Str") + "String_Node_Str"+ j+ "String_Node_Str"+ df.format(dateobj));
        }
        if (file.exists()) {
          file.delete();
        }
        FileWriter fw=new FileWriter(file.getAbsoluteFile());
        BufferedWriter bw=new BufferedWriter(fw);
        String tweet=twitterStream.get("String_Node_Str").toString();
        bw.write(tweet);
        bw.close();
        if (doPreprocessing) {
          outputFiles.add(processFile(tempFile,"String_Node_Str" + j + "String_Node_Str"+ df.format(dateobj)));
        }
 else {
          outputFiles.add(checkfiletype(file.getAbsolutePath()));
        }
        j++;
      }
    }
 catch (    JsonParseException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
catch (    ParseException e) {
      e.printStackTrace();
    }
  }
  if (new File(tempFile).exists()) {
    new File(tempFile).delete();
  }
}