Showing 7,775 of 7,775 total issues

Method render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @SuppressWarnings("unchecked")
        private void render(Comboitem item, Object value, int index) throws Throwable {
            if (!_rendered && (_renderer instanceof RendererCtrl)) {
                ((RendererCtrl) _renderer).doTry();
                _ctrled = true;
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Combobox.java - About 1 hr to fix

    Method renderProperties has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                throws java.io.IOException {
            super.renderProperties(renderer);
    
            if (_max <= 0)
    Severity: Minor
    Found in zul/src/main/java/org/zkoss/zul/Rating.java - About 1 hr to fix

      Method updateHeadercmTristate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void updateHeadercmTristate(Set<?> partialSelections) {
              if (getTreecols() != null) {
                  boolean treecolShouldBePartial = false;
                  int numberOfChild = 0,
                          selectedChild = 0;
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 1 hr to fix

        Method onInitRender has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            @SuppressWarnings("rawtypes")
            public void onInitRender(Event data) {
                //Bug #2010389
                removeAttribute(ZUL_RADIOGROUP_ON_INITRENDER); //clear syncModel flag
                final Renderer renderer = new Renderer();
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Radiogroup.java - About 1 hr to fix

          Method insertBefore has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public boolean insertBefore(Component child, Component refChild) {
                  if (child instanceof Tabs) {
                      if (super.insertBefore(child, refChild)) {
                          _tabs = (Tabs) child;
                          for (Iterator<Component> it = _tabs.getChildren().iterator(); it.hasNext();) {
          Severity: Minor
          Found in zul/src/main/java/org/zkoss/zul/Tabbox.java - About 1 hr to fix

            Method setMold has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public void setMold(String mold) {
                    final String old = getMold();
                    if (!Objects.equals(old, mold)) {
                        super.setMold(mold);
                        // we have to change model before detaching paging,
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 1 hr to fix

              Method getThreadLocals has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private void getThreadLocals() {
                      try {
                          Class cls = Classes
                                  .forNameByThread("org.springframework.transaction.support.TransactionSynchronizationManager");
              

                Method normalizePath has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static String normalizePath(String path) {
                        if (path == null) {
                            return null;
                        }
                        if ("/".equals(path)) {
                Severity: Minor
                Found in zweb/src/main/java/org/zkoss/web/servlet/http/Https.java - About 1 hr to fix

                  Function diagonal has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  d3.svg.diagonal = function() {
                    var source = d3_svg_chordSource,
                        target = d3_svg_chordTarget,
                        projection = d3_svg_diagonalProjection;
                  
                  
                  Severity: Minor
                  Found in zktest/src/main/webapp/js/d3.js - About 1 hr to fix

                    Function when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        when: function( singleValue ) {
                            var
                    
                                // count of uncompleted subordinates
                                remaining = arguments.length,
                    Severity: Minor
                    Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                      Function position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          position: function() {
                              if ( !this[ 0 ] ) {
                                  return;
                              }
                      
                      
                      Severity: Minor
                      Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                        Function clone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                                var i, l, srcElements, destElements,
                                    clone = elem.cloneNode( true ),
                                    inPage = isAttached( elem );
                        
                        
                        Severity: Minor
                        Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                          Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function propFilter( props, specialEasing ) {
                              var index, name, easing, value, hooks;
                          
                              // camelCase, specialEasing and expand cssHook pass
                              for ( index in props ) {
                          Severity: Minor
                          Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                            Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                addClass: function( value ) {
                                    var classes, elem, cur, curValue, clazz, j, finalValue,
                                        i = 0;
                            
                                    if ( isFunction( value ) ) {
                            Severity: Minor
                            Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                              Function chooseLocale has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function chooseLocale(names) {
                                      var i = 0,
                                          j,
                                          next,
                                          locale,
                              Severity: Minor
                              Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                                Function listWeekdaysImpl has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function listWeekdaysImpl(localeSorted, format, index, field) {
                                        if (typeof localeSorted === 'boolean') {
                                            if (isNumber(format)) {
                                                index = format;
                                                format = undefined;
                                Severity: Minor
                                Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                                  Function mtBL0 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function mtBL0(): void {
                                      for (; ;) {
                                          if (_crInfBL0.length)
                                              return; //another page started
                                  
                                  
                                  Severity: Minor
                                  Found in zk/src/main/resources/web/js/zk/mount.ts - About 1 hr to fix

                                    Function _syncPosition has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _syncPosition(orient: string, pos: number): void {
                                            if (!this._pos)
                                                return;
                                    
                                            var isH = orient == 'hor',
                                    Severity: Minor
                                    Found in zul/src/main/resources/web/js/zul/Scrollbar.ts - About 1 hr to fix

                                      Function debounce has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              static debounce<T, A extends unknown[], R>(func: (this: T, ...args: A) => R, wait: number,
                                                                              immediate?: boolean): (this: T, ...args: A) => R {
                                                  var timeout, args, context, timestamp, result;
                                                  if (null == wait) wait = 100;
                                      
                                      
                                      Severity: Minor
                                      Found in zk/src/main/resources/web/js/zk/utl.ts - About 1 hr to fix

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

                                            public void setClientAction(String action) {
                                                if (action != null && action.length() == 0)
                                                    action = null;
                                                if (!Objects.equals(_auxinf != null ? _auxinf.action : null, action)) {
                                                    initAuxInfo0().action = action;
                                        Severity: Major
                                        Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java and 7 other locations - About 1 hr to fix
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 181..188
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 211..218
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 285..292
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 354..361
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 434..441
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 567..574
                                        zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java on lines 620..627

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

                                        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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language