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:
O?(O=g.getOutgoingTreeEdges(F),null!=O&&0<O.length&&g.setSelectionCell(g.model.getTerminal(O[0],!1))):(S=g.getIncomingTreeEdges(F),null!=S&&0<S.length&&(K=N(g.model.getTerminal(S[0],!0),K,F),F=g.view.getState(F),null!=F&&(F=mxUtils.indexOf(K,F),0<=F&&(F+=O==mxConstants.DIRECTION_NORTH||O==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=K.length-1&&g.setSelectionCell(K[F].cell)))))}var d=this,g=d.editor.graph,n=g.getModel(),t=d.menus.createPopupMenu;d.menus.createPopupMenu=function(F,O,S){t.apply(this,arguments);
if(1==g.getSelectionCount()){O=g.getSelectionCell();var K=g.getOutgoingTreeEdges(O);F.addSeparator();0<K.length&&(c(g.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,S),this.addMenuItems(F,["selectDescendants"],null,S));c(g.getSelectionCell())?(F.addSeparator(),0<g.getIncomingTreeEdges(O).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,S)):0<g.model.getEdgeCount(O)&&this.addMenuItems(F,["selectConnections"],null,S)}};d.actions.addAction("selectChildren",function(F){if(g.isEnabled()&&