Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
var P=[];if(null!=da&&null!=Z){for(var V=0;V<Z.length;V++){var l=f.view.getState(f.model.getTerminal(Z[V],!1));null!=l&&(!S&&Math.min(l.x+l.width,da.x+da.width)>=Math.max(l.x,da.x)||S&&Math.min(l.y+l.height,da.y+da.height)>=Math.max(l.y,da.y))&&P.push(l)}P.sort(function(A,O){return S?A.x+A.width-O.x-O.width:A.y+A.height-O.y-O.height})}return P}function W(Z,S){var da=L(Z),P=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST)==
P&&da!=S?d.actions.get("selectParent").funct():da==S?(S=f.getOutgoingTreeEdges(Z),null!=S&&0<S.length&&f.setSelectionCell(f.model.getTerminal(S[0],!1))):(da=f.getIncomingTreeEdges(Z),null!=da&&0<da.length&&(P=R(f.model.getTerminal(da[0],!0),P,Z),Z=f.view.getState(Z),null!=Z&&(Z=mxUtils.indexOf(P,Z),0<=Z&&(Z+=S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_WEST?-1:1,0<=Z&&Z<=P.length-1&&f.setSelectionCell(P[Z].cell)))))}var d=this,f=d.editor.graph,k=f.getModel(),u=d.menus.createPopupMenu;