Showing 7,775 of 7,775 total issues

Similar blocks of code found in 5 locations. Consider refactoring.
Open

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstMod.java and 4 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/AstDiv.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstMinus.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstMult.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstPlus.java on lines 1..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/parser/AstMinus.java and 4 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/parser/AstDiv.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstMod.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstMult.java on lines 1..41
zel/src/main/java/org/zkoss/zel/impl/parser/AstPlus.java on lines 1..41

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public static Page getCurrentPage(Component comp) {
        if (comp != null) {
            Page page = comp.getPage();
            if (page != null)
                return page;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/Components.java and 1 other location - About 55 mins to fix
zk/src/main/java/org/zkoss/zk/ui/select/SelectorComposer.java on lines 132..140

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    protected Page getPage() {
        if (_self != null) {
            final Page page = _self.getPage();
            if (page != null)
                return page;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/select/SelectorComposer.java and 1 other location - About 55 mins to fix
zk/src/main/java/org/zkoss/zk/ui/Components.java on lines 591..600

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

/* West.java

    Purpose:
        
    Description:
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/West.java and 3 other locations - About 55 mins to fix
zul/src/main/java/org/zkoss/zul/East.java on lines 1..68
zul/src/main/java/org/zkoss/zul/North.java on lines 1..67
zul/src/main/java/org/zkoss/zul/South.java on lines 1..68

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    static {
        if (IS_SECURITY_ENABLED) {
            COERCE_NULL_TO_NULL = AccessController.doPrivileged(
                    new PrivilegedAction<Boolean>(){
                        public Boolean run() {
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 100..118
zel/src/main/java/org/zkoss/zel/impl/util/Validation.java on lines 41..58

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

/* East.java

    Purpose:
        
    Description:
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/East.java and 3 other locations - About 55 mins to fix
zul/src/main/java/org/zkoss/zul/North.java on lines 1..67
zul/src/main/java/org/zkoss/zul/South.java on lines 1..68
zul/src/main/java/org/zkoss/zul/West.java on lines 1..68

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    static {
        if (IS_SECURITY_ENABLED) {
            COERCE_TO_ZERO = AccessController.doPrivileged(
                    new PrivilegedAction<Boolean>(){
                        
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 76..93
zel/src/main/java/org/zkoss/zel/impl/util/Validation.java on lines 41..58

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    static {
        if (IS_SECURITY_ENABLED) {
            SKIP_IDENTIFIER_CHECK = AccessController.doPrivileged(
                    new PrivilegedAction<Boolean>(){
                        
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/util/Validation.java and 2 other locations - About 55 mins to fix
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 76..93
zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 100..118

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public CollectionTemplateDependenceVM() {
        items = new ArrayList<Item>();
        items.add(new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
zktest/src/main/java/org/zkoss/zktest/bind/issue/F00743_1.java on lines 38..45

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public F00743_1() {
        items = new ArrayList<Item>();
        items.add(new Item("A"));
        items.add(new Item("B"));
        items.add(new Item("C"));
Severity: Minor
Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/F00743_1.java and 1 other location - About 55 mins to fix
zktest/src/main/java/org/zkoss/zktest/bind/basic/CollectionTemplateDependenceVM.java on lines 33..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method parse has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    parse(Map<? super String, ? super String> map,
    String src,char pairSeparator, char separator, char quote, boolean asValue,
    boolean parenthesis) throws IllegalSyntaxException {
Severity: Major
Found in zcommon/src/main/java/org/zkoss/util/Maps.java - About 50 mins to fix

    Method parseMultiple has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        parseMultiple(Map<? super String, Collection<String>> map,
        String src, char pairSeparator, char separator, char quote, boolean asValue,
        boolean parenthesis) throws IllegalSyntaxException {
    Severity: Major
    Found in zcommon/src/main/java/org/zkoss/util/Maps.java - About 50 mins to fix

      Method nextSeparator has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static int nextSeparator(String src, int from, char[] separators,
          boolean escBackslash, boolean escQuot, boolean quotAsSeparator,
          boolean parenthesis) {
      Severity: Major
      Found in zcommon/src/main/java/org/zkoss/lang/Strings.java - About 50 mins to fix

        Method createComponents has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public Component[] createComponents(Execution exec, PageDefinition pagedef, Page page, Component parent,
                    Component insertBefore, VariableResolver resolver, Map<?, ?> arg);
        Severity: Major
        Found in zk/src/main/java/org/zkoss/zk/ui/sys/UiEngine.java - About 50 mins to fix

          Method showNotification has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static final void showNotification(String msg, String type, Component ref, int x, int y, int duration,
                      boolean closable) {
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/util/Clients.java - About 50 mins to fix

            Method show has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static void show(String msg, String type, Component ref, int x, int y, int duration,
                                        boolean closable) {
            Severity: Major
            Found in zk/src/main/java/org/zkoss/zk/ui/util/Notification.java - About 50 mins to fix

              Method createComponents has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public Component[] createComponents(Execution exec, PageDefinition pagedef, Page page, Component parent,
                          Component insertBefore, VariableResolver resolver, Map<?, ?> arg) {
              Severity: Major
              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 50 mins to fix

                Method resolveTemplate has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    protected Template resolveTemplate(Component templateComp, Component comp, Object data, int index, int size,
                            String defaultName, String subType) {
                Severity: Major
                Found in zkbind/src/main/java/org/zkoss/bind/impl/AbstractRenderer.java - About 50 mins to fix

                  Method addChildrenLoadBindings has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public void addChildrenLoadBindings(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
                              Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs);
                  Severity: Major
                  Found in zkbind/src/main/java/org/zkoss/bind/Binder.java - About 50 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language