zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java

Summary

Maintainability
F
1 mo
Test Coverage

File UiEngineImpl.java has 2078 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* UiEngineImpl.java

    Purpose:
        
    Description:
Severity: Major
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 5 days to fix

    UiEngineImpl has 103 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class UiEngineImpl implements UiEngine {
        /*package*/ static final Logger log = LoggerFactory.getLogger(UiEngineImpl.class);
    
        /** The Web application this engine belongs to. */
        private WebApp _wapp;
    Severity: Major
    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 day to fix

      Method execNewPage0 has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
      Open

          private void execNewPage0(final Execution exec, final PageDefinition pagedef, final Richlet richlet,
                  final Page page, final Writer out) throws IOException {
              //Update the device type first. If this is the second page and not
              //belonging to the same device type, an exception is thrown
              final Desktop desktop = exec.getDesktop();
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 day to fix

      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 execCreate0 has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
      Open

          private static final Component[] execCreate0(CreateInfo ci, NodeInfo parentInfo, Component parent,
                  Component insertBefore) {
              final List<Component> created = new LinkedList<Component>();
              final Page page = ci.page;
              final PageDefinition pagedef = parentInfo.getPageDefinition();
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 day to fix

      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 getNativeContent has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
      Open

          private static final void getNativeContent(CreateInfo ci, StringBuffer sb, Component comp, List<NodeInfo> children,
                  Native.Helper helper) {
              for (NodeInfo meta : children) {
                  if (meta instanceof NativeInfo) {
                      final NativeInfo childInfo = (NativeInfo) meta;
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 7 hrs to fix

      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 execNewPage0 has 181 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void execNewPage0(final Execution exec, final PageDefinition pagedef, final Richlet richlet,
                  final Page page, final Writer out) throws IOException {
              //Update the device type first. If this is the second page and not
              //belonging to the same device type, an exception is thrown
              final Desktop desktop = exec.getDesktop();
      Severity: Major
      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 7 hrs to fix

        Method meterAuClient has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
        Open

            private static void meterAuClient(PerformanceMeter pfmeter, Execution exec, String hdr, boolean complete) {
                for (int j = 0;;) {
                    int k = hdr.indexOf(',', j);
                    String ids = k >= 0 ? hdr.substring(j, k) : j == 0 ? hdr : hdr.substring(j);
        
        
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 6 hrs to fix

        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 execUpdate has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
        Open

            public void execUpdate(Execution exec, List<AuRequest> requests, AuWriter out) throws IOException {
                if (requests == null)
                    throw new IllegalArgumentException();
                //        assert ExecutionsCtrl.getCurrentCtrl() == null:
                //            "Impossible to re-activate for update: old="+ExecutionsCtrl.getCurrentCtrl()+", new="+exec;
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 5 hrs to fix

        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 doActivate has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
        Open

            private static UiVisualizer doActivate(Execution exec, boolean asyncupd, boolean recovering,
                    Object[] resultOfRepeat, int timeout) {
                if (Executions.getCurrent() != null)
                    throw new IllegalStateException("Use doReactivate instead");
                //        assert !recovering || !asyncupd; //Not support both asyncupd and recovering are true yet
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 5 hrs to fix

        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 handleError has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
        Open

            private static final void handleError(Throwable ex, UiVisualizer uv, List<Throwable> errs) {
                final Throwable t = Exceptions.findCause(ex, Expectable.class);
                if (t == null) {
                    if (ex instanceof org.xml.sax.SAXException
                            || ex instanceof org.zkoss.zk.ui.metainfo.PropertyNotFoundException)
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 4 hrs to fix

        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 execCreateChild0 has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

            private static Component execCreateChild0(CreateInfo ci, Component parent, ComponentInfo childInfo,
                    String replaceableText, Component insertBefore) {
                Composer composer = childInfo.resolveComposer(ci.page, parent);
                ComposerExt composerExt = null;
                boolean bPopComposer = false;
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 4 hrs to fix

        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 execUpdate has 102 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public void execUpdate(Execution exec, List<AuRequest> requests, AuWriter out) throws IOException {
                if (requests == null)
                    throw new IllegalArgumentException();
                //        assert ExecutionsCtrl.getCurrentCtrl() == null:
                //            "Impossible to re-activate for update: old="+ExecutionsCtrl.getCurrentCtrl()+", new="+exec;
        Severity: Major
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 4 hrs to fix

          Method init has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

                  private void init() {
                      _uri = null;
                      final List<Object[]> results = new LinkedList<Object[]>();
                      for (int j = 0, len = _fulfill.length();;) {
                          int k = j;
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 3 hrs to fix

          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 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) {
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 3 hrs to fix

          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 resumeAll has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

              private void resumeAll(Desktop desktop, UiVisualizer uv, List<Throwable> errs) {
                  //We have to loop because a resumed thread might resume others
                  while (!_resumed.isEmpty()) { //no need to sync (better performance)
                      final List<EventProcessingThreadImpl> list;
                      synchronized (_resumed) {
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 3 hrs to fix

          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 execSwitch has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

              private static Component[] execSwitch(CreateInfo ci, ZkInfo switchInfo, Component parent, Component insertBefore) {
                  final Page page = ci.page;
                  if (!switchInfo.getChildren().isEmpty()) {
                      final Object switchCond = switchInfo.resolveSwitch(page, parent);
          
          
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 3 hrs to fix

          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 createComponents has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              public Component[] createComponents(Execution exec, PageDefinition pagedef, Page page, Component parent,
                      Component insertBefore, VariableResolver resolver, Map<?, ?> arg) {
                  if (pagedef == null)
                      throw new IllegalArgumentException("pagedef");
          
          
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

          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 execCreateChild0 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static Component execCreateChild0(CreateInfo ci, Component parent, ComponentInfo childInfo,
                      String replaceableText, Component insertBefore) {
                  Composer composer = childInfo.resolveComposer(ci.page, parent);
                  ComposerExt composerExt = null;
                  boolean bPopComposer = false;
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

            Method doActivate has 69 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static UiVisualizer doActivate(Execution exec, boolean asyncupd, boolean recovering,
                        Object[] resultOfRepeat, int timeout) {
                    if (Executions.getCurrent() != null)
                        throw new IllegalStateException("Use doReactivate instead");
                    //        assert !recovering || !asyncupd; //Not support both asyncupd and recovering are true yet
            Severity: Major
            Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

              Method execNonComponent has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                  private static final void execNonComponent(CreateInfo ci, Component comp, Object meta) {
                      final Page page = ci.page;
                      if (meta instanceof AttributesInfo) {
                          final AttributesInfo attrs = (AttributesInfo) meta;
                          if (comp != null)
              Severity: Minor
              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

              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 execCreate0 has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static final Component[] execCreate0(CreateInfo ci, NodeInfo parentInfo, Component parent,
                          Component insertBefore) {
                      final List<Component> created = new LinkedList<Component>();
                      final Page page = ci.page;
                      final PageDefinition pagedef = parentInfo.getPageDefinition();
              Severity: Major
              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                Method mergeResponses has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                    private List<AuResponse> mergeResponses(List<AuResponse> responses) {
                        if (responses.size() >= 2) { // worth merging
                            List<AuSetAttribute> bulk = new LinkedList<>();
                            ListIterator<AuResponse> iterator = responses.listIterator();
                            Object previousDepends = null, currentDepends = null;
                Severity: Minor
                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                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 createComponents has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public Component[] createComponents(Execution exec, PageDefinition pagedef, Page page, Component parent,
                            Component insertBefore, VariableResolver resolver, Map<?, ?> arg) {
                        if (pagedef == null)
                            throw new IllegalArgumentException("pagedef");
                
                
                Severity: Major
                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                  Method visualizeErrors has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private final void visualizeErrors(Execution exec, UiVisualizer uv, List<Throwable> errs) {
                          final StringBuffer sb = new StringBuffer(128);
                          for (Throwable t : errs) {
                              if (sb.length() > 0)
                                  sb.append('\n');
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                  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 desktopDestroyed0 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private void desktopDestroyed0(Desktop desktop) {
                          final Configuration config = _wapp.getConfiguration();
                          if (!_suspended.isEmpty()) { //no need to sync (better performance)
                              final Map<Object, List<EventProcessingThreadImpl>> map;
                              synchronized (_suspended) {
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 2 hrs to fix

                  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 isCaseMatched has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static boolean isCaseMatched(ZkInfo caseInfo, Page page, Component parent, Object switchCond) {
                          if (!caseInfo.withCase())
                              return true; //default clause
                  
                          final Object[] caseValues = caseInfo.resolveCase(page, parent);
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                  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 execCreateChild has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static Component[] execCreateChild(CreateInfo ci, Component parent, ComponentInfo childInfo,
                              ReplaceableText replaceableText, Component insertBefore) {
                          final ComponentDefinition childdef = childInfo.getComponentDefinition();
                          if (childdef.isInlineMacro()) {
                              if (insertBefore != null)
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                  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 handleError has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private static final void handleError(Throwable ex, UiVisualizer uv, List<Throwable> errs) {
                          final Throwable t = Exceptions.findCause(ex, Expectable.class);
                          if (t == null) {
                              if (ex instanceof org.xml.sax.SAXException
                                      || ex instanceof org.zkoss.zk.ui.metainfo.PropertyNotFoundException)
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                    Method visualizeErrors has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private final void visualizeErrors(Execution exec, UiVisualizer uv, List<Throwable> errs) {
                            final StringBuffer sb = new StringBuffer(128);
                            for (Throwable t : errs) {
                                if (sb.length() > 0)
                                    sb.append('\n');
                    Severity: Minor
                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                      Method execCreate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static final Component[] execCreate(CreateInfo ci, NodeInfo parentInfo, Component parent,
                                  Component insertBefore) {
                              String fulfillURI = null;
                              if (parentInfo instanceof ComponentInfo) {
                                  final ComponentInfo pi = (ComponentInfo) parentInfo;
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                      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 processEvent has 41 lines of code (exceeds 25 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) {
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                        Method getNativeContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private static final void getNativeContent(CreateInfo ci, StringBuffer sb, Component comp, List<NodeInfo> children,
                                    Native.Helper helper) {
                                for (NodeInfo meta : children) {
                                    if (meta instanceof NativeInfo) {
                                        final NativeInfo childInfo = (NativeInfo) meta;
                        Severity: Minor
                        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                          Method wait has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public void wait(Object mutex) throws InterruptedException, SuspendNotAllowedException {
                                  if (mutex == null)
                                      throw new IllegalArgumentException("null mutex");
                          
                                  final Thread thd = Thread.currentThread();
                          Severity: Minor
                          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                            Method create has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    public Component[] create(Component parent, Component insertBefore, VariableResolver resolver,
                                            Composer composer) {
                                        final Execution exec = Executions.getCurrent();
                                        final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
                                        final Component[] cs;
                            Severity: Minor
                            Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                              Method execNonComponent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private static final void execNonComponent(CreateInfo ci, Component comp, Object meta) {
                                      final Page page = ci.page;
                                      if (meta instanceof AttributesInfo) {
                                          final AttributesInfo attrs = (AttributesInfo) meta;
                                          if (comp != null)
                              Severity: Minor
                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                Method endUpdate has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public void endUpdate(Execution exec) throws IOException {
                                        final Desktop desktop = exec.getDesktop();
                                        final DesktopCtrl desktopCtrl = (DesktopCtrl) desktop;
                                        final Configuration config = desktop.getWebApp().getConfiguration();
                                        final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                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 wait has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public void wait(Object mutex) throws InterruptedException, SuspendNotAllowedException {
                                        if (mutex == null)
                                            throw new IllegalArgumentException("null mutex");
                                
                                        final Thread thd = Thread.currentThread();
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                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 create has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        public Component[] create(Component parent, Component insertBefore, VariableResolver resolver,
                                                Composer composer) {
                                            final Execution exec = Executions.getCurrent();
                                            final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
                                            final Component[] cs;
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                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 getRetryTimeout has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    private static final int getRetryTimeout() {
                                        if (_retryTimeout == null) {
                                            int v = 0;
                                            final String s = Library.getProperty(Attributes.ACTIVATE_RETRY_DELAY);
                                            if (s != null) {
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                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 endUpdate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public void endUpdate(Execution exec) throws IOException {
                                        final Desktop desktop = exec.getDesktop();
                                        final DesktopCtrl desktopCtrl = (DesktopCtrl) desktop;
                                        final Configuration config = desktop.getWebApp().getConfiguration();
                                        final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                  Method init has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          private void init() {
                                              _uri = null;
                                              final List<Object[]> results = new LinkedList<Object[]>();
                                              for (int j = 0, len = _fulfill.length();;) {
                                                  int k = j;
                                  Severity: Minor
                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                    Method mergeResponses has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        private List<AuResponse> mergeResponses(List<AuResponse> responses) {
                                            if (responses.size() >= 2) { // worth merging
                                                List<AuSetAttribute> bulk = new LinkedList<>();
                                                ListIterator<AuResponse> iterator = responses.listIterator();
                                                Object previousDepends = null, currentDepends = null;
                                    Severity: Minor
                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                      Method desktopDestroyed0 has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private void desktopDestroyed0(Desktop desktop) {
                                              final Configuration config = _wapp.getConfiguration();
                                              if (!_suspended.isEmpty()) { //no need to sync (better performance)
                                                  final Map<Object, List<EventProcessingThreadImpl>> map;
                                                  synchronized (_suspended) {
                                      Severity: Minor
                                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                        Method process has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            private void process(Desktop desktop, Event event) {
                                                //        if (log.finable()) log.finer("Processing event: "+event);
                                        
                                                final Component comp;
                                                if (event instanceof ProxyEvent) {
                                        Severity: Minor
                                        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                        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 recycleDesktop has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public void recycleDesktop(Execution exec, Page page, Writer out) throws IOException {
                                                PerformanceMeter pfmeter = page.getDesktop().getWebApp().getConfiguration().getPerformanceMeter();
                                                final long startTime = pfmeter != null ? System.currentTimeMillis() : 0;
                                                final String pfReqId = pfmeter != null ? meterLoadStart(pfmeter, exec, startTime) : null;
                                        
                                        
                                        Severity: Minor
                                        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                          Method meterAuClient has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              private static void meterAuClient(PerformanceMeter pfmeter, Execution exec, String hdr, boolean complete) {
                                                  for (int j = 0;;) {
                                                      int k = hdr.indexOf(',', j);
                                                      String ids = k >= 0 ? hdr.substring(j, k) : j == 0 ? hdr : hdr.substring(j);
                                          
                                          
                                          Severity: Minor
                                          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                            Method doDeactivate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                private static final void doDeactivate(Execution exec) {
                                                    //        if (log.finerable()) log.finer("Deactivating "+desktop);
                                            
                                                    final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
                                                    final Desktop desktop = exec.getDesktop();
                                            Severity: Minor
                                            Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                              Method recycleDesktop has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  public void recycleDesktop(Execution exec, Page page, Writer out) throws IOException {
                                                      PerformanceMeter pfmeter = page.getDesktop().getWebApp().getConfiguration().getPerformanceMeter();
                                                      final long startTime = pfmeter != null ? System.currentTimeMillis() : 0;
                                                      final String pfReqId = pfmeter != null ? meterLoadStart(pfmeter, exec, startTime) : null;
                                              
                                              
                                              Severity: Minor
                                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                              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 stop has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  public void stop(WebApp wapp) {
                                                      synchronized (_idles) {
                                                          for (EventProcessingThreadImpl thread : _idles)
                                                              thread.cease("Stop application");
                                                          _idles.clear();
                                              Severity: Minor
                                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                              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 resumeAll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  private void resumeAll(Desktop desktop, UiVisualizer uv, List<Throwable> errs) {
                                                      //We have to loop because a resumed thread might resume others
                                                      while (!_resumed.isEmpty()) { //no need to sync (better performance)
                                                          final List<EventProcessingThreadImpl> list;
                                                          synchronized (_resumed) {
                                              Severity: Minor
                                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                                                Method meterAuStart has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private static String meterAuStart(PerformanceMeter pfmeter, Execution exec, long startTime) {
                                                        //Format of ZK-Client-Start:
                                                        //    request-id=time
                                                        String hdr = meterGetData(exec, "ZK-Client-Start");
                                                        if (hdr != null) {
                                                Severity: Minor
                                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 55 mins to fix

                                                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 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 getDestroyTimeout has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      private static final int getDestroyTimeout() {
                                                          if (_destroyTimeout == null) {
                                                              int v = 0;
                                                              final String s = Library.getProperty("org.zkoss.zk.ui.activate.wait.destroy.timeout");
                                                              if (s != null) {
                                                  Severity: Minor
                                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 45 mins to fix

                                                  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 finishUpdate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      public JSONArray finishUpdate(Object ctx, List<Throwable> errs) throws IOException {
                                                          final UpdateInfo ui = (UpdateInfo) ctx;
                                                          final Execution exec = ui.uv.getExecution();
                                                          final Desktop desktop = exec.getDesktop();
                                                  
                                                  
                                                  Severity: Minor
                                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 45 mins to fix

                                                  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 ceaseSuspendedThread has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                  Open

                                                      public boolean ceaseSuspendedThread(Desktop desktop, EventProcessingThread evtthd, String cause) {
                                                          final Map<Object, List<EventProcessingThreadImpl>> map;
                                                          synchronized (_suspended) {
                                                              map = _suspended.get(desktop);
                                                          }
                                                  Severity: Minor
                                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 45 mins to fix

                                                  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

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                          if (isEffective(childInfo, page, parent)) {
                                                                              final Component[] children = execCreateChild(ci, parent, childInfo, replaceableText,
                                                                                      insertBefore);
                                                                              Collections.addAll(created, children);
                                                                          }
                                                  Severity: Major
                                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 45 mins to fix

                                                    Method execCreateChild has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        private static Component[] execCreateChild(CreateInfo ci, Component parent, ComponentInfo childInfo,
                                                                ReplaceableText replaceableText, Component insertBefore) {
                                                    Severity: Minor
                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                      Method getNativeContent has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          private static final void getNativeContent(CreateInfo ci, StringBuffer sb, Component comp, List<NodeInfo> children,
                                                                  Native.Helper helper) {
                                                      Severity: Minor
                                                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                        Method getNativeSecondHalf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            private static final void getNativeSecondHalf(CreateInfo ci, StringBuffer sb, Component comp, NativeInfo childInfo,
                                                                    Native.Helper helper) {
                                                        Severity: Minor
                                                        Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                          Method execCreateChild0 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              private static Component execCreateChild0(CreateInfo ci, Component parent, ComponentInfo childInfo,
                                                                      String replaceableText, Component insertBefore) {
                                                          Severity: Minor
                                                          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                            Method doActivate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                private static UiVisualizer doActivate(Execution exec, boolean asyncupd, boolean recovering,
                                                                        Object[] resultOfRepeat, int timeout) {
                                                            Severity: Minor
                                                            Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                              Method execNewPage0 has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  private void execNewPage0(final Execution exec, final PageDefinition pagedef, final Richlet richlet,
                                                                          final Page page, final Writer out) throws IOException {
                                                              Severity: Minor
                                                              Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                Method execCreateChild has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    private static Component[] execCreateChild(CreateInfo ci, Component parent, ZkInfo childInfo,
                                                                            ReplaceableText replaceableText, Component insertBefore) {
                                                                Severity: Minor
                                                                Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                  Method getNativeFirstHalf has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                      private static final void getNativeFirstHalf(CreateInfo ci, StringBuffer sb, Component comp, NativeInfo childInfo,
                                                                              Native.Helper helper) {
                                                                  Severity: Minor
                                                                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                    Method recycleEventThread has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        private void recycleEventThread(EventProcessingThreadImpl evtthd) {
                                                                            if (!evtthd.isCeased()) {
                                                                                if (evtthd.isIdle()) {
                                                                                    final int max = _wapp.getConfiguration().getMaxSpareThreads();
                                                                                    synchronized (_idles) {
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                    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 setEpilog has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        private static final void setEpilog(CreateInfo ci, Component comp, NativeInfo compInfo) {
                                                                            final Native nc = (Native) comp;
                                                                            final Native.Helper helper = nc.getHelper();
                                                                            StringBuffer sb = null;
                                                                            final NativeInfo splitInfo = compInfo.getSplitChild();
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                    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 setProlog has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        private static final void setProlog(CreateInfo ci, Component comp, NativeInfo compInfo) {
                                                                            final Native nc = (Native) comp;
                                                                            final Native.Helper helper = nc.getHelper();
                                                                            StringBuffer sb = null;
                                                                            final List<NodeInfo> prokids = compInfo.getPrologChildren();
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 mins to fix

                                                                    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 hasSuspendedThread has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                        public boolean hasSuspendedThread() {
                                                                            if (!_suspended.isEmpty()) {
                                                                                synchronized (_suspended) {
                                                                                    for (Map map : _suspended.values())
                                                                                        if (!map.isEmpty())
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 25 mins to fix

                                                                    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

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

                                                                                    } else if (meta instanceof ZkInfo) {
                                                                                        final ZkInfo childInfo = (ZkInfo) meta;
                                                                                        final ForEach forEach = childInfo.resolveForEach(page, parent);
                                                                                        if (forEach == null) {
                                                                                            if (isEffective(childInfo, page, parent)) {
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 773..791

                                                                    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 126.

                                                                    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

                                                                                    if (meta instanceof ComponentInfo) {
                                                                                        final ComponentInfo childInfo = (ComponentInfo) meta;
                                                                                        final ForEach forEach = childInfo.resolveForEach(page, parent);
                                                                                        if (forEach == null) {
                                                                                            if (isEffective(childInfo, page, parent)) {
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 791..809

                                                                    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 126.

                                                                    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

                                                                            } catch (Throwable ex) {
                                                                                final List<Throwable> errs = new LinkedList<Throwable>();
                                                                                errs.add(ex);
                                                                    
                                                                                desktopCtrl.invokeExecutionCleanups(exec, null, errs);
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1236..1249

                                                                    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 88.

                                                                    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

                                                                            } catch (Throwable ex) {
                                                                                final List<Throwable> errs = new LinkedList<Throwable>();
                                                                                errs.add(ex);
                                                                    
                                                                                desktopCtrl.invokeExecutionCleanups(exec, null, errs);
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1360..1373

                                                                    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 88.

                                                                    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 3 locations. Consider refactoring.
                                                                    Open

                                                                                do {
                                                                                    for (; event != null; event = nextEvent(uv)) {
                                                                                        try {
                                                                                            process(desktop, event);
                                                                                        } catch (Throwable ex) {
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 2 other locations - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 645..654
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1221..1230

                                                                    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 72.

                                                                    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 3 locations. Consider refactoring.
                                                                    Open

                                                                                do {
                                                                                    for (; event != null; event = nextEvent(uv)) {
                                                                                        try {
                                                                                            process(desktop, event);
                                                                                        } catch (Throwable ex) {
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 2 other locations - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 549..559
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 645..654

                                                                    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 72.

                                                                    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 3 locations. Consider refactoring.
                                                                    Open

                                                                                do {
                                                                                    for (; event != null; event = nextEvent(uv)) {
                                                                                        try {
                                                                                            process(desktop, event);
                                                                                        } catch (Throwable ex) {
                                                                    Severity: Major
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 2 other locations - About 1 hr to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 549..559
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1221..1230

                                                                    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 72.

                                                                    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

                                                                        private static class ExtensionHolder {
                                                                            private static final Extension INSTANCE = initializeExtension();
                                                                    
                                                                            private static Extension initializeExtension() {
                                                                                String clsnm = Library.getProperty("org.zkoss.zk.ui.impl.UiEngineImpl.extension");
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 1 hr to fix
                                                                    zkbind/src/main/java/org/zkoss/bind/tracker/impl/BindUiLifeCycle.java on lines 316..330

                                                                    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 69.

                                                                    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

                                                                            synchronized (map) {
                                                                                List<EventProcessingThreadImpl> list = map.get(mutex);
                                                                                if (list == null)
                                                                                    map.put(mutex, list = new LinkedList<EventProcessingThreadImpl>());
                                                                                list.add(evtthd);
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 35 mins to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/http/WebManager.java on lines 440..445

                                                                    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 44.

                                                                    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

                                                                                        while (forEach.next()) {
                                                                                            if (childInfo.isEffective(comp)) {
                                                                                                getNativeFirstHalf(ci, sb, comp, childInfo, helper);
                                                                                                getNativeSecondHalf(ci, sb, comp, childInfo, helper);
                                                                                            }
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 30 mins to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 2248..2253

                                                                    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 40.

                                                                    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

                                                                                    if (forEach == null) {
                                                                                        if (childInfo.isEffective(comp)) {
                                                                                            getNativeFirstHalf(ci, sb, comp, childInfo, helper);
                                                                                            getNativeSecondHalf(ci, sb, comp, childInfo, helper);
                                                                                        }
                                                                    Severity: Minor
                                                                    Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java and 1 other location - About 30 mins to fix
                                                                    zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 2254..2259

                                                                    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 40.

                                                                    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

                                                                    There are no issues that match your filters.

                                                                    Category
                                                                    Status