Showing 206 of 206 total issues
File bootstrap-datepicker.js
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
PasswordBase
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class PasswordBase
implements Comparable<PasswordBase>, AccessControledObject {
/**
* Number of millisecons in a day.
Method create
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
void create()
throws SQLException, UnsupportedEncodingException, GeneralSecurityException {
AuthenticationSourcesTable.getInstance().create();
ConfigurationTable.getInstance().create();
EventLogTable.getInstance().create();
- 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
PasswordRestriction
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
public class PasswordRestriction
implements Serializable {
private static final String NO_LIMITS_STRING = "There are no restrictions on the contents of the password.";
User
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public final class User
implements Comparable<User>, EntityWithAccessRights, AccessControlDecryptor {
/**
* The size of the group access key in bits.
File UserDAO.java
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2017 Carbon Security Ltd. <opensource@carbonsecurity.co.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
File HierarchyNodeDAO.java
has 277 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2017 Carbon Security Ltd. <opensource@carbonsecurity.co.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
File UpdateAccess.java
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2017 Carbon Security Ltd. <opensource@carbonsecurity.co.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Function click
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
click: function(e) {
e.stopPropagation();
e.preventDefault();
var target = $(e.target).closest('span, td, th');
if (target.length === 1) {
Method getDefaultPermissionsForNodeIncludingInherited
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public void getDefaultPermissionsForNodeIncludingInherited(final String nodeId,
final Map<String,PasswordPermission> userPermMap,
final Map<String,PasswordPermission> groupPermMap)
throws SQLException, GeneralSecurityException {
if( nodeId == null )
- 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 doGet
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException {
try {
User remoteUser = SecurityUtils.getRemoteUser(request);
HierarchyNodeDAO
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
public final class HierarchyNodeDAO
extends StoredObjectManipulator<HierarchyNode> {
/**
* The shared root node.
Function fill
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
fill: function() {
var d = new Date(this.viewDate),
year = d.getFullYear(),
month = d.getMonth(),
currentDate = this.date.valueOf();
Method doEndTag
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public int doEndTag() {
try {
String day;
String month;
String year;
- 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 run
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public void run() {
long startTime = System.currentTimeMillis();
int searchTextLength = text.length();
StringBuilder textHold = new StringBuilder( searchTextLength );
- 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 doGet
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
// Check to see if the login screen was a diversion from
// the original request.
- 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 doGet
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
// Check to see if the login screen was a diversion from
// the original request.
Function Datepicker
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Datepicker = function(element, options){
this.element = $(element);
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
this.picker = $(DPGlobal.template)
.appendTo('body')
File UserServlet.java
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2017 Carbon Security Ltd. <opensource@carbonsecurity.co.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
File EditHierarchy.java
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2017 Carbon Security Ltd. <opensource@carbonsecurity.co.uk>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above