Showing 3,994 of 4,023 total issues
Method setDataRows
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static int setDataRows(final Sheet worksheet, final String rowData, final String rowDelimiter, final String columnDelimiter,
final List<Integer> rowIndexList, final List<Integer> columnIndexList) {
Method deleteInstance
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static String deleteInstance(final String proxyHost,
final String proxyPort,
final String proxyUsername,
final String proxyPassword,
final String instanceId,
Method execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Action(name = "Get user from Office 365",
outputs = {
@Output(value = RETURN_RESULT, description = GET_USER_RETURN_RESULT_DESC),
@Output(value = RETURN_CODE, description = RETURN_CODE_DESC),
@Output(value = DOCUMENT, description = DOCUMENT_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 getResponse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private static AcsResponse getResponse(final String proxyHost,
final String proxyPort,
final String proxyUsername,
final String proxyPassword,
final IAcsClient client,
Method allocatePublicIpAddress
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static String allocatePublicIpAddress(final String proxyHost,
final String proxyPort,
final String proxyUsername,
final String proxyPassword,
final String instanceId,
Method verifyAuthorizationInputs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static List<String> verifyAuthorizationInputs(@Nullable final String loginType, @Nullable final String clientId, @Nullable final String clientSecret, @Nullable final String username, @Nullable final String password, @NotNull final String proxyPort) {
Method validateInt
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public Validator validateInt(@NotNull final String intValue, @NotNull final String inputName, @NotNull final int lowerBound, @NotNull final int upperBound, @NotNull final boolean includeLowerBound, @NotNull final boolean includeUpperBound) {
Method setConnectionParameters
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static void setConnectionParameters(HttpClientInputs httpClientInputs,
@NotNull final String connectTimeout,
@NotNull final String socketTimeout,
@NotNull final String keepAlive,
@NotNull final String connectionsMaxPerRoot,
Avoid deeply nested control flow statements. Open
if (part != null && part.getFileName() != null &&
(MimeUtility.decodeText(part.getFileName()).equalsIgnoreCase(attachment) ||
part.getFileName().equalsIgnoreCase(attachment))
) {
String disposition = part.getDisposition();
Method getOvfMappings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static Map<String, String> getOvfMappings(String keysJson, String valuesJson) throws Exception {
Map<String, String> map = new HashMap<>();
List<String> keys = resolveJSONStringArrayParm(keysJson);
List<String> values = resolveJSONStringArrayParm(valuesJson);
if (keys != null && values != 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 createVirtualDisk
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private VirtualDisk createVirtualDisk(String volumeName, int controllerKey, int unitNumber, int key, VmInputs vmInputs,
String parameter) throws Exception {
Method updateVM
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Map<String, String> updateVM(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler().getMor(connectionResources,
ManagedObjectType.VIRTUAL_MACHINE.getValue(), vmInputs.getVirtualMachineName());
- 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 getMorFolder
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public ManagedObjectReference getMorFolder(String folderName, ConnectionResources connectionResources)
throws Exception {
if (StringUtils.contains(folderName, "/")) {
return getSpecificMorFolder(connectionResources, folderName);
} 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
Avoid deeply nested control flow statements. Open
if (mm.getBodyPart(j).getContent() instanceof String) {
BodyPart bodyPart = mm.getBodyPart(j);
if ((characterSet != null) && (characterSet.trim().length() > 0)) {
String contentType = bodyPart.getHeader(CONTENT_TYPE)[0];
contentType = contentType
Avoid deeply nested control flow statements. Open
for (PropertyChange propchg : objup.getChangeSet()) {
updateValues(endWaitProps, endValues, propchg);
updateValues(filterProps, filterValues, propchg);
}
Avoid deeply nested control flow statements. Open
if (stateElement != null && stateElement.getFirstChild() != null) {
stateVal = stateElement.getFirstChild().getTextContent();
reached = expctdval.toString().equalsIgnoreCase(stateVal);
}
Avoid deeply nested control flow statements. Open
if (slots[counter] != OCCUPIED) {
controllerKey = virtualScsiController.getKey();
unitNumber = counter;
isAtapiCtrlAvailable = true;
break;
Avoid deeply nested control flow statements. Open
if (input.isEncryptedMessage() && part.getContentType() != null &&
part.getContentType().matches(SecurityConstants.ENCRYPTED_CONTENT_TYPE)) {
part = decryptPart((MimeBodyPart) part);
}
Avoid deeply nested control flow statements. Open
if (disposition != null && disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
String partPrefix = part.getContentType().toLowerCase();
if (partPrefix.startsWith(MimeTypes.TEXT_PLAIN)) {
String attachmentContent = attachmentToString(part, characterSet);
results.put(io.cloudslang.content.constants.OutputNames.RETURN_RESULT, MimeUtility.decodeText(attachmentContent));
Method AddNicBody
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@NotNull
public static String AddNicBody(NutanixAddNicInputs nutanixAttachNicInputs) {
String requestBody = EMPTY;
ObjectMapper AttachNicMapper = new ObjectMapper();
AddNicRequestBody AddNicBody = new AddNicRequestBody();
- 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"