Program: 38004
Project: 38004
Buggy source:
@Test @Ignore public void BasicSwitchPortEventsTest() throws Exception {
  System.out.println("String_Node_Str");
  String sw1_up=OFEMessageUtils.createSwitchDataMessage(OFEMessageUtils.SWITCH_UP,"String_Node_Str");
  String sw2_up=OFEMessageUtils.createSwitchDataMessage(OFEMessageUtils.SWITCH_UP,"String_Node_Str");
  String sw1p1_up=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_UP,"String_Node_Str","String_Node_Str");
  String sw2p2_up=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_UP,"String_Node_Str","String_Node_Str");
  String sw2p2_down=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_DOWN,"String_Node_Str","String_Node_Str");
  String switch_topic=InfoEventSplitterBolt.I_SWITCH_UPDOWN;
  String port_topic=InfoEventSplitterBolt.I_PORT_UPDOWN;
  kProducer.pushMessage(switch_topic,sw1_up);
  kProducer.pushMessage(switch_topic,sw2_up);
  kProducer.pushMessage(port_topic,sw1p1_up);
  kProducer.pushMessage(port_topic,sw2p2_up);
  kProducer.pushMessage(switch_topic,sw1_up);
  kProducer.pushMessage(switch_topic,sw2_up);
  kProducer.pushMessage(port_topic,sw1p1_up);
  kProducer.pushMessage(port_topic,sw2p2_up);
  Utils.sleep(4 * 1000);
  messagesExpected=8;
  messagesReceived=safeLinesCount(discoFiler.getFiler().getFile());
  Assert.assertEquals(messagesExpected,messagesReceived);
  Utils.sleep(1 * 1000);
  kProducer.pushMessage(port_topic,sw2p2_down);
  Utils.sleep(2 * 1000);
  messagesReceived=safeLinesCount(discoFiler.getFiler().getFile());
  if (messagesReceived == 0) {
    System.out.println("String_Node_Str");
    for (    String s : Files.readLines(discoFiler.getFiler().getFile(),Charsets.UTF_8)) {
      System.out.println("String_Node_Str" + s);
    }
  }
  Assert.assertTrue(messagesReceived > 0);
  cluster.killTopology(manager.makeTopologyName());
  cluster.killTopology("String_Node_Str");
  Utils.sleep(4 * 1000);
}

Fixed version (ground truth):
@Test @Ignore public void BasicSwitchPortEventsTest() throws Exception {
  System.out.println("String_Node_Str");
  OFEventWFMTopology manager=new OFEventWFMTopology(makeLaunchEnvironment());
  TopologyConfig config=manager.getConfig();
  String sw1_up=OFEMessageUtils.createSwitchDataMessage(OFEMessageUtils.SWITCH_UP,"String_Node_Str");
  String sw2_up=OFEMessageUtils.createSwitchDataMessage(OFEMessageUtils.SWITCH_UP,"String_Node_Str");
  String sw1p1_up=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_UP,"String_Node_Str","String_Node_Str");
  String sw2p2_up=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_UP,"String_Node_Str","String_Node_Str");
  String sw2p2_down=OFEMessageUtils.createPortDataMessage(OFEMessageUtils.PORT_DOWN,"String_Node_Str","String_Node_Str");
  String switch_topic=config.getKafkaTopoDiscoTopic();
  String port_topic=config.getKafkaTopoDiscoTopic();
  kProducer.pushMessage(switch_topic,sw1_up);
  kProducer.pushMessage(switch_topic,sw2_up);
  kProducer.pushMessage(port_topic,sw1p1_up);
  kProducer.pushMessage(port_topic,sw2p2_up);
  kProducer.pushMessage(switch_topic,sw1_up);
  kProducer.pushMessage(switch_topic,sw2_up);
  kProducer.pushMessage(port_topic,sw1p1_up);
  kProducer.pushMessage(port_topic,sw2p2_up);
  Utils.sleep(4 * 1000);
  messagesExpected=8;
  messagesReceived=safeLinesCount(discoFiler.getFiler().getFile());
  Assert.assertEquals(messagesExpected,messagesReceived);
  Utils.sleep(1 * 1000);
  kProducer.pushMessage(port_topic,sw2p2_down);
  Utils.sleep(2 * 1000);
  messagesReceived=safeLinesCount(discoFiler.getFiler().getFile());
  if (messagesReceived == 0) {
    System.out.println("String_Node_Str");
    for (    String s : Files.readLines(discoFiler.getFiler().getFile(),Charsets.UTF_8)) {
      System.out.println("String_Node_Str" + s);
    }
  }
  Assert.assertTrue(messagesReceived > 0);
  cluster.killTopology(manager.makeTopologyName());
  cluster.killTopology("String_Node_Str");
  Utils.sleep(4 * 1000);
}