uu-cubitt/events

View on GitHub

Showing 29 of 38 total issues

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

    protected static parseNodeAddedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): NodeAddedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["elementType"] = ValidationType.String;
        keys["modelId"] = ValidationType.Guid;
        let properties: Object = EventFactory.parseProperties(jsonObject["properties"]);
Severity: Major
Found in src/EventFactory.ts and 1 other location - About 1 day to fix
src/EventFactory.ts on lines 190..205

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

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 static parseConnectorAddedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ConnectorAddedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["elementType"] = ValidationType.String;
        keys["nodeId"] = ValidationType.Guid;
        let properties: Object = EventFactory.parseProperties(jsonObject["properties"]);
Severity: Major
Found in src/EventFactory.ts and 1 other location - About 1 day to fix
src/EventFactory.ts on lines 265..280

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

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

    protected static parseEdgePropertySetEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): EdgePropertySetEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        keys["propertyValue"] = ValidationType.Any;
        EventFactory.validateObject(jsonObject, keys);
Severity: Major
Found in src/EventFactory.ts and 2 other locations - About 6 hrs to fix
src/EventFactory.ts on lines 432..445
src/EventFactory.ts on lines 474..487

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

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

    protected static parseModelPropertySetEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ModelPropertySetEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        keys["propertyValue"] = ValidationType.Any;
        EventFactory.validateObject(jsonObject, keys);
Severity: Major
Found in src/EventFactory.ts and 2 other locations - About 6 hrs to fix
src/EventFactory.ts on lines 432..445
src/EventFactory.ts on lines 453..466

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

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

    protected static parseConnectorPropertySetEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ConnectorPropertySetEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        keys["propertyValue"] = ValidationType.Any;
        EventFactory.validateObject(jsonObject, keys);
Severity: Major
Found in src/EventFactory.ts and 2 other locations - About 6 hrs to fix
src/EventFactory.ts on lines 453..466
src/EventFactory.ts on lines 474..487

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

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 static parseConnectorPropertyDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ConnectorPropertyDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        EventFactory.validateObject(jsonObject, keys);
        return new ConnectorPropertyDeletedEvent(
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 5 hrs to fix
src/EventFactory.ts on lines 375..386
src/EventFactory.ts on lines 394..405
src/EventFactory.ts on lines 413..424

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

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 static parseNodePropertyDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): NodePropertyDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        EventFactory.validateObject(jsonObject, keys);
        return new NodePropertyDeletedEvent(
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 5 hrs to fix
src/EventFactory.ts on lines 356..367
src/EventFactory.ts on lines 375..386
src/EventFactory.ts on lines 394..405

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

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 static parseModelPropertyDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ModelPropertyDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        EventFactory.validateObject(jsonObject, keys);
        return new ModelPropertyDeletedEvent(
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 5 hrs to fix
src/EventFactory.ts on lines 356..367
src/EventFactory.ts on lines 375..386
src/EventFactory.ts on lines 413..424

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

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 static parseEdgePropertyDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): EdgePropertyDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        keys["propertyName"] = ValidationType.String;
        EventFactory.validateObject(jsonObject, keys);
        return new EdgePropertyDeletedEvent(
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 5 hrs to fix
src/EventFactory.ts on lines 356..367
src/EventFactory.ts on lines 394..405
src/EventFactory.ts on lines 413..424

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

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

export class NodeAddedEvent extends AddedEvent {
    /**
     * The RFC4122 v4 compliant ID of the model to which the new node belongs.
     */
    public modelId: Common.Guid;
Severity: Major
Found in src/events/NodeAddedEvent.ts and 1 other location - About 4 hrs to fix
src/events/ConnectorAddedEvent.ts on lines 9..43

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

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

export class ConnectorAddedEvent extends AddedEvent {
    /**
     * The RFC4122 v4 compliant ID of the node to which the new connector belongs.
     */
    public nodeId: Common.Guid;
Severity: Major
Found in src/events/ConnectorAddedEvent.ts and 1 other location - About 4 hrs to fix
src/events/NodeAddedEvent.ts on lines 9..43

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

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 static parseConnectorDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ConnectorDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        EventFactory.validateObject(jsonObject, keys);
        return new ConnectorDeletedEvent(
            Common.Guid.parse(jsonObject["sourceId"]),
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 4 hrs to fix
src/EventFactory.ts on lines 305..314
src/EventFactory.ts on lines 322..331
src/EventFactory.ts on lines 339..348

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

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 static parseNodeDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): NodeDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        EventFactory.validateObject(jsonObject, keys);
        return new NodeDeletedEvent(
            Common.Guid.parse(jsonObject["sourceId"]),
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 4 hrs to fix
src/EventFactory.ts on lines 288..297
src/EventFactory.ts on lines 305..314
src/EventFactory.ts on lines 322..331

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

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 static parseEdgeDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): EdgeDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        EventFactory.validateObject(jsonObject, keys);
        return new EdgeDeletedEvent(
            Common.Guid.parse(jsonObject["sourceId"]),
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 4 hrs to fix
src/EventFactory.ts on lines 288..297
src/EventFactory.ts on lines 322..331
src/EventFactory.ts on lines 339..348

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

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 static parseModelDeletedEvent(jsonObject: Object, keys: Common.Dictionary<ValidationType>): ModelDeletedEvent {
        keys["elementId"] = ValidationType.Guid;
        EventFactory.validateObject(jsonObject, keys);
        return new ModelDeletedEvent(
            Common.Guid.parse(jsonObject["sourceId"]),
Severity: Major
Found in src/EventFactory.ts and 3 other locations - About 4 hrs to fix
src/EventFactory.ts on lines 288..297
src/EventFactory.ts on lines 305..314
src/EventFactory.ts on lines 339..348

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

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

export class ModelPropertySetEvent extends PropertySetEvent {
    /**
     * @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
     * @param version The new current version number.
     * @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
Severity: Major
Found in src/events/ModelPropertySetEvent.ts and 3 other locations - About 2 hrs to fix
src/events/ConnectorPropertySetEvent.ts on lines 9..35
src/events/EdgePropertySetEvent.ts on lines 9..35
src/events/NodePropertySetEvent.ts on lines 9..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 82.

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

export class ConnectorPropertySetEvent extends PropertySetEvent {
    /**
     * @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
     * @param version The new current version number.
     * @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
Severity: Major
Found in src/events/ConnectorPropertySetEvent.ts and 3 other locations - About 2 hrs to fix
src/events/EdgePropertySetEvent.ts on lines 9..35
src/events/ModelPropertySetEvent.ts on lines 9..35
src/events/NodePropertySetEvent.ts on lines 9..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 82.

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

export class NodePropertySetEvent extends PropertySetEvent {
    /**
     * @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
     * @param version The new current version number.
     * @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
Severity: Major
Found in src/events/NodePropertySetEvent.ts and 3 other locations - About 2 hrs to fix
src/events/ConnectorPropertySetEvent.ts on lines 9..35
src/events/EdgePropertySetEvent.ts on lines 9..35
src/events/ModelPropertySetEvent.ts on lines 9..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 82.

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

export class EdgePropertySetEvent extends PropertySetEvent {
    /**
     * @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
     * @param version The new current version number.
     * @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
Severity: Major
Found in src/events/EdgePropertySetEvent.ts and 3 other locations - About 2 hrs to fix
src/events/ConnectorPropertySetEvent.ts on lines 9..35
src/events/ModelPropertySetEvent.ts on lines 9..35
src/events/NodePropertySetEvent.ts on lines 9..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 82.

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

export class ConnectorPropertyDeletedEvent extends PropertyDeletedEvent {
    /**
     * @param sourceId The RFC4122 v4 compliant ID of the command that caused this event.
     * @param version The new current version number.
     * @param timestamp The timestamp for the moment this event was created in milliseconds elapsed since 1 January 1970 00:00:00 UTC.
Severity: Major
Found in src/events/ConnectorPropertyDeletedEvent.ts and 3 other locations - About 2 hrs to fix
src/events/EdgePropertyDeletedEvent.ts on lines 9..32
src/events/ModelPropertyDeletedEvent.ts on lines 9..32
src/events/NodePropertyDeletedEvent.ts on lines 9..32

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

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