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 z=f.removeCells;f.removeCells=function(Z,S){S=null!=S?S:!0;null==Z&&(Z=this.getDeletableCells(this.getSelectionCells()));S&&(Z=this.getDeletableCells(this.addAllEdges(Z)));for(var da=[],P=0;P<Z.length;P++){var V=Z[P];k.isEdge(V)&&q(V)&&(da.push(V),V=k.getTerminal(V,!1));if(n(V)){var l=[];f.traverse(V,!0,function(A,O){var X=null!=O&&f.isTreeEdge(O);X&&l.push(O);(null==O||X)&&l.push(A);return null==O||X});0<l.length&&(da=da.concat(l),V=f.getIncomingTreeEdges(Z[P]),Z=Z.concat(V))}else null!=V&&da.push(Z[P])}Z=
da;return z.apply(this,arguments)};d.hoverIcons.getStateAt=function(Z,S,da){return n(Z.cell)?null:this.graph.view.getState(this.graph.getCellAt(S,da))};var B=f.duplicateCells;f.duplicateCells=function(Z,S){Z=null!=Z?Z:this.getSelectionCells();for(var da=Z.slice(0),P=0;P<da.length;P++){var V=f.view.getState(da[P]);if(null!=V&&n(V.cell)){var l=f.getIncomingTreeEdges(V.cell);for(V=0;V<l.length;V++)mxUtils.remove(l[V],Z)}}this.model.beginUpdate();try{var A=B.call(this,Z,S);if(A.length==Z.length)for(P=