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 List<String> verifyInputsSFTPRename(String remotePath,
                                                      String newRemotePath,
                                                      String host,
                                                      String port,
                                                      String username,
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 74..94
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 369..386

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 68.

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

    public static List<String> verifyGetChildrenInputsSFTP(
            @Nullable final String host,
            @Nullable final String port,
            @Nullable final String username,
            @Nullable final String password,
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 369..386
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 388..406

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 68.

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

    @NotNull
    private static List<String> addVerifyPositiveNumber(@NotNull List<String> exceptions, @NotNull final String input, @NotNull final String inputName) {

        if (!NumberUtilities.isValidInt(input)) {
            exceptions.add(String.format(EXCEPTION_INVALID_NUMBER, input, inputName));
cs-tesseract/src/main/java/io/cloudslang/content/tesseract/utils/InputsValidation.java on lines 124..132
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/InputsValidation.java on lines 63..71

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 68.

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

    @NotNull
    private static List<String> addVerifyNumber(@NotNull List<String> exceptions, @Nullable final String input, @NotNull final String inputName) {
        if (!NumberUtilities.isValidInt(input)) {
            exceptions.add(String.format(EXCEPTION_INVALID_NUMBER, input, inputName));
        } else if (Integer.parseInt(input) <= 0) {
cs-oracle-cloud-databases/src/main/java/io/cloudslang/content/database/utils/InputsValidation.java on lines 108..117
cs-vmware-commons/src/main/java/io/cloudslang/content/vmware/commons/utils/InputsValidation.java on lines 63..71

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 68.

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

    @NotNull
    private static List<String> addVerifyPositiveNumber(@NotNull List<String> exceptions, @NotNull final String input, @NotNull final String inputName) {
        if (!NumberUtilities.isValidInt(input)) {
            exceptions.add(String.format(EXCEPTION_INVALID_NUMBER, input, inputName));
        } else if (Integer.parseInt(input) < 0) {
cs-oracle-cloud-databases/src/main/java/io/cloudslang/content/database/utils/InputsValidation.java on lines 108..117
cs-tesseract/src/main/java/io/cloudslang/content/tesseract/utils/InputsValidation.java on lines 124..132

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 68.

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

    public static List<String> verifyDeleteFileInputs(String remoteFile,
                                                String remotePath,
                                                String host,
                                                String port,
                                                String username,
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 74..94
cs-rft/src/main/java/io/cloudslang/content/rft/utils/InputsValidation.java on lines 388..406

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 68.

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 Map<String, String> result = StreamingJobImpl.getStreamingJob(GetStreamingJobInputs.builder().
                    azureCommonInputs(AzureCommonInputs.builder().apiVersion(apiVersion).authToken(authToken)
                            .resourceGroupName(resourceGroupName).subscriptionId(subscriptionId).jobName(jobName).proxyPort(proxyPort)
                            .proxyHost(proxyHost).proxyUsername(proxyUsername).proxyPassword(proxyPassword).trustAllRoots(trustAllRoots)
                            .x509HostnameVerifier(x509HostnameVerifier).trustKeystore(trustKeystore).trustPassword(trustPassword).build())
cs-azure/src/main/java/io/cloudslang/content/azure/actions/streamanalytics/streamingjobs/StartStreamingJob.java on lines 104..109

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 68.

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

            return StreamingJobImpl.startStreamingJob(StartStreamingJobInputs.builder().
                    azureCommonInputs(AzureCommonInputs.builder().apiVersion(apiVersion).authToken(authToken)
                            .resourceGroupName(resourceGroupName).subscriptionId(subscriptionId).jobName(jobName).proxyPort(proxyPort)
                            .proxyHost(proxyHost).proxyUsername(proxyUsername).proxyPassword(proxyPassword).trustAllRoots(trustAllRoots)
                            .x509HostnameVerifier(x509HostnameVerifier).trustKeystore(trustKeystore).trustPassword(trustPassword).build())
cs-azure/src/main/java/io/cloudslang/content/azure/actions/streamanalytics/streamingjobs/GetStreamingJob.java on lines 109..114

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 68.

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

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

    public static String urlEncodeQueryParams(String params, boolean urlEncode) throws UrlEncodeException {
        String encodedParams = params;
        if (!urlEncode) {
            try {
                encodedParams = URLDecoder.decode(params, DEFAULT_CHARACTER_SET);
cs-httpclient-commons/src/main/java/io/cloudslang/content/httpclient/services/UriBuilder.java on lines 91..104

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 67.

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

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

    private static String urlEncodeQueryParams(String params, boolean urlEncode) throws UrlEncodeException {
        String encodedParams = params;
        if (!urlEncode) {
            try {
                encodedParams = URLDecoder.decode(params, UTF_8);
cs-http-client/src/main/java/io/cloudslang/content/httpclient/build/Utils.java on lines 67..80

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 67.

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

    @Test
    public void isValidDbTypeValid() throws Exception {
        assertTrue(isValidDbType(ORACLE_DB_TYPE));
        assertTrue(isValidDbType(MSSQL_DB_TYPE));
        assertTrue(isValidDbType(SYBASE_DB_TYPE));
cs-database/src/test/java/io/cloudslang/content/database/utils/SQLInputsValidatorTest.java on lines 208..218

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 67.

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

    @Test
    public void isNotValidDbTypeInvalid() throws Exception {
        assertFalse(isNotValidDbType(ORACLE_DB_TYPE));
        assertFalse(isNotValidDbType(MSSQL_DB_TYPE));
        assertFalse(isNotValidDbType(SYBASE_DB_TYPE));
cs-database/src/test/java/io/cloudslang/content/database/utils/SQLInputsValidatorTest.java on lines 184..194

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 67.

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 12 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-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 locations. Consider refactoring.
Open

/*
 * Copyright 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/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 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/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 locations. Consider refactoring.
Open

/*
 * Copyright 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/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 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/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 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/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 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/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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 12 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-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/GetTimeFormat.java on lines 1..75
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/utils/SchedulerTime.java on lines 1..74
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/GetTimeFormat.java on lines 1..75
cs-azure/src/main/java/io/cloudslang/content/azure/actions/utils/SchedulerTime.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/ConvertEpochTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/EpochTimeDifference.java on lines 1..74
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTime.java on lines 1..72
cs-date-time/src/main/java/io/cloudslang/content/datetime/actions/scheduler/SchedulerTimeByHours.java on lines 1..72
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/ConvertEpochTime.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/EpochTimeDifference.java on lines 1..74
cs-utilities/src/main/java/io/cloudslang/content/utilities/actions/SchedulerTimeByHours.java on lines 1..76

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 66.

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