Showing 2,058 of 4,022 total issues
File QueryApiExecutorTest.java
has 1250 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2019-2024 Open Text
* This program and the accompanying materials
* are made available under the terms of the Apache License v2.0 which accompany this distribution.
*
File VmServiceTest.java
has 1124 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2019-2024 Open Text
* This program and the accompanying materials
* are made available under the terms of the Apache License v2.0 which accompany this distribution.
*
Method equals
has a Cognitive Complexity of 110 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof SQLInputs)) return false;
final SQLInputs other = (SQLInputs) o;
if (!other.canEqual((Object) this)) 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 getQueryParamsMap
has 409 lines of code (exceeds 25 allowed). Consider refactoring. Open
private Map<String, String> getQueryParamsMap(String action) {
Map<String, String> queryParamsMap = new HashMap<>();
queryParamsMap.put("Action", action);
queryParamsMap.put("Version", "2016-04-01");
HttpClientInputs
has 98 methods (exceeds 20 allowed). Consider refactoring. Open
public class HttpClientInputs {
public static final String URL = "url";
public static final String TLS_VERSION = "tlsVersion";
public static final String ALLOWED_CYPHERS = "allowedCyphers";
QueryApiExecutorTest
has 92 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(PowerMockRunner.class)
@PrepareForTest({HttpClientService.class, AmazonSignatureService.class, QueryApiExecutor.class, ParamsMapBuilder.class, InputsUtil.class})
public class QueryApiExecutorTest {
private static final String HEADERS = "Accept:text/plain\r\n Content-Type:application/json";
private static final String ALL_RESOURCE_TYPES = "customer-gateway,dhcp-options,image,instance,internet-gateway,network-acl,network-interface,reserved-instances,route-table,security-group,snapshot,spot-instances-request,subnet,volume,vpc,vpn-connection,vpn-gateway";
Method execute
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = "Http Client",
outputs = {
@Output(EXCEPTION),
@Output(STATUS_CODE),
@Output(FINAL_LOCATION),
- 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 AttachDisksBody
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
public static String AttachDisksBody(NutanixAttachDisksInputs nutanixAttachDisksInputs) throws
NutanixDetachDiskException {
String requestBody = EMPTY;
ObjectMapper detachDisksMapper = new ObjectMapper();
- 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 getFilesAndFolders
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
private void getFilesAndFolders(SFTPGetChildrenInputs sftpGetChildrenInputs) throws Exception {
String remotePath = BACKSLASH + sftpGetChildrenInputs.getRemotePath();
String delimiter = sftpGetChildrenInputs.getDelimiter();
Vector lsOutput = channel.ls(remotePath);
- 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
Function execute
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = UPDATE_SQL_INSTANCE_OPERATION_NAME,
description = UPDATE_SQL_INSTANCE_OPERATION_DESCRIPTION,
outputs = Array(
new Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
new Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
- 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
SQLInputs
has 70 methods (exceeds 20 allowed). Consider refactoring. Open
public class SQLInputs {
private String sqlCommand;
private String dbServer;
private String dbName;
private int dbPort;
File SQLInputs.java
has 597 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2019-2024 Open Text
* This program and the accompanying materials
* are made available under the terms of the Apache License v2.0 which accompany this distribution.
*
File HttpClientInputs.java
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2022-2024 Open Text
* This program and the accompanying materials
* are made available under the terms of the Apache License v2.0 which accompany this distribution.
*
File ClusterComputeResourceServiceTest.java
has 585 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright 2019-2024 Open Text
* This program and the accompanying materials
* are made available under the terms of the Apache License v2.0 which accompany this distribution.
*
Method executeSqlCommand
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public static String executeSqlCommand(final SQLInputs sqlInputs) throws Exception {
final ConnectionService connectionService = new ConnectionService();
try (final Connection connection = connectionService.setUpConnection(sqlInputs)){
connection.setReadOnly(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 build
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public SSLConnectionSocketFactory build() {
if (!"true".equalsIgnoreCase(trustAllRootsStr) && !"false".equalsIgnoreCase(trustAllRootsStr)) {
throw new IllegalArgumentException("'trustAllRoots' can only be 'true' or 'false'");
}
boolean trustAllRoots = Boolean.parseBoolean(trustAllRootsStr);
- 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 updateWorkspaceVariables
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
public static Map<String, Map<String, String>> updateWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception {
String workspaceVariableName;
String workspaceVariableValue;
String sensitiveWorkspaceVariableValue;
- 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 WorkspaceVariableImpl.java
has 523 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.cloudslang.content.hashicorp.terraform.services;
import com.fasterxml.jackson.core.JsonProcessingException;
Method getRowIndex
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
private static String getRowIndex(final Sheet worksheet,
final int firstRow,
final String input,
final int columnIndex,
final String operator) {
- 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 VariableImpl.java
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
package io.cloudslang.content.hashicorp.terraform.services;
import com.fasterxml.jackson.core.JsonProcessingException;