hunterlong/statup

View on GitHub
frontend/public/js/codemirror.js

Summary

Maintainability
F
1 mo
Test Coverage

File codemirror.js has 7702 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE

// This is CodeMirror (http://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
Severity: Major
Found in frontend/public/js/codemirror.js - About 3 wks to fix

    Function addEditorMethods has 378 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function addEditorMethods(CodeMirror) {
      var optionHandlers = CodeMirror.optionHandlers
    
      var helpers = CodeMirror.helpers = {}
    
    
    Severity: Major
    Found in frontend/public/js/codemirror.js - About 1 day to fix

      Function defineOptions has 116 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function defineOptions(CodeMirror) {
        var optionHandlers = CodeMirror.optionHandlers
      
        function option(name, deflt, handle, notOnInit) {
          CodeMirror.defaults[name] = deflt
      Severity: Major
      Found in frontend/public/js/codemirror.js - About 4 hrs to fix

        Function leftButtonSelect has 114 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function leftButtonSelect(cm, event, start, behavior) {
          var display = cm.display, doc = cm.doc
          e_preventDefault(event)
        
          var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges
        Severity: Major
        Found in frontend/public/js/codemirror.js - About 4 hrs to fix

          Function bidiOrdering has 100 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var bidiOrdering = (function() {
            // Character types for codepoints 0 to 0xff
            var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"
            // Character types for codepoints 0x600 to 0x6f9
            var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"
          Severity: Major
          Found in frontend/public/js/codemirror.js - About 4 hrs to fix

            Function registerEventHandlers has 89 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function registerEventHandlers(cm) {
              var d = cm.display
              on(d.scroller, "mousedown", operation(cm, onMouseDown))
              // Older IE's will not fire a second mousedown for a double click
              if (ie && ie_version < 11)
            Severity: Major
            Found in frontend/public/js/codemirror.js - About 3 hrs to fix

              Function drawSelectionRange has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function drawSelectionRange(cm, range, output) {
                var display = cm.display, doc = cm.doc
                var fragment = document.createDocumentFragment()
                var padding = paddingH(cm.display), leftSide = padding.left
                var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right
              Severity: Major
              Found in frontend/public/js/codemirror.js - About 3 hrs to fix

                Function init has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                ContentEditableInput.prototype.init = function (display) {
                    var this$1 = this;
                
                  var input = this, cm = input.cm
                  var div = input.div = display.lineDiv
                Severity: Major
                Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                  Function insertLineContent has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function insertLineContent(line, builder, styles) {
                    var spans = line.markedSpans, allText = line.text, at = 0
                    if (!spans) {
                      for (var i$1 = 1; i$1 < styles.length; i$1+=2)
                        { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)) }
                  Severity: Major
                  Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                    Function onContextMenu has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    TextareaInput.prototype.onContextMenu = function (e) {
                      var input = this, cm = input.cm, display = cm.display, te = input.textarea
                      var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop
                      if (!pos || presto) { return } // Opera is difficult.
                    
                    
                    Severity: Major
                    Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                      Function pollContent has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      ContentEditableInput.prototype.pollContent = function () {
                        if (this.readDOMTimeout != null) {
                          clearTimeout(this.readDOMTimeout)
                          this.readDOMTimeout = null
                        }
                      Severity: Major
                      Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                        function buildToken(builder, text, style, startStyle, endStyle, title, css) {
                          if (!text) { return }
                          var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text
                          var special = builder.cm.state.specialChars, mustWrap = false
                          var content
                        Severity: Major
                        Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                          TextareaInput.prototype.init = function (display) {
                              var this$1 = this;
                          
                            var input = this, cm = this.cm
                            this.createField(display)
                          Severity: Major
                          Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                    if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||
                                          span.from == null && lineNo != from.line ||
                                          span.from != null && lineNo == to.line && span.from >= to.ch) &&
                                        (!filter || filter(span.marker)))
                                      { found.push(span.marker.parent || span.marker) }
                            Severity: Critical
                            Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                              Function regChange has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function regChange(cm, from, to, lendiff) {
                                if (from == null) { from = cm.doc.first }
                                if (to == null) { to = cm.doc.first + cm.doc.size }
                                if (!lendiff) { lendiff = 0 }
                              
                              
                              Severity: Major
                              Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                                Function makeChangeFromHistory has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function makeChangeFromHistory(doc, type, allowSelectionOnly) {
                                  var suppress = doc.cm && doc.cm.state.suppressEdits
                                  if (suppress && !allowSelectionOnly) { return }
                                
                                  var hist = doc.history, event, selAfter = doc.sel
                                Severity: Major
                                Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                  function markText(doc, from, to, options, type) {
                                    // Shared markers (across linked documents) are handled separately
                                    // (markTextShared will call out to this again, once per
                                    // document).
                                    if (options && options.shared) { return markTextShared(doc, from, to, options, type) }
                                  Severity: Major
                                  Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                    function onDrop(e) {
                                      var cm = this
                                      clearDragCursor(cm)
                                      if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
                                        { return }
                                    Severity: Major
                                    Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                      function findPosH(doc, pos, dir, unit, visually) {
                                        var oldPos = pos
                                        var origDir = dir
                                        var lineObj = getLine(doc, pos.line)
                                        function findNextLine() {
                                      Severity: Major
                                      Found in frontend/public/js/codemirror.js - About 2 hrs to fix

                                        Function CodeMirror has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function CodeMirror(place, options) {
                                          var this$1 = this;
                                        
                                          if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
                                        
                                        
                                        Severity: Major
                                        Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                          function moveVisually(cm, line, start, dir) {
                                            var bidi = getOrder(line, cm.doc.direction)
                                            if (!bidi) { return moveLogically(line, start, dir) }
                                            if (start.ch >= line.text.length) {
                                              start.ch = line.text.length
                                          Severity: Minor
                                          Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                            function onScrollWheel(cm, e) {
                                              var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y
                                            
                                              var display = cm.display, scroll = display.scroller
                                              // Quit if there's nothing to scroll here
                                            Severity: Minor
                                            Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                              function Display(place, doc, input) {
                                                var d = this
                                                this.input = input
                                              
                                                // Covers bottom-right square when both scrollbars are present.
                                              Severity: Minor
                                              Found in frontend/public/js/codemirror.js - About 2 hrs to fix

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

                                                function updateDisplayIfNeeded(cm, update) {
                                                  var display = cm.display, doc = cm.doc
                                                
                                                  if (update.editorIsHidden) {
                                                    resetView(cm)
                                                Severity: Minor
                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                  function locateNodeInLineView(lineView, node, offset) {
                                                    var wrapper = lineView.text.firstChild, bad = false
                                                    if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
                                                    if (node == wrapper) {
                                                      bad = true
                                                  Severity: Minor
                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                      function drawForLine(line, fromArg, toArg) {
                                                        var lineObj = getLine(doc, line)
                                                        var lineLen = lineObj.text.length
                                                        var start, end
                                                        function coords(ch, bias) {
                                                    Severity: Minor
                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                      function domTextBetween(cm, from, to, fromLine, toLine) {
                                                        var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false
                                                        function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
                                                        function close() {
                                                          if (closing) {
                                                      Severity: Minor
                                                      Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                        function stretchSpansOverChange(doc, change) {
                                                          if (change.full) { return null }
                                                          var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans
                                                          var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans
                                                          if (!oldFirst && !oldLast) { return null }
                                                        Severity: Minor
                                                        Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                          function indentLine(cm, n, how, aggressive) {
                                                            var doc = cm.doc, state
                                                            if (how == null) { how = "add" }
                                                            if (how == "smart") {
                                                              // Fall back to "prev" when the mode doesn't have an indentation
                                                          Severity: Minor
                                                          Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                            Function makeChangeSingleDocInEditor has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            function makeChangeSingleDocInEditor(cm, change, spans) {
                                                              var doc = cm.doc, display = cm.display, from = change.from, to = change.to
                                                            
                                                              var recomputeMaxLength = false, checkWidthStart = from.line
                                                              if (!cm.options.lineWrapping) {
                                                            Severity: Minor
                                                            Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                              Function fromTextArea has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              function fromTextArea(textarea, options) {
                                                                options = options ? copyObj(options) : {}
                                                                options.value = textarea.value
                                                                if (!options.tabindex && textarea.tabIndex)
                                                                  { options.tabindex = textarea.tabIndex }
                                                              Severity: Minor
                                                              Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                Function measureCharInner has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                function measureCharInner(cm, prepared, ch, bias) {
                                                                  var place = nodeAndOffsetInLineMap(prepared.map, ch, bias)
                                                                  var node = place.node, start = place.start, end = place.end, collapse = place.collapse
                                                                
                                                                  var rect
                                                                Severity: Minor
                                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                  Function showPrimarySelection has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  ContentEditableInput.prototype.showPrimarySelection = function () {
                                                                    var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary()
                                                                    var from = prim.from(), to = prim.to()
                                                                  
                                                                    if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
                                                                  Severity: Minor
                                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                    Function updateDoc has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    function updateDoc(doc, change, markedSpans, estimateHeight) {
                                                                      function spansFor(n) {return markedSpans ? markedSpans[n] : null}
                                                                      function update(line, text, spans) {
                                                                        updateLine(line, text, spans, estimateHeight)
                                                                        signalLater(line, "change", line, change)
                                                                    Severity: Minor
                                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                      Consider simplifying this complex logical expression.
                                                                      Open

                                                                        if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
                                                                            repeat == "single" && (contained = sel.contains(pos)) > -1 &&
                                                                            (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
                                                                            (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
                                                                          { leftButtonStartDrag(cm, event, pos, behavior) }
                                                                      Severity: Critical
                                                                      Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                        Consider simplifying this complex logical expression.
                                                                        Open

                                                                                if (ltr) {
                                                                                  topLeft = docLTR && openStart && first ? leftSide : fromPos.left
                                                                                  topRight = docLTR ? rightSide : wrapX(from, dir, "before")
                                                                                  botLeft = docLTR ? leftSide : wrapX(to, dir, "after")
                                                                                  botRight = docLTR && openEnd && last ? rightSide : toPos.right
                                                                        Severity: Critical
                                                                        Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                          function addLegacyProps(CodeMirror) {
                                                                            CodeMirror.off = off
                                                                            CodeMirror.on = on
                                                                            CodeMirror.wheelEventPixels = wheelEventPixels
                                                                            CodeMirror.Doc = Doc
                                                                          Severity: Minor
                                                                          Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                            Function applyTextInput has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                            function applyTextInput(cm, inserted, deleted, sel, origin) {
                                                                              var doc = cm.doc
                                                                              cm.display.shift = false
                                                                              if (!sel) { sel = doc.sel }
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                              Function coordsCharInner has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              function coordsCharInner(cm, lineObj, lineNo, x, y) {
                                                                                // Move y into line-local coordinate space
                                                                                y -= heightAtLine(lineObj)
                                                                                var preparedMeasure = prepareMeasureForLine(cm, lineObj)
                                                                                // When directly calling `measureCharPrepared`, we have to adjust
                                                                              Severity: Minor
                                                                              Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                Function buildLineContent has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                function buildLineContent(cm, lineView) {
                                                                                  // The padding-right forces the element to have a 'border', which
                                                                                  // is needed on Webkit to be able to get line-level bounding
                                                                                  // rectangles for it (in measureChar).
                                                                                  var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null)
                                                                                Severity: Minor
                                                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                  Function clear has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                  TextMarker.prototype.clear = function () {
                                                                                      var this$1 = this;
                                                                                  
                                                                                    if (this.explicitlyCleared) { return }
                                                                                    var cm = this.doc.cm, withOp = cm && !cm.curOp
                                                                                  Severity: Minor
                                                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                    Function highlightWorker has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                    function highlightWorker(cm) {
                                                                                      var doc = cm.doc
                                                                                      if (doc.highlightFrontier >= cm.display.viewTo) { return }
                                                                                      var end = +new Date + cm.options.workTime
                                                                                      var context = getContextBefore(cm, doc.highlightFrontier)
                                                                                    Severity: Minor
                                                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                        function onCopyCut(e) {
                                                                                          if (signalDOMEvent(cm, e)) { return }
                                                                                          if (cm.somethingSelected()) {
                                                                                            setLastCopied({lineWise: false, text: cm.getSelections()})
                                                                                            if (e.type == "cut") { cm.replaceSelection("", null, "cut") }
                                                                                      Severity: Minor
                                                                                      Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                        function updateLineGutter(cm, lineView, lineN, dims) {
                                                                                          if (lineView.gutter) {
                                                                                            lineView.node.removeChild(lineView.gutter)
                                                                                            lineView.gutter = null
                                                                                          }
                                                                                        Severity: Minor
                                                                                        Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                            function extendTo(pos) {
                                                                                              if (cmp(lastPos, pos) == 0) { return }
                                                                                              lastPos = pos
                                                                                          
                                                                                              if (behavior.unit == "rectangle") {
                                                                                          Severity: Minor
                                                                                          Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                            function highlightLine(cm, line, context, forceToEnd) {
                                                                                              // A styles array always starts with a number identifying the
                                                                                              // mode/overlays that it is based on (for easy invalidation).
                                                                                              var st = [cm.state.modeGen], lineClasses = {}
                                                                                              // Compute the base array of styles
                                                                                            Severity: Minor
                                                                                            Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                              function patchDisplay(cm, updateNumbersFrom, dims) {
                                                                                                var display = cm.display, lineNumbers = cm.options.lineNumbers
                                                                                                var container = display.lineDiv, cur = container.firstChild
                                                                                              
                                                                                                function rm(node) {
                                                                                              Severity: Minor
                                                                                              Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                Consider simplifying this complex logical expression.
                                                                                                Open

                                                                                                    if (context.line >= cm.display.viewFrom) { // Visible
                                                                                                      var oldStyles = line.styles
                                                                                                      var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null
                                                                                                      var highlighted = highlightLine(cm, line, context, true)
                                                                                                      if (resetState) { context.state = resetState }
                                                                                                Severity: Critical
                                                                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                  Consider simplifying this complex logical expression.
                                                                                                  Open

                                                                                                      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
                                                                                                          (sp.to == null || sp.to != span.from) &&
                                                                                                          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
                                                                                                          lineIsHiddenInner(doc, line, sp)) { return true }
                                                                                                  Severity: Critical
                                                                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                    Consider simplifying this complex logical expression.
                                                                                                    Open

                                                                                                      if (this.contextMenuPending || !cm.state.focused ||
                                                                                                          (hasSelection(input) && !prevInput && !this.composing) ||
                                                                                                          cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
                                                                                                        { return false }
                                                                                                    Severity: Critical
                                                                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                      function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
                                                                                                        var flattenSpans = mode.flattenSpans
                                                                                                        if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans }
                                                                                                        var curStart = 0, curStyle = null
                                                                                                        var stream = new StringStream(text, cm.options.tabSize, context), style
                                                                                                      Severity: Minor
                                                                                                      Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                        function addChangeToHistory(doc, change, selAfter, opId) {
                                                                                                          var hist = doc.history
                                                                                                          hist.undone.length = 0
                                                                                                          var time = +new Date, cur
                                                                                                          var last
                                                                                                        Severity: Minor
                                                                                                        Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                          function nodeAndOffsetInLineMap(map, ch, bias) {
                                                                                                            var node, start, end, collapse, mStart, mEnd
                                                                                                            // First, search the line map for the text node corresponding to,
                                                                                                            // or closest to, the target character.
                                                                                                            for (var i = 0; i < map.length; i += 3) {
                                                                                                          Severity: Minor
                                                                                                          Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                            function leftButtonStartDrag(cm, event, pos, behavior) {
                                                                                                              var display = cm.display, moved = false
                                                                                                              var dragEnd = operation(cm, function (e) {
                                                                                                                if (webkit) { display.scroller.draggable = false }
                                                                                                                cm.state.draggingText = false
                                                                                                            Severity: Minor
                                                                                                            Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                              TextareaInput.prototype.poll = function () {
                                                                                                                  var this$1 = this;
                                                                                                              
                                                                                                                var cm = this.cm, input = this.textarea, prevInput = this.prevInput
                                                                                                                // Since this is called a *lot*, try to bail out as cheaply as
                                                                                                              Severity: Minor
                                                                                                              Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                    addWidget: function(pos, node, scroll, vert, horiz) {
                                                                                                                      var display = this.display
                                                                                                                      pos = cursorCoords(this, clipPos(this.doc, pos))
                                                                                                                      var top = pos.bottom, left = pos.left
                                                                                                                      node.style.position = "absolute"
                                                                                                                Severity: Minor
                                                                                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                  NativeScrollbars.prototype.update = function (measure) {
                                                                                                                    var needsH = measure.scrollWidth > measure.clientWidth + 1
                                                                                                                    var needsV = measure.scrollHeight > measure.clientHeight + 1
                                                                                                                    var sWidth = measure.nativeBarWidth
                                                                                                                  
                                                                                                                  
                                                                                                                  Severity: Minor
                                                                                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                    function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
                                                                                                                      var line = getLine(doc, pos.line)
                                                                                                                      if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
                                                                                                                        var sp = line.markedSpans[i], m = sp.marker
                                                                                                                        if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
                                                                                                                    Severity: Minor
                                                                                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                      function onMouseDown(e) {
                                                                                                                        var cm = this, display = cm.display
                                                                                                                        if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
                                                                                                                        display.input.ensurePolled()
                                                                                                                        display.shift = e.shiftKey
                                                                                                                      Severity: Minor
                                                                                                                      Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                        function scrollPosIntoView(cm, pos, end, margin) {
                                                                                                                          if (margin == null) { margin = 0 }
                                                                                                                          var rect
                                                                                                                          if (!cm.options.lineWrapping && pos == end) {
                                                                                                                            // Set pos and end to the cursor positions around the character pos sticks to
                                                                                                                        Severity: Minor
                                                                                                                        Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                            var loop = function ( o ) {
                                                                                                                              context.baseTokens = st
                                                                                                                              var overlay = cm.state.overlays[o], i = 1, at = 0
                                                                                                                              context.state = true
                                                                                                                              runMode(cm, line.text, overlay.mode, context, function (end, style) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                            Open

                                                                                                                                if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
                                                                                                                                  var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
                                                                                                                                  ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to))
                                                                                                                                }
                                                                                                                            Severity: Major
                                                                                                                            Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                              Open

                                                                                                                                if (!update.force &&
                                                                                                                                    update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
                                                                                                                                    (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
                                                                                                                                    display.renderedView == display.view && countDirtyView(cm) == 0)
                                                                                                                                  { return false }
                                                                                                                              Severity: Major
                                                                                                                              Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                Open

                                                                                                                                  if ((hist.lastOp == opId ||
                                                                                                                                       hist.lastOrigin == change.origin && change.origin &&
                                                                                                                                       ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
                                                                                                                                        change.origin.charAt(0) == "*")) &&
                                                                                                                                      (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
                                                                                                                                Severity: Major
                                                                                                                                Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                  Open

                                                                                                                                      if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
                                                                                                                                        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
                                                                                                                                        ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
                                                                                                                                                                              span.to == null ? null : span.to - endCh))
                                                                                                                                      }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in frontend/public/js/codemirror.js - About 1 hr to fix

                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                    Open

                                                                                                                                        if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
                                                                                                                                            (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in frontend/public/js/codemirror.js - About 1 hr to fix

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

                                                                                                                                      function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in frontend/public/js/codemirror.js - About 50 mins to fix

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

                                                                                                                                        function buildToken(builder, text, style, startStyle, endStyle, title, css) {
                                                                                                                                        Severity: Major
                                                                                                                                        Found in frontend/public/js/codemirror.js - About 50 mins to fix

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

                                                                                                                                          function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {
                                                                                                                                          Severity: Major
                                                                                                                                          Found in frontend/public/js/codemirror.js - About 50 mins to fix

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

                                                                                                                                            function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
                                                                                                                                            Severity: Major
                                                                                                                                            Found in frontend/public/js/codemirror.js - About 50 mins to fix

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

                                                                                                                                              function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                          if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                          } else if (sp.from > pos && nextChange > sp.from) {
                                                                                                                                                            nextChange = sp.from
                                                                                                                                                          }
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                            if (m.explicitlyCleared) {
                                                                                                                                                              if (!line.markedSpans) { break }
                                                                                                                                                              else {--i; continue}
                                                                                                                                                            }
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                  if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)) }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                        Open

                                                                                                                                                                  if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
                                                                                                                                                                    { collapsed = sp }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                          Open

                                                                                                                                                              if (cut$1) {
                                                                                                                                                                display.view = display.view.slice(0, cut$1.index)
                                                                                                                                                                display.viewTo = cut$1.lineN
                                                                                                                                                              } else {
                                                                                                                                                                resetView(cm)
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                            Open

                                                                                                                                                                    if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
                                                                                                                                                                      { return skipAtomicInner(doc, near, pos, dir, mayClear) }
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                              Open

                                                                                                                                                                      if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
                                                                                                                                                                        { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null) }
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                            for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                  Open

                                                                                                                                                                            if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to) }
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                    Open

                                                                                                                                                                              if (m.className) { spanStyle += " " + m.className }
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                      Open

                                                                                                                                                                                if (m.title && !title) { title = m.title }
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                        Open

                                                                                                                                                                            if (cutTop && cutBot) {
                                                                                                                                                                              display.view = display.view.slice(0, cutTop.index)
                                                                                                                                                                                .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
                                                                                                                                                                                .concat(display.view.slice(cutBot.index))
                                                                                                                                                                              display.viewTo += lendiff
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                          Open

                                                                                                                                                                                    if (sameLine) { (first || (first = [])).push(span$1) }
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                            Open

                                                                                                                                                                                      if (m.css) { css = (css ? css + ";" : "") + m.css }
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                              Open

                                                                                                                                                                                    if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
                                                                                                                                                                                      if (indexOf(newGroup, Number(m[1])) > -1) {
                                                                                                                                                                                        lst(newChanges)[prop] = change[prop]
                                                                                                                                                                                        delete change[prop]
                                                                                                                                                                                      }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                Open

                                                                                                                                                                                          if (sp.to != null && sp.to != pos && nextChange > sp.to) {
                                                                                                                                                                                            nextChange = sp.to
                                                                                                                                                                                            spanEndStyle = ""
                                                                                                                                                                                          }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                  Open

                                                                                                                                                                                          { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1] } } }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                    Open

                                                                                                                                                                                              { if (oldCur[k].marker == span.marker) { continue spans } }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 45 mins to fix

                                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                                      Open

                                                                                                                                                                                              } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
                                                                                                                                                                                                if (sp.to != null && sp.to != pos && nextChange > sp.to) {
                                                                                                                                                                                                  nextChange = sp.to
                                                                                                                                                                                                  spanEndStyle = ""
                                                                                                                                                                                                }
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                                                        Open

                                                                                                                                                                                          if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
                                                                                                                                                                                            var rSpan = node.parentNode.getClientRects()[0]
                                                                                                                                                                                            if (rSpan)
                                                                                                                                                                                              { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom} }
                                                                                                                                                                                            else
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                          Consider simplifying this complex logical expression.
                                                                                                                                                                                          Open

                                                                                                                                                                                            if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
                                                                                                                                                                                                (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
                                                                                                                                                                                              { return false }
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                            Open

                                                                                                                                                                                              } else if (unit == "word" || unit == "group") {
                                                                                                                                                                                                var sawType = null, group = unit == "group"
                                                                                                                                                                                                var helper = doc.cm && doc.cm.getHelper(pos, "wordChars")
                                                                                                                                                                                                for (var first = true;; first = false) {
                                                                                                                                                                                                  if (dir < 0 && !moveOnce(!first)) { break }
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                                              Open

                                                                                                                                                                                                  if (display.wheelStartX == null) {
                                                                                                                                                                                                    display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop
                                                                                                                                                                                                    display.wheelDX = dx; display.wheelDY = dy
                                                                                                                                                                                                    setTimeout(function () {
                                                                                                                                                                                                      if (display.wheelStartX == null) { return }
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                                                                Open

                                                                                                                                                                                                  if (style || startStyle || endStyle || mustWrap || css) {
                                                                                                                                                                                                    var fullStyle = style || ""
                                                                                                                                                                                                    if (startStyle) { fullStyle += startStyle }
                                                                                                                                                                                                    if (endStyle) { fullStyle += endStyle }
                                                                                                                                                                                                    var token = elt("span", [content], fullStyle, css)
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                    if (opId == hist.lastSelOp ||
                                                                                                                                                                                                        (origin && hist.lastSelOrigin == origin &&
                                                                                                                                                                                                         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
                                                                                                                                                                                                          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
                                                                                                                                                                                                      { hist.done[hist.done.length - 1] = sel }
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                        if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
                                                                                                                                                                                                            fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
                                                                                                                                                                                                          { return true }
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                        if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                          if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
                                                                                                                                                                                                              cmp(minPos(curAnchor, curFocus), from) == 0 &&
                                                                                                                                                                                                              cmp(maxPos(curAnchor, curFocus), to) == 0)
                                                                                                                                                                                                            { return }
                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 40 mins to fix

                                                                                                                                                                                                          Function conflictingCollapsedRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                          function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                            Function skipAtomicInner has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                            function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                              Function markText has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                              function markText(doc, from, to, options, type) {
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                Function extendSelection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                function extendSelection(doc, head, other, options, extend) {
                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                  Function insertLineWidgetsFor has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                  function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                    Function endOfLine has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                    function endOfLine(visually, cm, lineObj, lineNo, dir) {
                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                      Function coordsCharInner has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                      function coordsCharInner(cm, lineObj, lineNo, x, y) {
                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                        Function measureCharPrepared has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                        function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                          Function charCoords has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                          function charCoords(cm, pos, context, lineObj, bias) {
                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                            Function replaceRange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                            function replaceRange(doc, code, from, to, origin) {
                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                              Function applyTextInput has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                              function applyTextInput(cm, inserted, deleted, sel, origin) {
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                Function countColumn has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                function countColumn(string, end, tabSize, startIndex, startValue) {
                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                  Function intoCoordSystem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                  function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                    Function skipAtomic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                    function skipAtomic(doc, pos, oldPos, bias, mayClear) {
                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                      Function findPosH has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                      function findPosH(doc, pos, dir, unit, visually) {
                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                        Function PosWithInfo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                        function PosWithInfo(line, ch, sticky, outside, xRel) {
                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                          Function markTextShared has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                          function markTextShared(doc, from, to, options, type) {
                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                            Function Doc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                            var Doc = function(text, mode, firstLine, lineSep, direction) {
                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                              Function handleMappedButton has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                              function handleMappedButton(cm, button, pos, repeat, event) {
                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                                Function addWidget has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                    addWidget: function(pos, node, scroll, vert, horiz) {
                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                                  Function domTextBetween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                  function domTextBetween(cm, from, to, fromLine, toLine) {
                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 35 mins to fix

                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                          if (result) { return result }
                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                            { return badPos(Pos(found.line, found.ch + dist$1), bad) }
                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                            else if (code == 0x200c) { return "b" }
                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                              if ( returned ) return returned.v;
                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                else { return "L" }
                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                return true
                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                              Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                    return new Pos(pos.line, pos.ch + dir)
                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                    return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)
                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                  Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                        else if (0x2000 <= code && code <= 0x200b) { return "w" }
                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                    Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                          if (res) { return res }
                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                      Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                          if (handleCharBinding(cm, e, ch)) { return }
                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                        Found in frontend/public/js/codemirror.js - About 30 mins to fix

                                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                            return null
                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                          Found in frontend/public/js/codemirror.js - About 30 mins to fix

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

                                                                                                                                                                                                                                                                              var sPos = calculateScrollPos(cm, {
                                                                                                                                                                                                                                                                                left: Math.min(from.left, to.left),
                                                                                                                                                                                                                                                                                top: Math.min(from.top, to.top) - margin,
                                                                                                                                                                                                                                                                                right: Math.max(from.right, to.right),
                                                                                                                                                                                                                                                                                bottom: Math.max(from.bottom, to.bottom) + margin
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3394..3397

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 98.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                rect = {left: Math.min(coords.left, endCoords.left),
                                                                                                                                                                                                                                                                                        top: Math.min(coords.top, endCoords.top) - margin,
                                                                                                                                                                                                                                                                                        right: Math.max(coords.left, endCoords.left),
                                                                                                                                                                                                                                                                                        bottom: Math.max(coords.bottom, endCoords.bottom) + margin}
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3493..3498

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 98.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                            NativeScrollbars.prototype.setScrollTop = function (pos) {
                                                                                                                                                                                                                                                                              if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos }
                                                                                                                                                                                                                                                                              if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert") }
                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3607..3610

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                            NativeScrollbars.prototype.setScrollLeft = function (pos) {
                                                                                                                                                                                                                                                                              if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos }
                                                                                                                                                                                                                                                                              if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz") }
                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3612..3615

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                linkedDocs(doc, function (doc, sharedHist) {
                                                                                                                                                                                                                                                                                  if (!sharedHist && indexOf(rebased, doc.history) == -1) {
                                                                                                                                                                                                                                                                                    rebaseHist(doc.history, change)
                                                                                                                                                                                                                                                                                    rebased.push(doc.history)
                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 5214..5220

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 84.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              linkedDocs(doc, function (doc, sharedHist) {
                                                                                                                                                                                                                                                                                if (!sharedHist && indexOf(rebased, doc.history) == -1) {
                                                                                                                                                                                                                                                                                  rebaseHist(doc.history, change)
                                                                                                                                                                                                                                                                                  rebased.push(doc.history)
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 5282..5288

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 84.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              if (sizes.right && sizes.bottom) {
                                                                                                                                                                                                                                                                                d.scrollbarFiller.style.display = "block"
                                                                                                                                                                                                                                                                                d.scrollbarFiller.style.height = sizes.bottom + "px"
                                                                                                                                                                                                                                                                                d.scrollbarFiller.style.width = sizes.right + "px"
                                                                                                                                                                                                                                                                              } else { d.scrollbarFiller.style.display = "" }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3683..3687

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 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

                                                                                                                                                                                                                                                                              if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
                                                                                                                                                                                                                                                                                d.gutterFiller.style.display = "block"
                                                                                                                                                                                                                                                                                d.gutterFiller.style.height = sizes.bottom + "px"
                                                                                                                                                                                                                                                                                d.gutterFiller.style.width = measure.gutterWidth + "px"
                                                                                                                                                                                                                                                                              } else { d.gutterFiller.style.display = "" }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3678..3682

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                              for (var i = 0; i < chunk.lines.length; ++i) {
                                                                                                                                                                                                                                                                                var line = chunk.lines[i]
                                                                                                                                                                                                                                                                                if (line == lineObj) { break }
                                                                                                                                                                                                                                                                                else { h += line.height }
                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 867..871

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 73.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
                                                                                                                                                                                                                                                                                  var cur = p.children[i$1]
                                                                                                                                                                                                                                                                                  if (cur == chunk) { break }
                                                                                                                                                                                                                                                                                  else { h += cur.height }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 861..865

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 73.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                if (scrollPos.scrollLeft != null) {
                                                                                                                                                                                                                                                                                  setScrollLeft(cm, scrollPos.scrollLeft)
                                                                                                                                                                                                                                                                                  if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3400..3403

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

                                                                                                                                                                                                                                                                            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 (scrollPos.scrollTop != null) {
                                                                                                                                                                                                                                                                                  updateScrollTop(cm, scrollPos.scrollTop)
                                                                                                                                                                                                                                                                                  if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3404..3407

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
                                                                                                                                                                                                                                                                                                                    headPos.top + lineOff.top - wrapOff.top))
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9297..9298

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
                                                                                                                                                                                                                                                                                                                     headPos.left + lineOff.left - wrapOff.left))
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9295..9296

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

                                                                                                                                                                                                                                                                            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 (cur.from == ch) {
                                                                                                                                                                                                                                                                                  if (cur.from != cur.to && sticky != "before") { found = i }
                                                                                                                                                                                                                                                                                  else { bidiOther = i }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 934..937

                                                                                                                                                                                                                                                                            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 (cur.to == ch) {
                                                                                                                                                                                                                                                                                  if (cur.from != cur.to && sticky == "before") { found = i }
                                                                                                                                                                                                                                                                                  else { bidiOther = i }
                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 938..941

                                                                                                                                                                                                                                                                            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 (dto > 0 || !mk.inclusiveRight && !dto)
                                                                                                                                                                                                                                                                                    { newParts.push({from: m.to, to: p.to}) }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 689..690

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

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone } }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 6200..6200

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

                                                                                                                                                                                                                                                                            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 (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 773..773

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

                                                                                                                                                                                                                                                                            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 (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
                                                                                                                                                                                                                                                                                    { newParts.push({from: p.from, to: m.from}) }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 691..692

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

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done } }
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 6201..6201

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                    fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 772..772

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

                                                                                                                                                                                                                                                                            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(te, "paste", function (e) {
                                                                                                                                                                                                                                                                                if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                cm.state.pasteIncoming = true
                                                                                                                                                                                                                                                                                input.fastPoll()
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9250..9254

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 54.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              on(display.scroller, "paste", function (e) {
                                                                                                                                                                                                                                                                                if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
                                                                                                                                                                                                                                                                                cm.state.pasteIncoming = true
                                                                                                                                                                                                                                                                                input.focus()
                                                                                                                                                                                                                                                                              })
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9221..9226

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 54.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                if (found)
                                                                                                                                                                                                                                                                                  { return badPos(Pos(found.line, found.ch - dist), bad) }
                                                                                                                                                                                                                                                                                else
                                                                                                                                                                                                                                                                                  { dist += after.textContent.length }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9179..9182

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                if (found)
                                                                                                                                                                                                                                                                                  { return badPos(Pos(found.line, found.ch + dist$1), bad) }
                                                                                                                                                                                                                                                                                else
                                                                                                                                                                                                                                                                                  { dist$1 += before.textContent.length }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9172..9175

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                this.vert.firstChild.style.height =
                                                                                                                                                                                                                                                                                  Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3592..3593

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                this.horiz.firstChild.style.width =
                                                                                                                                                                                                                                                                                  Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3580..3581

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 2242..2242

                                                                                                                                                                                                                                                                            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 textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 2194..2194

                                                                                                                                                                                                                                                                            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 screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3439..3439

                                                                                                                                                                                                                                                                            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 screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3427..3427

                                                                                                                                                                                                                                                                            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 (ie && ie_version < 9) { content.appendChild(elt("span", [txt])) }
                                                                                                                                                                                                                                                                                    else { content.appendChild(txt) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1924..1925

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

                                                                                                                                                                                                                                                                            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 (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])) }
                                                                                                                                                                                                                                                                                    else { content.appendChild(txt$1) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1902..1903

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

                                                                                                                                                                                                                                                                            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 (builder.pre.className)
                                                                                                                                                                                                                                                                                { builder.textClass = joinClasses(builder.pre.className, builder.textClass || "") }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 2 other locations - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1839..1840
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1841..1842

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 5100..5100

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

                                                                                                                                                                                                                                                                                  if (line.styleClasses.textClass)
                                                                                                                                                                                                                                                                                    { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "") }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 2 other locations - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1839..1840
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1867..1868

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

                                                                                                                                                                                                                                                                                  if (line.styleClasses.bgClass)
                                                                                                                                                                                                                                                                                    { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "") }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 2 other locations - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1841..1842
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 1867..1868

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                              if (cm.display.scrollbars.addClass)
                                                                                                                                                                                                                                                                                { addClass(cm.display.wrapper, cm.display.scrollbars.addClass) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3695..3696

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                if (cm.display.scrollbars.addClass)
                                                                                                                                                                                                                                                                                  { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3710..3711

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                    (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 5099..5099

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                              if (needsV) {
                                                                                                                                                                                                                                                                                this.vert.style.display = "block"
                                                                                                                                                                                                                                                                                this.vert.style.bottom = needsH ? sWidth + "px" : "0"
                                                                                                                                                                                                                                                                                var totalHeight = measure.viewHeight - (needsH ? sWidth : 0)
                                                                                                                                                                                                                                                                                // A bug in IE8 can cause this value to be negative, so guard it.
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3587..3597

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                while (cutFront && cutFront > from.ch &&
                                                                                                                                                                                                                                                                                       newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 8957..8958

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                              while (cutEnd < maxCutEnd &&
                                                                                                                                                                                                                                                                                     newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 8962..8963

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

                                                                                                                                                                                                                                                                            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 (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
                                                                                                                                                                                                                                                                                    { updateWidgetHeight(cur.rest[j]) } }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 9094..9095

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

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              for (var i = 0; i < spans.length; ++i)
                                                                                                                                                                                                                                                                                { spans[i].marker.detachLine(line) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 710..711

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

                                                                                                                                                                                                                                                                            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 (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
                                                                                                                                                                                                                                                                                    { break }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 4271..4274

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

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                              for (var i = 0; i < spans.length; ++i)
                                                                                                                                                                                                                                                                                { spans[i].marker.attachLine(line) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 704..705

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

                                                                                                                                                                                                                                                                            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 (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
                                                                                                                                                                                                                                                                                update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo)
                                                                                                                                                                                                                                                                                cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo
                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 4258..4259

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

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                  for (var i = 0; i < node.childNodes.length; i++)
                                                                                                                                                                                                                                                                                    { walk(node.childNodes[i]) }
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3277..3278

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

                                                                                                                                                                                                                                                                            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 (needsH) {
                                                                                                                                                                                                                                                                                this.horiz.style.display = "block"
                                                                                                                                                                                                                                                                                this.horiz.style.right = needsV ? sWidth + "px" : "0"
                                                                                                                                                                                                                                                                                this.horiz.style.left = measure.barLeft + "px"
                                                                                                                                                                                                                                                                                var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0)
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 3575..3585

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

                                                                                                                                                                                                                                                                            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

                                                                                                                                                                                                                                                                                  var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
                                                                                                                                                                                                                                                                                  ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 571..571
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 573..574
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 583..583

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 45.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh)
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 571..571
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 573..574
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 585..586

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 45.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh)
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 573..574
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 583..583
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 585..586

                                                                                                                                                                                                                                                                            Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                            Tuning

                                                                                                                                                                                                                                                                            This issue has a mass of 45.

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

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

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

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

                                                                                                                                                                                                                                                                            Refactorings

                                                                                                                                                                                                                                                                            Further Reading

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

                                                                                                                                                                                                                                                                                  var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
                                                                                                                                                                                                                                                                                  ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to))
                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                            Found in frontend/public/js/codemirror.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 571..571
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 583..583
                                                                                                                                                                                                                                                                            frontend/public/js/codemirror.js on lines 585..586

                                                                                                                                                                                                                                                                            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