Showing 842 of 1,553 total issues

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

  describe('PolarHSelector', () => {
    describe('#includesAtom(atom)', () => {
      const flags = {
        HYDROGEN: 0x0008,
        NONPOLARH: 0x1008
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 283..298

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

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

  describe('NonPolarHSelector', () => {
    describe('#includesAtom(atom)', () => {
      const flags = {
        HYDROGEN: 0x0008,
        NONPOLARH: 0x1008
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 1 other location - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 266..281

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

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

  reprList.find(`.panel:eq(${index}) .spinner-dec-btn`).on('click', (e) => {
    const spinnerType = e.currentTarget.getAttribute('data-value')
    const spinner = reprList.find(
      `.panel:eq(${index}) [data-type=${spinnerType}]`
    )
Severity: Major
Found in demo/src/scripts/ui/Menu.js and 1 other location - About 6 hrs to fix
demo/src/scripts/ui/Menu.js on lines 465..474

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

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

  reprList.find(`.panel:eq(${index}) .spinner-inc-btn`).on('click', (e) => {
    const spinnerType = e.currentTarget.getAttribute('data-value')
    const spinner = reprList.find(
      `.panel:eq(${index}) [data-type=${spinnerType}]`
    )
Severity: Major
Found in demo/src/scripts/ui/Menu.js and 1 other location - About 6 hrs to fix
demo/src/scripts/ui/Menu.js on lines 454..463

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

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

  describe('Acidic', () => {
    describe('#includesAtom(atom)', () => {
      it('includes acidic atom', () => {
        atom.residue._type.flags = ResidueType.Flags.ACIDIC
        expect(selectors.acidic().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Purine', () => {
    describe('#includesAtom(atom)', () => {
      it('includes purine atom', () => {
        atom.residue._type.flags = ResidueType.Flags.PURINE
        expect(selectors.purine().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Pyrimidine', () => {
    describe('#includesAtom(atom)', () => {
      it('includes pyrimidine atom', () => {
        atom.residue._type.flags = ResidueType.Flags.PYRIMIDINE
        expect(selectors.pyrimidine().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Water', () => {
    describe('#includesAtom(atom)', () => {
      it('includes water atom', () => {
        atom.residue._type.flags = ResidueType.Flags.WATER
        expect(selectors.water().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432

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

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

  describe('Protein', () => {
    describe('#includesAtom(atom)', () => {
      it('includes protein atom', () => {
        atom.residue._type.flags = ResidueType.Flags.PROTEIN
        expect(selectors.protein().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Polar', () => {
    describe('#includesAtom(atom)', () => {
      it('includes polar atom', () => {
        atom.residue._type.flags = ResidueType.Flags.POLAR
        expect(selectors.polar().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Basic', () => {
    describe('#includesAtom(atom)', () => {
      it('includes basic atom', () => {
        atom.residue._type.flags = ResidueType.Flags.BASIC
        expect(selectors.basic().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('NonPolar', () => {
    describe('#includesAtom(atom)', () => {
      it('includes nonPolar atom', () => {
        atom.residue._type.flags = ResidueType.Flags.NONPOLAR
        expect(selectors.nonpolar().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Aromatic', () => {
    describe('#includesAtom(atom)', () => {
      it('includes aromatic atom', () => {
        atom.residue._type.flags = ResidueType.Flags.AROMATIC
        expect(selectors.aromatic().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 395..406
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

  describe('Nucleic', () => {
    describe('#includesAtom(atom)', () => {
      it('includes nucleic atom', () => {
        atom.residue._type.flags = ResidueType.Flags.NUCLEIC
        expect(selectors.nucleic().includesAtom(atom)).to.equal(true)
Severity: Major
Found in packages/miew/src/chem/selectors.test.js and 9 other locations - About 6 hrs to fix
packages/miew/src/chem/selectors.test.js on lines 300..311
packages/miew/src/chem/selectors.test.js on lines 313..324
packages/miew/src/chem/selectors.test.js on lines 326..337
packages/miew/src/chem/selectors.test.js on lines 356..367
packages/miew/src/chem/selectors.test.js on lines 369..380
packages/miew/src/chem/selectors.test.js on lines 382..393
packages/miew/src/chem/selectors.test.js on lines 408..419
packages/miew/src/chem/selectors.test.js on lines 421..432
packages/miew/src/chem/selectors.test.js on lines 434..445

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

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

var getPrototypeOf = createCommonjsModule(function (module) {
function _getPrototypeOf(o) {
  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.js on lines 3091..3099

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

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

var getPrototypeOf = createCommonjsModule(function (module) {
function _getPrototypeOf(o) {
  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3087..3095

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

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

function mergeTypedArraysUnsafe(array) {
  if (array.length <= 0) {
    return null
  }
  // count the size
Severity: Major
Found in packages/miew/src/utils.js and 1 other location - About 6 hrs to fix
packages/miew-cli/src/utils.js on lines 548..562

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

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

function mergeTypedArraysUnsafe(array) {
  if (array.length <= 0) {
    return null
  }
  // count the size
Severity: Major
Found in packages/miew-cli/src/utils.js and 1 other location - About 6 hrs to fix
packages/miew/src/utils.js on lines 548..562

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

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

  }, {
    key: "listObjs",
    value: function listObjs(miew) {
      var objs = miew._objects;
      if (!objs || !Array.isArray(objs) || objs.length === 0) {
Severity: Major
Found in packages/miew-cli/dist/index.modern.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.js on lines 3828..3841

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

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

  }, {
    key: "listObjs",
    value: function listObjs(miew) {
      var objs = miew._objects;
      if (!objs || !Array.isArray(objs) || objs.length === 0) {
Severity: Major
Found in packages/miew-cli/dist/index.js and 1 other location - About 6 hrs to fix
packages/miew-cli/dist/index.modern.js on lines 3824..3837

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

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