nus-yam/ex-repair huggingface dataset:
Program: 132057
Project: 132057
Buggy source:
/** 
 * Add an etherType match to an existing MatchBuilder.
 * @param match the Match object to which we want to add an EtherTypeMatch
 * @param etherType the ethernet type
 */
public static void addMatchEtherType(MatchBuilder match,final long etherType){
  EthernetMatchBuilder ethernetMatch=new EthernetMatchBuilder();
  EthernetTypeBuilder ethTypeBuilder=new EthernetTypeBuilder();
  ethTypeBuilder.setType(new EtherType(etherType));
  ethernetMatch.setEthernetType(ethTypeBuilder.build());
  match.setEthernetMatch(mergeEthernetMatch(match,ethernetMatch));
}

Fixed version (ground truth):
/** 
 * Add an etherType match to an existing MatchBuilder.
 * @param match the Match object to which we want to add an EtherTypeMatch
 * @param etherType the Ethernet type
 */
public static void addMatchEtherType(MatchBuilder match,final long etherType){
  EthernetMatchBuilder ethernetMatch=new EthernetMatchBuilder();
  EthernetTypeBuilder ethTypeBuilder=new EthernetTypeBuilder();
  ethTypeBuilder.setType(new EtherType(etherType));
  ethernetMatch.setEthernetType(ethTypeBuilder.build());
  match.setEthernetMatch(mergeEthernetMatch(match,ethernetMatch));
}
Program: 132058
Project: 132058
Buggy source:
public void setIID(InstanceIdentifier<?> iID){
  this.iID=iID;
}

Fixed version (ground truth):
public void setIID(InstanceIdentifier<?> instanceIdentifier){
  this.instanceIdentifier=instanceIdentifier;
}
Program: 132059
Project: 132059
Buggy source:
public UpdateOpenFlowTableOffsets(short sfcOffsetTable,short sfcAppEgressTable){
  this.sfcOffsetTable=sfcOffsetTable;
  this.sfcAppEgressTable=sfcAppEgressTable;
}

Fixed version (ground truth):
UpdateOpenFlowTableOffsets(short sfcOffsetTable,short sfcAppEgressTable){
  this.sfcOffsetTable=sfcOffsetTable;
  this.sfcAppEgressTable=sfcAppEgressTable;
}
Program: 132060
Project: 132060
Buggy source:
/** 
 * Verify that the given tableOffset and optional maxTable is in range
 * @param tableOffset the tableOffset to verify
 * @param maxTable optionally the number of tables beyond tableOffset to be used
 * @return a valid TableId or null if invalid
 */
public TableId verifyMaxTableId(short tableOffset,short maxTable){
  try {
    return new TableId((short)(tableOffset + maxTable));
  }
 catch (  IllegalArgumentException e) {
    LOG.error("String_Node_Str",tableOffset,maxTable);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Verify that the given tableOffset and optional maxTable is in range.
 * @param tableOffset the tableOffset to verify
 * @param maxTable optionally the number of tables beyond tableOffset to be used
 * @return a valid TableId or null if invalid
 */
public TableId verifyMaxTableId(short tableOffset,short maxTable){
  try {
    return new TableId((short)(tableOffset + maxTable));
  }
 catch (  IllegalArgumentException e) {
    LOG.error("String_Node_Str",tableOffset,maxTable);
    return null;
  }
}
Program: 132061
Project: 132061
Buggy source:
/** 
 * Process an OpenFlow Renderer configuration change. Only creates and updates are handled
 * @param config the configuration details
 */
private void processConfig(SfcOfRendererConfig config){
  if (verifyMaxTableId(config.getSfcOfTableOffset(),this.sfcOfFlowProgrammer.getMaxTableOffset()) == null) {
    return;
  }
  if (verifyMaxTableId(config.getSfcOfAppEgressTableOffset(),(short)0) == null) {
    return;
  }
  final int MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL=2;
  if (config.getSfcOfTableOffset() < MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL) {
    LOG.error("String_Node_Str",config.getSfcOfTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() < 0) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() >= config.getSfcOfTableOffset() && config.getSfcOfAppEgressTableOffset() <= config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset()) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset(),config.getSfcOfTableOffset(),config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset());
    return;
  }
  UpdateOpenFlowTableOffsets updateThread=new UpdateOpenFlowTableOffsets(config.getSfcOfTableOffset(),config.getSfcOfAppEgressTableOffset());
  try {
    threadExecutor.submit(updateThread);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.toString());
  }
}

Fixed version (ground truth):
/** 
 * Process an OpenFlow Renderer configuration change. Only creates and updates are handled
 * @param config the configuration details
 */
private void processConfig(SfcOfRendererConfig config){
  if (verifyMaxTableId(config.getSfcOfTableOffset(),this.sfcOfFlowProgrammer.getMaxTableOffset()) == null) {
    return;
  }
  if (verifyMaxTableId(config.getSfcOfAppEgressTableOffset(),(short)0) == null) {
    return;
  }
  if (config.getSfcOfTableOffset() < MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL) {
    LOG.error("String_Node_Str",config.getSfcOfTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() < 0) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() >= config.getSfcOfTableOffset() && config.getSfcOfAppEgressTableOffset() <= config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset()) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset(),config.getSfcOfTableOffset(),config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset());
    return;
  }
  UpdateOpenFlowTableOffsets updateThread=new UpdateOpenFlowTableOffsets(config.getSfcOfTableOffset(),config.getSfcOfAppEgressTableOffset());
  threadExecutor.submit(updateThread);
}
Program: 132062
Project: 132062
Buggy source:
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getCreatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",((SfcOfRendererConfig)entry.getValue()));
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getUpdatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",((SfcOfRendererConfig)entry.getValue()));
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
}

Fixed version (ground truth):
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getCreatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",entry.getValue());
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getUpdatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",entry.getValue());
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
}
Program: 132063
Project: 132063
Buggy source:
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<RenderedServicePath>> collection){
  for (  DataTreeModification<RenderedServicePath> modification : collection) {
    DataObjectModification<RenderedServicePath> rootNode=modification.getRootNode();
switch (rootNode.getModificationType()) {
case WRITE:
case SUBTREE_MODIFIED:
      if (rootNode.getDataBefore() == null && rootNode.getDataAfter() != null) {
        LOG.info("String_Node_Str",rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
 else       if (rootNode.getDataAfter().equals(rootNode.getDataBefore())) {
        LOG.info("String_Node_Str",rootNode.getDataAfter(),rootNode.getDataBefore());
        sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
    break;
case DELETE:
  if (rootNode.getDataBefore() != null) {
    LOG.info("String_Node_Str",rootNode.getDataBefore());
    sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
  }
break;
}
}
}

Fixed version (ground truth):
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<RenderedServicePath>> collection){
  for (  DataTreeModification<RenderedServicePath> modification : collection) {
    DataObjectModification<RenderedServicePath> rootNode=modification.getRootNode();
switch (rootNode.getModificationType()) {
case WRITE:
case SUBTREE_MODIFIED:
      if (rootNode.getDataBefore() == null && rootNode.getDataAfter() != null) {
        LOG.info("String_Node_Str",rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
 else       if (rootNode.getDataAfter().equals(rootNode.getDataBefore())) {
        LOG.info("String_Node_Str",rootNode.getDataAfter(),rootNode.getDataBefore());
        sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
    break;
case DELETE:
  if (rootNode.getDataBefore() != null) {
    LOG.info("String_Node_Str",rootNode.getDataBefore());
    sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
  }
break;
default :
break;
}
}
}
Program: 132064
Project: 132064
Buggy source:
private void buildGroup(ServiceFunctionGroup sfg,boolean isAdd){
  try {
    List<SfcServiceFunction> sfs=sfg.getSfcServiceFunction();
    SfName sfName=new SfName(sfs.get(0).getName());
    ServiceFunction sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
    SffName sffName=sf.getSfDataPlaneLocator().get(0).getServiceFunctionForwarder();
    String sffNodeId=null;
    sffNodeId=getSffOpenFlowNodeName(sffName);
    if (sffNodeId == null) {
      LOG.warn("String_Node_Str",sffName);
      return;
    }
    ServiceFunctionGroupAlgorithm algorithm=SfcProviderServiceFunctionGroupAlgAPI.readServiceFunctionGroupAlg(sfg.getAlgorithm());
    List<GroupBucketInfo> bucketsInfo=new ArrayList<GroupBucketInfo>();
    ServiceFunctionForwarder sff=SfcProviderServiceForwarderAPI.readServiceFunctionForwarder(sffName);
    int index=0;
    for (    SfcServiceFunction sfcServiceFunction : sfg.getSfcServiceFunction()) {
      sfName=new SfName(sfcServiceFunction.getName());
      sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
      ServiceFunctionDictionary sffSfDict=sfcOfProviderUtils.getSffSfDictionary(sff,sfName);
      String outPort=sfcOfProviderUtils.getDictPortInfoPort(sff,sffSfDict);
      bucketsInfo.add(buildBucket(sf,outPort,index));
      index++;
    }
    this.sfcOfFlowProgrammer.configureGroup(sffName.getValue(),sffNodeId,sfg.getName(),sfg.getGroupId(),algorithm.getAlgorithmType().getIntValue(),bucketsInfo,isAdd);
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str" + sfg,e);
  }
}

Fixed version (ground truth):
private void buildGroup(ServiceFunctionGroup sfg,boolean isAdd){
  List<SfcServiceFunction> sfs=sfg.getSfcServiceFunction();
  SfName sfName=new SfName(sfs.get(0).getName());
  ServiceFunction sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
  SffName sffName=sf.getSfDataPlaneLocator().get(0).getServiceFunctionForwarder();
  String sffNodeId=null;
  sffNodeId=getSffOpenFlowNodeName(sffName);
  if (sffNodeId == null) {
    LOG.warn("String_Node_Str",sffName);
    return;
  }
  ServiceFunctionGroupAlgorithm algorithm=SfcProviderServiceFunctionGroupAlgAPI.readServiceFunctionGroupAlg(sfg.getAlgorithm());
  List<GroupBucketInfo> bucketsInfo=new ArrayList<>();
  ServiceFunctionForwarder sff=SfcProviderServiceForwarderAPI.readServiceFunctionForwarder(sffName);
  int index=0;
  for (  SfcServiceFunction sfcServiceFunction : sfg.getSfcServiceFunction()) {
    sfName=new SfName(sfcServiceFunction.getName());
    sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
    ServiceFunctionDictionary sffSfDict=sfcOfProviderUtils.getSffSfDictionary(sff,sfName);
    String outPort=sfcOfProviderUtils.getDictPortInfoPort(sff,sffSfDict);
    bucketsInfo.add(buildBucket(sf,outPort,index));
    index++;
  }
  this.sfcOfFlowProgrammer.configureGroup(sffName.getValue(),sffNodeId,sfg.getName(),sfg.getGroupId(),algorithm.getAlgorithmType().getIntValue(),bucketsInfo,isAdd);
}
Program: 132066
Project: 132066
Buggy source:
protected static ObjectNode getDataPlaneLocatorObjectNode(DataPlaneLocator dataPlaneLocator){
  if (dataPlaneLocator == null) {
    return null;
  }
  ObjectMapper mapper=new ObjectMapper();
  ObjectNode locatorNode=null;
  if (dataPlaneLocator.getLocatorType() != null) {
    locatorNode=mapper.createObjectNode();
    String type=dataPlaneLocator.getLocatorType().getImplementedInterface().getSimpleName().toLowerCase();
switch (type) {
case FUNCTION:
      Function functionLocator=(Function)dataPlaneLocator.getLocatorType();
    locatorNode.put(_FUNCTION_NAME,functionLocator.getFunctionName());
  break;
case IP:
Ip ipLocator=(Ip)dataPlaneLocator.getLocatorType();
if (ipLocator.getIp() != null) {
locatorNode.put(_IP,convertIpAddress(ipLocator.getIp()));
if (ipLocator.getPort() != null) {
  locatorNode.put(_PORT,ipLocator.getPort().getValue());
}
}
break;
case LISP:
Lisp lispLocator=(Lisp)dataPlaneLocator.getLocatorType();
if (lispLocator.getEid() != null) locatorNode.put(_EID,convertIpAddress(lispLocator.getEid()));
break;
case MAC:
Mac macLocator=(Mac)dataPlaneLocator.getLocatorType();
if (macLocator.getMac() != null) locatorNode.put(_MAC,macLocator.getMac().getValue());
locatorNode.put(_VLAN_ID,macLocator.getVlanId());
}
}
if (dataPlaneLocator.getTransport() != null) {
if (locatorNode == null) {
locatorNode=mapper.createObjectNode();
}
locatorNode.put(_TRANSPORT,getDataPlaneLocatorTransport(dataPlaneLocator));
}
return locatorNode;
}

Fixed version (ground truth):
protected static ObjectNode getDataPlaneLocatorObjectNode(DataPlaneLocator dataPlaneLocator){
  if (dataPlaneLocator == null) {
    return null;
  }
  ObjectMapper mapper=new ObjectMapper();
  ObjectNode locatorNode=null;
  if (dataPlaneLocator.getLocatorType() != null) {
    locatorNode=mapper.createObjectNode();
    String type=dataPlaneLocator.getLocatorType().getImplementedInterface().getSimpleName().toLowerCase();
switch (type) {
case FUNCTION:
      Function functionLocator=(Function)dataPlaneLocator.getLocatorType();
    locatorNode.put(FUNCTION_NAME,functionLocator.getFunctionName());
  break;
case IP:
Ip ipLocator=(Ip)dataPlaneLocator.getLocatorType();
if (ipLocator.getIp() != null) {
locatorNode.put(IP,convertIpAddress(ipLocator.getIp()));
if (ipLocator.getPort() != null) {
  locatorNode.put(PORT,ipLocator.getPort().getValue());
}
}
break;
case LISP:
Lisp lispLocator=(Lisp)dataPlaneLocator.getLocatorType();
if (lispLocator.getEid() != null) {
locatorNode.put(EID,convertIpAddress(lispLocator.getEid()));
}
break;
case MAC:
Mac macLocator=(Mac)dataPlaneLocator.getLocatorType();
if (macLocator.getMac() != null) {
locatorNode.put(MAC,macLocator.getMac().getValue());
}
locatorNode.put(VLAN_ID,macLocator.getVlanId());
break;
default :
break;
}
}
if (dataPlaneLocator.getTransport() != null) {
if (locatorNode == null) {
locatorNode=mapper.createObjectNode();
}
locatorNode.put(TRANSPORT,getDataPlaneLocatorTransport(dataPlaneLocator));
}
return locatorNode;
}
Program: 132067
Project: 132067
Buggy source:
protected static ObjectNode getSffSfDataPlaneLocatorObjectNode(SffSfDataPlaneLocator sffSfDpl){
  if (sffSfDpl == null) {
    return null;
  }
  ObjectMapper mapper=new ObjectMapper();
  ObjectNode sffSfDplNode=mapper.createObjectNode();
  if (sffSfDpl.getSfDplName() != null) {
    sffSfDplNode.put(_SF_DPL_NAME,sffSfDpl.getSfDplName().getValue());
  }
  if (sffSfDpl.getSffDplName() != null) {
    sffSfDplNode.put(_SFF_DPL_NAME,sffSfDpl.getSffDplName().getValue());
  }
  return sffSfDplNode;
}

Fixed version (ground truth):
protected static ObjectNode getSffSfDataPlaneLocatorObjectNode(SffSfDataPlaneLocator sffSfDpl){
  if (sffSfDpl == null) {
    return null;
  }
  ObjectMapper mapper=new ObjectMapper();
  ObjectNode sffSfDplNode=mapper.createObjectNode();
  if (sffSfDpl.getSfDplName() != null) {
    sffSfDplNode.put(SF_DPL_NAME,sffSfDpl.getSfDplName().getValue());
  }
  if (sffSfDpl.getSffDplName() != null) {
    sffSfDplNode.put(SFF_DPL_NAME,sffSfDpl.getSffDplName().getValue());
  }
  return sffSfDplNode;
}
Program: 132068
Project: 132068
Buggy source:
protected static String getDataPlaneLocatorTransport(DataPlaneLocator dataPlaneLocator){
  if (dataPlaneLocator == null || dataPlaneLocator.getTransport() == null) {
    return null;
  }
  String transport=null;
switch (dataPlaneLocator.getTransport().getSimpleName().toLowerCase()) {
case VXLAN_GPE:
    transport=SERVICE_LOCATOR_PREFIX + _VXLAN_GPE;
  break;
case GRE:
transport=SERVICE_LOCATOR_PREFIX + _GRE;
break;
case OTHER:
transport=SERVICE_LOCATOR_PREFIX + _OTHER;
break;
default :
transport=SERVICE_LOCATOR_PREFIX + _OTHER;
}
return transport;
}

Fixed version (ground truth):
protected static String getDataPlaneLocatorTransport(DataPlaneLocator dataPlaneLocator){
  if (dataPlaneLocator == null || dataPlaneLocator.getTransport() == null) {
    return null;
  }
  String transport=null;
switch (dataPlaneLocator.getTransport().getSimpleName().toLowerCase()) {
case VXLAN_GPE:
    transport=SERVICE_LOCATOR_PREFIX + VXLAN_GPE_DPL;
  break;
case GRE:
transport=SERVICE_LOCATOR_PREFIX + GRE;
break;
case OTHER:
transport=SERVICE_LOCATOR_PREFIX + OTHER;
break;
default :
transport=SERVICE_LOCATOR_PREFIX + OTHER;
break;
}
return transport;
}
Program: 132069
Project: 132069
Buggy source:
public void setDataProvider(DataBroker r){
  dataProvider=r;
}

Fixed version (ground truth):
public void setDataProvider(DataBroker broker){
  dataProvider=broker;
}
Program: 132070
Project: 132070
Buggy source:
public static void setDataProviderAux(DataBroker r){
  dataProvider=r;
}

Fixed version (ground truth):
public static void setDataProviderAux(DataBroker broker){
  dataProvider=broker;
}
Program: 132071
Project: 132071
Buggy source:
public void setIID(InstanceIdentifier<?> iID){
  this.iID=iID;
}

Fixed version (ground truth):
public void setIID(InstanceIdentifier<?> instanceIdentifier){
  this.instanceIdentifier=instanceIdentifier;
}
Program: 132072
Project: 132072
Buggy source:
public UpdateOpenFlowTableOffsets(short sfcOffsetTable,short sfcAppEgressTable){
  this.sfcOffsetTable=sfcOffsetTable;
  this.sfcAppEgressTable=sfcAppEgressTable;
}

Fixed version (ground truth):
UpdateOpenFlowTableOffsets(short sfcOffsetTable,short sfcAppEgressTable){
  this.sfcOffsetTable=sfcOffsetTable;
  this.sfcAppEgressTable=sfcAppEgressTable;
}
Program: 132073
Project: 132073
Buggy source:
/** 
 * Verify that the given tableOffset and optional maxTable is in range
 * @param tableOffset the tableOffset to verify
 * @param maxTable optionally the number of tables beyond tableOffset to be used
 * @return a valid TableId or null if invalid
 */
public TableId verifyMaxTableId(short tableOffset,short maxTable){
  try {
    return new TableId((short)(tableOffset + maxTable));
  }
 catch (  IllegalArgumentException e) {
    LOG.error("String_Node_Str",tableOffset,maxTable);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Verify that the given tableOffset and optional maxTable is in range.
 * @param tableOffset the tableOffset to verify
 * @param maxTable optionally the number of tables beyond tableOffset to be used
 * @return a valid TableId or null if invalid
 */
public TableId verifyMaxTableId(short tableOffset,short maxTable){
  try {
    return new TableId((short)(tableOffset + maxTable));
  }
 catch (  IllegalArgumentException e) {
    LOG.error("String_Node_Str",tableOffset,maxTable);
    return null;
  }
}
Program: 132074
Project: 132074
Buggy source:
/** 
 * Process an OpenFlow Renderer configuration change. Only creates and updates are handled
 * @param config the configuration details
 */
private void processConfig(SfcOfRendererConfig config){
  if (verifyMaxTableId(config.getSfcOfTableOffset(),this.sfcOfFlowProgrammer.getMaxTableOffset()) == null) {
    return;
  }
  if (verifyMaxTableId(config.getSfcOfAppEgressTableOffset(),(short)0) == null) {
    return;
  }
  final int MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL=2;
  if (config.getSfcOfTableOffset() < MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL) {
    LOG.error("String_Node_Str",config.getSfcOfTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() < 0) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() >= config.getSfcOfTableOffset() && config.getSfcOfAppEgressTableOffset() <= config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset()) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset(),config.getSfcOfTableOffset(),config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset());
    return;
  }
  UpdateOpenFlowTableOffsets updateThread=new UpdateOpenFlowTableOffsets(config.getSfcOfTableOffset(),config.getSfcOfAppEgressTableOffset());
  try {
    threadExecutor.submit(updateThread);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.toString());
  }
}

Fixed version (ground truth):
/** 
 * Process an OpenFlow Renderer configuration change. Only creates and updates are handled
 * @param config the configuration details
 */
private void processConfig(SfcOfRendererConfig config){
  if (verifyMaxTableId(config.getSfcOfTableOffset(),this.sfcOfFlowProgrammer.getMaxTableOffset()) == null) {
    return;
  }
  if (verifyMaxTableId(config.getSfcOfAppEgressTableOffset(),(short)0) == null) {
    return;
  }
  if (config.getSfcOfTableOffset() < MAGIC_NUMBER_IN_SFCOFLOWPROGRAMMERIMPL) {
    LOG.error("String_Node_Str",config.getSfcOfTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() < 0) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset());
    return;
  }
  if (config.getSfcOfAppEgressTableOffset() >= config.getSfcOfTableOffset() && config.getSfcOfAppEgressTableOffset() <= config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset()) {
    LOG.error("String_Node_Str",config.getSfcOfAppEgressTableOffset(),config.getSfcOfTableOffset(),config.getSfcOfTableOffset() + this.sfcOfFlowProgrammer.getMaxTableOffset());
    return;
  }
  UpdateOpenFlowTableOffsets updateThread=new UpdateOpenFlowTableOffsets(config.getSfcOfTableOffset(),config.getSfcOfAppEgressTableOffset());
  threadExecutor.submit(updateThread);
}
Program: 132075
Project: 132075
Buggy source:
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getCreatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",((SfcOfRendererConfig)entry.getValue()));
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getUpdatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",((SfcOfRendererConfig)entry.getValue()));
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
}

Fixed version (ground truth):
@Override public void onDataChanged(AsyncDataChangeEvent<InstanceIdentifier<?>,DataObject> change){
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getCreatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",entry.getValue());
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
  for (  Entry<InstanceIdentifier<?>,DataObject> entry : change.getUpdatedData().entrySet()) {
    if (entry.getValue() instanceof SfcOfRendererConfig) {
      LOG.info("String_Node_Str",entry.getValue());
      processConfig((SfcOfRendererConfig)entry.getValue());
    }
  }
}
Program: 132076
Project: 132076
Buggy source:
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<RenderedServicePath>> collection){
  for (  DataTreeModification<RenderedServicePath> modification : collection) {
    DataObjectModification<RenderedServicePath> rootNode=modification.getRootNode();
switch (rootNode.getModificationType()) {
case WRITE:
case SUBTREE_MODIFIED:
      if (rootNode.getDataBefore() == null && rootNode.getDataAfter() != null) {
        LOG.info("String_Node_Str",rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
 else       if (rootNode.getDataAfter().equals(rootNode.getDataBefore())) {
        LOG.info("String_Node_Str",rootNode.getDataAfter(),rootNode.getDataBefore());
        sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
    break;
case DELETE:
  if (rootNode.getDataBefore() != null) {
    LOG.info("String_Node_Str",rootNode.getDataBefore());
    sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
  }
break;
}
}
}

Fixed version (ground truth):
@Override public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<RenderedServicePath>> collection){
  for (  DataTreeModification<RenderedServicePath> modification : collection) {
    DataObjectModification<RenderedServicePath> rootNode=modification.getRootNode();
switch (rootNode.getModificationType()) {
case WRITE:
case SUBTREE_MODIFIED:
      if (rootNode.getDataBefore() == null && rootNode.getDataAfter() != null) {
        LOG.info("String_Node_Str",rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
 else       if (rootNode.getDataAfter().equals(rootNode.getDataBefore())) {
        LOG.info("String_Node_Str",rootNode.getDataAfter(),rootNode.getDataBefore());
        sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
        sfcOfRspProcessor.processRenderedServicePath(rootNode.getDataAfter());
      }
    break;
case DELETE:
  if (rootNode.getDataBefore() != null) {
    LOG.info("String_Node_Str",rootNode.getDataBefore());
    sfcOfRspProcessor.deleteRenderedServicePath(rootNode.getDataBefore());
  }
break;
default :
break;
}
}
}
Program: 132077
Project: 132077
Buggy source:
private void buildGroup(ServiceFunctionGroup sfg,boolean isAdd){
  try {
    List<SfcServiceFunction> sfs=sfg.getSfcServiceFunction();
    SfName sfName=new SfName(sfs.get(0).getName());
    ServiceFunction sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
    SffName sffName=sf.getSfDataPlaneLocator().get(0).getServiceFunctionForwarder();
    String sffNodeId=null;
    sffNodeId=getSffOpenFlowNodeName(sffName);
    if (sffNodeId == null) {
      LOG.warn("String_Node_Str",sffName);
      return;
    }
    ServiceFunctionGroupAlgorithm algorithm=SfcProviderServiceFunctionGroupAlgAPI.readServiceFunctionGroupAlg(sfg.getAlgorithm());
    List<GroupBucketInfo> bucketsInfo=new ArrayList<GroupBucketInfo>();
    ServiceFunctionForwarder sff=SfcProviderServiceForwarderAPI.readServiceFunctionForwarder(sffName);
    int index=0;
    for (    SfcServiceFunction sfcServiceFunction : sfg.getSfcServiceFunction()) {
      sfName=new SfName(sfcServiceFunction.getName());
      sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
      ServiceFunctionDictionary sffSfDict=sfcOfProviderUtils.getSffSfDictionary(sff,sfName);
      String outPort=sfcOfProviderUtils.getDictPortInfoPort(sff,sffSfDict);
      bucketsInfo.add(buildBucket(sf,outPort,index));
      index++;
    }
    this.sfcOfFlowProgrammer.configureGroup(sffName.getValue(),sffNodeId,sfg.getName(),sfg.getGroupId(),algorithm.getAlgorithmType().getIntValue(),bucketsInfo,isAdd);
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str" + sfg,e);
  }
}

Fixed version (ground truth):
private void buildGroup(ServiceFunctionGroup sfg,boolean isAdd){
  List<SfcServiceFunction> sfs=sfg.getSfcServiceFunction();
  SfName sfName=new SfName(sfs.get(0).getName());
  ServiceFunction sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
  SffName sffName=sf.getSfDataPlaneLocator().get(0).getServiceFunctionForwarder();
  String sffNodeId=null;
  sffNodeId=getSffOpenFlowNodeName(sffName);
  if (sffNodeId == null) {
    LOG.warn("String_Node_Str",sffName);
    return;
  }
  ServiceFunctionGroupAlgorithm algorithm=SfcProviderServiceFunctionGroupAlgAPI.readServiceFunctionGroupAlg(sfg.getAlgorithm());
  List<GroupBucketInfo> bucketsInfo=new ArrayList<>();
  ServiceFunctionForwarder sff=SfcProviderServiceForwarderAPI.readServiceFunctionForwarder(sffName);
  int index=0;
  for (  SfcServiceFunction sfcServiceFunction : sfg.getSfcServiceFunction()) {
    sfName=new SfName(sfcServiceFunction.getName());
    sf=SfcProviderServiceFunctionAPI.readServiceFunction(sfName);
    ServiceFunctionDictionary sffSfDict=sfcOfProviderUtils.getSffSfDictionary(sff,sfName);
    String outPort=sfcOfProviderUtils.getDictPortInfoPort(sff,sffSfDict);
    bucketsInfo.add(buildBucket(sf,outPort,index));
    index++;
  }
  this.sfcOfFlowProgrammer.configureGroup(sffName.getValue(),sffNodeId,sfg.getName(),sfg.getGroupId(),algorithm.getAlgorithmType().getIntValue(),bucketsInfo,isAdd);
}
Program: 132080
Project: 132080
Buggy source:
@Override protected void add(RenderedServicePaths newDataObject){
  LOG.info("String_Node_Str");
  newDataObject.getRenderedServicePath().forEach(rspProcessor::updateRsp);
}

Fixed version (ground truth):
@Override protected void add(RenderedServicePath newDataObject){
  LOG.info("String_Node_Str");
  this.rspProcessor.updateRsp(newDataObject);
}
Program: 132081
Project: 132081
Buggy source:
@Override protected void update(RenderedServicePaths originalDataObject,RenderedServicePaths updatedDataObject){
  LOG.info("String_Node_Str");
  updatedDataObject.getRenderedServicePath().forEach(rspProcessor::updateRsp);
}

Fixed version (ground truth):
@Override protected void update(RenderedServicePath originalDataObject,RenderedServicePath updatedDataObject){
}
Program: 132082
Project: 132082
Buggy source:
public RenderedPathListener(DataBroker dataBroker,VppRspProcessor rspProcessor){
  this.rspProcessor=rspProcessor;
  final DataTreeIdentifier<RenderedServicePaths> treeId=new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL,InstanceIdentifier.create(RenderedServicePaths.class));
  vppRspListenerRegistration=dataBroker.registerDataTreeChangeListener(treeId,this);
}

Fixed version (ground truth):
public RenderedPathListener(DataBroker dataBroker,VppRspProcessor rspProcessor){
  this.rspProcessor=rspProcessor;
  final DataTreeIdentifier<RenderedServicePath> treeId=new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL,InstanceIdentifier.create(RenderedServicePaths.class).child(RenderedServicePath.class));
  vppRspListenerRegistration=dataBroker.registerDataTreeChangeListener(treeId,this);
}
Program: 132083
Project: 132083
Buggy source:
@Override protected void remove(RenderedServicePaths removedDataObject){
  LOG.info("String_Node_Str");
  removedDataObject.getRenderedServicePath().forEach(rspProcessor::deleteRsp);
}

Fixed version (ground truth):
@Override protected void remove(RenderedServicePath removedDataObject){
  LOG.info("String_Node_Str");
  this.rspProcessor.deleteRsp(removedDataObject);
}
Program: 132085
Project: 132085
Buggy source:
public static void removeNshEntry(final DataBroker dataBroker,final Long nsp,final Short nsi,String vppNode){
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  final InstanceIdentifier<NshEntry> nshEntryIid=InstanceIdentifier.create(NshEntries.class).child(NshEntry.class,new NshEntryKey(buildNshEntryKey(nsp,nsi)));
  wTx.delete(LogicalDatastoreType.CONFIGURATION,nshEntryIid);
  addFuturesCallback(wTx);
}

Fixed version (ground truth):
public static void removeNshEntry(final DataBroker dataBroker,final Long nsp,final Short nsi,String vppNode){
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  String nshEntryKey=buildNshEntryKey(nsp,nsi);
  final InstanceIdentifier<NshEntry> nshEntryIid=InstanceIdentifier.create(VppNsh.class).child(NshEntries.class).child(NshEntry.class,new NshEntryKey(nshEntryKey));
  LOG.info("String_Node_Str",nshEntryKey,vppNode);
  wTx.delete(LogicalDatastoreType.CONFIGURATION,nshEntryIid);
  addFuturesCallback(wTx);
}
Program: 132086
Project: 132086
Buggy source:
public static void removeVxlanGpePort(final DataBroker dataBroker,final IpAddress local,final IpAddress remote,Long vni,String vppNode){
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  final KeyedInstanceIdentifier<Interface,InterfaceKey> interfaceIid=InstanceIdentifier.create(Interfaces.class).child(Interface.class,new InterfaceKey(buildVxlanGpePortKey(remote)));
  wTx.delete(LogicalDatastoreType.CONFIGURATION,interfaceIid);
  addFuturesCallback(wTx);
}

Fixed version (ground truth):
public static void removeVxlanGpePort(final DataBroker dataBroker,final IpAddress local,final IpAddress remote,Long vni,String vppNode){
  String interfaceKey=buildVxlanGpePortKey(remote);
  LOG.info("String_Node_Str",interfaceKey,vppNode);
  if (decrementVxlanGpeRefCnt(interfaceKey,vppNode) > 0) {
    return;
  }
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  final KeyedInstanceIdentifier<Interface,InterfaceKey> interfaceIid=InstanceIdentifier.create(Interfaces.class).child(Interface.class,new InterfaceKey(interfaceKey));
  LOG.info("String_Node_Str",interfaceKey,vppNode);
  wTx.delete(LogicalDatastoreType.CONFIGURATION,interfaceIid);
  addFuturesCallback(wTx);
}
Program: 132087
Project: 132087
Buggy source:
public static boolean removeClassifierVxlanGpeNsh(final DataBroker dataBroker,final SffName sffName,String bridgeDomainName,final IpAddress localIp,final IpAddress remoteIp,final Long nsp,final Short nsi){
  Long vni=0L;
  Short nextNsi=nsi;
  nextNsi--;
  removeVxlanGpePort(dataBroker,localIp,remoteIp,vni,sffName.getValue());
  removeNshEntry(dataBroker,nsp,nsi,sffName.getValue());
  removeNshMap(dataBroker,nsp,nsi,nsp,nextNsi,sffName.getValue());
  return true;
}

Fixed version (ground truth):
public static boolean removeClassifierVxlanGpeNsh(final DataBroker dataBroker,final SffName sffName,String bridgeDomainName,final IpAddress localIp,final IpAddress remoteIp,final Long nsp,final Short nsi){
  Long vni=0L;
  removeNshMap(dataBroker,nsp,nsi,nsp,nsi,sffName.getValue());
  removeNshEntry(dataBroker,nsp,nsi,sffName.getValue());
  removeVxlanGpePort(dataBroker,localIp,remoteIp,vni,sffName.getValue());
  return true;
}
Program: 132088
Project: 132088
Buggy source:
public static void removeNshMap(final DataBroker dataBroker,final Long nsp,final Short nsi,final Long mappedNsp,final Short mappedNsi,String vppNode){
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  final InstanceIdentifier<NshMap> nshMapIid=InstanceIdentifier.create(NshMaps.class).child(NshMap.class,new NshMapKey(buildNshMapKey(nsp,nsi,mappedNsp,mappedNsi)));
  wTx.delete(LogicalDatastoreType.CONFIGURATION,nshMapIid);
  addFuturesCallback(wTx);
}

Fixed version (ground truth):
public static void removeNshMap(final DataBroker dataBroker,final Long nsp,final Short nsi,final Long mappedNsp,final Short mappedNsi,String vppNode){
  final DataBroker vppDataBroker=dataBroker;
  final WriteTransaction wTx=vppDataBroker.newWriteOnlyTransaction();
  String nshMapKey=buildNshMapKey(nsp,nsi,mappedNsp,mappedNsi);
  final InstanceIdentifier<NshMap> nshMapIid=InstanceIdentifier.create(VppNsh.class).child(NshMaps.class).child(NshMap.class,new NshMapKey(nshMapKey));
  LOG.info("String_Node_Str",nshMapKey,vppNode);
  wTx.delete(LogicalDatastoreType.CONFIGURATION,nshMapIid);
  addFuturesCallback(wTx);
}
Program: 132090
Project: 132090
Buggy source:
public static boolean removeVxlanGpeNsh(final DataBroker dataBroker,final SffName sffName,final IpAddress localIp,final IpAddress remoteIp,final Long nsp,final Short nsi){
  Short nextNsi=nsi;
  nextNsi--;
  Long vni=0L;
  removeVxlanGpePort(dataBroker,localIp,remoteIp,vni,sffName.getValue());
  removeNshEntry(dataBroker,nsp,nsi,sffName.getValue());
  removeNshEntry(dataBroker,nsp,nextNsi,sffName.getValue());
  removeNshMap(dataBroker,nsp,nsi,nsp,nextNsi,sffName.getValue());
  return true;
}

Fixed version (ground truth):
public static boolean removeVxlanGpeNsh(final DataBroker dataBroker,final SffName sffName,final IpAddress localIp,final IpAddress remoteIp,final Long nsp,final Short nsi){
  Long vni=0L;
  removeNshMap(dataBroker,nsp,nsi,nsp,nsi,sffName.getValue());
  removeNshEntry(dataBroker,nsp,nsi,sffName.getValue());
  removeVxlanGpePort(dataBroker,localIp,remoteIp,vni,sffName.getValue());
  return true;
}
Program: 132091
Project: 132091
Buggy source:
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  LOG.info("String_Node_Str");
  try {
    if (sfcOfFlowProgrammer != null) {
      sfcOfFlowProgrammer.shutdown();
    }
    if (pktInRegistration != null) {
      pktInRegistration.close();
    }
    openflowRspDataListener.close();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws Exception {
  LOG.info("String_Node_Str");
  try {
    if (sfcOfFlowProgrammer != null) {
      sfcOfFlowProgrammer.shutdown();
    }
    if (pktInRegistration != null) {
      pktInRegistration.close();
    }
    openflowRspDataListener.close();
  }
  finally {
    openflowRspDataListener=null;
  }
}
Program: 132092
Project: 132092
Buggy source:
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  LOG.info("String_Node_Str");
  try {
    if (sfcOfFlowProgrammer != null) {
      sfcOfFlowProgrammer.shutdown();
    }
    if (pktInRegistration != null) {
      pktInRegistration.close();
    }
    openflowRspDataListener.close();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws Exception {
  LOG.info("String_Node_Str");
  try {
    if (sfcOfFlowProgrammer != null) {
      sfcOfFlowProgrammer.shutdown();
    }
    if (pktInRegistration != null) {
      pktInRegistration.close();
    }
    openflowRspDataListener.close();
  }
  finally {
    openflowRspDataListener=null;
  }
}
Program: 132093
Project: 132093
Buggy source:
public boolean isCapableNetconfDevice(Node node){
  NetconfNode netconfAugmentation=node.getAugmentation(NetconfNode.class);
  if (netconfAugmentation == null) {
    LOG.debug("String_Node_Str",node.getNodeId().getValue());
    return false;
  }
  AvailableCapabilities capabilities=netconfAugmentation.getAvailableCapabilities();
  return capabilities != null && capabilities.getAvailableCapability().containsAll(requiredCapabilities);
}

Fixed version (ground truth):
public boolean isCapableNetconfDevice(Node node){
  boolean ret=false;
  NetconfNode netconfAugmentation=node.getAugmentation(NetconfNode.class);
  if (netconfAugmentation == null) {
    LOG.debug("String_Node_Str",node.getNodeId().getValue());
    return ret;
  }
  AvailableCapabilities capabilities=netconfAugmentation.getAvailableCapabilities();
  if (capabilities != null) {
    List<String> availCapabilities=capabilities.getAvailableCapability().stream().map(AvailableCapability::getCapability).collect(Collectors.toList());
    ret=availCapabilities.containsAll(requiredCapabilities);
  }
  if (ret == false) {
    LOG.debug("String_Node_Str",node.getNodeId().getValue());
  }
  return ret;
}
Program: 132094
Project: 132094
Buggy source:
public void updateNode(Node node){
  NetconfNode netconfNode=node.getAugmentation(NetconfNode.class);
  Preconditions.checkNotNull(netconfNode);
  ConnectionStatus connectionStatus=netconfNode.getConnectionStatus();
  NodeId netconfNodeId=node.getNodeId();
  if (connectionStatus.equals(ConnectionStatus.Connected)) {
    InstanceIdentifier mountPointIid=getMountPointIid(netconfNodeId);
    DataBroker dataBroker=getNetconfNodeDataBroker(mountPointIid);
    if (dataBroker != null) {
      LOG.info("String_Node_Str",node.getNodeId().getValue());
      connectedNodes.put(netconfNodeId,node);
      activeMountPoints.put(netconfNodeId,dataBroker);
    }
 else {
      LOG.debug("String_Node_Str",netconfNodeId.getValue());
    }
  }
}

Fixed version (ground truth):
public void updateNode(Node node){
  NetconfNode netconfNode=node.getAugmentation(NetconfNode.class);
  Preconditions.checkNotNull(netconfNode);
  ConnectionStatus connectionStatus=netconfNode.getConnectionStatus();
  NodeId netconfNodeId=node.getNodeId();
  if (connectionStatus.equals(ConnectionStatus.Connected)) {
    InstanceIdentifier mountPointIid=getMountPointIid(netconfNodeId);
    DataBroker dataBroker=getNetconfNodeDataBroker(mountPointIid);
    if (dataBroker != null) {
      LOG.info("String_Node_Str",node.getNodeId().getValue());
      connectedNodes.put(netconfNodeId,node);
      activeMountPoints.put(netconfNodeId,dataBroker);
    }
 else {
      LOG.debug("String_Node_Str",netconfNodeId.getValue());
    }
  }
 else {
    LOG.debug("String_Node_Str",node.getNodeId().getValue());
  }
}
Program: 132095
Project: 132095
Buggy source:
public SfcScfOfDataListener(final DataBroker dataBroker,SfcScfOfProcessor sfcScfProcessor){
  this.dataBroker=dataBroker;
  this.sfcScfProcessor=sfcScfProcessor;
}

Fixed version (ground truth):
public SfcScfOfDataListener(final DataBroker dataBroker,SfcScfOfProcessor sfcScfProcessor){
  this.dataBroker=dataBroker;
  this.sfcScfProcessor=sfcScfProcessor;
  init();
}
Program: 132096
Project: 132096
Buggy source:
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  LOG.info("String_Node_Str");
  try {
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Implemented from the AutoCloseable interface.
 */
@Override public void close() throws ExecutionException, InterruptedException {
  LOG.info("String_Node_Str");
  try {
    sfcScfDataListener.close();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e.getMessage());
  }
}
Program: 132097
Project: 132097
Buggy source:
@Test public void pktInPurgeBuffering() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(2);
  PacketReceived pkt=createPacket();
  assertEquals(this.pktInHandler.getBufferSize(),0);
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
  Thread.sleep(1);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
}

Fixed version (ground truth):
@Test public void pktInPurgeBuffering() throws InterruptedException {
  this.pktInHandler.setMaxBufferTime(1);
  this.pktInHandler.setPacketCountPurge(2);
  PacketReceived pkt=createPacket();
  assertEquals(this.pktInHandler.getBufferSize(),0);
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
  Thread.sleep(10);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  assertEquals(this.pktInHandler.getBufferSize(),1);
}
Program: 132098
Project: 132098
Buggy source:
@Test public void pktInBuffering(){
  this.pktInHandler.setMaxBufferTime(10000000);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}

Fixed version (ground truth):
@Test public void pktInBuffering(){
  this.pktInHandler.setMaxBufferTime(10000);
  this.pktInHandler.setPacketCountPurge(1000);
  PacketReceived pkt=createPacket();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(2)).setFlowRspId(anyLong());
  verify(this.flowProgrammerMock,times(2)).configurePathMapperAclFlow(anyString(),anyString(),anyString(),anyShort());
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
  resetFlowProgrammerMock();
  this.pktInHandler.onPacketReceived(pkt);
  verify(this.flowProgrammerMock,times(1)).compareClassificationTableCookie((FlowCookie)anyObject());
  verifyNoMoreInteractions(this.flowProgrammerMock);
}