Showing 2,438 of 4,261 total issues
Method doSwitch
has a Cognitive Complexity of 127 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case XwikiPackage.ATTACHMENT: {
Attachment attachment = (Attachment)theEObject;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File ext-prototype-adapter-debug.js
has 1015 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
Function onKeyDownHandler
has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring. Open
onKeyDownHandler : function(e,t) {
var toDestroy,nextFocus,idx;
if(e.getKey() === e.ESC){
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File AnnotationEditor.java
has 1007 lines of code (exceeds 250 allowed). Consider refactoring. Open
package gate.creole.ontology.ocat;
import gate.Annotation;
import gate.Factory;
import gate.FeatureMap;
File ext-jquery-adapter-debug.js
has 984 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
Function 9
has 483 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./Report":6,"./SchemaCache":7}],9:[function(require,module,exports){
"use strict";
var FormatValidators = require("./FormatValidators"),
JsonValidation = require("./JsonValidation"),
Method generateFromBPMN
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. Open
public static PetriNet generateFromBPMN(Document bpmnXml) throws Exception{
if(!isOMGBPMN2(bpmnXml))
throw new Exception("ERROR: The provided model is not a valid OMG standard BPMN2.0 model");
PNMapping pnm = new PNMapping();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
OntologyService
has 116 methods (exceeds 20 allowed). Consider refactoring. Open
public interface OntologyService {
public void setOntologyURI(OURI theURI);
GridView
has 111 functions (exceeds 20 allowed). Consider refactoring. Open
Ext.grid.GridView = Ext.extend(Ext.util.Observable, {
/**
* Override this function to apply custom CSS classes to rows during rendering. You can also supply custom
* parameters to the row template for the current row to customize how it is rendered using the <b>rowParams</b>
* parameter. This function should return the CSS class name (or empty string '' for none) that will be added
AbstractOntologyImpl
has 110 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractOntologyImpl
extends AbstractLanguageResource
implements Ontology {
Method generateReducedNetLight
has a Cognitive Complexity of 102 (exceeds 5 allowed). Consider refactoring. Open
public static PetriNet generateReducedNetLight(PetriNet pn) throws Exception{
//FIXME: Riadattare la regola considerando gli arc weight!
/* Applica regole piu leggere che non creano una petrinet minima
Regole:
- T1->P->T2 = posso togliere p ed unire le T (copiare tutti i next di T2 in T1 e rimuovere T2) solo se p ha un solo next ed un solo previous e T2 ha un solo previous
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function 4
has 395 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
"use strict";
var FormatValidators = require("./FormatValidators"),
Report = require("./Report"),
Function EventManager
has 385 lines of code (exceeds 25 allowed). Consider refactoring. Open
Ext.EventManager = function(){
var docReadyEvent,
docReadyProcId,
docReadyState = false,
DETECT_NATIVE = Ext.isGecko || Ext.isWebKit || Ext.isSafari,
File ext-yui-adapter-debug.js
has 798 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
File data-list-views-debug.js
has 796 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
File pkg-tips-debug.js
has 783 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.4.0
* Copyright(c) 2006-2011 Sencha Inc.
* licensing@sencha.com
* http://www.sencha.com/license
Method resolveImports
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
public void resolveImports(Map<String, String> importMappings) {
boolean haveUnresolvedImports = true;
// make sure we have a map, even if empty
if (importMappings == null) {
importMappings = new HashMap<String, String>();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MessageBox
has a Cognitive Complexity of 91 (exceeds 5 allowed). Consider refactoring. Open
Ext.MessageBox = function(){
var dlg, opt, mask, waitTimer,
bodyEl, msgEl, textboxEl, textareaEl, progressBar, pp, iconEl, spacerEl,
buttons, activeTextEl, bwidth, bufferIcon = '', iconCls = '',
buttonNames = ['ok', 'yes', 'no', 'cancel'];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Format
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
Ext.util.Format = function() {
var trimRe = /^\s+|\s+$/g,
stripTagsRE = /<\/?[^>]+>/gi,
stripScriptsRe = /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
nl2brRe = /\r?\n/g;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File OntologyViewerOptions.java
has 762 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* OntologyViewerOptions.java
*
* Niraj Aswani, 12/March/07
*