LearnPAd/learnpad

View on GitHub

Showing 4,261 of 4,261 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Ext.lib.Region.prototype = {
    contains : function(region) {
        return ( region.left   >= this.left   &&
                 region.right  <= this.right  &&
                 region.top    >= this.top    &&
lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/prototype/ext-prototype-adapter-debug.js on lines 1758..1807

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 614.

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

Further Reading

File AbstractOntologyImpl.java has 1348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  Copyright (c) 1995-2012, The University of Sheffield. See the file
 *  COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
 *
 *  This file is part of GATE (see http://gate.ac.uk/), and is free

    OntologyServiceImplSesame has 177 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class OntologyServiceImplSesame implements OntologyService {
    
      // ***************************************************************************
      // **** CONSTANTS ************************************************************
      // ***************************************************************************

      Function swfobject has 664 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var swfobject = function() {
          
          var UNDEF = "undefined",
              OBJECT = "object",
              SHOCKWAVE_FLASH = "Shockwave Flash",

        Function DomQuery has 650 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Ext.DomQuery = function(){
            var cache = {}, 
                simpleCache = {}, 
                valueCache = {},
                nonSpace = /\S/,

          File pkg-charts-debug.js has 1176 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 window-debug.js has 1166 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 DomHelper has a Cognitive Complexity of 145 (exceeds 5 allowed). Consider refactoring.
              Open

              Ext.DomHelper = function(){
                  var tempTableEl = null,
                      emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,
                      tableRe = /^table|tbody|tr|td$/i,
                      confRe = /tag|children|cn|html$/i,

              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

              Method generateFromAdoxxBPMN has a Cognitive Complexity of 140 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static PetriNet[] generateFromAdoxxBPMN(Document adoxxXml) throws Exception{
                      /* To Remember:
                       * - id are unique between all the models
                       * - name are unique only inside a model. Es: 2 model can have a task with the same name.
                       * */

              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

              AdoPackageImpl has 137 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public class AdoPackageImpl extends EPackageImpl implements AdoPackage {
                  /**
                   * <!-- begin-user-doc -->
                   * <!-- end-user-doc -->
                   * @generated

                File pkg-menu-debug.js has 1059 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 DragDropMgr has 531 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  Ext.dd.DragDropMgr = function() {
                  
                      var Event = Ext.EventManager;
                  
                      return {

                    AdoPackage has 133 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    public interface AdoPackage extends EPackage {
                        /**
                         * The package name.
                         * <!-- begin-user-doc -->
                         * <!-- end-user-doc -->

                      Method actionPerformed has a Cognitive Complexity of 128 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void actionPerformed(ActionEvent ae) {
                      
                            if(ae.getSource() == otherAS) {
                              annotationSetsNamesCB.setEnabled(true);
                              if(annotationSetsNamesCB.getSelectedItem() == null

                      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

                      Identical blocks of code found in 4 locations. Consider refactoring.
                      Open

                      Ext.apply(Function.prototype, {
                           /**
                           * Creates an interceptor function. The passed function is called before the original one. If it returns false,
                           * the original one is not called. The resulting function returns the results of the original function.
                           * The passed function is called with the parameters of the original function. Example usage:
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/jquery/ext-jquery-adapter-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/prototype/ext-prototype-adapter-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/yui/ext-yui-adapter-debug.js on lines 852..1008

                      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 447.

                      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

                      Further Reading

                      Identical blocks of code found in 4 locations. Consider refactoring.
                      Open

                      Ext.apply(Function.prototype, {
                           /**
                           * Creates an interceptor function. The passed function is called before the original one. If it returns false,
                           * the original one is not called. The resulting function returns the results of the original function.
                           * The passed function is called with the parameters of the original function. Example usage:
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/ext/ext-base-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/prototype/ext-prototype-adapter-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/yui/ext-yui-adapter-debug.js on lines 852..1008

                      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 447.

                      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

                      Further Reading

                      Identical blocks of code found in 4 locations. Consider refactoring.
                      Open

                      Ext.apply(Function.prototype, {
                           /**
                           * Creates an interceptor function. The passed function is called before the original one. If it returns false,
                           * the original one is not called. The resulting function returns the results of the original function.
                           * The passed function is called with the parameters of the original function. Example usage:
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/ext/ext-base-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/jquery/ext-jquery-adapter-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/yui/ext-yui-adapter-debug.js on lines 852..1008

                      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 447.

                      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

                      Further Reading

                      Identical blocks of code found in 4 locations. Consider refactoring.
                      Open

                      Ext.apply(Function.prototype, {
                           /**
                           * Creates an interceptor function. The passed function is called before the original one. If it returns false,
                           * the original one is not called. The resulting function returns the results of the original function.
                           * The passed function is called with the parameters of the original function. Example usage:
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/ext/ext-base-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/jquery/ext-jquery-adapter-debug.js on lines 852..1008
                      lp-dashboard-kpi/lp-dash-adoxx-cockpit/src/main/webapp/ext-3.4.0/adapter/prototype/ext-prototype-adapter-debug.js on lines 852..1008

                      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 447.

                      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

                      Further Reading

                      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;

                      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
                        Severity
                        Category
                        Status
                        Source
                        Language