Program: 168111
Project: 168111
Buggy source:
@SuppressWarnings("String_Node_Str") public static void removeCorpus(Corpus corpus,Boolean isCorpus){
  String corpusLocation=rootDir + corpus.getCorpusName();
  if (isCorpus) {
    try {
      new File(corpusLocation + System.getProperty("String_Node_Str") + "String_Node_Str").delete();
      FileUtils.deleteDirectory(new File(corpusLocation));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    return;
  }
  File[] classes=new File(corpusLocation).listFiles();
  HashMap<String,Boolean> oldClasses=new HashMap<String,Boolean>();
  if (classes == null) {
    return;
  }
  for (  File f : classes) {
    if (f.isDirectory()) {
      oldClasses.put(f.getAbsolutePath(),false);
    }
  }
  ArrayList<String> newClasses=new ArrayList<String>();
  int numNewClass=corpus.getClasses().size();
  for (int i=0; i < numNewClass; i++) {
    String classPath=corpus.getClasses().get(i).getTacitLocation();
    newClasses.add(classPath);
    if (oldClasses.get(classPath) != null) {
      oldClasses.put(classPath,true);
    }
  }
  Iterator<Entry<String,Boolean>> it=oldClasses.entrySet().iterator();
  while (it.hasNext()) {
    Map.Entry<String,Boolean> curr=it.next();
    String classPath=curr.getKey();
    if (!curr.getValue()) {
      try {
        FileUtils.deleteDirectory(new File(classPath));
        it.remove();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  String metaFile=corpusLocation + System.getProperty("String_Node_Str") + "String_Node_Str";
  JSONArray analysisArray=new JSONArray();
  int numAnalysis=0;
  if (!new File(metaFile).exists()) {
    JSONParser parser=new JSONParser();
    try {
      analysisArray=(JSONArray)((JSONObject)parser.parse(new FileReader(metaFile))).get("String_Node_Str");
      numAnalysis=(Integer)((JSONObject)parser.parse(new FileReader(metaFile))).get("String_Node_Str");
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
catch (    ParseException e) {
      e.printStackTrace();
    }
  }
  File metaFp=new File(metaFile);
  JSONObject jsonObj=new JSONObject();
  jsonObj.put("String_Node_Str",corpus.getCorpusName());
  jsonObj.put("String_Node_Str",corpus.getCorpusId());
  jsonObj.put("String_Node_Str",corpus.getDatatype().toString());
  jsonObj.put("String_Node_Str",corpus.getClasses().size());
  int numClasses=corpus.getClasses().size();
  ArrayList<ICorpusClass> corporaClasses=(ArrayList<ICorpusClass>)corpus.getClasses();
  JSONArray classArray=new JSONArray();
  for (int i=0; i < numClasses; i++) {
    CorpusClass currClass=(CorpusClass)corporaClasses.get(i);
    JSONObject classObj=new JSONObject();
    classObj.put("String_Node_Str",currClass.getClassName());
    classObj.put("String_Node_Str",currClass.getClassPath());
    classObj.put("String_Node_Str",corpusLocation + System.getProperty("String_Node_Str") + currClass.getClassName());
    classObj.put("String_Node_Str",currClass.getKeyTextFields());
    classArray.add(classObj);
  }
  jsonObj.put("String_Node_Str",classArray);
  jsonObj.put("String_Node_Str",numAnalysis);
  jsonObj.put("String_Node_Str",analysisArray);
  try {
    FileOutputStream bw=new FileOutputStream(metaFp);
    bw.write(jsonObj.toString().getBytes());
    bw.flush();
    bw.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void removeCorpus(Corpus corpus,Boolean isCorpus){
  String corpusLocation=rootDir + corpus.getCorpusName();
  if (isCorpus) {
    try {
      new File(corpusLocation + System.getProperty("String_Node_Str") + "String_Node_Str").delete();
      FileUtils.deleteDirectory(new File(corpusLocation));
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    return;
  }
  File[] classes=new File(corpusLocation).listFiles();
  HashMap<String,Boolean> oldClasses=new HashMap<String,Boolean>();
  if (classes == null) {
    return;
  }
  for (  File f : classes) {
    if (f.isDirectory()) {
      oldClasses.put(f.getAbsolutePath(),false);
    }
  }
  ArrayList<String> newClasses=new ArrayList<String>();
  int numNewClass=corpus.getClasses().size();
  for (int i=0; i < numNewClass; i++) {
    String classPath=corpus.getClasses().get(i).getTacitLocation();
    newClasses.add(classPath);
    if (oldClasses.get(classPath) != null) {
      oldClasses.put(classPath,true);
    }
  }
  Iterator<Entry<String,Boolean>> it=oldClasses.entrySet().iterator();
  while (it.hasNext()) {
    Map.Entry<String,Boolean> curr=it.next();
    String classPath=curr.getKey();
    if (!curr.getValue()) {
      try {
        FileUtils.deleteDirectory(new File(classPath));
        it.remove();
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  String metaFile=corpusLocation + System.getProperty("String_Node_Str") + "String_Node_Str";
  JSONArray analysisArray=new JSONArray();
  int numAnalysis=0;
  if (!new File(metaFile).exists()) {
    JSONParser parser=new JSONParser();
    try {
      analysisArray=(JSONArray)((JSONObject)parser.parse(new FileReader(metaFile))).get("String_Node_Str");
      numAnalysis=(Integer)((JSONObject)parser.parse(new FileReader(metaFile))).get("String_Node_Str");
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
catch (    ParseException e) {
      e.printStackTrace();
    }
  }
  File metaFp=new File(metaFile);
  JSONObject jsonObj=new JSONObject();
  jsonObj.put("String_Node_Str",corpus.getCorpusName());
  jsonObj.put("String_Node_Str",corpus.getCorpusId());
  jsonObj.put("String_Node_Str",corpus.getDatatype().toString());
  jsonObj.put("String_Node_Str",corpus.getClasses().size());
  int numClasses=corpus.getClasses().size();
  ArrayList<ICorpusClass> corporaClasses=(ArrayList<ICorpusClass>)corpus.getClasses();
  JSONArray classArray=new JSONArray();
  for (int i=0; i < numClasses; i++) {
    CorpusClass currClass=(CorpusClass)corporaClasses.get(i);
    JSONObject classObj=new JSONObject();
    classObj.put("String_Node_Str",currClass.getClassName());
    classObj.put("String_Node_Str",currClass.getClassPath());
    classObj.put("String_Node_Str",corpusLocation + System.getProperty("String_Node_Str") + currClass.getClassName());
    if (!currClass.getKeyTextFields().isEmpty())     classObj.put("String_Node_Str",currClass.getKeyTextFields());
    classArray.add(classObj);
  }
  jsonObj.put("String_Node_Str",classArray);
  jsonObj.put("String_Node_Str",numAnalysis);
  jsonObj.put("String_Node_Str",analysisArray);
  try {
    FileOutputStream bw=new FileOutputStream(metaFp);
    bw.write(jsonObj.toString().getBytes());
    bw.flush();
    bw.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}