Thibau/datalift-sdmxdatacube

View on GitHub

Showing 55 of 55 total issues

Method doSubmit has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @POST
    @Path("/")
    @Consumes(MediaTypes.APPLICATION_FORM_URLENCODED)
    @Produces(MediaTypes.TEXT_PLAIN)
    public Response doSubmit(@FormParam("project") String project,

    Function Source has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var Source = function (parent, project, title, uri, uriPattern, creator, created) {
        var self = this;
    
        // Parent is a JS object with properties title and uri.
        // Project is also a JS object with properties title and uri.
    Severity: Minor
    Found in sdmxdatacube/src/web/public/static/js/models/Source.js - About 1 hr to fix

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

          update: function (element, valueAccessor) {
            //var value = ko.utils.unwrapObservable(valueAccessor());
      
            var values = [
              {type: "Schème", value: 'http://', name: "http://", desc: "Cette partie de l'URI spécifie le protocole utilisé pour accéder à la ressource."},
      Severity: Minor
      Found in sdmxdatacube/src/web/public/static/js/extends/handlers.js - About 1 hr to fix

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

                  $.support.transition && this.$element.hasClass('fade')?
                    this.$backdrop.one($.support.transition.end, callback) :
                    callback()
        sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 578..580

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

        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

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

              $.support.transition && this.$element.hasClass('collapse') ?
                this.$element.one($.support.transition.end, complete) :
                complete()
        sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 982..984

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

        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

        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 sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - 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 sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js - About 1 hr to fix

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

                  this.timeout = setTimeout(function() {
                    if (self.hoverState == 'in') self.show()
                  }, self.options.delay.show)
            sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1146..1148

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

            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

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

                  this.timeout = setTimeout(function() {
                    if (self.hoverState == 'out') self.hide()
                  }, self.options.delay.hide)
            sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1134..1136

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

            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

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

                update: function (element, valueAccessor) {
                  var value = ko.utils.unwrapObservable(valueAccessor());
                  $(element).tooltip({
                    title: value
                  });
            Severity: Major
            Found in sdmxdatacube/src/web/public/static/js/extends/handlers.js and 1 other location - About 1 hr to fix
            sdmxdatacube/src/web/public/static/js/extends/handlers.js on lines 69..74

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

            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

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

                init: function (element, valueAccessor) {
                  var value = ko.utils.unwrapObservable(valueAccessor());
                  $(element).tooltip({
                    title: value
                  });
            Severity: Major
            Found in sdmxdatacube/src/web/public/static/js/extends/handlers.js and 1 other location - About 1 hr to fix
            sdmxdatacube/src/web/public/static/js/extends/handlers.js on lines 75..80

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

            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

            Function Source has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              var Source = function (parent, project, title, uri, uriPattern, creator, created) {
            Severity: Major
            Found in sdmxdatacube/src/web/public/static/js/models/Source.js - About 50 mins to fix

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

                        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1104..1104

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

              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

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

                        this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1105..1105

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

              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

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

                    this.$element
                      .on('focus',    $.proxy(this.focus, this))
                      .on('blur',     $.proxy(this.blur, this))
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 294..296

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

              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 2 locations. Consider refactoring.
              Open

                , destroy: function () {
                    this.hide().$element.off('.' + this.type).removeData(this.type)
                  }
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1472..1474

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

              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

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

                  this.options.pause == 'hover' && this.$element
                    .on('mouseenter', $.proxy(this.pause, this))
                    .on('mouseleave', $.proxy(this.cycle, this))
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1990..1992

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

              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 2 locations. Consider refactoring.
              Open

                , destroy: function () {
                    this.hide().$element.off('.' + this.type).removeData(this.type)
                  }
              sdmxdatacube/src/web/public/static/js/libs/bootstrap-2.3.0.min.js on lines 1353..1355

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

              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 doSubmit has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public Response doSubmit(@FormParam("project") String project,
                          @FormParam("source") String source,
                          @FormParam("dest_title") String dest_title,
                          @FormParam("dest_graph_uri") String dest_graph_uri,
                          @FormParam("vizualisation") boolean vizualisation)

                Method validate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    private MessageTransporter validate(String project, String source,
                            String dest_graph_uri, String dest_title, boolean vizualisation) {
                  Severity
                  Category
                  Status
                  Source
                  Language