Program: 189280
Project: 189280
Buggy source:
@ApiMapping("String_Node_Str") @Auth(role="String_Node_Str") public ApiResponse updateFieldProfile(@ApiVariable String workflowStepId,@Data String data) throws NumberFormatException, WorkflowStepNonOverrideableException, JsonProcessingException, FieldProfileNonOverrideableException {
  JsonNode dataNode=null;
  try {
    dataNode=objectMapper.readTree(data);
  }
 catch (  IOException e) {
    return new ApiResponse(ERROR,"String_Node_Str" + e.getMessage() + "String_Node_Str");
  }
  Long id=Long.parseLong(dataNode.get("String_Node_Str").toString());
  Long reqOrgId=Long.parseLong(dataNode.get("String_Node_Str").toString());
  FieldGloss fieldGloss=objectMapper.treeToValue(dataNode.get("String_Node_Str"),FieldGloss.class);
  ControlledVocabulary controlledVocabulary=dataNode.get("String_Node_Str") != null ? objectMapper.treeToValue(dataNode.get("String_Node_Str"),ControlledVocabulary.class) : null;
  FieldPredicate predicate=objectMapper.treeToValue(dataNode.get("String_Node_Str"),FieldPredicate.class);
  InputType inputType=objectMapper.treeToValue(dataNode.get("String_Node_Str"),InputType.class);
  Boolean repeatable=Boolean.parseBoolean(dataNode.get("String_Node_Str").toString());
  String help=dataNode.get("String_Node_Str").textValue();
  String usage=dataNode.get("String_Node_Str").textValue();
  FieldProfile fieldProfile=fieldProfileRepo.findOne(id);
  fieldProfile.setPredicate(predicate);
  fieldProfile.setInputType(inputType);
  fieldProfile.setRepeatable(repeatable);
  fieldProfile.setHelp(help);
  fieldProfile.setUsage(usage);
  List<FieldGloss> newFieldGlosses=new ArrayList<FieldGloss>();
  newFieldGlosses.add(fieldGloss);
  fieldProfile.setFieldGlosses(newFieldGlosses);
  if (controlledVocabulary != null) {
    List<ControlledVocabulary> newControlledVocabularies=new ArrayList<ControlledVocabulary>();
    newControlledVocabularies.add(controlledVocabulary);
    fieldProfile.setControlledVocabularies(newControlledVocabularies);
  }
 else {
    fieldProfile.clearControlledVocabulary();
  }
  Organization requestingOrganization=organizationRepo.findOne(reqOrgId);
  fieldProfileRepo.update(fieldProfile,requestingOrganization);
  simpMessagingTemplate.convertAndSend("String_Node_Str",new ApiResponse(SUCCESS,organizationRepo.findOne(reqOrgId)));
  return new ApiResponse(SUCCESS);
}

Fixed version (ground truth):
@ApiMapping("String_Node_Str") @Auth(role="String_Node_Str") public ApiResponse updateFieldProfile(@ApiVariable String workflowStepId,@Data String data) throws NumberFormatException, WorkflowStepNonOverrideableException, JsonProcessingException, FieldProfileNonOverrideableException {
  JsonNode dataNode=null;
  try {
    dataNode=objectMapper.readTree(data);
  }
 catch (  IOException e) {
    return new ApiResponse(ERROR,"String_Node_Str" + e.getMessage() + "String_Node_Str");
  }
  Long id=Long.parseLong(dataNode.get("String_Node_Str").toString());
  Long reqOrgId=Long.parseLong(dataNode.get("String_Node_Str").toString());
  FieldGloss fieldGloss=objectMapper.treeToValue(dataNode.get("String_Node_Str"),FieldGloss.class);
  ControlledVocabulary controlledVocabulary=dataNode.get("String_Node_Str") != null ? objectMapper.treeToValue(dataNode.get("String_Node_Str"),ControlledVocabulary.class) : null;
  FieldPredicate predicate=objectMapper.treeToValue(dataNode.get("String_Node_Str"),FieldPredicate.class);
  InputType inputType=objectMapper.treeToValue(dataNode.get("String_Node_Str"),InputType.class);
  Boolean repeatable=dataNode.get("String_Node_Str") != null ? Boolean.parseBoolean(dataNode.get("String_Node_Str").toString()) : false;
  String help=dataNode.get("String_Node_Str") != null ? dataNode.get("String_Node_Str").textValue() : null;
  String usage=dataNode.get("String_Node_Str") != null ? dataNode.get("String_Node_Str").textValue() : null;
  FieldProfile fieldProfile=fieldProfileRepo.findOne(id);
  fieldProfile.setPredicate(predicate);
  fieldProfile.setInputType(inputType);
  fieldProfile.setRepeatable(repeatable);
  fieldProfile.setHelp(help);
  fieldProfile.setUsage(usage);
  List<FieldGloss> newFieldGlosses=new ArrayList<FieldGloss>();
  newFieldGlosses.add(fieldGloss);
  fieldProfile.setFieldGlosses(newFieldGlosses);
  if (controlledVocabulary != null) {
    List<ControlledVocabulary> newControlledVocabularies=new ArrayList<ControlledVocabulary>();
    newControlledVocabularies.add(controlledVocabulary);
    fieldProfile.setControlledVocabularies(newControlledVocabularies);
  }
 else {
    fieldProfile.clearControlledVocabulary();
  }
  Organization requestingOrganization=organizationRepo.findOne(reqOrgId);
  fieldProfileRepo.update(fieldProfile,requestingOrganization);
  simpMessagingTemplate.convertAndSend("String_Node_Str",new ApiResponse(SUCCESS,organizationRepo.findOne(reqOrgId)));
  return new ApiResponse(SUCCESS);
}