RLOpenCatalyst/core

View on GitHub

Showing 619 of 2,557 total issues

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

            if (this.visualMode) {
                this.selectText(this.x, this.x, y, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 4983..4985
client/cat3/customlib/terminal/terminal.js on lines 4998..5000
client/cat3/customlib/terminal/terminal.js on lines 5016..5018

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

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

            if (this.visualMode) {
                this.selectText(this.x, this.x, y, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 4983..4985
client/cat3/customlib/terminal/terminal.js on lines 4998..5000
client/cat3/customlib/terminal/terminal.js on lines 5007..5009

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

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

            if (this.visualMode) {
                this.selectText(this.x, this.x, y, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 4998..5000
client/cat3/customlib/terminal/terminal.js on lines 5007..5009
client/cat3/customlib/terminal/terminal.js on lines 5016..5018

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

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

            if (this.visualMode) {
                this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 5149..5151
client/cat3/customlib/terminal/terminal.js on lines 5197..5199
client/cat3/customlib/terminal/terminal.js on lines 5245..5247
client/cat3/customlib/terminal/terminal.js on lines 5413..5415
client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

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

            if (this.visualMode) {
                this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 5149..5151
client/cat3/customlib/terminal/terminal.js on lines 5197..5199
client/cat3/customlib/terminal/terminal.js on lines 5245..5247
client/cat3/customlib/terminal/terminal.js on lines 5309..5311
client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

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

            if (this.visualMode) {
                this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
            }
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
client/cat3/customlib/terminal/terminal.js on lines 5197..5199
client/cat3/customlib/terminal/terminal.js on lines 5245..5247
client/cat3/customlib/terminal/terminal.js on lines 5309..5311
client/cat3/customlib/terminal/terminal.js on lines 5413..5415
client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

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

                deleteCloudFormation: function (cftIT) {
                    var url = '/cloudformation/' + cftIT;
                    return $http.delete(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

            if (this.script) {
                this.script.parentNode.removeChild(this.script);
                this.script = null;
            }
Severity: Minor
Found in client/cat3/customlib/socket.io/socket.io.js and 1 other location - About 30 mins to fix
client/cat3/customlib/socket.io/socket.io.js on lines 2518..2521

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

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

                removeARMDeployment: function (armId) {
                    var url = '/azure-arm/' + armId;
                    return $http.delete(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                deleteBlueprint: function (blueprintID) {
                    var url = '/blueprints/' + blueprintID;
                    return $http.delete(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                getCompsiteBlueprintInfo:function (compositeBlueprintId) {
                    var url ='/composite-blueprints/'+compositeBlueprintId;
                    return $http.get(fullUrl(url),Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                getProviderRegions:function (providerId) {
                    var url ='/aws/providers/'+providerId;
                    return $http.get(fullUrl(url),Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501

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

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

                getBlueprintById: function(blueprintId) {
                    var url = '/blueprints/' + blueprintId;
                    return $http.get(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                deleteCompsiteBlueprint:function (compositeBlueprintId) {
                    var url ='/composite-blueprints/'+compositeBlueprintId;
                    return $http.delete(fullUrl(url),Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

            if (this.script) {
                this.script.parentNode.removeChild(this.script);
                this.script = null;
            }
Severity: Minor
Found in client/cat3/customlib/socket.io/socket.io.js and 1 other location - About 30 mins to fix
client/cat3/customlib/socket.io/socket.io.js on lines 2542..2545

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

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

                deleteInstance: function (instanceID) {
                    var url = '/instances/' + instanceID;
                    return $http.delete(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 308..311
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                getScriptList: function (scriptType) {
                    var url = '/scripts?filterBy=scriptType:'+scriptType;
                    return $http.get(fullUrl(url), Auth.getHeaderObject());
                },
Severity: Major
Found in client/cat3/src/factory/workzoneServices.js and 8 other locations - About 30 mins to fix
client/cat3/src/factory/workzoneServices.js on lines 77..80
client/cat3/src/factory/workzoneServices.js on lines 98..101
client/cat3/src/factory/workzoneServices.js on lines 107..110
client/cat3/src/factory/workzoneServices.js on lines 316..319
client/cat3/src/factory/workzoneServices.js on lines 334..337
client/cat3/src/factory/workzoneServices.js on lines 485..488
client/cat3/src/factory/workzoneServices.js on lines 498..501
client/cat3/src/factory/workzoneServices.js on lines 510..513

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

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

                    bpCreateSer.getInstanceType().then(function(data){
                        if(blueprintCreation.newEnt.images){
                            blueprintCreation.instanceType = data;
                            $scope.isInstanceTypeLoading = false;
                        }
client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 310..315

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

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

                    bpCreateSer.postSecurityGroups(blueprintCreation.newEnt.vpcId,blueprintCreation.newEnt.providers,blueprintCreation.newEnt.region).then(function(data){
                        if(blueprintCreation.newEnt.vpcId){
                            blueprintCreation.securityGroupListing = data;
                            $scope.isSecurityGroupLoading = false;
                        }
client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 245..250

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

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