Source:
<code>protected String getProcessVariables() { Diagram diagram = canvasSessionManager.getCurrentSession().getCanvasHandler().getDiagram(); Node selectedElement = getSelectedElement(); Element parent = null; if (selectedElement != null) { parent = graphUtils.getParent(selectedElement); } Iterator<Element> it = diagram.getGraph().nodes().iterator(); StringBuffer variables = new StringBuffer(); while (it.hasNext()) { Element element = it.next(); if (element.getContent() instanceof View) { Object oDefinition = ((View) element.getContent()).getDefinition(); if ((oDefinition instanceof BPMNDiagramImpl)) { BPMNDiagramImpl bpmnDiagram = (BPMNDiagramImpl) oDefinition; ProcessVariables processVariables = bpmnDiagram.getProcessData().getProcessVariables(); if (processVariables != null) { if (variables.length() > 0) { variables.append(","); } variables.append(processVariables.getValue()); } } if (parent != null) { <START> if (parent.equals(element)) { <END> ProcessVariables subprocessVariables = null; if (oDefinition instanceof EventSubprocess) { EventSubprocess subprocess = (EventSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof AdHocSubprocess) { AdHocSubprocess subprocess = (AdHocSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof MultipleInstanceSubprocess) { MultipleInstanceSubprocess subprocess = (MultipleInstanceSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof EmbeddedSubprocess) { EmbeddedSubprocess subprocess = (EmbeddedSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } if (subprocessVariables != null) { if (variables.length() > 0) { variables.append(","); } variables.append(subprocessVariables.getValue()); } } } } } return variables.toString(); }</code><technical_language>if: java if (Objects.equals(parent, element)) { // ..</technical_language>

Target:
protected String getProcessVariables() { Diagram diagram = canvasSessionManager.getCurrentSession().getCanvasHandler().getDiagram(); Node selectedElement = getSelectedElement(); Element parent = null; if (selectedElement != null) { parent = graphUtils.getParent(selectedElement); } Iterator<Element> it = diagram.getGraph().nodes().iterator(); StringBuffer variables = new StringBuffer(); while (it.hasNext()) { Element element = it.next(); if (element.getContent() instanceof View) { Object oDefinition = ((View) element.getContent()).getDefinition(); if ((oDefinition instanceof BPMNDiagramImpl)) { BPMNDiagramImpl bpmnDiagram = (BPMNDiagramImpl) oDefinition; ProcessVariables processVariables = bpmnDiagram.getProcessData().getProcessVariables(); if (processVariables != null) { if (variables.length() > 0) { variables.append(","); } variables.append(processVariables.getValue()); } } if (Objects.equals(parent, element)) { ProcessVariables subprocessVariables = null; if (oDefinition instanceof EventSubprocess) { EventSubprocess subprocess = (EventSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof AdHocSubprocess) { AdHocSubprocess subprocess = (AdHocSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof MultipleInstanceSubprocess) { MultipleInstanceSubprocess subprocess = (MultipleInstanceSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } else if (oDefinition instanceof EmbeddedSubprocess) { EmbeddedSubprocess subprocess = (EmbeddedSubprocess) oDefinition; subprocessVariables = subprocess.getProcessData().getProcessVariables(); } if (subprocessVariables != null) { if (variables.length() > 0) { variables.append(","); } variables.append(subprocessVariables.getValue()); } } } } return variables.toString(); }