Program: 56192
Project: 56192
Buggy source:
/** 
 * Creates an execution vertex from a job vertex.
 * @param jobVertex the job vertex to create the execution vertex from
 * @param instanceManager the instanceManager
 * @param initialExecutionStage the initial execution stage all group vertices are added to
 * @return the new execution vertex
 * @throws GraphConversionException thrown if the job vertex is of an unknown subclass
 */
private ExecutionVertex createVertex(AbstractJobVertex jobVertex,InstanceManager instanceManager,ExecutionStage initialExecutionStage) throws GraphConversionException {
  InstanceType instanceType=null;
  boolean userDefinedInstanceType=false;
  if (jobVertex.getInstanceType() != null) {
    userDefinedInstanceType=true;
    instanceType=instanceManager.getInstanceTypeByName(jobVertex.getInstanceType());
    if (instanceType == null) {
      throw new GraphConversionException("String_Node_Str" + jobVertex.getInstanceType() + "String_Node_Str");
    }
  }
  if (instanceType == null) {
    instanceType=instanceManager.getDefaultInstanceType();
  }
  final ExecutionSignature signature=ExecutionSignature.createSignature(jobVertex.getInvokableClass(),jobVertex.getJobGraph().getJobID());
  final ExecutionGroupVertex groupVertex=new ExecutionGroupVertex(jobVertex.getName(),jobVertex.getID(),this,jobVertex.getNumberOfSubtasks(),instanceType,userDefinedInstanceType,jobVertex.getNumberOfSubtasksPerInstance(),jobVertex.getVertexToShareInstancesWith() != null ? true : false,jobVertex.getConfiguration(),signature);
  final Class<? extends AbstractInvokable> invokableClass=jobVertex.getInvokableClass();
  if (invokableClass == null) {
    throw new GraphConversionException("String_Node_Str" + jobVertex.getID() + "String_Node_Str"+ jobVertex.getName()+ "String_Node_Str");
  }
  initialExecutionStage.addStageMember(groupVertex);
  ExecutionVertex ev=null;
  try {
    ev=new ExecutionVertex(jobVertex.getJobGraph().getJobID(),invokableClass,this,groupVertex);
  }
 catch (  Exception e) {
    throw new GraphConversionException(StringUtils.stringifyException(e));
  }
  try {
    jobVertex.checkConfiguration(ev.getEnvironment().getInvokable());
  }
 catch (  IllegalConfigurationException e) {
    throw new GraphConversionException(StringUtils.stringifyException(e));
  }
  final int minimumNumberOfSubtasks=jobVertex.getMinimumNumberOfSubtasks(ev.getEnvironment().getInvokable());
  final int maximumNumberOfSubtasks=jobVertex.getMaximumNumberOfSubtasks(ev.getEnvironment().getInvokable());
  if (jobVertex.getNumberOfSubtasks() != -1) {
    if (jobVertex.getNumberOfSubtasks() < 1) {
      throw new GraphConversionException("String_Node_Str" + jobVertex.getName() + "String_Node_Str"+ jobVertex.getNumberOfSubtasks()+ "String_Node_Str");
    }
    if (jobVertex.getNumberOfSubtasks() < minimumNumberOfSubtasks) {
      throw new GraphConversionException("String_Node_Str" + minimumNumberOfSubtasks);
    }
    if (maximumNumberOfSubtasks != -1) {
      if (jobVertex.getNumberOfSubtasks() > maximumNumberOfSubtasks) {
        throw new GraphConversionException("String_Node_Str" + jobVertex.getName() + "String_Node_Str"+ maximumNumberOfSubtasks);
      }
    }
  }
  if (jobVertex.getNumberOfSubtasksPerInstance() != -1 && jobVertex.getNumberOfSubtasksPerInstance() < 1) {
    throw new GraphConversionException("String_Node_Str" + jobVertex.getNumberOfSubtasksPerInstance() + "String_Node_Str"+ jobVertex.getName());
  }
  groupVertex.setMinMemberSize(minimumNumberOfSubtasks);
  groupVertex.setMaxMemberSize(maximumNumberOfSubtasks);
  ev.setAllocatedResource(new AllocatedResource(DummyInstance.createDummyInstance(instanceType),null));
  if (jobVertex instanceof JobInputVertex) {
    try {
      groupVertex.setInputSplits(((JobInputVertex)jobVertex).getInputSplits());
    }
 catch (    IllegalConfigurationException e) {
      throw new GraphConversionException("String_Node_Str" + groupVertex.getName() + "String_Node_Str"+ StringUtils.stringifyException(e));
    }
  }
  if (jobVertex instanceof JobFileOutputVertex) {
    final JobFileOutputVertex jbov=(JobFileOutputVertex)jobVertex;
    jobVertex.getConfiguration().setString("String_Node_Str",jbov.getFilePath().toString());
  }
  return ev;
}

Fixed version (ground truth):
/** 
 * Creates an execution vertex from a job vertex.
 * @param jobVertex the job vertex to create the execution vertex from
 * @param instanceManager the instanceManager
 * @param initialExecutionStage the initial execution stage all group vertices are added to
 * @return the new execution vertex
 * @throws GraphConversionException thrown if the job vertex is of an unknown subclass
 */
private ExecutionVertex createVertex(AbstractJobVertex jobVertex,InstanceManager instanceManager,ExecutionStage initialExecutionStage) throws GraphConversionException {
  InstanceType instanceType=null;
  boolean userDefinedInstanceType=false;
  if (jobVertex.getInstanceType() != null) {
    userDefinedInstanceType=true;
    instanceType=instanceManager.getInstanceTypeByName(jobVertex.getInstanceType());
    if (instanceType == null) {
      throw new GraphConversionException("String_Node_Str" + jobVertex.getInstanceType() + "String_Node_Str");
    }
  }
  if (instanceType == null) {
    instanceType=instanceManager.getDefaultInstanceType();
  }
  final ExecutionSignature signature=ExecutionSignature.createSignature(jobVertex.getInvokableClass(),jobVertex.getJobGraph().getJobID());
  final ExecutionGroupVertex groupVertex=new ExecutionGroupVertex(jobVertex.getName(),jobVertex.getID(),this,jobVertex.getNumberOfSubtasks(),instanceType,userDefinedInstanceType,jobVertex.getNumberOfSubtasksPerInstance(),jobVertex.getVertexToShareInstancesWith() != null ? true : false,jobVertex.getConfiguration(),signature);
  final Class<? extends AbstractInvokable> invokableClass=jobVertex.getInvokableClass();
  if (invokableClass == null) {
    throw new GraphConversionException("String_Node_Str" + jobVertex.getID() + "String_Node_Str"+ jobVertex.getName()+ "String_Node_Str");
  }
  initialExecutionStage.addStageMember(groupVertex);
  ExecutionVertex ev=null;
  try {
    ev=new ExecutionVertex(jobVertex.getJobGraph().getJobID(),invokableClass,this,groupVertex);
  }
 catch (  Exception e) {
    throw new GraphConversionException(StringUtils.stringifyException(e));
  }
  try {
    jobVertex.checkConfiguration(ev.getEnvironment().getInvokable());
  }
 catch (  IllegalConfigurationException e) {
    throw new GraphConversionException(StringUtils.stringifyException(e));
  }
  final int minimumNumberOfSubtasks=jobVertex.getMinimumNumberOfSubtasks(ev.getEnvironment().getInvokable());
  final int maximumNumberOfSubtasks=jobVertex.getMaximumNumberOfSubtasks(ev.getEnvironment().getInvokable());
  if (jobVertex.getNumberOfSubtasks() != -1) {
    if (jobVertex.getNumberOfSubtasks() < 1) {
      throw new GraphConversionException("String_Node_Str" + jobVertex.getName() + "String_Node_Str"+ jobVertex.getNumberOfSubtasks()+ "String_Node_Str");
    }
    if (jobVertex.getNumberOfSubtasks() < minimumNumberOfSubtasks) {
      throw new GraphConversionException("String_Node_Str" + minimumNumberOfSubtasks);
    }
    if (maximumNumberOfSubtasks != -1) {
      if (jobVertex.getNumberOfSubtasks() > maximumNumberOfSubtasks) {
        throw new GraphConversionException("String_Node_Str" + jobVertex.getName() + "String_Node_Str"+ maximumNumberOfSubtasks);
      }
    }
  }
  if (jobVertex.getNumberOfSubtasksPerInstance() != -1 && jobVertex.getNumberOfSubtasksPerInstance() < 1) {
    throw new GraphConversionException("String_Node_Str" + jobVertex.getNumberOfSubtasksPerInstance() + "String_Node_Str"+ jobVertex.getName());
  }
  groupVertex.setMinMemberSize(minimumNumberOfSubtasks);
  groupVertex.setMaxMemberSize(maximumNumberOfSubtasks);
  ev.setAllocatedResource(new AllocatedResource(DummyInstance.createDummyInstance(instanceType),instanceType,null));
  if (jobVertex instanceof JobInputVertex) {
    try {
      groupVertex.setInputSplits(((JobInputVertex)jobVertex).getInputSplits());
    }
 catch (    IllegalConfigurationException e) {
      throw new GraphConversionException("String_Node_Str" + groupVertex.getName() + "String_Node_Str"+ StringUtils.stringifyException(e));
    }
  }
  if (jobVertex instanceof JobFileOutputVertex) {
    final JobFileOutputVertex jbov=(JobFileOutputVertex)jobVertex;
    jobVertex.getConfiguration().setString("String_Node_Str",jbov.getFilePath().toString());
  }
  return ev;
}