Showing 2,934 of 7,758 total issues

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

                this._fullWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 4 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1062..1065
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1066..1069
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1669..1672
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1673..1676

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

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

                this._minWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 4 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1062..1065
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1066..1069
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1665..1668
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1669..1672

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

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

                this._shortMonthsParse[i] = new RegExp(
                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
                    'i'
                );
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 4 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1062..1065
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1665..1668
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1669..1672
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1673..1676

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

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

                this._shortWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/moment.js and 4 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1062..1065
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1066..1069
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1665..1668
zk/src/main/resources/web/js/zk/ext/moment.js on lines 1673..1676

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

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

        setMonth(month: number): number {
            return this._getTzMoment().month(month).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

        setUTCFullYear(uTCFullYear: number): number {
            return this._getUTCMoment().year(uTCFullYear).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

      if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
        CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
      }
Severity: Minor
Found in zk/src/main/resources/web/js/zk/ext/purify.js and 1 other location - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/purify.js on lines 618..620

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

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

      if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
        CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
      }
Severity: Minor
Found in zk/src/main/resources/web/js/zk/ext/purify.js and 1 other location - About 35 mins to fix
zk/src/main/resources/web/js/zk/ext/purify.js on lines 615..617

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

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

  function resort() {
    chords.sort(function(a, b) {
      return sortChords(a.target.value, b.target.value);
    });
  }
Severity: Minor
Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
zktest/src/main/webapp/js/d3.layout.js on lines 103..107

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

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

        setUTCMilliseconds(uTCMilliseconds: number): number {
            return this._getUTCMoment().millisecond(uTCMilliseconds).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

        setUTCMonth(uTCMonth: number): number {
            return this._getUTCMoment().month(uTCMonth).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

        setMilliseconds(milliseconds: number): number {
            return this._getTzMoment().millisecond(milliseconds).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

        setMinutes(minutes: number): number {
            return this._getTzMoment().minute(minutes).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

    'Size' :
    { 
        Element        : 'span', 
        Styles        : { 'font-size' : '#("Size","fontSize")' }, 
        Overrides    : [ { Element : 'font', Attributes : { 'size' : null } } ]
Severity: Minor
Found in zksandbox/src/main/webapp/macros/fckconfig.js and 1 other location - About 35 mins to fix
zksandbox/src/main/webapp/macros/fckconfig.js on lines 235..240

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

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

  nodeEnter.append("svg:circle")
      .attr("r", 1e-6)
      .attr('class', function(d) {return d.real ? 'component' : ''})
Severity: Minor
Found in zktest/src/main/webapp/js/dtree.js and 1 other location - About 35 mins to fix
zktest/src/main/webapp/js/dtree.js on lines 145..147

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

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

        setDate(date: number): number {
            return this._getTzMoment().date(date).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

      subgroupIndex.forEach(function(d, i) {
        d.sort(function(a, b) {
          return sortSubgroups(matrix[i][a], matrix[i][b]);
        });
      });
Severity: Minor
Found in zktest/src/main/webapp/js/d3.layout.js and 1 other location - About 35 mins to fix
zktest/src/main/webapp/js/d3.layout.js on lines 154..158

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

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

  nodeUpdate.select("circle")
      .attr("r", 4.5)
      .style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; });
Severity: Minor
Found in zktest/src/main/webapp/js/dtree.js and 1 other location - About 35 mins to fix
zktest/src/main/webapp/js/dtree.js on lines 99..101

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

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

        setUTCDate(uTCDate: number): number {
            return this._getUTCMoment().date(uTCDate).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 189..191
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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

        setUTCMinutes(uTCMinutes: number): number {
            return this._getUTCMoment().minute(uTCMinutes).valueOf();
        }
Severity: Major
Found in zk/src/main/resources/web/js/zk/dateImpl.ts and 11 other locations - About 35 mins to fix
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 125..127
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 152..154
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 156..158
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 160..162
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 164..166
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 173..175
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 177..179
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 181..183
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 185..187
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 193..195
zk/src/main/resources/web/js/zk/dateImpl.ts on lines 197..199

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

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