Showing 195 of 203 total issues
Consider simplifying this complex logical expression. Open
if (__a < 0 || __a > 255 || __r < 0 || __r > 255 ||
__g < 0 || __g > 255 || __b < 0 || __b > 255)
throw new IllegalArgumentException(String.format(
"EB3t %d %d %d %d", __a, __r, __g, __b));
Consider simplifying this complex logical expression. Open
if (__r < 0 || __r > 255 ||
__g < 0 || __g > 255 ||
__b < 0 || __b > 255 ||
__a < 0 || __a > 255)
throw new IllegalArgumentException("AH0t");
Consider simplifying this complex logical expression. Open
if (__o < 0 || __sl < 0 || __x < 0 || __y < 0 ||
__w <= 0 || __h <= 0 || __x + __w > imgW || __y + __h > imgH)
throw new IllegalArgumentException("IOOB");
Consider simplifying this complex logical expression. Open
if (__ver == null || __cf == null || __tn == null || __pool == null ||
__mf == null || __mn == null || __mt == null || __avs == null)
throw new NullPointerException("NARG");
Consider simplifying this complex logical expression. Open
if (__a < 0 || __a > 255 || __r < 0 || __r > 255 ||
__g < 0 || __g > 255 || __b < 0 || __b > 255)
throw new IllegalArgumentException(String.format(
"EB0f %d %d %d %d", __a, __r, __g, __b));
Consider simplifying this complex logical expression. Open
else if (!((c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
c == '_' || c == '/'))
throw new IllegalArgumentException("CW09 " + __fileName);
Consider simplifying this complex logical expression. Open
if (__ver == null || __cf == null || __tn == null ||
__in == null || __fs == null || __ms == null || __icl == null ||
__at == null)
throw new NullPointerException("NARG");
Consider simplifying this complex logical expression. Open
if (__at < 0 || __at >= size || (__at + __l) > size ||
(__at + __l) < 0 || __o < 0 || __l < 0 ||
(__o + __l) > __b.length || (__o + __l) < 0)
throw new IndexOutOfBoundsException(
String.format("write(%d, %h, %d, %d) in %d from %d",
Consider simplifying this complex logical expression. Open
else if (__in instanceof boolean[] ||
__in instanceof byte[] ||
__in instanceof short[] ||
__in instanceof char[] ||
__in instanceof int[] ||
Consider simplifying this complex logical expression. Open
if (__a < 0 || __a > 255 || __r < 0 || __r > 255 ||
__g < 0 || __g > 255 || __b < 0 || __b > 255)
throw new IllegalArgumentException(String.format(
"EB2y %d %d %d %d", __a, __r, __g, __b));
Method __drawText
has 108 lines of code (exceeds 100 allowed). Consider refactoring. Open
final void __drawText(Text __t, int __x, int __y, int __anchor)
throws NullPointerException
{
if (__t == null)
throw new NullPointerException("NARG");
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Override
@SquirrelJMEVendorApi
public IApplication newInstance()
throws Throwable
{
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 169.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Override
@SquirrelJMEVendorApi
public StarApplication newInstance()
throws Throwable
{
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 169.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method readUTF
has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring. Open
@Api
public static final String readUTF(DataInput __in)
throws EOFException, IOException, NullPointerException,
UTFDataFormatException
{
- 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 __keyCode
has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring. Open
private static int __keyCode(int __keyCode, char __keyChar)
{
// Function keys, these come in two groups
if (__keyCode >= KeyEvent.VK_F1 && __keyCode <= KeyEvent.VK_F12)
return NonStandardKey.F1 + (__keyCode - KeyEvent.VK_F1);
- 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 monitorWait
has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring. Open
public final int monitorWait(SpringThread __by, long __ms, int __ns)
throws NullPointerException
{
if (__by == null)
throw new NullPointerException("NARG");
- 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 parse
has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring. Open
public void parse()
throws IOException
{
DataInputStream in = this.in;
NativeImageLoadCallback loader = this.loader;
- 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
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void read(int __at, byte[] __b, int __o, int __l)
throws IndexOutOfBoundsException, NullPointerException, VMException
{
if (__b == null)
throw new NullPointerException("NARG");
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 163.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public void write(int __at, byte[] __b, int __o, int __l)
throws IndexOutOfBoundsException, NullPointerException, VMException
{
if (__b == null)
throw new NullPointerException("NARG");
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 163.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Method start
has 104 lines of code (exceeds 100 allowed). Consider refactoring. Open
public static TaskBracket start(
JarPackageBracket[] __classPath, String __mainClass, String[] __args,
String[] __sysPropPairs, int __stdOut, int __stdErr)
throws MLECallError
{