Showing 102 of 183 total issues
Function AtmosphereRequest
has 2082 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AtmosphereRequest: function (options) {
/**
* {Object} Request parameters.
*
File atmosphere-javascript-2.3.2.js
has 2578 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright 2015 Async-IO.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
File watch-1.3.0.js
has 627 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* THIS VERSION 1.3
*
* DEVELOPED BY
* GIL LOPES BUENO
Function _executeRequest
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _executeRequest(request) {
var rq = _request;
if ((request != null) || (typeof (request) !== 'undefined')) {
rq = request;
}
Method build
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public TutorialDelegateBasePhase build(Game game) {
return new Builder(game)
/* Some texts at the beginning */
Function _executeWebSocket
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _executeWebSocket(webSocketOpened) {
_response.transport = "websocket";
var location = _buildWebSocketUrl(_request.url);
Function _local
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _local(request) {
var trace, connector, orphan, name = "atmosphere-" + request.url, connectors = {
storage: function () {
function onstorage(event) {
if (event.key === name && event.newValue) {
Function onreadystatechange
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajaxRequest.onreadystatechange = function () {
_debug("ajaxRequest.onreadystatechange, new state: " + ajaxRequest.readyState);
if (_abortingConnection) {
_debug("onreadystatechange has been ignored due to _abortingConnection flag");
return;
File TutorialStepFactory.java
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
package de.oglimmer.ggo.logic.phase.tutorial;
import java.lang.reflect.InvocationTargetException;
import java.util.function.Consumer;
Function share
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function share() {
var storageService, name = "atmosphere-" + _request.url, servers = {
// Powered by the storage event and the localStorage
// http://www.w3.org/TR/webstorage/#event-storage
storage: function () {
Function _configureIE
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _configureIE(request) {
var rq = _request;
if ((request != null) && (typeof (request) !== 'undefined')) {
rq = request;
}
Function _jsonp
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _jsonp(request) {
// When CORS is enabled, make sure we force the proper transport.
request.transport = "jsonp";
var rq = _request, script;
Function _executeSSE
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _executeSSE(sseOpened) {
_response.transport = "sse";
var location = _buildSSEUrl();
Function _configureXDR
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _configureXDR(request) {
var rq = _request;
if ((request != null) && (typeof (request) !== 'undefined')) {
rq = request;
}
Function open
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open: function () {
var callback = "atmosphere" + (++guid);
function _reconnectOnFailure() {
rq.lastIndex = 0;
Method adjacent
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
Open
public static boolean adjacent(Field a, Field b) {
int thisX = (int) a.getPos().getX();
int thisY = (int) a.getPos().getY();
int fx = (int) b.getPos().getX();
int fy = (int) b.getPos().getY();
- 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 open
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
open: function () {
var iframe = doc.createElement("iframe");
url = _attachHeaders(rq);
if (rq.data !== '') {
Function defineWatcher
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var defineWatcher = function (obj, prop, watcher, level) {
var newWatcher = false;
var isArr = isArray(obj);
if (!obj.watchers) {
Function _f
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _f(response, f) {
switch (response.state) {
case "messageReceived":
_debug("Firing onMessage");
_requestCount = 0;
Function onclose
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_websocket.onclose = function (message) {
_debug("websocket.onclose");
clearTimeout(_request.id);
if (_response.state === 'closed')
return;