workcraft/workcraft

View on GitHub

Showing 591 of 2,488 total issues

Avoid deeply nested control flow statements.
Open

                        for (Condition min : bsonAlg.getMinimalPhase(getActivatedPhases(phases.get(post)))) {
                            min.setErrors(min.getErrors() - ((Condition) post).getErrors());
                        }

    Avoid deeply nested control flow statements.
    Open

                            if (!contains(result, newMarking) && !contains(newMarkings, newMarking)) {
                                newMarkings.add(newMarking);
                            }
    Severity: Major
    Found in workcraft/SonPlugin/src/org/workcraft/plugins/son/algorithm/ASONAlg.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (u.contains(e3)) {
                                  u.remove(e3);
                                  stack.push(e3);
                              }

        Avoid deeply nested control flow statements.
        Open

                                if (!c2.isMarked()) {
                                    return false;
                                }

          Avoid deeply nested control flow statements.
          Open

                                  for (Condition c3 : bsonAlg.getUpperConditions(c2)) {
                                      if (c3.isMarked()) {
                                          hasMarking = true;
                                      }
                                  }

            Avoid deeply nested control flow statements.
            Open

                                    if ((!q.isEmpty() || i.hasNext()) && !"+".equals(expression.get(expression.size() - 1))) {
                                        expression.add("+");
                                    }

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

                  private static void processTransition(Wtg wtg, TransitionEvent visitingTransition, Set<TransitionEvent> outputHasFired,
                                                        Set<String> firedBeforeOut, Integer index,
                                                        Map<TransitionEvent, Map<Signal, Pair<Boolean, Integer>>> inputsFiredAfterOutput) {

                Avoid deeply nested control flow statements.
                Open

                                        if (node instanceof TransitionEvent) {
                                            TransitionEvent dstTransition = (TransitionEvent) node;
                                            Signal signal = dstTransition.getSignal();
                                            if (signal.getType() != Signal.Type.INPUT) {
                                                String transitionName = wtg.getName(transition.getSignal()) + direction.getSymbol();

                  Avoid deeply nested control flow statements.
                  Open

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

                    Avoid deeply nested control flow statements.
                    Open

                                            for (Node e2 : cycle) {
                                                if (e2 instanceof TransitionNode && u.contains(e2)) {
                                                    u.remove(e2);
                                                    stack.push((TransitionNode) e2);
                                                } else if (!step.contains(e2)) {

                      Avoid deeply nested control flow statements.
                      Open

                                              if (!((ChannelPlace) pre).isMarked()) {
                                                  for (MathNode pre2 : net.getPreset(pre)) {
                                                      if (visit.contains(pre2)) {
                                                          continue;
                                                      } else if (!result.contains(pre2) || del.contains(pre2)) {

                        Avoid deeply nested control flow statements.
                        Open

                                                    if (!settings.GO_SIGNAL.equals(vertexName) && !settings.DONE_SIGNAL.equals(vertexName)) {
                                                        optVertices[v] = vertexName;
                                                        st2.nextElement();
                                                        optFormulaeVertices[v++] = (String) st2.nextElement();
                                                    }

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (vert.getParent() instanceof VisualPage) {
                                                              VisualPage page = (VisualPage) vert.getParent();
                                                              refKey = page.getLabel();
                                                              relaventPages.addAll(referenceMap.get(page.getLabel()).getRefPages());
                                                              relaventPages.remove(page);

                            Avoid deeply nested control flow statements.
                            Open

                                                            if ((finalWaveformSignalState.containsKey(signal.getKey())) &&
                                                                    (!finalWaveformSignalState.get(signal.getKey()).equals(signal.getValue()))) {
                                                                msg += ' ' + signal.getKey();
                                                            }

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (!hasPreAsyn) {
                                                          setSyncErrNum(eventCycle, phases, isLower);
                                                          removeList.addAll(eventCycle);
                                                          b = true;
                                                          break;

                                Avoid deeply nested control flow statements.
                                Open

                                                        for (Condition min : bsonAlg.getMinimalPhase(getActivatedPhases(phases.get(post)))) {
                                                            min.setErrors(min.getErrors() + ((Condition) post).getErrors());
                                                        }

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if (!hasPostAsyn) {
                                                              setRevSyncErrNum(eventCycle, phases, isLower);
                                                              removeList.addAll(eventCycle);
                                                              b = true;
                                                              break;

                                    Avoid deeply nested control flow statements.
                                    Open

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

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              for (Condition c3 : bsonAlg.getUpperConditions(c2)) {
                                                                  if (c3.isMarked()) {
                                                                      hasMarking = true;
                                                                  }
                                                              }

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                for (VisualConnection con : model.getConnections(cPlace)) {
                                                                    ((VisualSONConnection) con).setSemantics(Semantics.SYNCLINE);
                                                                }
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language