packages/miew/src/vendors/mmtf.js

Summary

Maintainability
F
1 wk
Test Coverage

File mmtf.js has 771 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!(function (r, t) {
  if ('function' == typeof define && define.amd) define(['exports'], t)
  else if ('object' == typeof exports && 'undefined' != typeof module)
    t(exports)
  else t((r.MMTF = r.MMTF || {}))
Severity: Major
Found in packages/miew/src/vendors/mmtf.js - About 1 day to fix

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

      function K(r, t, n) {
        n = n || {}
        var e,
          i,
          o,
    Severity: Major
    Found in packages/miew/src/vendors/mmtf.js - About 4 hrs to fix

      Function H has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function H(r) {
          function t(r) {
            for (var t = {}, n = 0; r > n; n++) {
              var e = o()
              t[e] = o()
      Severity: Major
      Found in packages/miew/src/vendors/mmtf.js - About 3 hrs to fix

        Function e has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function e(r, i, o) {
            var a = typeof r
            if ('string' === a) {
              var u = n(r)
              if (32 > u) return i.setUint8(o, 160 | u), t(i, o + 1, r), 1 + u
        Severity: Major
        Found in packages/miew/src/vendors/mmtf.js - About 2 hrs to fix

          Function o has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function o() {
                var o,
                  s,
                  f = r[a]
                if (0 === (128 & f)) return a++, f
          Severity: Major
          Found in packages/miew/src/vendors/mmtf.js - About 2 hrs to fix

            Function i has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function i(r) {
                var t = typeof r
                if ('string' === t) {
                  var e = n(r)
                  if (32 > e) return 1 + e
            Severity: Minor
            Found in packages/miew/src/vendors/mmtf.js - About 2 hrs to fix

              Function W has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function W(r, t, n, e) {
                  switch (r) {
                    case 1:
                      return h(t)
                    case 2:
              Severity: Minor
              Found in packages/miew/src/vendors/mmtf.js - About 1 hr to fix

                Avoid deeply nested control flow statements.
                Open

                            if (v) {
                              var B = null
                              A && (B = A[m])
                              var V = null
                              x && (V = x[m])
                Severity: Major
                Found in packages/miew/src/vendors/mmtf.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              for (u = 0, s = j.bondOrderList.length; s > u; ++u)
                                g({
                                  atomIndex1: m - q + H[2 * u],
                                  atomIndex2: m - q + H[2 * u + 1],
                                  bondOrder: j.bondOrderList[u]
                  Severity: Major
                  Found in packages/miew/src/vendors/mmtf.js - About 45 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                          if (((p = U + 1), (U = m - 1), g && S))
                            for (u = 0, s = S.length; s > u; u += 2) {
                              var W = S[u],
                                X = S[u + 1]
                              ;((W >= p && U >= W) || (X >= p && U >= X)) &&
                    Severity: Major
                    Found in packages/miew/src/vendors/mmtf.js - About 40 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return i.setUint8(o, 203), i.setFloat64(o + 1, r), 9
                      Severity: Major
                      Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                if (128 > r) return i.setUint8(o, r), 1
                        Severity: Major
                        Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                if (r >= -32768) return 3
                          Severity: Major
                          Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    if (256 > r) return i.setUint8(o, 204), i.setUint8(o + 1, r), 2
                            Severity: Major
                            Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    if (r >= -128) return i.setUint8(o, 208), i.setInt8(o + 1, r), 2
                              Severity: Major
                              Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      if (224 === (224 & f)) return (o = u.getInt8(a)), a++, o
                                Severity: Major
                                Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                        if (r >= -32768) return i.setUint8(o, 209), i.setInt16(o + 1, r), 3
                                  Severity: Major
                                  Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          if (4294967296 > e) return 5 + e
                                    Severity: Major
                                    Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                              return i.setUint8(o, 198), i.setUint32(o + 1, u), s.set(r, o + 5), 5 + u
                                      Severity: Major
                                      Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                if (256 > r) return 2
                                        Severity: Major
                                        Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                  if (4294967296 > r) return i.setUint8(o, 206), i.setUint32(o + 1, r), 5
                                          Severity: Major
                                          Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                  if (65536 > e) return 3 + o
                                            Severity: Major
                                            Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                    if (r >= -2147483648) return i.setUint8(o, 210), i.setInt32(o + 1, r), 5
                                              Severity: Major
                                              Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                      if (256 > e) return 2 + e
                                                Severity: Major
                                                Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                        if (r >= -2147483648) return 5
                                                  Severity: Major
                                                  Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                          if (4294967296 > e) return 5 + o
                                                    Severity: Major
                                                    Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                              return i.setUint8(o, 196), i.setUint8(o + 1, u), s.set(r, o + 2), 2 + u
                                                      Severity: Major
                                                      Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                              if (Math.floor(r) !== r) return 9
                                                        Severity: Major
                                                        Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                  if (65536 > r) return 3
                                                          Severity: Major
                                                          Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                  if (16 > e) return 1 + o
                                                            Severity: Major
                                                            Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                      if (65536 > r) return i.setUint8(o, 205), i.setUint16(o + 1, r), 3
                                                              Severity: Major
                                                              Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                Avoid too many return statements within this function.
                                                                Open

                                                                        if (128 > r) return 1
                                                                Severity: Major
                                                                Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                  Avoid too many return statements within this function.
                                                                  Open

                                                                          return i.setUint8(o, 197), i.setUint16(o + 1, u), s.set(r, o + 3), 3 + u
                                                                  Severity: Major
                                                                  Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                    Avoid too many return statements within this function.
                                                                    Open

                                                                          if (r >= -32) return i.setInt8(o, r), 1
                                                                    Severity: Major
                                                                    Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                          if (null === r) return i.setUint8(o, 192), 1
                                                                      Severity: Major
                                                                      Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                            if ('boolean' === a) return i.setUint8(o, r ? 195 : 194), 1
                                                                        Severity: Major
                                                                        Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                          Avoid too many return statements within this function.
                                                                          Open

                                                                              if ('boolean' === t || null === r) return 1
                                                                          Severity: Major
                                                                          Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                  return f
                                                                            Severity: Major
                                                                            Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                    if (r >= -32) return 1
                                                                              Severity: Major
                                                                              Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                      if (r >= -128) return 2
                                                                                Severity: Major
                                                                                Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                        if (65536 > e) return 3 + e
                                                                                  Severity: Major
                                                                                  Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                            if (4294967296 > r) return 5
                                                                                    Severity: Major
                                                                                    Found in packages/miew/src/vendors/mmtf.js - About 30 mins to fix

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

                                                                                        function L(r, t) {
                                                                                          var n = r.length
                                                                                          t || (t = new Uint8Array(4 * n))
                                                                                          for (var e = u(t), i = 0; n > i; ++i) e.setInt32(4 * i, r[i])
                                                                                          return s(t)
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 3 hrs to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 193..198

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

                                                                                      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 v(r, t) {
                                                                                          var n = r.length
                                                                                          t || (t = new Uint8Array(2 * n))
                                                                                          for (var e = u(t), i = 0; n > i; ++i) e.setInt16(2 * i, r[i])
                                                                                          return s(t)
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 3 hrs to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 206..211

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

                                                                                      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 G(r, t) {
                                                                                          var n = r.length,
                                                                                            e = L([t]),
                                                                                            i = v(T(r, t))
                                                                                          return j(10, n, e, i)
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 1 hr to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 383..388

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

                                                                                      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 V(r, t) {
                                                                                          var n = r.length,
                                                                                            e = L([t]),
                                                                                            i = L(F(r, t))
                                                                                          return j(9, n, e, i)
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 1 hr to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 389..394

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

                                                                                      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

                                                                                            if (65536 > u)
                                                                                              return i.setUint8(o, 197), i.setUint16(o + 1, u), s.set(r, o + 3), 3 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 1 hr to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 56..57
                                                                                      packages/miew/src/vendors/mmtf.js on lines 60..61

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

                                                                                      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

                                                                                            if (256 > u)
                                                                                              return i.setUint8(o, 196), i.setUint8(o + 1, u), s.set(r, o + 2), 2 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 1 hr to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 58..59
                                                                                      packages/miew/src/vendors/mmtf.js on lines 60..61

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

                                                                                      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

                                                                                            if (4294967296 > u)
                                                                                              return i.setUint8(o, 198), i.setUint32(o + 1, u), s.set(r, o + 5), 5 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 1 hr to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 56..57
                                                                                      packages/miew/src/vendors/mmtf.js on lines 58..59

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

                                                                                      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

                                                                                            if (256 > u)
                                                                                              return i.setUint8(o, 217), i.setUint8(o + 1, u), t(i, o + 2, r), 2 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 50 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 48..49
                                                                                      packages/miew/src/vendors/mmtf.js on lines 50..51

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

                                                                                      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

                                                                                            if (65536 > u)
                                                                                              return i.setUint8(o, 218), i.setUint16(o + 1, u), t(i, o + 3, r), 3 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 50 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 46..47
                                                                                      packages/miew/src/vendors/mmtf.js on lines 50..51

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

                                                                                      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

                                                                                            if (4294967296 > u)
                                                                                              return i.setUint8(o, 219), i.setUint32(o + 1, u), t(i, o + 5, r), 5 + u
                                                                                      Severity: Major
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 2 other locations - About 50 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 46..47
                                                                                      packages/miew/src/vendors/mmtf.js on lines 48..49

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

                                                                                      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

                                                                                          for (var e = 1; n > e; ++e) t[e] = r[e] - r[e - 1]
                                                                                      Severity: Minor
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 35 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 262..262

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

                                                                                      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

                                                                                          for (var e = 1; n > e; ++e) t[e] = r[e] + t[e - 1]
                                                                                      Severity: Minor
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 35 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 268..268

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

                                                                                      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 B(r) {
                                                                                          var t = r.length,
                                                                                            n = L(x(r))
                                                                                          return j(8, t, void 0, n)
                                                                                        }
                                                                                      Severity: Minor
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 30 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 373..377

                                                                                      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

                                                                                        function z(r) {
                                                                                          var t = r.length,
                                                                                            n = L(U(r))
                                                                                          return j(6, t, void 0, n)
                                                                                        }
                                                                                      Severity: Minor
                                                                                      Found in packages/miew/src/vendors/mmtf.js and 1 other location - About 30 mins to fix
                                                                                      packages/miew/src/vendors/mmtf.js on lines 378..382

                                                                                      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

                                                                                      There are no issues that match your filters.

                                                                                      Category
                                                                                      Status