Showing 4,841 of 7,782 total issues

Function isRoundingRequired has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    isRoundingRequired(val: string | number, fmt: string, localizedSymbols?: zk.LocalizedSymbols): boolean {
        if (!fmt || val == null || val == '')
            return false;
        
        var useMinsuFmt;
Severity: Minor
Found in zk/src/main/resources/web/js/zk/fmt/numfmt.ts - About 1 hr to fix

    Function clearCSSFlex has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            clearCSSFlex(wgt: zk.Widget, o: FlexOrient, clearAllSiblings?: boolean): void {
                if (!wgt._cssFlexApplied) return;
    
                const pwgt = wgt.parent;
                if (!pwgt) return;
    Severity: Minor
    Found in zk/src/main/resources/web/js/zk/flex.ts - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                              if (ZKBIND1_ANNO.equals(nm) || ZKBIND2_ANNO.equals(nm) || BIND_ANNO.equals(nm)
                                      || LOAD_ANNO.equals(nm) || SAVE_ANNO.equals(nm) || VALIDATOR_ANNO.equals(nm)
                                      || CONVERTER_ANNO.equals(nm) || ID_ANNO.equals(nm) || INIT_ANNO.equals(nm)) {
                                  continue;
                              }

        Consider simplifying this complex logical expression.
        Open

                if (x >= 0 && y >= 0 && x1 <= jq.innerWidth() && y1 <= jq.innerHeight()) {
                    var oels = _overflowElement(this, recursive),
                        inView = true;
                    for (var i = 0; i < oels.length; i++) {
                        // ZK-2619 : Errorbox not shown when WrongValueException is thrown on a multiline textbox
        Severity: Critical
        Found in zk/src/main/resources/web/js/zk/dom.ts - About 1 hr to fix

          Method setVisible has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public boolean setVisible(boolean visible) {
                  final boolean old = super.setVisible(visible);
                  if (old != visible) {
                      final String style = getStyle();
                      if (visible) {
          Severity: Minor
          Found in zhtml/src/main/java/org/zkoss/zhtml/impl/AbstractTag.java - About 1 hr to fix

            Method getFormat0 has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private String getFormat0() throws IOException {
                    String format = null;
                    if (_data != null) {
                        try {
                            format =
            Severity: Minor
            Found in zcommon/src/main/java/org/zkoss/sound/AAudio.java - About 1 hr to fix

              Method escape has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  static void escape(String s, StringBuffer sb) {
                      for(int i=0;i<s.length();i++){
                          char ch=s.charAt(i);
                          switch(ch){
                          case '"':
              Severity: Minor
              Found in zcommon/src/main/java/org/zkoss/json/JSONValue.java - About 1 hr to fix

                Method coerceToNumber has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected static final Number coerceToNumber(final Number number,
                            final Class<?> type) throws ELException {
                        if (Long.TYPE == type || Long.class.equals(type)) {
                            return Long.valueOf(number.longValue());
                        }
                Severity: Minor
                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr to fix

                  Method startOperation has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private void startOperation(final String operation, final boolean evenLonger) {
                          final Desktop desktop = Executions.getCurrent().getDesktop();
                          System.out.println("current desktop: '" + desktop.getId() + "' ServerPush enabled: " + desktop.isServerPushEnabled());
                  
                          if(!desktop.isServerPushEnabled()) {

                    Method parseEventExpression has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static Object[] parseEventExpression(Component comp, String evtexpr, Component defaultComp, boolean deferred)
                                throws ComponentNotFoundException {
                            final int j = evtexpr.lastIndexOf('.');
                            final String evtnm;
                            Object target;
                    Severity: Minor
                    Found in zk/src/main/java/org/zkoss/zk/ui/sys/ComponentsCtrl.java - About 1 hr to fix

                      Method wireComponents has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private void wireComponents(final PsdoCompFunctor functor, final boolean ignoreNonNull) {
                                  final Class<?> ctrlClass = _controller.getClass();
                                  // wire to fields
                                  Reflections.forFields(ctrlClass, Wire.class, new FieldRunner<Wire>() {
                                      public void onField(Class<?> clazz, Field field, Wire anno) {
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/select/Selectors.java - About 1 hr to fix

                        Method wireEventListeners0 has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private static void wireEventListeners0(final Component component, final Object controller, final boolean rewire) {
                                Reflections.forMethods(controller.getClass(), Listen.class, new MethodRunner<Listen>() {
                                    public void onMethod(Class<?> clazz, Method method, Listen anno) {
                                        // check method signature
                                        if ((method.getModifiers() & Modifier.STATIC) != 0)
                        Severity: Minor
                        Found in zk/src/main/java/org/zkoss/zk/ui/select/Selectors.java - About 1 hr to fix

                          Method parseValueArray has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private static String[] parseValueArray(String rval, Location loc) {
                                  final List<String> attrs = new ArrayList<String>();
                                  final int len = rval.length();
                                  char quot = (char) 0;
                                  final StringBuffer sb = new StringBuffer(len);

                            Method parseZScript has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private void parseZScript(NodeInfo parent, Element el, AnnotationHelper annHelper) {
                                    if (el.getAttributeItem("forEach") != null)
                                        throw new UiException(message("forEach not applicable to <zscript>", el));
                                    if (annHelper.clear())
                                        log.warn(message("Annotations are ignored since <zscript> doesn't support them", el));
                            Severity: Minor
                            Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 1 hr to fix

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

                                    private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
                                        s.defaultWriteObject();
                                
                                        boolean written = false;
                                        if (_sortAsc instanceof ListitemComparator) {
                                Severity: Minor
                                Found in zul/src/main/java/org/zkoss/zul/Listheader.java - About 1 hr to fix

                                  Method writeObject has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
                                          s.defaultWriteObject();
                                  
                                          boolean written = false;
                                          if (_sortAsc instanceof TreeitemComparator) {
                                  Severity: Minor
                                  Found in zul/src/main/java/org/zkoss/zul/Treecol.java - About 1 hr to fix

                                    Method setSelectAll has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public void setSelectAll(boolean selectAll) {
                                                if (selectAll) {
                                                    boolean isGroupSelectable = model.isGroupSelectable();
                                                    List<E> all = new LinkedList<>();
                                                    for (int i = 0, j = model.getGroupCount(); i < j; i++) {
                                    Severity: Minor
                                    Found in zul/src/main/java/org/zkoss/zul/AbstractGroupsModel.java - About 1 hr to fix

                                      Method removeChild has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public boolean removeChild(Component child) {
                                              if (_paging == child && _pgi == child && inPagingMold())
                                                  throw new IllegalStateException(
                                                          "The paging component cannot be removed manually. It is removed automatically when changing the mold");
                                              // Feature 1906110: prevent developers from removing it accidently
                                      Severity: Minor
                                      Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 1 hr to fix

                                        Function partition has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        d3.layout.partition = function() {
                                          var hierarchy = d3.layout.hierarchy(),
                                              size = [1, 1]; // width, height
                                        
                                          function position(node, x, dx, dy) {
                                        Severity: Minor
                                        Found in zktest/src/main/webapp/js/d3.layout.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language