Showing 4,841 of 7,782 total issues
Method processEvent
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private void processEvent(Desktop desktop, Component comp, Event event) {
final Configuration config = desktop.getWebApp().getConfiguration();
if (config.isEventThreadEnabled()) {
EventProcessingThreadImpl evtthd = null;
synchronized (_idles) {
- 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 compare
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
static int compare(Object a, Object b) {
if (a == b) {
return 0;
}
if (a == 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 addFormSaveBindings0
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private void addFormSaveBindings0(Component comp, String formId, String saveExpr, String[] beforeCmds,
String[] afterCmds, Map<String, Object> bindingArgs, String validatorExpr,
Map<String, Object> validatorArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
if (prompt) {
- 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 getAnnotateMethods
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private List<Method> getAnnotateMethods(Binder binder, Class<T> annotationClass, Class<?> vmClass) {
List<Method> methods = null;
synchronized (annoMethodCache) {
//have to synchronized cache, because it calls expunge when get.
methods = annoMethodCache.get(vmClass);
- 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 parseConstraint
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
protected int parseConstraint(String constraint) throws UiException {
if (constraint.equals("no positive"))
return NO_POSITIVE;
else if (constraint.equals("no negative"))
return NO_NEGATIVE;
- 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 insertBefore
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public boolean insertBefore(Component child, Component refChild) {
if (child instanceof North) {
if (!super.insertBefore(child, refChild))
return false;
_north = (North) child;
- 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 encodeRedirectURL
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static final String encodeRedirectURL(ServletContext ctx, HttpServletRequest request,
HttpServletResponse response, String uri, Map params, int mode) {
if (uri == null) {
uri = request.getContextPath() + getOriginFullServlet(request);
} else {
- 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 endOfEL
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
private static int endOfEL(Context ctx, int from, int to) throws DspException {
for (int j = from + 2;; ++j) {
if (j >= to)
throw new DspException(MWeb.EL_NOT_TERMINATED, new Integer(ctx.nLines));
- 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 loadLabels
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private final Map<String, ExValue> loadLabels(Locale locale) {
WaitLock lock = null;
for (;;) {
final Object o;
Method parseSystemConfig
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("deprecation")
private static void parseSystemConfig(Configuration config, Element el) throws Exception {
String s = el.getElementValue("disable-event-thread", true);
if (s != null) {
final boolean enable = "false".equals(s);
Method getDateJavaScript
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final String getDateJavaScript(Locale locale, int firstDayOfWeek) {
final StringBuffer sb = new StringBuffer(512);
final Calendar cal = Calendar.getInstance(locale);
final int twoDigitYearStart = Utils.get2DigitYearStart();
cal.clear();
Function _mouseDown
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
_mouseDown(evt: JQuery.MouseDownEvent<never, never, HTMLElement>): void {
if (this._pressTimer) {
clearInterval(this._pressTimer);
this._pressTimer = undefined;
}
File GroupsListModel.java
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* GroupsListModelImpl.java
Purpose:
Description:
Method service
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void service(HttpServletRequest request, HttpServletResponse response, String pi)
throws ServletException, IOException {
// if (log.isDebugEnabled()) log.debug("View "+pi);
final Session sess = Sessions.getCurrent(false);
if (sess == null) {
Method web0
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void web0(HttpServletRequest request, HttpServletResponse response, String pi, String ext)
throws ServletException, IOException {
if (ext != null) {
//Invoke the resource processor (Extendlet)
final Extendlet extlet = getExtendlet(ext);
StateMachine
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class StateMachine<E, C, IN> {
protected final Map<E, StateCtx<E, C, IN>> _states =
new HashMap<E, StateCtx<E, C, IN>>();
protected E _current;
CommonFns
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class CommonFns {
private static final Logger log = LoggerFactory.getLogger(CommonFns.class);
protected CommonFns() {}
Va10
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class Va10{
private Integer age = 0;
private Integer negativeOne = -1;
private String keyword;
ConfigParser
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public class ConfigParser {
private static final Logger log = LoggerFactory.getLogger(ConfigParser.class);
/** The number of segments in a version.
*/
Binder
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
public interface Binder {
/**
* Component annotation of ZKBind
*/