Program: 85966
Project: 85966
Buggy source:
/** 
 * Create a Map of all the data of an iteration.
 * @param part PartIteration to be Mapped.
 * @return The Map is well formatted to be used by an elasticsearch Script
 */
protected static Map<String,Object> partIterationMap(PartIteration part){
  Map<String,Object> params=new HashMap<>();
  setParam(params,WORKSPACEID_KEY,part.getWorkspaceId(),0.6f);
  setParam(params,VERSION_KEY,part.getPartVersion(),0.10f);
  setParam(params,"String_Node_Str",part.getIteration(),0.10f);
  setParam(params,"String_Node_Str",part.getPartRevision().getPartMaster().isStandardPart(),0.05f);
  if (part.getAuthor() != null) {
    Map<String,Object> authorParams=new HashMap<>();
    params.put(AUTHOR_KEY,authorParams);
    setParam(authorParams,AUTHOR_LOGIN_KEY,part.getAuthor().getLogin(),0.6f);
    setParam(authorParams,AUTHOR_NAME_KEY,part.getAuthor().getName(),0.6f);
  }
  setParam(params,CREATION_DATE_KEY,part.getCreationDate(),0.4f);
  setParam(params,MODIFICATION_DATE_KEY,part.getModificationDate(),0.4f);
  setParam(params,"String_Node_Str",part.getPartRevision().getDescription(),2f);
  setParam(params,"String_Node_Str",part.getIterationNote(),0.5f);
  setParam(params,"String_Node_Str",part.getPartRevision().getWorkflow(),0.5f);
  if (!part.getInstanceAttributes().isEmpty()) {
    Collection<InstanceAttribute> listAttr=part.getInstanceAttributes();
    Map<String,Object> attributesParams=new HashMap<>();
    params.put("String_Node_Str",attributesParams);
    for (    InstanceAttribute attr : listAttr) {
      setParam(attributesParams,attr.getNameWithoutWhiteSpace(),"String_Node_Str" + attr.getValue(),0.6f);
    }
  }
  return params;
}

Fixed version (ground truth):
/** 
 * Create a Map of all the data of an iteration.
 * @param part PartIteration to be Mapped.
 * @return The Map is well formatted to be used by an elasticsearch Script
 */
protected static Map<String,Object> partIterationMap(PartIteration part){
  Map<String,Object> params=new HashMap<>();
  setParam(params,WORKSPACE_ID_KEY,part.getWorkspaceId(),0.6f);
  setParam(params,VERSION_KEY,part.getPartVersion(),0.10f);
  setParam(params,ITERATION_KEY,part.getIteration(),0.10f);
  setParam(params,STANDARD_PART_KEY,part.getPartRevision().getPartMaster().isStandardPart(),0.05f);
  if (part.getAuthor() != null) {
    Map<String,Object> authorParams=new HashMap<>();
    params.put(AUTHOR_KEY,authorParams);
    setParam(authorParams,AUTHOR_LOGIN_KEY,part.getAuthor().getLogin(),0.6f);
    setParam(authorParams,AUTHOR_NAME_KEY,part.getAuthor().getName(),0.6f);
  }
  setParam(params,CREATION_DATE_KEY,part.getCreationDate(),0.4f);
  setParam(params,MODIFICATION_DATE_KEY,part.getModificationDate(),0.4f);
  setParam(params,DESCRIPTION_KEY,part.getPartRevision().getDescription(),2f);
  setParam(params,REVISION_NOTE_KEY,part.getIterationNote(),0.5f);
  setParam(params,WORKFLOW_KEY,part.getPartRevision().getWorkflow(),0.5f);
  if (!part.getInstanceAttributes().isEmpty()) {
    Collection<InstanceAttribute> listAttr=part.getInstanceAttributes();
    Map<String,Object> attributesParams=new HashMap<>();
    params.put(ATTRIBUTES_KEY,attributesParams);
    for (    InstanceAttribute attr : listAttr) {
      setParam(attributesParams,attr.getNameWithoutWhiteSpace(),"String_Node_Str" + attr.getValue(),0.6f);
    }
  }
  return params;
}