Program: 172310
Project: 172310
Buggy source:
/** 
 * Sets Properties of Task
 * @param instance  task instance
 * @param properties  properties to set
 */
@SuppressWarnings("String_Node_Str") protected Map<QName,Serializable> getTaskProperties(TaskInstance instance){
  TypeDefinition taskDef=getAnonymousTaskDefinition(getTaskDefinition(instance.getTask()));
  Map<QName,AssociationDefinition> taskAssocs=taskDef.getAssociations();
  Map<QName,Serializable> properties=new HashMap<QName,Serializable>(10);
  Map<String,Object> vars=instance.getVariablesLocally();
  for (  Entry<String,Object> entry : vars.entrySet()) {
    String key=entry.getKey();
    Object value=entry.getValue();
    QName qname=QName.createQName(key);
    AssociationDefinition assocDef=taskAssocs.get(qname);
    if (assocDef != null && assocDef.getTargetClass().equals(ContentModel.TYPE_PERSON)) {
      if (!(value instanceof String[])) {
        throw new WorkflowException("String_Node_Str" + qname + "String_Node_Str");
      }
      value=mapNameToAuthority((String[])value);
    }
    properties.put(qname,(Serializable)value);
  }
  properties.put(WorkflowModel.PROP_TASK_ID,instance.getId());
  properties.put(WorkflowModel.PROP_START_DATE,instance.getStart());
  properties.put(WorkflowModel.PROP_DUE_DATE,instance.getDueDate());
  properties.put(WorkflowModel.PROP_COMPLETION_DATE,instance.getEnd());
  properties.put(WorkflowModel.PROP_PRIORITY,instance.getPriority());
  properties.put(ContentModel.PROP_OWNER,instance.getActorId());
  Set pooledActors=instance.getPooledActors();
  if (pooledActors != null) {
    String[] pooledActorIds=new String[pooledActors.size()];
    pooledActors.toArray(pooledActorIds);
    List<NodeRef> pooledActorNodeRefs=mapNameToAuthority(pooledActorIds);
    properties.put(WorkflowModel.ASSOC_POOLED_ACTORS,(Serializable)pooledActorNodeRefs);
  }
  return properties;
}

Fixed version (ground truth):
/** 
 * Sets Properties of Task
 * @param instance  task instance
 * @param properties  properties to set
 */
@SuppressWarnings("String_Node_Str") protected Map<QName,Serializable> getTaskProperties(TaskInstance instance){
  TypeDefinition taskDef=getAnonymousTaskDefinition(getTaskDefinition(instance.getTask()));
  Map<QName,AssociationDefinition> taskAssocs=taskDef.getAssociations();
  Map<QName,Serializable> properties=new HashMap<QName,Serializable>(10);
  Map<String,Object> vars=instance.getVariablesLocally();
  for (  Entry<String,Object> entry : vars.entrySet()) {
    String key=entry.getKey();
    Object value=entry.getValue();
    QName qname=QName.createQName(key,this.namespaceService);
    AssociationDefinition assocDef=taskAssocs.get(qname);
    if (assocDef != null && assocDef.getTargetClass().equals(ContentModel.TYPE_PERSON)) {
      if (value instanceof String[]) {
        value=mapNameToAuthority((String[])value);
      }
 else       if (value instanceof String) {
        value=mapNameToAuthority(new String[]{(String)value});
      }
 else {
        throw new WorkflowException("String_Node_Str" + qname + "String_Node_Str");
      }
    }
    properties.put(qname,(Serializable)value);
  }
  properties.put(WorkflowModel.PROP_TASK_ID,instance.getId());
  properties.put(WorkflowModel.PROP_START_DATE,instance.getStart());
  properties.put(WorkflowModel.PROP_DUE_DATE,instance.getDueDate());
  properties.put(WorkflowModel.PROP_COMPLETION_DATE,instance.getEnd());
  properties.put(WorkflowModel.PROP_PRIORITY,instance.getPriority());
  properties.put(ContentModel.PROP_OWNER,instance.getActorId());
  Set pooledActors=instance.getPooledActors();
  if (pooledActors != null) {
    String[] pooledActorIds=new String[pooledActors.size()];
    pooledActors.toArray(pooledActorIds);
    List<NodeRef> pooledActorNodeRefs=mapNameToAuthority(pooledActorIds);
    properties.put(WorkflowModel.ASSOC_POOLED_ACTORS,(Serializable)pooledActorNodeRefs);
  }
  return properties;
}