shadowproject/shadow

View on GitHub

Showing 126 of 126 total issues

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

elif cmd == "getreceivedbyaccount":
    try:
        acct = raw_input("Enter an account (optional): ")
        mc = raw_input("Minimum confirmations (optional): ")
        try:
Severity: Major
Found in contrib/bitrpc/bitrpc.py and 4 other locations - About 1 hr to fix
contrib/bitrpc/bitrpc.py on lines 46..55
contrib/bitrpc/bitrpc.py on lines 127..136
contrib/bitrpc/bitrpc.py on lines 175..184
contrib/bitrpc/bitrpc.py on lines 186..195

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

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

elif cmd == "getreceivedbyaddress":
    try:
        addr = raw_input("Enter a Bitcoin address (optional): ")
        mc = raw_input("Minimum confirmations (optional): ")
        try:
Severity: Major
Found in contrib/bitrpc/bitrpc.py and 4 other locations - About 1 hr to fix
contrib/bitrpc/bitrpc.py on lines 46..55
contrib/bitrpc/bitrpc.py on lines 116..125
contrib/bitrpc/bitrpc.py on lines 175..184
contrib/bitrpc/bitrpc.py on lines 186..195

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

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 _start has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _start: function (e) {
        // React to left mouse button only
        if ( utils.eventType[e.type] != 1 ) {
          // for button property
          // http://unixpapa.com/js/mouse.html
Severity: Minor
Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

            if ( newY > 0 ) {
                newY = 0;
                this.keyAcceleration = 0;
            } else if ( newY < this.maxScrollY ) {
                newY = this.maxScrollY;
    Severity: Major
    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1552..1558

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

    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

            if ( newX > 0 ) {
                newX = 0;
                this.keyAcceleration = 0;
            } else if ( newX < this.maxScrollX ) {
                newX = this.maxScrollX;
    Severity: Major
    Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
    src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1560..1566

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

    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

    l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ])
    Severity: Major
    Found in contrib/qt_translations.py and 1 other location - About 1 hr to fix
    contrib/qt_translations.py on lines 19..19

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

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

    l2 = set([ re.search(r'bitcoin_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d2, 'bitcoin_*.qm')) ])
    Severity: Major
    Found in contrib/qt_translations.py and 1 other location - About 1 hr to fix
    contrib/qt_translations.py on lines 18..18

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 45.

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

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

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

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

    Refactorings

    Further Reading

    Function resize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            ft.resize = function () {
                var $table = $(ft.table);
    
                if (!$table.is(':visible')) {
                    return;
    Severity: Minor
    Found in src/qt/res/assets/plugins/footable/footable.js - About 1 hr to fix

      Function createOrUpdateDetailRow has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              ft.createOrUpdateDetailRow = function (actualRow) {
                  var $row = $(actualRow), $next = $row.next(), $detail, values = [];
                  if ($row.data('detail_created') === true) return true;
      
                  if ($row.is(':hidden')) return false; //if the row is hidden for some reason (perhaps filtered) then get out of here
      Severity: Minor
      Found in src/qt/res/assets/plugins/footable/footable.js - About 1 hr to fix

        Function update has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function update(el, hash, padding) {
                if (typeof(el) === "string") {
                    if (supportsQuerySelectorAll) {
                        var elements = document.querySelectorAll(el);
                        for (var i = 0; i < elements.length; i++) {
        Severity: Minor
        Found in src/qt/res/assets/plugins/jdenticon/jdenticon-1.3.2.js - About 1 hr to fix

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

                  if ( !this.hasVerticalScroll || this.y > 0 ) {
                      y = 0;
                  } else if ( this.y < this.maxScrollY ) {
                      y = this.maxScrollY;
                  }
          Severity: Major
          Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
          src/qt/res/assets/plugins/iscroll/iscroll.js on lines 690..694

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

          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

                          this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);
          Severity: Major
          Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
          src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1294..1294

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

          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

                          this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);
          Severity: Major
          Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
          src/qt/res/assets/plugins/iscroll/iscroll.js on lines 1293..1293

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

          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

                  if ( !this.hasHorizontalScroll || this.x > 0 ) {
                      x = 0;
                  } else if ( this.x < this.maxScrollX ) {
                      x = this.maxScrollX;
                  }
          Severity: Major
          Found in src/qt/res/assets/plugins/iscroll/iscroll.js and 1 other location - About 1 hr to fix
          src/qt/res/assets/plugins/iscroll/iscroll.js on lines 696..700

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

          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 footable_initialized.filtering has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                  'footable_initialized.filtering': function (e) {
                                      var $table = $(ft.table);
                                      var data = {
                                          'input': $table.data('filter') || ft.options.filter.input,
                                          'timeout': $table.data('filter-timeout') || ft.options.filter.timeout,
          Severity: Minor
          Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 1 hr to fix

            Function footable_initialized.sorting has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                    'footable_initialized.sorting': function (e) {
                                        var $table = $(ft.table),
                                            $tbody = $table.find('> tbody'),
                                            cls = ft.options.classes.sort,
                                            column, $th;
            Severity: Minor
            Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 1 hr to fix

              Function getDump has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      this.getDump = function() {
              
                          // compute adler32 of output pixels + row filter bytes
                          var BASE = 65521; /* largest prime smaller than 65536 */
                          var NMAX = 5552;  /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
              Severity: Minor
              Found in src/qt/res/assets/plugins/pnglib/pnglib.js - About 1 hr to fix

                Function _initEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _initEvents: function (remove) {
                        var eventType = remove ? utils.removeEvent : utils.addEvent,
                            target = this.options.bindToWrapper ? this.wrapper : window;
                
                        eventType(window, 'orientationchange', this);
                Severity: Minor
                Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                      _animate: function (destX, destY, duration, easingFn) {
                          var that = this,
                              startX = this.x,
                              startY = this.y,
                              startTime = utils.getTime(),
                  Severity: Minor
                  Found in src/qt/res/assets/plugins/iscroll/iscroll.js - About 1 hr to fix

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

                            p.filter = function (filterString) {
                                var ft = p.footable,
                                    $table = $(ft.table),
                                    minimum = $table.data('filter-minimum') || ft.options.filter.minimum,
                                    clear = !filterString;
                    Severity: Minor
                    Found in src/qt/res/assets/plugins/footable/footable.filter.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language