packages/miew-cli/dist/index.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.js - About 1 wk to fix

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

    /** 3D Molecular Viewer v0.0.1
    Copyright (c) 2015-2023 EPAM Systems, Inc. */
    
    'use strict';
    
    
    Severity: Major
    Found in packages/miew-cli/dist/index.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.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.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.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.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.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.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.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.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.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 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.js - About 2 hrs to fix

                  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.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.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.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.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.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.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.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.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.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(lodash.get(settings.defaults, path))];
                                  if (adapter === undefined) {
                          Severity: Minor
                          Found in packages/miew-cli/dist/index.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.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.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.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.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.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.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 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.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 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.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.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.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.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.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.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.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.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.js and 1 other location - About 4 mos to fix
                                            packages/miew-cli/dist/index.modern.js on lines 70..2707

                                            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.js and 1 other location - About 4 days to fix
                                            packages/miew-cli/dist/index.modern.js on lines 4010..4070

                                            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.js and 1 other location - About 4 days to fix
                                            packages/miew-cli/dist/index.modern.js on lines 2771..2915

                                            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.js and 1 other location - About 2 days to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3699..3753

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3378..3410

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3142..3170

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3789..3813

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3181..3207

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3122..3139

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3348..3373

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3584..3605

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3866..3904

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3313..3338

                                            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.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.modern.js on lines 3565..3583

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 48..67

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 2712..2747

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3222..3232

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 25..35

                                            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.js and 1 other location - About 1 day to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3466..3482

                                            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.js and 1 other location - About 7 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3648..3683

                                            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 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.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3106..3119

                                            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.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3041..3059

                                            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.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3087..3095

                                            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.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3824..3837

                                            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.js and 1 other location - About 6 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3029..3038

                                            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.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3633..3647

                                            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.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3210..3219

                                            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.js and 1 other location - About 5 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3073..3084

                                            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.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3919..3928

                                            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.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3266..3276

                                            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.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3288..3304

                                            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.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3775..3789

                                            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.js and 1 other location - About 4 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3305..3312

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3251..3251

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3412..3424

                                            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.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.modern.js on lines 3554..3559

                                            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

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3277..3287

                                            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

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

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3243..3248

                                            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.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.modern.js on lines 3606..3612

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3098..3103

                                            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.js and 1 other location - About 3 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3447..3455

                                            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.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.modern.js on lines 3955..3966

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3062..3070

                                            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.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.modern.js on lines 3755..3770

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 38..45

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3813..3824

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 11..19

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 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.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.modern.js on lines 3546..3553

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3173..3178

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3438..3446

                                            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

                                                lodash.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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3507..3514

                                            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.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.modern.js on lines 3916..3918

                                            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.js and 1 other location - About 2 hrs to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3235..3240

                                            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.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3425..3437

                                            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.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3257..3262

                                            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.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.modern.js on lines 3972..3979

                                            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.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3627..3632

                                            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

                                                lodash.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.js and 1 other location - About 1 hr to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3984..3984

                                            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

                                              lodash.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.js and 1 other location - About 55 mins to fix
                                            packages/miew-cli/dist/index.modern.js on lines 2950..2953

                                            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

                                            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.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.modern.js on lines 3541..3545

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

                                            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.js and 1 other location - About 50 mins to fix
                                            packages/miew-cli/dist/index.modern.js on lines 7..9

                                            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.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.modern.js on lines 3967..3971

                                            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

                                            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.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.modern.js on lines 2757..2765

                                            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.js and 1 other location - About 40 mins to fix
                                            packages/miew-cli/dist/index.modern.js on lines 2993..2996

                                            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

                                            function correctSelectorIdentifier(value) {
                                              if (unquotedStringRE.test(value)) {
                                                return value;
                                              }
                                              enquoteHelper[1] = value;
                                            Severity: Minor
                                            Found in packages/miew-cli/dist/index.js and 1 other location - About 40 mins to fix
                                            packages/miew-cli/dist/index.modern.js on lines 3620..3626

                                            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

                                                lodash.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.js and 1 other location - About 35 mins to fix
                                            packages/miew-cli/dist/index.modern.js on lines 2940..2942

                                            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

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

                                            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

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

                                            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