Showing 4,261 of 4,261 total issues
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 {
Similar blocks of code found in 2 locations. Consider refactoring. Open
/**
*/
package eu.learnpad.transformations.metamodel_corpus.ado.impl;
import org.eclipse.emf.common.notify.Notification;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 1027.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
/**
*/
package eu.learnpad.transformations.metamodel_corpus.xwiki.impl;
import org.eclipse.emf.common.notify.Notification;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 1027.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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
*