Showing 7,775 of 7,775 total issues

Method selectTabDirectly has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    /* packge */void selectTabDirectly(Tab tab, boolean byClient) {
        if (tab == null)
            throw new IllegalArgumentException("null tab");
        if (tab.getTabbox() != this)
            throw new UiException("Not my child: " + tab);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tabbox.java - About 1 hr to fix

    Method service has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
            final String cmd = request.getCommand();
            if (cmd.equals(Events.ON_OPEN)) {
                OpenEvent evt = OpenEvent.getOpenEvent(request);
                _open = evt.isOpen();
    Severity: Minor
    Found in zul/src/main/java/org/zkoss/zul/Listgroup.java - About 1 hr to fix

      Method setParent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public void setParent(Component parent) {
              Radiogroup oldgp = null;
      
              if (getParent() != null)
                  oldgp = getRadiogroup();
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Radio.java - About 1 hr to fix

        Method encodeURL has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public String encodeURL(ServletRequest request, ServletResponse response, String uri)
                        throws ServletException, UnsupportedEncodingException {
                    uri = Servlets.locate(_ctx, request, uri, getLocator()); //resolves "*"
                    uri = (_encURLPrefix != null ? _mappingURI + _encURLPrefix : _mappingURI) + uri; //prefix with mapping
        
        

          Function cluster has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function cluster(d, i) {
              var nodes = hierarchy.call(this, d, i),
                  root = nodes[0],
                  previousNode,
                  x = 0,
          Severity: Minor
          Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix

            Function remove has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                remove: function( owner, key ) {
                    var i,
                        cache = owner[ this.expando ];
            
                    if ( cache === undefined ) {
            Severity: Minor
            Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

              Function isDurationValid has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function isDurationValid(m) {
                      var key,
                          unitHasDecimal = false,
                          i,
                          orderLen = ordering.length;
              Severity: Minor
              Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                Function toISOString has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function toISOString(keepOffset) {
                        if (!this.isValid()) {
                            return null;
                        }
                        var utc = keepOffset !== true,
                Severity: Minor
                Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                  Function humanize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function humanize(argWithSuffix, argThresholds) {
                          if (!this.isValid()) {
                              return this.localeData().invalidDate();
                          }
                  
                  
                  Severity: Minor
                  Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 1 hr to fix

                    Function sync has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            sync(): boolean {
                                var node = this.node, $node = jq(node);
                                if (!node || !$node.zk.isVisible(true)) {
                                    if (this.opts.stackup && node) {
                                        if (!this.stackup)
                    Severity: Minor
                    Found in zk/src/main/resources/web/js/zk/effect.ts - About 1 hr to fix

                      Function constructor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              constructor(opts: EffectFullMaskOptions) {
                                  super();
                                  opts = eff._skuOpts(opts);
                                  var mask = this.mask = jq(opts.mask || [], zk)[0];
                                  if (this.mask) {
                      Severity: Minor
                      Found in zk/src/main/resources/web/js/zk/effect.ts - About 1 hr to fix

                        Function throttle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                static throttle<T, A extends unknown[], R>(func: (this: T, ...args: A) => R, wait: number):
                                            (this: T, ...args: A) => R {
                                    var timeout: number | undefined, context, args, result,
                                        previous = 0,
                                        later = function (): void {
                        Severity: Minor
                        Found in zk/src/main/resources/web/js/zk/utl.ts - About 1 hr to fix

                          Function ensureSingleTsdoc has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function ensureSingleTsdoc(node: PropertyNameNonComputedNode, commentNode: TSESTree.Node | TSESTree.Token): TextRange | undefined {
                                      const comments = sourceCode.getCommentsBefore(commentNode);
                                      const tsdocs = new Array<TextRange>();
                                      const tsdocLocs = new Array<string>();
                                      for (const comment of comments) {
                          Severity: Minor
                          Found in eslint-plugin-zk/src/rules/tsdocValidation.ts - About 1 hr to fix

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

                                private static String getFormatByName(String name) {
                                    if (name != null) {
                                        final int j = name.lastIndexOf('.') + 1,
                                            k = name.lastIndexOf('/') + 1;
                                        if (j > k && j < name.length())
                            Severity: Major
                            Found in zcommon/src/main/java/org/zkoss/sound/AAudio.java and 2 other locations - About 1 hr to fix
                            zcommon/src/main/java/org/zkoss/image/AImage.java on lines 158..166
                            zcommon/src/main/java/org/zkoss/video/AVideo.java on lines 232..240

                            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

                                private static String getFormatByName(String name) {
                                    if (name != null) {
                                        final int j = name.lastIndexOf('.') + 1,
                                            k = name.lastIndexOf('/') + 1;
                                        if (j > k && j < name.length())
                            Severity: Major
                            Found in zcommon/src/main/java/org/zkoss/image/AImage.java and 2 other locations - About 1 hr to fix
                            zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 163..171
                            zcommon/src/main/java/org/zkoss/video/AVideo.java on lines 232..240

                            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

                                private String getFormatByName(String name) {
                                    if (name != null) {
                                        final int j = name.lastIndexOf('.') + 1,
                                                k = name.lastIndexOf('/') + 1;
                                        if (j > k && j < name.length())
                            Severity: Major
                            Found in zcommon/src/main/java/org/zkoss/video/AVideo.java and 2 other locations - About 1 hr to fix
                            zcommon/src/main/java/org/zkoss/image/AImage.java on lines 158..166
                            zcommon/src/main/java/org/zkoss/sound/AAudio.java on lines 163..171

                            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 553..563
                            zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 649..658

                            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 553..563
                            zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1226..1235

                            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 649..658
                            zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java on lines 1226..1235

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

                                public static List getList(int count, String label, int range) {
                                    List list = new ArrayList(count);
                                    Random rand = new Random(new Random().nextLong());
                                    for (int i = 0; i < count; i++) {
                                        list.add(label + " " + rand.nextInt(range));
                            zktest/src/main/java/org/zkoss/zktest/util/ModelProvider.java on lines 67..74

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language