Program: 59511
Project: 59511
Buggy source:
public void createFromOwner(String fromOwnerExternalKey,String ownerExternalKey,HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Map<String,String> errors=new HashMap<String,String>();
    if (ownerExternalKey == null || ownerExternalKey.equals(0L)) {
      errors.put("String_Node_Str",WBErrors.WBPARAMETER_NO_OWNER_KEY);
    }
    if (fromOwnerExternalKey == null || fromOwnerExternalKey.equals(0L)) {
      errors.put("String_Node_Str",WBErrors.WBPARAMETER_NO_FROMOWNER_KEY);
    }
    if (errors.size() > 0) {
      httpServletToolbox.writeBodyResponseAsJson(response,"String_Node_Str",errors);
    }
    List<WBParameter> ownerParams=adminStorage.query(WBParameter.class,"String_Node_Str",AdminQueryOperator.EQUAL,Long.valueOf(fromOwnerExternalKey));
    List<WBParameter> newParams=new ArrayList<WBParameter>();
    for (    WBParameter parameter : ownerParams) {
      parameter.setOwnerExternalKey(ownerExternalKey);
      parameter.setKey(null);
      parameter.setExternalKey(adminStorage.getUniqueId());
      parameter.setLastModified(Calendar.getInstance(TimeZone.getTimeZone("String_Node_Str")).getTime());
      WBParameter newParam=adminStorage.add(parameter);
      newParams.add(newParam);
    }
    String jsonReturn=jsonObjectConverter.JSONStringFromListObjects(newParams);
    httpServletToolbox.writeBodyResponseAsJson(response,jsonReturn.toString(),errors);
  }
 catch (  Exception e) {
    Map<String,String> errors=new HashMap<String,String>();
    errors.put("String_Node_Str",WBErrors.WB_CANT_CREATE_RECORD);
    httpServletToolbox.writeBodyResponseAsJson(response,"String_Node_Str",errors);
  }
}

Fixed version (ground truth):
public void createFromOwner(String fromOwnerExternalKey,String ownerExternalKey,HttpServletRequest request,HttpServletResponse response,String requestUri) throws WBException {
  try {
    Map<String,String> errors=new HashMap<String,String>();
    if (ownerExternalKey == null || ownerExternalKey.equals(0L)) {
      errors.put("String_Node_Str",WBErrors.WBPARAMETER_NO_OWNER_KEY);
    }
    if (fromOwnerExternalKey == null || fromOwnerExternalKey.equals(0L)) {
      errors.put("String_Node_Str",WBErrors.WBPARAMETER_NO_FROMOWNER_KEY);
    }
    if (errors.size() > 0) {
      httpServletToolbox.writeBodyResponseAsJson(response,"String_Node_Str",errors);
    }
    List<WBParameter> ownerParams=adminStorage.query(WBParameter.class,"String_Node_Str",AdminQueryOperator.EQUAL,fromOwnerExternalKey);
    List<WBParameter> newParams=new ArrayList<WBParameter>();
    for (    WBParameter parameter : ownerParams) {
      parameter.setOwnerExternalKey(ownerExternalKey);
      parameter.setKey(null);
      parameter.setExternalKey(adminStorage.getUniqueId());
      parameter.setLastModified(Calendar.getInstance(TimeZone.getTimeZone("String_Node_Str")).getTime());
      WBParameter newParam=adminStorage.add(parameter);
      newParams.add(newParam);
    }
    String jsonReturn=jsonObjectConverter.JSONStringFromListObjects(newParams);
    httpServletToolbox.writeBodyResponseAsJson(response,jsonReturn.toString(),errors);
  }
 catch (  Exception e) {
    Map<String,String> errors=new HashMap<String,String>();
    errors.put("String_Node_Str",WBErrors.WB_CANT_CREATE_RECORD);
    httpServletToolbox.writeBodyResponseAsJson(response,"String_Node_Str",errors);
  }
}