Showing 77 of 156 total issues
Method visitMethod
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
Method dump
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static byte[] dump(String type) {
ClassWriter cw = new ClassWriter(0);
FieldVisitor fv;
MethodVisitor mv;
Method addToString
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addToString() {
MethodVisitor mv = super.visitMethod(Opcodes.ACC_PUBLIC, "toString", "()Ljava/lang/String;", null, null);
mv.visitCode();
Label l0 = new Label();
Label l1 = new Label();
Method visitMethod
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
Method visitMethod
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
if ("getExceptionTypes".equals(name)) {
return new MethodVisitor(Opcodes.ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {
- Read upRead up
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 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
Method createJvmExecutionSpecWithArgs
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected JvmTestExecutionSpec createJvmExecutionSpecWithArgs(List<String> args, JvmTestExecutionSpec originalSpec) {
JavaForkOptions option = originalSpec.getJavaForkOptions();
option.setAllJvmArgs(args);
GradleVersion curGradleVersion = GradleVersion.current().getBaseVersion();
try {
Method visitMethod
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc,
String signature, String[] exceptions) {
if ("getExceptionTypes".equals(name)) {
return new MethodVisitor(Opcodes.ASM9, super.visitMethod(access, name, desc, signature, exceptions)) {
AbstractNonDexTest
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
public abstract class AbstractNonDexTest extends Test {
protected int nondexSeed = Integer.parseInt(ConfigurationDefaults.DEFAULT_SEED_STR);
@Option(option = ConfigurationDefaults.PROPERTY_SEED, description = "The seed that is used for randomization during shuffling.")
public void setNondexSeed(String seed) {
Method addNextIndex
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addNextIndex() {
MethodVisitor mv = super.visitMethod(Opcodes.ACC_PROTECTED, "nextIndex", "()I", null, null);
mv.visitCode();
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitFieldInsn(Opcodes.GETFIELD, "java/util/IdentityHashMap$IdentityHashMapIterator", "this$0",
Method printAndGetSummary
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private boolean printAndGetSummary(Configuration config) {
Set<String> allFailures = new LinkedHashSet<>();
Map<String, Integer> countsOfFailingTestsWithoutShuffling = new LinkedHashMap<>();
boolean failsWithoutShuffling = false;
Logger.getGlobal().log(Level.INFO, "NonDex SUMMARY:");
- Read upRead up
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
File Instrumenter.java
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
The MIT License (MIT)
Copyright (c) 2015 Alex Gyori
Copyright (c) 2022 Kaiyao Ke
Copyright (c) 2015 Owolabi Legunsen
File IdentityHashMapShufflingAdder.java
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
The MIT License (MIT)
Copyright (c) 2015 Alex Gyori
Copyright (c) 2022 Kaiyao Ke
Copyright (c) 2015 Owolabi Legunsen
File NonDexDebug.java
has 289 lines of code (exceeds 250 allowed). Consider refactoring. Open
package edu.illinois.nondex.gradle.tasks;
import com.google.common.collect.LinkedListMultimap;
import edu.illinois.nondex.common.Configuration;
import edu.illinois.nondex.common.ConfigurationDefaults;
Method visitMethod
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
- Read upRead up
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 printSummary
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private void printSummary(Configuration config) {
Set<String> allFailures = new LinkedHashSet<>();
Map<String, Integer> countsOfFailingTestsWithoutShuffling =
new LinkedHashMap<String, Integer>();
boolean failsWithoutShuffling = false;
- Read upRead up
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 20 (exceeds 5 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
- Read upRead up
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 19 (exceeds 5 allowed). Consider refactoring. Open
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("hasNext".equals(name)) {
return super.visitMethod(access, "originalHasNext", desc, signature, exceptions);
}
- Read upRead up
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
Configuration
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public class Configuration {
public final Mode mode;
public final int seed;
public final Pattern filter;
Method generateHtml
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void generateHtml(Set<String> allFailures, Configuration config) {
String head = "<!DOCTYPE html>"
+ "<html>"
+ "<head>"
+ "<title>Test Results</title>"
- Read upRead up
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"