Showing 306 of 628 total issues
File virtual_from_acronym.rb
has 533 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
BPIDResolver::VIRTUAL_FROM_ACRONYM = {
"JERM" => 1488,
"OGSF" => 3214,
"NATPRO" => 3004,
"citation" => 2114,
File application_controller.rb
has 527 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'uri'
require 'net/http'
require 'net/https'
require 'net/ftp'
require 'json'
Function getRecommendations
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
Open
rec.getRecommendations = function() {
rec.hideErrorMessages();
var errors = false;
// Checks if the input text field is empty
if (($("#inputText").val().length == 0) || (rec.emptyInput==true)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
Open
def create
params[:mappings] ||= []
params[:max_level] ||= 0
params[:ontologies] ||= []
params[:semantic_types] ||= []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getRecommendations
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
rec.getRecommendations = function() {
rec.hideErrorMessages();
var errors = false;
// Checks if the input text field is empty
if (($("#inputText").val().length == 0) || (rec.emptyInput==true)) {
Function performAnimation
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
var noopCancel = noop;
var runner = animationRunner(element, animationEvent, className, options);
if (!runner) {
fireDOMOperation();
Function controller
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
controller: ['$scope', '$element', '$attrs', '$interpolate', function ($scope, $element, $attrs, $interpolate)
{
var showHideBinder = function (elm, attr, value)
{
var show = (attr === 'show') ? '' : 'none';
Class ApplicationController
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
helper_method :bp_config_json, :current_license, :using_captcha?
# Pull configuration parameters for REST connection.
Function $get
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {
/**
* @ngdoc service
* @name $route
File bp_crossdomain_autocomplete.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generally we use jQuery as the keyword but some people
// will use another framework which takes control of the $.
// To avoid re-writing this script we'll use a wrapper.
(function($) {
$(function() {
File bp_crossdomain_autocomplete.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generally we use jQuery as the keyword but some people
// will use another framework which takes control of the $.
// To avoid re-writing this script we'll use a wrapper.
(function($) {
$(function() {
Function createHttpBackendMock
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createHttpBackendMock($rootScope, $delegate, $browser) {
var definitions = [],
expectations = [],
responses = [],
responsesPush = angular.bind(responses, responses.push),
File crossdomain_autocomplete.js
has 409 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Generally we use jQuery as the keyword but some people
// will use another framework which takes control of the $.
// To avoid re-writing this script we'll use a wrapper.
(function($) {
$(function() {
Function stemmer
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lunr.stemmer = (function(){
var step2list = {
"ational" : "ate",
"tional" : "tion",
"enci" : "ence",
Function stemmer
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
lunr.stemmer = (function(){
var step2list = {
"ational" : "ate",
"tional" : "tion",
"enci" : "ence",
Function animationRunner
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function animationRunner(element, animationEvent, className, options) {
//transcluded directives may sometimes fire an animation using only comment nodes
//best to catch this early on to prevent any animation operations from occurring
var node = element[0];
if (!node) {
File jquery.ncbo.tree.js
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery SimpleTree Drag&Drop plugin
* Update on 22th May 2008
* Version 0.3
*
Function displayOntologies
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayOntologies(data, ontology) {
var ontTable = null;
if (jQuery.fn.dataTable.isDataTable('#adminOntologies')) {
ontTable = jQuery('#adminOntologies').DataTable();
Function animateRun
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
var node = extractElementNode(element);
var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {
activeAnimationComplete();
File mustache.js
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/