CloudSlang/cloud-slang

View on GitHub

Showing 132 of 463 total issues

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ActionModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/BasicTransformModellingResult.java on lines 1..38
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseMetadataModellingResult.java on lines 1..32
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/SystemPropertyModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/WorkflowModellingResult.java on lines 1..35

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

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ActionModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/BasicTransformModellingResult.java on lines 1..38
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ExecutableModellingResult.java on lines 1..36
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseMetadataModellingResult.java on lines 1..32
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/SystemPropertyModellingResult.java on lines 1..35

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

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/BasicTransformModellingResult.java on lines 1..38
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ExecutableModellingResult.java on lines 1..36
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseMetadataModellingResult.java on lines 1..32
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/SystemPropertyModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/WorkflowModellingResult.java on lines 1..35

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

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ActionModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/BasicTransformModellingResult.java on lines 1..38
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ExecutableModellingResult.java on lines 1..36
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/SystemPropertyModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/WorkflowModellingResult.java on lines 1..35

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

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ActionModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/BasicTransformModellingResult.java on lines 1..38
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ExecutableModellingResult.java on lines 1..36
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseMetadataModellingResult.java on lines 1..32
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/WorkflowModellingResult.java on lines 1..35

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

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

/*******************************************************************************
 * (c) Copyright 2016 Hewlett-Packard Development Company, L.P.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0 which accompany this distribution.
 *
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ActionModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ExecutableModellingResult.java on lines 1..36
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseMetadataModellingResult.java on lines 1..32
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/ParseModellingResult.java on lines 1..37
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/StepModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/SystemPropertyModellingResult.java on lines 1..35
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/result/WorkflowModellingResult.java on lines 1..35

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

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

        return new EqualsBuilder()
                .append(preExecActionData, that.preExecActionData)
                .append(postExecActionData, that.postExecActionData)
                .append(namespace, that.namespace)
                .append(name, that.name)
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/model/Metadata.java on lines 180..186

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

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

        return new EqualsBuilder()
                .append(description, that.description)
                .append(prerequisites, that.prerequisites)
                .append(inputs, that.inputs)
                .append(outputs, that.outputs)
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/model/Executable.java on lines 145..151

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

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

        for (String modifierKey : valueMap.keySet()) {
            if (!knownModifierKeys.contains(modifierKey)) {
                throw new RuntimeException(
                        "Artifact {" + artifact + "} has unrecognized tag {" + modifierKey + "}" +
                                ". Please take a look at the supported features per versions link");
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/SlangCompilerImpl.java on lines 434..440

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

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

            for (String modifierKey : modifiers.keySet()) {
                if (!knownModifierKeys.contains(modifierKey)) {
                    throw new RuntimeException(
                            "Artifact {" + key + "} has unrecognized tag {" + modifierKey + "}" +
                                    ". Please take a look at the supported features per versions link");
cloudslang-api-commons/src/main/java/io/cloudslang/lang/commons/services/impl/SlangSourceServiceImpl.java on lines 49..55

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

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

        } catch (Exception e) {
            logger.error("Failed compilation for source : " + source.getName() + " ,Exception is : " + e.getMessage());
            throw new RuntimeException("Failed compilation for source : " + source.getName() +
                    " ,Exception is : " + e.getMessage(), e);
        }
cloudslang-cli/src/main/java/io/cloudslang/lang/cli/utils/CompilerHelperImpl.java on lines 99..103

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

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

    private void handleException(File file, Exception e) {
        logger.error("Failed compilation for file : " + file.getName() + " ,Exception is : " + e.getMessage());
        throw new RuntimeException("Failed compilation for file : " + file.getName() +
                " ,Exception is : " + e.getMessage(), e);
    }
cloudslang-all/src/main/java/io/cloudslang/lang/api/SlangImpl.java on lines 122..126

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

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 LoopStatement(String expression, Set<ScriptFunction> functionDependencies,
                         Set<String> systemPropertyDependencies) {

        Validate.notBlank(expression, "loop expression cannot be empty");

cloudslang-entities/src/main/java/io/cloudslang/lang/entities/RobotGroupStatement.java on lines 27..36

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

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

        } catch (RuntimeException e) {
            logger.error("There was an error running the setWorkerGroupStep execution step of: \'" + nodeName +
                    "\'. Error is: " + e.getMessage());
            throw new RuntimeException("Error running: " + nodeName + ": " + e.getMessage(), e);
        }
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 265..269
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 386..390
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 426..430
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 168..172
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 208..212
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 180..184
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 280..284

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

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

        } catch (RuntimeException e) {
            logger.error("There was an error running the joinBranches execution step of: \'" + nodeName +
                    "\'. Error is: " + e.getMessage());
            throw new RuntimeException("Error running: \'" + nodeName + "\': \n" + e.getMessage(), e);
        }
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 265..269
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 386..390
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 426..430
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 168..172
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 180..184
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 280..284
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 302..306

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

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

        } catch (RuntimeException e) {
            logger.error("There was an error running the add branches execution step of: \'" + nodeName +
                    "\'. Error is: " + e.getMessage());
            throw new RuntimeException("Error running: " + nodeName + ": " + e.getMessage(), e);
        }
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 265..269
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 386..390
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 426..430
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 208..212
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 180..184
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 280..284
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 302..306

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

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

    private List<String> getMandatoryInputNames(Executable executable) {
        List<String> inputNames = new ArrayList<>();
        for (Input input : executable.getInputs()) {
            if (InputUtils.isMandatory(input)) {
                inputNames.add(input.getName());
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/validator/CompileValidatorImpl.java on lines 273..281

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

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

    private List<String> getStepInputNamesWithNonEmptyValue(Step step) {
        List<String> inputNames = new ArrayList<>();
        for (Argument argument : step.getArguments()) {
            if (ArgumentUtils.isDefined(argument)) {
                inputNames.add(argument.getName());
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/validator/CompileValidatorImpl.java on lines 263..271

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

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

        } catch (RuntimeException e) {
            logger.error("There was an error running the finish executable execution step of: \'" + nodeName +
                    "\'.\n\tError is: " + e.getMessage());
            throw new RuntimeException("Error running: \'" + nodeName + "\'.\n\t" + e.getMessage(), e);
        }
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 265..269
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ExecutableExecutionData.java on lines 426..430
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 168..172
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/ParallelLoopExecutionData.java on lines 208..212
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 180..184
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 280..284
cloudslang-runtime/src/main/java/io/cloudslang/lang/runtime/steps/StepExecutionData.java on lines 302..306

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

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

    void addOutput(List<Output> outputs, Output element, List<RuntimeException> errors) {
        List<RuntimeException> validationErrors = preCompileValidator.validateNoDuplicateInOutParams(outputs, element);
        if (CollectionUtils.isEmpty(validationErrors)) {
            outputs.add(element);
        } else {
cloudslang-compiler/src/main/java/io/cloudslang/lang/compiler/modeller/transformers/ResultsTransformer.java on lines 95..102

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

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