concord-consortium/rigse

View on GitHub

Showing 2,136 of 2,138 total issues

Function Deferred has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Deferred: function( func ) {
        var tuples = [
                // action, add listener, listener list, final state
                [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
Severity: Major
Found in rails/app/assets/javascripts/jquery/jquery.js - About 2 hrs to fix

    Function plotBars has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        plotBars: function(series, barWidth, offset, fill){
            var data = series.data;
            if(data.length < 1) return;
            
            var xa = series.xaxis,
    Severity: Major
    Found in rails/app/assets/javascripts/flotr/flotr_out.js - About 2 hrs to fix

      Function plotBars has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          plotBars: function(series, barWidth, offset, fill){
              var data = series.data;
              if(data.length < 1) return;
              
              var xa = series.xaxis,
      Severity: Major
      Found in rails/app/assets/javascripts/flotr/flotr.js - About 2 hrs to fix

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

        function elementMatcher( matchers ) {
            return matchers.length > 1 ?
                function( elem, context, xml ) {
                    var i = matchers.length;
                    while ( i-- ) {
        Severity: Major
        Found in rails/app/assets/javascripts/jquery/jquery.js and 1 other location - About 2 hrs to fix
        rails/app/assets/javascripts/prototype.js on lines 5861..5873

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

        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

          function elementMatcher( matchers ) {
            return matchers.length > 1 ?
              function( elem, context, xml ) {
                var i = matchers.length;
                while ( i-- ) {
        Severity: Major
        Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 2 hrs to fix
        rails/app/assets/javascripts/jquery/jquery.js on lines 4796..4808

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

        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

                        <tr>
                          <td><label htmlFor="name">Name</label></td>
                          <td><input name="name" value={name} onChange={this.handleUpdateName} /></td>
                        </tr>
        rails/react-components/src/library/components/portal-classes/copy-dialog.tsx on lines 59..62

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

        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

          const permissionFormToAddOptions = Object.freeze(
            currentForms.filter(pf => !permissionFormsToRemove.find(pfr => pfr.value === pf.id)).map(pf => ({ value: pf.id, label: pf.name }))
          );
        rails/react-components/src/library/components/permission-forms/students-tab/students-table.tsx on lines 56..58

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

        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

          const permissionFormToRemoveOptions = Object.freeze(
            currentForms.filter(pf => !permissionFormsToAdd.find(pfr => pfr.value === pf.id)).map(pf => ({ value: pf.id, label: pf.name }))
          );
        rails/react-components/src/library/components/permission-forms/students-tab/students-table.tsx on lines 52..54

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

        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

                        <tr>
                          <td><label htmlFor="class_word">Class Word</label></td>
                          <td><input name="class_word" value={classWord} onChange={this.handleUpdateClassWord} /></td>
                        </tr>
        rails/react-components/src/library/components/portal-classes/copy-dialog.tsx on lines 55..58

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

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

              "CHILD": function( type, what, argument, first, last ) {
                var simple = type.slice( 0, 3 ) !== "nth",
                  forward = type.slice( -4 ) !== "last",
                  ofType = what === "of-type";
        
        
        Severity: Major
        Found in rails/app/assets/javascripts/prototype.js - About 2 hrs to fix

          Method stem_resources has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def stem_resources
          
              # logger.info("INFO stem_resources")
          
              if ! params[:id]
          Severity: Major
          Found in rails/app/controllers/home_controller.rb - About 2 hrs to fix

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

              function pointerY(event) {
                var docElement = document.documentElement,
                  body = document.body || { scrollTop: 0 };
            
                return  event.pageY || (event.clientY +
            Severity: Major
            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 2 hrs to fix
            rails/app/assets/javascripts/prototype.js on lines 6795..6802

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

            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

              function pointerX(event) {
                var docElement = document.documentElement,
                  body = document.body || { scrollLeft: 0 };
            
                return event.pageX || (event.clientX +
            Severity: Major
            Found in rails/app/assets/javascripts/prototype.js and 1 other location - About 2 hrs to fix
            rails/app/assets/javascripts/prototype.js on lines 6804..6811

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

            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

                              <td>
                                <LinkButton onClick={() => handleViewStudentsClick(classInfo.id)} active={active}>
                                  {
                                    active ? "Hide Students" : "Show Students"
                                  }
            rails/react-components/src/library/components/permission-forms/students-tab/students-tab.tsx on lines 109..118

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

            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

                                  <td className={css.expandButton}>
                                    <LinkButton onClick={() => handleViewClassesClick(teacher.id)} active={active}>
                                      {
                                        active ? "Hide Classes" : "Show Classes"
                                      }
            rails/react-components/src/library/components/permission-forms/students-tab/classes-table.tsx on lines 44..53

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

            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

            Consider simplifying this complex logical expression.
            Open

                          if ( forward && useCache ) {
                            outerCache = parent[ expando ] || (parent[ expando ] = {});
                            cache = outerCache[ type ] || [];
                            nodeIndex = cache[0] === dirruns && cache[1];
                            diff = cache[0] === dirruns && cache[2];
            Severity: Critical
            Found in rails/app/assets/javascripts/prototype.js - About 2 hrs to fix

              Corner has 22 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Rico.Corner = {
              
                 round: function(e, options) {
                    var e = $(e);
                    this._setOptions(options);
              Severity: Minor
              Found in rails/app/assets/javascripts/active_scaffold/default/rico_corner.js - About 2 hrs to fix

                Function initialize has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    initialize: function(tab_list_container,options){
                        if(!$(tab_list_container))
                            throw "Control.Tabs could not find the element: " + tab_list_container;
                        this.activeContainer = false;
                        this.activeLink = false;
                Severity: Major
                Found in rails/app/assets/javascripts/livepipe/tabs.js - About 2 hrs to fix

                  Function parseFormat has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  var parseFormat = function(format) {
                  
                                      var gndx = 0, group = 0, num = 1, res = {
                                          fstack:         [], // format stack
                                          asterisk:       0, // asterisk?
                  Severity: Major
                  Found in rails/app/assets/javascripts/jquery.paging.js - About 2 hrs to fix

                    Function query has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      query (_params: any, fieldName?: any, searchString?: any) {
                        if (fieldName) {
                          this.setState({ [`waitingFor_${fieldName}`]: true });
                        }
                    
                    
                      Severity
                      Category
                      Status
                      Source
                      Language