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.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};