TestingResearchIllinois/NonDex

View on GitHub

Showing 77 of 156 total issues

Method visitMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public MethodVisitor visitMethod(int access, String name, String desc,
                                     String signature, String[] exceptions) {

    Method visitMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public MethodVisitor visitMethod(int access, String name, String desc,
                                         String signature, String[] exceptions) {

      Method visitMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {

        Method visitMethod has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {

          Method getFailedTests has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public Collection<String> getFailedTests() {
                  if (this.failedTests == null) {
                      this.failedTests = new LinkedHashSet<>();
                      File failed = Paths.get(this.nondexDir, this.executionId, ConfigurationDefaults.FAILURES_FILE)
                              .toFile();

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method testNondexComprehensvieWithFailingTests_thenBuildFailure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              @Test
              public void testNondexComprehensvieWithFailingTests_thenBuildFailure() throws IOException {
                  projectDirectory = new File("src/functionalTest/resources/comprehensive-it");
                  GradleRunner.create()
                      .withProjectDir(projectDirectory)

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method initializeNondex has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              private static void initializeNondex() {
                  // TODO: Temporary solution to prevent JVM crash. It's not safe to invoke isBooted()
                  //  or getProperty before saveAndRemoveProperties in System.initPhase1 is done
                  if (System.out == null) {
                      return;

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid too many return statements within this method.
          Open

                      return new WeakHashMapShufflingAdder(cv);

            Avoid too many return statements within this method.
            Open

                            return new HashMapShufflingAdder(cv, "Entry");

              Avoid too many return statements within this method.
              Open

                      return super.visitMethod(access, name, desc, signature, exceptions);

                Avoid too many return statements within this method.
                Open

                                return new HashMapShufflingAdder(cv, "Node");

                  Avoid too many return statements within this method.
                  Open

                          return null;

                    Avoid too many return statements within this method.
                    Open

                                return new ConcurrentHashMapShufflingAdder(cv);

                      Method printStackTraceIfUniqueDebugPoint has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void printStackTraceIfUniqueDebugPoint() {
                              if (config.shouldPrintStackTrace
                                      && this.isDebuggingUniquePoint()) {
                                  StackTraceElement[] traces = Thread.currentThread().getStackTrace();
                                  StringBuilder stackstring = new StringBuilder();
                      Severity: Minor
                      Found in nondex-common/src/main/java/edu/illinois/nondex/common/NonDex.java - About 25 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method addExcludedGroups has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private Xpp3Dom addExcludedGroups(Xpp3Dom configNode) {
                              for (Xpp3Dom config : configNode.getChildren()) {
                                  if ("excludedGroups".equals(config.getName())) {
                                      Logger.getGlobal().log(Level.INFO, "Adding excluded groups to existing ones");
                                      String current = config.getValue();

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method debug has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public String debug() throws MojoExecutionException {
                      
                              //The test must have failed if it's being debugged, ergo there should exist a failing configuration
                              assert (!this.failingConfigurations.isEmpty());
                      
                      

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Method execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                          @Override
                          public void execute() throws MojoExecutionException, MojoFailureException {
                              super.execute();
                              Logger.getGlobal().log(Level.INFO, "The original argline is: " + this.originalArgLine);
                              MojoExecutionException allExceptions = null;

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Severity
                      Category
                      Status
                      Source
                      Language