appbaseio/mirage

View on GitHub

Showing 477 of 7,143 total issues

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

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

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

describe("xhr test (Term)", function () {
    var returnedJSON: any = {};
    var status = 0;

    beforeEach(function (done) {
Severity: Major
Found in app/queryBlocks/singlequery/queries/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/span_term.query.spec.ts on lines 70..130
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 (Match Phrase)", 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/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 call (wildcard)", function () {
    var returnedJSON: any = {};
    var status = 0;

    beforeEach(function (done) {
Severity: Major
Found in app/queryBlocks/singlequery/queries/wildcard.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/terms.query.spec.ts on lines 52..112

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 (fuzzy)", function () {
    var returnedJSON: any = {};
    var status = 0;

    beforeEach(function (done) {
Severity: Major
Found in app/queryBlocks/singlequery/queries/fuzzy.query.spec.ts and 11 other locations - About 2 days to fix
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/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 (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/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 2 locations. Consider refactoring.
Open

describe("xhr call (Exists)", function () {
    var returnedJSON: any = {};
    var status = 0;

    beforeEach(function (done) {
Severity: Major
Found in app/queryBlocks/singlequery/queries/exists.query.spec.ts and 1 other location - About 2 days to fix
app/queryBlocks/singlequery/queries/missing.query.spec.ts on lines 47..102

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

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