camdub/Internships

View on GitHub

Showing 584 of 584 total issues

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

    title: function(title, offset, colour, format) {
        if (arguments.length == 0) {
            return {title: this._title, offset: this._titleOffset, format: this._titleFormat};
        }
        if (typeof offset != 'number') {
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js and 1 other location - About 1 day to fix
public/javascripts/jquery.svg/jquery.svgplot.js on lines 668..688

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

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

        _createBackColorMenu : function() {
            var c, t = this, s = t.settings, o = {}, v;

            if (s.theme_advanced_more_colors) {
                o.more_colors_func = function() {
public/javascripts/tinyeditor/themes/advanced/editor_template_src.js on lines 443..470

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

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

        _createForeColorMenu : function() {
            var c, t = this, s = t.settings, o = {}, v;

            if (s.theme_advanced_more_colors) {
                o.more_colors_func = function() {
public/javascripts/tinyeditor/themes/advanced/editor_template_src.js on lines 472..499

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

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 map_script.js has 528 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//defines map and oTable as global variables that will be used in various places
var map, oTable;
//initiates an empty object to store the data for internships
var internship_data = {'countries':{},'regions':{}};
//initiates the internship_locations object which stores the x,y coordinates for the map for both countries and regions
Severity: Major
Found in public/javascripts/map_script.js - About 1 day to fix

    File jquery.tokeninput.js has 523 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * jQuery Plugin: Tokenizing Autocomplete Text Entry
     * Version 1.4.2
     *
     * Copyright (c) 2009 James Smith (http://loopj.com)
    Severity: Major
    Found in public/javascripts/jquery.tokeninput.js - About 1 day to fix

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

              $('button.next_step').click(function(){
      
                  var step = $(this).attr('id');
                  var hash_step = ('#'+step);
      
      
      Severity: Major
      Found in public/javascripts/application.js and 1 other location - About 1 day to fix
      public/javascripts/adminica_ui.js on lines 157..175

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

      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

          $('button.next_step').click(function(){
              
              var step = $(this).attr('id');
              var hash_step = ('#'+step);
              
      Severity: Major
      Found in public/javascripts/adminica_ui.js and 1 other location - About 1 day to fix
      public/javascripts/application.js on lines 269..286

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

      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

            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              data = _ref[_i];
              if (data.group) {
                content += this.result_add_group(data);
              } else if (!data.empty) {
      Severity: Major
      Found in public/javascripts/chosen/chosen.proto.js and 1 other location - About 1 day to fix
      public/javascripts/chosen/chosen.jquery.js on lines 461..476

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

      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

            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              data = _ref[_i];
              if (data.group) {
                content += this.result_add_group(data);
              } else if (!data.empty) {
      Severity: Major
      Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 1 day to fix
      public/javascripts/chosen/chosen.proto.js on lines 454..469

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

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

      TINY.editor=function(){
          var c=[], offset=-30;
          c['cut']=[1,'Cut','a','cut',1];
          c['copy']=[2,'Copy','a','copy',1];
          c['paste']=[3,'Paste','a','paste',1];
      Severity: Major
      Found in public/javascripts/tinyeditor/tinyeditor.js - About 7 hrs to fix

        File adminica_ui.js has 490 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Adminica UI
         *
         * Copyright (c) 2010 Tricycle Interactive
         *
        Severity: Minor
        Found in public/javascripts/adminica_ui.js - About 7 hrs to fix

          File jquery.uniform.js has 489 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
          
          Uniform v1.7.5
          Copyright © 2009 Josh Pyles / Pixelmatrix Design LLC
          http://pixelmatrixdesign.com
          Severity: Minor
          Found in public/javascripts/jquery.uniform.js - About 7 hrs to fix

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

                        if (regex.test(option.html)) {
                          found = true;
                          results += 1;
                        } else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) {
                          parts = option.html.replace(/\[|\]/g, "").split(" ");
            Severity: Major
            Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 7 hrs to fix
            public/javascripts/chosen/chosen.proto.js on lines 703..717

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

            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

                        if (regex.test(option.html)) {
                          found = true;
                          results += 1;
                        } else if (option.html.indexOf(" ") >= 0 || option.html.indexOf("[") === 0) {
                          parts = option.html.replace(/\[|\]/g, "").split(" ");
            Severity: Major
            Found in public/javascripts/chosen/chosen.proto.js and 1 other location - About 7 hrs to fix
            public/javascripts/chosen/chosen.jquery.js on lines 702..716

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

            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

                title: function(value, offset, colour, settings) {
                    if (arguments.length == 0) {
                        return this._title;
                    }
                    if (typeof offset != 'number') {
            Severity: Major
            Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 7 hrs to fix
            public/javascripts/jquery.svg/jquery.svggraph.js on lines 240..258

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

            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

                $('.wizard_steps ul li a').click(function(){
                    $('.wizard_steps ul li').removeClass('current');
                    $(this).parent('li').addClass('current');
                    
                    var step = $(this).attr('href');
            Severity: Major
            Found in public/javascripts/adminica_ui.js and 1 other location - About 7 hrs to fix
            public/javascripts/application.js on lines 252..267

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

            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

                title: function(value, offset, colour, settings) {
                    if (arguments.length == 0) {
                        return this._title;
                    }
                    if (typeof offset != 'number') {
            Severity: Major
            Found in public/javascripts/jquery.svg/jquery.svggraph.js and 1 other location - About 7 hrs to fix
            public/javascripts/jquery.svg/jquery.svgplot.js on lines 140..158

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

            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

                    $('.wizard_steps ul li a').click(function(){
                        $('.wizard_steps ul li').removeClass('current');
                        $(this).parent('li').addClass('current');
            
                        var step = $(this).attr('href');
            Severity: Major
            Found in public/javascripts/application.js and 1 other location - About 7 hrs to fix
            public/javascripts/adminica_ui.js on lines 140..155

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

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

                    _nodeChanged : function(ed, cm, n, co, ob) {
                        var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
            
                        tinymce.each(t.stateControls, function(c) {
                            cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
            Severity: Major
            Found in public/javascripts/tinyeditor/themes/advanced/editor_template_src.js - About 7 hrs to fix

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

                      if (!this._plotCont.width) {
                          this._plotCont.setAttribute('width',
                              parseInt(this._plotCont.getAttribute('width'), 10) || this._wrapper._width());
                      }
                      else if (this._plotCont.width.baseVal) {
              Severity: Major
              Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 7 hrs to fix
              public/javascripts/jquery.svg/jquery.svggraph.js on lines 318..328

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

              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