Program: 61338
Project: 61338
Buggy source:
protected AbstractAttribute getAttribute(Map transientVars,Map args) throws WorkflowException {
  String schemaName=(String)args.get("String_Node_Str");
  if (schemaName == null || schemaName.length() == 0) {
    throw new WorkflowException("String_Node_Str");
  }
  String kind=(String)args.get("String_Node_Str");
  if (kind == null || kind.length() == 0) {
    kind=Constants.SYNCOPE_USER;
  }
  AttributableUtil attributableUtil=null;
  AbstractAttributable attributable=null;
  if (Constants.SYNCOPE_USER.equals(kind)) {
    attributableUtil=AttributableUtil.USER;
    attributable=(SyncopeUser)transientVars.get(Constants.SYNCOPE_USER);
  }
 else   if (Constants.SYNCOPE_ROLE.equals(kind)) {
    attributableUtil=AttributableUtil.ROLE;
    attributable=(SyncopeRole)transientVars.get(Constants.SYNCOPE_ROLE);
  }
 else   if (Constants.MEMBERSHIP.equals(kind)) {
    attributableUtil=AttributableUtil.MEMBERSHIP;
    attributable=(Membership)transientVars.get(Constants.MEMBERSHIP);
  }
 else {
    throw new WorkflowException("String_Node_Str" + kind);
  }
  if (attributable == null) {
    throw new WorkflowException("String_Node_Str" + attributableUtil);
  }
  SchemaDAO schemaDAO=(SchemaDAO)context.getBean("String_Node_Str");
  AbstractSchema schema=schemaDAO.find(schemaName,attributableUtil.getSchemaClass());
  if (schema == null) {
    throw new WorkflowException("String_Node_Str" + schemaName);
  }
  AbstractAttribute attribute=attributable.getAttribute(schemaName);
  if (attribute == null) {
    attribute=attributableUtil.newAttribute();
    attribute.setSchema(schema);
    attribute.setOwner(attributable);
    attributable.addAttribute(attribute);
  }
  return attribute;
}

Fixed version (ground truth):
protected AbstractAttribute getAttribute(Map transientVars,Map args) throws WorkflowException {
  String schemaName=(String)args.get("String_Node_Str");
  if (schemaName == null || schemaName.length() == 0) {
    throw new WorkflowException("String_Node_Str");
  }
  String kind=(String)args.get("String_Node_Str");
  if (kind == null || kind.length() == 0) {
    kind=Constants.SYNCOPE_USER;
  }
  AbstractAttributable attributable=null;
  if (Constants.SYNCOPE_USER.equals(kind)) {
    attributableUtil=AttributableUtil.USER;
    attributable=(SyncopeUser)transientVars.get(Constants.SYNCOPE_USER);
  }
 else   if (Constants.SYNCOPE_ROLE.equals(kind)) {
    attributableUtil=AttributableUtil.ROLE;
    attributable=(SyncopeRole)transientVars.get(Constants.SYNCOPE_ROLE);
  }
 else   if (Constants.MEMBERSHIP.equals(kind)) {
    attributableUtil=AttributableUtil.MEMBERSHIP;
    attributable=(Membership)transientVars.get(Constants.MEMBERSHIP);
  }
 else {
    throw new WorkflowException("String_Node_Str" + kind);
  }
  if (attributable == null) {
    throw new WorkflowException("String_Node_Str" + attributableUtil);
  }
  SchemaDAO schemaDAO=(SchemaDAO)context.getBean("String_Node_Str");
  AbstractSchema schema=schemaDAO.find(schemaName,attributableUtil.getSchemaClass());
  if (schema == null) {
    throw new WorkflowException("String_Node_Str" + schemaName);
  }
  AbstractAttribute attribute=attributable.getAttribute(schemaName);
  if (attribute == null) {
    attribute=attributableUtil.newAttribute();
    attribute.setSchema(schema);
    attribute.setOwner(attributable);
    attributable.addAttribute(attribute);
  }
  return attribute;
}