darkwallet/darkwallet

View on GitHub

Showing 903 of 903 total issues

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

    while (v.isEven()) {
      v.rShiftTo(1, v)
      if (ac) {
        if (!c.isEven() || !d.isEven()) {
          c.addTo(this, c)
Severity: Major
Found in src/vendors/bitcoinjs-lib/bitcoinjs.js and 1 other location - About 5 hrs to fix
src/vendors/bitcoinjs-lib/bitcoinjs.js on lines 1347..1357

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

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

    while (u.isEven()) {
      u.rShiftTo(1, u)
      if (ac) {
        if (!a.isEven() || !b.isEven()) {
          a.addTo(this, a)
Severity: Major
Found in src/vendors/bitcoinjs-lib/bitcoinjs.js and 1 other location - About 5 hrs to fix
src/vendors/bitcoinjs-lib/bitcoinjs.js on lines 1358..1368

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

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

Function 28 has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./networks":36,"./scripts":39,"./types":42,"assert":44,"bs58check":6,"buffer":46}],28:[function(require,module,exports){
(function (Buffer){
var assert = require('assert')
var opcodes = require('./opcodes')

Severity: Major
Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 5 hrs to fix

    Function _doProcessBlock has 126 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                _doProcessBlock: function (M, offset) {
                    // Shortcuts
                    var H = this._hash.words;
    
                    var H0 = H[0];
    Severity: Major
    Found in src/vendors/crypto-js/cryptojs.js - About 5 hrs to fix

      Function PNGlib has 123 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          window.PNGlib = function(width,height,depth) {
      
              this.width   = width;
              this.height  = height;
              this.depth   = depth;
      Severity: Major
      Found in src/vendors/identicon/pnglib.js - About 4 hrs to fix

        File wallet.js has 371 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * @fileOverview Background service running for the wallet
         */
        'use strict';
        
        
        Severity: Minor
        Found in src/js/backend/services/wallet.js - About 4 hrs to fix

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

          function DataMask000()
          {
              this.unmaskBitMatrix=function(bits,  dimension)
              {
                  for (var i = 0; i < dimension; i++)
          Severity: Major
          Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 4 hrs to fix
          src/vendors/jsqrcode/jsqrcode.js on lines 1514..1533

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

          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

          function DataMask011()
          {
              this.unmaskBitMatrix=function(bits,  dimension)
              {
                  for (var i = 0; i < dimension; i++)
          Severity: Major
          Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 4 hrs to fix
          src/vendors/jsqrcode/jsqrcode.js on lines 1451..1470

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

          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

          Function 28 has 121 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"./core":3,"./sha256":28}],28:[function(require,module,exports){
          ;(function (root, factory) {
              if (typeof exports === "object") {
                  // CommonJS
                  module.exports = exports = factory(require("./core"));
          Severity: Major
          Found in src/vendors/crypto-js/cryptojs.js - About 4 hrs to fix

            Function 11 has 119 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./create-hash":7,"./create-hmac":8,"./pbkdf2":20,"./rng":21,"buffer":46}],11:[function(require,module,exports){
            /*
             * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
             * Digest Algorithm, as defined in RFC 1321.
             * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
            Severity: Major
            Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

              Function 23 has 119 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"./cipher-core":2,"./core":3,"./enc-base64":4,"./evpkdf":6,"./md5":10}],23:[function(require,module,exports){
              ;(function (root, factory, undef) {
                  if (typeof exports === "object") {
                      // CommonJS
                      module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
              Severity: Major
              Found in src/vendors/crypto-js/cryptojs.js - About 4 hrs to fix

                File catchan.js has 364 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                'use strict';
                
                define(['bitcoinjs-lib', 'util/djbec', 'util/encryption', 'util/protocol', 'backend/channels/peer', 'backend/channels/utils', 'backend/port'],
                function (Bitcoin, Curve25519, Encryption, Protocol, Peer, ChannelUtils, Port) {
                
                
                Severity: Minor
                Found in src/js/backend/channels/catchan.js - About 4 hrs to fix

                  Function 37 has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],37:[function(require,module,exports){
                  module.exports = {
                    // push value
                    OP_FALSE     : 0,
                    OP_0         : 0,
                  Severity: Major
                  Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

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

                    function DataMask010()
                    {
                        this.unmaskBitMatrix=function(bits,  dimension)
                        {
                            for (var i = 0; i < dimension; i++)
                    Severity: Major
                    Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 4 hrs to fix
                    src/vendors/jsqrcode/jsqrcode.js on lines 1472..1491

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

                    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

                    function DataMask001()
                    {
                        this.unmaskBitMatrix=function(bits,  dimension)
                        {
                            for (var i = 0; i < dimension; i++)
                    Severity: Major
                    Found in src/vendors/jsqrcode/jsqrcode.js and 1 other location - About 4 hrs to fix
                    src/vendors/jsqrcode/jsqrcode.js on lines 1493..1512

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

                    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

                    Function StealthService has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function StealthService(core) {
                        var self = this;
                        this.name = 'stealth';
                    
                        // Worker for processing stealth
                    Severity: Major
                    Found in src/js/backend/services/stealth.js - About 4 hrs to fix

                      Function 22 has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{"./core":3,"./hmac":8,"./sha1":26}],22:[function(require,module,exports){
                      ;(function (root, factory, undef) {
                          if (typeof exports === "object") {
                              // CommonJS
                              module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
                      Severity: Major
                      Found in src/vendors/crypto-js/cryptojs.js - About 4 hrs to fix

                        Function 36 has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"./bufferutils":28,"./crypto":29,"./ecdsa":30,"./ecpubkey":32,"./ecsignature":33,"./networks":36,"bigi":3,"buffer":46,"ecurve":24}],36:[function(require,module,exports){
                        // https://en.bitcoin.it/wiki/List_of_address_prefixes
                        // Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731
                        
                        var networks = {
                        Severity: Major
                        Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

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

                                          var X = this._X = [
                                              K[0], (K[3] << 16) | (K[2] >>> 16),
                                              K[1], (K[0] << 16) | (K[3] >>> 16),
                                              K[2], (K[1] << 16) | (K[0] >>> 16),
                                              K[3], (K[2] << 16) | (K[1] >>> 16)
                          Severity: Major
                          Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 4 hrs to fix
                          src/vendors/crypto-js/cryptojs.js on lines 3567..3572

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

                          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 X = this._X = [
                                              K[0], (K[3] << 16) | (K[2] >>> 16),
                                              K[1], (K[0] << 16) | (K[3] >>> 16),
                                              K[2], (K[1] << 16) | (K[0] >>> 16),
                                              K[3], (K[2] << 16) | (K[1] >>> 16)
                          Severity: Major
                          Found in src/vendors/crypto-js/cryptojs.js and 1 other location - About 4 hrs to fix
                          src/vendors/crypto-js/cryptojs.js on lines 3760..3765

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

                          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