Program: 184251
Project: 184251
Buggy source:
public void openTaskPage(LightTaskInstance task){
  try {
    LightTaskInstance newTask=ProcessbaseApplication.getCurrent().getBpmModule().getTaskInstance(task.getUUID());
    if (newTask == null || newTask.getState().equals(ActivityState.FINISHED) || newTask.getState().equals(ActivityState.ABORTED)) {
      table.removeItem(task);
      return;
    }
    String url=ProcessbaseApplication.getCurrent().getBpmModule().getProcessMetaData(task.getProcessDefinitionUUID()).get(task.getActivityDefinitionUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",task.getUUID().toString());
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(task.getProcessDefinitionUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition();
      XMLTaskDefinition taskDef=xmlProcess.getTasks().get(task.getActivityName());
      if (taskDef != null && !taskDef.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(task.getActivityLabel());
        genWindow.setTask(ProcessbaseApplication.getCurrent().getBpmModule().getTaskInstance(task.getUUID()));
        genWindow.setBarResource(barResource);
        genWindow.setXMLProcessDefinition(xmlProcess);
        genWindow.setTaskList(this);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
 else       if (taskDef != null && taskDef.isByPassFormsGeneration()) {
        ProcessbaseApplication.getCurrent().getBpmModule().startTask(task.getUUID(),true);
        ProcessbaseApplication.getCurrent().getBpmModule().finishTask(task.getUUID(),true);
        showImportantInformation(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
public void openTaskPage(LightTaskInstance task){
  try {
    BPMModule bpmModule=ProcessbaseApplication.getCurrent().getBpmModule();
    LightTaskInstance newTask=bpmModule.getTaskInstance(task.getUUID());
    if (newTask == null || newTask.getState().equals(ActivityState.FINISHED) || newTask.getState().equals(ActivityState.ABORTED)) {
      table.removeItem(task);
      return;
    }
    String url=bpmModule.getProcessMetaData(task.getProcessDefinitionUUID()).get(task.getActivityDefinitionUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",task.getUUID().toString());
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(task.getProcessDefinitionUUID());
      ProcessDefinition processDefinition=bpmModule.getProcessDefinition(task.getProcessDefinitionUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition(processDefinition.getName());
      XMLTaskDefinition taskDef=xmlProcess.getTasks().get(task.getActivityName());
      if (taskDef != null && !taskDef.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(task.getActivityLabel());
        genWindow.setTask(bpmModule.getTaskInstance(task.getUUID()));
        genWindow.setBarResource(barResource);
        genWindow.setXMLProcessDefinition(xmlProcess);
        genWindow.setTaskList(this);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
 else       if (taskDef != null && taskDef.isByPassFormsGeneration()) {
        bpmModule.startTask(task.getUUID(),true);
        bpmModule.finishTask(task.getUUID(),true);
        showImportantInformation(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}