insideout10/wordlift-plugin-js

View on GitHub
app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js

Summary

Maintainability
F
1 wk
Test Coverage

File editor_template_src.js has 1087 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * editor_template_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.

    Function _nodeChanged has 188 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _nodeChanged : function(ed, cm, n, co, ob) {
                var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
    
                tinymce.each(t.stateControls, function(c) {
                    cm.setActive(c, ed.queryCommandState(t.controls[c][1]));

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

              init : function(ed, url) {
                  var t = this, s, v, o;
      
                  t.editor = ed;
                  t.url = url;

        Function _createStyleSelect has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _createStyleSelect : function(n) {
                    var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
        
                    // Setup style select box
                    ctrl = ctrlMan.createListBox('styleselect', {

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

                  renderUI : function(o) {
                      var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
          
                      if (ed.settings) {
                          ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');

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

                    _addStatusBar : function(tb, o) {
                        var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
            
                        n = DOM.add(tb, 'tr');
                        n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});

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

                  function getPreviewCss(ed, fmt) {
                      var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
              
                      previewStyles = ed.settings.preview_styles;
              

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

                        _simpleLayout : function(s, tb, o, p) {
                            var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
                
                            if (s.readonly) {
                                n = DOM.add(tb, 'tr');

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

                          _createFontSizeSelect : function() {
                              var t = this, ed = t.editor, c, i = 0, cl = [];
                  
                              c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
                                  var cur = c.items[c.selectedIndex];

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

                            _createBlockFormats : function() {
                                var c, fmts = {
                                    p : 'advanced.paragraph',
                                    address : 'advanced.address',
                                    pre : 'advanced.pre',

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

                                  c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
                                      var cur = c.items[c.selectedIndex];
                      
                                      if (!v && cur) {
                                          cur = cur.value;

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

                                _rowLayout : function(s, tb, o) {
                                    var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
                        
                                    dc = s.theme_advanced_containers_default_class || '';
                                    da = s.theme_advanced_containers_default_align || 'center';

                          Consider simplifying this complex logical expression.
                          Open

                                      if (c = cm.get('link')) {
                                          c.setDisabled((!p && co) || (p && !p.href));
                                          c.setActive(!!p && (!p.name && !p.id));
                                      }
                          Severity: Major
                          Found in app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js - About 40 mins to fix

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

                                    _nodeChanged : function(ed, cm, n, co, ob) {
                            Severity: Minor
                            Found in app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js - About 35 mins to fix

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

                                      _createBackColorMenu : function() {
                                          var c, t = this, s = t.settings, o = {}, v;
                              
                                          if (s.theme_advanced_more_colors) {
                                              o.more_colors_func = function() {
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 562..589

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 215.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      _createForeColorMenu : function() {
                                          var c, t = this, s = t.settings, o = {}, v;
                              
                                          if (s.theme_advanced_more_colors) {
                                              o.more_colors_func = function() {
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 591..618

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 215.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      _mceInsertAnchor : function(ui, v) {
                                          var ed = this.editor;
                              
                                          ed.windowManager.open({
                                              url : this.url + '/anchor.htm',
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1438..1449

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 112.

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

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

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

                                      _mceLink : function(ui, val) {
                                          var ed = this.editor;
                              
                                          ed.windowManager.open({
                                              url : this.url + '/link.htm',
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1337..1348

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 112.

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

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

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

                                      _mceForeColor : function() {
                                          var t = this;
                              
                                          this._mceColorPicker(0, {
                                              color: t.fgColor,
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1472..1482

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 78.

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

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

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

                                      _mceBackColor : function() {
                                          var t = this;
                              
                                          this._mceColorPicker(0, {
                                              color: t.bgColor,
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1460..1470

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 78.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              function updateColor(controlId, color) {
                                                  if (c = cm.get(controlId)) {
                                                      if (!color)
                                                          color = c.settings.default_color;
                                                      if (color !== c.value) {
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1190..1198

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 76.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              function updateColor(controlId, color) {
                                                  if (c = cm.get(controlId)) {
                                                      if (!color)
                                                          color = c.settings.default_color;
                                                      if (color !== c.value) {
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1204..1212

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 76.

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

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

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

                                      _mceShortcuts : function() {
                                          var ed = this.editor;
                                          ed.windowManager.open({
                                              url: this.url + '/shortcuts.htm',
                                              width: 480,
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1363..1374

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 76.

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

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

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

                                      _mceHelp : function() {
                                          var ed = this.editor;
                              
                                          ed.windowManager.open({
                                              url : this.url + '/about.htm',
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 1376..1386

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 76.

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

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

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

                                                      DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 249..249

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                                      DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 248..248

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      each(fmt.attributes, function(value, name) {
                                          value = removeVars(value);
                              
                                          if (value)
                                              dom.setAttrib(previewElm, name, value);
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 38..43

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 51.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      each(fmt.styles, function(value, name) {
                                          value = removeVars(value);
                              
                                          if (value)
                                              dom.setStyle(previewElm, name, value);
                              app/lib/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js on lines 46..51

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 51.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      getInfo : function() {
                                          return {
                                              longname : 'Advanced theme',
                                              author : 'Moxiecode Systems AB',
                                              authorurl : 'http://tinymce.moxiecode.com',
                              app/lib/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js on lines 73..80

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 50.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                          if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
                                              return;
                              app/lib/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js on lines 17..18

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 46.

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

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

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

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

                              Refactorings

                              Further Reading

                              There are no issues that match your filters.

                              Category
                              Status