appbaseio/mirage

View on GitHub

Showing 7,143 of 7,143 total issues

File jquery-ui.js has 11648 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! jQuery UI - v1.9.2 - 2012-11-23
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */

Severity: Major
Found in assets/vendor/jquery.layout/jquery-ui.js - About 1 mo to fix

    Function 2 has a Cognitive Complexity of 1108 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],2:[function(require,module,exports){
    (function (global){
    /*!
     * The buffer module from node.js, for the browser.
     *
    Severity: Minor
    Found in assets/vendor/urlsafe-base64.bundle.js - About 3 wks 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

    Function layout has 2782 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $.fn.layout = function (opts) {
        var
    
        // local aliases to global data
        browser    = $.layout.browser
    Severity: Major
    Found in assets/vendor/jquery.layout/jquery.layout.js - About 1 wk to fix

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

      /**
       * @preserve
       * jquery.layout 1.4.4
       * $Date: 2014-11-29 08:00:00 (Sat, 29 November 2014) $
       * $Rev: 1.0404 $
      Severity: Major
      Found in assets/vendor/jquery.layout/jquery.layout.js - About 1 wk to fix

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

        export class SimpleQueryStringQuery implements OnInit, OnChanges {
            @Input() queryList: any;
            @Input() selectedField: string;
            @Input() appliedQuery: any;
            @Input() selectedQuery: string;
        app/queryBlocks/singlequery/queries/multi-match.query.ts on lines 48..214
        app/queryBlocks/singlequery/queries/query_string.query.ts on lines 48..213

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export class MultiMatchQuery implements OnInit, OnChanges {
            @Input() queryList: any;
            @Input() selectedField: string;
            @Input() appliedQuery: any;
            @Input() selectedQuery: string;
        Severity: Major
        Found in app/queryBlocks/singlequery/queries/multi-match.query.ts and 2 other locations - About 1 wk to fix
        app/queryBlocks/singlequery/queries/query_string.query.ts on lines 48..213
        app/queryBlocks/singlequery/queries/simple_query_string.query.ts on lines 48..214

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export class QueryStringQuery implements OnInit, OnChanges {
            @Input() queryList: any;
            @Input() selectedField: string;
            @Input() appliedQuery: any;
            @Input() selectedQuery: string;
        Severity: Major
        Found in app/queryBlocks/singlequery/queries/query_string.query.ts and 2 other locations - About 1 wk to fix
        app/queryBlocks/singlequery/queries/multi-match.query.ts on lines 48..214
        app/queryBlocks/singlequery/queries/simple_query_string.query.ts on lines 48..214

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

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function 2 has 1389 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],2:[function(require,module,exports){
        (function (global){
        /*!
         * The buffer module from node.js, for the browser.
         *
        Severity: Major
        Found in assets/vendor/urlsafe-base64.bundle.js - About 6 days to fix

          File urlsafe-base64.bundle.js has 1584 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
          'use strict'
          
          exports.byteLength = byteLength
          exports.toByteArray = toByteArray
          Severity: Major
          Found in assets/vendor/urlsafe-base64.bundle.js - About 4 days to fix

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

            describe("xhr test (geo_distance_range)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            app/queryBlocks/singlequery/queries/geoboundingbox.query.spec.ts on lines 96..165

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

            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

            describe("xhr test (geo_bounding_box)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            app/queryBlocks/singlequery/queries/geodistancerange.query.spec.ts on lines 73..142

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

            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

            describe("xhr test (geo_distance)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/geodistance.query.spec.ts and 1 other location - About 2 days to fix
            app/queryBlocks/singlequery/queries/geohashcell.query.spec.ts on lines 79..145

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

            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

            describe("xhr test (geohash_cell)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/geohashcell.query.spec.ts and 1 other location - About 2 days to fix
            app/queryBlocks/singlequery/queries/geodistance.query.spec.ts on lines 91..157

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

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

            describe("xhr test (Match)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/match.query.spec.ts and 11 other locations - About 2 days to fix
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr test (simple_query_string)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr call (regexp)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/regexp.query.spec.ts and 11 other locations - About 2 days to fix
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr test (SpanTerm)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/span_term.query.spec.ts and 11 other locations - About 2 days to fix
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr test (Terms)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/terms.query.spec.ts and 11 other locations - About 2 days to fix
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr test (multi_match)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/prefix.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

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

            describe("xhr call (prefix)", function () {
                var returnedJSON: any = {};
                var status = 0;
            
                beforeEach(function (done) {
            Severity: Major
            Found in app/queryBlocks/singlequery/queries/prefix.query.spec.ts and 11 other locations - About 2 days to fix
            app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/match.query.spec.ts on lines 72..132
            app/queryBlocks/singlequery/queries/match_phrase.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/multi-match.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/regexp.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/simple_query_string.query.spec.ts on lines 67..127
            app/queryBlocks/singlequery/queries/span_term.query.spec.ts on lines 70..130
            app/queryBlocks/singlequery/queries/term.query.spec.ts on lines 51..111
            app/queryBlocks/singlequery/queries/terms.query.spec.ts on lines 52..112
            app/queryBlocks/singlequery/queries/wildcard.query.spec.ts on lines 51..111

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

            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