Program: 2519
Project: 2519
Buggy source:
public void executeWorkItem(WorkItem workItem,WorkItemManager manager){
  if (this.manager == null) {
    this.manager=manager;
  }
 else {
    if (this.manager != manager) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  connect();
  Task task=new Task();
  String taskName=(String)workItem.getParameter("String_Node_Str");
  if (taskName != null) {
    List<I18NText> names=new ArrayList<I18NText>();
    names.add(new I18NText("String_Node_Str",taskName));
    task.setNames(names);
  }
  String comment=(String)workItem.getParameter("String_Node_Str");
  if (comment != null) {
    List<I18NText> descriptions=new ArrayList<I18NText>();
    descriptions.add(new I18NText("String_Node_Str",comment));
    task.setDescriptions(descriptions);
    List<I18NText> subjects=new ArrayList<I18NText>();
    subjects.add(new I18NText("String_Node_Str",comment));
    task.setSubjects(subjects);
  }
  String priorityString=(String)workItem.getParameter("String_Node_Str");
  int priority=0;
  if (priorityString != null) {
    try {
      priority=new Integer(priorityString);
    }
 catch (    NumberFormatException e) {
    }
  }
  task.setPriority(priority);
  TaskData taskData=new TaskData();
  taskData.setWorkItemId(workItem.getId());
  taskData.setProcessInstanceId(workItem.getProcessInstanceId());
  taskData.setSkipable(!"String_Node_Str".equals(workItem.getParameter("String_Node_Str")));
  Long parentId=(Long)workItem.getParameter("String_Node_Str");
  if (parentId != null) {
    taskData.setParentId(parentId);
  }
  String subTaskStrategiesCommaSeparated=(String)workItem.getParameter("String_Node_Str");
  if (subTaskStrategiesCommaSeparated != null && !subTaskStrategiesCommaSeparated.equals("String_Node_Str")) {
    String[] subTaskStrategies=subTaskStrategiesCommaSeparated.split("String_Node_Str");
    List<SubTasksStrategy> strategies=new ArrayList<SubTasksStrategy>();
    for (    String subTaskStrategyString : subTaskStrategies) {
      SubTasksStrategy subTaskStrategy=SubTasksStrategyFactory.newStrategy(subTaskStrategyString);
      strategies.add(subTaskStrategy);
    }
    task.setSubTaskStrategies(strategies);
  }
  PeopleAssignments assignments=new PeopleAssignments();
  List<OrganizationalEntity> potentialOwners=new ArrayList<OrganizationalEntity>();
  String actorId=(String)workItem.getParameter("String_Node_Str");
  if (actorId != null && actorId.trim().length() > 0) {
    String[] actorIds=actorId.split("String_Node_Str");
    for (    String id : actorIds) {
      potentialOwners.add(new User(id.trim()));
    }
    if (potentialOwners.size() > 0) {
      taskData.setCreatedBy((User)potentialOwners.get(0));
    }
  }
  String groupId=(String)workItem.getParameter("String_Node_Str");
  if (groupId != null && groupId.trim().length() > 0) {
    String[] groupIds=groupId.split("String_Node_Str");
    for (    String id : groupIds) {
      potentialOwners.add(new Group(id.trim()));
    }
  }
  assignments.setPotentialOwners(potentialOwners);
  List<OrganizationalEntity> businessAdministrators=new ArrayList<OrganizationalEntity>();
  businessAdministrators.add(new User("String_Node_Str"));
  assignments.setBusinessAdministrators(businessAdministrators);
  task.setPeopleAssignments(assignments);
  task.setTaskData(taskData);
  ContentData content=null;
  Object contentObject=workItem.getParameter("String_Node_Str");
  if (contentObject != null) {
    if (contentObject instanceof String) {
      content=new ContentData();
      content.setContent(((String)contentObject).getBytes());
      content.setAccessType(AccessType.Inline);
    }
 else {
      ByteArrayOutputStream bos=new ByteArrayOutputStream();
      ObjectOutputStream out;
      try {
        out=new ObjectOutputStream(bos);
        out.writeObject(contentObject);
        out.close();
        content=new ContentData();
        content.setContent(bos.toByteArray());
        content.setAccessType(AccessType.Inline);
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  String deadlineParametersPrefix="String_Node_Str";
  Long deadlineTime=(Long)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
  List<Escalation> escalations=new ArrayList<Escalation>();
  if (deadlineTime != null) {
    String deadlineNotificationRecipients=(String)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
    String deadlineReassignment=(String)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
    if (deadlineReassignment == null && deadlineNotificationRecipients == null) {
      throw new IllegalStateException("String_Node_Str" + taskName + "String_Node_Str");
    }
    Deadline deadline=new Deadline();
    deadline.setEscalated(false);
    deadline.setDate(new Date(System.currentTimeMillis() + deadlineTime));
    Escalation escalation=new Escalation();
    escalation.setName(taskName + "String_Node_Str" + workItem.getId());
    if (deadlineReassignment != null) {
      List<Reassignment> reassignments=new ArrayList<Reassignment>();
      List<OrganizationalEntity> reassignmentsEntities=new ArrayList<OrganizationalEntity>();
      Reassignment reassignment=new Reassignment();
      String[] deadlineReassignments=deadlineReassignment.trim().split("String_Node_Str");
      for (      String r : deadlineReassignments) {
        reassignmentsEntities.add(new User(r.trim()));
      }
      reassignment.setPotentialOwners(reassignmentsEntities);
      reassignments.add(reassignment);
      escalation.setReassignments(reassignments);
    }
    if (deadlineNotificationRecipients != null) {
      List<Notification> notifications=new ArrayList<Notification>();
      List<OrganizationalEntity> recipientsEntities=new ArrayList<OrganizationalEntity>();
      EmailNotification notification=new EmailNotification();
      String[] notificationRecipients=deadlineNotificationRecipients.trim().split("String_Node_Str");
      for (      String r : notificationRecipients) {
        recipientsEntities.add(new User(r.trim()));
      }
      notification.setRecipients(recipientsEntities);
      notification.setBusinessAdministrators(businessAdministrators);
      Map<String,EmailNotificationHeader> emailHeaders=new HashMap<String,EmailNotificationHeader>();
      EmailNotificationHeader emailHeader=new EmailNotificationHeader();
      emailHeader.setLanguage("String_Node_Str");
      emailHeader.setFrom("String_Node_Str");
      emailHeader.setSubject(taskName + "String_Node_Str");
      emailHeader.setBody(taskName + "String_Node_Str");
      emailHeaders.put("String_Node_Str",emailHeader);
      notification.setEmailHeaders(emailHeaders);
      notifications.add(notification);
      escalation.setNotifications(notifications);
      escalations.add(escalation);
    }
    Deadlines deadlines=new Deadlines();
    deadline.setEscalations(escalations);
    List<Deadline> dls=new ArrayList<Deadline>();
    dls.add(deadline);
    deadlines.setStartDeadlines(dls);
    task.setDeadlines(deadlines);
  }
  client.addTask(task,content,null);
}

Fixed version (ground truth):
public void executeWorkItem(WorkItem workItem,WorkItemManager manager){
  if (this.manager == null) {
    this.manager=manager;
  }
 else {
    if (this.manager != manager) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  connect();
  Task task=new Task();
  String taskName=(String)workItem.getParameter("String_Node_Str");
  if (taskName != null) {
    List<I18NText> names=new ArrayList<I18NText>();
    names.add(new I18NText("String_Node_Str",taskName));
    task.setNames(names);
  }
  String comment=(String)workItem.getParameter("String_Node_Str");
  if (comment != null) {
    List<I18NText> descriptions=new ArrayList<I18NText>();
    descriptions.add(new I18NText("String_Node_Str",comment));
    task.setDescriptions(descriptions);
    List<I18NText> subjects=new ArrayList<I18NText>();
    subjects.add(new I18NText("String_Node_Str",comment));
    task.setSubjects(subjects);
  }
  String priorityString=(String)workItem.getParameter("String_Node_Str");
  int priority=0;
  if (priorityString != null) {
    try {
      priority=new Integer(priorityString);
    }
 catch (    NumberFormatException e) {
    }
  }
  task.setPriority(priority);
  TaskData taskData=new TaskData();
  taskData.setWorkItemId(workItem.getId());
  taskData.setProcessInstanceId(workItem.getProcessInstanceId());
  taskData.setSkipable(!"String_Node_Str".equals(workItem.getParameter("String_Node_Str")));
  Long parentId=(Long)workItem.getParameter("String_Node_Str");
  if (parentId != null) {
    taskData.setParentId(parentId);
  }
  String subTaskStrategiesCommaSeparated=(String)workItem.getParameter("String_Node_Str");
  if (subTaskStrategiesCommaSeparated != null && !subTaskStrategiesCommaSeparated.equals("String_Node_Str")) {
    String[] subTaskStrategies=subTaskStrategiesCommaSeparated.split("String_Node_Str");
    List<SubTasksStrategy> strategies=new ArrayList<SubTasksStrategy>();
    for (    String subTaskStrategyString : subTaskStrategies) {
      SubTasksStrategy subTaskStrategy=SubTasksStrategyFactory.newStrategy(subTaskStrategyString);
      strategies.add(subTaskStrategy);
    }
    task.setSubTaskStrategies(strategies);
  }
  PeopleAssignments assignments=new PeopleAssignments();
  List<OrganizationalEntity> potentialOwners=new ArrayList<OrganizationalEntity>();
  String actorId=(String)workItem.getParameter("String_Node_Str");
  if (actorId != null && actorId.trim().length() > 0) {
    String[] actorIds=actorId.split("String_Node_Str");
    for (    String id : actorIds) {
      potentialOwners.add(new User(id.trim()));
    }
    if (potentialOwners.size() > 0) {
      taskData.setCreatedBy((User)potentialOwners.get(0));
    }
  }
  String groupId=(String)workItem.getParameter("String_Node_Str");
  if (groupId != null && groupId.trim().length() > 0) {
    String[] groupIds=groupId.split("String_Node_Str");
    for (    String id : groupIds) {
      potentialOwners.add(new Group(id.trim()));
    }
  }
  assignments.setPotentialOwners(potentialOwners);
  List<OrganizationalEntity> businessAdministrators=new ArrayList<OrganizationalEntity>();
  businessAdministrators.add(new User("String_Node_Str"));
  assignments.setBusinessAdministrators(businessAdministrators);
  task.setPeopleAssignments(assignments);
  task.setTaskData(taskData);
  ContentData content=null;
  Object contentObject=workItem.getParameter("String_Node_Str");
  if (contentObject != null) {
    if (contentObject instanceof String) {
      content=new ContentData();
      content.setContent(((String)contentObject).getBytes());
      content.setAccessType(AccessType.Inline);
    }
 else {
      ByteArrayOutputStream bos=new ByteArrayOutputStream();
      ObjectOutputStream out;
      try {
        out=new ObjectOutputStream(bos);
        out.writeObject(contentObject);
        out.close();
        content=new ContentData();
        content.setContent(bos.toByteArray());
        content.setAccessType(AccessType.Inline);
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
  String deadlineParametersPrefix="String_Node_Str";
  Long deadlineTime=(Long)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
  List<Escalation> escalations=new ArrayList<Escalation>();
  if (deadlineTime != null) {
    String deadlineNotificationRecipients=(String)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
    String deadlineReassignment=(String)workItem.getParameter(deadlineParametersPrefix + "String_Node_Str");
    if (deadlineReassignment == null && deadlineNotificationRecipients == null) {
      throw new IllegalStateException("String_Node_Str" + taskName + "String_Node_Str");
    }
    Deadline deadline=new Deadline();
    deadline.setEscalated(false);
    deadline.setDate(new Date(System.currentTimeMillis() + deadlineTime));
    Escalation escalation=new Escalation();
    escalation.setName(taskName + "String_Node_Str" + workItem.getId());
    if (deadlineReassignment != null) {
      List<Reassignment> reassignments=new ArrayList<Reassignment>();
      List<OrganizationalEntity> reassignmentsEntities=new ArrayList<OrganizationalEntity>();
      Reassignment reassignment=new Reassignment();
      String[] deadlineReassignments=deadlineReassignment.trim().split("String_Node_Str");
      for (      String r : deadlineReassignments) {
        reassignmentsEntities.add(new User(r.trim()));
      }
      reassignment.setPotentialOwners(reassignmentsEntities);
      reassignments.add(reassignment);
      escalation.setReassignments(reassignments);
    }
    if (deadlineNotificationRecipients != null) {
      List<Notification> notifications=new ArrayList<Notification>();
      List<OrganizationalEntity> recipientsEntities=new ArrayList<OrganizationalEntity>();
      EmailNotification notification=new EmailNotification();
      String[] notificationRecipients=deadlineNotificationRecipients.trim().split("String_Node_Str");
      for (      String r : notificationRecipients) {
        recipientsEntities.add(new User(r.trim()));
      }
      notification.setRecipients(recipientsEntities);
      notification.setBusinessAdministrators(businessAdministrators);
      Map<Language,EmailNotificationHeader> emailHeaders=new HashMap<Language,EmailNotificationHeader>();
      EmailNotificationHeader emailHeader=new EmailNotificationHeader();
      emailHeader.setLanguage("String_Node_Str");
      emailHeader.setFrom("String_Node_Str");
      emailHeader.setSubject(taskName + "String_Node_Str");
      emailHeader.setBody(taskName + "String_Node_Str");
      emailHeaders.put(new Language("String_Node_Str"),emailHeader);
      notification.setEmailHeaders(emailHeaders);
      notifications.add(notification);
      escalation.setNotifications(notifications);
      escalations.add(escalation);
    }
    Deadlines deadlines=new Deadlines();
    deadline.setEscalations(escalations);
    List<Deadline> dls=new ArrayList<Deadline>();
    dls.add(deadline);
    deadlines.setStartDeadlines(dls);
    task.setDeadlines(deadlines);
  }
  client.addTask(task,content,null);
}