yoichiro/chromeos-filesystem-webdav

View on GitHub

Showing 29 of 50 total issues

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

    WebDavFS.prototype.onMoveEntryRequested = function(options, successCallback, errorCallback) {
        console.log("onMoveEntryRequested");
        console.log(options);
        var webDavClient = getWebDavClient.call(this, options.fileSystemId);
        webDavClient.moveEntry({
Severity: Major
Found in app/scripts/webdav_fs.js and 1 other location - About 1 day to fix
app/scripts/webdav_fs.js on lines 228..246

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

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

    WebDavFS.prototype.onCopyEntryRequested = function(options, successCallback, errorCallback) {
        console.log("onCopyEntryRequested");
        console.log(options);
        var webDavClient = getWebDavClient.call(this, options.fileSystemId);
        webDavClient.copyEntry({
Severity: Major
Found in app/scripts/webdav_fs.js and 1 other location - About 1 day to fix
app/scripts/webdav_fs.js on lines 208..226

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

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

    WebDavClient.prototype.copyEntry = function(options) {
        var headers = createHeaders.call(this, {
            "Destination": this.getUrl() + encodePath(options.targetPath),
            "Overwrite": "F"
        });
Severity: Major
Found in app/scripts/webdav_client.js and 1 other location - About 7 hrs to fix
app/scripts/webdav_client.js on lines 212..226

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

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

    WebDavClient.prototype.moveEntry = function(options) {
        var headers = createHeaders.call(this, {
            "Destination": this.getUrl() + encodePath(options.targetPath),
            "Overwrite": "F"
        });
Severity: Major
Found in app/scripts/webdav_client.js and 1 other location - About 7 hrs to fix
app/scripts/webdav_client.js on lines 229..243

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

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

    WebDavFS.prototype.onDeleteEntryRequested = function(options, successCallback, errorCallback) {
        console.log("onDeleteEntryRequested");
        console.log(options);
        var webDavClient = getWebDavClient.call(this, options.fileSystemId);
        webDavClient.deleteEntry({
Severity: Major
Found in app/scripts/webdav_fs.js and 1 other location - About 6 hrs to fix
app/scripts/webdav_fs.js on lines 285..301

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

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

    WebDavFS.prototype.onCreateFileRequested = function(options, successCallback, errorCallback) {
        console.log("onCreateFileRequested");
        console.log(options);
        var webDavClient = getWebDavClient.call(this, options.fileSystemId);
        webDavClient.createFile({
Severity: Major
Found in app/scripts/webdav_fs.js and 1 other location - About 6 hrs to fix
app/scripts/webdav_fs.js on lines 190..206

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

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

        $.ajax({
            type: "GET",
            url: this.getUrl() + encodePath(options.path),
            headers: headers,
            dataType: "binary",
Severity: Major
Found in app/scripts/webdav_client.js and 1 other location - About 1 hr to fix
app/scripts/webdav_client.js on lines 293..321

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

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

        $.ajax({
            type: "GET",
            url: this.getUrl() + encodePath(options.path),
            headers: headers,
            dataType: "binary",
Severity: Major
Found in app/scripts/webdav_client.js and 1 other location - About 1 hr to fix
app/scripts/webdav_client.js on lines 166..178

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

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

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

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

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

Refactorings

Further Reading

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

        chrome.fileSystemProvider.onCloseFileRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onCloseFileRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onCreateDirectoryRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onCreateDirectoryRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onOpenFileRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onOpenFileRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onMoveEntryRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onMoveEntryRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onCopyEntryRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onCopyEntryRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onDeleteEntryRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onDeleteEntryRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onReadDirectoryRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onReadDirectoryRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onTruncateRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onTruncateRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onGetMetadataRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onGetMetadataRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onWriteFileRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onWriteFileRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onReadFileRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onReadFileRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497
app/scripts/webdav_fs.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 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 12 locations. Consider refactoring.
Open

        chrome.fileSystemProvider.onCreateFileRequested.addListener(
            createEventHandler.call(this, function(options, successCallback, errorCallback) {
                this.onCreateFileRequested(options, successCallback, errorCallback);
            }.bind(this)));
Severity: Major
Found in app/scripts/webdav_fs.js and 11 other locations - About 1 hr to fix
app/scripts/webdav_fs.js on lines 454..457
app/scripts/webdav_fs.js on lines 458..461
app/scripts/webdav_fs.js on lines 462..465
app/scripts/webdav_fs.js on lines 466..469
app/scripts/webdav_fs.js on lines 470..473
app/scripts/webdav_fs.js on lines 474..477
app/scripts/webdav_fs.js on lines 478..481
app/scripts/webdav_fs.js on lines 482..485
app/scripts/webdav_fs.js on lines 486..489
app/scripts/webdav_fs.js on lines 490..493
app/scripts/webdav_fs.js on lines 494..497

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

Severity
Category
Status
Source
Language