Language: JavaScript
Label: safe
CWE: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Code:
function R(ba,S,da){ba=f.getOutgoingTreeEdges(ba);da=f.view.getState(da);var P=[];if(null!=da&&null!=ba){for(var V=0;V<ba.length;V++){var l=f.view.getState(f.model.getTerminal(ba[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(B,N){return S?B.x+B.width-N.x-N.width:B.y+B.height-N.y-N.height})}return P}function W(ba,S){var da=M(ba),P=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;