Showing 3,994 of 4,023 total issues
Method build
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public GetMailAttachmentInput build() throws Exception {
GetMailAttachmentInput input = new GetMailAttachmentInput();
input.hostname = buildHostname(hostname);
- 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 getOvfTemplateAsString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
private String getOvfTemplateAsString(final String templatePath) throws IOException {
if (isOva(Paths.get(templatePath))) {
try (final TarArchiveInputStream tar = new TarArchiveInputStream(new FileInputStream(templatePath))) {
TarArchiveEntry entry;
- 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 findChildFolder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private ManagedObjectReference findChildFolder(ConnectionResources connectionResources, MorObjectHandler morObjectHandler,
ManagedObjectReference folder, String childName) throws Exception {
Object childEntity = new MorObjectHandler().getObjectProperties(connectionResources, folder, CHILD_ENTITY_PROPERTY);
if (childEntity instanceof ArrayOfManagedObjectReference) {
ArrayOfManagedObjectReference children = (ArrayOfManagedObjectReference) childEntity;
- 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 buildPort
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static Short buildPort(String port, boolean mandatory) throws Exception {
if (StringUtils.isEmpty(port)) {
if (!mandatory) {
return null;
} else {
- 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 getTransferVmdK
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private ITransferVmdkFrom getTransferVmdK(final String templateFilePathStr, final String vmdkName) throws IOException {
final Path templateFilePath = Paths.get(templateFilePathStr);
if (isOva(templateFilePath)) {
final TarArchiveInputStream tar = new TarArchiveInputStream(new FileInputStream(templateFilePathStr));
TarArchiveEntry entry;
- 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 detectOs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public OperatingSystemDetails detectOs(OsDetectorInputs osDetectorInputs) {
OperatingSystemDetails localOsSystemDetails = localOsDetectorService.detectOs(osDetectorInputs);
if (osDetectorHelperService.foundOperatingSystem(localOsSystemDetails)) {
return localOsSystemDetails;
}
- 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 detachDisksBody
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
public static String detachDisksBody(NutanixDetachDisksInputs nutanixDetachDisksInputs) 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 generatePasswordRules
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static List<CharacterRule> generatePasswordRules(RandomPasswordGeneratorInputs randomPasswordGeneratorInputs) {
List<CharacterRule> rules = new ArrayList<>();
if (Integer.parseInt(randomPasswordGeneratorInputs.getNumberOfLowerCaseCharacters()) > 0) {
rules.add(new CharacterRule(Characters.LowerCase, Integer.parseInt(randomPasswordGeneratorInputs.getNumberOfLowerCaseCharacters())));
- 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 verifyGenerateRandomPasswordInputs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
public static List<String> verifyGenerateRandomPasswordInputs(@NotNull final String passwordLength, @NotNull final String numberOfLowerCaseCharacters,
@NotNull final String numberOfUpperCaseCharacters, @NotNull final String numberOfNumericalCharacters,
@NotNull final String numberOfSpecialCharacters) throws Exception {
final List<String> exceptionMessages = new ArrayList<>();
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void init(String from, String to, String by, boolean reset, StepSerializableSessionObject session) throws CounterImplException {
/*
* If the session resource is not ini
*/
if (session.getValue() == null || endIndex.equals(session.getValue()) || reset) {
- 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 recursiveCopy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static void recursiveCopy(File src, File dest) throws IOException {
// Copy directory
if (src.isDirectory()) {
if (!dest.exists()) {
dest.mkdirs();
- 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 execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = IS_USER_IN_GROUP_NAME,
description = IS_USER_IN_GROUP_DESC,
outputs = {@Output(value = RETURN_RESULT, description = IS_USER_IN_GROUP_RETURN_RESULT_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = STATUS_CODE, description = STATUS_CODE_200_OK_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
Method setCredentials
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void setCredentials(String host, int port, String username, String password) throws UnsupportedOperationException {
if (host != null && host.length() > 0) {
throw new UnsupportedOperationException(getProtocolName() + " does not allow the host to be set.");
} else if (username != null && username.length() > 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 copyTo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private SSHOperationResult copyTo() {
try {
SSHOperationResult result = new SSHOperationResult();
if (checkAck(in) != 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 connect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private SecureFtpAction connect() throws Exception {
SecureFtpAction action = new SecureFtpAction();
if (cachedSession != null) {
action.connect(cachedSession);
} else if (privateKeyFile != null && privateKeyFile.length() > 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 execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = NAME,
description = DESC,
outputs = {
@Output(value = RETURN_RESULT, description = RETURN_RESULT_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_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
Method getUri
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static URI getUri(HttpClientInputs httpClientInputs) throws URISyntaxException, IllegalArgumentException {
URIBuilder uriBuilder = new URIBuilder(httpClientInputs.getHost());
boolean bEncodeQueryParams = !Boolean.parseBoolean(httpClientInputs.getQueryParamsAreURLEncoded());
boolean bEncodeQueryParamsAsForm = Boolean.parseBoolean(httpClientInputs.getQueryParamsAreFormEncoded());
- 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 execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = GET_DEPLOYMENT_STATUS,
description = GET_DEPLOYMENT_STATUS_DESC,
outputs = {
//Common outputs
@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
Method execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = GET_POD_LIST,
description = GET_POD_LIST_DESC,
outputs = {
//Common outputs
@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
Method execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = GET_DEPLOYMENT_LIST,
description = GET_DEPLOYMENT_LIST_DESCRIPTION,
outputs = {
//Common outputs
@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"