Program: 55139
Project: 55139
Buggy source:
/** 
 * Executes a specific run of the job.
 * @param run the run of the job
 * @param throughputWriter writer object to write the throughput results for each run
 * @param durationWriter writer object to write the duration results for each run
 */
private static void runJob(final int run,final BufferedWriter throughputWriter,final BufferedWriter durationWriter) throws JobGraphDefinitionException, IOException, JobExecutionException {
  final JobGraph jobGraph=new JobGraph("String_Node_Str" + run + "String_Node_Str");
  final JobInputVertex producer=new JobInputVertex("String_Node_Str",jobGraph);
  producer.setInputClass(BroadcastProducer.class);
  producer.setInstanceType(INSTANCE_TYPE);
  producer.getConfiguration().setInteger(BroadcastProducer.NUMBER_OF_RECORDS_KEY,NUMBER_OF_RECORDS);
  producer.getConfiguration().setInteger(BroadcastProducer.RUN_KEY,run);
  producer.setNumberOfSubtasks(1);
  producer.setNumberOfSubtasksPerInstance(1);
  final JobOutputVertex consumer=new JobOutputVertex("String_Node_Str",jobGraph);
  consumer.setOutputClass(BroadcastConsumer.class);
  consumer.setNumberOfSubtasks(NUMBER_OF_CONSUMERS);
  consumer.setNumberOfSubtasksPerInstance(1);
  consumer.setInstanceType(INSTANCE_TYPE);
  consumer.getConfiguration().setInteger(BroadcastProducer.RUN_KEY,run);
  consumer.getConfiguration().setString(BroadcastConsumer.OUTPUT_PATH_KEY,OUTPUT_PATH);
  consumer.getConfiguration().setString(BroadcastConsumer.TOPOLOGY_TREE_KEY,TOPOLOGY_TREE);
  consumer.getConfiguration().setString(BroadcastConsumer.INSTANCE_TYPE_KEY,INSTANCE_TYPE);
  consumer.getConfiguration().setInteger(BroadcastProducer.NUMBER_OF_RECORDS_KEY,NUMBER_OF_RECORDS);
  producer.connectTo(consumer,ChannelType.NETWORK);
  jobGraph.addJar(new Path("String_Node_Str" + JAR_FILE.getAbsolutePath()));
  Configuration conf=new Configuration();
  conf.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY,JOB_MANAGER_ADDRESS);
  conf.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT);
  final JobClient jobClient=new JobClient(jobGraph,conf);
  final long jobDuration=jobClient.submitJobAndWait();
  final long numberOfBytesSent=(long)BroadcastRecord.RECORD_SIZE * (long)NUMBER_OF_RECORDS * (long)NUMBER_OF_CONSUMERS;
  final double throughput=(double)(numberOfBytesSent * 1000L * 8L) / (double)(jobDuration * 1024L * 1024L);
  throughputWriter.write(throughput + "String_Node_Str");
  durationWriter.write(jobDuration + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Executes a specific run of the job.
 * @param run the run of the job
 * @param throughputWriter writer object to write the throughput results for each run
 * @param durationWriter writer object to write the duration results for each run
 */
private static void runJob(final int run,final BufferedWriter throughputWriter,final BufferedWriter durationWriter) throws JobGraphDefinitionException, IOException, JobExecutionException {
  final JobGraph jobGraph=new JobGraph("String_Node_Str" + run + "String_Node_Str");
  final JobInputVertex producer=new JobInputVertex("String_Node_Str",jobGraph);
  producer.setInputClass(BroadcastProducer.class);
  producer.setInstanceType(INSTANCE_TYPE);
  producer.getConfiguration().setInteger(BroadcastProducer.NUMBER_OF_RECORDS_KEY,NUMBER_OF_RECORDS);
  producer.getConfiguration().setInteger(BroadcastProducer.RUN_KEY,run);
  producer.setNumberOfSubtasks(1);
  producer.setNumberOfSubtasksPerInstance(1);
  final JobOutputVertex consumer=new JobOutputVertex("String_Node_Str",jobGraph);
  consumer.setOutputClass(BroadcastConsumer.class);
  consumer.setNumberOfSubtasks(NUMBER_OF_CONSUMERS);
  consumer.setNumberOfSubtasksPerInstance(1);
  consumer.setInstanceType(INSTANCE_TYPE);
  consumer.getConfiguration().setInteger(BroadcastProducer.RUN_KEY,run);
  consumer.getConfiguration().setString(BroadcastConsumer.OUTPUT_PATH_KEY,OUTPUT_PATH);
  consumer.getConfiguration().setString(BroadcastConsumer.TOPOLOGY_TREE_KEY,TOPOLOGY_TREE);
  consumer.getConfiguration().setString(BroadcastConsumer.INSTANCE_TYPE_KEY,INSTANCE_TYPE);
  consumer.getConfiguration().setInteger(BroadcastProducer.NUMBER_OF_RECORDS_KEY,NUMBER_OF_RECORDS);
  producer.connectTo(consumer,ChannelType.NETWORK);
  jobGraph.addJar(new Path(JAR_FILE.toURI().toString()));
  Configuration conf=new Configuration();
  conf.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY,JOB_MANAGER_ADDRESS);
  conf.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT);
  final JobClient jobClient=new JobClient(jobGraph,conf);
  final long jobDuration=jobClient.submitJobAndWait();
  final long numberOfBytesSent=(long)BroadcastRecord.RECORD_SIZE * (long)NUMBER_OF_RECORDS * (long)NUMBER_OF_CONSUMERS;
  final double throughput=(double)(numberOfBytesSent * 1000L * 8L) / (double)(jobDuration * 1024L * 1024L);
  throughputWriter.write(throughput + "String_Node_Str");
  durationWriter.write(jobDuration + "String_Node_Str");
}