Program: 141199
Project: 141199
Buggy source:
/** 
 * Create a new step that copy/(un)compress input data of a step.
 * @param workflow workflow where adding the step
 * @param oriStepId id of the step that required copying data
 * @param format format of the data
 * @param inputCompression compression format of the data to read
 * @param outputCompressionAllowed compression formats allowed by the step
 * @return a new step
 * @throws EoulsanException if an error occurs while creating the step
 */
private static CommandWorkflowStep newInputFormatCopyStep(final CommandWorkflow workflow,final String oriStepId,final DataFile workingDirectory,final DataFormat format,final CompressionType inputCompression,final EnumSet<CompressionType> outputCompressionAllowed) throws EoulsanException {
  final String stepName=CopyInputFormatStep.STEP_NAME;
  final Set<String> stepsIds=Sets.newHashSet();
  for (  WorkflowStep s : workflow.getSteps())   stepsIds.add(s.getId());
  int i=1;
  String stepId;
  do {
    stepId=oriStepId + "String_Node_Str" + i;
    i++;
  }
 while (stepsIds.contains(stepId));
  CompressionType comp=null;
  if (outputCompressionAllowed.contains(inputCompression))   comp=inputCompression;
 else   if (outputCompressionAllowed.contains(CompressionType.NONE))   comp=CompressionType.NONE;
 else   comp=outputCompressionAllowed.iterator().next();
  final Set<Parameter> parameters=Sets.newHashSet();
  parameters.add(new Parameter(CopyInputFormatStep.FORMAT_PARAMETER,format.getName()));
  parameters.add(new Parameter(CopyInputFormatStep.OUTPUT_COMPRESSION_PARAMETER,comp.name()));
  CommandWorkflowStep step=new CommandWorkflowStep(workflow,stepId,stepName,parameters,false,false);
  step.configure();
  return step;
}

Fixed version (ground truth):
/** 
 * Create a new step that copy/(un)compress input data of a step.
 * @param workflow workflow where adding the step
 * @param oriStepId id of the step that required copying data
 * @param format format of the data
 * @param inputCompression compression format of the data to read
 * @param outputCompressionAllowed compression formats allowed by the step
 * @return a new step
 * @throws EoulsanException if an error occurs while creating the step
 */
private static CommandWorkflowStep newInputFormatCopyStep(final CommandWorkflow workflow,final String oriStepId,final DataFormat format,final CompressionType inputCompression,final EnumSet<CompressionType> outputCompressionAllowed) throws EoulsanException {
  final String stepName=CopyInputFormatStep.STEP_NAME;
  final Set<String> stepsIds=Sets.newHashSet();
  for (  WorkflowStep s : workflow.getSteps())   stepsIds.add(s.getId());
  int i=1;
  String stepId;
  do {
    stepId=oriStepId + "String_Node_Str" + i;
    i++;
  }
 while (stepsIds.contains(stepId));
  CompressionType comp=null;
  if (outputCompressionAllowed.contains(inputCompression))   comp=inputCompression;
 else   if (outputCompressionAllowed.contains(CompressionType.NONE))   comp=CompressionType.NONE;
 else   comp=outputCompressionAllowed.iterator().next();
  final Set<Parameter> parameters=Sets.newHashSet();
  parameters.add(new Parameter(CopyInputFormatStep.FORMAT_PARAMETER,format.getName()));
  parameters.add(new Parameter(CopyInputFormatStep.OUTPUT_COMPRESSION_PARAMETER,comp.name()));
  CommandWorkflowStep step=new CommandWorkflowStep(workflow,stepId,stepName,parameters,false,false);
  step.configure();
  return step;
}