Showing 4,841 of 7,782 total issues
Method getTokenType
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Type getTokenType(char input, CharClass inputClass) {
switch (inputClass) {
case LITERAL:
return Type.IDENTIFIER;
Method destroy
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void destroy() {
try {
_config.invokeWebAppCleanups();
} catch (Throwable ex) {
log.warn("Failed to invoke webapp cleanups", ex);
Method processEvent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public boolean processEvent(Desktop desktop, Component comp, Event event) {
if (Thread.currentThread() instanceof EventProcessingThreadImpl)
throw new IllegalStateException("processEvent cannot be called in an event thread");
if (_ceased != null)
throw new InternalError("The event thread has beeing stopped. Cause: " + _ceased);
Method setComponent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void setComponent(Component comp) {
_component = comp;
//scope param
_paramResolvers.put(ScopeParam.class, new ParamResolver<Annotation>() {
Method addChildrenLoadBindings0
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addChildrenLoadBindings0(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
final boolean prompt = isPrompt(beforeCmds, afterCmds);
final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
if (prompt) {
Method parseConstraint
has 49 lines of code (exceeds 25 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;
Method setSelectedIndex
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
@SuppressWarnings("rawtypes")
public void setSelectedIndex(int jsel) {
final int isz = _items.size();
final int tsz = _model != null ? _model.getSize() : isz;
if (jsel >= tsz)
Method parseControl
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static int parseControl(Context ctx, Node parent, int from, int to)
throws DspException, IOException, XelException {
int j = from + 2;
if (j + 1 >= to)
throw new DspException(MWeb.DSP_ACTION_NOT_TERMINATED, new Object[] { null, new Integer(ctx.nLines) });
Method importStatic
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void importStatic(String name) throws org.zkoss.zel.ELException {
int lastPeriod = name.lastIndexOf('.');
if (lastPeriod < 0) {
throw new ELException(Util.message(
Method getComponent0
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static final Component getComponent0(IdSpace is, String path) {
Component found = null;
for (int j = 0, k;; j = k + 1) {
k = path.indexOf('/', j);
Method getNotifys
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static Set<Property> getNotifys(Method m, Object base, String prop, Object value, BindContext ctx) {
//TODO, Dennis, do we really need to pass value here?
final Set<Property> notifys = new LinkedHashSet<Property>();
if (m == null)
return notifys;
Method reInitBinder0
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean reInitBinder0(Component comp) {
//ZK-611 have wrong binding on a removed treecell in a template
//if it was detached, ignore it
if (comp.getPage() == null && !(comp instanceof ShadowElement)) {
return false;
Method render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
/* package */@SuppressWarnings({ "unchecked", "rawtypes" })
void render(Listitem item, int index) throws Throwable {
if (item.isLoaded()) {
return; // nothing to do
}
Function select
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
Function configFromStringAndArray
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
Function transformJavadocParam
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function transformJavadocParam(param: DocParamBlock): void {
const { pos: start, end, buffer } = param.blockTag.getTokenSequence().getContainingTextRange();
uselessParamPattern.lastIndex = end;
if (uselessParamPattern.test(buffer)) {
const lineEnd = uselessParamPattern.lastIndex;
Method getTextRelevantStyle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final String getTextRelevantStyle(final String style) {
if (style == null) return null;
if (style.length() == 0) return "";
final StringBuffer sb = new StringBuffer(64);
- 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 getSubstyleIndex
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final int getSubstyleIndex(String style, String substyle) {
if (style == null || substyle == null)
throw new IllegalArgumentException("null");
if (substyle.length() == 0)
throw new IllegalArgumentException("empty substyle");
- 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 checkNamespacePrefix
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final void checkNamespacePrefix(String prefix, Locator loc) {
if (prefix == null || prefix.length() == 0)
return; //OK: null or empty
String reason = 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 load
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final TaglibDefinition load(Element root) throws Exception {
final TaglibDefinition tagdef = new TaglibDefinition();
Exception excp = null;
for (Element e: root.getElements("function")) {
final String name = IDOMs.getRequiredElementValue(e, "name");
- 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"