Showing 1,573 of 2,662 total issues
File EvaluationSimplifier.java
has 685 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
File Processor.java
has 676 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
Method visitAnyInstruction
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
{
// Has the instruction been marked?
if (isInstructionNecessary(offset))
{
- 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 ZProtocol.java
has 666 lines of code (exceeds 250 allowed). Consider refactoring. Open
//#preprocess
/* *************************************************
* Copyright (c) 2010 - 2011
* HT srl, All rights reserved.
Method exploreField
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
protected static void exploreField(Field field, int deep, String[] history,
Debug debug, String deleteName) {
String tab = "";
- 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
ClassPrinter
has 79 methods (exceeds 20 allowed). Consider refactoring. Open
public class ClassPrinter
extends SimplifiedVisitor
implements ClassVisitor,
ConstantVisitor,
MemberVisitor,
Method parseClassSpecificationArguments
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
private ClassSpecification parseClassSpecificationArguments()
throws ParseException, IOException
{
// Clear the annotation type.
String annotationType = null;
- 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 CodeAttributeEditor.java
has 637 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
File ProgramClassReader.java
has 624 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
Method externalType
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
public static String externalType(String internalType)
{
// Strip the array part, if any.
int dimensionCount = internalArrayTypeDimensionCount(internalType);
if (dimensionCount > 0)
- 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 ClassUtil.java
has 619 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
Method execute
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public boolean execute(ClassPool programClassPool,
ClassPool libraryClassPool) throws IOException
{
// Check if we have at least some keep commands.
if (configuration.keep == null &&
- 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 DynamicMemberReferenceInitializer.java
has 604 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* ProGuard -- shrinking, optimization, obfuscation, and preverification
* of Java bytecode.
*
* Copyright (c) 2002-2011 Eric Lafortune (eric@graphics.cornell.edu)
File JSONObject.java
has 598 lines of code (exceeds 250 allowed). Consider refactoring. Open
//#preprocess
/* *************************************************
* Copyright (c) 2010 - 2012
* HT srl, All rights reserved.
Method execute
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void execute(ClassPool programClassPool,
ClassPool libraryClassPool) throws IOException
{
// Check if we have at least some keep commands.
if (configuration.keep == null &&
Method generalize
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
public ReferenceValue generalize(ReferenceValue other)
{
// If both types are identical, the generalization is the same too.
if (this.equals(other))
{
- 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
Consider simplifying this complex logical expression. Open
if (!programClass.equals(targetClass) &&
// Don't merge classes that must be preserved.
!KeepMarker.isKept(programClass) &&
!KeepMarker.isKept(targetClass) &&
Method parse
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
public void parse(Configuration configuration)
throws ParseException, IOException
{
while (nextWord != null)
{
- 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 requiredAccessFlags
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
private int requiredAccessFlags(boolean set,
String access,
String type)
throws BuildException
{
- 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 create
has 230 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static Instruction create(byte[] code, int offset)
{
Instruction instruction;
int index = offset;