camdub/Internships

View on GitHub

Showing 584 of 584 total issues

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

(function() {
  /*
  Chosen source: generate output using 'cake build'
  Copyright (c) 2011 by Harvest
  */
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 1 wk to fix
public/javascripts/chosen/chosen.proto.js on lines 84..231

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

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() {
  /*
  Chosen source: generate output using 'cake build'
  Copyright (c) 2011 by Harvest
  */
Severity: Major
Found in public/javascripts/chosen/chosen.proto.js and 1 other location - About 1 wk to fix
public/javascripts/chosen/chosen.jquery.js on lines 84..231

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

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() {
  var SelectParser;
  SelectParser = (function() {
    function SelectParser() {
      this.options_index = 0;
Severity: Major
Found in public/javascripts/chosen/chosen.proto.js and 1 other location - About 4 days to fix
public/javascripts/chosen/chosen.jquery.js on lines 10..83

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

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() {
  var SelectParser;
  SelectParser = (function() {
    function SelectParser() {
      this.options_index = 0;
Severity: Major
Found in public/javascripts/chosen/chosen.jquery.js and 1 other location - About 4 days to fix
public/javascripts/chosen/chosen.proto.js on lines 10..83

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

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

/* http://keith-wood.name/svg.html
   SVG graphing extension for jQuery v1.4.3.
   Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svggraph.js - About 2 days to fix

    File editor_template_src.js has 999 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * editor_template_src.js
     *
     * Copyright 2009, Moxiecode Systems AB
     * Released under LGPL License.
    Severity: Major
    Found in public/javascripts/tinyeditor/themes/advanced/editor_template_src.js - About 2 days to fix

      Function uniform has 457 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        $.fn.uniform = function(options) {
      
          options = $.extend($.uniform.options, options);
      
          var el = this;
      Severity: Major
      Found in public/javascripts/jquery.uniform.js - About 2 days to fix

        File chosen.proto.js has 895 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // Chosen, a Select Box Enhancer for jQuery and Protoype
        // by Patrick Filler for Harvest, http://getharvest.com
        // 
        // Version 0.9.5
        // Full source at https://github.com/harvesthq/chosen
        Severity: Major
        Found in public/javascripts/chosen/chosen.proto.js - About 2 days to fix

          Function TokenList has 436 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          $.TokenList = function (input, url_or_data, settings) {
              //
              // Initialization
              //
          
          
          Severity: Major
          Found in public/javascripts/jquery.tokeninput.js - About 2 days to fix

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

            // Chosen, a Select Box Enhancer for jQuery and Protoype
            // by Patrick Filler for Harvest, http://getharvest.com
            // 
            // Version 0.9.5
            // Full source at https://github.com/harvesthq/chosen
            Severity: Major
            Found in public/javascripts/chosen/chosen.jquery.js - About 2 days to fix

              File jquery.fancybox-1.3.4.js has 844 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * FancyBox - jQuery Plugin
               * Simple and fancy lightbox alternative
               *
               * Examples and documentation at: http://fancybox.net
              Severity: Major
              Found in public/javascripts/fancybox/jquery.fancybox-1.3.4.js - About 2 days to fix

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

                /* http://keith-wood.name/svg.html
                   SVG for jQuery v1.4.3.
                   Written by Keith Wood (kbwood{at}iinet.com.au) August 2007.
                   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
                   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. 
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svg.js - About 1 day to fix

                  Function editor has a Cognitive Complexity of 97 (exceeds 5 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: Minor
                  Found in public/javascripts/tinyeditor/tinyeditor.js - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

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

                  $.extend(SVGGraphLegend.prototype, {
                  
                      /* Set or retrieve whether the legend should be shown.
                         @param  show  (boolean) true to display it, false to hide it
                         @return  (SVGGraphLegend) this legend object or
                  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 749..808

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

                  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

                  $.extend(SVGPlotLegend.prototype, {
                  
                      /* Set or retrieve whether the legend should be shown.
                         @param  show  (boolean) true to display it, false to hide it
                         @return  (SVGPlotLegend) this legend object or
                  Severity: Major
                  Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 day to fix
                  public/javascripts/jquery.svg/jquery.svggraph.js on lines 821..880

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

                  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 index has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def index
                      @internships = Internship.all
                  
                      # Very inefficient when users table has thousands of rows.
                      respond_to do |format|
                  Severity: Minor
                  Found in app/controllers/internships_controller.rb - About 1 day to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

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

                      _attrNames: {class_: 'class', in_: 'in',
                          alignmentBaseline: 'alignment-baseline', baselineShift: 'baseline-shift',
                          clipPath: 'clip-path', clipRule: 'clip-rule',
                          colorInterpolation: 'color-interpolation',
                          colorInterpolationFilters: 'color-interpolation-filters',
                  Severity: Major
                  Found in public/javascripts/jquery.svg/jquery.svg.js and 1 other location - About 1 day to fix
                  public/javascripts/tinyeditor/themes/advanced/langs/en_dlg.js on lines 1..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 262.

                  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

                  tinyMCE.addI18n('en.advanced_dlg',{
                  about_title:"About TinyMCE",
                  about_general:"About",
                  about_help:"Help",
                  about_license:"License",
                  public/javascripts/jquery.svg/jquery.svg.js on lines 53..81

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

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

                  /* http://keith-wood.name/svg.html
                     SVG plotting extension for jQuery v1.4.3.
                     Written by Keith Wood (kbwood{at}iinet.com.au) December 2008.
                     Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
                     MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
                  Severity: Major
                  Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 1 day to fix

                    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.svgplot.js and 1 other location - About 1 day to fix
                    public/javascripts/jquery.svg/jquery.svggraph.js on lines 736..756

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language