Program: 7526
Project: 7526
Buggy source:
/** 
 * Receives an input containing application specification and location and verifies both.
 * @param input An instance of {@link co.cask.cdap.internal.app.deploy.pipeline.ApplicationSpecLocation}
 */
@Override public void process(ApplicationSpecLocation input) throws Exception {
  ApplicationSpecification specification=input.getSpecification();
  File unpackedLocation=Files.createTempDir();
  try {
    BundleJarUtil.unpackProgramJar(input.getArchive(),unpackedLocation);
    ProgramClassLoader classLoader=ClassLoaders.newProgramClassLoader(unpackedLocation,ApiResourceListHolder.getResourceList(),this.getClass().getClassLoader());
    for (    Map.Entry<String,String> moduleEntry : specification.getDatasetModules().entrySet()) {
      @SuppressWarnings("String_Node_Str") Class<?> clazz=classLoader.loadClass(moduleEntry.getValue());
      String moduleName=moduleEntry.getKey();
      try {
        if (DatasetModule.class.isAssignableFrom(clazz)) {
          datasetFramework.addModule(moduleName,(DatasetModule)clazz.newInstance());
        }
 else         if (Dataset.class.isAssignableFrom(clazz) && !datasetFramework.hasType(clazz.getName())) {
          datasetFramework.addModule(moduleName,new SingleTypeModule((Class<Dataset>)clazz));
        }
 else {
          String msg=String.format("String_Node_Str",clazz.getName());
          throw new IllegalArgumentException(msg);
        }
      }
 catch (      ModuleConflictException e) {
        LOG.info("String_Node_Str" + moduleName + "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    LOG.info("String_Node_Str",e);
  }
 finally {
    try {
      DirUtils.deleteDirectoryContents(unpackedLocation);
    }
 catch (    IOException e) {
      LOG.warn("String_Node_Str",unpackedLocation,e);
    }
  }
  emit(input);
}

Fixed version (ground truth):
/** 
 * Receives an input containing application specification and location and verifies both.
 * @param input An instance of {@link co.cask.cdap.internal.app.deploy.pipeline.ApplicationSpecLocation}
 */
@Override public void process(ApplicationSpecLocation input) throws Exception {
  ApplicationSpecification specification=input.getSpecification();
  File unpackedLocation=Files.createTempDir();
  try {
    BundleJarUtil.unpackProgramJar(input.getArchive(),unpackedLocation);
    ProgramClassLoader classLoader=ClassLoaders.newProgramClassLoader(unpackedLocation,ApiResourceListHolder.getResourceList(),this.getClass().getClassLoader());
    for (    Map.Entry<String,String> moduleEntry : specification.getDatasetModules().entrySet()) {
      @SuppressWarnings("String_Node_Str") Class<?> clazz=classLoader.loadClass(moduleEntry.getValue());
      String moduleName=moduleEntry.getKey();
      try {
        if (DatasetModule.class.isAssignableFrom(clazz)) {
          datasetFramework.addModule(moduleName,(DatasetModule)clazz.newInstance());
        }
 else         if (Dataset.class.isAssignableFrom(clazz)) {
          if (!datasetFramework.hasType(clazz.getName())) {
            datasetFramework.addModule(moduleName,new SingleTypeModule((Class<Dataset>)clazz));
          }
        }
 else {
          String msg=String.format("String_Node_Str",clazz.getName());
          throw new IllegalArgumentException(msg);
        }
      }
 catch (      ModuleConflictException e) {
        LOG.info("String_Node_Str" + moduleName + "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    LOG.info("String_Node_Str",e);
  }
 finally {
    try {
      DirUtils.deleteDirectoryContents(unpackedLocation);
    }
 catch (    IOException e) {
      LOG.warn("String_Node_Str",unpackedLocation,e);
    }
  }
  emit(input);
}