mbroadst/rethunk

View on GitHub

Showing 252 of 396 total issues

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

Term.prototype.sunday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.SUNDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.tuesday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.TUESDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.june = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.JUNE);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.friday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.FRIDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.january = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.JANUARY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.april = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.APRIL);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.august = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.AUGUST);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.monday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.MONDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.september = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.SEPTEMBER);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.minval = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.MINVAL);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.maxval = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.MAXVAL);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.saturday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.SATURDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.march = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.MARCH);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.may = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.MAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.wednesday = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.WEDNESDAY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.february = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.FEBRUARY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.july = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.JULY);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2346..2350
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

Term.prototype.october = function() {
  var term = new Term(this._r);
  term._query.push(termTypes.OCTOBER);
  return term;
};
Severity: Major
Found in lib/term.js and 20 other locations - About 1 hr to fix
lib/term.js on lines 685..689
lib/term.js on lines 691..695
lib/term.js on lines 2250..2254
lib/term.js on lines 2256..2260
lib/term.js on lines 2262..2266
lib/term.js on lines 2268..2272
lib/term.js on lines 2274..2278
lib/term.js on lines 2280..2284
lib/term.js on lines 2286..2290
lib/term.js on lines 2292..2296
lib/term.js on lines 2298..2302
lib/term.js on lines 2304..2308
lib/term.js on lines 2310..2314
lib/term.js on lines 2316..2320
lib/term.js on lines 2322..2326
lib/term.js on lines 2328..2332
lib/term.js on lines 2334..2338
lib/term.js on lines 2340..2344
lib/term.js on lines 2352..2356
lib/term.js on lines 2358..2362

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

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

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

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

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

Refactorings

Further Reading

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

      }, function(err) {
        // The TCP connection is open, but the ReQL connection wasn't established.
        // We can just abort the whole thing
        self.open = false;
        reject(new errors.ReqlDriverError('Failed to perform handshake with ' + self.host + ':' + self.port));
Severity: Major
Found in lib/connection.js and 2 other locations - About 1 hr to fix
lib/connection.js on lines 138..143
lib/connection.js on lines 247..252

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

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

    }, function(err) {
      // The TCP connection is open, but the ReQL connection wasn't established.
      // We can just abort the whole thing
      self.open = false;
      reject(new errors.ReqlDriverError('Failed to perform handshake with ' + self.host + ':' + self.port));
Severity: Major
Found in lib/connection.js and 2 other locations - About 1 hr to fix
lib/connection.js on lines 138..143
lib/connection.js on lines 263..268

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

Severity
Category
Status
Source
Language