nus-yam/ex-repair huggingface dataset:
Program: 38003
Project: 38003
Buggy source:
/** 
 * Runs test case.
 * @param value       data string from json resource file
 * @param flowCommand OFFlowAdd instance to compare result with
 * @throws InterruptedException if test was interrupted during run
 */
private void runTest(final String value,final OFFlowAdd flowCommand,final OFMeterMod meterCommand,final OFFlowAdd reverseFlowCommand,final OFMeterMod reverseMeterCommand) throws InterruptedException {
  ConsumerRecord<String,String> record=new ConsumerRecord<>("String_Node_Str",0,0,"String_Node_Str",value);
  KafkaMessageCollector.ParseRecord parseRecord=collector.new ParseRecord(record);
  Capture<OFFlowAdd> flowAddCapture=flowCommand == null ? null : newCapture(CaptureType.ALL);
  Capture<OFMeterMod> meterAddCapture=meterCommand == null ? null : newCapture(CaptureType.ALL);
  prepareMocks(flowAddCapture,meterAddCapture,reverseFlowCommand != null,reverseMeterCommand != null);
  parseRecordExecutor.execute(parseRecord);
  parseRecordExecutor.shutdown();
  parseRecordExecutor.awaitTermination(10,TimeUnit.SECONDS);
  if (meterCommand != null) {
    assertEquals(meterCommand,meterAddCapture.getValues().get(0));
    if (reverseMeterCommand != null) {
      assertEquals(reverseMeterCommand,meterAddCapture.getValues().get(1));
    }
  }
  if (flowCommand != null) {
    assertEquals(flowCommand,flowAddCapture.getValues().get(0));
    if (reverseFlowCommand != null) {
      assertEquals(reverseFlowCommand,flowAddCapture.getValues().get(1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Runs test case.
 * @param value       data string from json resource file
 * @param flowCommand OFFlowAdd instance to compare result with
 * @throws InterruptedException if test was interrupted during run
 */
private void runTest(final String value,final OFFlowAdd flowCommand,final OFMeterMod meterCommand,final OFFlowAdd reverseFlowCommand,final OFMeterMod reverseMeterCommand) throws InterruptedException {
  ConsumerRecord<String,String> record=new ConsumerRecord<>("String_Node_Str",0,0,"String_Node_Str",value);
  KafkaMessageCollector.ParseRecord parseRecord=collector.new ParseRecord(record);
  Capture<OFFlowAdd> flowAddCapture=flowCommand == null ? null : newCapture(CaptureType.ALL);
  Capture<OFMeterMod> meterAddCapture=meterCommand == null ? null : newCapture(CaptureType.ALL);
  prepareMocks(flowAddCapture,meterAddCapture,reverseFlowCommand != null,reverseMeterCommand != null);
  parseRecordExecutor.execute(parseRecord);
  parseRecordExecutor.shutdown();
  parseRecordExecutor.awaitTermination(10,TimeUnit.SECONDS);
  if (meterCommand != null) {
    System.out.println("String_Node_Str" + meterCommand);
    System.out.println("String_Node_Str" + meterAddCapture.getValues());
    assertEquals(meterCommand,meterAddCapture.getValues().get(0));
    if (reverseMeterCommand != null) {
      assertEquals(reverseMeterCommand,meterAddCapture.getValues().get(1));
    }
  }
  if (flowCommand != null) {
    assertEquals(flowCommand,flowAddCapture.getValues().get(0));
    if (reverseFlowCommand != null) {
      assertEquals(reverseFlowCommand,flowAddCapture.getValues().get(1));
    }
  }
}
Program: 38006
Project: 38006
Buggy source:
private void initMocks(){
  Fields switchSchema=new Fields(OFEMessageUtils.FIELD_SWITCH_ID,OFEMessageUtils.FIELD_STATE);
  when(topologyContext.getComponentId(0)).thenReturn(InfoEventSplitterBolt.I_SWITCH_UPDOWN);
  when(topologyContext.getComponentOutputFields(InfoEventSplitterBolt.I_SWITCH_UPDOWN,InfoEventSplitterBolt.I_SWITCH_UPDOWN)).thenReturn(switchSchema);
  Fields portSchema=new Fields(OFEMessageUtils.FIELD_SWITCH_ID,OFEMessageUtils.FIELD_PORT_ID,OFEMessageUtils.FIELD_STATE);
  when(topologyContext.getComponentId(1)).thenReturn(InfoEventSplitterBolt.I_PORT_UPDOWN);
  when(topologyContext.getComponentOutputFields(InfoEventSplitterBolt.I_PORT_UPDOWN,InfoEventSplitterBolt.I_PORT_UPDOWN)).thenReturn(portSchema);
  Fields tickSchema=new Fields();
  when(topologyContext.getComponentId(2)).thenReturn(Constants.SYSTEM_COMPONENT_ID);
  when(topologyContext.getComponentOutputFields(Constants.SYSTEM_COMPONENT_ID,Constants.SYSTEM_TICK_STREAM_ID)).thenReturn(tickSchema);
  Fields islSchema=new Fields(InfoEventSplitterBolt.I_ISL_UPDOWN);
  when(topologyContext.getComponentId(3)).thenReturn(InfoEventSplitterBolt.I_ISL_UPDOWN);
  when(topologyContext.getComponentOutputFields(InfoEventSplitterBolt.I_ISL_UPDOWN,InfoEventSplitterBolt.I_ISL_UPDOWN)).thenReturn(islSchema);
  when(topologyContext.getComponentId(4)).thenReturn(OFEventWFMTopology.SPOUT_ID_INPUT);
  when(topologyContext.getComponentOutputFields(OFEventWFMTopology.SPOUT_ID_INPUT,AbstractTopology.MESSAGE_FIELD)).thenReturn(AbstractTopology.fieldMessage);
}

Fixed version (ground truth):
private void initMocks(String topo_input_topic){
  Fields switchSchema=new Fields(OFEMessageUtils.FIELD_SWITCH_ID,OFEMessageUtils.FIELD_STATE);
  when(topologyContext.getComponentId(0)).thenReturn(topo_input_topic);
  when(topologyContext.getComponentOutputFields(topo_input_topic,topo_input_topic)).thenReturn(switchSchema);
  Fields portSchema=new Fields(OFEMessageUtils.FIELD_SWITCH_ID,OFEMessageUtils.FIELD_PORT_ID,OFEMessageUtils.FIELD_STATE);
  when(topologyContext.getComponentId(1)).thenReturn(topo_input_topic);
  when(topologyContext.getComponentOutputFields(topo_input_topic,topo_input_topic)).thenReturn(portSchema);
  Fields tickSchema=new Fields();
  when(topologyContext.getComponentId(2)).thenReturn(Constants.SYSTEM_COMPONENT_ID);
  when(topologyContext.getComponentOutputFields(Constants.SYSTEM_COMPONENT_ID,Constants.SYSTEM_TICK_STREAM_ID)).thenReturn(tickSchema);
  Fields islSchema=new Fields(topo_input_topic);
  when(topologyContext.getComponentId(3)).thenReturn(topo_input_topic);
  when(topologyContext.getComponentOutputFields(topo_input_topic,topo_input_topic)).thenReturn(islSchema);
  when(topologyContext.getComponentId(4)).thenReturn(OFEventWFMTopology.SPOUT_ID_INPUT);
  when(topologyContext.getComponentOutputFields(OFEventWFMTopology.SPOUT_ID_INPUT,AbstractTopology.MESSAGE_FIELD)).thenReturn(AbstractTopology.fieldMessage);
}
Program: 38007
Project: 38007
Buggy source:
@BeforeClass public static void setupOnce() throws Exception {
  System.out.println("String_Node_Str");
  makeConfigFile();
  server=new TestUtils.KafkaTestFixture(makeUnboundConfig());
  server.start();
  cluster=new LocalCluster();
  kProducer=new TestKafkaProducer(kafkaProperties());
}

Fixed version (ground truth):
@BeforeClass public static void setupOnce() throws Exception {
  System.out.println("String_Node_Str");
  clusterParam=new MkClusterParam();
  clusterParam.setSupervisors(1);
  Config daemonConfig=new Config();
  daemonConfig.put(Config.STORM_LOCAL_MODE_ZMQ,false);
  clusterParam.setDaemonConf(daemonConfig);
  makeConfigFile();
  Config conf=new Config();
  conf.setNumWorkers(1);
  completeTopologyParam=new CompleteTopologyParam();
  completeTopologyParam.setStormConf(conf);
}
Program: 38008
Project: 38008
Buggy source:
@Override public void execute(Tuple tuple){
  try {
    String tupleSource=tuple.getSourceComponent();
switch (tupleSource) {
case SimulatorTopology.SIMULATOR_SPOUT:
      doCommand(tuple);
    break;
default :
  logger.error("String_Node_Str",tupleSource);
}
}
 catch (Exception e) {
logger.error(e);
}
 finally {
collector.ack(tuple);
}
}

Fixed version (ground truth):
@Override public void execute(Tuple tuple){
  try {
    String tupleSource=tuple.getSourceComponent();
switch (tupleSource) {
case SimulatorTopology.SIMULATOR_SPOUT:
      doCommand(tuple);
    break;
default :
  logger.error("String_Node_Str",tupleSource);
}
}
 catch (Exception e) {
logger.error(e.toString());
}
 finally {
collector.ack(tuple);
}
}
Program: 38009
Project: 38009
Buggy source:
protected List<Values> addSwitch(SwitchMessage switchMessage) throws Exception {
  ISwitchImpl sw=switches.get(switchMessage.getDpid());
  List<Values> values=new ArrayList<>();
  if (sw == null) {
    logger.info("String_Node_Str");
    sw=new ISwitchImpl(switchMessage.getDpid(),switchMessage.getNumOfPorts(),PortStateType.DOWN);
    sw.activate();
    List<LinkMessage> links=switchMessage.getLinks();
    for (    LinkMessage l : links) {
      IPortImpl localPort=sw.getPort(l.getLocalPort());
      localPort.setLatency(l.getLatency());
      localPort.setPeerPortNum(l.getPeerPort());
      localPort.setPeerSwitch(l.getPeerSwitch());
      localPort.enable();
    }
    switches.put(sw.getDpid().toString(),sw);
    values.add(new Values("String_Node_Str",makeSwitchMessage(sw,SwitchState.ADDED)));
    values.add(new Values("String_Node_Str",makeSwitchMessage(sw,SwitchState.ACTIVATED)));
    for (    IPortImpl p : sw.getPorts()) {
      PortChangeType changeType=p.isActive() ? PortChangeType.UP : PortChangeType.DOWN;
      values.add(new Values("String_Node_Str",makePortMessage(sw,p.getNumber(),changeType)));
    }
  }
  return values;
}

Fixed version (ground truth):
protected List<Values> addSwitch(SwitchMessage switchMessage) throws Exception {
  ISwitchImpl sw=switches.get(switchMessage.getDpid());
  List<Values> values=new ArrayList<>();
  if (sw == null) {
    logger.info("String_Node_Str");
    sw=new ISwitchImpl(switchMessage.getDpid(),switchMessage.getNumOfPorts(),PortStateType.DOWN);
    sw.activate();
    List<LinkMessage> links=switchMessage.getLinks();
    for (    LinkMessage l : links) {
      IPortImpl localPort=sw.getPort(l.getLocalPort());
      localPort.setLatency(l.getLatency());
      localPort.setPeerPortNum(l.getPeerPort());
      localPort.setPeerSwitch(l.getPeerSwitch());
      localPort.enable();
    }
    switches.put(sw.getDpid().toString(),sw);
    values.add(new Values("String_Node_Str",makeSwitchMessage(sw,SwitchState.ADDED)));
    values.add(new Values("String_Node_Str",makeSwitchMessage(sw,SwitchState.ACTIVATED)));
    for (    IPortImpl p : sw.getPorts()) {
      PortChangeType changeType=p.isActive() ? PortChangeType.UP : PortChangeType.DOWN;
      if (changeType == PortChangeType.UP) {
        values.add(new Values("String_Node_Str",makePortMessage(sw,p.getNumber(),changeType)));
      }
    }
  }
  return values;
}
Program: 38010
Project: 38010
Buggy source:
protected void discoverIslPartTwo(Tuple tuple,IslInfoData data) throws Exception {
  ISwitchImpl sw=getSwitch(data.getPath().get(1).getSwitchId());
  if (!sw.isActive()) {
    return;
  }
  IPortImpl port=sw.getPort(data.getPath().get(1).getPortNo());
  if (port.isActiveIsl()) {
    long now=Instant.now().toEpochMilli();
    InfoMessage infoMessage=new InfoMessage(data,now,"String_Node_Str",null);
    logger.info("String_Node_Str",data.toString());
    collector.emit(SimulatorTopology.KAFKA_BOLT_STREAM,tuple,new Values("String_Node_Str",Utils.MAPPER.writeValueAsString(infoMessage)));
  }
}

Fixed version (ground truth):
protected void discoverIslPartTwo(Tuple tuple,IslInfoData data) throws Exception {
  ISwitchImpl sw=getSwitch(data.getPath().get(1).getSwitchId());
  if (!sw.isActive()) {
    return;
  }
  IPortImpl port=sw.getPort(data.getPath().get(1).getPortNo());
  if (port.isActiveIsl()) {
    long now=Instant.now().toEpochMilli();
    InfoMessage infoMessage=new InfoMessage(data,now,"String_Node_Str",null);
    logger.debug("String_Node_Str",data.toString());
    collector.emit(SimulatorTopology.KAFKA_BOLT_STREAM,tuple,new Values("String_Node_Str",Utils.MAPPER.writeValueAsString(infoMessage)));
  }
}
Program: 38011
Project: 38011
Buggy source:
@Override public void execute(Tuple tuple){
  logger.debug("String_Node_Str",tuple.toString());
  try {
    String tupleSource=tuple.getSourceComponent();
switch (tupleSource) {
case SimulatorTopology.COMMAND_BOLT:
case SimulatorTopology.SWITCH_BOLT:
      doCommand(tuple);
    break;
case SimulatorTopology.SIMULATOR_COMMAND_BOLT:
  doSimulatorCommand(tuple);
break;
default :
logger.error("String_Node_Str",tupleSource);
}
}
 catch (Exception e) {
logger.error(e);
e.printStackTrace();
}
 finally {
collector.ack(tuple);
}
}

Fixed version (ground truth):
@Override public void execute(Tuple tuple){
  logger.debug("String_Node_Str",tuple.toString());
  try {
    String tupleSource=tuple.getSourceComponent();
switch (tupleSource) {
case SimulatorTopology.COMMAND_BOLT:
case SimulatorTopology.SWITCH_BOLT:
      doCommand(tuple);
    break;
case SimulatorTopology.SIMULATOR_COMMAND_BOLT:
  doSimulatorCommand(tuple);
break;
default :
logger.error("String_Node_Str",tupleSource);
}
}
 catch (Exception e) {
logger.error(e.toString());
e.printStackTrace();
}
 finally {
collector.ack(tuple);
}
}
Program: 38012
Project: 38012
Buggy source:
@Test public void getFlowName() throws Exception {
  assertEquals(flowName,flow.getCookie());
}

Fixed version (ground truth):
@Test public void getFlowName() throws Exception {
  assertEquals(flowName,flow.getFlowName());
}
Program: 38013
Project: 38013
Buggy source:
/** 
 * Instance constructor.
 * @param flowName        name of the flow
 * @param switchId        switch ID for flow installation
 * @param inputPort       input port of the flow
 * @param outputPort      output port of the flow
 * @param inputVlanId     input vlan id value
 * @param outputVlanId    output vlan id value
 * @param outputVlanType  output vlan tag action
 * @param bandwidth       flow bandwidth
 * @param inputMeterId    allocated meter id
 * @param outputMeterId   allocated meter id
 * @throws IllegalArgumentException if any of arguments is null
 */
@JsonCreator public InstallOneSwitchFlowCommandData(@JsonProperty("String_Node_Str") String cookie,@JsonProperty("String_Node_Str") String switchId,@JsonProperty("String_Node_Str") Number inputPort,@JsonProperty("String_Node_Str") Number outputPort,@JsonProperty("String_Node_Str") Number inputVlanId,@JsonProperty("String_Node_Str") Number outputVlanId,@JsonProperty("String_Node_Str") OutputVlanType outputVlanType,@JsonProperty("String_Node_Str") Number bandwidth,@JsonProperty("String_Node_Str") Number inputMeterId,@JsonProperty("String_Node_Str") Number outputMeterId){
  super(cookie,switchId,inputPort,outputPort);
  setInputVlanId(inputVlanId);
  setOutputVlanId(outputVlanId);
  setOutputVlanType(outputVlanType);
  setBandwidth(bandwidth);
  setInputMeterId(inputMeterId);
  setOutputMeterId(outputMeterId);
}

Fixed version (ground truth):
/** 
 * Instance constructor.
 * @param flowName        name of the flow
 * @param switchId        switch ID for flow installation
 * @param inputPort       input port of the flow
 * @param outputPort      output port of the flow
 * @param inputVlanId     input vlan id value
 * @param outputVlanId    output vlan id value
 * @param outputVlanType  output vlan tag action
 * @param bandwidth       flow bandwidth
 * @param inputMeterId    allocated meter id
 * @param outputMeterId   allocated meter id
 * @throws IllegalArgumentException if any of arguments is null
 */
@JsonCreator public InstallOneSwitchFlowCommandData(@JsonProperty("String_Node_Str") String flowName,@JsonProperty("String_Node_Str") String switchId,@JsonProperty("String_Node_Str") Number inputPort,@JsonProperty("String_Node_Str") Number outputPort,@JsonProperty("String_Node_Str") Number inputVlanId,@JsonProperty("String_Node_Str") Number outputVlanId,@JsonProperty("String_Node_Str") OutputVlanType outputVlanType,@JsonProperty("String_Node_Str") Number bandwidth,@JsonProperty("String_Node_Str") Number inputMeterId,@JsonProperty("String_Node_Str") Number outputMeterId){
  super(flowName,switchId,inputPort,outputPort);
  setInputVlanId(inputVlanId);
  setOutputVlanId(outputVlanId);
  setOutputVlanType(outputVlanType);
  setBandwidth(bandwidth);
  setInputMeterId(inputMeterId);
  setOutputMeterId(outputMeterId);
}
Program: 38014
Project: 38014
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  return toStringHelper(this).addValue(cookie).addValue(switchId).addValue(inputPort).addValue(outputPort).addValue(inputVlanId).addValue(outputVlanId).addValue(outputVlanType).addValue(bandwidth).addValue(inputMeterId).addValue(outputMeterId).toString();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  return toStringHelper(this).addValue(flowName).addValue(switchId).addValue(inputPort).addValue(outputPort).addValue(inputVlanId).addValue(outputVlanId).addValue(outputVlanType).addValue(bandwidth).addValue(inputMeterId).addValue(outputMeterId).toString();
}
Program: 38015
Project: 38015
Buggy source:
/** 
 * The data field holds the "message_type" and "state" fields.
 * @param root the "data" field of an "INFO" message
 */
private void splitInfoMessage(Map<String,?> root,Tuple tuple) throws JsonProcessingException {
  Values dataVal=new Values("String_Node_Str",new ObjectMapper().writeValueAsString(root));
  String key=((String)root.get("String_Node_Str")).toLowerCase();
  String state=(String)root.get("String_Node_Str");
switch (key) {
case "String_Node_Str":
    _collector.emit(I_SWITCH,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH,dataVal);
if (state.equals("String_Node_Str") || state.equals("String_Node_Str")) {
  _collector.emit(I_SWITCH_UPDOWN,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH_UPDOWN,dataVal);
}
 else {
  _collector.emit(I_SWITCH_OTHER,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH_OTHER,dataVal);
}
break;
case "String_Node_Str":
_collector.emit(I_PORT,tuple,dataVal);
if (state.equals("String_Node_Str") || state.equals("String_Node_Str")) {
_collector.emit(I_PORT_UPDOWN,tuple,dataVal);
}
 else {
_collector.emit(I_PORT_OTHER,tuple,dataVal);
}
break;
case "String_Node_Str":
_collector.emit(I_ISL,tuple,dataVal);
if (state.equals("String_Node_Str") || state.equals("String_Node_Str")) {
_collector.emit(I_ISL_UPDOWN,tuple,dataVal);
}
 else {
_collector.emit(I_ISL_OTHER,tuple,dataVal);
}
break;
default :
_collector.emit(I_OTHER,tuple,dataVal);
logger.warn("String_Node_Str",key,root);
}
}

Fixed version (ground truth):
/** 
 * The data field holds the "message_type" and "state" fields.
 * @param root the "data" field of an "INFO" message
 */
private void splitInfoMessage(Map<String,?> root,Tuple tuple) throws JsonProcessingException {
  Values dataVal=new Values("String_Node_Str",new ObjectMapper().writeValueAsString(root));
  String key=((String)root.get("String_Node_Str")).toLowerCase();
  String state=(String)root.get("String_Node_Str");
switch (key) {
case "String_Node_Str":
    _collector.emit(I_SWITCH,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH,dataVal);
if (state.equals("String_Node_Str") || state.equals("String_Node_Str")) {
  _collector.emit(I_SWITCH_UPDOWN,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH_UPDOWN,dataVal);
}
 else {
  _collector.emit(I_SWITCH_OTHER,tuple,dataVal);
  logger.debug("String_Node_Str",I_SWITCH_OTHER,dataVal);
}
break;
case "String_Node_Str":
_collector.emit(I_PORT,tuple,dataVal);
logger.debug("String_Node_Str",I_PORT,dataVal);
if (state.equals("String_Node_Str") || state.equals("String_Node_Str")) {
_collector.emit(I_PORT_UPDOWN,tuple,dataVal);
}
 else {
_collector.emit(I_PORT_OTHER,tuple,dataVal);
}
break;
case "String_Node_Str":
_collector.emit(I_ISL,tuple,dataVal);
logger.debug("String_Node_Str",I_ISL,dataVal);
if (state != null && (state.equals("String_Node_Str") || state.equals("String_Node_Str"))) {
_collector.emit(I_ISL_UPDOWN,tuple,dataVal);
}
 else {
_collector.emit(I_ISL_OTHER,tuple,dataVal);
}
break;
default :
_collector.emit(I_OTHER,tuple,dataVal);
logger.warn("String_Node_Str",key,root);
}
}
Program: 38016
Project: 38016
Buggy source:
/** 
 * This will create all of the topics passed in. - Currently doesn't check to see if they already exist.
 */
public void createTopics(String[] topics,int partitions,int replication){
  int sessionTimeoutMs=5 * 1000;
  int connectionTimeoutMs=5 * 1000;
  ZkClient zkClient=new ZkClient(zookeeperHost,sessionTimeoutMs,connectionTimeoutMs,ZKStringSerializer$.MODULE$);
  boolean isSecureKafkaCluster=false;
  ZkUtils zkUtils=new ZkUtils(zkClient,new ZkConnection(zookeeperHost),isSecureKafkaCluster);
  Properties topicConfig=new Properties();
  for (  String topic : topics) {
    AdminUtils.createTopic(zkUtils,topic,partitions,replication,topicConfig,RackAwareMode.Disabled$.MODULE$);
  }
  zkClient.close();
}

Fixed version (ground truth):
/** 
 * Create the topic, using the default setting for Partitions and Replication
 */
public void createTopics(String[] topics){
  createTopics(topics,1,1);
}
Program: 38017
Project: 38017
Buggy source:
public void primeKafkaTopic(String topic){
  kProducer.send(new ProducerRecord<>(topic,"String_Node_Str","String_Node_Str"));
}

Fixed version (ground truth):
public void primeKafkaTopic(String topic){
  if (!kutils.topicExists(topic)) {
    kutils.createTopics(new String[]{topic});
  }
}
Program: 38018
Project: 38018
Buggy source:
public StormTopology createTopology(){
  logger.debug("String_Node_Str" + this.getClass().getSimpleName());
  TopologyBuilder builder=new TopologyBuilder();
  BoltDeclarer kbolt=builder.setBolt(kafkaOutputTopic + "String_Node_Str",kutils.createKafkaBolt(kafkaOutputTopic),parallelism);
  BoltDeclarer[] tbolt=new BoltDeclarer[bolts.length];
  for (int i=0; i < topics.length; i++) {
    String topic=topics[i];
    String spoutName=topic + "String_Node_Str";
    String boltName=topic + "String_Node_Str";
    builder.setSpout(spoutName,kutils.createKafkaSpout(topic));
    tbolt[i]=builder.setBolt(boltName,bolts[i],parallelism).shuffleGrouping(spoutName);
    kbolt=kbolt.shuffleGrouping(boltName,kafkaOutputTopic);
  }
  tbolt[2].shuffleGrouping(topics[0] + "String_Node_Str",kafkaOutputTopic).shuffleGrouping(topics[1] + "String_Node_Str",kafkaOutputTopic);
  String discoTopic=((OFELinkBolt)bolts[2]).islDiscoTopic;
  builder.setBolt("String_Node_Str",kutils.createKafkaBolt(discoTopic),parallelism).shuffleGrouping(topics[2] + "String_Node_Str",discoTopic);
  return builder.createTopology();
}

Fixed version (ground truth):
public StormTopology createTopology(){
  logger.debug("String_Node_Str" + this.getClass().getSimpleName());
  TopologyBuilder builder=new TopologyBuilder();
  primeTopic(kafkaOutputTopic);
  BoltDeclarer kbolt=builder.setBolt(kafkaOutputTopic + "String_Node_Str",kutils.createKafkaBolt(kafkaOutputTopic),parallelism);
  BoltDeclarer[] tbolt=new BoltDeclarer[bolts.length];
  for (int i=0; i < topics.length; i++) {
    String topic=topics[i];
    String spoutName=topic + "String_Node_Str";
    String boltName=topic + "String_Node_Str";
    primeTopic(topic);
    builder.setSpout(spoutName,kutils.createKafkaSpout(topic));
    tbolt[i]=builder.setBolt(boltName,bolts[i],parallelism).shuffleGrouping(spoutName);
    kbolt=kbolt.shuffleGrouping(boltName,kafkaOutputTopic);
  }
  tbolt[2].shuffleGrouping(topics[0] + "String_Node_Str",kafkaOutputTopic).shuffleGrouping(topics[1] + "String_Node_Str",kafkaOutputTopic);
  String discoTopic=((OFELinkBolt)bolts[2]).islDiscoTopic;
  builder.setBolt("String_Node_Str",kutils.createKafkaBolt(discoTopic),parallelism).shuffleGrouping(topics[2] + "String_Node_Str",discoTopic);
  return builder.createTopology();
}
Program: 38019
Project: 38019
Buggy source:
@Test public void KafkaSplitterTest() throws IOException {
  Properties kprops=new Properties();
  kprops.put("String_Node_Str",TestUtils.kafkaUrl);
  OFEventSplitterTopology splitter=new OFEventSplitterTopology().withKafkaProps(kprops);
  splitter.kutils=kutils;
  LocalCluster cluster=new LocalCluster();
  cluster.submitTopology(splitter.defaultTopoName,stormConfig(),splitter.createTopology());
  KafkaFilerTopology kfiler=new KafkaFilerTopology();
  cluster.submitTopology("String_Node_Str",stormConfig(),kfiler.createTopology(InfoEventSplitterBolt.I_SWITCH_UPDOWN,server.tempDir.getAbsolutePath(),TestUtils.zookeeperUrl));
  Utils.sleep(4 * 1000);
  SendMessages(splitter.topic);
  Utils.sleep(8 * 1000);
  long messagesExpected=4;
  long messagesReceived=Files.readLines(kfiler.filer.getFile(),Charsets.UTF_8).size();
  Assert.assertEquals(messagesExpected,messagesReceived);
  Utils.sleep(2 * 1000);
  cluster.killTopology(splitter.defaultTopoName);
}

Fixed version (ground truth):
@Test public void KafkaSplitterTest() throws IOException {
  Properties kprops=new Properties();
  kprops.put("String_Node_Str",TestUtils.kafkaUrl);
  OFEventSplitterTopology splitter=new OFEventSplitterTopology().withKafkaProps(kprops);
  splitter.kutils=kutils;
  LocalCluster cluster=new LocalCluster();
  cluster.submitTopology(splitter.defaultTopoName,stormConfig(),splitter.createTopology());
  KafkaFilerTopology kfiler=new KafkaFilerTopology();
  cluster.submitTopology("String_Node_Str",stormConfig(),kfiler.createTopology(InfoEventSplitterBolt.I_SWITCH_UPDOWN,server.tempDir.getAbsolutePath(),TestUtils.zookeeperUrl));
  Utils.sleep(4 * 1000);
  SendMessages(splitter.topic);
  Utils.sleep(8 * 1000);
  long messagesExpected=3;
  long messagesReceived=Files.readLines(kfiler.filer.getFile(),Charsets.UTF_8).size();
  Assert.assertEquals(messagesExpected,messagesReceived);
  Utils.sleep(2 * 1000);
  cluster.killTopology(splitter.defaultTopoName);
}
Program: 38020
Project: 38020
Buggy source:
public Observer<QuoteModel> getQuoteObserver(){
  return new Observer<QuoteModel>(){
    @Override public void onSubscribe(    Disposable d){
      compositeDisposable.add(d);
    }
    @Override public void onNext(    QuoteModel quoteModel){
      quoteTV.setText(quoteModel.getResult().getQuote());
      authorTV.setText(quoteModel.getResult().getAuthor());
      mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
    }
    @Override public void onError(    Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}

Fixed version (ground truth):
public Observer<QuoteModel> getQuoteObserver(){
  return new Observer<QuoteModel>(){
    @Override public void onSubscribe(    Disposable d){
      compositeDisposable.add(d);
    }
    @Override public void onNext(    QuoteModel quoteModel){
      String quote=quoteModel.getResult().getQuote();
      if (quote.length() > 224) {
        setQuoteToBottomSheet(getQuoteObservableFromPresenter());
      }
 else {
        quoteTV.setText(quoteModel.getResult().getQuote());
        authorTV.setText(quoteModel.getResult().getAuthor());
        mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
      }
    }
    @Override public void onError(    Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}
Program: 38021
Project: 38021
Buggy source:
@Override public void onNext(QuoteModel quoteModel){
  quoteTV.setText(quoteModel.getResult().getQuote());
  authorTV.setText(quoteModel.getResult().getAuthor());
  mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}

Fixed version (ground truth):
@Override public void onNext(QuoteModel quoteModel){
  String quote=quoteModel.getResult().getQuote();
  if (quote.length() > 224) {
    setQuoteToBottomSheet(getQuoteObservableFromPresenter());
  }
 else {
    quoteTV.setText(quoteModel.getResult().getQuote());
    authorTV.setText(quoteModel.getResult().getAuthor());
    mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
  }
}
Program: 38022
Project: 38022
Buggy source:
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  DaggerArchiveFragmentComponent.builder().rVAdapterModule(new RVAdapterModule(getContext())).build().injectFragment(this);
  ;
  super.onCreate(savedInstanceState);
}

Fixed version (ground truth):
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  DaggerArchiveFragmentComponent.builder().rVAdapterModule(new RVAdapterModule(getContext())).build().injectFragment(this);
  super.onCreate(savedInstanceState);
}
Program: 38023
Project: 38023
Buggy source:
public void setOnItemClickListenerToAdapter(){
  rvAdapter.setOnItemClickListener((view,position,data) -> {
    popupMenu=new PopupMenu(view.getContext(),view);
    popupMenu.getMenuInflater().inflate(R.menu.popup_menu,popupMenu.getMenu());
    popupMenu.setOnMenuItemClickListener(item -> {
      if (item.getItemId() == R.id.delete) {
        final QuoteDb quoteDb=QuoteDb.getQuoteDb(getContext());
        rvAdapter.quoteList.remove(position);
        quoteDb.quoteDao().deleteOne(rvAdapter.quoteList.get(position));
        rvAdapter.notifyItemRemoved(position);
        return true;
      }
      if (item.getItemId() == R.id.share) {
        Intent intent=new Intent();
        intent.setAction(Intent.ACTION_SEND);
        intent.setType("String_Node_Str");
        intent.putExtra(Intent.EXTRA_TEXT,rvAdapter.quoteList.get(position).getQuote());
        view.getContext().startActivity(Intent.createChooser(intent,"String_Node_Str"));
        return true;
      }
      return true;
    }
);
    popupMenu.show();
  }
);
}

Fixed version (ground truth):
public void setOnItemClickListenerToAdapter(){
  rvAdapter.setOnItemClickListener((view,position,data) -> {
    popupMenu=new PopupMenu(view.getContext(),view);
    popupMenu.getMenuInflater().inflate(R.menu.popup_menu,popupMenu.getMenu());
    popupMenu.setOnMenuItemClickListener(item -> {
      if (item.getItemId() == R.id.delete) {
        final QuoteDb quoteDb=QuoteDb.getQuoteDb(getContext());
        quoteDb.quoteDao().deleteOne(rvAdapter.quoteList.get(position));
        rvAdapter.quoteList.remove(position);
        rvAdapter.notifyItemRemoved(position);
        return true;
      }
      if (item.getItemId() == R.id.share) {
        Intent intent=new Intent();
        intent.setAction(Intent.ACTION_SEND);
        intent.setType("String_Node_Str");
        intent.putExtra(Intent.EXTRA_TEXT,rvAdapter.quoteList.get(position).getQuote());
        view.getContext().startActivity(Intent.createChooser(intent,"String_Node_Str"));
        return true;
      }
      return true;
    }
);
    popupMenu.show();
  }
);
}
Program: 38024
Project: 38024
Buggy source:
@Override public void onResponse(Call<QuoteModel> call,Response<QuoteModel> response){
  if (response.isSuccessful()) {
    Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
 else {
    String code=String.valueOf(response.code());
    Toast.makeText(getContext(),response.message() + code,Toast.LENGTH_SHORT).show();
  }
}

Fixed version (ground truth):
@Override public void onResponse(Call<QuoteModel> call,Response<QuoteModel> response){
  if (response.isSuccessful()) {
    Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
 else {
    try {
      Toast.makeText(getContext(),response.errorBody().string(),Toast.LENGTH_SHORT).show();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 38025
Project: 38025
Buggy source:
@Override public void onClick(View v){
  QuoteProvider QProvider=new QuoteProvider();
  QuoteClient QService=QProvider.getmQService();
  JSONObject josonBody=new JSONObject();
  try {
    josonBody.put("String_Node_Str","String_Node_Str");
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  String api_key=josonBody.toString();
  Call<QuoteModel> call=QService.getQuote(api_key);
  call.enqueue(new Callback<QuoteModel>(){
    @Override public void onResponse(    Call<QuoteModel> call,    Response<QuoteModel> response){
      if (response.isSuccessful()) {
        Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
 else {
        String code=String.valueOf(response.code());
        Toast.makeText(getContext(),response.message() + code,Toast.LENGTH_SHORT).show();
      }
    }
    @Override public void onFailure(    Call<QuoteModel> call,    Throwable t){
      Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
      t.printStackTrace();
    }
  }
);
}

Fixed version (ground truth):
@Override public void onClick(View v){
  String api_token=ClientConfig.api_token;
  QuoteProvider QProvider=new QuoteProvider();
  QuoteClient QService=QProvider.getmQService();
  Call<QuoteModel> call=QService.getQuote(api_token);
  call.enqueue(new Callback<QuoteModel>(){
    @Override public void onResponse(    Call<QuoteModel> call,    Response<QuoteModel> response){
      if (response.isSuccessful()) {
        Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
      }
 else {
        try {
          Toast.makeText(getContext(),response.errorBody().string(),Toast.LENGTH_SHORT).show();
        }
 catch (        IOException e) {
          e.printStackTrace();
        }
      }
    }
    @Override public void onFailure(    Call<QuoteModel> call,    Throwable t){
      Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
      t.printStackTrace();
    }
  }
);
}
Program: 38026
Project: 38026
Buggy source:
@Override public void onViewCreated(View view,@Nullable Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  mButton=(Button)getView().findViewById(R.id.fetchButton);
  mButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      QuoteProvider QProvider=new QuoteProvider();
      QuoteClient QService=QProvider.getmQService();
      JSONObject josonBody=new JSONObject();
      try {
        josonBody.put("String_Node_Str","String_Node_Str");
      }
 catch (      JSONException e) {
        e.printStackTrace();
      }
      String api_key=josonBody.toString();
      Call<QuoteModel> call=QService.getQuote(api_key);
      call.enqueue(new Callback<QuoteModel>(){
        @Override public void onResponse(        Call<QuoteModel> call,        Response<QuoteModel> response){
          if (response.isSuccessful()) {
            Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
 else {
            String code=String.valueOf(response.code());
            Toast.makeText(getContext(),response.message() + code,Toast.LENGTH_SHORT).show();
          }
        }
        @Override public void onFailure(        Call<QuoteModel> call,        Throwable t){
          Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
          t.printStackTrace();
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,@Nullable Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  mButton=(Button)getView().findViewById(R.id.fetchButton);
  mButton.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      String api_token=ClientConfig.api_token;
      QuoteProvider QProvider=new QuoteProvider();
      QuoteClient QService=QProvider.getmQService();
      Call<QuoteModel> call=QService.getQuote(api_token);
      call.enqueue(new Callback<QuoteModel>(){
        @Override public void onResponse(        Call<QuoteModel> call,        Response<QuoteModel> response){
          if (response.isSuccessful()) {
            Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
 else {
            try {
              Toast.makeText(getContext(),response.errorBody().string(),Toast.LENGTH_SHORT).show();
            }
 catch (            IOException e) {
              e.printStackTrace();
            }
          }
        }
        @Override public void onFailure(        Call<QuoteModel> call,        Throwable t){
          Toast.makeText(getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
          t.printStackTrace();
        }
      }
);
    }
  }
);
}
Program: 38027
Project: 38027
Buggy source:
@POST("String_Node_Str") Call<QuoteModel> getQuote(@Body String api_key);

Fixed version (ground truth):
@FormUrlEncoded @POST("String_Node_Str") Call<QuoteModel> getQuote(@Field("String_Node_Str") String api_token);
Program: 38028
Project: 38028
Buggy source:
public void bind(HasText text){
  setBadgeComponent(text);
  addNotificationsChangeListener(new NotificationsChangeListener(){
    @Override public void onNotificationChanges(    NotificationHolder holder){
      updateBadgeCaption();
    }
  }
);
}

Fixed version (ground truth):
public void bind(HasText text){
  addBadgeHolderComponent(text);
  addNotificationsChangeListener(new NotificationsChangeListener(){
    @Override public void onNotificationChanges(    NotificationHolder holder){
      updateBadgeCaptions();
    }
  }
);
}
Program: 38029
Project: 38029
Buggy source:
private void updateBadgeCaption(){
  if (text != null) {
    int unread=getUnreadNotifications();
    String value;
    if (unread < 1) {
      value=String.valueOf(0);
    }
 else     if (unread < 10) {
      value=String.valueOf(unread);
    }
 else {
      value="String_Node_Str";
    }
    text.setText(value);
    if (text instanceof Component) {
      ((Component)text).setVisible(unread > 0);
    }
  }
}

Fixed version (ground truth):
private void updateBadgeCaption(HasText hasText){
  if (hasText != null) {
    int unread=getUnreadNotifications();
    String value;
    if (unread < 1) {
      value=String.valueOf(0);
    }
 else     if (unread < 10) {
      value=String.valueOf(unread);
    }
 else {
      value="String_Node_Str";
    }
    hasText.setText(value);
    if (hasText instanceof Component) {
      ((Component)hasText).setVisible(unread > 0);
    }
  }
}
Program: 38030
Project: 38030
Buggy source:
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badge.clearCount();
  notificationHolder.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(1000);
      for (int i=0; i < 3; i++) {
        addNotification(MEDIUM);
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
);
  currentThread.start();
}

Fixed version (ground truth):
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badge.clearCount();
  notificationHolder.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(1000);
      for (int i=0; i < 3; i++) {
        addNotification(MEDIUM);
        badge.increase();
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
);
  currentThread.start();
}
Program: 38031
Project: 38031
Buggy source:
public void increase(){
  count++;
  listeners.forEach(listener -> listener.onChange(this));
}

Fixed version (ground truth):
public void increase(){
  count++;
  listeners.forEach(listener -> listener.onChange(this));
  updateBadgeCaptions();
}
Program: 38032
Project: 38032
Buggy source:
public void decrease(){
  if (count > 0) {
    count--;
  }
  listeners.forEach(listener -> listener.onChange(this));
}

Fixed version (ground truth):
public void decrease(){
  if (count > 0) {
    count--;
  }
  listeners.forEach(listener -> listener.onChange(this));
  updateBadgeCaptions();
}
Program: 38033
Project: 38033
Buggy source:
public void setCount(int count){
  this.count=count;
  listeners.forEach(listener -> listener.onChange(this));
}

Fixed version (ground truth):
public void setCount(int count){
  this.count=count;
  listeners.forEach(listener -> listener.onChange(this));
  updateBadgeCaptions();
}
Program: 38034
Project: 38034
Buggy source:
public void bind(HasText text){
  addBadgeHolderComponent(text);
  addNotificationsChangeListener(new NotificationsChangeListener(){
    @Override public void onNotificationChanges(    NotificationHolder holder){
      updateBadgeCaptions();
    }
  }
);
}

Fixed version (ground truth):
public void bind(HasText text){
  addBadgeHolderComponent(text);
  updateBadgeCaptions();
}
Program: 38035
Project: 38035
Buggy source:
public void addNotification(T notification){
  recentNotification=notification;
  notifications.add(notification);
  notifyListeners();
  notifyAddListeners(notification);
}

Fixed version (ground truth):
public void addNotification(T notification){
  recentNotification=notification;
  notifications.add(notification);
  notifyListeners();
  notifyAddListeners(notification);
  updateBadgeCaptions();
}
Program: 38036
Project: 38036
Buggy source:
public void removeNotification(T notification){
  notifications.remove(notification);
  notifyListeners();
  notifyRemoveListeners(notification);
}

Fixed version (ground truth):
public void removeNotification(T notification){
  notifications.remove(notification);
  notifyListeners();
  notifyRemoveListeners(notification);
  updateBadgeCaptions();
}
Program: 38037
Project: 38037
Buggy source:
public void clearNotifications(){
  notifications.clear();
  notifyListeners();
}

Fixed version (ground truth):
public void clearNotifications(){
  notifications.clear();
  notifyListeners();
  updateBadgeCaptions();
}
Program: 38038
Project: 38038
Buggy source:
private void addNotification(Priority priority){
  getUI().ifPresent(ui -> ui.accessSynchronously(() -> {
    badge.increase();
    notificationHolder.addNotification(new DefaultNotification("String_Node_Str" + badge.getCount(),"String_Node_Str" + badge.getCount(),priority));
  }
));
}

Fixed version (ground truth):
private void addNotification(Priority priority){
  notificationHolder.addNotification(new DefaultNotification("String_Node_Str" + badgeHolder.getCount(),"String_Node_Str" + badgeHolder.getCount(),priority));
}
Program: 38040
Project: 38040
Buggy source:
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badge.clearCount();
  notificationHolder.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(1000);
      for (int i=0; i < 3; i++) {
        addNotification(MEDIUM);
        badge.increase();
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
);
  currentThread.start();
}

Fixed version (ground truth):
private void reloadNotifications(){
  if (currentThread != null && !currentThread.isInterrupted()) {
    currentThread.interrupt();
  }
  badgeHolder.clearCount();
  notificationHolder.clearNotifications();
  currentThread=new Thread(() -> {
    try {
      Thread.sleep(1000);
      for (int i=0; i < 3; i++) {
        getUI().ifPresent(ui -> ui.access(() -> {
          addNotification(MEDIUM);
          badgeHolder.increase();
          badgeHolder.increase();
        }
));
      }
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
);
  currentThread.start();
}
Program: 38041
Project: 38041
Buggy source:
public AppLayoutRouterLayout(){
  setSizeFull();
  loadConfiguration();
  UI.getCurrent().getSession().setAttribute("String_Node_Str",this);
}

Fixed version (ground truth):
public AppLayoutRouterLayout(){
  setSizeFull();
  getElement().getStyle().set("String_Node_Str","String_Node_Str");
  loadConfiguration();
  UI.getCurrent().getSession().setAttribute("String_Node_Str",this);
}
Program: 38042
Project: 38042
Buggy source:
public PaperDrawerIconItem(String title,String icon,ComponentEventListener<ClickEvent<PaperDrawerIconItem>> listener){
  this.listener=listener;
  setTitle(title);
  setIcon(icon);
  getElement().addEventListener("String_Node_Str",domEvent -> {
    if (listener != null) {
      listener.onComponentEvent(new ClickEvent<>(this));
    }
  }
);
}

Fixed version (ground truth):
public PaperDrawerIconItem(String title,String icon,ComponentEventListener<ClickEvent<PaperDrawerIconItem>> listener){
  this.listener=listener;
  setTitle(title);
  setIcon(icon);
  getElement().addEventListener("String_Node_Str",domEvent -> {
    if (this.listener != null) {
      this.listener.onComponentEvent(new ClickEvent<>(this));
    }
  }
);
}
Program: 38043
Project: 38043
Buggy source:
public PaperDrawerItem(String title,ComponentEventListener<ClickEvent<PaperDrawerIconItem>> listener){
  this.listener=listener;
  setTitle(title);
  getElement().addEventListener("String_Node_Str",domEvent -> {
    if (listener != null) {
      listener.onComponentEvent(new ClickEvent<>(this));
    }
  }
);
}

Fixed version (ground truth):
public PaperDrawerItem(String title,ComponentEventListener<ClickEvent<PaperDrawerIconItem>> listener){
  this.listener=listener;
  setTitle(title);
  getElement().addEventListener("String_Node_Str",domEvent -> {
    if (this.listener != null) {
      this.listener.onComponentEvent(new ClickEvent<>(this));
    }
  }
);
}
Program: 38044
Project: 38044
Buggy source:
public void init(VaadinRequest request){
  setContent(AppLayout.getDefaultBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications)).withNavigationElementInfoProvider(new DefaultNavigationElementInfoProvider()).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  setContent(AppLayout.getDefaultBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications)).withNavigationElementInfoProvider(new DefaultNavigationElementInfoProducer()).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(SubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}
Program: 38045
Project: 38045
Buggy source:
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProvider()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}

Fixed version (ground truth):
public void init(VaadinRequest request){
  setContent(AppLayout.getCDIBuilder(Behaviour.LEFT_RESPONSIVE_HYBRID).withViewProvider(() -> viewProvider).withNavigationElementInfoProvider(new DefaultSpringNavigationElementInfoProducer()).withTitle("String_Node_Str").addToAppBar(new AppBarNotificationButton(notifications,true)).withDesign(AppLayoutDesign.MATERIAL).add(new MenuHeader("String_Node_Str",new ThemeResource("String_Node_Str")),HEADER).add(badge,View1.class).add(CDISubmenuBuilder.get("String_Node_Str",VaadinIcons.PLUS).add(View2.class).add(View3.class).add(View4.class).build()).add(View5.class).add(View6.class).build());
}