nus-yam/ex-repair huggingface dataset:
Program: 37899
Project: 37899
Buggy source:
private void handleIslEvent(IslInfoData isl,Tuple tuple,String correlationId){
  logger.debug("String_Node_Str",isl.getId(),isl.getState());
  Set<ImmutablePair<Flow,Flow>> affectedFlows;
switch (isl.getState()) {
case DISCOVERED:
    if (networkCache.cacheContainsIsl(isl.getId())) {
      networkCache.updateIsl(isl);
    }
 else {
      networkCache.createIsl(isl);
    }
  break;
case FAILED:
case MOVED:
try {
  networkCache.deleteIsl(isl.getId());
}
 catch (CacheException exception) {
  logger.warn("String_Node_Str",exception.getErrorMessage(),exception.getErrorDescription());
}
affectedFlows=flowCache.getActiveFlowsWithAffectedPath(isl);
String reason=String.format("String_Node_Str",isl.getId());
emitRerouteCommands(affectedFlows,tuple,correlationId,FlowOperation.UPDATE,reason);
break;
case OTHER_UPDATE:
break;
case CACHED:
break;
default :
logger.warn("String_Node_Str");
break;
}
}

Fixed version (ground truth):
private void handleIslEvent(IslInfoData isl,Tuple tuple,String correlationId){
  logger.debug("String_Node_Str",isl.getId(),isl.getState());
  Set<ImmutablePair<Flow,Flow>> affectedFlows;
switch (isl.getState()) {
case DISCOVERED:
    if (networkCache.cacheContainsIsl(isl.getId())) {
      networkCache.updateIsl(isl);
    }
 else {
      if (networkCache.isSelfLoopedIsl(isl)) {
        logger.warn("String_Node_Str",isl);
      }
 else {
        networkCache.createIsl(isl);
      }
    }
  break;
case FAILED:
case MOVED:
try {
  networkCache.deleteIsl(isl.getId());
}
 catch (CacheException exception) {
  logger.warn("String_Node_Str",exception.getErrorMessage(),exception.getErrorDescription());
}
affectedFlows=flowCache.getActiveFlowsWithAffectedPath(isl);
String reason=String.format("String_Node_Str",isl.getId());
emitRerouteCommands(affectedFlows,tuple,correlationId,FlowOperation.UPDATE,reason);
break;
case OTHER_UPDATE:
break;
case CACHED:
break;
default :
logger.warn("String_Node_Str");
break;
}
}
Program: 37900
Project: 37900
Buggy source:
private void initNetwork(){
  logger.info("String_Node_Str");
  Set<SwitchInfoData> switches=new HashSet<>(pathComputer.getSwitches());
  Set<IslInfoData> links=new HashSet<>(pathComputer.getIsls());
  logger.info("String_Node_Str",switches.size());
  logger.info("String_Node_Str",links.size());
  switches.forEach(networkCache::createOrUpdateSwitch);
  for (  IslInfoData isl : links) {
    try {
      networkCache.createOrUpdateIsl(isl);
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",isl,e);
    }
  }
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
private void initNetwork(){
  logger.info("String_Node_Str");
  Set<SwitchInfoData> switches=new HashSet<>(pathComputer.getSwitches());
  Set<IslInfoData> links=new HashSet<>(pathComputer.getIsls());
  logger.info("String_Node_Str",switches.size());
  logger.info("String_Node_Str",links.size());
  switches.forEach(networkCache::createOrUpdateSwitch);
  for (  IslInfoData isl : links) {
    try {
      if (networkCache.isSelfLoopedIsl(isl)) {
        logger.warn("String_Node_Str",isl);
      }
 else {
        networkCache.createOrUpdateIsl(isl);
      }
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",isl,e);
    }
  }
  logger.info("String_Node_Str");
}
Program: 37901
Project: 37901
Buggy source:
public IslInfoData(@JsonProperty("String_Node_Str") List<PathNode> path,@JsonProperty("String_Node_Str") IslChangeType state){
  this.path=path;
  this.state=state;
  this.id=String.format("String_Node_Str",path.get(0).getSwitchId(),String.valueOf(path.get(0).getPortNo()));
}

Fixed version (ground truth):
/** 
 * Simple constructor for an ISL with only path and state.
 * @param path path of ISL.
 * @param state current state.
 */
public IslInfoData(@JsonProperty("String_Node_Str") List<PathNode> path,@JsonProperty("String_Node_Str") IslChangeType state){
  this.path=path;
  this.state=state;
  this.id=String.format("String_Node_Str",path.get(0).getSwitchId(),String.valueOf(path.get(0).getPortNo()));
}
Program: 37902
Project: 37902
Buggy source:
@JsonCreator public DiscoveryLink(@JsonProperty("String_Node_Str") final String srcSwitch,@JsonProperty("String_Node_Str") final int srcPort,@JsonProperty("String_Node_Str") final String dstSwitch,@JsonProperty("String_Node_Str") final int dstPort,@JsonProperty("String_Node_Str") final int attempts,@JsonProperty("String_Node_Str") final int timeCounter,@JsonProperty("String_Node_Str") final int checkInterval,@JsonProperty("String_Node_Str") final int consecutiveFailure,@JsonProperty("String_Node_Str") final int consecutiveSuccess,@JsonProperty("String_Node_Str") final int maxAttempts){
  this.srcEndpoint=new NetworkEndpoint(srcSwitch,srcPort);
  this.dstEndpoint=new NetworkEndpoint(dstSwitch,dstPort);
  this.attempts=attempts;
  this.timeCounter=timeCounter;
  this.checkInterval=checkInterval;
  this.maxAttempts=maxAttempts;
  this.consecutiveFailure=consecutiveFailure;
  this.consecutiveSuccess=consecutiveSuccess;
}

Fixed version (ground truth):
/** 
 * Main constructor using for deserialization by jackson.
 */
@JsonCreator public DiscoveryLink(@JsonProperty("String_Node_Str") final String srcSwitch,@JsonProperty("String_Node_Str") final int srcPort,@JsonProperty("String_Node_Str") final String dstSwitch,@JsonProperty("String_Node_Str") final int dstPort,@JsonProperty("String_Node_Str") final int attempts,@JsonProperty("String_Node_Str") final int timeCounter,@JsonProperty("String_Node_Str") final int checkInterval,@JsonProperty("String_Node_Str") final int consecutiveFailure,@JsonProperty("String_Node_Str") final int consecutiveSuccess,@JsonProperty("String_Node_Str") final int maxAttempts,@JsonProperty("String_Node_Str") final boolean active){
  this.srcEndpoint=new NetworkEndpoint(srcSwitch,srcPort);
  this.dstEndpoint=new NetworkEndpoint(dstSwitch,dstPort);
  this.attempts=attempts;
  this.timeCounter=timeCounter;
  this.checkInterval=checkInterval;
  this.maxAttempts=maxAttempts;
  this.consecutiveFailure=consecutiveFailure;
  this.consecutiveSuccess=consecutiveSuccess;
  this.active=active;
}
Program: 37903
Project: 37903
Buggy source:
/** 
 * @return true if link should be excluded from discovery plan and discovery packets should not be sent.
 */
public boolean isExcludedFromDiscovery(){
  if (maxAttempts == ENDLESS_ATTEMPTS) {
    return false;
  }
  return consecutiveFailure > maxAttempts;
}

Fixed version (ground truth):
/** 
 * Checks if ISL should be excluded from discovery.
 * @return true if link should be excluded from discovery plan and discovery packets should not be sent.
 */
public boolean isExcludedFromDiscovery(){
  if (maxAttempts == ENDLESS_ATTEMPTS) {
    return false;
  }
  return consecutiveFailure > maxAttempts;
}
Program: 37904
Project: 37904
Buggy source:
/** 
 * @return true if attempts is greater than attemptLimit.
 */
public boolean maxAttempts(Integer attemptLimit){
  return attemptLimit < attempts;
}

Fixed version (ground truth):
/** 
 * Check if we should stop to verify ISL.
 * @return true if attempts is greater than attemptLimit.
 */
public boolean maxAttempts(Integer attemptLimit){
  return attemptLimit < attempts;
}
Program: 37905
Project: 37905
Buggy source:
public boolean isDestinationChanged(String dstSwitch,int dstPort){
  if (this.dstEndpoint == null) {
    return false;
  }
  return !Objects.equals(this.dstEndpoint,new NetworkEndpoint(dstSwitch,dstPort));
}

Fixed version (ground truth):
/** 
 * Checks whether destination switch/port of that link differs.
 * @param dstSwitch destination switch.
 * @param dstPort destination port.
 * @return true if destination changed.
 */
public boolean isDestinationChanged(String dstSwitch,int dstPort){
  if (this.dstEndpoint == null) {
    return false;
  }
  return !Objects.equals(this.dstEndpoint,new NetworkEndpoint(dstSwitch,dstPort));
}
Program: 37907
Project: 37907
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  IslLinkInfo other=(IslLinkInfo)obj;
  if (dstPort != other.dstPort && dstPort != other.srcPort)   return false;
  if (dstSwitch == null) {
    if (other.dstSwitch != null && other.srcSwitch != null)     return false;
  }
 else   if (!dstSwitch.equals(other.dstSwitch) && !dstSwitch.equals(other.srcSwitch))   return false;
  if (srcPort != other.srcPort && srcPort != other.dstPort)   return false;
  if (srcSwitch == null) {
    if (other.srcSwitch != null && other.dstSwitch != null)     return false;
  }
 else   if (!srcSwitch.equals(other.srcSwitch) && !srcSwitch.equals(other.dstSwitch))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  IslLinkInfo other=(IslLinkInfo)obj;
  if (dstSwitch.equals(other.srcSwitch) && srcPort == other.dstPort && srcSwitch.equals(other.dstSwitch) && dstPort == other.srcPort) {
    return true;
  }
 else {
    return false;
  }
}
Program: 37908
Project: 37908
Buggy source:
@JsonCreator public DiscoveryFilterEntity(@JsonProperty("String_Node_Str") String switchId,@JsonProperty("String_Node_Str") String portId){
  this.switchId=switchId;
  this.portId=portId;
}

Fixed version (ground truth):
@JsonCreator public DiscoveryFilterEntity(@JsonProperty("String_Node_Str") String switchId,@JsonProperty("String_Node_Str") int portId){
  this.switchId=switchId;
  this.portId=portId;
}
Program: 37909
Project: 37909
Buggy source:
@JsonCreator public OFELinkBoltState(@JsonProperty("String_Node_Str") List<DiscoveryNode> discovery,@JsonProperty("String_Node_Str") Set<?> filtered){
  this.discovery=discovery;
  this.filtered=filtered;
}

Fixed version (ground truth):
@JsonCreator public OFELinkBoltState(@JsonProperty("String_Node_Str") List<DiscoveryLink> discovery,@JsonProperty("String_Node_Str") Set<?> filtered){
  this.discovery=discovery;
  this.filtered=filtered;
}
Program: 37910
Project: 37910
Buggy source:
public static String createIslFail(String switchId,String portId) throws IOException {
  PathNode node=new PathNode(switchId,Integer.parseInt(portId),0,0L);
  InfoData data=new IslInfoData(0L,Collections.singletonList(node),0L,IslChangeType.FAILED,0L);
  InfoMessage message=new InfoMessage(data,System.currentTimeMillis(),UUID.randomUUID().toString());
  return MAPPER.writeValueAsString(message);
}

Fixed version (ground truth):
public static String createIslFail(String switchId,int portId) throws IOException {
  PathNode node=new PathNode(switchId,portId,0,0L);
  InfoData data=new IslInfoData(0L,Collections.singletonList(node),0L,IslChangeType.FAILED,0L);
  InfoMessage message=new InfoMessage(data,System.currentTimeMillis(),UUID.randomUUID().toString());
  return MAPPER.writeValueAsString(message);
}
Program: 37911
Project: 37911
Buggy source:
/** 
 * @return a JSON string that can be used to for link event
 */
public static String createIslDiscovery(String switchID,String portID) throws IOException {
  CommandMessage message=new CommandMessage(new DiscoverIslCommandData(switchID,Integer.valueOf(portID)),System.currentTimeMillis(),"String_Node_Str",Destination.CONTROLLER);
  return MAPPER.writeValueAsString(message);
}

Fixed version (ground truth):
/** 
 * @return a JSON string that can be used to for link event
 */
public static String createIslDiscovery(String switchId,int portId) throws IOException {
  CommandMessage message=new CommandMessage(new DiscoverIslCommandData(switchId,portId),System.currentTimeMillis(),"String_Node_Str",Destination.CONTROLLER);
  return MAPPER.writeValueAsString(message);
}
Program: 37912
Project: 37912
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ImmutablePair<PathInfoData,PathInfoData> getPath(Flow flow,Strategy strategy) throws UnroutablePathException, RecoverableException {
  long latency=0L;
  List<PathNode> forwardNodes=new LinkedList<>();
  List<PathNode> reverseNodes=new LinkedList<>();
  if (!flow.isOneSwitchFlow()) {
    try {
      Pair<LinkedList<SimpleIsl>,LinkedList<SimpleIsl>> biPath=getPathFromNetwork(flow,strategy);
      if (biPath.getLeft().size() == 0 || biPath.getRight().size() == 0)       throw new UnroutablePathException(flow);
      int seqId=0;
      LinkedList<SimpleIsl> forwardIsl=biPath.getLeft();
      for (      SimpleIsl isl : forwardIsl) {
        latency+=isl.latency;
        forwardNodes.add(new PathNode(isl.src_dpid,isl.src_port,seqId++,(long)isl.latency));
        forwardNodes.add(new PathNode(isl.dst_dpid,isl.dst_port,seqId++,0L));
      }
      seqId=0;
      LinkedList<SimpleIsl> reverseIsl=biPath.getLeft();
      for (      SimpleIsl isl : reverseIsl) {
        reverseNodes.add(new PathNode(isl.src_dpid,isl.src_port,seqId++,(long)isl.latency));
        reverseNodes.add(new PathNode(isl.dst_dpid,isl.dst_port,seqId++,0L));
      }
    }
 catch (    TransientException e) {
      throw new RecoverableException("String_Node_Str",e);
    }
catch (    ClientException e) {
      throw new RecoverableException("String_Node_Str",e);
    }
  }
 else {
    logger.info("String_Node_Str");
  }
  return new ImmutablePair<>(new PathInfoData(latency,forwardNodes),new PathInfoData(latency,reverseNodes));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ImmutablePair<PathInfoData,PathInfoData> getPath(Flow flow,Strategy strategy) throws UnroutablePathException, RecoverableException {
  long latency=0L;
  List<PathNode> forwardNodes=new LinkedList<>();
  List<PathNode> reverseNodes=new LinkedList<>();
  if (!flow.isOneSwitchFlow()) {
    try {
      Pair<LinkedList<SimpleIsl>,LinkedList<SimpleIsl>> biPath=getPathFromNetwork(flow,strategy);
      if (biPath.getLeft().size() == 0 || biPath.getRight().size() == 0)       throw new UnroutablePathException(flow);
      int seqId=0;
      LinkedList<SimpleIsl> forwardIsl=biPath.getLeft();
      for (      SimpleIsl isl : forwardIsl) {
        latency+=isl.latency;
        forwardNodes.add(new PathNode(isl.src_dpid,isl.src_port,seqId++,(long)isl.latency));
        forwardNodes.add(new PathNode(isl.dst_dpid,isl.dst_port,seqId++,0L));
      }
      seqId=0;
      LinkedList<SimpleIsl> reverseIsl=biPath.getRight();
      for (      SimpleIsl isl : reverseIsl) {
        reverseNodes.add(new PathNode(isl.src_dpid,isl.src_port,seqId++,(long)isl.latency));
        reverseNodes.add(new PathNode(isl.dst_dpid,isl.dst_port,seqId++,0L));
      }
    }
 catch (    TransientException e) {
      throw new RecoverableException("String_Node_Str",e);
    }
catch (    ClientException e) {
      throw new RecoverableException("String_Node_Str",e);
    }
  }
 else {
    logger.info("String_Node_Str");
  }
  return new ImmutablePair<>(new PathInfoData(latency,forwardNodes),new PathInfoData(latency,reverseNodes));
}
Program: 37913
Project: 37913
Buggy source:
/** 
 * Dumps all flows. Dumps all flows with specific status if specified.
 * @return list of flow
 */
@ApiOperation(value="String_Node_Str",response=FlowPayload.class) @ApiResponse(code=200,response=FlowPayload.class,responseContainer="String_Node_Str",message="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<List<FlowPayload>> getFlows(){
  List<FlowPayload> response=flowService.getFlows();
  return new ResponseEntity<>(response,new HttpHeaders(),HttpStatus.OK);
}

Fixed version (ground truth):
/** 
 * Dumps all flows. Dumps all flows with specific status if specified.
 * @return list of flow
 */
@ApiOperation(value="String_Node_Str",response=FlowPayload.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=FlowPayload.class,responseContainer="String_Node_Str",message="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<List<FlowPayload>> getFlows(){
  List<FlowPayload> response=flowService.getFlows();
  return new ResponseEntity<>(response,new HttpHeaders(),HttpStatus.OK);
}
Program: 37914
Project: 37914
Buggy source:
/** 
 * Delete all flows.
 * @return list of flows that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=FlowPayload.class) @ApiResponse(code=200,response=FlowPayload.class,responseContainer="String_Node_Str",message="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired @SuppressWarnings("String_Node_Str") public ResponseEntity<List<FlowPayload>> deleteFlows(@RequestHeader(value=EXTRA_AUTH,defaultValue="String_Node_Str") long extra_auth){
  long current_auth=System.currentTimeMillis();
  if (Math.abs(current_auth - extra_auth) > 120 * 1000) {
    return new ResponseEntity("String_Node_Str" + current_auth,new HttpHeaders(),HttpStatus.UNAUTHORIZED);
  }
  List<FlowPayload> response=flowService.deleteFlows();
  return new ResponseEntity<>(response,new HttpHeaders(),HttpStatus.OK);
}

Fixed version (ground truth):
/** 
 * Delete all flows.
 * @return list of flows that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=FlowPayload.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=FlowPayload.class,responseContainer="String_Node_Str",message="String_Node_Str") @RequestMapping(value="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired @SuppressWarnings("String_Node_Str") public ResponseEntity<List<FlowPayload>> deleteFlows(@RequestHeader(value=EXTRA_AUTH,defaultValue="String_Node_Str") long extra_auth){
  long current_auth=System.currentTimeMillis();
  if (Math.abs(current_auth - extra_auth) > 120 * 1000) {
    return new ResponseEntity("String_Node_Str" + current_auth,new HttpHeaders(),HttpStatus.UNAUTHORIZED);
  }
  List<FlowPayload> response=flowService.deleteFlows();
  return new ResponseEntity<>(response,new HttpHeaders(),HttpStatus.OK);
}
Program: 37915
Project: 37915
Buggy source:
/** 
 * Compares the Flow from the DB to what is on each switch.
 * @param flowId id of flow to be rerouted.
 * @return flow payload with updated path.
 */
@ApiOperation(value="String_Node_Str",response=FlowValidationDto.class,responseContainer="String_Node_Str") @ApiResponses(value={@ApiResponse(code=200,response=FlowValidationDto.class,message="String_Node_Str")}) @RequestMapping(path="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public ResponseEntity<List<FlowValidationDto>> validateFlow(@PathVariable("String_Node_Str") String flowId){
  logger.debug("String_Node_Str",flowId);
  ResponseEntity<List<FlowValidationDto>> response;
  try {
    List<FlowValidationDto> result=flowService.validateFlow(flowId);
    if (result == null) {
      logger.info("String_Node_Str",flowId);
      response=ResponseEntity.notFound().build();
    }
 else {
      response=ResponseEntity.ok(result);
    }
  }
 catch (  InvalidPathException e) {
    logger.error("String_Node_Str",flowId);
    logger.error(e.getMessage());
    response=ResponseEntity.notFound().build();
  }
  return response;
}

Fixed version (ground truth):
/** 
 * Compares the Flow from the DB to what is on each switch.
 * @param flowId id of flow to be rerouted.
 * @return flow payload with updated path.
 */
@ApiOperation(value="String_Node_Str",response=FlowValidationDto.class,responseContainer="String_Node_Str") @ApiResponses(value={@ApiResponse(code=200,response=FlowValidationDto.class,responseContainer="String_Node_Str",message="String_Node_Str")}) @RequestMapping(path="String_Node_Str",method=RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public ResponseEntity<List<FlowValidationDto>> validateFlow(@PathVariable("String_Node_Str") String flowId){
  logger.debug("String_Node_Str",flowId);
  ResponseEntity<List<FlowValidationDto>> response;
  try {
    List<FlowValidationDto> result=flowService.validateFlow(flowId);
    if (result == null) {
      logger.info("String_Node_Str",flowId);
      response=ResponseEntity.notFound().build();
    }
 else {
      response=ResponseEntity.ok(result);
    }
  }
 catch (  InvalidPathException e) {
    logger.error("String_Node_Str",flowId);
    logger.error(e.getMessage());
    response=ResponseEntity.notFound().build();
  }
  return response;
}
Program: 37916
Project: 37916
Buggy source:
/** 
 * Get all available links.
 * @return list of links.
 */
@ApiOperation(value="String_Node_Str",response=LinksDto.class) @ApiResponses(value={@ApiResponse(code=200,response=LinksDto.class,message="String_Node_Str"),@ApiResponse(code=400,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=401,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=403,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=404,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=500,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=503,response=MessageError.class,message="String_Node_Str")}) @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public List<LinksDto> getLinks(){
  return linkService.getLinks();
}

Fixed version (ground truth):
/** 
 * Get all available links.
 * @return list of links.
 */
@ApiOperation(value="String_Node_Str",response=LinksDto.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=LinksDto.class,responseContainer="String_Node_Str",message="String_Node_Str") @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public List<LinksDto> getLinks(){
  return linkService.getLinks();
}
Program: 37917
Project: 37917
Buggy source:
/** 
 * Delete link properties from the static link properties table.
 * @param keysAndProps if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsResult.class) @ApiResponses(value={@ApiResponse(code=200,response=LinkPropsResult.class,message="String_Node_Str"),@ApiResponse(code=400,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=401,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=403,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=404,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=500,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=503,response=MessageError.class,message="String_Node_Str")}) @RequestMapping(path="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public LinkPropsResult delLinkProps(@RequestBody List<LinkPropsDto> keysAndProps){
  return linkService.delLinkProps(keysAndProps);
}

Fixed version (ground truth):
/** 
 * Delete link properties from the static link properties table.
 * @param keysAndProps if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsResult.class) @ApiResponse(code=200,response=LinkPropsResult.class,message="String_Node_Str") @RequestMapping(path="String_Node_Str",method=RequestMethod.DELETE,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public LinkPropsResult delLinkProps(@RequestBody List<LinkPropsDto> keysAndProps){
  return linkService.delLinkProps(keysAndProps);
}
Program: 37918
Project: 37918
Buggy source:
/** 
 * Create/Update link properties in the static link properties table.
 * @param keysAndProps if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsResult.class) @ApiResponses(value={@ApiResponse(code=200,response=LinkPropsResult.class,message="String_Node_Str"),@ApiResponse(code=400,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=401,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=403,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=404,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=500,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=503,response=MessageError.class,message="String_Node_Str")}) @RequestMapping(path="String_Node_Str",method=RequestMethod.PUT,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public LinkPropsResult putLinkProps(@RequestBody List<LinkPropsDto> keysAndProps){
  return linkService.setLinkProps(keysAndProps);
}

Fixed version (ground truth):
/** 
 * Create/Update link properties in the static link properties table.
 * @param keysAndProps if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsResult.class) @ApiResponse(code=200,response=LinkPropsResult.class,message="String_Node_Str") @RequestMapping(path="String_Node_Str",method=RequestMethod.PUT,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public LinkPropsResult putLinkProps(@RequestBody List<LinkPropsDto> keysAndProps){
  return linkService.setLinkProps(keysAndProps);
}
Program: 37919
Project: 37919
Buggy source:
/** 
 * Get link properties from the static link properties table.
 * @param keys if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsDto.class) @ApiResponses(value={@ApiResponse(code=200,response=LinkPropsDto.class,message="String_Node_Str"),@ApiResponse(code=400,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=401,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=403,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=404,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=500,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=503,response=MessageError.class,message="String_Node_Str")}) @RequestMapping(path="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public List<LinkPropsDto> getLinkProps(LinkPropsDto keys){
  return linkService.getLinkProps(keys);
}

Fixed version (ground truth):
/** 
 * Get link properties from the static link properties table.
 * @param keys if null, get all link props. Otherwise, the link props that much the primary keys.
 * @return list of link properties.
 */
@ApiOperation(value="String_Node_Str",response=LinkPropsDto.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=LinkPropsDto.class,responseContainer="String_Node_Str",message="String_Node_Str") @RequestMapping(path="String_Node_Str",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public List<LinkPropsDto> getLinkProps(LinkPropsDto keys){
  return linkService.getLinkProps(keys);
}
Program: 37920
Project: 37920
Buggy source:
/** 
 * Delete switch rules.
 * @param switchId switch id to delete rules from
 * @param deleteAction defines what to do about the default rules
 * @param oneCookie the cookie to use if deleting one rule (could be any rule)
 * @return list of the cookies of the rules that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=Long.class,responseContainer="String_Node_Str") @DeleteMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired public ResponseEntity deleteSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str" + "String_Node_Str" + "String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<DeleteRulesAction> deleteAction,@RequestParam("String_Node_Str") Optional<Long> oneCookie){
  List<Long> response=switchService.deleteRules(switchId,deleteAction.orElse(DeleteRulesAction.IGNORE),oneCookie.orElse(0L));
  return ResponseEntity.ok(response);
}

Fixed version (ground truth):
/** 
 * Delete switch rules.
 * @param switchId switch id to delete rules from
 * @param deleteAction defines what to do about the default rules
 * @param oneCookie the cookie to use if deleting one rule (could be any rule)
 * @return list of the cookies of the rules that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=Long.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=Long.class,responseContainer="String_Node_Str",message="String_Node_Str") @DeleteMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired public ResponseEntity<List<Long>> deleteSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str" + "String_Node_Str" + "String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<DeleteRulesAction> deleteAction,@RequestParam("String_Node_Str") Optional<Long> oneCookie){
  List<Long> response=switchService.deleteRules(switchId,deleteAction.orElse(DeleteRulesAction.IGNORE),oneCookie.orElse(0L));
  return ResponseEntity.ok(response);
}
Program: 37921
Project: 37921
Buggy source:
/** 
 * Get switch rules.
 * @param switchId the switch
 * @param cookie filter the response based on this cookie
 * @return list of the cookies of the rules that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=Long.class,responseContainer="String_Node_Str") @GetMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public SwitchFlowEntries getSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<Long> cookie){
  SwitchFlowEntries response=switchService.getRules(switchId,cookie.orElse(0L));
  return response;
}

Fixed version (ground truth):
/** 
 * Get switch rules.
 * @param switchId the switch
 * @param cookie filter the response based on this cookie
 * @return list of the cookies of the rules that have been deleted
 */
@ApiOperation(value="String_Node_Str",response=SwitchFlowEntries.class) @ApiResponse(code=200,response=SwitchFlowEntries.class,message="String_Node_Str") @GetMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(HttpStatus.OK) public SwitchFlowEntries getSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<Long> cookie){
  SwitchFlowEntries response=switchService.getRules(switchId,cookie.orElse(0L));
  return response;
}
Program: 37922
Project: 37922
Buggy source:
/** 
 * Get all available links.
 * @return list of links.
 */
@ApiOperation(value="String_Node_Str",response=SwitchDto.class) @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public List<SwitchDto> getSwitches(){
  return switchService.getSwitches();
}

Fixed version (ground truth):
/** 
 * Get all available links.
 * @return list of links.
 */
@ApiOperation(value="String_Node_Str",response=SwitchDto.class,responseContainer="String_Node_Str") @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public List<SwitchDto> getSwitches(){
  return switchService.getSwitches();
}
Program: 37923
Project: 37923
Buggy source:
/** 
 * Install switch rules.
 * @param switchId switch id to delete rules from
 * @param installAction defines what to do about the default rules
 * @return list of the cookies of the rules that have been installed
 */
@ApiOperation(value="String_Node_Str",response=String.class,responseContainer="String_Node_Str") @PutMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired public ResponseEntity installSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str" + "String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<InstallRulesAction> installAction){
  List<Long> response=switchService.installRules(switchId,installAction.orElse(InstallRulesAction.INSTALL_DEFAULTS));
  return ResponseEntity.ok(response);
}

Fixed version (ground truth):
/** 
 * Install switch rules.
 * @param switchId switch id to delete rules from
 * @param installAction defines what to do about the default rules
 * @return list of the cookies of the rules that have been installed
 */
@ApiOperation(value="String_Node_Str",response=Long.class,responseContainer="String_Node_Str") @ApiResponse(code=200,response=Long.class,responseContainer="String_Node_Str",message="String_Node_Str") @PutMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) @ExtraAuthRequired public ResponseEntity<List<Long>> installSwitchRules(@PathVariable("String_Node_Str") String switchId,@ApiParam(value="String_Node_Str" + "String_Node_Str",required=false) @RequestParam("String_Node_Str") Optional<InstallRulesAction> installAction){
  List<Long> response=switchService.installRules(switchId,installAction.orElse(InstallRulesAction.INSTALL_DEFAULTS));
  return ResponseEntity.ok(response);
}
Program: 37924
Project: 37924
Buggy source:
/** 
 * Toggle the global behavior of Floodlight when the switch connects: - AUTO - this is the default. Installs all default rules when a switch connects - SAFE - add the default rules slowly .. monitoring traffic on existing rules - MANUAL - don't install any default rules. Call addRule for that. NOTE: no action is taking with existing, connected switches. This operation will only affect future connections
 * @param mode the connectMode to use. A Null value is a No-Op and can be used to return existing value.
 * @return the value of the toggle in Floodlight.
 */
@ApiOperation(value="String_Node_Str",response=ConnectModeRequest.Mode.class) @PutMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity toggleSwitchConnectMode(@RequestParam("String_Node_Str") ConnectModeRequest.Mode mode){
  ConnectModeRequest.Mode response=switchService.connectMode(mode);
  return ResponseEntity.ok(response);
}

Fixed version (ground truth):
/** 
 * Toggle the global behavior of Floodlight when the switch connects: - AUTO - this is the default. Installs all default rules when a switch connects - SAFE - add the default rules slowly .. monitoring traffic on existing rules - MANUAL - don't install any default rules. Call addRule for that. NOTE: no action is taking with existing, connected switches. This operation will only affect future connections
 * @param mode the connectMode to use. A Null value is a No-Op and can be used to return existing value.
 * @return the value of the toggle in Floodlight.
 */
@ApiOperation(value="String_Node_Str",response=ConnectModeRequest.Mode.class) @PutMapping(value="String_Node_Str",produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<ConnectModeRequest.Mode> toggleSwitchConnectMode(@RequestParam("String_Node_Str") ConnectModeRequest.Mode mode){
  ConnectModeRequest.Mode response=switchService.connectMode(mode);
  return ResponseEntity.ok(response);
}
Program: 37925
Project: 37925
Buggy source:
/** 
 * @param switchId
 * @return the list of rules on switch, specified what actions were applied.
 */
@ApiOperation(value="String_Node_Str",response=SyncRulesOutput.class) @ApiResponses(value={@ApiResponse(code=200,response=FlowPayload.class,message="String_Node_Str"),@ApiResponse(code=400,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=401,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=403,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=404,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=500,response=MessageError.class,message="String_Node_Str"),@ApiResponse(code=503,response=MessageError.class,message="String_Node_Str")}) @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public SyncRulesOutput syncRules(@PathVariable(name="String_Node_Str") String switchId){
  return switchService.syncRules(switchId);
}

Fixed version (ground truth):
/** 
 * @param switchId
 * @return the list of rules on switch, specified what actions were applied.
 */
@ApiOperation(value="String_Node_Str",response=SyncRulesOutput.class) @ApiResponse(code=200,response=SyncRulesOutput.class,message="String_Node_Str") @GetMapping(path="String_Node_Str") @ResponseStatus(HttpStatus.OK) public SyncRulesOutput syncRules(@PathVariable(name="String_Node_Str") String switchId){
  return switchService.syncRules(switchId);
}
Program: 37927
Project: 37927
Buggy source:
@Then("String_Node_Str") public void flowPathCorrect(String flowId,String sourceSwitch,int sourcePort,int sourceVlan,String destinationSwitch,int destinationPort,int destinationVlan,int bandwidth) throws UnroutablePathException, InterruptedException {
  Flow flow=new Flow(FlowUtils.getFlowName(flowId),bandwidth,false,flowId,sourceSwitch,sourcePort,sourceVlan,destinationSwitch,destinationPort,destinationVlan);
  ImmutablePair<PathInfoData,PathInfoData> path=FlowUtils.getFlowPath(flow);
  System.out.println(path);
  assertEquals(expectedShortestPath,path);
}

Fixed version (ground truth):
@Then("String_Node_Str") public void flowPathCorrect(String flowId,String sourceSwitch,int sourcePort,int sourceVlan,String destinationSwitch,int destinationPort,int destinationVlan,int bandwidth) throws UnroutablePathException, InterruptedException, RecoverableException {
  Flow flow=new Flow(FlowUtils.getFlowName(flowId),bandwidth,false,flowId,sourceSwitch,sourcePort,sourceVlan,destinationSwitch,destinationPort,destinationVlan);
  ImmutablePair<PathInfoData,PathInfoData> path=FlowUtils.getFlowPath(flow);
  System.out.println(path);
  assertEquals(expectedShortestPath,path);
}
Program: 37928
Project: 37928
Buggy source:
/** 
 * Gets flow path.
 * @param flow flow
 * @return flow path
 */
public static ImmutablePair<PathInfoData,PathInfoData> getFlowPath(Flow flow) throws InterruptedException, UnroutablePathException {
  Thread.sleep(1000);
  return pathComputer.getPath(flow,PathComputer.Strategy.COST);
}

Fixed version (ground truth):
/** 
 * Gets flow path.
 * @param flow flow
 * @return flow path
 */
public static ImmutablePair<PathInfoData,PathInfoData> getFlowPath(Flow flow) throws InterruptedException, UnroutablePathException, RecoverableException {
  Thread.sleep(1000);
  return pathComputer.getPath(flow,PathComputer.Strategy.COST);
}
Program: 37929
Project: 37929
Buggy source:
@Test public void testGetPathByCostInactiveOnTriangleTopo() throws UnroutablePathException {
  createTriangleTopo("String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}

Fixed version (ground truth):
@Test public void testGetPathByCostInactiveOnTriangleTopo() throws UnroutablePathException, RecoverableException {
  createTriangleTopo("String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}
Program: 37930
Project: 37930
Buggy source:
@Test public void testGetPathByCostNoCost() throws UnroutablePathException {
  createDiamond("String_Node_Str","String_Node_Str",-1,2000);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}

Fixed version (ground truth):
@Test public void testGetPathByCostNoCost() throws UnroutablePathException, RecoverableException {
  createDiamond("String_Node_Str","String_Node_Str",-1,2000);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}
Program: 37931
Project: 37931
Buggy source:
@Test public void testGetPathByCostActive() throws UnroutablePathException {
  createDiamond("String_Node_Str","String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}

Fixed version (ground truth):
@Test public void testGetPathByCostActive() throws UnroutablePathException, RecoverableException {
  createDiamond("String_Node_Str","String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}
Program: 37932
Project: 37932
Buggy source:
@Test public void testGetPathByCostInactive() throws UnroutablePathException {
  createDiamond("String_Node_Str","String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}

Fixed version (ground truth):
@Test public void testGetPathByCostInactive() throws UnroutablePathException, RecoverableException {
  createDiamond("String_Node_Str","String_Node_Str",10,20);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
  Assert.assertNotNull(path);
  Assert.assertEquals(4,path.left.getPath().size());
  Assert.assertEquals("String_Node_Str",path.left.getPath().get(1).getSwitchId());
}
Program: 37933
Project: 37933
Buggy source:
@Test(expected=UnroutablePathException.class) public void testGetPathNoPath() throws UnroutablePathException {
  createDiamond("String_Node_Str","String_Node_Str",10,30);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
}

Fixed version (ground truth):
@Test(expected=UnroutablePathException.class) public void testGetPathNoPath() throws UnroutablePathException, RecoverableException {
  createDiamond("String_Node_Str","String_Node_Str",10,30);
  Driver driver=GraphDatabase.driver("String_Node_Str",AuthTokens.basic("String_Node_Str","String_Node_Str"));
  NeoDriver nd=new NeoDriver(driver);
  Flow f=new Flow();
  f.setSourceSwitch("String_Node_Str");
  f.setDestinationSwitch("String_Node_Str");
  f.setBandwidth(100);
  ImmutablePair<PathInfoData,PathInfoData> path=nd.getPath(f,PathComputer.Strategy.COST);
}
Program: 37934
Project: 37934
Buggy source:
/** 
 * Creates or updates   {@link SwitchInfoData} instance.
 * @param newSwitch {@link SwitchInfoData} instance
 * @return created {@link SwitchInfoData} instance
 * @throws CacheException if {@link SwitchInfoData} instance with specified id already exists
 */
public SwitchInfoData createOrUpdateSwitch(SwitchInfoData newSwitch){
  logger.debug("String_Node_Str",newSwitch);
  if (cacheContainsSwitch(newSwitch.getSwitchId())) {
    return updateSwitch(newSwitch);
  }
 else {
    return createSwitch(newSwitch);
  }
}

Fixed version (ground truth):
/** 
 * Creates or updates   {@link SwitchInfoData} instance.
 * @param newSwitch {@link SwitchInfoData} instance
 * @return created {@link SwitchInfoData} instance
 * @throws CacheException if {@link SwitchInfoData} instance with specified id already exists
 */
public SwitchInfoData createOrUpdateSwitch(SwitchInfoData newSwitch){
  logger.debug("String_Node_Str",newSwitch);
  if (newSwitch == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (cacheContainsSwitch(newSwitch.getSwitchId())) {
    return updateSwitch(newSwitch);
  }
 else {
    return createSwitch(newSwitch);
  }
}
Program: 37935
Project: 37935
Buggy source:
/** 
 * Creates   {@link IslInfoData} instance.
 * @param isl {@link IslInfoData} instance
 * @return {@link IslInfoData} instance previously associated with {@link IslInfoData} instance id or null otherwise
 * @throws CacheException if {@link SwitchInfoData} related to {@link IslInfoData} instance do not exist
 */
public IslInfoData createOrUpdateIsl(IslInfoData isl){
  logger.debug("String_Node_Str",isl);
  if (cacheContainsIsl(isl.getId())) {
    return updateIsl(isl);
  }
 else {
    return createIsl(isl);
  }
}

Fixed version (ground truth):
/** 
 * Creates   {@link IslInfoData} instance.
 * @param isl {@link IslInfoData} instance
 * @return {@link IslInfoData} instance previously associated with {@link IslInfoData} instance id or null otherwise
 * @throws CacheException if {@link SwitchInfoData} related to {@link IslInfoData} instance do not exist
 */
public IslInfoData createOrUpdateIsl(IslInfoData isl){
  logger.debug("String_Node_Str",isl);
  if (isl == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (cacheContainsIsl(isl.getId())) {
    return updateIsl(isl);
  }
 else {
    return createIsl(isl);
  }
}