Language: JavaScript
Label: safe
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,b,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))};