Showing 224 of 303 total issues
Function style
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
style: function(elem, name, value, extra) {
// Don't set styles on text and comment nodes
if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
return;
Function stop
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function(type, clearQueue, gotoEnd) {
var stopQueue = function(hooks) {
var stop = hooks.stop;
delete hooks.stop;
stop(gotoEnd);
Method main
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
Method createAd
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@PostMapping("/createAd")
public String createAd(@RequestParam(name = "payment_method", required = true) String payment_method,
@RequestParam(name = "ad_time", required = true) String time_choosed,
@RequestParam(name = "starting_time", required = true) Date starting_time,
@RequestParam(name = "file", required = true) MultipartFile file, HttpSession session, Model model)
Function adjustCSS
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustCSS(elem, prop, valueParts, tween) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
Function access
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
var i = 0,
len = elems.length,
bulk = key == null;
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function on(elem, types, selector, data, fn, one) {
var origFn, type;
// Types can be a map of types/handlers
if (typeof types === "object") {
Function toggleClass
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function(value, stateVal) {
var type = typeof value,
isValidValue = type === "string" || Array.isArray(value);
if (typeof stateVal === "boolean" && isValidValue) {
Method addMember
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
@PostMapping(value = "/group/addMember/{username}/{idGroup}", consumes = MediaType.ALL_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<TrawellGroup> addMember(@PathVariable(required = true, name = "username") String username,
@PathVariable(required = true, name = "idGroup") Long idGroup, HttpSession session) {
User user = (User) session.getAttribute("user");
TrawellGroup updatedGroup = 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
Function dispatch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dispatch: function(nativeEvent) {
// Make a writable jQuery.Event from the native event object
var event = jQuery.event.fix(nativeEvent);
Function getElements
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Dropzone.getElements = function (els, name) {
var el = void 0,
elements = void 0;
if (els instanceof Array) {
elements = [];
Function _addFilesFromDirectory
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function _addFilesFromDirectory(directory, path) {
var _this6 = this;
var dirReader = directory.createReader();
Function contentLoaded
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var contentLoaded = function contentLoaded(win, fn) {
var done = false;
var top = true;
var doc = win.document;
var root = doc.documentElement;
Function ajaxHandleResponses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ajaxHandleResponses(s, jqXHR, responses) {
var ct, type, finalDataType, firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
Function _addFormElementData
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function _addFormElementData(formData) {
// Take care of other input elements
if (this.element.tagName === "FORM") {
for (var _iterator24 = this.element.querySelectorAll("input, textarea, select, button"), _isArray24 = true, _i26 = 0, _iterator24 = _isArray24 ? _iterator24 : _iterator24[Symbol.iterator]();;) {
var _ref23;
Function decode64
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function decode64(input) {
var output = '';
var chr1 = undefined;
var chr2 = undefined;
var chr3 = '';
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Function boxModelAdjustment
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
delta = 0;
Function _addFilesFromItems
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function _addFilesFromItems(items) {
var _this5 = this;
return function () {
var result = [];
Function handlers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function(event, handlers) {
var i, handleObj, sel, matchedHandlers, matchedSelectors,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;