TestingResearchIllinois/NonDex

View on GitHub

Showing 77 of 156 total issues

Method startDebugBinary has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private List<Configuration> startDebugBinary(Configuration config) {
            List<Configuration> allFailingConfigurations = new LinkedList<>();

            List<Pair<Pair<Long, Long>, Configuration>> pairs = new LinkedList<>();
            pairs.add(Pair.of(Pair.of(0L, (long) config.getInvocationCount()), config));

    Method visitMethod has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public MethodVisitor visitMethod(int access, String name, String desc,
                                         String signature, String[] exceptions) {
            if ("<init>".equals(name)) {
                return new MethodVisitor(Opcodes.ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {

      Method process has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void process(String outJar)
                  throws IOException, NoSuchAlgorithmException {
      
              final Set<String> classesToCopy = this.filterCached(outJar);
      
      

        Method construct has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public static ClassVisitor construct(ClassVisitor cv, String clzToInstrument)
                    throws NoSuchAlgorithmException {
                if (clzToInstrument.equals(Instrumenter.concurrentHashMapName)) {
                    return new ConcurrentHashMapShufflingAdder(cv);
                } else if (clzToInstrument.equals(Instrumenter.hashMapName)) {

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

            private InputStream getClassInputStream(String className)
                    throws IOException {
                InputStream clInputStream;
                if (rtZipFile != null) {
                    try {

          Method execute has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              @Override
              public void execute() throws MojoExecutionException, MojoFailureException {
                  Logger.getGlobal().setLoggingLevel(Level.parse(this.loggingLevel));
                  String rtPathStr = "";
                  if (Utils.checkJDK8()) {

            Method addNext has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public void addNext() {
                    MethodVisitor mv = super.visitMethod(Opcodes.ACC_PUBLIC, "next", "()Ljava/lang/Object;", "()TE;", null);
                    mv.visitCode();
                    mv.visitVarInsn(Opcodes.ALOAD, 0);
                    mv.visitFieldInsn(Opcodes.GETFIELD, "java/util/PriorityQueue$Itr", "expectedModCount", "I");

              Method visitMethod has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  @Override
                  public MethodVisitor visitMethod(int access, String name, String desc,
                          String signature, String[] exceptions) {
              
                      final String methodId = this.cn + "." + name;

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

                  @Override
                  public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
                      if ("<init>".equals(name)) {
                          return new MethodVisitor(Opcodes.ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {
                              @Override

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

                    protected void setUpNondexTesting() {
                        Logger.getGlobal().setLoggingLevel(Level.parse(this.nondexLoggingLevel));
                        String rtPathStr = "";
                        if (Utils.checkJDK8()) {
                            Path rtPath;

                  Method visitMethod has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @Override
                      public MethodVisitor visitMethod(int access, String name, String desc,
                                                       String signature, String[] exceptions) {
                          if ("<init>".equals(name)) {
                              return new MethodVisitor(Opcodes.ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {

                  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 visitMethod has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @Override
                      public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
                          if ("toString".equals(name)) {
                              return super.visitMethod(access, "originalToString", desc, signature, exceptions);
                          }

                  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 getClassInputStream has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private InputStream getClassInputStream(String className)
                              throws IOException {
                          InputStream clInputStream;
                          if (rtZipFile != null) {
                              try {

                  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 visit has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public void visit(int version, int access, String name, String signature,
                              String superName, String[] interfaces) {

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

                            private String debug() {
                                if (this.failingConfigurations.isEmpty()) {
                                    throw new RuntimeException("Tests need to first fail with NonDex to be debugged");
                                }
                    
                    

                    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 setupArgline has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        @Override
                        protected void setupArgline(Xpp3Dom configNode) {
                            String localRepo = this.mavenSession.getSettings().getLocalRepository();
                            String pathToNondex = this.getPathToNondexJar(localRepo);
                            String annotationsModuleName = "nondex-annotations";

                    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 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) {
                            Severity
                            Category
                            Status
                            Source
                            Language