CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    public static String[] reverse(String[] list) {
        String[] reversed = new String[list.length];
        for (int count = 0; count < list.length; count++) {
            reversed[reversed.length - count - 1] = list[count];
        }
cs-lists/src/main/java/io/cloudslang/content/utils/ListProcessor.java on lines 63..69
cs-lists/src/main/java/io/cloudslang/content/utils/ListProcessor.java on lines 71..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            MapComparatorInput input = new MapComparatorInput.Builder()
                    .map1(map1)
                    .map1PairDelimiter(map1PairDelimiter)
                    .map1EntryDelimiter(map1EntryDelimiter)
                    .map1Start(map1Start)
cs-xml/src/main/java/io/cloudslang/content/xml/actions/Validate.java on lines 137..153

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @NotNull
    private static List<String> addVerifyx509HostnameVerifier(@NotNull List<String> exceptions, @NotNull final String input, @NotNull final String inputName) {
        List<String> x509HostnameVerifiers = new ArrayList<>();
        x509HostnameVerifiers.add("strict");
        x509HostnameVerifiers.add("allow_all");
cs-winrm/src/main/java/io/cloudslang/content/winrm/utils/InputsValidation.java on lines 143..152

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        final CommonInputs inputs = new CommonInputs.CommonInputsBuilder()
                .withXmlDocument(xmlDocument)
                .withXmlDocumentSource(xmlDocumentSource)
                .withUsername(username)
                .withPassword(password)
cs-maps/src/main/java/io/cloudslang/content/maps/actions/MapComparatorAction.java on lines 134..150

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    public static List<String> verifyIsUserInGroupInputs(@Nullable final String userPrincipalName,
                                                         @Nullable final String userId,
                                                         @Nullable final String securityEnabledGroups,
                                                         @Nullable final String proxyPort,
                                                         @Nullable final String trust_all_roots,
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 249..269

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @NotNull
    private static List<String> addVerifyAuthType(@NotNull List<String> exceptions, @NotNull final String input, @NotNull final String inputName) {
        List<String> authTypes = new ArrayList<>();
        authTypes.add("basic");
        authTypes.add("ntlm");
cs-winrm/src/main/java/io/cloudslang/content/winrm/utils/InputsValidation.java on lines 154..163

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    @NotNull
    public static List<String> verifyLicenseInputs(@Nullable final String userPrincipalName,
                                                   @Nullable final String userId,
                                                   @Nullable final String licenses,
                                                   @Nullable final String proxyPort,
cs-microsoft-ad/src/main/java/io/cloudslang/content/microsoftAD/utils/InputsValidation.java on lines 202..223

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    if(!isEmpty(proxyUsername) && !isEmpty(proxyPassword)){
                        String value = proxyUsername + ":" + proxyPassword;
                        byte[] encodedValue = Base64.encodeBase64(value.getBytes(StandardCharsets.UTF_8));
                        headers.add(new BasicHeader("Proxy-Authorization", "Basic " + new String(encodedValue)));
                    }
cs-http-client/src/main/java/io/cloudslang/content/httpclient/build/auth/AuthSchemeProviderLookupBuilder.java on lines 132..136

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    if(!isEmpty(username) && !isEmpty(password)) {
                        String value = username + ":" + password;
                        byte[] encodedValue = Base64.encodeBase64(value.getBytes(StandardCharsets.UTF_8));
                        headers.add(new BasicHeader("Authorization", "Basic " + new String(encodedValue)));
                    }
cs-http-client/src/main/java/io/cloudslang/content/httpclient/build/auth/AuthSchemeProviderLookupBuilder.java on lines 127..131

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 70.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/MonitoringState.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. 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.
 *
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Affinity.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Architecture.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/Hypervisor.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceInitiatedShutdownBehavior.java on lines 1..58
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/InstanceLifecycle.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/ProductCodeType.java on lines 1..59
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/aws/VirtualizationType.java on lines 1..59

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. 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.
 *
cs-alibaba/src/main/java/io/cloudslang/content/alibaba/utils/constants/Outputs.java on lines 1..33
cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DatetimeInputs.java on lines 1..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. 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.
 *
cs-date-time/src/main/java/io/cloudslang/content/datetime/utils/DatetimeInputs.java on lines 1..38
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/constants/Inputs.java on lines 1..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. 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.
 *
cs-alibaba/src/main/java/io/cloudslang/content/alibaba/utils/constants/Outputs.java on lines 1..33
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/constants/Inputs.java on lines 1..38

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 69.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language