ncbo/bioportal_web_ui

View on GitHub

Showing 630 of 630 total issues

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

(function($) {
  $(function() {
    jQuery.bp_autocomplete = function(input, options) {
      // Create a link to self
      var me = this;
Severity: Major
Found in public/javascripts/bp_crossdomain_autocomplete.js and 1 other location - About 1 mo to fix
app/assets/javascripts/bp_crossdomain_autocomplete.js on lines 4..533

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

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($) {
  $(function() {
    jQuery.bp_autocomplete = function(input, options) {
      // Create a link to self
      var me = this;
Severity: Major
Found in app/assets/javascripts/bp_crossdomain_autocomplete.js and 1 other location - About 1 mo to fix
public/javascripts/bp_crossdomain_autocomplete.js on lines 4..533

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

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

File virtual_from_version.rb has 7144 lines of code (exceeds 250 allowed). Consider refactoring.
Open

BPIDResolver::VIRTUAL_FROM_VERSION = {
  "old:virtual_from_version:40876" => 1048,
  "old:virtual_from_version:44059" => 1125,
  "old:virtual_from_version:46266" => 1172,
  "old:virtual_from_version:44870" => 1077,
Severity: Major
Found in lib/resolver/virtual_from_version.rb - About 2 wks to fix

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

    lunr.stemmer = (function(){
      var step2list = {
          "ational" : "ate",
          "tional" : "tion",
          "enci" : "ence",
    Severity: Major
    Found in public/browse/lib/lunr.js/lunr.js and 1 other location - About 1 wk to fix
    public/browse/lib/lunr.js/lib/stemmer.js on lines 16..188

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

    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

    lunr.stemmer = (function(){
      var step2list = {
          "ational" : "ate",
          "tional" : "tion",
          "enci" : "ence",
    Severity: Major
    Found in public/browse/lib/lunr.js/lib/stemmer.js and 1 other location - About 1 wk to fix
    public/browse/lib/lunr.js/lunr.js on lines 1313..1485

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

    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 update_annotations_table(rowsArray) {
      "use strict";
      var ontologies = {},
        classes = {},
        match_types = {},
    Severity: Major
    Found in app/assets/javascripts/bp_annotatorplus.js and 1 other location - About 5 days to fix
    app/assets/javascripts/bp_annotator.js on lines 646..738

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

    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 update_annotations_table(rowsArray) {
      "use strict";
      var ontologies = {},
        classes = {},
        match_types = {},
    Severity: Major
    Found in app/assets/javascripts/bp_annotator.js and 1 other location - About 5 days to fix
    app/assets/javascripts/bp_annotatorplus.js on lines 748..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 908.

    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

        var setTreeNodes = function(obj, useParent) {
          obj = useParent ? obj.parent() : obj;
          $('li>a', obj).addClass('text').bind('selectstart', function() {
            return false;
          }).click(function() {
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.1.js and 2 other locations - About 4 days to fix
    public/widgets/jquery.ncbo.tree-2.0.0.js on lines 250..309
    public/widgets/jquery.ncbo.tree-2.0.2.js on lines 250..309

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

    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

        var setTreeNodes = function(obj, useParent) {
          obj = useParent ? obj.parent() : obj;
          $('li>a', obj).addClass('text').bind('selectstart', function() {
            return false;
          }).click(function() {
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.0.js and 2 other locations - About 4 days to fix
    public/widgets/jquery.ncbo.tree-2.0.1.js on lines 250..309
    public/widgets/jquery.ncbo.tree-2.0.2.js on lines 250..309

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

    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

        var setTreeNodes = function(obj, useParent) {
          obj = useParent ? obj.parent() : obj;
          $('li>a', obj).addClass('text').bind('selectstart', function() {
            return false;
          }).click(function() {
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.2.js and 2 other locations - About 4 days to fix
    public/widgets/jquery.ncbo.tree-2.0.0.js on lines 250..309
    public/widgets/jquery.ncbo.tree-2.0.1.js on lines 250..309

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

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

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

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

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

    Refactorings

    Further Reading

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

        this.setTreeNodes = function(target, useParent) {
          target = useParent ? target.parent() : target;
          $('li>a', target).addClass('text').bind('selectstart', function() {
            return false;
          }).click(function(){
    Severity: Major
    Found in app/assets/javascripts/bp_property_tree.js and 1 other location - About 4 days to fix
    public/widgets/jquery.ncbo.tree.js on lines 266..325

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

    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

          TREE.setTreeNodes = function(obj, useParent) {
            obj = useParent ? obj.parent() : obj;
            $('li>a', obj).addClass('text').bind('selectstart', function() {
              return false;
            }).click(function(){
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree.js and 1 other location - About 4 days to fix
    app/assets/javascripts/bp_property_tree.js on lines 203..262

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

    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

    lunr.Index.prototype.search = function (query) {
      var queryTokens = this.pipeline.run(lunr.tokenizer(query)),
          queryVector = new lunr.Vector,
          documentSets = [],
          fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0)
    Severity: Major
    Found in public/browse/lib/lunr.js/lunr.js and 1 other location - About 3 days to fix
    public/browse/lib/lunr.js/lib/index.js on lines 285..341

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

    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

    lunr.Index.prototype.search = function (query) {
      var queryTokens = this.pipeline.run(lunr.tokenizer(query)),
          queryVector = new lunr.Vector,
          documentSets = [],
          fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0)
    Severity: Major
    Found in public/browse/lib/lunr.js/lib/index.js and 1 other location - About 3 days to fix
    public/browse/lib/lunr.js/lunr.js on lines 1065..1121

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

    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

    File angular-animate.js has 1105 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * @license AngularJS v1.3.5
     * (c) 2010-2014 Google, Inc. http://angularjs.org
     * License: MIT
     */
    Severity: Major
    Found in public/browse/lib/angular-animate/angular-animate.js - About 2 days to fix

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

          var formatNodes = function(nodes) {
            var holder = $("<span>");
            var ul = $("<ul>")
      
            // Sort by prefLabel
      Severity: Major
      Found in public/widgets/jquery.ncbo.tree-2.0.2.js and 1 other location - About 2 days to fix
      public/widgets/jquery.ncbo.tree-2.0.1.js on lines 130..163

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

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

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

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

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

      Refactorings

      Further Reading

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

          var formatNodes = function(nodes) {
            var holder = $("<span>");
            var ul = $("<ul>")
      
            // Sort by prefLabel
      Severity: Major
      Found in public/widgets/jquery.ncbo.tree-2.0.1.js and 1 other location - About 2 days to fix
      public/widgets/jquery.ncbo.tree-2.0.2.js on lines 130..163

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

      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

      lunr.Index.prototype.add = function (doc, emitEvent) {
        var docTokens = {},
            allDocumentTokens = new lunr.SortedSet,
            docRef = doc[this._ref],
            emitEvent = emitEvent === undefined ? true : emitEvent
      Severity: Major
      Found in public/browse/lib/lunr.js/lib/index.js and 1 other location - About 2 days to fix
      public/browse/lib/lunr.js/lunr.js on lines 921..953

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

      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

      lunr.Index.prototype.add = function (doc, emitEvent) {
        var docTokens = {},
            allDocumentTokens = new lunr.SortedSet,
            docRef = doc[this._ref],
            emitEvent = emitEvent === undefined ? true : emitEvent
      Severity: Major
      Found in public/browse/lib/lunr.js/lunr.js and 1 other location - About 2 days to fix
      public/browse/lib/lunr.js/lib/index.js on lines 141..173

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 430.

      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 get_annotation_rows(annotation, params) {
        "use strict";
        // data independent var declarations
        var
          rows = [],
      Severity: Major
      Found in app/assets/javascripts/bp_annotatorplus.js and 1 other location - About 2 days to fix
      app/assets/javascripts/bp_annotator.js on lines 560..598

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

      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

      Severity
      Category
      Status
      Source
      Language