workcraft/workcraft

View on GitHub

Showing 591 of 2,488 total issues

Avoid deeply nested control flow statements.
Open

                        for (Node n: cycle) {
                            if (n instanceof TransitionNode) {
                                eventCycle.add((TransitionNode) n);
                                if (!getPostAsynEvents((TransitionNode) n).isEmpty()
                                        && hasCommonElements(fireList2, getPostAsynEvents((TransitionNode) n))) {

    Avoid deeply nested control flow statements.
    Open

                            if (graph[i][j] > 1) ch = '-';

      Avoid deeply nested control flow statements.
      Open

                                  for (int i = end.length() - 1; i >= 0; i--) {
                                      output.print(end.charAt(i));
                                  }

        Avoid deeply nested control flow statements.
        Open

                                if (n1 instanceof VisualPage) {
                                    VisualPage vp = (VisualPage) n1;
                                    vp.setLabel(k);
                                    vp.setIsCollapsed(false);
                                    vp.setParent(visualCpog.getCurrentLevel());

          Avoid deeply nested control flow statements.
          Open

                                  for (VisualNode n : getChildren(visualCpog, current)) {
                                      if (!visitedVertices.contains(n)) {
                                          q.add(n);
                                      }
                                  }

            Avoid deeply nested control flow statements.
            Open

                                    if (!visitedVertices.contains(n)) {
                                        q.add(n);
                                    }

              Avoid deeply nested control flow statements.
              Open

                                      if (net.getNodeReference(event.getReferencedComponent()).equals(piece[1])) {
                                          e = event;
                                      }
              Severity: Major
              Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/BlockConnector.java - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for (Time ndin : preset) {
                                            ndin.setEndTime(nd.getStartTime());
                                        }

                  Avoid deeply nested control flow statements.
                  Open

                                          if (isFinal(max) && !max.isMarked()) {
                                              max.setMarked(true);
                                          }

                    Avoid deeply nested control flow statements.
                    Open

                                                        if (e == eventItem.getEvent()) {
                                                            selectedEvents.remove(e);
                                                            eventItem.setSelected(false);
                                                            eventItem.setFillColor(Color.WHITE);
                                                        }

                      Avoid deeply nested control flow statements.
                      Open

                                              if (i != null) {
                                                  m.setEndTime(i);
                                              } else {
                                                  throw new TimeEstimationException(net.getNodeReference(nd) + ".finish ("
                                                          + nd.getEndTime().toString() + ") is inconsistent with " + net.getNodeReference(m)

                        Avoid deeply nested control flow statements.
                        Open

                                                if (net.getSONConnectionType(node, post) == Semantics.SYNCLINE) {
                                                    int index2 = nodeIndex.get(post);
                                                    if (result[index2] == null) {
                                                        result[index2] = new ArrayList<>();
                                                    }

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (!sync.contains(n)) {
                                                      err += ((ChannelPlace) pre).getErrors();
                                                  }

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ((n2 instanceof Condition) && net.getSONConnectionType((MathNode) pre, n2) == Semantics.PNLINE) {
                                                        result.add((Condition) n2);
                                                    }

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (preCondition instanceof Condition) {
                                                          result.add((Condition) preCondition);
                                                      }

                                Avoid deeply nested control flow statements.
                                Open

                                                        if (postCondition instanceof Condition) {
                                                            result.add((Condition) postCondition);
                                                        }

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (!sync.contains(n)) {
                                                              err += ((ChannelPlace) pre).getErrors();
                                                          }

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if (!visit.isEmpty() && (e3 == visit.peekLast())) {
                                                                stack.pop();
                                                                visit.removeLast();
                                                            } else {
                                                                break;

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if (n instanceof TransitionNode) {
                                                                  ((TransitionNode) n).setFillColor(new Color(255, 228, 181));
                                                              }

                                        Method buildCpog has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            protected void buildCpog(int n, int m, char[][][] constraints,
                                                    VisualCpog cpog, VisualVertex[] vertices, HashMap<String,
                                                    BooleanFormula> formulaeName) {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language