datahuborg/datahub

View on GitHub
src/browser/static/dbwipes/js/lib/md5.js

Summary

Maintainability
F
1 wk
Test Coverage

Function md5cycle has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];

a = ff(a, b, c, d, k[0], 7, -680876936);
d = ff(d, a, b, c, k[1], 12, -389564586);
Severity: Major
Found in src/browser/static/dbwipes/js/lib/md5.js - About 2 hrs to fix

    Function gg has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function gg(a, b, c, d, x, s, t) {
    Severity: Major
    Found in src/browser/static/dbwipes/js/lib/md5.js - About 50 mins to fix

      Function hh has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function hh(a, b, c, d, x, s, t) {
      Severity: Major
      Found in src/browser/static/dbwipes/js/lib/md5.js - About 50 mins to fix

        Function ff has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function ff(a, b, c, d, x, s, t) {
        Severity: Major
        Found in src/browser/static/dbwipes/js/lib/md5.js - About 50 mins to fix

          Function ii has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function ii(a, b, c, d, x, s, t) {
          Severity: Major
          Found in src/browser/static/dbwipes/js/lib/md5.js - About 50 mins to fix

            Function cmn has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function cmn(q, a, b, x, s, t) {
            Severity: Minor
            Found in src/browser/static/dbwipes/js/lib/md5.js - About 45 mins to fix

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

              function md5cycle(x, k) {
              var a = x[0], b = x[1], c = x[2], d = x[3];
              
              a = ff(a, b, c, d, k[0], 7, -680876936);
              d = ff(d, a, b, c, k[1], 12, -389564586);
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 1 wk to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 1..77

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

              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

              function md51(s) {
              txt = '';
              var n = s.length,
              state = [1732584193, -271733879, -1732584194, 271733878], i;
              for (i=64; i<=s.length; i+=64) {
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 1 day to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 100..119

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

              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

              function md5blk(s) { /* I figured global was faster.   */
              var md5blks = [], i; /* Andy King said do it this way. */
              for (i=0; i<64; i+=4) {
              md5blks[i>>2] = s.charCodeAt(i)
              + (s.charCodeAt(i+1) << 8)
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 5 hrs to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 136..145

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

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

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

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

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

              Refactorings

              Further Reading

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

              if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
              function add32(x, y) {
              var lsw = (x & 0xFFFF) + (y & 0xFFFF),
              msw = (x >> 16) + (y >> 16) + (lsw >> 16);
              return (msw << 16) | (lsw & 0xFFFF);
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 2 hrs to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 178..184

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

              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

              function rhex(n)
              {
              var s='', j=0;
              for(; j<4; j++)
              s += hex_chr[(n >> (j * 8 + 4)) & 0x0F]
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 2 hrs to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 149..156

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

              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

              function hex(x) {
              for (var i=0; i<x.length; i++)
              x[i] = rhex(x[i]);
              return x.join('');
              }
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 1 hr to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 158..162

              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

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

              function cmn(q, a, b, x, s, t) {
              a = add32(add32(a, q), add32(x, t));
              return add32((a << s) | (a >>> (32 - s)), b);
              }
              Severity: Major
              Found in src/browser/static/dbwipes/js/lib/md5.js and 1 other location - About 1 hr to fix
              src/apps/dbwipes/static/js/lib/md5.js on lines 79..82

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

              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

              There are no issues that match your filters.

              Category
              Status