Program: 5094
Project: 5094
Buggy source:
@Override public void initialize() throws Exception {
  SparkClientContext context=getContext();
  SparkConf sparkConf=new SparkConf();
  Map<String,String> programProperties=context.getSpecification().getProperties();
  String extraOpts=programProperties.get(EXTRA_OPTS);
  if (extraOpts != null && !extraOpts.isEmpty()) {
    sparkConf.set("String_Node_Str",extraOpts);
    sparkConf.set("String_Node_Str",extraOpts);
  }
  Integer numSources=Integer.valueOf(programProperties.get(NUM_SOURCES));
  sparkConf.set("String_Node_Str",String.valueOf(numSources + 2));
  Boolean isUnitTest=Boolean.valueOf(programProperties.get(IS_UNIT_TEST));
  if (isUnitTest) {
    sparkConf.setMaster(String.format("String_Node_Str",numSources + 1));
  }
  context.setSparkConf(sparkConf);
  boolean checkpointsDisabled=Boolean.valueOf(programProperties.get(CHECKPOINTS_DISABLED));
  if (!checkpointsDisabled) {
    FileSet checkpointFileSet=context.getDataset(DataStreamsApp.CHECKPOINT_FILESET);
    String pipelineName=context.getApplicationSpecification().getName();
    String checkpointDir=context.getSpecification().getProperty(CHECKPOINT_DIR);
    Location pipelineCheckpointBase=checkpointFileSet.getBaseLocation().append(pipelineName);
    Location pipelineCheckpointDir=pipelineCheckpointBase.append(checkpointDir);
    if (!ensureDirExists(pipelineCheckpointBase)) {
      throw new IOException(String.format("String_Node_Str",pipelineCheckpointBase));
    }
    try {
      for (      Location child : pipelineCheckpointBase.list()) {
        if (!child.equals(pipelineCheckpointDir) && !child.delete(true)) {
          LOG.warn("String_Node_Str",child);
        }
      }
    }
 catch (    Exception e) {
      LOG.warn("String_Node_Str",e);
    }
    if (!ensureDirExists(pipelineCheckpointDir)) {
      throw new IOException(String.format("String_Node_Str",pipelineCheckpointDir));
    }
  }
}

Fixed version (ground truth):
@Override public void initialize() throws Exception {
  SparkClientContext context=getContext();
  String arguments=Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(context.getRuntimeArguments());
  WRAPPERLOGGER.info("String_Node_Str",context.getApplicationSpecification().getName(),UserGroupInformation.getCurrentUser().getShortUserName(),arguments);
  SparkConf sparkConf=new SparkConf();
  Map<String,String> programProperties=context.getSpecification().getProperties();
  String extraOpts=programProperties.get(EXTRA_OPTS);
  if (extraOpts != null && !extraOpts.isEmpty()) {
    sparkConf.set("String_Node_Str",extraOpts);
    sparkConf.set("String_Node_Str",extraOpts);
  }
  Integer numSources=Integer.valueOf(programProperties.get(NUM_SOURCES));
  sparkConf.set("String_Node_Str",String.valueOf(numSources + 2));
  Boolean isUnitTest=Boolean.valueOf(programProperties.get(IS_UNIT_TEST));
  if (isUnitTest) {
    sparkConf.setMaster(String.format("String_Node_Str",numSources + 1));
  }
  context.setSparkConf(sparkConf);
  boolean checkpointsDisabled=Boolean.valueOf(programProperties.get(CHECKPOINTS_DISABLED));
  if (!checkpointsDisabled) {
    FileSet checkpointFileSet=context.getDataset(DataStreamsApp.CHECKPOINT_FILESET);
    String pipelineName=context.getApplicationSpecification().getName();
    String checkpointDir=context.getSpecification().getProperty(CHECKPOINT_DIR);
    Location pipelineCheckpointBase=checkpointFileSet.getBaseLocation().append(pipelineName);
    Location pipelineCheckpointDir=pipelineCheckpointBase.append(checkpointDir);
    if (!ensureDirExists(pipelineCheckpointBase)) {
      throw new IOException(String.format("String_Node_Str",pipelineCheckpointBase));
    }
    try {
      for (      Location child : pipelineCheckpointBase.list()) {
        if (!child.equals(pipelineCheckpointDir) && !child.delete(true)) {
          LOG.warn("String_Node_Str",child);
        }
      }
    }
 catch (    Exception e) {
      LOG.warn("String_Node_Str",e);
    }
    if (!ensureDirExists(pipelineCheckpointDir)) {
      throw new IOException(String.format("String_Node_Str",pipelineCheckpointDir));
    }
  }
  WRAPPERLOGGER.info("String_Node_Str",context.getApplicationSpecification().getName());
}