Program: 13101
Project: 13101
Buggy source:
@Override public NodeDiscoveryResult discover(ConnectionDetails connectionDetails){
  Map<String,String> params=connectionDetails.getParams();
  NodeDiscoveryResult result=new NodeDiscoveryResult();
  String hostName=params.get("String_Node_Str");
  IPv4Address ipAddress=new IPv4Address(params.get("String_Node_Str"),params.get("String_Node_Str"));
  Map<String,String> params1=new HashMap<String,String>();
  params1.put("String_Node_Str",hostName);
  params1.put("String_Node_Str","String_Node_Str");
  ResourceType SNMP=this.discoveryResource.ReturnResourceByParam(params1);
  Map<String,String> SNMPconnParams=new HashMap<String,String>();
  SNMPconnParams=this.discoveryResource.getParamMap(SNMP);
  Resource resource=new Resource(hostName,ipAddress,params.get("String_Node_Str"),Integer.parseInt(SNMPconnParams.get("String_Node_Str")),SNMPconnParams);
  String devName=walker.getDeviceName(resource);
  result.setNodeId(devName);
  String deviceType=walker.getDeviceType(resource);
  resource.setDeviceType(deviceType);
  DiscoveryHelper discoveryHelper=discoveryHelperFactory.createDiscoveryHelper(deviceType);
  String[] requestParamsList=discoveryHelper.getRequestParams(discoveryTypes);
  RawDeviceData rawData=walker.getRawDeviceData(resource,requestParamsList);
  DiscoveredDeviceData discoveredDeviceData=discoveryHelper.parseDeviceRawData(rawData,discoveryTypes,resource);
  Device device=discoveryHelper.createDevice(discoveredDeviceData);
  List<DeviceNeighbour> neighbours=device.getDeviceNeighbours();
  List<ConnectionDetails> neighboursConnDetails=createNeighbourConnectionDetails(connectionDetails,params,neighbours);
  result.setNeighboursConnectionDetails(neighboursConnDetails);
  return result;
}

Fixed version (ground truth):
@Override public NodeDiscoveryResult discover(ConnectionDetails connectionDetails){
  NodeDiscoveryResult result=new NodeDiscoveryResult();
  String hostName=connectionDetails.getParam("String_Node_Str");
  IPv4Address ipAddress=new IPv4Address(connectionDetails.getParam("String_Node_Str"),connectionDetails.getParam("String_Node_Str"));
  Map<String,String> params1=new HashMap<String,String>();
  params1.put("String_Node_Str",hostName);
  params1.put("String_Node_Str","String_Node_Str");
  ResourceType SNMP=this.discoveryResource.ReturnResourceByParam(params1);
  Map<String,String> SNMPconnParams=new HashMap<String,String>();
  SNMPconnParams=this.discoveryResource.getParamMap(SNMP);
  Resource resource=new Resource(hostName,ipAddress,connectionDetails.getParam("String_Node_Str"),Integer.parseInt(SNMPconnParams.get("String_Node_Str")),SNMPconnParams);
  String devName=walker.getDeviceName(resource);
  result.setNodeId(devName);
  String deviceType=walker.getDeviceType(resource);
  resource.setDeviceType(deviceType);
  DiscoveryHelper discoveryHelper=discoveryHelperFactory.createDiscoveryHelper(deviceType);
  String[] requestParamsList=discoveryHelper.getRequestParams(discoveryTypes);
  RawDeviceData rawData=walker.getRawDeviceData(resource,requestParamsList);
  DiscoveredDeviceData discoveredDeviceData=discoveryHelper.parseDeviceRawData(rawData,discoveryTypes,resource);
  Device device=discoveryHelper.createDevice(discoveredDeviceData);
  List<DeviceNeighbour> neighbours=device.getDeviceNeighbours();
  List<ConnectionDetails> neighboursConnDetails=createNeighbourConnectionDetails(connectionDetails,neighbours);
  result.setNeighboursConnectionDetails(neighboursConnDetails);
  return result;
}