Program: 88308
Project: 88308
Buggy source:
/** 
 * @param connection
 * @param outputVertex
 * @param inputVertex
 * @throws JobGraphDefinitionException
 * @throws CompilerException
 */
private void connectJobVertices(PactConnection connection,AbstractJobVertex outputVertex,AbstractJobVertex inputVertex) throws JobGraphDefinitionException, CompilerException {
  ChannelType channelType=null;
switch (connection.getShipStrategy()) {
case FORWARD:
    channelType=ChannelType.INMEMORY;
  break;
case PARTITION_HASH:
channelType=ChannelType.NETWORK;
break;
case BROADCAST:
channelType=ChannelType.NETWORK;
break;
case SFR:
channelType=ChannelType.NETWORK;
break;
}
TaskConfig outputConfig=new TaskConfig(outputVertex.getConfiguration());
TaskConfig inputConfig=new TaskConfig(inputVertex.getConfiguration());
TaskConfig tempConfig=null;
switch (connection.getTempMode()) {
case NONE:
outputVertex.connectTo(inputVertex,channelType,CompressionLevel.NO_COMPRESSION);
outputConfig.addOutputShipStrategy(connection.getShipStrategy());
inputConfig.addInputShipStrategy(connection.getShipStrategy());
break;
case TEMP_SENDER_SIDE:
int pd=connection.getSourcePact().getDegreeOfParallelism();
JobTaskVertex tempVertex=generateTempVertex((Class<? extends Stub<?,?>>)connection.getSourcePact().getPactContract().getStubClass(),pd);
outputVertex.connectTo(tempVertex,ChannelType.INMEMORY,CompressionLevel.NO_COMPRESSION);
tempVertex.connectTo(inputVertex,channelType,CompressionLevel.NO_COMPRESSION);
tempConfig=new TaskConfig(tempVertex.getConfiguration());
outputConfig.addOutputShipStrategy(ShipStrategy.FORWARD);
tempConfig.addInputShipStrategy(ShipStrategy.FORWARD);
tempConfig.addOutputShipStrategy(connection.getShipStrategy());
inputConfig.addInputShipStrategy(connection.getShipStrategy());
break;
case TEMP_RECEIVER_SIDE:
int pdr=connection.getTargetPact().getDegreeOfParallelism();
tempVertex=generateTempVertex((Class<? extends Stub<?,?>>)connection.getSourcePact().getPactContract().getStubClass(),pdr);
outputVertex.connectTo(tempVertex,channelType,CompressionLevel.NO_COMPRESSION);
tempVertex.connectTo(inputVertex,ChannelType.INMEMORY,CompressionLevel.NO_COMPRESSION);
tempConfig=new TaskConfig(tempVertex.getConfiguration());
outputConfig.addOutputShipStrategy(connection.getShipStrategy());
tempConfig.addInputShipStrategy(connection.getShipStrategy());
tempConfig.addOutputShipStrategy(ShipStrategy.FORWARD);
inputConfig.addInputShipStrategy(ShipStrategy.FORWARD);
break;
default :
throw new CompilerException("String_Node_Str" + connection.getTempMode());
}
}

Fixed version (ground truth):
/** 
 * @param connection
 * @param outputVertex
 * @param inputVertex
 * @throws JobGraphDefinitionException
 * @throws CompilerException
 */
private void connectJobVertices(PactConnection connection,AbstractJobVertex outputVertex,AbstractJobVertex inputVertex) throws JobGraphDefinitionException, CompilerException {
  ChannelType channelType=null;
switch (connection.getShipStrategy()) {
case FORWARD:
case PARTITION_LOCAL_HASH:
    channelType=ChannelType.INMEMORY;
  break;
case PARTITION_HASH:
case BROADCAST:
case SFR:
channelType=ChannelType.NETWORK;
break;
default :
throw new IllegalArgumentException("String_Node_Str" + connection.getShipStrategy().name());
}
TaskConfig outputConfig=new TaskConfig(outputVertex.getConfiguration());
TaskConfig inputConfig=new TaskConfig(inputVertex.getConfiguration());
TaskConfig tempConfig=null;
switch (connection.getTempMode()) {
case NONE:
outputVertex.connectTo(inputVertex,channelType,CompressionLevel.NO_COMPRESSION);
outputConfig.addOutputShipStrategy(connection.getShipStrategy());
inputConfig.addInputShipStrategy(connection.getShipStrategy());
break;
case TEMP_SENDER_SIDE:
int pd=connection.getSourcePact().getDegreeOfParallelism();
JobTaskVertex tempVertex=generateTempVertex((Class<? extends Stub<?,?>>)connection.getSourcePact().getPactContract().getStubClass(),pd);
outputVertex.connectTo(tempVertex,ChannelType.INMEMORY,CompressionLevel.NO_COMPRESSION);
tempVertex.connectTo(inputVertex,channelType,CompressionLevel.NO_COMPRESSION);
tempConfig=new TaskConfig(tempVertex.getConfiguration());
outputConfig.addOutputShipStrategy(ShipStrategy.FORWARD);
tempConfig.addInputShipStrategy(ShipStrategy.FORWARD);
tempConfig.addOutputShipStrategy(connection.getShipStrategy());
inputConfig.addInputShipStrategy(connection.getShipStrategy());
break;
case TEMP_RECEIVER_SIDE:
int pdr=connection.getTargetPact().getDegreeOfParallelism();
tempVertex=generateTempVertex((Class<? extends Stub<?,?>>)connection.getSourcePact().getPactContract().getStubClass(),pdr);
outputVertex.connectTo(tempVertex,channelType,CompressionLevel.NO_COMPRESSION);
tempVertex.connectTo(inputVertex,ChannelType.INMEMORY,CompressionLevel.NO_COMPRESSION);
tempConfig=new TaskConfig(tempVertex.getConfiguration());
outputConfig.addOutputShipStrategy(connection.getShipStrategy());
tempConfig.addInputShipStrategy(connection.getShipStrategy());
tempConfig.addOutputShipStrategy(ShipStrategy.FORWARD);
inputConfig.addInputShipStrategy(ShipStrategy.FORWARD);
break;
default :
throw new CompilerException("String_Node_Str" + connection.getTempMode());
}
}