Program: 6743
Project: 6743
Buggy source:
/** 
 * Prepare the specs of the twill application for the Explore twill runnable. Add jars needed by the Explore module in the classpath of the containers, and add conf files (hive_site.xml, etc) as resources available for the Explore twill runnable.
 */
private TwillPreparer prepareExploreContainer(TwillPreparer preparer){
  File tempDir=DirUtils.createTempDir(new File(cConf.get(Constants.CFG_LOCAL_DATA_DIR),cConf.get(Constants.AppFabric.TEMP_DIR)).getAbsoluteFile());
  Preconditions.checkState(tempDir.mkdirs(),"String_Node_Str" + tempDir.getAbsolutePath());
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      LOG.trace("String_Node_Str",jarFile.getName());
      preparer=preparer.withClassPaths(jarFile.getName());
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  String hiveConfFiles=System.getProperty(Constants.Explore.EXPLORE_CONF_FILES);
  LOG.debug("String_Node_Str",hiveConfFiles);
  if (hiveConfFiles == null) {
    throw new RuntimeException("String_Node_Str" + Constants.Explore.EXPLORE_CONF_FILES + "String_Node_Str");
  }
  Iterable<File> hiveConfFilesFiles=ExploreServiceUtils.getClassPathJarsFiles(hiveConfFiles);
  Set<String> addedFiles=Sets.newHashSet();
  for (  File file : hiveConfFilesFiles) {
    if (file.getName().matches("String_Node_Str") && !file.getName().equals("String_Node_Str")) {
      if (addedFiles.add(file.getName())) {
        LOG.debug("String_Node_Str",file.getAbsolutePath());
        preparer=preparer.withResources(ExploreServiceUtils.updateConfFileForExplore(file,tempDir).toURI());
      }
 else {
        LOG.warn("String_Node_Str",file.getAbsolutePath());
      }
    }
  }
  return preparer;
}

Fixed version (ground truth):
/** 
 * Prepare the specs of the twill application for the Explore twill runnable. Add jars needed by the Explore module in the classpath of the containers, and add conf files (hive_site.xml, etc) as resources available for the Explore twill runnable.
 */
private TwillPreparer prepareExploreContainer(TwillPreparer preparer){
  File tempDir=DirUtils.createTempDir(new File(cConf.get(Constants.CFG_LOCAL_DATA_DIR),cConf.get(Constants.AppFabric.TEMP_DIR)).getAbsoluteFile());
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      LOG.trace("String_Node_Str",jarFile.getName());
      preparer=preparer.withClassPaths(jarFile.getName());
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  String hiveConfFiles=System.getProperty(Constants.Explore.EXPLORE_CONF_FILES);
  LOG.debug("String_Node_Str",hiveConfFiles);
  if (hiveConfFiles == null) {
    throw new RuntimeException("String_Node_Str" + Constants.Explore.EXPLORE_CONF_FILES + "String_Node_Str");
  }
  Iterable<File> hiveConfFilesFiles=ExploreServiceUtils.getClassPathJarsFiles(hiveConfFiles);
  Set<String> addedFiles=Sets.newHashSet();
  for (  File file : hiveConfFilesFiles) {
    if (file.getName().matches("String_Node_Str") && !file.getName().equals("String_Node_Str")) {
      if (addedFiles.add(file.getName())) {
        LOG.debug("String_Node_Str",file.getAbsolutePath());
        preparer=preparer.withResources(ExploreServiceUtils.updateConfFileForExplore(file,tempDir).toURI());
      }
 else {
        LOG.warn("String_Node_Str",file.getAbsolutePath());
      }
    }
  }
  return preparer;
}