Thibau/datalift-datacubeviz

View on GitHub

Showing 18 of 73 total issues

File bootstrap-2.3.0.min.js has 1508 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* ===================================================
 * bootstrap-transition.js v2.3.0
 * http://twitter.github.com/bootstrap/javascript.html#transitions
 * ===================================================
 * Copyright 2012 Twitter, Inc.
Severity: Major
Found in datacubeviz/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 4 days to fix

    Method getDataSetsNew has 138 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @GET
        @Path("/ws/datasetsnew")
        @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
        public Response getDataSetsNew(@QueryParam("project") java.net.URI projectId) {
            Project p = this.getProject(projectId);

      Function ExplorerViewModel has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var ExplorerViewModel = function (project, language) {
          var self = this;
      
          self.project             = ko.observable(project);
          self.language            = ko.observable(language);
      Severity: Major
      Found in datacubeviz/src/web/public/static/js/viewmodels/explorer.js - About 2 hrs to fix

        Function Dataset has 17 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          var Dataset = function (uri, source, title, description, identifier, depiction, license, origin, date, created, issued, modified, seeAlso, subjects, publisher, creator, contributor) {
        Severity: Major
        Found in datacubeviz/src/web/public/static/js/models/datacube/Dataset.js - About 2 hrs to fix

          Function DatasetFactory has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var DatasetFactory = function (lang) {
              var self = this;
          
              self.lang = lang.toUpperCase();
          
          

            File DatacubeVizController.java has 253 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Copyright / LIRMM 2013
             * Contributor(s) : T. Colas, T. Marmin
             *
             * Contact: thibaut.marmin@etud.univ-montp2.fr

              Function build has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  self.build = function (bindings) {
                    var rawDatasets = {};
                    var current, uri;
              
                    // A dataset can have (often has) multiple bindings.

                Function slide has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  , slide: function (type, next) {
                      var $active = this.$element.find('.item.active')
                        , $next = next || $active[type]()
                        , isCycling = this.interval
                        , direction = type == 'next' ? 'left' : 'right'
                Severity: Minor
                Found in datacubeviz/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 1 hr to fix

                  Function show has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    , show: function () {
                        var $tip
                          , pos
                          , actualWidth
                          , actualHeight
                  Severity: Minor
                  Found in datacubeviz/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 1 hr to fix

                    Function fnUpdate has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          "fnUpdate": function ( oSettings, fnDraw ) {
                            var iListLength = 5;
                            var oPaging = oSettings.oInstance.fnPagingInfo();
                            var an = oSettings.aanFeatures.p;
                            var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);

                      Function update has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            update: function (element, valueAccessor) {
                              var binding = ko.utils.unwrapObservable(valueAccessor());
                      
                              if (binding) {
                                var data = function() {
                      Severity: Minor
                      Found in datacubeviz/src/web/public/static/js/extends/nvd3-handlers.js - About 1 hr to fix

                        Function applyPlacement has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          , applyPlacement: function(offset, placement){
                              var $tip = this.tip()
                                , width = $tip[0].offsetWidth
                                , height = $tip[0].offsetHeight
                                , actualWidth
                        Severity: Minor
                        Found in datacubeviz/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 1 hr to fix

                          Method canHandle has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              @Override
                              public UriDesc canHandle(Project p) {
                                  UriDesc projectPage = null;
                                  // The project can be handled if it has at least one datacube
                                  // source.

                          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 getDatasets has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public TupleQueryResult getDatasets(Source src) {
                                  TupleQueryResult rs = null;
                                  if (src instanceof TransformedRdfSource) {
                                      try {
                                          TransformedRdfSource rdf = (TransformedRdfSource) src;
                          Severity: Minor
                          Found in datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizModel.java - About 1 hr to fix

                            Function keydown has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              , keydown: function (e) {
                                  var $this
                                    , $items
                                    , $active
                                    , $parent
                            Severity: Minor
                            Found in datacubeviz/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 1 hr to fix

                              Method getDataSetsNew has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  @GET
                                  @Path("/ws/datasetsnew")
                                  @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
                                  public Response getDataSetsNew(@QueryParam("project") java.net.URI projectId) {
                                      Project p = this.getProject(projectId);
                              Severity: Minor
                              Found in datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizController.java - About 55 mins to fix

                              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

                              Consider simplifying this complex logical expression.
                              Open

                                      if (!current) {
                                        current             = {};
                                        current.uri         = uri;
                                        // We don't have any mean to retrieve sources at the moment.
                                        current.source      = {};
                              Severity: Major
                              Found in datacubeviz/src/web/public/static/js/models/factories/DatasetFactory.js - About 40 mins to fix

                                Method getDataSets has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    @GET
                                    @Path("/ws/datasets")
                                    @Produces({ MediaTypes.APPLICATION_JSON_UTF8 })
                                    public Response getDataSets(@QueryParam("project") java.net.URI projectId) {
                                
                                
                                Severity: Minor
                                Found in datacubeviz/src/java/org/datalift/datacubeviz/DatacubeVizController.java - About 35 mins to fix

                                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

                                Severity
                                Category
                                Status
                                Source
                                Language