Code Duplication    Length = 17-17 lines in 2 locations

public/js/tinymce/plugins/searchreplace/plugin.js 1 location

@@ 241-257 (lines=17) @@
238
      }
239
      node.parentNode.removeChild(node);
240
    };
241
    var findSpansByIndex = function (editor, index) {
242
      var nodes;
243
      var spans = [];
244
      nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
245
      if (nodes.length) {
246
        for (var i = 0; i < nodes.length; i++) {
247
          var nodeIndex = getElmIndex(nodes[i]);
248
          if (nodeIndex === null || !nodeIndex.length) {
249
            continue;
250
          }
251
          if (nodeIndex === index.toString()) {
252
            spans.push(nodes[i]);
253
          }
254
        }
255
      }
256
      return spans;
257
    };
258
    var moveSelection = function (editor, currentIndexState, forward) {
259
      var testIndex = currentIndexState.get();
260
      var dom = editor.dom;

public/js/tinymce/plugins/spellchecker/plugin.js 1 location

@@ 492-508 (lines=17) @@
489
      }
490
      return value;
491
    };
492
    var findSpansByIndex = function (editor, index) {
493
      var nodes;
494
      var spans = [];
495
      nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
496
      if (nodes.length) {
497
        for (var i = 0; i < nodes.length; i++) {
498
          var nodeIndex = getElmIndex(nodes[i]);
499
          if (nodeIndex === null || !nodeIndex.length) {
500
            continue;
501
          }
502
          if (nodeIndex === index.toString()) {
503
            spans.push(nodes[i]);
504
          }
505
        }
506
      }
507
      return spans;
508
    };
509
    var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
510
      var suggestions, hasDictionarySupport;
511
      if (typeof data !== 'string' && data.words) {