krafthaus/bauhaus

View on GitHub
bower_components/tinymce/plugins/table/plugin.js

Summary

Maintainability
F
3 wks
Test Coverage

File plugin.js has 2017 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Compiled inline version. (Library mode)
 */

/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
Severity: Major
Found in bower_components/tinymce/plugins/table/plugin.js - About 5 days to fix

    Function Plugin has 307 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function Plugin(editor) {
            var clipboardRows, self = this, dialogs = new Dialogs(editor);
    
            function cmd(command) {
                return function() {
    Severity: Major
    Found in bower_components/tinymce/plugins/table/plugin.js - About 1 day to fix

      Function cell has 177 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              self.cell = function() {
                  var dom = editor.dom, cellElm, data, classListCtrl, cells = [];
      
                  function onSubmitCellForm() {
                      updateStyle(dom, this);
      Severity: Major
      Found in bower_components/tinymce/plugins/table/plugin.js - About 7 hrs to fix

        Function table has 151 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                self.table = function(isProps) {
                    var dom = editor.dom, tableElm, colsCtrl, rowsCtrl, classListCtrl, data = {}, generalTableForm;
        
                    function onSubmitTableForm() {
                        var captionElm;
        Severity: Major
        Found in bower_components/tinymce/plugins/table/plugin.js - About 6 hrs to fix

          Function row has 144 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  self.row = function() {
                      var dom = editor.dom, tableElm, cellElm, rowElm, classListCtrl, data, rows = [], generalRowForm;
          
                      function onSubmitRowForm() {
                          var tableElm, oldParentElm, parentElm;
          Severity: Major
          Found in bower_components/tinymce/plugins/table/plugin.js - About 5 hrs to fix

            Function moveWebKitSelection has 128 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function moveWebKitSelection() {
                        function eventHandler(e) {
                            var key = e.keyCode;
            
                            function handle(upBool, sourceNode) {
            Severity: Major
            Found in bower_components/tinymce/plugins/table/plugin.js - About 5 hrs to fix

              Function eventHandler has 123 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          function eventHandler(e) {
                              var key = e.keyCode;
              
                              function handle(upBool, sourceNode) {
                                  var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
              Severity: Major
              Found in bower_components/tinymce/plugins/table/plugin.js - About 4 hrs to fix

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

                        function merge(cell, cols, rows) {
                            var pos, startX, startY, endX, endY, x, y, startCell, endCell, children, count;
                
                            // Use specified cell and cols/rows
                            if (cell) {
                Severity: Major
                Found in bower_components/tinymce/plugins/table/plugin.js - About 2 hrs to fix

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

                          function insertRow(before) {
                              var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
                  
                              // Find first/last row
                              each(grid, function(row, y) {
                  Severity: Major
                  Found in bower_components/tinymce/plugins/table/plugin.js - About 2 hrs to fix

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

                            function setEndCell(cell) {
                                var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan, x, y;
                    
                                endPos = getPos(cell);
                    
                    
                    Severity: Major
                    Found in bower_components/tinymce/plugins/table/plugin.js - About 2 hrs to fix

                      Function pasteRows has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function pasteRows(rows, before) {
                                  var selectedRows = getSelectedRows(),
                                      targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
                                      targetCellCount = targetRow.cells.length;
                      
                      
                      Severity: Minor
                      Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                function createStyleForm(dom) {
                                    return {
                                        title: 'Advanced',
                                        type: 'form',
                                        defaults: {
                        Severity: Minor
                        Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                  function fixTableCellSelection() {
                                      function tableCellSelected(ed, rng, n, currentCell) {
                                          // The decision of when a table cell is selected is somewhat involved.  The fact that this code is
                                          // required is actually a pointer to the root cause of this bug. A cell is selected when the start
                                          // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
                          Severity: Minor
                          Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                        function onSubmitTableForm() {
                                            var captionElm;
                            
                                            updateStyle(dom, this);
                                            data = Tools.extend(data, this.toJSON());
                            Severity: Minor
                            Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                      function cloneCell(cell) {
                                          var formatNode, cloneFormats = {};
                              
                                          if (editor.settings.table_clone_elements !== false) {
                                              cloneFormats = Tools.makeMap(
                              Severity: Minor
                              Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                            function onSubmitRowForm() {
                                                var tableElm, oldParentElm, parentElm;
                                
                                                updateStyle(dom, this);
                                                data = Tools.extend(data, this.toJSON());
                                Severity: Minor
                                Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

                                  Function insertCol has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function insertCol(before) {
                                              var posX, lastCell;
                                  
                                              // Find first/last column
                                              each(grid, function(row) {
                                  Severity: Minor
                                  Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                            function buildGrid() {
                                                var startY = 0;
                                    
                                                grid = [];
                                                gridWidth = 0;
                                    Severity: Minor
                                    Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                              function fixTableCaretPos() {
                                                  editor.on('KeyDown SetContent VisualAid', function() {
                                                      var last;
                                      
                                                      // Skip empty text nodes from the end
                                      Severity: Minor
                                      Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                                function deleteRows() {
                                                    var rows;
                                        
                                                    function deleteRow(tr) {
                                                        var pos, lastCell;
                                        Severity: Minor
                                        Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                                  function findEndPos() {
                                                      var maxX, maxY;
                                          
                                                      maxX = maxY = 0;
                                          
                                          
                                          Severity: Minor
                                          Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                                        function onSubmitCellForm() {
                                                            updateStyle(dom, this);
                                                            data = Tools.extend(data, this.toJSON());
                                            
                                                            editor.undoManager.transact(function() {
                                            Severity: Minor
                                            Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                                      function cellSelectionHandler(e) {
                                                          var sel, table, target = e.target;
                                              
                                                          if (resizing) {
                                                              return;
                                              Severity: Minor
                                              Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

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

                                                        function cleanup() {
                                                            var rng = dom.createRng(), row;
                                                
                                                            // Empty rows
                                                            each(dom.select('tr', table), function(tr) {
                                                Severity: Minor
                                                Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                                  if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 &&
                                                                      (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) &&
                                                                      last.previousSibling && last.previousSibling.nodeName == "TABLE") {
                                                                      editor.dom.remove(last);
                                                                  }
                                                  Severity: Major
                                                  Found in bower_components/tinymce/plugins/table/plugin.js - About 1 hr to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                if (!dom.hasClass(node, 'mce-item-selected')) {
                                                                                    break;
                                                                                }
                                                    Severity: Major
                                                    Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                  if (rowSpan) {
                                                                                      if (y + rowSpan > maxY) {
                                                                                          maxY = y + rowSpan;
                                                                                      }
                                                                                  }
                                                      Severity: Major
                                                      Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                    if (colSpan) {
                                                                                        if (x + colSpan > maxX) {
                                                                                            maxX = x + colSpan;
                                                                                        }
                                                                                    }
                                                        Severity: Major
                                                        Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                      for (c = 1; c <= cols; c++) {
                                                                                          dom.insertAfter(cloneCell(cell), cell);
                                                                                      }
                                                          Severity: Major
                                                          Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                        if (rowSpan > 1) {
                                                                                            setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
                                                                                            continue;
                                                                                        }
                                                            Severity: Major
                                                            Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                          if (children.length) {
                                                                                              children = Tools.grep(startCell.childNodes);
                                                                                              count = 0;
                                                                                              each(children, function(node) {
                                                                                                  if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) {
                                                              Severity: Major
                                                              Found in bower_components/tinymce/plugins/table/plugin.js - About 45 mins to fix

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

                                                                    function expose(ids) {
                                                                        for (var i = 0; i < ids.length; i++) {
                                                                            var target = exports;
                                                                            var id = ids[i];
                                                                            var fragments = id.split(/[.\/]/);
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 7 hrs to fix
                                                                bower_components/tinymce/plugins/paste/plugin.js on lines 65..81

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 181.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                        function buildListItems(inputList, itemCallback, startItems) {
                                                                            function appendItems(values, output) {
                                                                                output = output || [];
                                                                
                                                                                Tools.each(values, function(item) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 6 hrs to fix
                                                                bower_components/tinymce/plugins/link/plugin.js on lines 33..57

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 166.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (editor.settings.table_adv_tab !== false) {
                                                                                appendStylesToData(dom, data, tableElm);
                                                                
                                                                                editor.windowManager.open({
                                                                                    title: "Table properties",
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 4 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2219..2244

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 132.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (editor.settings.table_row_adv_tab !== false) {
                                                                                appendStylesToData(dom, data, rowElm);
                                                                
                                                                                editor.windowManager.open({
                                                                                    title: "Row properties",
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 4 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1825..1850

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 132.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (editor.settings.table_row_class_list) {
                                                                                classListCtrl = {
                                                                                    name: 'class',
                                                                                    type: 'listbox',
                                                                                    label: 'Class',
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 2 other locations - About 4 hrs to fix
                                                                bower_components/tinymce/plugins/link/plugin.js on lines 229..245
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1947..1963

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 121.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                            if (editor.settings.table_cell_class_list) {
                                                                                classListCtrl = {
                                                                                    name: 'class',
                                                                                    type: 'listbox',
                                                                                    label: 'Class',
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 2 other locations - About 4 hrs to fix
                                                                bower_components/tinymce/plugins/link/plugin.js on lines 229..245
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2163..2179

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 121.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                    function require(ids, callback) {
                                                                        var module, defs = [];
                                                                
                                                                        for (var i = 0; i < ids.length; ++i) {
                                                                            module = modules[ids[i]] || resolve(ids[i]);
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 2 other locations - About 4 hrs to fix
                                                                bower_components/tinymce/plugins/paste/plugin.js on lines 13..26
                                                                bower_components/tinymce/plugins/spellchecker/plugin.js on lines 13..26

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 118.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                        if (cell.real) {
                                                                                            colSpan = cell.colspan - 1;
                                                                                            rowSpan = cell.rowspan - 1;
                                                                
                                                                                            if (colSpan) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 3 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 792..807

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 107.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                        if (cell.real) {
                                                                                            colSpan = cell.colspan - 1;
                                                                                            rowSpan = cell.rowspan - 1;
                                                                
                                                                                            if (colSpan) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 3 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 858..873

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 107.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                    function resolve(id) {
                                                                        var target = exports;
                                                                        var fragments = id.split(/[.\/]/);
                                                                
                                                                        for (var fi = 0; fi < fragments.length; ++fi) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 2 other locations - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/paste/plugin.js on lines 50..63
                                                                bower_components/tinymce/plugins/spellchecker/plugin.js on lines 50..63

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 94.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                for (x = startX; x <= maxX; x++) {
                                                                                    cell = grid[startY][x];
                                                                
                                                                                    if (!cell.real) {
                                                                                        if (startY - (cell.rowspan - 1) < startY) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 832..840

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 91.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                for (y = startY; y <= maxY; y++) {
                                                                                    cell = grid[y][startX];
                                                                
                                                                                    if (!cell.real) {
                                                                                        if (startX - (cell.colspan - 1) < startX) {
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 843..851

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 91.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                    function define(id, dependencies, definition) {
                                                                        if (typeof id !== 'string') {
                                                                            throw 'invalid module definition, module id must be defined and be a string';
                                                                        }
                                                                
                                                                
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 2 other locations - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/paste/plugin.js on lines 28..44
                                                                bower_components/tinymce/plugins/spellchecker/plugin.js on lines 28..44

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 88.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                            {
                                                                                                label: 'H Align',
                                                                                                name: 'align',
                                                                                                type: 'listbox',
                                                                                                text: 'None',
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2026..2039

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 86.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                            {
                                                                                                label: 'V Align',
                                                                                                name: 'valign',
                                                                                                type: 'listbox',
                                                                                                text: 'None',
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 2 hrs to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2012..2025

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 86.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                            menu: [
                                                                                {text: 'Insert column before', onclick: cmd('mceTableInsertColBefore'), onPostRender: postRenderCell},
                                                                                {text: 'Insert column after', onclick: cmd('mceTableInsertColAfter'), onPostRender: postRenderCell},
                                                                                {text: 'Delete column', onclick: cmd('mceTableDeleteCol'), onPostRender: postRenderCell}
                                                                            ]
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2489..2493

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 69.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                            menu: [
                                                                                {text: 'Cell properties', onclick: cmd('mceTableCellProps'), onPostRender: postRenderCell},
                                                                                {text: 'Merge cells', onclick: cmd('mceTableMergeCells'), onPostRender: postRenderCell},
                                                                                {text: 'Split cell', onclick: cmd('mceTableSplitCells'), onPostRender: postRenderCell}
                                                                            ]
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2515..2519

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 69.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                            each('top middle bottom'.split(' '), function(name) {
                                                                                if (editor.formatter.matchNode(cellElm, 'valign' + name)) {
                                                                                    data.valign = name;
                                                                                }
                                                                            });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 3 other locations - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1746..1750
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1935..1939
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2157..2161

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                                                                Open

                                                                                    each('left center right'.split(' '), function(name) {
                                                                                        if (editor.formatter.matchNode(tableElm, 'align' + name)) {
                                                                                            data.align = name;
                                                                                        }
                                                                                    });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 3 other locations - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1935..1939
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1941..1945
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2157..2161

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                                                                Open

                                                                            each('left center right'.split(' '), function(name) {
                                                                                if (editor.formatter.matchNode(cellElm, 'align' + name)) {
                                                                                    data.align = name;
                                                                                }
                                                                            });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 3 other locations - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1746..1750
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1941..1945
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 2157..2161

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
                                                                Open

                                                                            each('left center right'.split(' '), function(name) {
                                                                                if (editor.formatter.matchNode(rowElm, 'align' + name)) {
                                                                                    data.align = name;
                                                                                }
                                                                            });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 3 other locations - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1746..1750
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1935..1939
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1941..1945

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                            each(dom.select('tr', table), function(tr) {
                                                                                if (tr.cells.length === 0) {
                                                                                    dom.remove(tr);
                                                                                }
                                                                            });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 300..304

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                            each(dom.select('thead,tbody,tfoot', table), function(part) {
                                                                                if (part.rows.length === 0) {
                                                                                    dom.remove(part);
                                                                                }
                                                                            });
                                                                Severity: Major
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 1 hr to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 284..288

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                        function unApplyVAlign(elm) {
                                                                            each('top middle bottom'.split(' '), function(name) {
                                                                                editor.formatter.remove('valign' + name, {}, elm);
                                                                            });
                                                                        }
                                                                Severity: Minor
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 55 mins to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1603..1607

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 53.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                        function unApplyAlign(elm) {
                                                                            each('left center right'.split(' '), function(name) {
                                                                                editor.formatter.remove('align' + name, {}, elm);
                                                                            });
                                                                        }
                                                                Severity: Minor
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 55 mins to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1609..1613

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 53.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                        editor.dom.setStyles(cellElm, {
                                                                                            width: addSizeSuffix(data.width),
                                                                                            height: addSizeSuffix(data.height)
                                                                                        });
                                                                Severity: Minor
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 30 mins to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1704..1707

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 45.

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

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

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

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

                                                                Refactorings

                                                                Further Reading

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

                                                                                    editor.dom.setStyles(tableElm, {
                                                                                        width: addSizeSuffix(data.width),
                                                                                        height: addSizeSuffix(data.height)
                                                                                    });
                                                                Severity: Minor
                                                                Found in bower_components/tinymce/plugins/table/plugin.js and 1 other location - About 30 mins to fix
                                                                bower_components/tinymce/plugins/table/plugin.js on lines 1885..1888

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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