Showing 118 of 209 total issues
Method take
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public <T> T take(final Class<T> type) {
final Object res;
if (type.equals(Long.class)) {
res = new BytesOf(this.take()).asNumber(Long.class);
} else if (type.equals(Double.class)) {
- 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 asNumber
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public <T extends Number> T asNumber(final Class<T> type) {
final byte[] ret = this.take();
final Object res;
final ByteBuffer buf = ByteBuffer.wrap(ret);
- 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 enterBeginner
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
@SuppressWarnings("PMD.ConfusingTernary")
public void enterBeginner(final EoParser.BeginnerContext ctx) {
this.startObject(ctx);
if (ctx.data() == 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 exec
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void exec() throws IOException {
if (this.offline) {
Logger.info(
this,
- 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 exec
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void exec() {
final Collection<ForeignTojo> tojos = this.scopedTojos().notDiscovered();
final Collection<String> discovered = new HashSet<>();
for (final ForeignTojo tojo : tojos) {
- 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 enterMetas
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void enterMetas(final EoParser.MetasContext ctx) {
this.dirs.addIf("metas");
for (final TerminalNode node : ctx.META()) {
final String[] pair = node.getText().split(" ", 2);
- 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 CreateFile
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
String name,
int access,
int mode,
SECURITY_ATTRIBUTES security,
int disposition,
Method buildChecked
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void buildChecked(final Path cache) throws IOException {
final File project = this.lib.resolve(this.name).toFile();
final File cached = cache
.resolve("Lib")
.resolve(this.name)
- 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 exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void exec() {
if (this.central == null) {
this.central = new Central(this.project, this.session, this.manager);
}
- 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 deps
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private Collection<Dependency> deps() {
Iterable<Dependency> deps = new DcsDefault(
this.scopedTojos(),
this.discoverSelf,
this.skipZeroVersions
- 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 lambda
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Phi lambda() throws Exception {
final Phi match = this.take(Attr.RHO);
final InputStream bais = new ByteArrayInputStream(
new Dataized(match.take(Attr.RHO).take("serialized")).take()
- 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 exec
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void exec() {
if (this.sourcesDir == null) {
throw new IllegalArgumentException(
String.format("sourcesDir is null. Please specify a valid sourcesDir for %s", this)
- 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 lambda
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Phi lambda() throws Exception {
final String format = new Dataized(this.take("format")).asString();
final Phi args = this.take("args");
final Phi retriever = args.take("at");
- 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 lookAhead
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void lookAhead() {
final Token current = this.getToken();
final Token next = super.nextToken();
if (next.getType() == EoParser.EOL
&& (current == null || current.getType() != EoParser.EOL)) {
- 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 syntaxError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
final Recognizer<?, ?> recognizer,
final Object symbol,
final int line,
final int position,
final String msg,
Method WriteFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
HANDLE handle,
byte[] buffer,
int count,
IntByReference written,
OVERLAPPED overlapped
Method ReadFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
HANDLE handle,
byte[] buffer,
int count,
IntByReference read,
WinBase.OVERLAPPED overlapped
Method safeMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("PMD.AvoidCatchingGenericException")
private static String safeMessage(final Phi enclosure) {
String result;
if (enclosure == null) {
result = "null Phi";
- 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 numberOfLeadingZeros
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static byte numberOfLeadingZeros(final byte num) {
final byte result;
if (num == 0) {
result = (byte) Byte.SIZE;
} else if (num < 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
Method artifact
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static Optional<Dependency> artifact(final Path file) {
final Collection<String> coords;
try {
coords = new XMLDocument(file).xpath(
"//meta[head='rt' and part[1]='jvm']/part[2]/text()"
- 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"