nus-yam/ex-repair huggingface dataset:
Program: 88165
Project: 88165
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  try {
    if (this.jobClient.getConfiguration().getBoolean(ConfigConstants.JOBCLIENT_SHUTDOWN_TERMINATEJOB_KEY,ConfigConstants.DEFAULT_JOBCLIENT_SHUTDOWN_TERMINATEJOB)) {
      this.jobClient.cancelJob();
    }
    this.jobClient.close();
  }
 catch (  IOException ioe) {
    LOG.warn(StringUtils.stringifyException(ioe));
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  try {
    if (this.jobClient.getConfiguration().getBoolean(ConfigConstants.JOBCLIENT_SHUTDOWN_TERMINATEJOB_KEY,ConfigConstants.DEFAULT_JOBCLIENT_SHUTDOWN_TERMINATEJOB)) {
      System.out.println(AbstractEvent.timestampToString(System.currentTimeMillis()) + "String_Node_Str");
      this.jobClient.cancelJob();
    }
    this.jobClient.close();
  }
 catch (  IOException ioe) {
    LOG.warn(StringUtils.stringifyException(ioe));
  }
}
Program: 88167
Project: 88167
Buggy source:
/** 
 * Converts the timestamp of an event from its "milliseconds since beginning the epoch" representation into a unified string representation.
 * @param timestamp the timestamp in milliseconds since the beginning of "the epoch"
 * @return the string unified representation of the timestamp
 */
protected static String timestampToString(long timestamp){
  return dateFormatter.format(new Date(timestamp));
}

Fixed version (ground truth):
/** 
 * Converts the timestamp of an event from its "milliseconds since beginning the epoch" representation into a unified string representation.
 * @param timestamp the timestamp in milliseconds since the beginning of "the epoch"
 * @return the string unified representation of the timestamp
 */
public static String timestampToString(long timestamp){
  return dateFormatter.format(new Date(timestamp));
}
Program: 88168
Project: 88168
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public synchronized void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  for (  ClusterInstance host : registeredHosts.values()) {
    final AllocatedSlice slice=host.createSlice(instanceType,jobID);
    if (slice != null) {
      List<AllocatedSlice> allocatedSlices=this.slicesOfJobs.get(jobID);
      if (allocatedSlices == null) {
        allocatedSlices=new ArrayList<AllocatedSlice>();
        this.slicesOfJobs.put(jobID,allocatedSlices);
      }
      allocatedSlices.add(slice);
      if (this.instanceListener != null) {
        ClusterInstanceNotifier clusterInstanceNotifier=new ClusterInstanceNotifier(this.instanceListener,slice);
        clusterInstanceNotifier.start();
      }
      return;
    }
  }
  throw new InstanceException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public synchronized void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  AllocatedSlice slice=null;
  for (  final ClusterInstance host : this.registeredHosts.values()) {
    if (host.getType().equals(instanceType)) {
      slice=host.createSlice(instanceType,jobID);
      if (slice != null) {
        break;
      }
    }
  }
  if (slice == null) {
    for (    final ClusterInstance host : this.registeredHosts.values()) {
      slice=host.createSlice(instanceType,jobID);
      if (slice != null) {
        break;
      }
    }
  }
  if (slice == null) {
    throw new InstanceException("String_Node_Str");
  }
  List<AllocatedSlice> allocatedSlices=this.slicesOfJobs.get(jobID);
  if (allocatedSlices == null) {
    allocatedSlices=new ArrayList<AllocatedSlice>();
    this.slicesOfJobs.put(jobID,allocatedSlices);
  }
  allocatedSlices.add(slice);
  if (this.instanceListener != null) {
    ClusterInstanceNotifier clusterInstanceNotifier=new ClusterInstanceNotifier(this.instanceListener,slice);
    clusterInstanceNotifier.start();
  }
}
Program: 88171
Project: 88171
Buggy source:
/** 
 * @param sinkNode
 * @return
 * @throws CompilerException
 */
private JobOutputVertex generateDataSinkVertex(OptimizerNode sinkNode) throws CompilerException {
  DataSinkNode sNode=(DataSinkNode)sinkNode;
  GenericDataSink<?,?> sinkContract=sNode.getPactContract();
  JobGenericOutputVertex sinkVertex=new JobGenericOutputVertex(sinkNode.getPactContract().getName(),this.jobGraph);
  sinkVertex.setOutputClass(DataSinkTask.class);
  TaskConfig sinkConfig=new TaskConfig(sinkVertex.getConfiguration());
  sinkConfig.setStubClass(sinkContract.getUserCodeClass());
  sinkConfig.setStubParameters(sinkContract.getParameters());
switch (sinkNode.getLocalStrategy()) {
case NONE:
    sinkConfig.setLocalStrategy(LocalStrategy.NONE);
  break;
default :
throw new CompilerException("String_Node_Str" + sinkNode.getName() + "String_Node_Str"+ sinkNode.getLocalStrategy());
}
return sinkVertex;
}

Fixed version (ground truth):
/** 
 * @param sinkNode
 * @return
 * @throws CompilerException
 */
private JobOutputVertex generateDataSinkVertex(OptimizerNode sinkNode) throws CompilerException {
  DataSinkNode sNode=(DataSinkNode)sinkNode;
  GenericDataSink<?,?> sinkContract=sNode.getPactContract();
  JobGenericOutputVertex sinkVertex=new JobGenericOutputVertex(sinkNode.getPactContract().getName(),this.jobGraph);
  sinkVertex.setOutputClass(DataSinkTask.class);
  sinkVertex.getConfiguration().setInteger(DataSinkTask.DEGREE_OF_PARALLELISM_KEY,sinkNode.getDegreeOfParallelism());
  TaskConfig sinkConfig=new TaskConfig(sinkVertex.getConfiguration());
  sinkConfig.setStubClass(sinkContract.getUserCodeClass());
  sinkConfig.setStubParameters(sinkContract.getParameters());
switch (sinkNode.getLocalStrategy()) {
case NONE:
    sinkConfig.setLocalStrategy(LocalStrategy.NONE);
  break;
default :
throw new CompilerException("String_Node_Str" + sinkNode.getName() + "String_Node_Str"+ sinkNode.getLocalStrategy());
}
return sinkVertex;
}
Program: 88172
Project: 88172
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public int getMaximumNumberOfSubtasks(){
  if (!(this.format instanceof FileOutputFormat)) {
    return -1;
  }
  final String pathName=this.config.getStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,null);
  final Path path;
  if (pathName == null) {
    return 0;
  }
  try {
    path=new Path(pathName);
  }
 catch (  Throwable t) {
    return 0;
  }
  try {
    final FileSystem fs=path.getFileSystem();
    try {
      final FileStatus f=fs.getFileStatus(path);
      if (f == null) {
        return 1;
      }
      if (f.isDir()) {
        return -1;
      }
 else {
        return 1;
      }
    }
 catch (    FileNotFoundException fnfex) {
      fs.mkdirs(path);
      return -1;
    }
  }
 catch (  IOException e) {
    return 1;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int getMaximumNumberOfSubtasks(){
  if (!(this.format instanceof FileOutputFormat)) {
    return -1;
  }
  final String pathName=this.config.getStubParameter(FileOutputFormat.FILE_PARAMETER_KEY,null);
  final Path path;
  if (pathName == null) {
    return 0;
  }
  try {
    path=new Path(pathName);
  }
 catch (  Throwable t) {
    return 0;
  }
  try {
    final FileSystem fs=path.getFileSystem();
    try {
      final FileStatus f=fs.getFileStatus(path);
      if (f == null) {
        return 1;
      }
      if (f.isDir())       return -1;
 else       return 1;
    }
 catch (    FileNotFoundException fnfex) {
      int dop=getRuntimeConfiguration().getInteger(DEGREE_OF_PARALLELISM_KEY,-1);
      if (dop == 1) {
        return 1;
      }
      fs.mkdirs(path);
      return -1;
    }
  }
 catch (  IOException e) {
    return 1;
  }
}
Program: 88173
Project: 88173
Buggy source:
/** 
 * Initializes the input reader of the MapTask.
 * @throws RuntimeException Thrown if no input ship strategy was provided.
 */
private void initInputReader() throws RuntimeException {
  RecordDeserializer<KeyValuePair<Key,Value>> deserializerPartition=new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),(Class<Value>)((Class<? extends Value>)PactNull.class));
  RecordDeserializer<KeyValuePair<Key,Value>> deserializerReader=new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),stub.getOutValueType());
  DistributionPattern dpPartition=null;
switch (config.getInputShipStrategy(0)) {
case FORWARD:
    dpPartition=new PointwiseDistributionPattern();
  break;
case PARTITION_HASH:
case PARTITION_RANGE:
case BROADCAST:
dpPartition=new BipartiteDistributionPattern();
break;
default :
throw new RuntimeException("String_Node_Str");
}
DistributionPattern dpReader=null;
switch (config.getInputShipStrategy(0)) {
case FORWARD:
dpReader=new PointwiseDistributionPattern();
break;
case PARTITION_HASH:
case PARTITION_RANGE:
case BROADCAST:
dpReader=new BipartiteDistributionPattern();
break;
default :
throw new RuntimeException("String_Node_Str");
}
readerPartition=new RecordReader<KeyValuePair<Key,Value>>(this,deserializerPartition,dpPartition);
readerStub=new RecordReader<KeyValuePair<Key,Value>>(this,deserializerReader,dpReader);
}

Fixed version (ground truth):
/** 
 * Initializes the input reader of the MapTask.
 * @throws RuntimeException Thrown if no input ship strategy was provided.
 */
private void initInputReader() throws RuntimeException {
  RecordDeserializer<KeyValuePair<Key,Value>> deserializerPartition=new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),(Class<Value>)((Class<? extends Value>)PactNull.class));
  RecordDeserializer<KeyValuePair<Key,Value>> deserializerReader=new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),stub.getOutValueType());
  DistributionPattern dpPartition=null;
switch (config.getInputShipStrategy(0)) {
case FORWARD:
    dpPartition=new PointwiseDistributionPattern();
  break;
case PARTITION_HASH:
case PARTITION_RANGE:
case BROADCAST:
dpPartition=new BipartiteDistributionPattern();
break;
default :
throw new RuntimeException("String_Node_Str");
}
DistributionPattern dpReader=null;
switch (config.getInputShipStrategy(1)) {
case FORWARD:
dpReader=new PointwiseDistributionPattern();
break;
case PARTITION_HASH:
case PARTITION_RANGE:
case BROADCAST:
dpReader=new BipartiteDistributionPattern();
break;
default :
throw new RuntimeException("String_Node_Str");
}
readerPartition=new RecordReader<KeyValuePair<Key,Value>>(this,deserializerPartition,dpPartition);
readerStub=new RecordReader<KeyValuePair<Key,Value>>(this,deserializerReader,dpReader);
}
Program: 88174
Project: 88174
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ManagementVertex next(){
  if (traversalStack.isEmpty()) {
    if (numVisitedEntryVertices < 0) {
      return null;
    }
    TraversalEntry newentry;
    if (forward) {
      newentry=new TraversalEntry(managementGraph.getInputVertex(this.startStage,numVisitedEntryVertices),0,0);
    }
 else {
      newentry=new TraversalEntry(managementGraph.getOutputVertex(this.startStage,numVisitedEntryVertices),0,0);
    }
    traversalStack.push(newentry);
  }
  final ManagementVertex returnVertex=traversalStack.peek().getManagementVertex();
  do {
    final TraversalEntry te=traversalStack.peek();
    final ManagementVertex candidateVertex=getCandidateVertex(te,forward);
    if (candidateVertex == null) {
      traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0,0);
      traversalStack.add(newte);
      break;
    }
  }
 while (!traversalStack.isEmpty());
  alreadyVisited.add(returnVertex);
  return returnVertex;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ManagementVertex next(){
  if (this.traversalStack.isEmpty()) {
    if (this.numVisitedEntryVertices < 0) {
      return null;
    }
    TraversalEntry newentry;
    if (this.forward) {
      newentry=new TraversalEntry(this.managementGraph.getInputVertex(this.startStage,this.numVisitedEntryVertices),0,0);
    }
 else {
      newentry=new TraversalEntry(managementGraph.getOutputVertex(this.startStage,this.numVisitedEntryVertices),0,0);
    }
    this.traversalStack.push(newentry);
    this.alreadyVisited.add(newentry.getManagementVertex());
  }
  final ManagementVertex returnVertex=this.traversalStack.peek().getManagementVertex();
  do {
    final TraversalEntry te=this.traversalStack.peek();
    final ManagementVertex candidateVertex=getCandidateVertex(te,this.forward);
    if (candidateVertex == null) {
      this.traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0,0);
      this.traversalStack.push(newte);
      this.alreadyVisited.add(candidateVertex);
      break;
    }
  }
 while (!this.traversalStack.isEmpty());
  return returnVertex;
}
Program: 88175
Project: 88175
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean hasNext(){
  if (traversalStack.isEmpty()) {
    if (numVisitedEntryVertices < 0) {
      return false;
    }
    numVisitedEntryVertices++;
    if (forward) {
      if (managementGraph.getNumberOfInputVertices(this.startStage) <= numVisitedEntryVertices) {
        return false;
      }
    }
 else {
      if (managementGraph.getNumberOfOutputVertices(this.startStage) <= numVisitedEntryVertices) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean hasNext(){
  if (this.traversalStack.isEmpty()) {
    if (this.numVisitedEntryVertices < 0) {
      return false;
    }
    ++this.numVisitedEntryVertices;
    if (this.forward) {
      if (this.managementGraph.getNumberOfInputVertices(this.startStage) <= this.numVisitedEntryVertices) {
        return false;
      }
    }
 else {
      if (this.managementGraph.getNumberOfOutputVertices(this.startStage) <= this.numVisitedEntryVertices) {
        return false;
      }
    }
  }
  return true;
}
Program: 88177
Project: 88177
Buggy source:
/** 
 * Creates a new management graph iterator. This constructor can be used to traverse only specific parts of the graph starting at <code>startVertex</code>. The iterator will not switch to the next input/output vertex of an output/input vertex has been reached.
 * @param managementGraph the management graph that should be traversed
 * @param startVertex the vertex to start the traversal from
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 */
public ManagementGraphIterator(final ManagementGraph managementGraph,final ManagementVertex startVertex,final boolean forward){
  this.managementGraph=managementGraph;
  this.forward=forward;
  this.numVisitedEntryVertices=-1;
  this.startStage=0;
  this.confinedToStage=false;
  final TraversalEntry te=new TraversalEntry(startVertex,0,0);
  traversalStack.push(te);
}

Fixed version (ground truth):
/** 
 * Creates a new management graph iterator. This constructor can be used to traverse only specific parts of the graph starting at <code>startVertex</code>. The iterator will not switch to the next input/output vertex of an output/input vertex has been reached.
 * @param managementGraph the management graph that should be traversed
 * @param startVertex the vertex to start the traversal from
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 */
public ManagementGraphIterator(final ManagementGraph managementGraph,final ManagementVertex startVertex,final boolean forward){
  this.managementGraph=managementGraph;
  this.forward=forward;
  this.numVisitedEntryVertices=-1;
  this.startStage=0;
  this.confinedToStage=false;
  final TraversalEntry te=new TraversalEntry(startVertex,0,0);
  this.traversalStack.push(te);
  this.alreadyVisited.add(te.getManagementVertex());
}
Program: 88178
Project: 88178
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ManagementGroupVertex next(){
  if (this.traversalStack.isEmpty()) {
    final TraversalEntry newentry=new TraversalEntry(this.entryVertices.get(this.numVisitedEntryVertices),0);
    this.traversalStack.push(newentry);
  }
  final ManagementGroupVertex returnVertex=this.traversalStack.peek().getGroupVertex();
  do {
    final TraversalEntry te=this.traversalStack.peek();
    final ManagementGroupVertex candidateVertex=getCandidateVertex(te,forward);
    if (candidateVertex == null) {
      this.traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0);
      this.traversalStack.add(newte);
      break;
    }
  }
 while (!this.traversalStack.isEmpty());
  this.alreadyVisited.add(returnVertex);
  return returnVertex;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ManagementGroupVertex next(){
  if (this.traversalStack.isEmpty()) {
    final TraversalEntry newentry=new TraversalEntry(this.entryVertices.get(this.numVisitedEntryVertices),0);
    this.traversalStack.push(newentry);
    this.alreadyVisited.add(newentry.getGroupVertex());
  }
  final ManagementGroupVertex returnVertex=this.traversalStack.peek().getGroupVertex();
  do {
    final TraversalEntry te=this.traversalStack.peek();
    final ManagementGroupVertex candidateVertex=getCandidateVertex(te,forward);
    if (candidateVertex == null) {
      this.traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0);
      this.traversalStack.push(newte);
      this.alreadyVisited.add(newte.getGroupVertex());
      break;
    }
  }
 while (!this.traversalStack.isEmpty());
  return returnVertex;
}
Program: 88179
Project: 88179
Buggy source:
/** 
 * Collects all input group vertices (i.e. vertices with no incoming edge or incoming edges from other stages) in the given stage and adds them to an internal list.
 * @param stage the number of the stage whose input vertices should be collected
 */
private void collectStartVertices(final ManagementStage stage){
  for (int i=0; i < stage.getNumberOfGroupVertices(); i++) {
    final ManagementGroupVertex groupVertex=stage.getGroupVertex(i);
    if (forward) {
      if ((groupVertex.getNumberOfBackwardEdges() == 0) || ((this.stage >= 0) && allConnectionsFromOtherStage(groupVertex,true))) {
        this.entryVertices.add(groupVertex);
      }
    }
 else {
      if ((groupVertex.getNumberOfForwardEdges() == 0) || ((this.stage >= 0) && allConnectionsFromOtherStage(groupVertex,false))) {
        this.entryVertices.add(groupVertex);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Collects all input group vertices (i.e. vertices with no incoming edge or incoming edges from other stages) in the given stage and adds them to an internal list.
 * @param stage the number of the stage whose input vertices should be collected
 */
private void collectStartVertices(final ManagementStage stage){
  for (int i=0; i < stage.getNumberOfGroupVertices(); i++) {
    final ManagementGroupVertex groupVertex=stage.getGroupVertex(i);
    if (this.forward) {
      if ((groupVertex.getNumberOfBackwardEdges() == 0) || ((this.stage >= 0) && allConnectionsFromOtherStage(groupVertex,true))) {
        this.entryVertices.add(groupVertex);
      }
    }
 else {
      if ((groupVertex.getNumberOfForwardEdges() == 0) || ((this.stage >= 0) && allConnectionsFromOtherStage(groupVertex,false))) {
        this.entryVertices.add(groupVertex);
      }
    }
  }
}
Program: 88180
Project: 88180
Buggy source:
/** 
 * Creates a new management group vertex iterator.
 * @param managementGraph the management graph that should be traversed
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 * @param stage the number of the stage whose vertices should be traversed or -1 if all stages should be included in the traversal
 */
public ManagementGroupVertexIterator(final ManagementGraph managementGraph,final boolean forward,final int stage){
  this.forward=forward;
  this.stage=stage;
  if (stage < 0) {
    for (int i=0; i < managementGraph.getNumberOfStages(); i++) {
      collectStartVertices(managementGraph.getStage(i));
    }
  }
 else {
    if (stage < managementGraph.getNumberOfStages()) {
      collectStartVertices(managementGraph.getStage(stage));
    }
  }
  if (this.entryVertices.size() > 0) {
    final TraversalEntry te=new TraversalEntry(this.entryVertices.get(0),0);
    this.traversalStack.push(te);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new management group vertex iterator.
 * @param managementGraph the management graph that should be traversed
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 * @param stage the number of the stage whose vertices should be traversed or -1 if all stages should be included in the traversal
 */
public ManagementGroupVertexIterator(final ManagementGraph managementGraph,final boolean forward,final int stage){
  this.forward=forward;
  this.stage=stage;
  if (stage < 0) {
    for (int i=0; i < managementGraph.getNumberOfStages(); i++) {
      collectStartVertices(managementGraph.getStage(i));
    }
  }
 else {
    if (stage < managementGraph.getNumberOfStages()) {
      collectStartVertices(managementGraph.getStage(stage));
    }
  }
  if (this.entryVertices.size() > 0) {
    final TraversalEntry te=new TraversalEntry(this.entryVertices.get(0),0);
    this.traversalStack.push(te);
    this.alreadyVisited.add(te.getGroupVertex());
  }
}
Program: 88181
Project: 88181
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ExecutionVertex next(){
  if (traversalStack.isEmpty()) {
    if (numVisitedEntryVertices < 0) {
      return null;
    }
    TraversalEntry newentry;
    if (forward) {
      newentry=new TraversalEntry(executionGraph.getInputVertex(this.startStage,numVisitedEntryVertices),0,0);
    }
 else {
      newentry=new TraversalEntry(executionGraph.getOutputVertex(this.startStage,numVisitedEntryVertices),0,0);
    }
    traversalStack.push(newentry);
  }
  final ExecutionVertex returnVertex=traversalStack.peek().getExecutionVertex();
  do {
    final TraversalEntry te=traversalStack.peek();
    final ExecutionVertex candidateVertex=getCandidateVertex(te,forward);
    if (candidateVertex == null) {
      traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0,0);
      traversalStack.add(newte);
      break;
    }
  }
 while (!traversalStack.isEmpty());
  alreadyVisited.add(returnVertex);
  return returnVertex;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ExecutionVertex next(){
  if (this.traversalStack.isEmpty()) {
    if (this.numVisitedEntryVertices < 0) {
      return null;
    }
    TraversalEntry newentry;
    if (this.forward) {
      newentry=new TraversalEntry(this.executionGraph.getInputVertex(this.startStage,this.numVisitedEntryVertices),0,0);
    }
 else {
      newentry=new TraversalEntry(this.executionGraph.getOutputVertex(this.startStage,this.numVisitedEntryVertices),0,0);
    }
    this.traversalStack.push(newentry);
    this.alreadyVisited.add(newentry.getExecutionVertex());
  }
  final ExecutionVertex returnVertex=this.traversalStack.peek().getExecutionVertex();
  do {
    final TraversalEntry te=this.traversalStack.peek();
    final ExecutionVertex candidateVertex=getCandidateVertex(te,forward);
    if (candidateVertex == null) {
      this.traversalStack.pop();
    }
 else {
      final TraversalEntry newte=new TraversalEntry(candidateVertex,0,0);
      this.traversalStack.push(newte);
      this.alreadyVisited.add(candidateVertex);
      break;
    }
  }
 while (!this.traversalStack.isEmpty());
  return returnVertex;
}
Program: 88182
Project: 88182
Buggy source:
/** 
 * Creates a new execution graph iterator. This constructor can be used to traverse only specific parts of the graph starting at <code>startVertex</code>. The iterator will not switch to the next input/output vertex of an output/input vertex has been reached.
 * @param executionGraph the execution graph that should be traversed
 * @param startVertex the vertex to start the traversal from
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 */
public ExecutionGraphIterator(ExecutionGraph executionGraph,ExecutionVertex startVertex,boolean forward){
  this.executionGraph=executionGraph;
  this.forward=forward;
  this.numVisitedEntryVertices=-1;
  this.startStage=0;
  this.confinedToStage=false;
  final TraversalEntry te=new TraversalEntry(startVertex,0,0);
  traversalStack.push(te);
}

Fixed version (ground truth):
/** 
 * Creates a new execution graph iterator. This constructor can be used to traverse only specific parts of the graph starting at <code>startVertex</code>. The iterator will not switch to the next input/output vertex of an output/input vertex has been reached.
 * @param executionGraph the execution graph that should be traversed
 * @param startVertex the vertex to start the traversal from
 * @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to reverse it in reverse order
 */
public ExecutionGraphIterator(ExecutionGraph executionGraph,ExecutionVertex startVertex,boolean forward){
  this.executionGraph=executionGraph;
  this.forward=forward;
  this.numVisitedEntryVertices=-1;
  this.startStage=0;
  this.confinedToStage=false;
  final TraversalEntry te=new TraversalEntry(startVertex,0,0);
  this.traversalStack.push(te);
  this.alreadyVisited.add(startVertex);
}
Program: 88183
Project: 88183
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean hasNext(){
  if (traversalStack.isEmpty()) {
    if (numVisitedEntryVertices < 0) {
      return false;
    }
    numVisitedEntryVertices++;
    if (forward) {
      if (executionGraph.getNumberOfInputVertices(this.startStage) <= numVisitedEntryVertices) {
        return false;
      }
    }
 else {
      if (executionGraph.getNumberOfOutputVertices(this.startStage) <= numVisitedEntryVertices) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean hasNext(){
  if (this.traversalStack.isEmpty()) {
    if (this.numVisitedEntryVertices < 0) {
      return false;
    }
    ++this.numVisitedEntryVertices;
    if (this.forward) {
      if (this.executionGraph.getNumberOfInputVertices(this.startStage) <= this.numVisitedEntryVertices) {
        return false;
      }
    }
 else {
      if (this.executionGraph.getNumberOfOutputVertices(this.startStage) <= this.numVisitedEntryVertices) {
        return false;
      }
    }
  }
  return true;
}
Program: 88186
Project: 88186
Buggy source:
@Override public boolean nextBlock(){
  if (this.closed) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (this.noMoreBlocks) {
    return false;
  }
  collectAllBuffers(this.emptySegments);
  this.bufferCurrentlyFilled=new Buffer.Output(this.emptySegments.remove(this.emptySegments.size() - 1));
  if (this.leftOverElement != null) {
    if (!this.bufferCurrentlyFilled.write(this.leftOverElement)) {
      throw new RuntimeException("String_Node_Str" + "String_Node_Str");
    }
    this.nextElement=this.leftOverElement;
    this.leftOverElement=null;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean nextBlock(){
  if (this.closed) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (this.noMoreBlocks) {
    return false;
  }
  collectAllBuffers(this.emptySegments);
  this.bufferCurrentlyFilled=new Buffer.Output(this.emptySegments.remove(this.emptySegments.size() - 1));
  T next=this.leftOverElement;
  this.leftOverElement=null;
  if (next == null) {
    if (this.input.hasNext()) {
      next=this.input.next();
    }
 else {
      this.noMoreBlocks=true;
      return false;
    }
  }
  if (!this.bufferCurrentlyFilled.write(next)) {
    throw new RuntimeException("String_Node_Str" + "String_Node_Str");
  }
  this.nextElement=next;
  return true;
}
Program: 88188
Project: 88188
Buggy source:
/** 
 * Move the iterator to the next memory block
 * @return true if a new memory block was loaded, false if there were no further records
 */
public boolean nextBlock();

Fixed version (ground truth):
/** 
 * Move the iterator to the next memory block. The next memory block starts at the first element that was not in the block before. A special case is when no record was in the block before, which happens when this function is invoked two times directly in a sequence, without calling hasNext() or next in between. Then the block moves one element.
 * @return true if a new memory block was loaded, false if there were no further records
 */
public boolean nextBlock();
Program: 88189
Project: 88189
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void initialize(URI name) throws IOException {
  this.host=name.getHost();
  if (this.host == null) {
    LOG.debug("String_Node_Str");
    this.host=GlobalConfiguration.getString(S3_HOST_KEY,DEFAULT_S3_HOST);
  }
  this.port=name.getPort();
  if (this.port == -1) {
    LOG.debug("String_Node_Str");
    this.port=GlobalConfiguration.getInteger(S3_PORT_KEY,DEFAULT_S3_PORT);
  }
  final String userInfo=name.getUserInfo();
  String awsAccessKey=null;
  String awsSecretKey=null;
  if (userInfo != null) {
    final String[] splits=userInfo.split("String_Node_Str");
    if (splits.length > 1) {
      awsAccessKey=splits[0];
      awsSecretKey=splits[1];
    }
  }
  if (awsAccessKey == null) {
    LOG.debug("String_Node_Str");
    awsAccessKey=GlobalConfiguration.getString(S3_ACCESS_KEY_KEY,null);
    if (awsAccessKey == null) {
      throw new IOException("String_Node_Str");
    }
  }
  if (awsSecretKey == null) {
    LOG.debug("String_Node_Str");
    awsSecretKey=GlobalConfiguration.getString(S3_SECRET_KEY_KEY,null);
    if (awsSecretKey == null) {
      throw new IOException("String_Node_Str");
    }
  }
  final AWSCredentials credentials=new BasicAWSCredentials(awsAccessKey,awsSecretKey);
  this.s3Client=new AmazonS3Client(credentials);
  initializeDirectoryStructure(name);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void initialize(URI name) throws IOException {
  this.host=name.getHost();
  if (this.host == null) {
    LOG.debug("String_Node_Str");
    this.host=GlobalConfiguration.getString(S3_HOST_KEY,DEFAULT_S3_HOST);
  }
  this.port=name.getPort();
  if (this.port == -1) {
    LOG.debug("String_Node_Str");
    this.port=GlobalConfiguration.getInteger(S3_PORT_KEY,DEFAULT_S3_PORT);
  }
  final String userInfo=name.getUserInfo();
  String awsAccessKey=null;
  String awsSecretKey=null;
  if (userInfo != null) {
    final String[] splits=userInfo.split("String_Node_Str");
    if (splits.length > 1) {
      awsAccessKey=URLDecoder.decode(splits[0],URL_ENCODE_CHARACTER);
      awsSecretKey=URLDecoder.decode(splits[1],URL_ENCODE_CHARACTER);
    }
  }
  if (awsAccessKey == null) {
    LOG.debug("String_Node_Str");
    awsAccessKey=GlobalConfiguration.getString(S3_ACCESS_KEY_KEY,null);
    if (awsAccessKey == null) {
      throw new IOException("String_Node_Str");
    }
  }
  if (awsSecretKey == null) {
    LOG.debug("String_Node_Str");
    awsSecretKey=GlobalConfiguration.getString(S3_SECRET_KEY_KEY,null);
    if (awsSecretKey == null) {
      throw new IOException("String_Node_Str");
    }
  }
  final AWSCredentials credentials=new BasicAWSCredentials(awsAccessKey,awsSecretKey);
  this.s3Client=new AmazonS3Client(credentials);
  initializeDirectoryStructure(name);
}
Program: 88190
Project: 88190
Buggy source:
public boolean hasAssignedChannels(){
  return (!this.assignedChannels.isEmpty());
}

Fixed version (ground truth):
boolean hasAssignedChannels(){
  return (!this.assignedChannels.isEmpty());
}
Program: 88191
Project: 88191
Buggy source:
public void removeAssignedChannel(final ChannelID channelID){
  if (!this.assignedChannels.remove(channelID)) {
    throw new IllegalStateException(channelID + "String_Node_Str");
  }
}

Fixed version (ground truth):
void removeAssignedChannel(final ChannelID channelID){
  if (!this.assignedChannels.remove(channelID)) {
    throw new IllegalStateException(channelID + "String_Node_Str");
  }
}
Program: 88192
Project: 88192
Buggy source:
protected void addAssignedChannel(final ChannelID channelID){
  this.assignedChannels.add(channelID);
}

Fixed version (ground truth):
void addAssignedChannel(final ChannelID channelID){
  if (!this.assignedChannels.add(channelID)) {
    throw new IllegalStateException(channelID + "String_Node_Str");
  }
}
Program: 88193
Project: 88193
Buggy source:
@Override public final synchronized Compressor getCompressor(final AbstractByteBufferedOutputChannel<?> outputChannel) throws CompressionException {
  final OutputGate<?> outputGate=outputChannel.getOutputGate();
  CompressorCacheEntry cacheEntry=this.compressorCache.get(outputGate);
  if (cacheEntry == null) {
    Compressor compressor=initNewCompressor(outputChannel);
    cacheEntry=new CompressorCacheEntry(compressor,outputGate);
    this.compressorCache.put(outputGate,cacheEntry);
    this.compressorMap.put(compressor,outputGate);
  }
  return cacheEntry.getCompressor();
}

Fixed version (ground truth):
@Override public final synchronized Compressor getCompressor(final AbstractByteBufferedOutputChannel<?> outputChannel) throws CompressionException {
  final OutputGate<?> outputGate=outputChannel.getOutputGate();
  CompressorCacheEntry cacheEntry=this.compressorCache.get(outputGate);
  if (cacheEntry == null) {
    Compressor compressor=initNewCompressor(outputChannel);
    cacheEntry=new CompressorCacheEntry(compressor);
    this.compressorCache.put(outputGate,cacheEntry);
    this.compressorMap.put(compressor,outputGate);
  }
  cacheEntry.addAssignedChannel(outputChannel.getID());
  return cacheEntry.getCompressor();
}
Program: 88194
Project: 88194
Buggy source:
@Override public final synchronized Decompressor getDecompressor(final AbstractByteBufferedInputChannel<?> inputChannel) throws CompressionException {
  final InputGate<?> inputGate=inputChannel.getInputGate();
  DecompressorCacheEntry cacheEntry=this.decompressorCache.get(inputGate);
  if (cacheEntry == null) {
    Decompressor decompressor=initNewDecompressor(inputChannel);
    cacheEntry=new DecompressorCacheEntry(decompressor,inputGate);
    this.decompressorCache.put(inputGate,cacheEntry);
    this.decompressorMap.put(decompressor,inputGate);
  }
  return cacheEntry.getDecompressor();
}

Fixed version (ground truth):
@Override public final synchronized Decompressor getDecompressor(final AbstractByteBufferedInputChannel<?> inputChannel) throws CompressionException {
  final InputGate<?> inputGate=inputChannel.getInputGate();
  DecompressorCacheEntry cacheEntry=this.decompressorCache.get(inputGate);
  if (cacheEntry == null) {
    Decompressor decompressor=initNewDecompressor(inputChannel);
    cacheEntry=new DecompressorCacheEntry(decompressor);
    this.decompressorCache.put(inputGate,cacheEntry);
    this.decompressorMap.put(decompressor,inputGate);
  }
  cacheEntry.addAssignedChannel(inputChannel.getID());
  return cacheEntry.getDecompressor();
}
Program: 88195
Project: 88195
Buggy source:
CompressorCacheEntry(final Compressor compressor,final OutputGate<?> outputGate){
  this.compressor=compressor;
  for (int i=0; i < outputGate.getNumberOfOutputChannels(); i++) {
    final AbstractOutputChannel<?> outputChannel=outputGate.getOutputChannel(i);
    addAssignedChannel(outputChannel.getID());
  }
}

Fixed version (ground truth):
CompressorCacheEntry(final Compressor compressor){
  this.compressor=compressor;
}
Program: 88196
Project: 88196
Buggy source:
DecompressorCacheEntry(final Decompressor decompressor,final InputGate<?> inputGate){
  this.decompressor=decompressor;
  for (int i=0; i < inputGate.getNumberOfInputChannels(); i++) {
    final AbstractInputChannel<?> inputChannel=inputGate.getInputChannel(i);
    addAssignedChannel(inputChannel.getID());
  }
}

Fixed version (ground truth):
DecompressorCacheEntry(final Decompressor decompressor){
  this.decompressor=decompressor;
}
Program: 88201
Project: 88201
Buggy source:
@Override public JsonNode evaluate(final JsonNode node,EvaluationContext context){
  if (node.isArray()) {
    if (node instanceof StreamArrayNode)     return new StreamArrayNode(new TransformingIterator<JsonNode,JsonNode>(node.iterator()){
      @Override protected JsonNode transform(      JsonNode inputObject){
        return inputObject.get(FieldAccess.this.field);
      }
    }
);
    ArrayNode arrayNode=new ArrayNode(NODE_FACTORY);
    for (int index=0, size=node.size(); index < size; index++)     arrayNode.add(node.get(index).get(this.field));
    return arrayNode;
  }
  return node.get(this.field);
}

Fixed version (ground truth):
@Override public JsonNode evaluate(final JsonNode node,EvaluationContext context){
  if (node.isArray()) {
    if (node instanceof StreamArrayNode)     return new StreamArrayNode(new ConversionIterator<JsonNode,JsonNode>(node.iterator()){
      @Override protected JsonNode convert(      JsonNode inputObject){
        return inputObject.get(FieldAccess.this.field);
      }
    }
);
    ArrayNode arrayNode=new ArrayNode(NODE_FACTORY);
    for (int index=0, size=node.size(); index < size; index++)     arrayNode.add(node.get(index).get(this.field));
    return arrayNode;
  }
  return node.get(this.field);
}
Program: 88202
Project: 88202
Buggy source:
@Override public Iterator<Evaluable> iterator(){
  return new TransformingIterator<Mapping,Evaluable>(mappings.iterator()){
    @Override protected Evaluable transform(    Mapping inputObject){
      return inputObject.getExpression();
    }
  }
;
}

Fixed version (ground truth):
@Override public Iterator<Evaluable> iterator(){
  return new ConversionIterator<Mapping,Evaluable>(mappings.iterator()){
    @Override protected Evaluable convert(    Mapping inputObject){
      return inputObject.getExpression();
    }
  }
;
}
Program: 88203
Project: 88203
Buggy source:
public static JsonNode union(JsonNode[] params){
  boolean hasStream=false;
  for (  JsonNode param : params) {
    if (!param.isArray())     throw new EvaluationException("String_Node_Str");
    hasStream|=param instanceof StreamArrayNode;
  }
  if (hasStream) {
    @SuppressWarnings("String_Node_Str") Iterator<JsonNode>[] iterators=new Iterator[params.length];
    for (int index=0; index < iterators.length; index++)     iterators[index]=params[index].iterator();
    return new StreamArrayNode(new ConcatenatingIterator<JsonNode>(iterators));
  }
  ArrayNode union=NODE_FACTORY.arrayNode();
  for (  JsonNode param : params)   union.addAll((ArrayNode)param);
  return union;
}

Fixed version (ground truth):
public static JsonNode union(JsonNode[] params){
  boolean hasStream=false;
  for (  JsonNode param : params) {
    if (!param.isArray())     throw new EvaluationException("String_Node_Str");
    hasStream|=param instanceof StreamArrayNode;
  }
  if (hasStream) {
    Iterator<?>[] iterators=new Iterator[params.length];
    for (int index=0; index < iterators.length; index++)     iterators[index]=params[index].iterator();
    return new StreamArrayNode(new ConcatenatingIterator<JsonNode>(iterators));
  }
  ArrayNode union=NODE_FACTORY.arrayNode();
  for (  JsonNode param : params)   union.addAll((ArrayNode)param);
  return union;
}
Program: 88204
Project: 88204
Buggy source:
public int getDistance(Signature actualSignature,Method method){
  Class<?>[] actualParamTypes=actualSignature.parameterTypes;
  int nonVarArgs=this.parameterTypes.length - 1;
  if (nonVarArgs > actualParamTypes.length)   return NO_MATCH;
  int distance=0;
  for (int index=0; index < nonVarArgs; index++) {
    if (!this.parameterTypes[index].isAssignableFrom(actualParamTypes[index]))     return NO_MATCH;
    distance+=ReflectUtil.getDistance(this.parameterTypes[index],actualParamTypes[index]);
  }
  if (nonVarArgs < actualParamTypes.length) {
    Class<?> varargType=this.parameterTypes[nonVarArgs].getComponentType();
    for (int index=nonVarArgs; index < actualParamTypes.length; index++) {
      if (!varargType.isAssignableFrom(actualParamTypes[index]))       return NO_MATCH;
      distance+=ReflectUtil.getDistance(varargType,actualParamTypes[index]) + 1;
    }
  }
  return distance;
}

Fixed version (ground truth):
@Override public int getDistance(Signature actualSignature){
  Class<?>[] actualParamTypes=actualSignature.parameterTypes;
  int nonVarArgs=this.parameterTypes.length - 1;
  if (nonVarArgs > actualParamTypes.length)   return NO_MATCH;
  int distance=0;
  for (int index=0; index < nonVarArgs; index++) {
    if (!this.parameterTypes[index].isAssignableFrom(actualParamTypes[index]))     return NO_MATCH;
    distance+=ReflectUtil.getDistance(this.parameterTypes[index],actualParamTypes[index]);
  }
  if (nonVarArgs < actualParamTypes.length) {
    Class<?> varargType=this.parameterTypes[nonVarArgs].getComponentType();
    for (int index=nonVarArgs; index < actualParamTypes.length; index++) {
      if (!varargType.isAssignableFrom(actualParamTypes[index]))       return NO_MATCH;
      distance+=ReflectUtil.getDistance(varargType,actualParamTypes[index]) + 1;
    }
  }
  return distance;
}
Program: 88205
Project: 88205
Buggy source:
protected abstract T loadNext();

Fixed version (ground truth):
/** 
 * Returns the next element or the result of   {@link #noMoreElements()}.
 * @return the next element
 */
protected abstract T loadNext();
Program: 88206
Project: 88206
Buggy source:
protected boolean isInitialized(){
  return this.initialized;
}

Fixed version (ground truth):
/** 
 * Return true if at least one element has been loaded.
 * @return true if at least one element has been loaded
 */
protected boolean isInitialized(){
  return this.initialized;
}
Program: 88207
Project: 88207
Buggy source:
protected T noMoreElements(){
  this.hasNext=false;
  return null;
}

Fixed version (ground truth):
/** 
 * Signal methods that should be invoked when no more elements are in the iterator.
 * @return a signal that no more elements are in this iterator
 */
protected T noMoreElements(){
  this.hasNext=false;
  return null;
}
Program: 88208
Project: 88208
Buggy source:
public ConcatenatingIterator(Iterator<T>... inputs){
  this.inputs=new LinkedList<Iterator<T>>(Arrays.asList(inputs));
}

Fixed version (ground truth):
/** 
 * Initializes a ConcatenatingIterator with an array of iterators. This constructor is not type-safe.
 * @param iterators the iterators to concatenate
 */
@SuppressWarnings("String_Node_Str") public ConcatenatingIterator(Iterator<?>... iterators){
  this.inputs=new LinkedList<Iterator<? extends T>>((Collection<? extends Iterator<? extends T>>)Arrays.asList(iterators));
}
Program: 88209
Project: 88209
Buggy source:
@Override protected T loadNext(){
  while (!this.inputs.isEmpty()) {
    Iterator<T> iterator=this.inputs.getFirst();
    if (!iterator.hasNext())     this.inputs.pop();
 else     return iterator.next();
  }
  return this.noMoreElements();
}

Fixed version (ground truth):
@Override protected T loadNext(){
  while (!this.inputs.isEmpty()) {
    Iterator<? extends T> iterator=this.inputs.getFirst();
    if (!iterator.hasNext())     this.inputs.pop();
 else     return iterator.next();
  }
  return this.noMoreElements();
}
Program: 88210
Project: 88210
Buggy source:
public OneElementList(E element){
  this.element=element;
}

Fixed version (ground truth):
/** 
 * Initializes OneElementList with the given element.
 * @param element the element to wrap
 */
public OneElementList(E element){
  this.element=element;
}
Program: 88211
Project: 88211
Buggy source:
@Override public void write(final DataOutput out) throws IOException {
  final int maxBit=0x1 << 7;
  int len=this.value.length();
  while (len >= maxBit) {
    out.write(len | maxBit);
    len>>=7;
  }
  out.write(len);
  for (int i=0; i < this.value.length(); i++) {
    int c=this.value.charAt(i);
    if (c < maxBit)     out.write(c);
 else     while (c >= maxBit) {
      out.write(c | maxBit);
      c>>=7;
    }
  }
}

Fixed version (ground truth):
@Override public void write(final DataOutput out) throws IOException {
  final int maxBit=0x1 << 7;
  int len=this.value.length();
  while (len >= maxBit) {
    out.write(len | maxBit);
    len>>=7;
  }
  out.write(len);
  for (int i=0; i < this.value.length(); i++) {
    int c=this.value.charAt(i);
    while (c >= maxBit) {
      out.write(c | maxBit);
      c>>=7;
    }
    out.write(c);
  }
}
Program: 88212
Project: 88212
Buggy source:
@Test public void testPactString(){
  PactString string0=new PactString("String_Node_Str");
  Assert.assertEquals("String_Node_Str",string0.toString());
  PactString string1=new PactString("String_Node_Str");
  PactString string2=new PactString("String_Node_Str");
  PactString string3=new PactString("String_Node_Str");
  Assert.assertTrue(string0.compareTo(string0) == 0);
  Assert.assertTrue(string0.compareTo(string1) == 0);
  Assert.assertTrue(string0.compareTo(string2) > 0);
  Assert.assertTrue(string0.compareTo(string3) < 0);
  try {
    string0.write(mOut);
    string2.write(mOut);
    string3.write(mOut);
    PactString string1n=new PactString();
    PactString string2n=new PactString();
    PactString string3n=new PactString();
    string1n.read(mIn);
    string2n.read(mIn);
    string3n.read(mIn);
    Assert.assertEquals(string0.compareTo(string1n),0);
    Assert.assertEquals(string0.toString(),string1n.toString());
    Assert.assertEquals(string2.compareTo(string2n),0);
    Assert.assertEquals(string2.toString(),string2n.toString());
    Assert.assertEquals(string3.compareTo(string3n),0);
    Assert.assertEquals(string3.toString(),string3n.toString());
  }
 catch (  Exception e) {
    Assert.assertTrue(false);
  }
}

Fixed version (ground truth):
@Test public void testPactString(){
  PactString string0=new PactString("String_Node_Str");
  Assert.assertEquals("String_Node_Str",string0.toString());
  PactString string1=new PactString("String_Node_Str");
  PactString string2=new PactString("String_Node_Str");
  PactString string3=new PactString("String_Node_Str");
  PactString string4=new PactString("String_Node_Str");
  Assert.assertTrue(string0.compareTo(string0) == 0);
  Assert.assertTrue(string0.compareTo(string1) == 0);
  Assert.assertTrue(string0.compareTo(string2) > 0);
  Assert.assertTrue(string0.compareTo(string3) < 0);
  try {
    string0.write(mOut);
    string4.write(mOut);
    string2.write(mOut);
    string3.write(mOut);
    PactString string1n=new PactString();
    PactString string2n=new PactString();
    PactString string3n=new PactString();
    PactString string4n=new PactString();
    string1n.read(mIn);
    string4n.read(mIn);
    string2n.read(mIn);
    string3n.read(mIn);
    Assert.assertEquals(string0.compareTo(string1n),0);
    Assert.assertEquals(string0.toString(),string1n.toString());
    Assert.assertEquals(string4.compareTo(string4n),0);
    Assert.assertEquals(string4.toString(),string4n.toString());
    Assert.assertEquals(string2.compareTo(string2n),0);
    Assert.assertEquals(string2.toString(),string2n.toString());
    Assert.assertEquals(string3.compareTo(string3n),0);
    Assert.assertEquals(string3.toString(),string3n.toString());
  }
 catch (  Exception e) {
    Assert.assertTrue(false);
  }
}
Program: 88213
Project: 88213
Buggy source:
@Override public InstanceType getDefaultInstanceType(){
  return DEFAULT;
}

Fixed version (ground truth):
@Override public InstanceType getDefaultInstanceType(){
  return DEFAULT_INSTANCE_TYPE;
}
Program: 88214
Project: 88214
Buggy source:
@Override public InstanceType getInstanceTypeByName(final String instanceTypeName){
  return DEFAULT;
}

Fixed version (ground truth):
@Override public InstanceType getInstanceTypeByName(final String instanceTypeName){
  return DEFAULT_INSTANCE_TYPE;
}
Program: 88215
Project: 88215
Buggy source:
@Override public InstanceType getSuitableInstanceType(final int minNumComputeUnits,final int minNumCPUCores,final int minMemorySize,final int minDiskCapacity,final int maxPricePerHour){
  return DEFAULT;
}

Fixed version (ground truth):
@Override public InstanceType getSuitableInstanceType(final int minNumComputeUnits,final int minNumCPUCores,final int minMemorySize,final int minDiskCapacity,final int maxPricePerHour){
  return DEFAULT_INSTANCE_TYPE;
}
Program: 88216
Project: 88216
Buggy source:
private void assignMemory(final TaskConfig config,final int memSize){
  config.setMemorySize(((long)memSize) * 1024L * 1024L);
  config.setNumFilehandles(DEFAUTL_MERGE_FACTOR);
}

Fixed version (ground truth):
private void assignMemory(final TaskConfig config,final int memSize){
  config.setMemorySize(memSize * 1024L * 1024L);
  config.setNumFilehandles(DEFAUTL_MERGE_FACTOR);
}