igor-alexandrov/wiselinks

View on GitHub
build/wiselinks-1.2.2.js

Summary

Maintainability
F
4 mos
Test Coverage

File wiselinks-1.2.2.js has 1978 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Wiselinks-1.2.2
 * @copyright 2012-2014 Igor Alexandrov, Alexey Solilin, Julia Egorova, Alexandr Borisov
 * @preserve https://github.com/igor-alexandrov/wiselinks
 */
Severity: Major
Found in build/wiselinks-1.2.2.js - About 5 days to fix

    Function initCore has 855 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        History.initCore = function(options){
            // Initialise
            if ( typeof History.initCore.initialized !== 'undefined' ) {
                // Already Loaded
                return false;
    Severity: Major
    Found in build/wiselinks-1.2.2.js - About 4 days to fix

      Function initHtml4 has 261 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          History.initHtml4 = function(){
              // Initialise
              if ( typeof History.initHtml4.initialized !== 'undefined' ) {
                  // Already Loaded
                  return false;
      Severity: Major
      Found in build/wiselinks-1.2.2.js - About 1 day to fix

        Function str has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function str(key, holder) {
        
        // Produce a string from holder[key].
        
                var i,          // The loop counter.
        Severity: Major
        Found in build/wiselinks-1.2.2.js - About 2 hrs to fix

          Function hashChangeInit has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                      History.hashChangeInit = function(){
                          // Define our Checker Function
                          History.checkerFunction = null;
          
                          // Define some variables that will help in our checker function
          Severity: Major
          Found in build/wiselinks-1.2.2.js - About 2 hrs to fix

            Function onUnload has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        History.onUnload = function(){
                            // Prepare
                            var    currentStore, item, currentStoreString;
            
                            // Fetch
            Severity: Minor
            Found in build/wiselinks-1.2.2.js - About 1 hr to fix

              Function onPopState has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          History.onPopState = function(event,extra){
                              // Prepare
                              var stateId = false, newState = false, currentHash, currentState;
              
                              // Reset the double check
              Severity: Minor
              Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                Function log has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        History.log = function(){
                            // Prepare
                            var
                                consoleExists = !(typeof console === 'undefined' || typeof console.log === 'undefined' || typeof console.log.apply === 'undefined'),
                                textarea = document.getElementById('log'),
                Severity: Minor
                Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                  Function Page has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Page($target, options) {
                        var self;
                        this.$target = $target;
                        this.options = options;
                        self = this;
                  Severity: Minor
                  Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                    Function pushState has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                History.pushState = function(data,title,url,queue){
                                    //History.debug('History.pushState: called', arguments);
                    
                                    // We assume that the URL passed in is URI-encoded, but this makes
                                    // sure that it's fully URI encoded; any '%'s that are encoded are
                    Severity: Minor
                    Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                      Function parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              JSON.parse = function (text, reviver) {
                      
                      // The parse method takes a text and an optional reviver function, and returns
                      // a JavaScript value if the text is a valid JSON text.
                      
                      
                      Severity: Minor
                      Found in build/wiselinks-1.2.2.js - About 1 hr to fix

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

                                    History.onHashChange = function(event){
                                        //History.debug('History.onHashChange', arguments);
                        
                                        // Prepare
                                        var currentUrl = ((event && event.newURL) || History.getLocationHref()),
                        Severity: Minor
                        Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if (History.options.html4Mode) {
                                      History.emulated = {
                                          pushState : true,
                                          hashChange: true
                                      };
                          Severity: Critical
                          Found in build/wiselinks-1.2.2.js - About 1 hr to fix

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

                                        History.replaceState = function(data,title,url,queue){
                                            //History.debug('History.replaceState: called', arguments);
                            
                                            // We assume that the URL passed in is URI-encoded, but this makes
                                            // sure that it's fully URI encoded; any '%'s that are encoded are
                            Severity: Minor
                            Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                              Function _parser_factory has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  DOMParser.prototype._parser_factory = function() {
                                    var create_document_using_DOM, create_document_using_parser, create_document_using_write, e, testDoc, _ref;
                                    create_document_using_parser = function(html) {
                                      return (new DOMParser).parseFromString(html, 'text/html');
                                    };
                              Severity: Minor
                              Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                                Function normalizeState has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        History.normalizeState = function(oldState){
                                            // Variables
                                            var newState, dataNotEmpty;
                                
                                            // Prepare
                                Severity: Minor
                                Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                                  Function checkerFunction has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                      History.checkerFunction = function(){
                                                          // Check Running
                                                          if ( checkerRunning ) {
                                                              return false;
                                                          }
                                  Severity: Minor
                                  Found in build/wiselinks-1.2.2.js - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (v !== undefined) {
                                                                    value[k] = v;
                                                                } else {
                                                                    delete value[k];
                                                                }
                                    Severity: Major
                                    Found in build/wiselinks-1.2.2.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (startedWithHash && iframeHash === '') {
                                                                      History.back();
                                                                  }
                                                                  else {
                                                                      // Update the Hash
                                      Severity: Major
                                      Found in build/wiselinks-1.2.2.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if (v) {
                                                                    partial.push(quote(k) + (gap ? ': ' : ':') + v);
                                                                }
                                        Severity: Major
                                        Found in build/wiselinks-1.2.2.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                  if (v) {
                                                                      partial.push(quote(k) + (gap ? ': ' : ':') + v);
                                                                  }
                                          Severity: Major
                                          Found in build/wiselinks-1.2.2.js - About 45 mins to fix

                                            Function _fail has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                RequestManager.prototype._fail = function($target, status, state, error, code, data) {
                                            Severity: Minor
                                            Found in build/wiselinks-1.2.2.js - About 45 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                          return doc.URL || doc.location.href;
                                              Severity: Major
                                              Found in build/wiselinks-1.2.2.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                                return true;
                                                Severity: Major
                                                Found in build/wiselinks-1.2.2.js - About 30 mins to fix

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

                                                  (function(window,undefined){
                                                      "use strict";
                                                  
                                                      // ========================================================================
                                                      // Initialise
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 1 other location - About 2 mos to fix
                                                  lib/assets/javascripts/lib/native.history.js on lines 1299..3337

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

                                                  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(window,undefined){
                                                      "use strict";
                                                  
                                                      // ========================================================================
                                                      // Initialise
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 1 other location - About 2 wks to fix
                                                  lib/assets/javascripts/lib/native.history.js on lines 615..1291

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

                                                  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 () {
                                                      'use strict';
                                                  
                                                      function f(n) {
                                                          // Format integers to have at least two digits.
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 1 other location - About 1 wk to fix
                                                  lib/assets/javascripts/lib/native.history.js on lines 166..486

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

                                                  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(window,undefined){
                                                      "use strict";
                                                  
                                                      // Localise Globals
                                                      var History = window.History = window.History||{};
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 1 other location - About 4 days to fix
                                                  lib/assets/javascripts/lib/native.history.js on lines 494..606

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

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

                                                      Response.prototype._extract_link_rel_next = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('link[rel="next"]', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-LinkRelNext');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 522..528
                                                  build/wiselinks-1.2.2.js on lines 534..540
                                                  build/wiselinks-1.2.2.js on lines 546..552
                                                  build/wiselinks-1.2.2.js on lines 558..564
                                                  build/wiselinks-1.2.2.js on lines 570..576

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

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

                                                      Response.prototype._extract_title = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('title', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-Title');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 534..540
                                                  build/wiselinks-1.2.2.js on lines 546..552
                                                  build/wiselinks-1.2.2.js on lines 558..564
                                                  build/wiselinks-1.2.2.js on lines 570..576
                                                  build/wiselinks-1.2.2.js on lines 582..588

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

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

                                                      Response.prototype._extract_link_rel_prev = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('link[rel="prev"]', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-LinkRelPrev');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 522..528
                                                  build/wiselinks-1.2.2.js on lines 534..540
                                                  build/wiselinks-1.2.2.js on lines 546..552
                                                  build/wiselinks-1.2.2.js on lines 558..564
                                                  build/wiselinks-1.2.2.js on lines 582..588

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

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

                                                      Response.prototype._extract_description = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('meta[name="description"]', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-Description');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 522..528
                                                  build/wiselinks-1.2.2.js on lines 546..552
                                                  build/wiselinks-1.2.2.js on lines 558..564
                                                  build/wiselinks-1.2.2.js on lines 570..576
                                                  build/wiselinks-1.2.2.js on lines 582..588

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

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

                                                      Response.prototype._extract_robots = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('meta[name="robots"]', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-Robots');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 522..528
                                                  build/wiselinks-1.2.2.js on lines 534..540
                                                  build/wiselinks-1.2.2.js on lines 546..552
                                                  build/wiselinks-1.2.2.js on lines 570..576
                                                  build/wiselinks-1.2.2.js on lines 582..588

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

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

                                                      Response.prototype._extract_canonical = function() {
                                                        if (this._is_full_document_response()) {
                                                          return $('link[rel="canonical"]', this._get_doc()).text();
                                                        } else {
                                                          return this.xhr.getResponseHeader('X-Wiselinks-Canonical');
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 5 other locations - About 2 hrs to fix
                                                  build/wiselinks-1.2.2.js on lines 522..528
                                                  build/wiselinks-1.2.2.js on lines 534..540
                                                  build/wiselinks-1.2.2.js on lines 558..564
                                                  build/wiselinks-1.2.2.js on lines 570..576
                                                  build/wiselinks-1.2.2.js on lines 582..588

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

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

                                                      RequestManager.prototype._link_rel_prev = function(value) {
                                                        if (value != null) {
                                                          $(document).trigger('page:link_rel_prev', decodeURI(value));
                                                          return $('link[rel="prev"]').attr('href', decodeURI(value));
                                                        }
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 4 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 444..449
                                                  build/wiselinks-1.2.2.js on lines 451..456
                                                  build/wiselinks-1.2.2.js on lines 458..463
                                                  build/wiselinks-1.2.2.js on lines 472..477

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

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

                                                      RequestManager.prototype._robots = function(value) {
                                                        if (value != null) {
                                                          $(document).trigger('page:robots', decodeURI(value));
                                                          return $('meta[name="robots"]').attr('content', decodeURI(value));
                                                        }
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 4 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 444..449
                                                  build/wiselinks-1.2.2.js on lines 451..456
                                                  build/wiselinks-1.2.2.js on lines 465..470
                                                  build/wiselinks-1.2.2.js on lines 472..477

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

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

                                                      RequestManager.prototype._link_rel_next = function(value) {
                                                        if (value != null) {
                                                          $(document).trigger('page:link_rel_next', decodeURI(value));
                                                          return $('link[rel="next"]').attr('href', decodeURI(value));
                                                        }
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 4 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 444..449
                                                  build/wiselinks-1.2.2.js on lines 451..456
                                                  build/wiselinks-1.2.2.js on lines 458..463
                                                  build/wiselinks-1.2.2.js on lines 465..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 72.

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

                                                      RequestManager.prototype._canonical = function(value) {
                                                        if (value != null) {
                                                          $(document).trigger('page:canonical', decodeURI(value));
                                                          return $('link[rel="canonical"]').attr('href', decodeURI(value));
                                                        }
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 4 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 444..449
                                                  build/wiselinks-1.2.2.js on lines 458..463
                                                  build/wiselinks-1.2.2.js on lines 465..470
                                                  build/wiselinks-1.2.2.js on lines 472..477

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

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

                                                      RequestManager.prototype._description = function(value) {
                                                        if (value != null) {
                                                          $(document).trigger('page:description', decodeURI(value));
                                                          return $('meta[name="description"]').attr('content', decodeURI(value));
                                                        }
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 4 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 451..456
                                                  build/wiselinks-1.2.2.js on lines 458..463
                                                  build/wiselinks-1.2.2.js on lines 465..470
                                                  build/wiselinks-1.2.2.js on lines 472..477

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

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

                                                      DOMParser.prototype._get_parser = function() {
                                                        return this._document_parser != null ? this._document_parser : this._document_parser = this._parser_factory();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.title = function() {
                                                        return this._title != null ? this._title : this._title = this._extract_title();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.link_rel_next = function() {
                                                        return this._link_rel_next != null ? this._link_rel_next : this._link_rel_next = this._extract_link_rel_next();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568

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

                                                      Response.prototype.canonical = function() {
                                                        return this._canonical != null ? this._canonical : this._canonical = this._extract_canonical();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.description = function() {
                                                        return this._description != null ? this._description : this._description = this._extract_description();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.robots = function() {
                                                        return this._robots != null ? this._robots : this._robots = this._extract_robots();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.content = function() {
                                                        return this._content != null ? this._content : this._content = this._extract_content();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 566..568
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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 8 locations. Consider refactoring.
                                                  Open

                                                      Response.prototype.link_rel_prev = function() {
                                                        return this._link_rel_prev != null ? this._link_rel_prev : this._link_rel_prev = this._extract_link_rel_prev();
                                                      };
                                                  Severity: Major
                                                  Found in build/wiselinks-1.2.2.js and 7 other locations - About 1 hr to fix
                                                  build/wiselinks-1.2.2.js on lines 18..20
                                                  build/wiselinks-1.2.2.js on lines 514..516
                                                  build/wiselinks-1.2.2.js on lines 518..520
                                                  build/wiselinks-1.2.2.js on lines 530..532
                                                  build/wiselinks-1.2.2.js on lines 542..544
                                                  build/wiselinks-1.2.2.js on lines 554..556
                                                  build/wiselinks-1.2.2.js on lines 578..580

                                                  Duplicated Code

                                                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                  Tuning

                                                  This issue has a mass of 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

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status