ncbo/bioportal_web_ui

View on GitHub

Showing 628 of 628 total issues

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

File angular-mocks.js has 946 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-mocks/angular-mocks.js - About 2 days to fix

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

        this.init = function() {
          $TREE_CONTAINER = element;
          TREE = $("<ul>").append($("<li>").addClass("root"));
          ROOT = $('.root', TREE);
          TREE.css("width", OPTIONS.width).addClass(OPTIONS.treeClass);
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.2.js and 2 other locations - About 2 days to fix
    public/widgets/jquery.ncbo.tree-2.0.0.js on lines 357..390
    public/widgets/jquery.ncbo.tree-2.0.1.js on lines 357..390

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

    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

        this.init = function() {
          $TREE_CONTAINER = element;
          TREE = $("<ul>").append($("<li>").addClass("root"));
          ROOT = $('.root', TREE);
          TREE.css("width", OPTIONS.width).addClass(OPTIONS.treeClass);
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.1.js and 2 other locations - About 2 days to fix
    public/widgets/jquery.ncbo.tree-2.0.0.js on lines 357..390
    public/widgets/jquery.ncbo.tree-2.0.2.js on lines 357..390

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

    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

        this.init = function() {
          $TREE_CONTAINER = element;
          TREE = $("<ul>").append($("<li>").addClass("root"));
          ROOT = $('.root', TREE);
          TREE.css("width", OPTIONS.width).addClass(OPTIONS.treeClass);
    Severity: Major
    Found in public/widgets/jquery.ncbo.tree-2.0.0.js and 2 other locations - About 2 days to fix
    public/widgets/jquery.ncbo.tree-2.0.1.js on lines 357..390
    public/widgets/jquery.ncbo.tree-2.0.2.js on lines 357..390

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

    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 bp_admin.js has 867 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Created by mdorf on 3/27/15.
     * Updated by Syphax.Bouazzouni on 28/04/21 , users admin part
     */
    
    
    Severity: Major
    Found in app/assets/javascripts/bp_admin.js - About 2 days to fix

      File lunr.js has 863 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.6
       * Copyright (C) 2014 Oliver Nightingale
       * MIT Licensed
       * @license
      Severity: Major
      Found in public/browse/lib/lunr.js/lunr.js - About 2 days to fix

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

            this.setAjaxNodes = function(node, parentId, successCallback, errorCallback) {
              if (typeof OPTIONS.beforeExpand == 'function') {
                OPTIONS.beforeExpand(node);
              }
              $TREE_CONTAINER.trigger("beforeExpand", node);
        Severity: Major
        Found in app/assets/javascripts/bp_property_tree.js and 1 other location - About 2 days to fix
        public/widgets/jquery.ncbo.tree.js on lines 224..264

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

        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.setAjaxNodes = function(node, parentId, successCallback, errorCallback) {
                if (typeof OPTIONS.beforeExpand == 'function') {
                  OPTIONS.beforeExpand(node);
                }
                $TREE_CONTAINER.trigger("beforeExpand", node);
        Severity: Major
        Found in public/widgets/jquery.ncbo.tree.js and 1 other location - About 2 days to fix
        app/assets/javascripts/bp_property_tree.js on lines 157..201

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

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

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

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

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

        Refactorings

        Further Reading

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

            var setAjaxNodes = function(node, parentId, successCallback, errorCallback) {
              if (typeof OPTIONS.beforeExpand == 'function') {
                OPTIONS.beforeExpand(node);
              }
              $TREE_CONTAINER.trigger("beforeExpand", node);
        Severity: Major
        Found in public/widgets/jquery.ncbo.tree-2.0.0.js and 1 other location - About 2 days to fix
        public/widgets/jquery.ncbo.tree-2.0.1.js on lines 208..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 362.

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

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

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

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

        Refactorings

        Further Reading

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

            var setAjaxNodes = function(node, parentId, successCallback, errorCallback) {
              if (typeof OPTIONS.beforeExpand == 'function') {
                OPTIONS.beforeExpand(node);
              }
              $TREE_CONTAINER.trigger("beforeExpand", node);
        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.0.js on lines 208..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 362.

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

        var filter_matched_classes = {
          init: function() {
            "use strict";
            jQuery("#filter_matched_classes").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotatorplus.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 207..248
        app/assets/javascripts/bp_annotator.js on lines 292..333
        app/assets/javascripts/bp_annotator.js on lines 335..376
        app/assets/javascripts/bp_annotatorplus.js on lines 248..289
        app/assets/javascripts/bp_annotatorplus.js on lines 376..417

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

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

        var filter_classes = {
          init: function() {
            "use strict";
            jQuery("#filter_classes").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotator.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 292..333
        app/assets/javascripts/bp_annotator.js on lines 335..376
        app/assets/javascripts/bp_annotatorplus.js on lines 248..289
        app/assets/javascripts/bp_annotatorplus.js on lines 333..374
        app/assets/javascripts/bp_annotatorplus.js on lines 376..417

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

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

        var filter_match_type = {
          init: function() {
            "use strict";
            jQuery("#filter_match_type").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotator.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 207..248
        app/assets/javascripts/bp_annotator.js on lines 292..333
        app/assets/javascripts/bp_annotatorplus.js on lines 248..289
        app/assets/javascripts/bp_annotatorplus.js on lines 333..374
        app/assets/javascripts/bp_annotatorplus.js on lines 376..417

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

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

        var filter_matched_classes = {
          init: function() {
            "use strict";
            jQuery("#filter_matched_classes").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotator.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 207..248
        app/assets/javascripts/bp_annotator.js on lines 335..376
        app/assets/javascripts/bp_annotatorplus.js on lines 248..289
        app/assets/javascripts/bp_annotatorplus.js on lines 333..374
        app/assets/javascripts/bp_annotatorplus.js on lines 376..417

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

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

        var filter_match_type = {
          init: function() {
            "use strict";
            jQuery("#filter_match_type").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotatorplus.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 207..248
        app/assets/javascripts/bp_annotator.js on lines 292..333
        app/assets/javascripts/bp_annotator.js on lines 335..376
        app/assets/javascripts/bp_annotatorplus.js on lines 248..289
        app/assets/javascripts/bp_annotatorplus.js on lines 333..374

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

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

        var filter_classes = {
          init: function() {
            "use strict";
            jQuery("#filter_classes").bind("click", function(e) {
              bp_popup_init(e)
        Severity: Major
        Found in app/assets/javascripts/bp_annotatorplus.js and 5 other locations - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 207..248
        app/assets/javascripts/bp_annotator.js on lines 292..333
        app/assets/javascripts/bp_annotator.js on lines 335..376
        app/assets/javascripts/bp_annotatorplus.js on lines 333..374
        app/assets/javascripts/bp_annotatorplus.js on lines 376..417

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

        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 createFilterCheckboxes(filter_items, checkbox_class, checkbox_location) {
          "use strict";
          var for_sort = [],
            sorted = [];
        
        
        Severity: Major
        Found in app/assets/javascripts/bp_annotatorplus.js and 1 other location - About 1 day to fix
        app/assets/javascripts/bp_annotator.js on lines 138..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 333.

        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 createFilterCheckboxes(filter_items, checkbox_class, checkbox_location) {
          "use strict";
          var for_sort = [],
            sorted = [];
        
        
        Severity: Major
        Found in app/assets/javascripts/bp_annotator.js and 1 other location - About 1 day to fix
        app/assets/javascripts/bp_annotatorplus.js on lines 179..204

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

        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

        Function bp_autocomplete has 371 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            jQuery.bp_autocomplete = function(input, options) {
              // Create a link to self
              var me = this;
        
              // Create jQuery object for input element
        Severity: Major
        Found in public/javascripts/bp_crossdomain_autocomplete.js - About 1 day to fix
          Severity
          Category
          Status
          Source
          Language