RLOpenCatalyst/core

View on GitHub
client/cat3/customlib/terminal/terminal.js

Summary

Maintainability
F
1 mo
Test Coverage

File terminal.js has 3618 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * term.js - an xterm emulator
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 *
Severity: Major
Found in client/cat3/customlib/terminal/terminal.js - About 1 wk to fix

    Function write has 536 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Terminal.prototype.write = function(data) {
            var l = data.length
                , i = 0
                , j
                , cs
    Severity: Major
    Found in client/cat3/customlib/terminal/terminal.js - About 2 days to fix

      Function keySelect has 412 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Terminal.prototype.keySelect = function(ev, key) {
              this.showCursor();
      
              if (this.searchMode || key === 'n' || key === 'N') {
                  return this.keySearch(ev, key);
      Severity: Major
      Found in client/cat3/customlib/terminal/terminal.js - About 2 days to fix

        Function bindMouse has 221 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            Terminal.prototype.bindMouse = function() {
                var el = this.element
                    , self = this
                    , pressed = 32;
        
        
        Severity: Major
        Found in client/cat3/customlib/terminal/terminal.js - About 1 day to fix

          Function keyDown has 191 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Terminal.prototype.keyDown = function(ev) {
                  var self = this
                      , key;
          
                  switch (ev.keyCode) {
          Severity: Major
          Found in client/cat3/customlib/terminal/terminal.js - About 7 hrs to fix

            Function refresh has 120 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Terminal.prototype.refresh = function(start, end) {
                    var x
                        , y
                        , i
                        , line
            Severity: Major
            Found in client/cat3/customlib/terminal/terminal.js - About 4 hrs to fix

              Function keySearch has 106 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Terminal.prototype.keySearch = function(ev, key) {
                      if (key === '\x1b') {
                          this.leaveSearch();
                          return;
                      }
              Severity: Major
              Found in client/cat3/customlib/terminal/terminal.js - About 4 hrs to fix

                Function Terminal has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function Terminal(options) {
                        var self = this;
                
                        if (!(this instanceof Terminal)) {
                            return new Terminal(arguments[0], arguments[1], arguments[2]);
                Severity: Major
                Found in client/cat3/customlib/terminal/terminal.js - About 4 hrs to fix

                  Function setMode has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Terminal.prototype.setMode = function(params) {
                          if (typeof params === 'object') {
                              var l = params.length
                                  , i = 0;
                  
                  
                  Severity: Major
                  Found in client/cat3/customlib/terminal/terminal.js - About 3 hrs to fix

                    Function selectText has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        Terminal.prototype.selectText = function(x1, x2, y1, y2) {
                            var ox1
                                , ox2
                                , oy1
                                , oy2
                    Severity: Major
                    Found in client/cat3/customlib/terminal/terminal.js - About 3 hrs to fix

                      Function charAttributes has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          Terminal.prototype.charAttributes = function(params) {
                              // Optimize a single SGR0.
                              if (params.length === 1 && params[0] === 0) {
                                  this.curAttr = this.defAttr;
                                  return;
                      Severity: Major
                      Found in client/cat3/customlib/terminal/terminal.js - About 3 hrs to fix

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

                            Terminal.prototype.resetMode = function(params) {
                                if (typeof params === 'object') {
                                    var l = params.length
                                        , i = 0;
                        
                        
                        Severity: Major
                        Found in client/cat3/customlib/terminal/terminal.js - About 3 hrs to fix

                          Function open has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Terminal.prototype.open = function(parent) {
                                  var self = this
                                      , i = 0
                                      , div;
                          
                          
                          Severity: Major
                          Found in client/cat3/customlib/terminal/terminal.js - About 2 hrs to fix

                            Function sendEvent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function sendEvent(button, pos) {
                                        // self.emit('mouse', {
                                        //   x: pos.x - 32,
                                        //   y: pos.x - 32,
                                        //   button: button
                            Severity: Major
                            Found in client/cat3/customlib/terminal/terminal.js - About 2 hrs to fix

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

                                  Terminal.prototype.resize = function(x, y) {
                                      var line
                                          , el
                                          , i
                                          , j
                              Severity: Major
                              Found in client/cat3/customlib/terminal/terminal.js - About 2 hrs to fix

                                Function grabText has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    Terminal.prototype.grabText = function(x1, x2, y1, y2) {
                                        var out = ''
                                            , buf = ''
                                            , ch
                                            , x
                                Severity: Major
                                Found in client/cat3/customlib/terminal/terminal.js - About 2 hrs to fix

                                  Function getButton has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function getButton(ev) {
                                              var button
                                                  , shift
                                                  , meta
                                                  , ctrl
                                  Severity: Minor
                                  Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

                                    Function bindKeys has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        Terminal.bindKeys = function(document) {
                                            // We should only need to check `target === body` below,
                                            // but we can check everything for good measure.
                                            on(document, 'keydown', function(ev) {
                                                if (!Terminal.focus) return;
                                    Severity: Minor
                                    Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

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

                                          Terminal.prototype.deviceStatus = function(params) {
                                              if (!this.prefix) {
                                                  switch (params[0]) {
                                                      case 5:
                                                          // status report
                                      Severity: Minor
                                      Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

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

                                                function getCoords(ev) {
                                                    var x, y, w, h, el;
                                        
                                                    // ignore browsers without pageX for now
                                                    if (ev.pageX == null) return;
                                        Severity: Minor
                                        Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

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

                                              function matchColor(r1, g1, b1) {
                                                  var hash = (r1 << 16) | (g1 << 8) | b1;
                                          
                                                  if (matchColor._cache[hash] != null) {
                                                      return matchColor._cache[hash];
                                          Severity: Minor
                                          Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

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

                                                Terminal.prototype.keyPress = function(ev) {
                                                    var key;
                                            
                                                    cancel(ev);
                                            
                                            
                                            Severity: Minor
                                            Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

                                              Function fixMobile has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  Terminal.prototype.fixMobile = function(document) {
                                                      var self = this;
                                              
                                                      var textarea = document.createElement('textarea');
                                                      textarea.style.position = 'absolute';
                                              Severity: Minor
                                              Found in client/cat3/customlib/terminal/terminal.js - About 1 hr to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                    if (!el) continue;
                                                Severity: Major
                                                Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if (bg === -1) bg = 0x1ff;
                                                  Severity: Major
                                                  Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                if (isWide(ch)) i++;
                                                    Severity: Major
                                                    Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                  if (!this.prefixMode && !this.selectMode && ev.keyCode === 65) {
                                                                                      this.enterPrefix();
                                                                                      return cancel(ev);
                                                                                  }
                                                      Severity: Major
                                                      Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                        if (isWide(ch)) {
                                                                                            j = this.y + this.ybase;
                                                                                            if (this.cols < 2 || this.x >= this.cols) {
                                                                                                this.lines[j][this.x - 1] = [this.curAttr, ' '];
                                                                                                break;
                                                        Severity: Major
                                                        Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

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

                                                              matchColor.distance = function(r1, g1, b1, r2, g2, b2) {
                                                          Severity: Minor
                                                          Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                        if (this.visualMode) {
                                                                                            setTimeout(function() {
                                                                                                self.leaveVisual();
                                                                                            }, 1);
                                                                                        }
                                                            Severity: Major
                                                            Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                              switch (pt) {
                                                                                                  // DECSCA
                                                                                                  case '"q':
                                                                                                      pt = '0"q';
                                                                                                      break;
                                                              Severity: Major
                                                              Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                        if (saw_space && (x + 1 < this.cols && line[x + 1][1] > ' ')) {
                                                                                            x++;
                                                                                            break;
                                                                                        } else {
                                                                                            saw_space = true;
                                                                Severity: Major
                                                                Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if (x - 1 >= 0 && line[x - 1][1] > ' ') {
                                                                                              x--;
                                                                                              break;
                                                                                          }
                                                                  Severity: Major
                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                                if (ch >= '0' && ch <= '9') {
                                                                                                    this.currentParam =
                                                                                                        this.currentParam * 10 + ch.charCodeAt(0) - 48;
                                                                                                } else if (ch === ';') {
                                                                                                    this.params.push(this.currentParam);
                                                                    Severity: Major
                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                              if (data === -1) {
                                                                                                  out += '<span class="reverse-video terminal-cursor">';
                                                                                              } else {
                                                                                                  out += '<span style="';
                                                                      
                                                                      
                                                                      Severity: Major
                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                        } else if (params[i + 1] === 5) {
                                                                                            i += 2;
                                                                                            p = params[i] & 0xff;
                                                                                            bg = p;
                                                                                        }
                                                                        Severity: Major
                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                  if (++yb > this.ybase) {
                                                                                                      yb = this.ybase;
                                                                                                      x = this.x;
                                                                                                      break;
                                                                                                  }
                                                                          Severity: Major
                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                    if (--yb < 0) {
                                                                                                        yb++;
                                                                                                        x = 0;
                                                                                                        break;
                                                                                                    }
                                                                            Severity: Major
                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                      if (!this.prefix && ch !== '$' && ch !== '+') {
                                                                                                          this.currentParam = ch;
                                                                                                      } else if (this.prefix.length === 2) {
                                                                                                          this.currentParam = ch;
                                                                                                      } else {
                                                                              Severity: Major
                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                                if (this.params[1]) {
                                                                                                                    this.title = this.params[1];
                                                                                                                    this.handleTitle(this.title);
                                                                                                                }
                                                                                Severity: Major
                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                                  if (this.x >= this.cols) {
                                                                                                                      this.x = 0;
                                                                                                                      this.y++;
                                                                                                                      if (this.y > this.scrollBottom) {
                                                                                                                          this.y--;
                                                                                  Severity: Major
                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                                    if (this.charset && this.charset[ch]) {
                                                                                                                        ch = this.charset[ch];
                                                                                                                    }
                                                                                    Severity: Major
                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                      Avoid deeply nested control flow statements.
                                                                                      Open

                                                                                                              if (++yb > this.ybase) {
                                                                                                                  yb = this.ybase;
                                                                                                                  break;
                                                                                                              }
                                                                                      Severity: Major
                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                            } else if (i === this.cols - 1) {
                                                                                                                if (first_is_space === -1) {
                                                                                                                    first_is_space = 1;
                                                                                                                } else if (first_is_space === 0) {
                                                                                                                    found = true;
                                                                                        Severity: Major
                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                          Avoid deeply nested control flow statements.
                                                                                          Open

                                                                                                                  if (wrapped) break;
                                                                                          Severity: Major
                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                            Avoid deeply nested control flow statements.
                                                                                            Open

                                                                                                                    if (first_is_space === -1) {
                                                                                                                        first_is_space = 0;
                                                                                                                    }
                                                                                            Severity: Major
                                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                                      if (yb > 0) yb--;
                                                                                                                      else break;
                                                                                              Severity: Major
                                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                                        if (x + i >= this.cols) break;
                                                                                                Severity: Major
                                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                  Avoid deeply nested control flow statements.
                                                                                                  Open

                                                                                                                      if (y >= this.rows) {
                                                                                                                          y--;
                                                                                                                          if (yb < this.ybase) yb++;
                                                                                                                          else break;
                                                                                                                      }
                                                                                                  Severity: Major
                                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                            if (wrapped) break;
                                                                                                    Severity: Major
                                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                          if (yb < this.ybase) yb++;
                                                                                                      Severity: Major
                                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                                if (line[x + i][1] !== entry[i]) {
                                                                                                                                    break;
                                                                                                                                } else if (line[x + i][1] === entry[i] && i === entry.length - 1) {
                                                                                                                                    found = true;
                                                                                                                                    break;
                                                                                                        Severity: Major
                                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 45 mins to fix

                                                                                                          Consider simplifying this complex logical expression.
                                                                                                          Open

                                                                                                                      if (target === Terminal.focus.element
                                                                                                                          || target === Terminal.focus.context
                                                                                                                          || target === Terminal.focus.document
                                                                                                                          || target === Terminal.focus.body
                                                                                                                          || target === Terminal._textarea
                                                                                                          Severity: Major
                                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 40 mins to fix

                                                                                                            Consider simplifying this complex logical expression.
                                                                                                            Open

                                                                                                                        if (target === Terminal.focus.element
                                                                                                                            || target === Terminal.focus.context
                                                                                                                            || target === Terminal.focus.document
                                                                                                                            || target === Terminal.focus.body
                                                                                                                            || target === Terminal._textarea
                                                                                                            Severity: Major
                                                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 40 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                          return;
                                                                                                              Severity: Major
                                                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                                return;
                                                                                                                Severity: Major
                                                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

                                                                                                                              return;
                                                                                                                  Severity: Major
                                                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

                                                                                                                            return false;
                                                                                                                    Severity: Major
                                                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this function.
                                                                                                                      Open

                                                                                                                                  return;
                                                                                                                      Severity: Major
                                                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this function.
                                                                                                                        Open

                                                                                                                                    return;
                                                                                                                        Severity: Major
                                                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this function.
                                                                                                                          Open

                                                                                                                                      return cancel(ev);
                                                                                                                          Severity: Major
                                                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                        return;
                                                                                                                            Severity: Major
                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                          return;
                                                                                                                              Severity: Major
                                                                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                        return false;
                                                                                                                                Severity: Major
                                                                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                              return cancel(ev);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                    Open

                                                                                                                                                return;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                      Open

                                                                                                                                                  return;
                                                                                                                                      Severity: Major
                                                                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                        Open

                                                                                                                                                    return;
                                                                                                                                        Severity: Major
                                                                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                          Open

                                                                                                                                                      return;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                            Open

                                                                                                                                                    return cancel(ev);
                                                                                                                                            Severity: Major
                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                              Open

                                                                                                                                                                              return cancel(ev);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                Open

                                                                                                                                                        if (!key) return true;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                  Open

                                                                                                                                                              return;
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                    Open

                                                                                                                                                                return;
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                      Open

                                                                                                                                                                  return;
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                        Open

                                                                                                                                                                    if (this.entry.length === 0) return;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                          Open

                                                                                                                                                                                      return;
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                            Open

                                                                                                                                                                        return;
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                              Open

                                                                                                                                                                          return;
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                Open

                                                                                                                                                                            return;
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                  Open

                                                                                                                                                                              return;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                    Open

                                                                                                                                                                                return;
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                      Open

                                                                                                                                                                                                  return;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                        Open

                                                                                                                                                                                return false;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

                                                                                                                                                                                      return;
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in client/cat3/customlib/terminal/terminal.js - About 30 mins to fix

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

                                                                                                                                                                                    on(document, 'keydown', function(ev) {
                                                                                                                                                                                        if (!Terminal.focus) return;
                                                                                                                                                                                        var target = ev.target || ev.srcElement;
                                                                                                                                                                                        if (!target) return;
                                                                                                                                                                                        if (target === Terminal.focus.element
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 525..537

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

                                                                                                                                                                            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

                                                                                                                                                                                    on(document, 'keypress', function(ev) {
                                                                                                                                                                                        if (!Terminal.focus) return;
                                                                                                                                                                                        var target = ev.target || ev.srcElement;
                                                                                                                                                                                        if (!target) return;
                                                                                                                                                                                        if (target === Terminal.focus.element
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 511..523

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

                                                                                                                                                                            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

                                                                                                                                                                                        } else if (p === 48) {
                                                                                                                                                                                            // bg color 256
                                                                                                                                                                                            if (params[i + 1] === 2) {
                                                                                                                                                                                                i += 2;
                                                                                                                                                                                                bg = matchColor(
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3237..3273

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

                                                                                                                                                                            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

                                                                                                                                                                                        } else if (p === 38) {
                                                                                                                                                                                            // fg color 256
                                                                                                                                                                                            if (params[i + 1] === 2) {
                                                                                                                                                                                                i += 2;
                                                                                                                                                                                                fg = matchColor(
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3252..3273

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.scrollDown = function(params) {
                                                                                                                                                                                    var param = params[0] || 1;
                                                                                                                                                                                    while (param--) {
                                                                                                                                                                                        this.lines.splice(this.ybase + this.scrollBottom, 1);
                                                                                                                                                                                        this.lines.splice(this.ybase + this.scrollTop, 0, this.blankLine());
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4033..4042

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.scrollUp = function(params) {
                                                                                                                                                                                    var param = params[0] || 1;
                                                                                                                                                                                    while (param--) {
                                                                                                                                                                                        this.lines.splice(this.ybase + this.scrollTop, 1);
                                                                                                                                                                                        this.lines.splice(this.ybase + this.scrollBottom, 0, this.blankLine());
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4045..4054

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.error = function() {
                                                                                                                                                                                    if (!this.debug) return;
                                                                                                                                                                                    if (!this.context.console || !this.context.console.error) return;
                                                                                                                                                                                    var args = Array.prototype.slice.call(arguments);
                                                                                                                                                                                    this.context.console.error.apply(this.context.console, args);
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 2723..2728

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.log = function() {
                                                                                                                                                                                    if (!this.debug) return;
                                                                                                                                                                                    if (!this.context.console || !this.context.console.log) return;
                                                                                                                                                                                    var args = Array.prototype.slice.call(arguments);
                                                                                                                                                                                    this.context.console.log.apply(this.context.console, args);
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 2730..2735

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.cursorForward = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.x += param;
                                                                                                                                                                                    if (this.x >= this.cols) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 2982..2989

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

                                                                                                                                                                                Terminal.prototype.cursorDown = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.y += param;
                                                                                                                                                                                    if (this.y >= this.rows) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 2993..3000

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 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 2 locations. Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                Terminal.prototype.charPosAbsolute = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.x = param - 1;
                                                                                                                                                                                    if (this.x >= this.cols) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3573..3580

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.linePosAbsolute = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.y = param - 1;
                                                                                                                                                                                    if (this.y >= this.rows) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3486..3493

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.cursorBackward = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.x -= param;
                                                                                                                                                                                    if (this.x < 0) this.x = 0;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 2973..2978

                                                                                                                                                                            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

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

                                                                                                                                                                                Terminal.prototype.cursorUp = function(params) {
                                                                                                                                                                                    var param = params[0];
                                                                                                                                                                                    if (param < 1) param = 1;
                                                                                                                                                                                    this.y -= param;
                                                                                                                                                                                    if (this.y < 0) this.y = 0;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3004..3009

                                                                                                                                                                            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

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, this.ydisp + this.y, this.ydisp + this.y);
                                                                                                                                                                                        } else {
                                                                                                                                                                                            this.refresh(this.y, this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5058..5062
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5072..5076
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5269..5273

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

                                                                                                                                                                            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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(x, this.x, this.ydisp + this.y, this.ydisp + this.y);
                                                                                                                                                                                        } else {
                                                                                                                                                                                            this.refresh(this.y, this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5058..5062
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5269..5273
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5290..5294

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

                                                                                                                                                                            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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, this.ydisp + this.y, this.ydisp + this.y);
                                                                                                                                                                                        } else {
                                                                                                                                                                                            this.refresh(this.y, this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5058..5062
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5072..5076
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5290..5294

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

                                                                                                                                                                            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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(x, this.x, this.ydisp + this.y, this.ydisp + this.y);
                                                                                                                                                                                        } else {
                                                                                                                                                                                            this.refresh(this.y, this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 2 hrs to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5072..5076
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5269..5273
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5290..5294

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

                                                                                                                                                                            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

                                                                                                                                                                                    } else if (options.colors.length === 10) {
                                                                                                                                                                                        options.colors = options.colors.slice(0, -2).concat(
                                                                                                                                                                                            Terminal._colors.slice(8, -2), options.colors.slice(-2));
                                                                                                                                                                                    } else if (options.colors.length === 18) {
                                                                                                                                                                                        options.colors = options.colors.slice(0, -2).concat(
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 170..173

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

                                                                                                                                                                            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

                                                                                                                                                                                    } else if (options.colors.length === 18) {
                                                                                                                                                                                        options.colors = options.colors.slice(0, -2).concat(
                                                                                                                                                                                            Terminal._colors.slice(16, -2), options.colors.slice(-2));
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 167..173

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.cursorBackwardTab = function(params) {
                                                                                                                                                                                    var param = params[0] || 1;
                                                                                                                                                                                    while (param--) {
                                                                                                                                                                                        this.x = this.prevStop();
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4025..4030

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

                                                                                                                                                                            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

                                                                                                                                                                                Terminal.prototype.cursorForwardTab = function(params) {
                                                                                                                                                                                    var param = params[0] || 1;
                                                                                                                                                                                    while (param--) {
                                                                                                                                                                                        this.x = this.nextStop();
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4080..4085

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

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    if (typeof params === 'object') {
                                                                                                                                                                                        var l = params.length
                                                                                                                                                                                            , i = 0;
                                                                                                                                                                            
                                                                                                                                                                                        for (; i < l; i++) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3696..3705

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    if (typeof params === 'object') {
                                                                                                                                                                                        var l = params.length
                                                                                                                                                                                            , i = 0;
                                                                                                                                                                            
                                                                                                                                                                                        for (; i < l; i++) {
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 1 hr to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3898..3907

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                        if (oy2 < oy1) {
                                                                                                                                                                                            tmp = ox2;
                                                                                                                                                                                            ox2 = ox1;
                                                                                                                                                                                            ox1 = tmp;
                                                                                                                                                                                            tmp = oy2;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 2 other locations - About 55 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4833..4840
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4892..4899

                                                                                                                                                                            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

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

                                                                                                                                                                                    if (y2 < y1) {
                                                                                                                                                                                        tmp = x2;
                                                                                                                                                                                        x2 = x1;
                                                                                                                                                                                        x1 = tmp;
                                                                                                                                                                                        tmp = y2;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 2 other locations - About 55 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4786..4793
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4833..4840

                                                                                                                                                                            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

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

                                                                                                                                                                                    if (y2 < y1) {
                                                                                                                                                                                        tmp = x2;
                                                                                                                                                                                        x2 = x1;
                                                                                                                                                                                        x1 = tmp;
                                                                                                                                                                                        tmp = y2;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 2 other locations - About 55 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4786..4793
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4892..4899

                                                                                                                                                                            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

                                                                                                                                                                                    var param = params[0]
                                                                                                                                                                                        , l = this.ybase + this.rows
                                                                                                                                                                                        , ch = [this.eraseAttr(), ' '] // xterm?
                                                                                                                                                                                        , i;
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 45 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4582..4585

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    var param = params[0]
                                                                                                                                                                                        , l = this.ybase + this.rows
                                                                                                                                                                                        , ch = [this.eraseAttr(), ' '] // xterm?
                                                                                                                                                                                        , i;
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 45 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4601..4604

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

                                                                                                                                                                                            case 6:
                                                                                                                                                                                                // cursor position
                                                                                                                                                                                                this.send('\x1b[?'
                                                                                                                                                                                                    + (this.y + 1)
                                                                                                                                                                                                    + ';'
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 45 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3307..3314

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

                                                                                                                                                                                            case 6:
                                                                                                                                                                                                // cursor position
                                                                                                                                                                                                this.send('\x1b['
                                                                                                                                                                                                    + (this.y + 1)
                                                                                                                                                                                                    + ';'
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 45 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3320..3327

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

                                                                                                                                                                                    if (row < 0) {
                                                                                                                                                                                        row = 0;
                                                                                                                                                                                    } else if (row >= this.rows) {
                                                                                                                                                                                        row = this.rows - 1;
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 40 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3030..3034

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    if (col < 0) {
                                                                                                                                                                                        col = 0;
                                                                                                                                                                                    } else if (col >= this.cols) {
                                                                                                                                                                                        col = this.cols - 1;
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 40 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3024..3028

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 49.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    var ch = params[0]
                                                                                                                                                                                        , t = params[1]
                                                                                                                                                                                        , l = params[2]
                                                                                                                                                                                        , b = params[3]
                                                                                                                                                                                        , r = params[4];
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 35 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4272..4276

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    while (param--) {
                                                                                                                                                                                        this.lines[row].splice(this.x, 1);
                                                                                                                                                                                        this.lines[row].push(ch);
                                                                                                                                                                                    }
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 35 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4607..4610

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                        for (i = this.ybase; i < l; i++) {
                                                                                                                                                                                            this.lines[i].splice(this.x, 1);
                                                                                                                                                                                            this.lines[i].push(ch);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 35 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 3461..3464

                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                            Tuning

                                                                                                                                                                            This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                            Refactorings

                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                    var t = params[0]
                                                                                                                                                                                        , l = params[1]
                                                                                                                                                                                        , b = params[2]
                                                                                                                                                                                        , r = params[3]
                                                                                                                                                                                        , attr = params[4];
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 1 other location - About 35 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4445..4449

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(this.x, this.x, y, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4983..4985
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5007..5009
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5016..5018

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5149..5151
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5197..5199
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5309..5311
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5413..5415
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5149..5151
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5245..5247
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5309..5311
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5413..5415
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

                                                                                                                                                                                            if (this.visualMode) {
                                                                                                                                                                                                this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                            }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5149..5151
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5197..5199
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5245..5247
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5309..5311
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5413..5415

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(this.x, this.x, y, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4983..4985
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4998..5000
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5016..5018

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(this.x, this.x, y, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4983..4985
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4998..5000
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5007..5009

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(this.x, this.x, y, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 4998..5000
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5007..5009
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5016..5018

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5149..5151
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5197..5199
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5245..5247
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5413..5415
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5149..5151
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5197..5199
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5245..5247
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5309..5311
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5514..5516

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

                                                                                                                                                                                        if (this.visualMode) {
                                                                                                                                                                                            this.selectText(ox, this.x, oy + oyd, this.ydisp + this.y);
                                                                                                                                                                                        }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in client/cat3/customlib/terminal/terminal.js and 5 other locations - About 30 mins to fix
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5197..5199
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5245..5247
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5309..5311
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5413..5415
                                                                                                                                                                            client/cat3/customlib/terminal/terminal.js on lines 5514..5516

                                                                                                                                                                            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