Showing 1,553 of 1,553 total issues

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

    it('keeps containing remaining values', () => {
      expect(valueListOnlyUpper.includes(45)).to.equal(true)
      valueListOnlyUpper.remove(VaLuE)
      expect(valueListOnlyUpper.includes(45)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247

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

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

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

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

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

Refactorings

Further Reading

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

    it('keeps containing remaining values (case sensitive list)', () => {
      expect(valueList.includes(45)).to.equal(true)
      valueList.remove(VaLuE)
      expect(valueList.includes(45)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

    it('keeps containing values from remaining ranges even if they also exists in removing range', () => {
      expect(rangeList.includes(5)).to.equal(true)
      rangeList.remove(rFrom1To14)
      expect(rangeList.includes(5)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

    it('does not begin containing values outside of appending range', () => {
      expect(rangeList.includes(1)).to.equal(false)
      rangeList.append(rFrom18To20)
      expect(rangeList.includes(1)).to.equal(false)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

    it('keeps containing values from all ranges when removed range was not existing in list', () => {
      expect(rangeList.includes(2)).to.equal(true)
      rangeList.remove(rEqual2)
      expect(rangeList.includes(2)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 101..105
packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

    it('begins containing values from appending range', () => {
      expect(rangeList.includes(19)).to.equal(false)
      rangeList.append(rFrom18To20)
      expect(rangeList.includes(19)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 7 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 106..110
packages/miew/src/chem/selectors/selectArgs.test.js on lines 123..127
packages/miew/src/chem/selectors/selectArgs.test.js on lines 128..132
packages/miew/src/chem/selectors/selectArgs.test.js on lines 133..137
packages/miew/src/chem/selectors/selectArgs.test.js on lines 138..142
packages/miew/src/chem/selectors/selectArgs.test.js on lines 243..247
packages/miew/src/chem/selectors/selectArgs.test.js on lines 280..284

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 78.

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

    it('stops containing removing value (case sensitive list)', () => {
      expect(valueList.includes(VaLuE)).to.equal(true)
      valueList.remove(VaLuE)
      expect(valueList.includes(VaLuE)).to.equal(false)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

    it('keeps containing all values when removed value was not existing in list in such case (case sensitive list)', () => {
      expect(valueList.includes(VaLuE)).to.equal(true)
      valueList.remove(vALue)
      expect(valueList.includes(VaLuE)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259

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

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

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

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

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

Refactorings

Further Reading

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

Object.defineProperty(Logger.prototype, 'level', {
  get() {
    return findKey(priorities, (value) => value === this._priority)
  },
  set(level) {
Severity: Major
Found in packages/miew/src/utils/logger.js and 1 other location - About 2 hrs to fix
packages/miew-cli/src/logger.js on lines 56..63

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

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

    it('begins containing appending value even if it is not string (only upper case list)', () => {
      expect(valueListOnlyUpper.includes(45)).to.equal(false)
      valueListOnlyUpper.append(45)
      expect(valueListOnlyUpper.includes(45)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 270..274

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

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

    it('does not begin containing appending value in different case (case sensitive list)', () => {
      expect(valueList.includes(vALue)).to.equal(false)
      valueList.append(VaLuE)
      expect(valueList.includes(vALue)).to.equal(false)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

    it('begins containing appending value (case sensitive list)', () => {
      expect(valueList.includes(VaLuE)).to.equal(false)
      valueList.append(VaLuE)
      expect(valueList.includes(VaLuE)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

    it('keeps containing all values when removed value was not existing in it (case sensitive list)', () => {
      expect(valueList.includes(VaLuE)).to.equal(true)
      valueList.remove(anotherValue)
      expect(valueList.includes(VaLuE)).to.equal(true)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
packages/miew/src/chem/selectors/selectArgs.test.js on lines 219..223
packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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

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

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

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

Refactorings

Further Reading

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

Object.defineProperty(Logger.prototype, 'level', {
  get() {
    return findKey(priorities, (value) => value === this._priority)
  },
  set(level) {
Severity: Major
Found in packages/miew-cli/src/logger.js and 1 other location - About 2 hrs to fix
packages/miew/src/utils/logger.js on lines 56..63

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

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

    it('stops containing removing value even if it is not string (only upper case list)', () => {
      expect(valueListOnlyUpper.includes(78)).to.equal(true)
      valueListOnlyUpper.remove(78)
      expect(valueListOnlyUpper.includes(78)).to.equal(false)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 1 other location - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 214..218

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

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

    it('does not begin containing not upper case version of appending value (only upper case list)', () => {
      expect(valueListOnlyUpper.includes(VaLuE)).to.equal(false)
      valueListOnlyUpper.append(VaLuE)
      expect(valueListOnlyUpper.includes(VaLuE)).to.equal(false)
    })
Severity: Major
Found in packages/miew/src/chem/selectors/selectArgs.test.js and 5 other locations - About 2 hrs to fix
packages/miew/src/chem/selectors/selectArgs.test.js on lines 193..197
packages/miew/src/chem/selectors/selectArgs.test.js on lines 198..202
packages/miew/src/chem/selectors/selectArgs.test.js on lines 238..242
packages/miew/src/chem/selectors/selectArgs.test.js on lines 255..259
packages/miew/src/chem/selectors/selectArgs.test.js on lines 260..264

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

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 RepresentationMap has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var RepresentationMap = function () {
  function RepresentationMap() {
    _classCallCheck(this, RepresentationMap);
    this.representationMap = {};
    this.representationID = {};
Severity: Major
Found in packages/miew-cli/dist/index.modern.js - About 2 hrs to fix

    Function RepresentationMap has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var RepresentationMap = function () {
      function RepresentationMap() {
        _classCallCheck(this, RepresentationMap);
        this.representationMap = {};
        this.representationID = {};
    Severity: Major
    Found in packages/miew-cli/dist/index.js - About 2 hrs to fix

      Function _build has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        _build() {
          const bondsIdc = this._selection.chunks
          const { bonds, parent } = this._selection
          const mode = this._mode
          const colorer = this._colorer
      Severity: Major
      Found in packages/miew/src/gfx/modes/groups/BondsLinesGroup.js - About 2 hrs to fix

        Function o has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function o() {
              var o,
                s,
                f = r[a]
              if (0 === (128 & f)) return a++, f
        Severity: Major
        Found in packages/miew/src/vendors/mmtf.js - About 2 hrs to fix
          Severity
          Category
          Status
          Source
          Language