Fantom-foundation/go-lachesis

View on GitHub

Showing 538 of 829 total issues

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

func (_Contract *ContractFilterer) WatchUnstashedRewards(opts *bind.WatchOpts, sink chan<- *ContractUnstashedRewards, auth []common.Address, receiver []common.Address) (event.Subscription, error) {

    var authRule []interface{}
    for _, authItem := range auth {
        authRule = append(authRule, authItem)
Severity: Major
Found in gossip/sfc202/contract.go and 5 other locations - About 5 hrs to fix
gossip/sfc110/contract.go on lines 3696..3737
gossip/sfc110/contract.go on lines 4308..4349
gossip/sfc202/contract.go on lines 4321..4362
gossip/sfc204/contract.go on lines 4164..4205
gossip/sfc204/contract.go on lines 4776..4817

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

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

func (_Contract *ContractFilterer) WatchIncreasedStake(opts *bind.WatchOpts, sink chan<- *ContractIncreasedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchPreparedToWithdrawStake(opts *bind.WatchOpts, sink chan<- *ContractPreparedToWithdrawStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchWithdrawnStake(opts *bind.WatchOpts, sink chan<- *ContractWithdrawnStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchUpdatedStake(opts *bind.WatchOpts, sink chan<- *ContractUpdatedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchPreparedToWithdrawStake(opts *bind.WatchOpts, sink chan<- *ContractPreparedToWithdrawStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc204/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchWithdrawnStake(opts *bind.WatchOpts, sink chan<- *ContractWithdrawnStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc204/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658

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

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

func (_Contract *ContractFilterer) WatchWithdrawnStake(opts *bind.WatchOpts, sink chan<- *ContractWithdrawnStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchClaimedValidatorReward(opts *bind.WatchOpts, sink chan<- *ContractClaimedValidatorReward, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchIncreasedStake(opts *bind.WatchOpts, sink chan<- *ContractIncreasedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchIncreasedStake(opts *bind.WatchOpts, sink chan<- *ContractIncreasedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc204/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchPreparedToWithdrawStake(opts *bind.WatchOpts, sink chan<- *ContractPreparedToWithdrawStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchDeactivatedStake(opts *bind.WatchOpts, sink chan<- *ContractDeactivatedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchClaimedValidatorReward(opts *bind.WatchOpts, sink chan<- *ContractClaimedValidatorReward, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc204/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchUpdatedStakerMetadata(opts *bind.WatchOpts, sink chan<- *ContractUpdatedStakerMetadata, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchUpdatedStake(opts *bind.WatchOpts, sink chan<- *ContractUpdatedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc204/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchLockingStake(opts *bind.WatchOpts, sink chan<- *ContractLockingStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc202/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchClaimedValidatorReward(opts *bind.WatchOpts, sink chan<- *ContractClaimedValidatorReward, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchDeactivatedStake(opts *bind.WatchOpts, sink chan<- *ContractDeactivatedStake, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5029..5066
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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

func (_Contract *ContractFilterer) WatchUpdatedStakerMetadata(opts *bind.WatchOpts, sink chan<- *ContractUpdatedStakerMetadata, stakerID []*big.Int) (event.Subscription, error) {

    var stakerIDRule []interface{}
    for _, stakerIDItem := range stakerID {
        stakerIDRule = append(stakerIDRule, stakerIDItem)
Severity: Major
Found in gossip/sfc110/contract.go and 21 other locations - About 4 hrs to fix
gossip/sfc110/contract.go on lines 2484..2521
gossip/sfc110/contract.go on lines 3249..3286
gossip/sfc110/contract.go on lines 3548..3585
gossip/sfc110/contract.go on lines 4159..4196
gossip/sfc110/contract.go on lines 4886..4923
gossip/sfc110/contract.go on lines 5487..5524
gossip/sfc202/contract.go on lines 2677..2714
gossip/sfc202/contract.go on lines 3442..3479
gossip/sfc202/contract.go on lines 3741..3778
gossip/sfc202/contract.go on lines 4040..4077
gossip/sfc202/contract.go on lines 4784..4821
gossip/sfc202/contract.go on lines 5778..5815
gossip/sfc202/contract.go on lines 5921..5958
gossip/sfc202/contract.go on lines 6379..6416
gossip/sfc204/contract.go on lines 2520..2557
gossip/sfc204/contract.go on lines 3285..3322
gossip/sfc204/contract.go on lines 3584..3621
gossip/sfc204/contract.go on lines 3883..3920
gossip/sfc204/contract.go on lines 4627..4664
gossip/sfc204/contract.go on lines 5621..5658
gossip/sfc204/contract.go on lines 5918..5955

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

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