yoichiro/chromeos-filesystem-cifs

View on GitHub

Showing 222 of 360 total issues

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

    var deepCopy = function(files, index, target, depth, stack, onSuccess, onError) {
        if (files.length === index) {
            if (depth === 0) {
                onSuccess();
            } else {
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 1 other location - About 2 days to fix
app/scripts/smb_client/smb2/client_impl.js on lines 1072..1111

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

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

    var deepCopy = function(files, index, target, depth, stack, onSuccess, onError) {
        if (files.length === index) {
            if (depth === 0) {
                onSuccess();
            } else {
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 1 other location - About 2 days to fix
app/scripts/smb_client/smb1/client_impl.js on lines 966..1005

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

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

    ClientImpl.prototype.truncate = function(fileName, length, onSuccess, onError) {
        var errorHandler = function(error) {
            onError(error);
        }.bind(this);

Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb2/client_impl.js on lines 259..291

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

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

    ClientImpl.prototype.truncate = function(filename, length, onSuccess, onError) {
        var errorHandler = function(error) {
            onError(error);
        }.bind(this);

Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 253..285

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

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

    var sendType1Message = function(negotiateProtocolResponse, onSuccess, onError) {
        var session = this.client_.getSession();
        var sessionSetupAndxRequestPacket =
                this.protocol_.createSessionSetupRequestType1Packet(
                    session, negotiateProtocolResponse);
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb2/client_impl.js on lines 443..466

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

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

    var sendType1Message = function(negotiateResponse, onSuccess, onError) {
        var session = this.client_.getSession();
        var sessionSetupRequestPacket =
                this.protocol_.createSessionSetupRequestType1Packet(
                    session, negotiateResponse);
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 393..416

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

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

    var readAndx = function(fid, offset, length, onSuccess, onError) {
        var session = this.client_.getSession();
        var readAndxRequestPacket = this.protocol_.createReadAndxRequestPacket(
            session, fid, offset, length);
        this.comm_.writePacket(readAndxRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 2 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 889..908
app/scripts/smb_client/smb2/client_impl.js on lines 868..887

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

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

    var writeAndx = function(fid, offset, data, onSuccess, onError) {
        var session = this.client_.getSession();
        var writeAndxRequestPacket = this.protocol_.createWriteAndxRequestPacket(
            session, fid, offset, data);
        this.comm_.writePacket(writeAndxRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 2 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 846..866
app/scripts/smb_client/smb2/client_impl.js on lines 868..887

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

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

    var doWrite = function(fileId, offset, data, onSuccess, onError) {
        var session = this.client_.getSession();
        var writeRequestPacket = this.protocol_.createWriteRequestPacket(
            session, fileId, offset, data);
        this.comm_.writePacket(writeRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 2 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 846..866
app/scripts/smb_client/smb1/client_impl.js on lines 889..908

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

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

    var ntCreate = function(options, onSuccess, onError) {
        var session = this.client_.getSession();
        var ntCreateAndxRequestPacket = this.protocol_.createNtCreateAndxRequestPacket(
            session, options);
        Debug.log(ntCreateAndxRequestPacket);
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 4 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 535..553
app/scripts/smb_client/smb1/client_impl.js on lines 675..693
app/scripts/smb_client/smb2/client_impl.js on lines 525..544
app/scripts/smb_client/smb2/client_impl.js on lines 546..563

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

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

    var dceRpcBind = function(fid, onSuccess, onError) {
        var session = this.client_.getSession();
        var dceRpcBindRequestPacket = this.protocol_.createDceRpcBindRequestPacket(session, fid);
        Debug.log(dceRpcBindRequestPacket);
        this.comm_.writePacket(dceRpcBindRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 4 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 514..533
app/scripts/smb_client/smb1/client_impl.js on lines 535..553
app/scripts/smb_client/smb1/client_impl.js on lines 675..693
app/scripts/smb_client/smb2/client_impl.js on lines 525..544

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

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

    var dceRpcBind = function(fid, onSuccess, onError) {
        var session = this.client_.getSession();
        var dceRpcBindRequestPacket = this.protocol_.createDceRpcBindRequestPacket(
            session, fid);
        Debug.log(dceRpcBindRequestPacket);
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 4 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 514..533
app/scripts/smb_client/smb1/client_impl.js on lines 675..693
app/scripts/smb_client/smb2/client_impl.js on lines 525..544
app/scripts/smb_client/smb2/client_impl.js on lines 546..563

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

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

    var findFirst2 = function(directoryName, onSuccess, onError) {
        var session = this.client_.getSession();
        var findFirst2RequestPacket = this.protocol_.createFindFirst2RequestPacket(session, directoryName);
        Debug.log(findFirst2RequestPacket);
        this.comm_.writePacket(findFirst2RequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 4 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 514..533
app/scripts/smb_client/smb1/client_impl.js on lines 535..553
app/scripts/smb_client/smb2/client_impl.js on lines 525..544
app/scripts/smb_client/smb2/client_impl.js on lines 546..563

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

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

    var create = function(options, onSuccess, onError) {
        var session = this.client_.getSession();
        var createRequestPacket = this.protocol_.createCreateRequestPacket(
            session, options);
        Debug.log(createRequestPacket);
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 4 other locations - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 514..533
app/scripts/smb_client/smb1/client_impl.js on lines 535..553
app/scripts/smb_client/smb1/client_impl.js on lines 675..693
app/scripts/smb_client/smb2/client_impl.js on lines 546..563

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

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

            create.call(this, options, function(
                createResponseHeader, createResponse) {
                Debug.log(createResponseHeader);
                Debug.log(createResponse);
                var fid = createResponse.getFileId();
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 133..152

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

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

            ntCreate.call(this, options, function(
                ntCreateAndxResponseHeader, ntCreateAndxResponse) {
                Debug.log(ntCreateAndxResponseHeader);
                Debug.log(ntCreateAndxResponse);
                var fid = ntCreateAndxResponse.getFId();
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb2/client_impl.js on lines 99..118

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

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

    CifsFS.prototype.onDeleteEntryRequested = function(cifsClient, options, successCallback, errorCallback) {
        var requestId = createRequestId.call(this);
        prepare.call(this, cifsClient, requestId, function(closeCallback) {
            cifsClient.deleteEntry({
                requestId: requestId,
Severity: Major
Found in app/scripts/cifs_fs.js and 1 other location - About 1 day to fix
app/scripts/cifs_fs.js on lines 345..365

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

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

    CifsFS.prototype.onCreateFileRequested = function(cifsClient, options, successCallback, errorCallback) {
        var requestId = createRequestId.call(this);
        prepare.call(this, cifsClient, requestId, function(closeCallback) {
            cifsClient.createFile({
                requestId: requestId,
Severity: Major
Found in app/scripts/cifs_fs.js and 1 other location - About 1 day to fix
app/scripts/cifs_fs.js on lines 232..252

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 218.

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

    var disconnectTree = function(onSuccess, onError) {
        var session = this.client_.getSession();
        var treeDisconnectRequestPacket = this.protocol_.createTreeDisconnectRequestPacket(session);
        Debug.log(treeDisconnectRequestPacket);
        this.comm_.writePacket(treeDisconnectRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb1/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb2/client_impl.js on lines 620..637

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

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

    var disconnectTree = function(onSuccess, onError) {
        var session = this.client_.getSession();
        var treeDisconnectRequestPacket = this.protocol_.createTreeDisconnectRequestPacket(session);
        Debug.log(treeDisconnectRequestPacket);
        this.comm_.writePacket(treeDisconnectRequestPacket, function() {
Severity: Major
Found in app/scripts/smb_client/smb2/client_impl.js and 1 other location - About 1 day to fix
app/scripts/smb_client/smb1/client_impl.js on lines 609..626

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

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