uu-cubitt/graph-cqrs

View on GitHub

Showing 29 of 51 total issues

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

            case Commands.CommandType.AddConnector:
                let addConnectorCommand: Commands.AddConnectorCommand = <Commands.AddConnectorCommand> command;
                this.AddConnector(addConnectorCommand);
                this.version++;
                return new Events.ConnectorAddedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 2 other locations - About 5 hrs to fix
src/CQRSGraph.ts on lines 132..144
src/CQRSGraph.ts on lines 145..157

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

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

            case Commands.CommandType.AddModel:
                let addModelCommand: Commands.AddModelCommand = <Commands.AddModelCommand> command;
                this.AddModel(addModelCommand);
                this.version++;
                return new Events.ModelAddedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 2 other locations - About 5 hrs to fix
src/CQRSGraph.ts on lines 105..116
src/CQRSGraph.ts on lines 145..157

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

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

            case Commands.CommandType.AddNode:
                let addNodeCommand: Commands.AddNodeCommand = <Commands.AddNodeCommand> command;
                this.AddNode(addNodeCommand);
                this.version++;
                return new Events.NodeAddedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 2 other locations - About 5 hrs to fix
src/CQRSGraph.ts on lines 105..116
src/CQRSGraph.ts on lines 132..144

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

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

            case Commands.CommandType.SetConnectorProperty:
                let setConnectorPropertyCommand: Commands.SetConnectorPropertyCommand = <Commands.SetConnectorPropertyCommand> command;
                this.SetConnectorProperty(setConnectorPropertyCommand);
                this.version++;
                return new Events.ConnectorPropertySetEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 254..265
src/CQRSGraph.ts on lines 266..277
src/CQRSGraph.ts on lines 278..289

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

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

            case Commands.CommandType.SetNodeProperty:
                let setNodePropertyCommand: Commands.SetNodePropertyCommand = <Commands.SetNodePropertyCommand> command;
                this.SetNodeProperty(setNodePropertyCommand);
                this.version++;
                return new Events.NodePropertySetEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 242..253
src/CQRSGraph.ts on lines 254..265
src/CQRSGraph.ts on lines 266..277

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

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

            case Commands.CommandType.SetModelProperty:
                let setModelPropertyCommand: Commands.SetModelPropertyCommand = <Commands.SetModelPropertyCommand> command;
                this.SetModelProperty(setModelPropertyCommand);
                this.version++;
                return new Events.ModelPropertySetEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 242..253
src/CQRSGraph.ts on lines 254..265
src/CQRSGraph.ts on lines 278..289

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

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

            case Commands.CommandType.SetEdgeProperty:
                let setEdgePropertyCommand: Commands.SetEdgePropertyCommand = <Commands.SetEdgePropertyCommand> command;
                this.SetEdgeProperty(setEdgePropertyCommand);
                this.version++;
                return new Events.EdgePropertySetEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 242..253
src/CQRSGraph.ts on lines 266..277
src/CQRSGraph.ts on lines 278..289

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

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

            case Commands.CommandType.DeleteEdgeProperty:
                let deleteEdgePropertyCommand: Commands.DeleteEdgePropertyCommand = <Commands.DeleteEdgePropertyCommand> command;
                this.DeleteEdgeProperty(deleteEdgePropertyCommand);
                this.version++;
                return new Events.EdgePropertyDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 198..208
src/CQRSGraph.ts on lines 220..230
src/CQRSGraph.ts on lines 231..241

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

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

            case Commands.CommandType.DeleteNodeProperty:
                let deleteNodeProperty: Commands.DeleteNodePropertyCommand = <Commands.DeleteNodePropertyCommand> command;
                this.DeleteNodeProperty(deleteNodeProperty);
                this.version++;
                return new Events.NodePropertyDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 198..208
src/CQRSGraph.ts on lines 209..219
src/CQRSGraph.ts on lines 220..230

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

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

            case Commands.CommandType.DeleteConnectorProperty:
                let deleteConnectorPropertyCommand: Commands.DeleteConnectorPropertyCommand = <Commands.DeleteConnectorPropertyCommand> command;
                this.DeleteConnectorProperty(deleteConnectorPropertyCommand);
                this.version++;
                return new Events.ConnectorPropertyDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 209..219
src/CQRSGraph.ts on lines 220..230
src/CQRSGraph.ts on lines 231..241

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

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

            case Commands.CommandType.DeleteModelProperty:
                let deleteModelPropertyCommand: Commands.DeleteModelPropertyCommand = <Commands.DeleteModelPropertyCommand> command;
                this.DeleteModelProperty(deleteModelPropertyCommand);
                this.version++;
                return new Events.ModelPropertyDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 198..208
src/CQRSGraph.ts on lines 209..219
src/CQRSGraph.ts on lines 231..241

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

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

            case Commands.CommandType.DeleteNode:
                let deleteNodeCommand: Commands.DeleteNodeCommand = <Commands.DeleteNodeCommand> command;
                this.DeleteNode(deleteNodeCommand);
                this.version++;
                return new Events.NodeDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 158..167
src/CQRSGraph.ts on lines 168..177
src/CQRSGraph.ts on lines 178..187

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

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

            case Commands.CommandType.DeleteEdge:
                let deleteEdgeCommand: Commands.DeleteEdgeCommand = <Commands.DeleteEdgeCommand> command;
                this.DeleteEdge(deleteEdgeCommand);
                this.version++;
                return new Events.EdgeDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 158..167
src/CQRSGraph.ts on lines 178..187
src/CQRSGraph.ts on lines 188..197

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

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

            case Commands.CommandType.DeleteConnector:
                let deleteConnectorCommand: Commands.DeleteConnectorCommand = <Commands.DeleteConnectorCommand> command;
                this.DeleteConnector(deleteConnectorCommand);
                this.version++;
                return new Events.ConnectorDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 168..177
src/CQRSGraph.ts on lines 178..187
src/CQRSGraph.ts on lines 188..197

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

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

            case Commands.CommandType.DeleteModel:
                let deleteModelCommand: Commands.DeleteModelCommand = <Commands.DeleteModelCommand> command;
                this.DeleteModel(deleteModelCommand);
                this.version++;
                return new Events.ModelDeletedEvent(
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 4 hrs to fix
src/CQRSGraph.ts on lines 158..167
src/CQRSGraph.ts on lines 168..177
src/CQRSGraph.ts on lines 188..197

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

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

    protected AddNode(action: Commands.AddNodeCommand | Events.NodeAddedEvent): void {
        this.graph.addNode(
            <Common.Guid> action.elementId,
            action.elementType,
            <Common.Guid> action.modelId,
Severity: Major
Found in src/CQRSGraph.ts and 1 other location - About 2 hrs to fix
src/CQRSGraph.ts on lines 361..367

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

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

    protected AddConnector(action: Commands.AddConnectorCommand | Events.ConnectorAddedEvent): void {
        this.graph.addConnector(
            <Common.Guid> action.elementId,
            action.elementType,
            <Common.Guid> action.nodeId,
Severity: Major
Found in src/CQRSGraph.ts and 1 other location - About 2 hrs to fix
src/CQRSGraph.ts on lines 401..407

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

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

    protected SetEdgeProperty(action: Commands.SetEdgePropertyCommand | Events.EdgePropertySetEvent): void {
        this.graph.setProperty(<Common.Guid> action.elementId, action.propertyName, action.propertyValue);
    }
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 2 hrs to fix
src/CQRSGraph.ts on lines 389..394
src/CQRSGraph.ts on lines 486..488
src/CQRSGraph.ts on lines 504..506

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

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

    protected AddModel(action: Commands.AddModelCommand | Events.ModelAddedEvent): void {
        this.graph.addModel(
            <Common.Guid> action.elementId,
            action.elementType,
            action.elementProperties);
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 2 hrs to fix
src/CQRSGraph.ts on lines 486..488
src/CQRSGraph.ts on lines 495..497
src/CQRSGraph.ts on lines 504..506

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

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

    protected SetConnectorProperty(action: Commands.SetConnectorPropertyCommand | Events.ConnectorPropertySetEvent): void {
        this.graph.setProperty(<Common.Guid> action.elementId, action.propertyName, action.propertyValue);
    }
Severity: Major
Found in src/CQRSGraph.ts and 3 other locations - About 2 hrs to fix
src/CQRSGraph.ts on lines 389..394
src/CQRSGraph.ts on lines 495..497
src/CQRSGraph.ts on lines 504..506

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

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