Fantom-foundation/go-lachesis

View on GitHub

Showing 829 of 829 total issues

peer has 23 methods (exceeds 20 allowed). Consider refactoring.
Open

type peer struct {
    id string

    *p2p.Peer
    rw p2p.MsgReadWriter
Severity: Minor
Found in gossip/peer.go - About 2 hrs to fix

    Method rows.String has 87 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (rr *rows) String() string {
        var (
            res strings.Builder
            out = func(s string) {
                _, err := res.WriteString(s)
    Severity: Major
    Found in inter/ascii_scheme.go - About 2 hrs to fix

      Method EventHeaderData.UnmarshalBinary has 87 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (e *EventHeaderData) UnmarshalBinary(raw []byte) (err error) {
          defer func() {
              if r := recover(); r != nil {
                  err = ErrInvalidEncoding
              }
      Severity: Major
      Found in inter/event_serializer.go - About 2 hrs to fix

        Method Index.fillEventVectors has 87 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (vi *Index) fillEventVectors(e *inter.EventHeaderData) allVecs {
            meIdx := vi.validatorIdxs[e.Creator]
            myVecs := allVecs{
                beforeSeq:  NewHighestBeforeSeq(len(vi.bi.BranchIDCreatorIdxs)),
                beforeTime: NewHighestBeforeTime(len(vi.bi.BranchIDCreatorIdxs)),
        Severity: Major
        Found in vector/index.go - About 2 hrs to fix

          Method TxPool.loop has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring.
          Open

          func (pool *TxPool) loop() {
              defer pool.wg.Done()
          
              var (
                  prevPending, prevQueued, prevStales int
          Severity: Minor
          Found in evmcore/tx_pool.go - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

          package littleendian
          
          import "encoding/binary"
          
          // Int64ToBytes converts uint64 to bytes.
          Severity: Major
          Found in common/littleendian/bytes.go and 1 other location - About 2 hrs to fix
          common/bigendian/bytes.go on lines 1..27

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

          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

          package bigendian
          
          import "encoding/binary"
          
          // Int64ToBytes converts uint64 to bytes.
          Severity: Major
          Found in common/bigendian/bytes.go and 1 other location - About 2 hrs to fix
          common/littleendian/bytes.go on lines 1..27

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

          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

          func (_Contract *ContractCaller) CalcDelegationRewards(opts *bind.CallOpts, delegator common.Address, toStakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
              var (
                  ret0 = new(*big.Int)
                  ret1 = new(*big.Int)
                  ret2 = new(*big.Int)
          Severity: Major
          Found in gossip/sfc202/contract.go and 3 other locations - About 2 hrs to fix
          gossip/sfc202/contract.go on lines 220..233
          gossip/sfc204/contract.go on lines 203..216
          gossip/sfc204/contract.go on lines 235..248

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

          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

          Function MainGenesis has 85 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func MainGenesis() Genesis {
              g := Genesis{
                  Time: genesisTime,
                  Alloc: VAccounts{
                      Accounts: Accounts{
          Severity: Major
          Found in lachesis/genesis/genesis.go - About 2 hrs to fix

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

            func (_Contract *ContractCaller) CalcDelegationCompoundRewards(opts *bind.CallOpts, delegator common.Address, toStakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
                var (
                    ret0 = new(*big.Int)
                    ret1 = new(*big.Int)
                    ret2 = new(*big.Int)
            Severity: Major
            Found in gossip/sfc204/contract.go and 3 other locations - About 2 hrs to fix
            gossip/sfc202/contract.go on lines 220..233
            gossip/sfc202/contract.go on lines 252..265
            gossip/sfc204/contract.go on lines 235..248

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

            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

            func (_Contract *ContractCaller) CalcDelegationRewards(opts *bind.CallOpts, delegator common.Address, toStakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
                var (
                    ret0 = new(*big.Int)
                    ret1 = new(*big.Int)
                    ret2 = new(*big.Int)
            Severity: Major
            Found in gossip/sfc204/contract.go and 3 other locations - About 2 hrs to fix
            gossip/sfc202/contract.go on lines 220..233
            gossip/sfc202/contract.go on lines 252..265
            gossip/sfc204/contract.go on lines 203..216

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

            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

            func (_Contract *ContractCaller) CalcDelegationCompoundRewards(opts *bind.CallOpts, delegator common.Address, toStakerID *big.Int, _fromEpoch *big.Int, maxEpochs *big.Int) (*big.Int, *big.Int, *big.Int, error) {
                var (
                    ret0 = new(*big.Int)
                    ret1 = new(*big.Int)
                    ret2 = new(*big.Int)
            Severity: Major
            Found in gossip/sfc202/contract.go and 3 other locations - About 2 hrs to fix
            gossip/sfc202/contract.go on lines 252..265
            gossip/sfc204/contract.go on lines 203..216
            gossip/sfc204/contract.go on lines 235..248

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

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

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

            func (_Contract *ContractCaller) WithdrawalRequests(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct {
                StakerID   *big.Int
                Epoch      *big.Int
                Time       *big.Int
                Amount     *big.Int
            Severity: Major
            Found in gossip/sfc110/contract.go and 2 other locations - About 2 hrs to fix
            gossip/sfc202/contract.go on lines 1730..1747
            gossip/sfc204/contract.go on lines 1657..1674

            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

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

            func (_Contract *ContractCaller) WithdrawalRequests(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct {
                StakerID   *big.Int
                Epoch      *big.Int
                Time       *big.Int
                Amount     *big.Int
            Severity: Major
            Found in gossip/sfc204/contract.go and 2 other locations - About 2 hrs to fix
            gossip/sfc110/contract.go on lines 1530..1547
            gossip/sfc202/contract.go on lines 1730..1747

            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

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

            func (_Contract *ContractCaller) WithdrawalRequests(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (struct {
                StakerID   *big.Int
                Epoch      *big.Int
                Time       *big.Int
                Amount     *big.Int
            Severity: Major
            Found in gossip/sfc202/contract.go and 2 other locations - About 2 hrs to fix
            gossip/sfc110/contract.go on lines 1530..1547
            gossip/sfc204/contract.go on lines 1657..1674

            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

            Function DAGtoASCIIscheme has 84 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func DAGtoASCIIscheme(events Events) (string, error) {
                events = events.ByParents()
            
                var (
                    scheme rows
            Severity: Major
            Found in inter/ascii_scheme.go - About 2 hrs to fix

              Store has 22 methods (exceeds 20 allowed). Consider refactoring.
              Open

              func (s *Store) IncBlocksMissed(stakerID idx.StakerID, periodDiff inter.Timestamp) {
                  s.mutex.BlockDowntime.Lock()
                  defer s.mutex.BlockDowntime.Unlock()
              
                  missed := s.getBlocksMissed(stakerID)
              Severity: Minor
              Found in app/store_scores.go - About 2 hrs to fix

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

                func (_Contract *ContractFilterer) FilterPreparedToWithdrawDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractPreparedToWithdrawDelegationIterator, error) {
                
                    var delegatorRule []interface{}
                    for _, delegatorItem := range delegator {
                        delegatorRule = append(delegatorRule, delegatorItem)
                Severity: Major
                Found in gossip/sfc110/contract.go and 20 other locations - About 2 hrs to fix
                gossip/sfc110/contract.go on lines 2158..2174
                gossip/sfc110/contract.go on lines 2313..2329
                gossip/sfc110/contract.go on lines 2612..2628
                gossip/sfc110/contract.go on lines 3081..3097
                gossip/sfc110/contract.go on lines 3378..3394
                gossip/sfc110/contract.go on lines 5318..5334
                gossip/sfc202/contract.go on lines 2506..2522
                gossip/sfc202/contract.go on lines 2805..2821
                gossip/sfc202/contract.go on lines 3274..3290
                gossip/sfc202/contract.go on lines 3571..3587
                gossip/sfc202/contract.go on lines 3870..3886
                gossip/sfc202/contract.go on lines 4616..4632
                gossip/sfc202/contract.go on lines 6210..6226
                gossip/sfc204/contract.go on lines 2349..2365
                gossip/sfc204/contract.go on lines 2648..2664
                gossip/sfc204/contract.go on lines 3117..3133
                gossip/sfc204/contract.go on lines 3414..3430
                gossip/sfc204/contract.go on lines 3713..3729
                gossip/sfc204/contract.go on lines 4459..4475
                gossip/sfc204/contract.go on lines 5749..5765

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

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

                func (_Contract *ContractFilterer) FilterLockingDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractLockingDelegationIterator, error) {
                
                    var delegatorRule []interface{}
                    for _, delegatorItem := range delegator {
                        delegatorRule = append(delegatorRule, delegatorItem)
                Severity: Major
                Found in gossip/sfc202/contract.go and 20 other locations - About 2 hrs to fix
                gossip/sfc110/contract.go on lines 2158..2174
                gossip/sfc110/contract.go on lines 2313..2329
                gossip/sfc110/contract.go on lines 2612..2628
                gossip/sfc110/contract.go on lines 3081..3097
                gossip/sfc110/contract.go on lines 3378..3394
                gossip/sfc110/contract.go on lines 3991..4007
                gossip/sfc110/contract.go on lines 5318..5334
                gossip/sfc202/contract.go on lines 2506..2522
                gossip/sfc202/contract.go on lines 2805..2821
                gossip/sfc202/contract.go on lines 3274..3290
                gossip/sfc202/contract.go on lines 3571..3587
                gossip/sfc202/contract.go on lines 4616..4632
                gossip/sfc202/contract.go on lines 6210..6226
                gossip/sfc204/contract.go on lines 2349..2365
                gossip/sfc204/contract.go on lines 2648..2664
                gossip/sfc204/contract.go on lines 3117..3133
                gossip/sfc204/contract.go on lines 3414..3430
                gossip/sfc204/contract.go on lines 3713..3729
                gossip/sfc204/contract.go on lines 4459..4475
                gossip/sfc204/contract.go on lines 5749..5765

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

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

                func (_Contract *ContractFilterer) FilterLockingDelegation(opts *bind.FilterOpts, delegator []common.Address, stakerID []*big.Int) (*ContractLockingDelegationIterator, error) {
                
                    var delegatorRule []interface{}
                    for _, delegatorItem := range delegator {
                        delegatorRule = append(delegatorRule, delegatorItem)
                Severity: Major
                Found in gossip/sfc204/contract.go and 20 other locations - About 2 hrs to fix
                gossip/sfc110/contract.go on lines 2158..2174
                gossip/sfc110/contract.go on lines 2313..2329
                gossip/sfc110/contract.go on lines 2612..2628
                gossip/sfc110/contract.go on lines 3081..3097
                gossip/sfc110/contract.go on lines 3378..3394
                gossip/sfc110/contract.go on lines 3991..4007
                gossip/sfc110/contract.go on lines 5318..5334
                gossip/sfc202/contract.go on lines 2506..2522
                gossip/sfc202/contract.go on lines 2805..2821
                gossip/sfc202/contract.go on lines 3274..3290
                gossip/sfc202/contract.go on lines 3571..3587
                gossip/sfc202/contract.go on lines 3870..3886
                gossip/sfc202/contract.go on lines 4616..4632
                gossip/sfc202/contract.go on lines 6210..6226
                gossip/sfc204/contract.go on lines 2349..2365
                gossip/sfc204/contract.go on lines 2648..2664
                gossip/sfc204/contract.go on lines 3117..3133
                gossip/sfc204/contract.go on lines 3414..3430
                gossip/sfc204/contract.go on lines 4459..4475
                gossip/sfc204/contract.go on lines 5749..5765

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

                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