CloudSlang/cs-actions

View on GitHub

Showing 3,994 of 4,023 total issues

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-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 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/SchedulerTime.java on lines 1..74

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/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 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/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

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

            final String authToken = AuthorizationTokenV2Impl.getToken(AuthorizationTokenInputs.builder()
                    .loginType(loginType)
                    .username(username)
                    .password(password)
                    .clientId(clientId)
cs-office-365/src/main/java/io/cloudslang/content/office365/actions/email/GetEmail.java on lines 158..170

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

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

    public OracleDbmsOutput(Connection conn) throws SQLException {
        retrieveOutputStatement = conn.prepareCall(
                "declare " +
                        "    one_line varchar2(255); " +
                        "    is_done number; " +
cs-oracle-cloud-databases/src/main/java/io/cloudslang/content/database/utils/OracleDbmsOutput.java on lines 25..40

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

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

            final String authToken = AuthorizationTokenV2Impl.getToken(AuthorizationTokenInputs.builder()
                    .loginType(loginType)
                    .username(username)
                    .password(password)
                    .clientId(clientId)
cs-office-365/src/main/java/io/cloudslang/content/office365/actions/email/SendEmail.java on lines 164..176

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

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

    public OracleDbmsOutput(Connection conn) throws SQLException {
        retrieveOutputStatement = conn.prepareCall(
                "declare " +
                        "    one_line varchar2(255); " +
                        "    is_done number; " +
cs-database/src/main/java/io/cloudslang/content/database/utils/OracleDbmsOutput.java on lines 32..47

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

    public LocalPingInputs(LocalPingInputsBuilder localPingInputsBuilder) {
        this.targetHost = localPingInputsBuilder.targetHost;
        this.packetSize = localPingInputsBuilder.packetSize;
        this.packetCount = localPingInputsBuilder.packetCount;
        this.timeout = localPingInputsBuilder.timeout;
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/inputs/IamInputs.java on lines 46..52
cs-dropbox/src/main/java/io/cloudslang/content/dropbox/entities/inputs/CommonInputs.java on lines 34..40

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

    private CommonInputs(Builder builder) {
        this.action = builder.action;
        this.accessToken = builder.accessToken;
        this.api = builder.api;
        this.endpoint = builder.endpoint;
cs-amazon/src/main/java/io/cloudslang/content/amazon/entities/inputs/IamInputs.java on lines 46..52
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/LocalPingInputs.java on lines 31..37

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 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-xml/src/main/java/io/cloudslang/content/xml/actions/SetValue.java on lines 1..95
cs-xml/src/main/java/io/cloudslang/content/xml/actions/XpathQuery.java on lines 1..88

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

    private IamInputs(Builder builder) {
        this.iamInstanceProfileArn = builder.iamInstanceProfileArn;
        this.iamInstanceProfileName = builder.iamInstanceProfileName;
        this.keyPairName = builder.keyPairName;
        this.securityGroupIdsString = builder.securityGroupIdsString;
cs-dropbox/src/main/java/io/cloudslang/content/dropbox/entities/inputs/CommonInputs.java on lines 34..40
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/LocalPingInputs.java on lines 31..37

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

    public static class GetChildrenInputsBuilder {

        private String source = EMPTY;
        private String delimiter = EMPTY;

cs-excel/src/main/java/io/cloudslang/content/excel/entities/ExcelCommonInputs.java on lines 52..75
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/Base64DecoderToFileInputs.java on lines 51..75

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

    public static class ExcelCommonInputsBuilder {
        private String excelFileName = EMPTY;
        private String worksheetName = EMPTY;

        ExcelCommonInputsBuilder() {
cs-filesystem/src/main/java/io/cloudslang/content/filesystem/entities/GetChildrenInputs.java on lines 48..68
cs-utilities/src/main/java/io/cloudslang/content/utilities/entities/Base64DecoderToFileInputs.java on lines 51..75

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

    public static boolean handleEmptyValue(String handleEmptyValue) throws ValidationException {
        try {
            handleEmptyValue = StringUtils.defaultIfEmpty(handleEmptyValue, DefaultInputValues.HANDLE_EMPTY_VALUE);
            return BooleanUtils.toBoolean(handleEmptyValue.toLowerCase(), String.valueOf(true), String.valueOf(false));
        } catch (IllegalArgumentException ex) {
cs-lists/src/main/java/io/cloudslang/content/utils/Validator.java on lines 33..40
cs-maps/src/main/java/io/cloudslang/content/maps/utils/BuilderUtils.java on lines 32..39

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

    public static boolean parseStripWhitespaces(String stripWhitespaces) throws Exception {
        try {
            stripWhitespaces = StringUtils.defaultIfEmpty(stripWhitespaces, DefaultInputValues.STRIP_WHITESPACES);
            return BooleanUtils.toBoolean(stripWhitespaces.toLowerCase(), String.valueOf(true), String.valueOf(false));
        } catch (IllegalArgumentException ex) {
cs-maps/src/main/java/io/cloudslang/content/maps/utils/BuilderUtils.java on lines 32..39
cs-maps/src/main/java/io/cloudslang/content/maps/utils/BuilderUtils.java on lines 41..48

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

    public static boolean parseStripWhitespaces(String stripWhitespaces) throws ValidationException {
        try {
            stripWhitespaces = StringUtils.defaultIfEmpty(stripWhitespaces, DefaultInputValues.STRIP_WHITESPACES);
            return BooleanUtils.toBoolean(stripWhitespaces.toLowerCase(), String.valueOf(true), String.valueOf(false));
        } catch (IllegalArgumentException ex) {
cs-lists/src/main/java/io/cloudslang/content/utils/Validator.java on lines 33..40
cs-maps/src/main/java/io/cloudslang/content/maps/utils/BuilderUtils.java on lines 41..48

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 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-xml/src/main/java/io/cloudslang/content/xml/actions/AddAttribute.java on lines 1..93
cs-xml/src/main/java/io/cloudslang/content/xml/actions/XpathQuery.java on lines 1..88

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

    public static class Base64DecoderInputsBuilder {

        private String filePath = EMPTY;
        private String contentBytes = EMPTY;

cs-excel/src/main/java/io/cloudslang/content/excel/entities/ExcelCommonInputs.java on lines 52..75
cs-filesystem/src/main/java/io/cloudslang/content/filesystem/entities/GetChildrenInputs.java on lines 48..68

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 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-xml/src/main/java/io/cloudslang/content/xml/actions/AddAttribute.java on lines 1..93
cs-xml/src/main/java/io/cloudslang/content/xml/actions/SetValue.java on lines 1..95

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