Program: 172280
Project: 172280
Buggy source:
public void assign(Assignable assignable,ExecutionContext executionContext) throws Exception {
  if (actor == null && pooledactors == null) {
    throw new WorkflowException("String_Node_Str");
  }
  String assignedActor=null;
  if (actor != null) {
    String actorValStr=actor.getTextTrim();
    if (actorValStr != null && actorValStr.length() > 0) {
      if (actorValStr.startsWith("String_Node_Str")) {
        String expression=actorValStr.substring(2,actorValStr.length() - 1);
        Object eval=AlfrescoJavaScript.executeScript(executionContext,services,expression,null);
        if (eval == null) {
          throw new WorkflowException("String_Node_Str" + actorValStr + "String_Node_Str");
        }
        String actor=null;
        if (eval instanceof String) {
          actor=(String)eval;
        }
 else         if (eval instanceof JBPMNode) {
          actor=mapAuthorityToName((JBPMNode)eval,false);
        }
        if (actor == null) {
          throw new WorkflowException("String_Node_Str");
        }
        assignedActor=actor;
      }
 else {
        assignedActor=actorValStr;
      }
    }
  }
  String[] assignedPooledActors=null;
  if (pooledactors != null) {
    String pooledactorValStr=pooledactors.getTextTrim();
    if (pooledactorValStr != null && pooledactorValStr.length() > 0) {
      if (pooledactorValStr.startsWith("String_Node_Str")) {
        String expression=pooledactorValStr.substring(2,pooledactorValStr.length() - 1);
        Object eval=AlfrescoJavaScript.executeScript(executionContext,services,expression,null);
        if (eval == null) {
          throw new WorkflowException("String_Node_Str" + pooledactorValStr + "String_Node_Str");
        }
        if (eval instanceof ScriptNode[]) {
          ScriptNode[] nodes=(ScriptNode[])eval;
          assignedPooledActors=new String[nodes.length];
          int i=0;
          for (          ScriptNode node : (ScriptNode[])nodes) {
            String actor=mapAuthorityToName(node,true);
            if (actor == null) {
              throw new WorkflowException("String_Node_Str");
            }
            assignedPooledActors[i++]=actor;
          }
        }
 else         if (eval instanceof ScriptNode) {
          ScriptNode node=(ScriptNode)eval;
          String actor=mapAuthorityToName(node,true);
          if (actor == null) {
            throw new WorkflowException("String_Node_Str");
          }
          assignedPooledActors=new String[]{actor};
        }
 else         if (eval instanceof String) {
          assignedPooledActors=new String[]{(String)eval};
        }
 else {
          throw new WorkflowException("String_Node_Str");
        }
      }
 else {
        assignedPooledActors=new String[]{pooledactorValStr};
      }
    }
  }
  if (assignedActor != null) {
    assignable.setActorId(assignedActor);
  }
  if (assignedPooledActors != null) {
    assignable.setPooledActors(assignedPooledActors);
  }
}

Fixed version (ground truth):
public void assign(Assignable assignable,ExecutionContext executionContext) throws Exception {
  if (actor == null && pooledactors == null) {
    throw new WorkflowException("String_Node_Str");
  }
  String assignedActor=null;
  if (actor != null) {
    String actorValStr=actor.getTextTrim();
    if (actorValStr != null && actorValStr.length() > 0) {
      if (actorValStr.startsWith("String_Node_Str")) {
        String expression=actorValStr.substring(2,actorValStr.length() - 1);
        Object eval=AlfrescoJavaScript.executeScript(executionContext,services,expression,null);
        if (eval == null) {
          throw new WorkflowException("String_Node_Str" + actorValStr + "String_Node_Str");
        }
        String actor=null;
        if (eval instanceof String) {
          actor=(String)eval;
        }
 else         if (eval instanceof JBPMNode) {
          actor=mapAuthorityToName((JBPMNode)eval,false);
        }
        if (actor == null) {
          throw new WorkflowException("String_Node_Str");
        }
        assignedActor=actor;
      }
 else {
        assignedActor=actorValStr;
      }
    }
  }
  String[] assignedPooledActors=null;
  if (pooledactors != null) {
    String pooledactorValStr=pooledactors.getTextTrim();
    if (pooledactorValStr != null && pooledactorValStr.length() > 0) {
      if (pooledactorValStr.startsWith("String_Node_Str")) {
        String expression=pooledactorValStr.substring(2,pooledactorValStr.length() - 1);
        Object eval=AlfrescoJavaScript.executeScript(executionContext,services,expression,null);
        if (eval == null) {
          throw new WorkflowException("String_Node_Str" + pooledactorValStr + "String_Node_Str");
        }
        if (eval instanceof ScriptNode[]) {
          ScriptNode[] nodes=(ScriptNode[])eval;
          assignedPooledActors=new String[nodes.length];
          int i=0;
          for (          ScriptNode node : (ScriptNode[])nodes) {
            String actor=mapAuthorityToName(node,true);
            if (actor == null) {
              throw new WorkflowException("String_Node_Str");
            }
            assignedPooledActors[i++]=actor;
          }
        }
        if (eval instanceof Collection) {
          List<String> actors=new ArrayList<String>();
          Collection<Object> nodes=(Collection<Object>)eval;
          for (          Object node : nodes) {
            if (node instanceof ScriptNode) {
              String actor=mapAuthorityToName((ScriptNode)node,true);
              actors.add(actor);
            }
          }
          assignedPooledActors=new String[actors.size()];
          actors.toArray(assignedPooledActors);
        }
 else         if (eval instanceof ScriptNode) {
          ScriptNode node=(ScriptNode)eval;
          String actor=mapAuthorityToName(node,true);
          if (actor == null) {
            throw new WorkflowException("String_Node_Str");
          }
          assignedPooledActors=new String[]{actor};
        }
 else         if (eval instanceof String) {
          assignedPooledActors=new String[]{(String)eval};
        }
 else {
          throw new WorkflowException("String_Node_Str");
        }
      }
 else {
        assignedPooledActors=new String[]{pooledactorValStr};
      }
    }
  }
  if (assignedActor != null) {
    assignable.setActorId(assignedActor);
  }
  if (assignedPooledActors != null) {
    assignable.setPooledActors(assignedPooledActors);
  }
}