Program: 55795
Project: 55795
Buggy source:
/** 
 * Returns a CoGroupTaskIterator according to the specified local strategy. The iterator is typed according to the given classes.
 * @param < K > The type of the input key.
 * @param < V1 > The type of the first input's value.
 * @param < V2 > The type of the second input's value.
 * @param ikClass The class of the input key.
 * @param iv1Class The class of the first input's value.
 * @param iv2Class The class of the second input's value.
 * @return The iterator implementation for the given local strategy.
 * @throws IllegalConfigurationException Thrown if the local strategy is not supported.
 */
private <K extends Key,V1 extends Value,V2 extends Value>CoGroupTaskIterator<K,V1,V2> getIterator(Class<K> ikClass,Class<V1> iv1Class,Class<V2> iv2Class){
  final MemoryManager memoryManager=getEnvironment().getMemoryManager();
  final IOManager ioManager=getEnvironment().getIOManager();
  RecordReader<KeyValuePair<K,V1>> reader1=getReader1();
  RecordReader<KeyValuePair<K,V2>> reader2=getReader2();
switch (this.config.getLocalStrategy()) {
case SORT_BOTH_MERGE:
    return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case SORT_FIRST_MERGE:
  return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case SORT_SECOND_MERGE:
return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case MERGE:
return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
default :
throw new RuntimeException("String_Node_Str" + this.config.getLocalStrategy());
}
}

Fixed version (ground truth):
/** 
 * Returns a CoGroupTaskIterator according to the specified local strategy. The iterator is typed according to the given classes.
 * @param < K > The type of the input key.
 * @param < V1 > The type of the first input's value.
 * @param < V2 > The type of the second input's value.
 * @param ikClass The class of the input key.
 * @param iv1Class The class of the first input's value.
 * @param iv2Class The class of the second input's value.
 * @return The iterator implementation for the given local strategy.
 * @throws IllegalConfigurationException Thrown if the local strategy is not supported.
 */
private <K extends Key,V1 extends Value,V2 extends Value>CoGroupTaskIterator<K,V1,V2> getIterator(Class<K> ikClass,Class<V1> iv1Class,Class<V2> iv2Class){
  final MemoryManager memoryManager=getEnvironment().getMemoryManager();
  final IOManager ioManager=getEnvironment().getIOManager();
  Reader<KeyValuePair<K,V1>> reader1=getReader1();
  Reader<KeyValuePair<K,V2>> reader2=getReader2();
switch (this.config.getLocalStrategy()) {
case SORT_BOTH_MERGE:
    return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case SORT_FIRST_MERGE:
  return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case SORT_SECOND_MERGE:
return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
case MERGE:
return new SortMergeCoGroupIterator<K,V1,V2>(memoryManager,ioManager,reader1,reader2,ikClass,iv1Class,iv2Class,this.availableMemory,this.maxFileHandles,this.spillThreshold,this.config.getLocalStrategy(),this);
default :
throw new RuntimeException("String_Node_Str" + this.config.getLocalStrategy());
}
}