File ParserEntity.java
has 1387 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.uniks.networkparser.parser;
/*
The MIT License
ParserEntity
has 73 methods (exceeds 20 allowed). Consider refactoring. Open
public class ParserEntity {
public static final String NAME_TOKEN = "nameToken";
public static final String CLASS_BODY = "classBody";
Method handleComplexAttr
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
private boolean handleComplexAttr(String attrName, SymTabEntry symTabEntry,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab) {
GraphModel model = this.getClazz().getClassModel();
if (model == null) {
return 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 parseMemberDecl
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
private void parseMemberDecl() {
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
/* int preCommentEndPos = currentToken.preCommentEndPos; */
long startLine = getLine();
while (parseComment(true) != 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 nextToken
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public void nextToken() {
Token tmp = previousToken;
previousToken = currentToken;
currentToken = lookAheadToken;
- 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 parseExpression
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
private CharacterBuffer parseExpression(CharacterBuffer buffer) {
/* ... { ;;; } ; */
if (buffer == null) {
buffer = new CharacterBuffer();
}
- 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 parseMemberDecl
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void parseMemberDecl() {
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
/* int preCommentEndPos = currentToken.preCommentEndPos; */
long startLine = getLine();
while (parseComment(true) != null) {
Method parseBlock
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
private CharacterBuffer parseBlock(CharacterBuffer body, char stopChar) {
if (body == null) {
body = new CharacterBuffer();
}
char prevprevTokenKind;
- 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 handleComplexAttr
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
private boolean handleComplexAttr(String attrName, SymTabEntry symTabEntry,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab) {
GraphModel model = this.getClazz().getClassModel();
if (model == null) {
return false;
Method nextToken
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void nextToken() {
Token tmp = previousToken;
previousToken = currentToken;
currentToken = lookAheadToken;
Method getMethod
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
private Method getMethod(Method search) {
Clazz clazz = this.getClazz();
if (clazz == null) {
return search;
}
- 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 addMemberToModel
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public void addMemberToModel(boolean addStaticAttribute) {
if (code == null) {
return;
}
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab = code.getSymbolTab();
- 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 findMemberClass
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private Clazz findMemberClass(Clazz clazz, SymTabEntry memberName,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab) {
/* FIXME String[] split = memberName.split(":"); */
if (memberName == null) {
return 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 addMemberAsMethod
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
private void addMemberAsMethod(SymTabEntry symTabEntry,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symTab) {
if (symTabEntry == null) {
return;
}
- 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 skip
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public boolean skip(char string, boolean skipCRLF, CharacterBuffer body) {
if (currentTokenEquals(string)) {
if (skipCRLF) {
if (body != null) {
body.add(currentToken.originalText);
- 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 parseClassDecl
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void parseClassDecl() {
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
/* int preCommentEndPos = currentToken.preCommentEndPos; */
int startPosAnnotations = currentToken.startPos;
SymTabEntry nextEntity;
Method parseExpression
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
private CharacterBuffer parseExpression(CharacterBuffer buffer) {
/* ... { ;;; } ; */
if (buffer == null) {
buffer = new CharacterBuffer();
}
Method parseClassDecl
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private void parseClassDecl() {
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
/* int preCommentEndPos = currentToken.preCommentEndPos; */
int startPosAnnotations = currentToken.startPos;
SymTabEntry nextEntity;
- 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 parseBlock
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
private CharacterBuffer parseBlock(CharacterBuffer body, char stopChar) {
if (body == null) {
body = new CharacterBuffer();
}
char prevprevTokenKind;
Method addMemberAsMethod
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void addMemberAsMethod(SymTabEntry symTabEntry,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symTab) {
if (symTabEntry == null) {
return;
}
Method isAssoc
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private boolean isAssoc(String methodName, SimpleKeyValueList<String, SimpleList<SymTabEntry>> symTab) {
/* method starts with: with set get ... */
if (methodName == null) {
return 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 isGetterSetter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private boolean isGetterSetter(String methodName, SimpleKeyValueList<String, SimpleList<SymTabEntry>> symTab) {
/* method starts with: with set get ... */
if (methodName == null) {
return 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 parseTypeRef
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private String parseTypeRef() {
CharacterBuffer typeString = new CharacterBuffer();
/* (void | qualifiedName) <T1, T2> [] ... */
String typeName = SymTabEntry.TYPE_VOID;
if (currentTokenEquals(SymTabEntry.TYPE_VOID)) {
Method addMemberAsAttribut
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private void addMemberAsAttribut(SymTabEntry symTabEntry,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab, boolean addStaticAttribute) {
/* filter public static final constances */
if (symTabEntry == null) {
return;
- 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 parseClassBody
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private void parseClassBody() {
/* { classBodyDecl* } */
skip('{', true);
boolean isDebug = this.update instanceof DebugCondition;
code.withStartBody(currentToken.startPos, getLine());
- 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 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public Clazz parse(CharacterBuffer sequence) {
if (this.code == null) {
/* FIX IT */
this.code = new SourceCode();
this.code.with(new Clazz(""));
Method findMemberClass
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Clazz findMemberClass(Clazz clazz, SymTabEntry memberName,
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab) {
/* FIXME String[] split = memberName.split(":"); */
if (memberName == null) {
return null;
Method parseComment
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private CharacterBuffer parseComment(boolean newBlock) {
if (isComment() == false) {
return null;
}
SymTabEntry nextEntity = startNextSymTab(SymTabEntry.TYPE_COMMENT);
Method addMemberToModel
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void addMemberToModel(boolean addStaticAttribute) {
if (code == null) {
return;
}
SimpleKeyValueList<String, SimpleList<SymTabEntry>> symbolTab = code.getSymbolTab();
Method getMethod
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Method getMethod(Method search) {
Clazz clazz = this.getClazz();
if (clazz == null) {
return search;
}
Method parseTypeRef
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private String parseTypeRef() {
CharacterBuffer typeString = new CharacterBuffer();
/* (void | qualifiedName) <T1, T2> [] ... */
String typeName = SymTabEntry.TYPE_VOID;
if (currentTokenEquals(SymTabEntry.TYPE_VOID)) {
- 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 parseComment
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private CharacterBuffer parseComment(boolean newBlock) {
if (isComment() == false) {
return null;
}
SymTabEntry nextEntity = startNextSymTab(SymTabEntry.TYPE_COMMENT);
- 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 findRoleCard
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private int findRoleCard(String partnerTypeName, GraphModel model) {
int partnerCard = Association.ONE;
if (partnerTypeName == null) {
return partnerCard;
}
- 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 parseAnnotations
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private String parseAnnotations() {
String result = "";
while ("@".equals(currentWord())) {
result += currentWord();
- 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
Avoid deeply nested control flow statements. Open
if (previousTokenKindEquals('\\') == false || prevprevTokenKind == '\\') {
break;
}
Consider simplifying this complex logical expression. Open
if (methodName.startsWith("with") || methodName.startsWith("set") || methodName.startsWith("get")
|| methodName.startsWith("add") || methodName.startsWith("remove") || methodName.startsWith("create")) {
SimpleList<SymTabEntry> attributes = new SimpleList<SymTabEntry>();
for (String key : symTab.keySet()) {
Consider simplifying this complex logical expression. Open
if (methodName.startsWith("with") || methodName.startsWith("set") || methodName.startsWith("get")
|| methodName.startsWith("add") || methodName.startsWith("remove") || methodName.startsWith("create")) {
SimpleList<SymTabEntry> assoc = new SimpleList<SymTabEntry>();
for (String key : symTab.keySet()) {
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return; /* <==== sudden death */
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return findClassInModel(name);
Avoid too many return
statements within this method. Open
return modelClass;
Method parseFormalParamList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private String parseFormalParamList() {
StringBuilder paramList = new StringBuilder().append('(');
/* '(' (type name[,] )* ') [throws type , (type,)*] */
skip("(", true);
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
public Clazz parse(CharacterBuffer sequence) {
if (this.code == null) {
/* FIX IT */
this.code = new SourceCode();
this.code.with(new Clazz(""));
- 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 parseGenericTypeDefPart
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void parseGenericTypeDefPart(CharacterBuffer typeString) {
/* <T, T, ...> */
skip("<", false);
typeString.with('<');
- 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
FIXME found Open
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
- Exclude checks
FIXME found Open
/*FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME REMOVE */
- Exclude checks
FIXME found Open
/* FIXME .withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME int preCommentStartPos = currentToken.preCommentStartPos; */
- Exclude checks
TODO found Open
/* TODO: should check for superclass ModelSet */
- Exclude checks
FIXME found Open
/* FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME handleAssoc(memberName, card, partnerClassName, partnerClass, qualifiedName.substring("value.addTo".length())); */
- Exclude checks
FIXME found Open
/* FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME nextEntity.withPreComment(preCommentStartPos, preCommentEndPos); */
- Exclude checks
FIXME found Open
/* FIXME String[] split = memberName.split(":"); */
- Exclude checks
These nested if statements could be combined Open
if (previousTokenKindEquals('\\') == false || prevprevTokenKind == '\\') {
break;
}
- Read upRead up
- Exclude checks
CollapsibleIfStatements
Since: PMD 3.1
Priority: Medium
Categories: Style
Remediation Points: 50000
Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.
Example:
void bar() {
if (x) { // original implementation
if (y) {
// do stuff
}
}
}
void bar() {
if (x && y) { // optimized implementation
// do stuff
}
}
Avoid using a branching statement as the last in a loop. Open
break;
- Read upRead up
- Exclude checks
AvoidBranchingStatementAsLastInLoop
Since: PMD 5.0
Priority: Medium High
Categories: Style
Remediation Points: 50000
Using a branching statement as the last part of a loop may be a bug, and/or is confusing. Ensure that the usage is not a bug, or consider using another approach.
Example:
// unusual use of branching statement in a loop
for (int i = 0; i < 10; i++) {
if (i*i <= 25) {
continue;
}
break;
}
// this makes more sense...
for (int i = 0; i < 10; i++) {
if (i*i > 25) {
break;
}
}
These nested if statements could be combined Open
if (search.getReturnType().equals(method.getReturnType())) {
/* Check all Parameter */
ParameterSet searchParam = search.getParameters();
ParameterSet param = method.getParameters();
if (searchParam.size() == param.size()) {
- Read upRead up
- Exclude checks
CollapsibleIfStatements
Since: PMD 3.1
Priority: Medium
Categories: Style
Remediation Points: 50000
Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.
Example:
void bar() {
if (x) { // original implementation
if (y) {
// do stuff
}
}
}
void bar() {
if (x && y) { // optimized implementation
// do stuff
}
}
These nested if statements could be combined Open
if (logger != null) {
logger.debug(this, "parsing", "Parsing: " + getCurrentLine());
}
- Read upRead up
- Exclude checks
CollapsibleIfStatements
Since: PMD 3.1
Priority: Medium
Categories: Style
Remediation Points: 50000
Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.
Example:
void bar() {
if (x) { // original implementation
if (y) {
// do stuff
}
}
}
void bar() {
if (x && y) { // optimized implementation
// do stuff
}
}