concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Function drawSeriesLines has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    drawSeriesLines: function(series){
        series = series || this.series;
        var ctx = this.ctx;
        ctx.save();
        ctx.translate(this.plotOffset.left, this.plotOffset.top);
Severity: Minor
Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 hr to fix

    Function drawSelection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        drawSelection: function() {
            var prevSelection = this.prevSelection,
                selection = this.selection,
                octx = this.octx,
                options = this.options,
    Severity: Minor
    Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 1 hr to fix

      Function _createCornerSlice has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

         _createCornerSlice: function(color,bgColor, n, position) {
            var slice = document.createElement("span");
      
            var inStyle = slice.style;
            inStyle.backgroundColor = color;
      Severity: Minor
      Found in rails/app/assets/javascripts/active_scaffold/default/rico_corner.js - About 1 hr to fix

        Function createList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          createList: function(items) {
            var list = new Element('ul');
        
            items.each(function(item){
              list.insert(
        Severity: Minor
        Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js - About 1 hr to fix

          Function drawSeriesLines has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              drawSeriesLines: function(series){
                  series = series || this.series;
                  var ctx = this.ctx;
                  ctx.save();
                  ctx.translate(this.plotOffset.left, this.plotOffset.top);
          Severity: Minor
          Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 hr to fix

            Function drawSelection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                drawSelection: function() {
                    var prevSelection = this.prevSelection,
                        selection = this.selection,
                        octx = this.octx,
                        options = this.options,
            Severity: Minor
            Found in rails/app/assets/javascripts/flotr/flotr.js - About 1 hr to fix

              Function scroll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                scroll: function(deltaPixel) {
                  if (this.animating)
                    return this;
              
                  // Compute new position
              Severity: Minor
              Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js - About 1 hr to fix

                Method handle_initial_auth has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def handle_initial_auth
                    user, role = check_for_auth_token(params)
                
                    if role
                      learner = role[:learner]
                Severity: Minor
                Found in rails/app/controllers/api/v1/jwt_controller.rb - About 1 hr to fix

                  Method detailed_learner_info has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def self.detailed_learner_info(learner)
                      teacherIds = learner.teachers_id
                      teachers = teacherIds.each_with_index.map do |id, i|
                        {
                          user_id: id,
                  Severity: Minor
                  Found in rails/app/controllers/api/v1/report_learners_es_controller.rb - About 1 hr to fix

                    Method create_default_assignments_for_class has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def self.create_default_assignments_for_class
                        #this method assigns study materials to the classes
                        DEFAULT_DATA[:assignments].each do |assignment_key, assignment|
                          clazz = @default_classes.find{|c| c.name == assignment[:class_name]}
                          if clazz
                    Severity: Minor
                    Found in rails/lib/mock_data/create_default_data.rb - About 1 hr to fix

                      Method up has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def self.up
                          # this is de-normalized table, with some indexes
                          # to speed up reporting. It will help with data filtering.
                          create_table :report_learners do |t|
                            t.integer  :learner_id
                      Severity: Minor
                      Found in rails/db/migrate/20111130220121_create_report_learner.rb - About 1 hr to fix

                        Function apiCall has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          apiCall (action: any, options: any) {
                            const basePath = "/api/v1/students";
                            const { data, onSuccess, onError } = options;
                        
                            const { url, type } = ({

                          Function render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            render () {
                              const { group } = this.state;
                              switch (group.type) {
                                case "investigations":
                                  this.materialType = "Investigation";

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

                                    if ( jQuery.isFunction( html ) ) {
                                        return this.each(function(i) {
                                            jQuery(this).wrapInner( html.call(this, i) );
                                        });
                                    }
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 5699..5703

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

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

                              setDraggable: function(draggable) {
                                this.options.draggable = draggable;
                                this.element[(draggable ? 'add' : 'remove') + 'ClassName']('draggable');
                                return this;
                              },
                            Severity: Major
                            Found in rails/app/assets/javascripts/prototype-ui/prototype-ui.js and 2 other locations - About 1 hr to fix
                            rails/app/assets/javascripts/livepipe/window.js on lines 2013..2017
                            rails/public/javascripts/light_box.js on lines 3770..3774

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

                            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

                                    "even": createPositionalPseudo(function( matchIndexes, length, argument ) {
                                        for ( var i = 0; i < length; i += 2 ) {
                                            matchIndexes.push( i );
                                        }
                                        return matchIndexes;
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 4541..4546

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

                            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

                                    "odd": createPositionalPseudo(function( matchIndexes, length, argument ) {
                                        for ( var i = 1; i < length; i += 2 ) {
                                            matchIndexes.push( i );
                                        }
                                        return matchIndexes;
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 4534..4539

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

                            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

                                  while ( i-- ) {
                                    cached = matcherFromTokens( match[i] );
                                    if ( cached[ expando ] ) {
                                      setMatchers.push( cached );
                                    } else {
                            Severity: Major
                            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 5073..5080

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

                            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

                                    "button": function( elem ) {
                                        var name = elem.nodeName.toLowerCase();
                                        return name === "input" && elem.type === "button" || name === "button";
                                    },
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/prototype.js on lines 5674..5677

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

                            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

                                    if ( jQuery.isFunction( html ) ) {
                                        return this.each(function(i) {
                                            jQuery(this).wrapAll( html.call(this, i) );
                                        });
                                    }
                            Severity: Major
                            Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 1 hr to fix
                            rails/app/assets/javascripts/jquery/jquery.js on lines 5728..5732

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

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language