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 g=0,x=0;q.view.states.visit(function(F,M){F=!0;m(M.shape)||(console.log("invalid shape",M.cell.id,M.shape),F=!1);m(M.text)||(console.log("invalid text",M.cell.id,M.text),F=!1);F||g++;x++});console.log("states checked",x,"invalid",g)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,"Paste Data:",m,function(v){if(0<v.length)try{var A=function(M){function Q(aa){if(null==
ca[aa]){if(ca[aa]=!0,null!=T[aa]){for(;0<T[aa].length;){var ra=T[aa].pop();Q(ra)}delete T[aa]}}else mxLog.debug(S+": Visited: "+aa)}var S=M.parentNode.id,W=M.childNodes;M={};for(var T={},X=null,Z={},Y=0;Y<W.length;Y++){var ba=W[Y];if(null!=ba.id&&0<ba.id.length)if(null==M[ba.id]){M[ba.id]=ba.id;var fa=ba.getAttribute("parent");null==fa?null!=X?mxLog.debug(S+": Multiple roots: "+ba.id):X=ba.id:(null==T[fa]&&(T[fa]=[]),T[fa].push(ba.id))}else Z[ba.id]=ba.id}W=Object.keys(Z);0<W.length?(W=S+": "+W.length+