preceptorjs/taxi

View on GitHub

Showing 286 of 286 total issues

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

Chain.prototype.elementHasText = function (selector, text, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.hasText(text), function (hasText) {
            if (callBack) {
                return this._scopeCallBack(callBack, [hasText, element, index]);
Severity: Major
Found in lib/chain.js and 4 other locations - About 3 hrs to fix
lib/chain.js on lines 302..310
lib/chain.js on lines 349..357
lib/chain.js on lines 597..605
lib/chain.js on lines 1182..1190

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.elementCapture = function (selector, options, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.capture(options), function (imageBuffer) {
            if (callBack) {
                return this._scopeCallBack(callBack, [imageBuffer, element, index]);
Severity: Major
Found in lib/chain.js and 4 other locations - About 3 hrs to fix
lib/chain.js on lines 302..310
lib/chain.js on lines 349..357
lib/chain.js on lines 485..493
lib/chain.js on lines 597..605

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

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

Chain.prototype.dialogText = function (callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.alert().getText(), function (text) {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 1 other location - About 3 hrs to fix
lib/chain.js on lines 2469..2477

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

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

Chain.prototype.scrollTo = function (x, y, callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.scrollTo(x, y), function () {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 2 other locations - About 3 hrs to fix
lib/chain.js on lines 3143..3151
lib/chain.js on lines 3210..3218

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.elementHasClass = function (selector, className, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.hasClass(className), function (hasClass) {
            if (callBack) {
                return this._scopeCallBack(callBack, [hasClass, element, index]);
Severity: Major
Found in lib/chain.js and 4 other locations - About 3 hrs to fix
lib/chain.js on lines 302..310
lib/chain.js on lines 485..493
lib/chain.js on lines 597..605
lib/chain.js on lines 1182..1190

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.elementCssValue = function (selector, property, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getCssValue(property), function (value) {
            if (callBack) {
                return this._scopeCallBack(callBack, [value, element, index]);
Severity: Major
Found in lib/chain.js and 4 other locations - About 3 hrs to fix
lib/chain.js on lines 302..310
lib/chain.js on lines 349..357
lib/chain.js on lines 485..493
lib/chain.js on lines 1182..1190

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

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

Chain.prototype.url = function (callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.navigator().getUrl(), function (url) {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 1 other location - About 3 hrs to fix
lib/chain.js on lines 2601..2609

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

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

Chain.prototype.elementClick = function (selector, button, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.mouse().click(), function () {
            if (callBack) {
                return this._scopeCallBack(callBack, [element, index]);
Severity: Major
Found in lib/chain.js and 1 other location - About 3 hrs to fix
lib/chain.js on lines 1415..1423

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

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

Chain.prototype.elementDblClick = function (selector, button, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.mouse().doubleClick(), function () {
            if (callBack) {
                return this._scopeCallBack(callBack, [element, index]);
Severity: Major
Found in lib/chain.js and 1 other location - About 3 hrs to fix
lib/chain.js on lines 1327..1335

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.title = function (callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.getTitle(), function (title) {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 5 other locations - About 3 hrs to fix
lib/chain.js on lines 2085..2093
lib/chain.js on lines 2180..2188
lib/chain.js on lines 2214..2222
lib/chain.js on lines 3110..3118
lib/chain.js on lines 3177..3185

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.size = function (callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.getSize(), function (size) {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 5 other locations - About 3 hrs to fix
lib/chain.js on lines 2085..2093
lib/chain.js on lines 2148..2156
lib/chain.js on lines 2180..2188
lib/chain.js on lines 2214..2222
lib/chain.js on lines 3177..3185

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

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

Chain.prototype.elementLocation = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getPosition(), function (location) {
            if (callBack) {
                return this._scopeCallBack(callBack, [location, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

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

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

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

Refactorings

Further Reading

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

Chain.prototype.scrollLocation = function (callBack) {
    var activeWindow = this._driver.browser().activeWindow();

    return this._driverAction(activeWindow.getScrollPosition(), function (coordinates) {
        if (callBack) {
Severity: Major
Found in lib/chain.js and 5 other locations - About 3 hrs to fix
lib/chain.js on lines 2085..2093
lib/chain.js on lines 2148..2156
lib/chain.js on lines 2180..2188
lib/chain.js on lines 3110..3118
lib/chain.js on lines 3177..3185

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

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

Chain.prototype.elementValue = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getValue(), function (value) {
            if (callBack) {
                return this._scopeCallBack(callBack, [value, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

Chain.prototype.elementTagName = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getTagName(), function (tagName) {
            if (callBack) {
                return this._scopeCallBack(callBack, [tagName, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

Chain.prototype.elementIsSelected = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.isSelected(), function (isSelected) {
            if (callBack) {
                return this._scopeCallBack(callBack, [isSelected, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

Chain.prototype.elementRelativeCenter = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getRelativeCenter(), function (coordinates) {
            if (callBack) {
                return this._scopeCallBack(callBack, [coordinates, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010

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

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

Chain.prototype.elementFrame = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getFrame(), function (frame) {
            if (callBack) {
                return this._scopeCallBack(callBack, [frame, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

Chain.prototype.elementLocationInView = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getLocationInView(), function (location) {
            if (callBack) {
                return this._scopeCallBack(callBack, [location, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 965..973
lib/chain.js on lines 1002..1010
lib/chain.js on lines 1039..1047

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

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

Chain.prototype.elementAbsoluteCenter = function (selector, callBack) {
    return this._elementAction(selector, function (element, index) {
        return when(element.getAbsoluteCenter(), function (coordinates) {
            if (callBack) {
                return this._scopeCallBack(callBack, [coordinates, element, index]);
Severity: Major
Found in lib/chain.js and 12 other locations - About 3 hrs to fix
lib/chain.js on lines 392..400
lib/chain.js on lines 435..443
lib/chain.js on lines 523..531
lib/chain.js on lines 558..566
lib/chain.js on lines 632..640
lib/chain.js on lines 670..678
lib/chain.js on lines 705..713
lib/chain.js on lines 852..860
lib/chain.js on lines 889..897
lib/chain.js on lines 926..934
lib/chain.js on lines 965..973
lib/chain.js on lines 1039..1047

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

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