packages/miew-cli/dist/index.modern.js

Summary

Maintainability
F
7 mos
Test Coverage

Function parser has 2634 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var parser = function () {
  var o = function o(k, v, _o, l) {
    for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
    }
    return _o;
Severity: Major
Found in packages/miew-cli/dist/index.modern.js - About 1 wk to fix

    File index.modern.js has 4039 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /** 3D Molecular Viewer v0.0.1
    Copyright (c) 2015-2023 EPAM Systems, Inc. */
    
    import { Miew } from 'miew';
    import { find, forEach, remove, omitBy, findKey, isNumber, assign, forIn, isEmpty, isEqual, isString, isPlainObject, isUndefined, slice, sortBy, keys, get, set } from 'lodash';
    Severity: Major
    Found in packages/miew-cli/dist/index.modern.js - About 1 wk to fix

      Function parser has a Cognitive Complexity of 219 (exceeds 5 allowed). Consider refactoring.
      Open

      var parser = function () {
        var o = function o(k, v, _o, l) {
          for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
          }
          return _o;
      Severity: Minor
      Found in packages/miew-cli/dist/index.modern.js - About 4 days to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function lexer has 440 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var lexer = function () {
          var lexer = {
            EOF: 1,
            parseError: function parseError(str, hash) {
              if (this.yy.parser) {
      Severity: Major
      Found in packages/miew-cli/dist/index.modern.js - About 2 days to fix

        Function CLIUtils has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
        Open

        var CLIUtils = function () {
          function CLIUtils() {
            _classCallCheck(this, CLIUtils);
          }
          _createClass(CLIUtils, [{
        Severity: Minor
        Found in packages/miew-cli/dist/index.modern.js - About 1 day to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function anonymous has 299 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
            , $$
            , _$
            ) {
              var $0 = $$.length - 1;
        Severity: Major
        Found in packages/miew-cli/dist/index.modern.js - About 1 day to fix

          Function CLIUtils has 176 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var CLIUtils = function () {
            function CLIUtils() {
              _classCallCheck(this, CLIUtils);
            }
            _createClass(CLIUtils, [{
          Severity: Major
          Found in packages/miew-cli/dist/index.modern.js - About 7 hrs to fix

            Function anonymous has 168 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
                    switch ($avoiding_name_collisions) {
                      case 0
                      :
                        break;
            Severity: Major
            Found in packages/miew-cli/dist/index.modern.js - About 6 hrs to fix

              Function parse has 136 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  parse: function parse(input) {
                    var self = this,
                        stack = [0],
                        tstack = [],
                        vstack = [null],
              Severity: Major
              Found in packages/miew-cli/dist/index.modern.js - About 5 hrs to fix

                Function RepresentationMap has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

                var RepresentationMap = function () {
                  function RepresentationMap() {
                    _classCallCheck(this, RepresentationMap);
                    this.representationMap = {};
                    this.representationID = {};
                Severity: Minor
                Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function iterableToArrayLimit has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                var iterableToArrayLimit = createCommonjsModule(function (module) {
                function _iterableToArrayLimit(arr, i) {
                  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
                  if (_i == null) return;
                  var _arr = [];
                Severity: Minor
                Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function test_match has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      test_match: function test_match(match, indexed_rule) {
                        var token, lines, backup;
                        if (this.options.backtrack_lexer) {
                          backup = {
                            yylineno: this.yylineno,
                Severity: Major
                Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                  Function getMiewWithCli has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var getMiewWithCli = function getMiewWithCli(miewInstance) {
                    var obj = Object.create(miewInstance);
                    obj.script = function (script, _printCallback, _errorCallback) {
                      MiewCLIParser.parser.yy.miew = obj;
                      MiewCLIParser.parser.yy.echo = _printCallback;
                  Severity: Major
                  Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                    Function getMiewWithCli has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var getMiewWithCli = function getMiewWithCli(miewInstance) {
                      var obj = Object.create(miewInstance);
                      obj.script = function (script, _printCallback, _errorCallback) {
                        MiewCLIParser.parser.yy.miew = obj;
                        MiewCLIParser.parser.yy.echo = _printCallback;
                    Severity: Minor
                    Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

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

                    var RepresentationMap = function () {
                      function RepresentationMap() {
                        _classCallCheck(this, RepresentationMap);
                        this.representationMap = {};
                        this.representationID = {};
                    Severity: Major
                    Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

                      Function next has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            next: function next() {
                              if (this.done) {
                                return this.EOF;
                              }
                              if (!this._input) {
                      Severity: Minor
                      Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                        Function wrapNativeSuper has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var wrapNativeSuper = createCommonjsModule(function (module) {
                        function _wrapNativeSuper(Class) {
                          var _cache = typeof Map === "function" ? new Map() : undefined;
                          module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
                            if (Class === null || !isNativeFunction(Class)) return Class;
                        Severity: Minor
                        Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function deriveDeep has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function deriveDeep(obj, needZeroOwnProperties) {
                          var res = obj;
                          var i;
                          var n;
                          if (obj instanceof Array) {
                        Severity: Minor
                        Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function createElement has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function createElement(tag, attrs, content) {
                          var element = document.createElement(tag);
                          var i;
                          var n;
                          if (attrs) {
                        Severity: Minor
                        Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function unsupportedIterableToArray has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var unsupportedIterableToArray = createCommonjsModule(function (module) {
                        function _unsupportedIterableToArray(o, minLen) {
                          if (!o) return;
                          if (typeof o === "string") return arrayLikeToArray(o, minLen);
                          var n = Object.prototype.toString.call(o).slice(8, -1);
                        Severity: Minor
                        Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function checkArg has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            value: function checkArg(key, arg, modificate) {
                              if (key !== undefined && arg !== undefined) {
                                if (keyRemap(key) === 'selector') {
                                  var res = selectors.parse(arg);
                                  if (res.error !== undefined) {
                        Severity: Minor
                        Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                          Function propagateProp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              value: function propagateProp(path, arg) {
                                if (path !== undefined) {
                                  var argExc = {};
                                  var adapter = options.adapters[_typeof(get(settings.defaults, path))];
                                  if (adapter === undefined) {
                          Severity: Minor
                          Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

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

                            function DebugTracer(namespace) {
                              var enabled = false;
                              this.enable = function (on) {
                                enabled = on;
                              };
                            Severity: Minor
                            Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                              Function createClass has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var createClass = createCommonjsModule(function (module) {
                              function _defineProperties(target, props) {
                                for (var i = 0; i < props.length; i++) {
                                  var descriptor = props[i];
                                  descriptor.enumerable = descriptor.enumerable || false;
                              Severity: Minor
                              Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function wrapNativeSuper has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var wrapNativeSuper = createCommonjsModule(function (module) {
                              function _wrapNativeSuper(Class) {
                                var _cache = typeof Map === "function" ? new Map() : undefined;
                                module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
                                  if (Class === null || !isNativeFunction(Class)) return Class;
                              Severity: Minor
                              Found in packages/miew-cli/dist/index.modern.js - About 1 hr to fix

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

                                    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
                                    , $$
                                    , _$
                                Severity: Major
                                Found in packages/miew-cli/dist/index.modern.js - About 50 mins to fix

                                  Function compareOptionsWithDefaults has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function compareOptionsWithDefaults(opts, defOpts) {
                                    var optsStr = [];
                                    if (defOpts && opts) {
                                      var keys = Object.keys(opts);
                                      for (var p = 0; p < keys.length; ++p) {
                                  Severity: Minor
                                  Found in packages/miew-cli/dist/index.modern.js - About 45 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function isNativeReflectConstruct has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  var isNativeReflectConstruct = createCommonjsModule(function (module) {
                                  function _isNativeReflectConstruct() {
                                    if (typeof Reflect === "undefined" || !Reflect.construct) return false;
                                    if (Reflect.construct.sham) return false;
                                    if (typeof Proxy === "function") return true;
                                  Severity: Minor
                                  Found in packages/miew-cli/dist/index.modern.js - About 45 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function download has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function download(data, filename, type) {
                                    var blobData = new Blob([data]);
                                    if (!filename) {
                                      filename = ['data', +new Date()].join('');
                                    }
                                  Severity: Minor
                                  Found in packages/miew-cli/dist/index.modern.js - About 35 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function construct has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  var construct = createCommonjsModule(function (module) {
                                  function _construct(Parent, args, Class) {
                                    if (isNativeReflectConstruct()) {
                                      module.exports = _construct = Reflect.construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                    } else {
                                  Severity: Minor
                                  Found in packages/miew-cli/dist/index.modern.js - About 35 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Avoid too many return statements within this function.
                                  Open

                                      return false;
                                  Severity: Major
                                  Found in packages/miew-cli/dist/index.modern.js - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                    function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
                                    Severity: Major
                                    Found in packages/miew-cli/dist/index.modern.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                return false;
                                      Severity: Major
                                      Found in packages/miew-cli/dist/index.modern.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                  return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
                                                    text: '',
                                                    token: null,
                                                    line: this.yylineno
                                                  });
                                        Severity: Major
                                        Found in packages/miew-cli/dist/index.modern.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                    return this.EOF;
                                          Severity: Major
                                          Found in packages/miew-cli/dist/index.modern.js - About 30 mins to fix

                                            Function resolveURL has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            function resolveURL(str) {
                                              if (typeof URL !== 'undefined') {
                                                try {
                                                  if (typeof window !== 'undefined') {
                                                    return new URL(str, window.location).href;
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js - About 25 mins to fix

                                            Cognitive Complexity

                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                            A method's cognitive complexity is based on a few simple rules:

                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                            • Code is considered more complex for each "break in the linear flow of the code"
                                            • Code is considered more complex when "flow breaking structures are nested"

                                            Further reading

                                            Function shotDownload has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            function shotDownload(dataUrl, filename) {
                                              if (!dataUrl || dataUrl.substr(0, 5) !== 'data:') {
                                                return;
                                              }
                                              if (!filename) {
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js - About 25 mins to fix

                                            Cognitive Complexity

                                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                            A method's cognitive complexity is based on a few simple rules:

                                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                            • Code is considered more complex for each "break in the linear flow of the code"
                                            • Code is considered more complex when "flow breaking structures are nested"

                                            Further reading

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

                                            var parser = function () {
                                              var o = function o(k, v, _o, l) {
                                                for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {
                                                }
                                                return _o;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 mos to fix
                                            packages/miew-cli/dist/index.js on lines 74..2711

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var getMiewWithCli = function getMiewWithCli(miewInstance) {
                                              var obj = Object.create(miewInstance);
                                              obj.script = function (script, _printCallback, _errorCallback) {
                                                MiewCLIParser.parser.yy.miew = obj;
                                                MiewCLIParser.parser.yy.echo = _printCallback;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 days to fix
                                            packages/miew-cli/dist/index.js on lines 4014..4074

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var help = {
                                              $help: ['help (<cmd name>| <path to property>)', 'You can get detailed information about command options', '   using "help cmd.opt.opt.[...]"\n', '   you can use one line comments', '   everything started from (#|//) will be skipped', '   Example: >build //some comment\n', 'List of available commands:'],
                                              reset: {
                                                $help: ['Reload current object, delete all representations', '    Nothing will work until load new object']
                                              },
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 days to fix
                                            packages/miew-cli/dist/index.js on lines 2775..2919

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var RepresentationMap = function () {
                                              function RepresentationMap() {
                                                _classCallCheck(this, RepresentationMap);
                                                this.representationMap = {};
                                                this.representationID = {};
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 days to fix
                                            packages/miew-cli/dist/index.js on lines 3703..3757

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

                                            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 DebugTracer(namespace) {
                                              var enabled = false;
                                              this.enable = function (on) {
                                                enabled = on;
                                              };
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3382..3414

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var wrapNativeSuper = createCommonjsModule(function (module) {
                                            function _wrapNativeSuper(Class) {
                                              var _cache = typeof Map === "function" ? new Map() : undefined;
                                              module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
                                                if (Class === null || !isNativeFunction(Class)) return Class;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3146..3174

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

                                            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

                                              }, {
                                                key: "listRep",
                                                value: function listRep(miew, repMap, repIndex, key) {
                                                  var ret = '';
                                                  var rep = miew.repGet(repIndex);
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3793..3817

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var iterableToArrayLimit = createCommonjsModule(function (module) {
                                            function _iterableToArrayLimit(arr, i) {
                                              var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
                                              if (_i == null) return;
                                              var _arr = [];
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3185..3211

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var construct = createCommonjsModule(function (module) {
                                            function _construct(Parent, args, Class) {
                                              if (isNativeReflectConstruct()) {
                                                module.exports = _construct = Reflect.construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                              } else {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3126..3143

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

                                            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 deriveDeep(obj, needZeroOwnProperties) {
                                              var res = obj;
                                              var i;
                                              var n;
                                              if (obj instanceof Array) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3352..3377

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

                                            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 download(data, filename, type) {
                                              var blobData = new Blob([data]);
                                              if (!filename) {
                                                filename = ['data', +new Date()].join('');
                                              }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3588..3609

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

                                            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

                                              }, {
                                                key: "checkArg",
                                                value: function checkArg(key, arg, modificate) {
                                                  if (key !== undefined && arg !== undefined) {
                                                    if (keyRemap(key) === 'selector') {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3870..3908

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

                                            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 createElement(tag, attrs, content) {
                                              var element = document.createElement(tag);
                                              var i;
                                              var n;
                                              if (attrs) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3317..3342

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

                                            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 4 locations. Consider refactoring.
                                            Open

                                            function shotDownload(dataUrl, filename) {
                                              if (!dataUrl || dataUrl.substr(0, 5) !== 'data:') {
                                                return;
                                              }
                                              if (!filename) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 3 other locations - About 1 day to fix
                                            packages/miew-cli/src/utils.js on lines 446..468
                                            packages/miew/src/utils.js on lines 446..468
                                            packages/miew-cli/dist/index.js on lines 3569..3587

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var createClass = createCommonjsModule(function (module) {
                                            function _defineProperties(target, props) {
                                              for (var i = 0; i < props.length; i++) {
                                                var descriptor = props[i];
                                                descriptor.enumerable = descriptor.enumerable || false;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 52..71

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var modeIdDesc = {
                                              $help: ['Rendering mode shortcut', '    BS - balls and sticks mode', '    LN - lines mode', '    LC - licorice mode', '    VW - van der waals mode', '    TR - trace mode', '    TU - tube mode', '    CA - cartoon mode', '    SA - isosurface mode', '    QS - quick surface mode', '    SE - solvent excluded mode', '    TX - text mode'],
                                              BS: {
                                                $help: ['   Balls and sticks', '      aromrad = <number> #aromatic radius', '      atom = <number>    #atom radius', '      bond = <number>    #bond radius', '      multibond = <bool> #use multibond', '      showarom = <bool>  #show aromatic', '      space = <number>   #space value\n']
                                              },
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 2716..2751

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var unsupportedIterableToArray = createCommonjsModule(function (module) {
                                            function _unsupportedIterableToArray(o, minLen) {
                                              if (!o) return;
                                              if (typeof o === "string") return arrayLikeToArray(o, minLen);
                                              var n = Object.prototype.toString.call(o).slice(8, -1);
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3226..3236

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var _typeof_1 = createCommonjsModule(function (module) {
                                            function _typeof(obj) {
                                              "@babel/helpers - typeof";
                                              return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
                                                return typeof obj;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 29..39

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

                                            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 compareOptionsWithDefaults(opts, defOpts) {
                                              var optsStr = [];
                                              if (defOpts && opts) {
                                                var keys = Object.keys(opts);
                                                for (var p = 0; p < keys.length; ++p) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.js on lines 3470..3486

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var utils = {
                                              browserType: browserType,
                                              encodeQueryComponent: encodeQueryComponent,
                                              decodeQueryComponent: decodeQueryComponent,
                                              getUrlParameters: getUrlParameters,
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 7 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3652..3687

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

                                            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 3 locations. Consider refactoring.
                                            Open

                                            function unquoteString(value) {
                                              if (!isString(value)) {
                                                return value;
                                              }
                                              if (value[0] === '"' && value[value.length - 1] === '"') {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 6 hrs to fix
                                            packages/miew-cli/src/utils.js on lines 391..404
                                            packages/miew/src/utils.js on lines 391..404

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var isNativeReflectConstruct = createCommonjsModule(function (module) {
                                            function _isNativeReflectConstruct() {
                                              if (typeof Reflect === "undefined" || !Reflect.construct) return false;
                                              if (Reflect.construct.sham) return false;
                                              if (typeof Proxy === "function") return true;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3110..3123

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var inherits = createCommonjsModule(function (module) {
                                            function _inherits(subClass, superClass) {
                                              if (typeof superClass !== "function" && superClass !== null) {
                                                throw new TypeError("Super expression must either be null or a function");
                                              }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3045..3063

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var getPrototypeOf = createCommonjsModule(function (module) {
                                            function _getPrototypeOf(o) {
                                              module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
                                                return o.__proto__ || Object.getPrototypeOf(o);
                                              }, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3091..3099

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

                                            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

                                              }, {
                                                key: "listObjs",
                                                value: function listObjs(miew) {
                                                  var objs = miew._objects;
                                                  if (!objs || !Array.isArray(objs) || objs.length === 0) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3828..3841

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var setPrototypeOf = createCommonjsModule(function (module) {
                                            function _setPrototypeOf(o, p) {
                                              module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
                                                o.__proto__ = p;
                                                return o;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3033..3042

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

                                            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 mergeTypedArraysUnsafe(array) {
                                              if (array.length <= 0) {
                                                return null;
                                              }
                                              var size = array.reduce(function (acc, cur) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3637..3651

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var arrayLikeToArray = createCommonjsModule(function (module) {
                                            function _arrayLikeToArray(arr, len) {
                                              if (len == null || len > arr.length) len = arr.length;
                                              for (var i = 0, arr2 = new Array(len); i < len; i++) {
                                                arr2[i] = arr[i];
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3214..3223

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var possibleConstructorReturn = createCommonjsModule(function (module) {
                                            var _typeof = _typeof_1["default"];
                                            function _possibleConstructorReturn(self, call) {
                                              if (call && (_typeof(call) === "object" || typeof call === "function")) {
                                                return call;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3077..3088

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

                                            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 (path.endsWith('.fg') || path.endsWith('.bg')) {
                                                      if (typeof arg !== 'number') {
                                                        var val = palettes.get(settings.now.palette).getNamedColor(arg, true);
                                                        if (val !== undefined) {
                                                          arg = "0x".concat(val.toString(16));
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3923..3932

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 133.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            function getUrlParameters(url) {
                                              url = url || window.location.search;
                                              var query = url.substring(url.indexOf('?') + 1);
                                              var search = /([^&=]+)=?([^&]*)/g;
                                              var result = [];
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3270..3280

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

                                            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 resolveURL(str) {
                                              if (typeof URL !== 'undefined') {
                                                try {
                                                  if (typeof window !== 'undefined') {
                                                    return new URL(str, window.location).href;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3292..3308

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

                                            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

                                              _createClass(CLIUtils, [{
                                                key: "list",
                                                value: function list(miew, repMap, key) {
                                                  var ret = '';
                                                  if (miew && repMap !== undefined) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3779..3793

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

                                            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 generateRegExp(symbolStr) {
                                              var symbolList = [];
                                              for (var i = 0, n = symbolStr.length; i < n; ++i) {
                                                symbolList[symbolList.length] = symbolStr[i].charCodeAt(0).toString(16);
                                              }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3309..3316

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

                                            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 _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3255..3255

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var OutOfMemoryError = function (_Error) {
                                              _inherits(OutOfMemoryError, _Error);
                                              var _super = _createSuper(OutOfMemoryError);
                                              function OutOfMemoryError(message) {
                                                var _this;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3416..3428

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

                                            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 4 locations. Consider refactoring.
                                            Open

                                            function getBrowser() {
                                              if (navigator.vendor && navigator.vendor.indexOf('Apple') > -1 && navigator.userAgent && navigator.userAgent.indexOf('CriOS') === -1 && navigator.userAgent.indexOf('FxiOS') === -1) {
                                                return browserType.SAFARI;
                                              }
                                              return browserType.DEFAULT;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 3 other locations - About 3 hrs to fix
                                            packages/miew-cli/src/utils.js on lines 425..436
                                            packages/miew/src/utils.js on lines 425..436
                                            packages/miew-cli/dist/index.js on lines 3558..3563

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

                                            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

                                              }, {
                                                key: "load",
                                                value: function load(miew, arg) {
                                                  if (miew === undefined || arg === undefined || arg === '-f') {
                                                    return;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3858..3870

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

                                            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 getUrlParametersAsDict(url) {
                                              var result = {};
                                              var a = getUrlParameters(url);
                                              for (var i = 0; i < a.length; ++i) {
                                                var _a$i = _slicedToArray(a[i], 2),
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3281..3291

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var slicedToArray = createCommonjsModule(function (module) {
                                            function _slicedToArray(arr, i) {
                                              return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
                                            }
                                            module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3247..3252

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

                                            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 4 locations. Consider refactoring.
                                            Open

                                            function copySubArrays(src, dst, indices, itemSize) {
                                              for (var i = 0, n = indices.length; i < n; ++i) {
                                                for (var j = 0; j < itemSize; ++j) {
                                                  dst[i * itemSize + j] = src[indices[i] * itemSize + j];
                                                }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 3 other locations - About 3 hrs to fix
                                            packages/miew-cli/src/utils.js on lines 500..506
                                            packages/miew/src/utils.js on lines 500..506
                                            packages/miew-cli/dist/index.js on lines 3610..3616

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var isNativeFunction = createCommonjsModule(function (module) {
                                            function _isNativeFunction(fn) {
                                              return Function.toString.call(fn).indexOf("[native code]") !== -1;
                                            }
                                            module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3102..3107

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

                                            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 bytesFromBase64(
                                            str) {
                                              var binary = window.atob(str);
                                              var bytes = new Uint8Array(binary.length);
                                              for (var i = 0; i < bytes.length; ++i) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3451..3459

                                            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

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

                                            function ArgList(arg) {
                                              if (arg instanceof this.constructor) {
                                                return arg;
                                              }
                                              if (arg instanceof Array) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 2 hrs to fix
                                            packages/miew-cli/src/Miew-cli.js on lines 302..313
                                            packages/miew-cli/dist/index.js on lines 3959..3970

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var assertThisInitialized = createCommonjsModule(function (module) {
                                            function _assertThisInitialized(self) {
                                              if (self === void 0) {
                                                throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                                              }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3066..3074

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

                                            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

                                            function keyRemap(key) {
                                              var keys = {
                                                s: 'selector',
                                                m: 'mode',
                                                c: 'colorer',
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 2 hrs to fix
                                            packages/miew-cli/src/Miew-cli.js on lines 84..99
                                            packages/miew-cli/dist/index.js on lines 3759..3774

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var classCallCheck = createCommonjsModule(function (module) {
                                            function _classCallCheck(instance, Constructor) {
                                              if (!(instance instanceof Constructor)) {
                                                throw new TypeError("Cannot call a class as a function");
                                              }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 42..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 90.

                                            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

                                              }, {
                                                key: "listSelector",
                                                value: function listSelector(miew, context) {
                                                  var ret = '';
                                                  for (var k in context) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3817..3828

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

                                            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 createCommonjsModule(fn, basedir, module) {
                                                return module = {
                                                    path: basedir,
                                                    exports: {},
                                                    require: function (path, base) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 15..23

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

                                            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 4 locations. Consider refactoring.
                                            Open

                                            function dataUrlToBlob(url) {
                                              var parts = url.split(/[:;,]/);
                                              var partsCount = parts.length;
                                              if (partsCount >= 3 && parts[partsCount - 2] === 'base64') {
                                                return new Blob([bytesFromBase64(parts[partsCount - 1])]);
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 3 other locations - About 2 hrs to fix
                                            packages/miew-cli/src/utils.js on lines 416..423
                                            packages/miew/src/utils.js on lines 416..423
                                            packages/miew-cli/dist/index.js on lines 3550..3557

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var arrayWithHoles = createCommonjsModule(function (module) {
                                            function _arrayWithHoles(arr) {
                                              if (Array.isArray(arr)) return arr;
                                            }
                                            module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3177..3182

                                            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 bytesToBase64(
                                            buffer) {
                                              var bytes = new Uint8Array(buffer);
                                              var binary = '';
                                              for (var i = 0; i < bytes.byteLength; i++) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3442..3450

                                            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

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

                                                forIn(obj, function (value, key) {
                                                  var newPref = prefix + (prefix.length > 0 ? '.' : '');
                                                  if (value instanceof Object) {
                                                    iterateThrough(value, newPref + key);
                                                  } else if (value !== undefined) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3511..3518

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

                                            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 ((path.endsWith('.color') || path.endsWith('.baseColor') || path.endsWith('.EL.carbon')) && typeof arg !== 'number') {
                                                      arg = palettes.get(settings.now.palette).getNamedColor(arg);
                                                    }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 2 hrs to fix
                                            packages/miew-cli/src/Miew-cli.js on lines 248..255
                                            packages/miew-cli/dist/index.js on lines 3920..3922

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var nonIterableRest = createCommonjsModule(function (module) {
                                            function _nonIterableRest() {
                                              throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
                                            }
                                            module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.js on lines 3239..3244

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

                                            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 allocateTyped(TypedArrayName, size) {
                                              var result = null;
                                              try {
                                                result = new TypedArrayName(size);
                                              } catch (e) {
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.js on lines 3429..3441

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

                                            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 encodeQueryComponent(text, excludeExp) {
                                              var encode = function encode(code) {
                                                return String.fromCharCode(parseInt(code.substr(1), 16));
                                              };
                                              return encodeURIComponent(text).replace(excludeExp, encode).replace(/%20/g, '+');
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.js on lines 3261..3266

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

                                            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

                                            ArgList.prototype.remove = function (value) {
                                              var values = this._values;
                                              var index = values.indexOf(value);
                                              if (index >= 0) {
                                                values.splice(index, 1);
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 1 hr to fix
                                            packages/miew-cli/src/Miew-cli.js on lines 321..328
                                            packages/miew-cli/dist/index.js on lines 3976..3983

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

                                            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 concatTypedArraysUnsafe(first, second) {
                                              var result = new first.constructor(first.length + second.length);
                                              result.set(first);
                                              result.set(second, first.length);
                                              return result;
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.js on lines 3631..3636

                                            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

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

                                                set(res, list[i].id, cliUtils.propagateProp("".concat(keyRemap(cmd), ".").concat(arg, ".").concat(list[i].id), list[i].val));
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.js on lines 3988..3988

                                            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 4 locations. Consider refactoring.
                                            Open

                                            function splitFileName(fileName) {
                                              var ext = getFileExtension(fileName);
                                              var name = fileName.slice(0, fileName.length - ext.length);
                                              return [name, ext];
                                            }
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 3 other locations - About 55 mins to fix
                                            packages/miew-cli/src/utils.js on lines 410..414
                                            packages/miew/src/utils.js on lines 410..414
                                            packages/miew-cli/dist/index.js on lines 3545..3549

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

                                            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

                                              forEach(this._handlers[event.type], function (callback) {
                                                var context = callback[1] || self;
                                                callback[0].apply(context, [event]);
                                              });
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 55 mins to fix
                                            packages/miew-cli/dist/index.js on lines 2954..2957

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

                                            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 shotOpen(url) {
                                              if (typeof window !== 'undefined') {
                                                window.open().document.write("<body style=\"margin:0\"><img src=\"".concat(url, "\" /></body>"));
                                              }
                                            }
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 55 mins to fix
                                            packages/miew-cli/dist/index.js on lines 3564..3568

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

                                            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 hexColor(color) {
                                              var hex = "0000000".concat(color.toString(16)).substr(-6);
                                              return "#".concat(hex);
                                            }
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 55 mins to fix
                                            packages/miew-cli/dist/index.js on lines 3378..3381

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

                                            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 getDefaultExportFromCjs (x) {
                                                return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
                                            }
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 50 mins to fix
                                            packages/miew-cli/dist/index.js on lines 11..13

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

                                            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

                                            ArgList.prototype.append = function (value) {
                                              var values = this._values;
                                              values[values.length] = value;
                                              return this;
                                            };
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 45 mins to fix
                                            packages/miew-cli/src/Miew-cli.js on lines 315..319
                                            packages/miew-cli/dist/index.js on lines 3971..3975

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

                                            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 correctSelectorIdentifier(value) {
                                              if (unquotedStringRE.test(value)) {
                                                return value;
                                              }
                                              enquoteHelper[1] = value;
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 40 mins to fix
                                            packages/miew-cli/dist/index.js on lines 3624..3630

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var addRepDesc = {
                                              $help: ['Short (packed) representation description as a set of variables', '    s=<EXPRESSION>', '        selector property', '    m=<MODE_ID>[!<PARAMETER>:<VALUE>[,...]]', '        render mode property', '    c=<COLORER_ID>[!<PARAMETER>:<VALUE>[,...]]', '        color mode property', '    mt=<MATERIAL_ID>', '        material property'],
                                              s: {
                                                $help: 'Selection expression string as it is in menu->representations->selection'
                                              },
                                            Severity: Major
                                            Found in packages/miew-cli/dist/index.modern.js and 2 other locations - About 40 mins to fix
                                            packages/miew-cli/src/MiewCLIHelp.js on lines 150..169
                                            packages/miew-cli/dist/index.js on lines 2761..2769

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

                                            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

                                            Logger.prototype.message = function (level, message) {
                                              var priority = verify(priorities[level]);
                                              this._message(priority, message);
                                            };
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 40 mins to fix
                                            packages/miew-cli/dist/index.js on lines 2997..3000

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

                                            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

                                                remove(handler, function (values) {
                                                  return isUndefOrEqual(type, ev) && isUndefOrEqual(callback, values[0]) && isUndefOrEqual(context, values[1] || self);
                                                });
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 35 mins to fix
                                            packages/miew-cli/dist/index.js on lines 2944..2946

                                            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

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

                                            function Logger() {
                                              EventDispatcher.call(this);
                                              this.console = false;
                                              this._priority = priorities.warn;
                                            }
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 30 mins to fix
                                            packages/miew-cli/dist/index.js on lines 2967..2971

                                            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

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

                                              }, {
                                                key: "joinHelpStr",
                                                value: function joinHelpStr(helpData) {
                                                  if (helpData instanceof Array) {
                                                    return helpData.join('\n');
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 30 mins to fix
                                            packages/miew-cli/dist/index.js on lines 3841..3849

                                            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