IntegerMan/angularIF

View on GitHub

Showing 715 of 1,099 total issues

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

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
Severity: Major
Found in src/assets/primeng/components/fieldset/fieldset.js and 76 other locations - About 1 day to fix
src/assets/primeng/components/accordion/accordion.js on lines 2..7
src/assets/primeng/components/autocomplete/autocomplete.js on lines 2..7
src/assets/primeng/components/blockui/blockui.js on lines 2..7
src/assets/primeng/components/breadcrumb/breadcrumb.js on lines 2..7
src/assets/primeng/components/button/button.js on lines 2..7
src/assets/primeng/components/calendar/calendar.js on lines 2..7
src/assets/primeng/components/captcha/captcha.js on lines 2..7
src/assets/primeng/components/carousel/carousel.js on lines 2..7
src/assets/primeng/components/chart/chart.js on lines 2..7
src/assets/primeng/components/checkbox/checkbox.js on lines 2..7
src/assets/primeng/components/chips/chips.js on lines 2..7
src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 2..7
src/assets/primeng/components/colorpicker/colorpicker.js on lines 2..7
src/assets/primeng/components/common/confirmationservice.js on lines 2..7
src/assets/primeng/components/common/messageservice.js on lines 2..7
src/assets/primeng/components/common/shared.js on lines 2..7
src/assets/primeng/components/common/treedragdropservice.js on lines 2..7
src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 2..7
src/assets/primeng/components/contextmenu/contextmenu.js on lines 2..7
src/assets/primeng/components/datagrid/datagrid.js on lines 2..7
src/assets/primeng/components/datalist/datalist.js on lines 2..7
src/assets/primeng/components/datascroller/datascroller.js on lines 2..7
src/assets/primeng/components/datatable/datatable.js on lines 2..7
src/assets/primeng/components/defer/defer.js on lines 2..7
src/assets/primeng/components/dialog/dialog.js on lines 2..7
src/assets/primeng/components/dom/domhandler.js on lines 2..7
src/assets/primeng/components/dragdrop/dragdrop.js on lines 2..7
src/assets/primeng/components/dropdown/dropdown.js on lines 2..7
src/assets/primeng/components/editor/editor.js on lines 2..7
src/assets/primeng/components/fileupload/fileupload.js on lines 2..7
src/assets/primeng/components/galleria/galleria.js on lines 2..7
src/assets/primeng/components/gmap/gmap.js on lines 2..7
src/assets/primeng/components/growl/growl.js on lines 2..7
src/assets/primeng/components/inplace/inplace.js on lines 2..7
src/assets/primeng/components/inputmask/inputmask.js on lines 2..7
src/assets/primeng/components/inputswitch/inputswitch.js on lines 2..7
src/assets/primeng/components/inputtext/inputtext.js on lines 2..7
src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 2..7
src/assets/primeng/components/lightbox/lightbox.js on lines 2..7
src/assets/primeng/components/listbox/listbox.js on lines 2..7
src/assets/primeng/components/megamenu/megamenu.js on lines 2..7
src/assets/primeng/components/menu/menu.js on lines 2..7
src/assets/primeng/components/menubar/menubar.js on lines 2..7
src/assets/primeng/components/messages/messages.js on lines 2..7
src/assets/primeng/components/multiselect/multiselect.js on lines 2..7
src/assets/primeng/components/orderlist/orderlist.js on lines 2..7
src/assets/primeng/components/organizationchart/organizationchart.js on lines 2..7
src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 2..7
src/assets/primeng/components/paginator/paginator.js on lines 2..7
src/assets/primeng/components/panel/panel.js on lines 2..7
src/assets/primeng/components/panelmenu/panelmenu.js on lines 12..17
src/assets/primeng/components/password/password.js on lines 2..7
src/assets/primeng/components/picklist/picklist.js on lines 2..7
src/assets/primeng/components/progressbar/progressbar.js on lines 2..7
src/assets/primeng/components/radiobutton/radiobutton.js on lines 2..7
src/assets/primeng/components/rating/rating.js on lines 2..7
src/assets/primeng/components/schedule/schedule.js on lines 2..7
src/assets/primeng/components/selectbutton/selectbutton.js on lines 2..7
src/assets/primeng/components/sidebar/sidebar.js on lines 2..7
src/assets/primeng/components/slidemenu/slidemenu.js on lines 2..7
src/assets/primeng/components/slider/slider.js on lines 2..7
src/assets/primeng/components/spinner/spinner.js on lines 2..7
src/assets/primeng/components/splitbutton/splitbutton.js on lines 2..7
src/assets/primeng/components/steps/steps.js on lines 2..7
src/assets/primeng/components/tabmenu/tabmenu.js on lines 2..7
src/assets/primeng/components/tabview/tabview.js on lines 2..7
src/assets/primeng/components/terminal/terminal.js on lines 2..7
src/assets/primeng/components/terminal/terminalservice.js on lines 2..7
src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 2..7
src/assets/primeng/components/togglebutton/togglebutton.js on lines 2..7
src/assets/primeng/components/toolbar/toolbar.js on lines 2..7
src/assets/primeng/components/tooltip/tooltip.js on lines 2..7
src/assets/primeng/components/tree/tree.js on lines 2..7
src/assets/primeng/components/treetable/treetable.js on lines 2..7
src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 2..7
src/assets/primeng/components/utils/objectutils.js on lines 2..7

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

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

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
Severity: Major
Found in src/assets/primeng/components/menu/menu.js and 76 other locations - About 1 day to fix
src/assets/primeng/components/accordion/accordion.js on lines 2..7
src/assets/primeng/components/autocomplete/autocomplete.js on lines 2..7
src/assets/primeng/components/blockui/blockui.js on lines 2..7
src/assets/primeng/components/breadcrumb/breadcrumb.js on lines 2..7
src/assets/primeng/components/button/button.js on lines 2..7
src/assets/primeng/components/calendar/calendar.js on lines 2..7
src/assets/primeng/components/captcha/captcha.js on lines 2..7
src/assets/primeng/components/carousel/carousel.js on lines 2..7
src/assets/primeng/components/chart/chart.js on lines 2..7
src/assets/primeng/components/checkbox/checkbox.js on lines 2..7
src/assets/primeng/components/chips/chips.js on lines 2..7
src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 2..7
src/assets/primeng/components/colorpicker/colorpicker.js on lines 2..7
src/assets/primeng/components/common/confirmationservice.js on lines 2..7
src/assets/primeng/components/common/messageservice.js on lines 2..7
src/assets/primeng/components/common/shared.js on lines 2..7
src/assets/primeng/components/common/treedragdropservice.js on lines 2..7
src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 2..7
src/assets/primeng/components/contextmenu/contextmenu.js on lines 2..7
src/assets/primeng/components/datagrid/datagrid.js on lines 2..7
src/assets/primeng/components/datalist/datalist.js on lines 2..7
src/assets/primeng/components/datascroller/datascroller.js on lines 2..7
src/assets/primeng/components/datatable/datatable.js on lines 2..7
src/assets/primeng/components/defer/defer.js on lines 2..7
src/assets/primeng/components/dialog/dialog.js on lines 2..7
src/assets/primeng/components/dom/domhandler.js on lines 2..7
src/assets/primeng/components/dragdrop/dragdrop.js on lines 2..7
src/assets/primeng/components/dropdown/dropdown.js on lines 2..7
src/assets/primeng/components/editor/editor.js on lines 2..7
src/assets/primeng/components/fieldset/fieldset.js on lines 2..7
src/assets/primeng/components/fileupload/fileupload.js on lines 2..7
src/assets/primeng/components/galleria/galleria.js on lines 2..7
src/assets/primeng/components/gmap/gmap.js on lines 2..7
src/assets/primeng/components/growl/growl.js on lines 2..7
src/assets/primeng/components/inplace/inplace.js on lines 2..7
src/assets/primeng/components/inputmask/inputmask.js on lines 2..7
src/assets/primeng/components/inputswitch/inputswitch.js on lines 2..7
src/assets/primeng/components/inputtext/inputtext.js on lines 2..7
src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 2..7
src/assets/primeng/components/lightbox/lightbox.js on lines 2..7
src/assets/primeng/components/listbox/listbox.js on lines 2..7
src/assets/primeng/components/megamenu/megamenu.js on lines 2..7
src/assets/primeng/components/menubar/menubar.js on lines 2..7
src/assets/primeng/components/messages/messages.js on lines 2..7
src/assets/primeng/components/multiselect/multiselect.js on lines 2..7
src/assets/primeng/components/orderlist/orderlist.js on lines 2..7
src/assets/primeng/components/organizationchart/organizationchart.js on lines 2..7
src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 2..7
src/assets/primeng/components/paginator/paginator.js on lines 2..7
src/assets/primeng/components/panel/panel.js on lines 2..7
src/assets/primeng/components/panelmenu/panelmenu.js on lines 12..17
src/assets/primeng/components/password/password.js on lines 2..7
src/assets/primeng/components/picklist/picklist.js on lines 2..7
src/assets/primeng/components/progressbar/progressbar.js on lines 2..7
src/assets/primeng/components/radiobutton/radiobutton.js on lines 2..7
src/assets/primeng/components/rating/rating.js on lines 2..7
src/assets/primeng/components/schedule/schedule.js on lines 2..7
src/assets/primeng/components/selectbutton/selectbutton.js on lines 2..7
src/assets/primeng/components/sidebar/sidebar.js on lines 2..7
src/assets/primeng/components/slidemenu/slidemenu.js on lines 2..7
src/assets/primeng/components/slider/slider.js on lines 2..7
src/assets/primeng/components/spinner/spinner.js on lines 2..7
src/assets/primeng/components/splitbutton/splitbutton.js on lines 2..7
src/assets/primeng/components/steps/steps.js on lines 2..7
src/assets/primeng/components/tabmenu/tabmenu.js on lines 2..7
src/assets/primeng/components/tabview/tabview.js on lines 2..7
src/assets/primeng/components/terminal/terminal.js on lines 2..7
src/assets/primeng/components/terminal/terminalservice.js on lines 2..7
src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 2..7
src/assets/primeng/components/togglebutton/togglebutton.js on lines 2..7
src/assets/primeng/components/toolbar/toolbar.js on lines 2..7
src/assets/primeng/components/tooltip/tooltip.js on lines 2..7
src/assets/primeng/components/tree/tree.js on lines 2..7
src/assets/primeng/components/treetable/treetable.js on lines 2..7
src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 2..7
src/assets/primeng/components/utils/objectutils.js on lines 2..7

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

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

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
Severity: Major
Found in src/assets/primeng/components/checkbox/checkbox.js and 76 other locations - About 1 day to fix
src/assets/primeng/components/accordion/accordion.js on lines 2..7
src/assets/primeng/components/autocomplete/autocomplete.js on lines 2..7
src/assets/primeng/components/blockui/blockui.js on lines 2..7
src/assets/primeng/components/breadcrumb/breadcrumb.js on lines 2..7
src/assets/primeng/components/button/button.js on lines 2..7
src/assets/primeng/components/calendar/calendar.js on lines 2..7
src/assets/primeng/components/captcha/captcha.js on lines 2..7
src/assets/primeng/components/carousel/carousel.js on lines 2..7
src/assets/primeng/components/chart/chart.js on lines 2..7
src/assets/primeng/components/chips/chips.js on lines 2..7
src/assets/primeng/components/codehighlighter/codehighlighter.js on lines 2..7
src/assets/primeng/components/colorpicker/colorpicker.js on lines 2..7
src/assets/primeng/components/common/confirmationservice.js on lines 2..7
src/assets/primeng/components/common/messageservice.js on lines 2..7
src/assets/primeng/components/common/shared.js on lines 2..7
src/assets/primeng/components/common/treedragdropservice.js on lines 2..7
src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 2..7
src/assets/primeng/components/contextmenu/contextmenu.js on lines 2..7
src/assets/primeng/components/datagrid/datagrid.js on lines 2..7
src/assets/primeng/components/datalist/datalist.js on lines 2..7
src/assets/primeng/components/datascroller/datascroller.js on lines 2..7
src/assets/primeng/components/datatable/datatable.js on lines 2..7
src/assets/primeng/components/defer/defer.js on lines 2..7
src/assets/primeng/components/dialog/dialog.js on lines 2..7
src/assets/primeng/components/dom/domhandler.js on lines 2..7
src/assets/primeng/components/dragdrop/dragdrop.js on lines 2..7
src/assets/primeng/components/dropdown/dropdown.js on lines 2..7
src/assets/primeng/components/editor/editor.js on lines 2..7
src/assets/primeng/components/fieldset/fieldset.js on lines 2..7
src/assets/primeng/components/fileupload/fileupload.js on lines 2..7
src/assets/primeng/components/galleria/galleria.js on lines 2..7
src/assets/primeng/components/gmap/gmap.js on lines 2..7
src/assets/primeng/components/growl/growl.js on lines 2..7
src/assets/primeng/components/inplace/inplace.js on lines 2..7
src/assets/primeng/components/inputmask/inputmask.js on lines 2..7
src/assets/primeng/components/inputswitch/inputswitch.js on lines 2..7
src/assets/primeng/components/inputtext/inputtext.js on lines 2..7
src/assets/primeng/components/inputtextarea/inputtextarea.js on lines 2..7
src/assets/primeng/components/lightbox/lightbox.js on lines 2..7
src/assets/primeng/components/listbox/listbox.js on lines 2..7
src/assets/primeng/components/megamenu/megamenu.js on lines 2..7
src/assets/primeng/components/menu/menu.js on lines 2..7
src/assets/primeng/components/menubar/menubar.js on lines 2..7
src/assets/primeng/components/messages/messages.js on lines 2..7
src/assets/primeng/components/multiselect/multiselect.js on lines 2..7
src/assets/primeng/components/orderlist/orderlist.js on lines 2..7
src/assets/primeng/components/organizationchart/organizationchart.js on lines 2..7
src/assets/primeng/components/overlaypanel/overlaypanel.js on lines 2..7
src/assets/primeng/components/paginator/paginator.js on lines 2..7
src/assets/primeng/components/panel/panel.js on lines 2..7
src/assets/primeng/components/panelmenu/panelmenu.js on lines 12..17
src/assets/primeng/components/password/password.js on lines 2..7
src/assets/primeng/components/picklist/picklist.js on lines 2..7
src/assets/primeng/components/progressbar/progressbar.js on lines 2..7
src/assets/primeng/components/radiobutton/radiobutton.js on lines 2..7
src/assets/primeng/components/rating/rating.js on lines 2..7
src/assets/primeng/components/schedule/schedule.js on lines 2..7
src/assets/primeng/components/selectbutton/selectbutton.js on lines 2..7
src/assets/primeng/components/sidebar/sidebar.js on lines 2..7
src/assets/primeng/components/slidemenu/slidemenu.js on lines 2..7
src/assets/primeng/components/slider/slider.js on lines 2..7
src/assets/primeng/components/spinner/spinner.js on lines 2..7
src/assets/primeng/components/splitbutton/splitbutton.js on lines 2..7
src/assets/primeng/components/steps/steps.js on lines 2..7
src/assets/primeng/components/tabmenu/tabmenu.js on lines 2..7
src/assets/primeng/components/tabview/tabview.js on lines 2..7
src/assets/primeng/components/terminal/terminal.js on lines 2..7
src/assets/primeng/components/terminal/terminalservice.js on lines 2..7
src/assets/primeng/components/tieredmenu/tieredmenu.js on lines 2..7
src/assets/primeng/components/togglebutton/togglebutton.js on lines 2..7
src/assets/primeng/components/toolbar/toolbar.js on lines 2..7
src/assets/primeng/components/tooltip/tooltip.js on lines 2..7
src/assets/primeng/components/tree/tree.js on lines 2..7
src/assets/primeng/components/treetable/treetable.js on lines 2..7
src/assets/primeng/components/tristatecheckbox/tristatecheckbox.js on lines 2..7
src/assets/primeng/components/utils/objectutils.js on lines 2..7

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

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

    Tree.prototype.propagateDown = function (node, select) {
        var index = this.findIndexInSelection(node);
        if (select && index == -1) {
            this.selection = (this.selection || []).concat([node]);
        }
Severity: Major
Found in src/assets/primeng/components/tree/tree.js and 1 other location - About 1 day to fix
src/assets/primeng/components/treetable/treetable.js on lines 291..306

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

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

    TreeTable.prototype.propagateSelectionDown = function (node, select) {
        var index = this.findIndexInSelection(node);
        if (select && index == -1) {
            this.selection = (this.selection || []).concat([node]);
        }
Severity: Major
Found in src/assets/primeng/components/treetable/treetable.js and 1 other location - About 1 day to fix
src/assets/primeng/components/tree/tree.js on lines 457..472

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

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

    PickList.prototype.moveRight = function () {
        if (this.selectedItemsSource && this.selectedItemsSource.length) {
            for (var i = 0; i < this.selectedItemsSource.length; i++) {
                var selectedItem = this.selectedItemsSource[i];
                if (this.findIndexInList(selectedItem, this.target) == -1) {
Severity: Major
Found in src/assets/primeng/components/picklist/picklist.js and 1 other location - About 1 day to fix
src/assets/primeng/components/picklist/picklist.js on lines 239..252

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

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

    PickList.prototype.moveLeft = function () {
        if (this.selectedItemsTarget && this.selectedItemsTarget.length) {
            for (var i = 0; i < this.selectedItemsTarget.length; i++) {
                var selectedItem = this.selectedItemsTarget[i];
                if (this.findIndexInList(selectedItem, this.source) == -1) {
Severity: Major
Found in src/assets/primeng/components/picklist/picklist.js and 1 other location - About 1 day to fix
src/assets/primeng/components/picklist/picklist.js on lines 205..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 197.

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

SplitButton = __decorate([
    core_1.Component({
        selector: 'p-splitButton',
        template: "\n        <div #container [ngClass]=\"{'ui-splitbutton ui-buttonset ui-widget':true,'ui-state-disabled':disabled}\" [ngStyle]=\"style\" [class]=\"styleClass\">\n            <button #defaultbtn type=\"button\" pButton [icon]=\"icon\" [iconPos]=\"iconPos\" [label]=\"label\" cornerStyleClass=\"ui-corner-left\" (click)=\"onDefaultButtonClick($event)\" [disabled]=\"disabled\" [attr.tabindex]=\"tabindex\">\n            </button><button type=\"button\" pButton class=\"ui-splitbutton-menubutton\" icon=\"fa-caret-down\" cornerStyleClass=\"ui-corner-right\" (click)=\"onDropdownButtonClick($event)\" [disabled]=\"disabled\"></button>\n            <div #overlay [ngClass]=\"'ui-menu ui-menu-dynamic ui-widget ui-widget-content ui-corner-all ui-helper-clearfix ui-shadow'\" [style.display]=\"menuVisible ? 'block' : 'none'\"\n                    [ngStyle]=\"menuStyle\" [class]=\"menuStyleClass\" [@overlayState]=\"menuVisible ? 'visible' : 'hidden'\">\n                <ul class=\"ui-menu-list ui-helper-reset\">\n                    <li class=\"ui-menuitem ui-widget ui-corner-all\" role=\"menuitem\" *ngFor=\"let item of model\">\n                        <a *ngIf=\"!item.routerLink\" [href]=\"item.url||'#'\" class=\"ui-menuitem-link ui-corner-all\" [attr.target]=\"item.target\"\n                            [ngClass]=\"{'ui-state-disabled':item.disabled}\" (click)=\"itemClick($event, item)\">\n                            <span [ngClass]=\"'ui-menuitem-icon fa fa-fw'\" [class]=\"item.icon\" *ngIf=\"item.icon\"></span>\n                            <span class=\"ui-menuitem-text\">{{item.label}}</span>\n                        </a>\n                        <a *ngIf=\"item.routerLink\" [routerLink]=\"item.routerLink\"\n                            class=\"ui-menuitem-link ui-corner-all\" [attr.target]=\"item.target\" [ngClass]=\"{'ui-state-disabled':item.disabled}\" (click)=\"itemClick($event, item)\">\n                            <span [ngClass]=\"'ui-menuitem-icon fa fa-fw'\" [class]=\"item.icon\" *ngIf=\"item.icon\"></span>\n                            <span class=\"ui-menuitem-text\">{{item.label}}</span>\n                        </a>\n                    </li>\n                </ul>\n            </div>\n        </div>\n    ",
        animations: [
Severity: Major
Found in src/assets/primeng/components/splitbutton/splitbutton.js and 1 other location - About 7 hrs to fix
src/assets/primeng/components/confirmdialog/confirmdialog.js on lines 276..296

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

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

ConfirmDialog = __decorate([
    core_1.Component({
        selector: 'p-confirmDialog',
        template: "\n        <div [ngClass]=\"{'ui-dialog ui-confirmdialog ui-widget ui-widget-content ui-corner-all ui-shadow':true,'ui-dialog-rtl':rtl}\" \n            [style.display]=\"visible ? 'block' : 'none'\" [style.width.px]=\"width\" [style.height.px]=\"height\" (mousedown)=\"moveOnTop()\" [@dialogState]=\"visible ? 'visible' : 'hidden'\">\n            <div class=\"ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-top\">\n                <span class=\"ui-dialog-title\" *ngIf=\"header\">{{header}}</span>\n                <a *ngIf=\"closable\" [ngClass]=\"{'ui-dialog-titlebar-icon ui-dialog-titlebar-close ui-corner-all':true}\" href=\"#\" role=\"button\" (click)=\"close($event)\">\n                    <span class=\"fa fa-fw fa-close\"></span>\n                </a>\n            </div>\n            <div class=\"ui-dialog-content ui-widget-content\">\n                <i [ngClass]=\"'fa'\" [class]=\"icon\" *ngIf=\"icon\"></i>\n                <span class=\"ui-confirmdialog-message\" [innerHTML]=\"message\"></span>\n            </div>\n            <div class=\"ui-dialog-footer ui-widget-content\" *ngIf=\"footer\">\n                <ng-content select=\"p-footer\"></ng-content>\n            </div>\n            <div class=\"ui-dialog-footer ui-widget-content\" *ngIf=\"!footer\">\n                <button type=\"button\" pButton [icon]=\"acceptIcon\" [label]=\"acceptLabel\" (click)=\"accept()\" *ngIf=\"acceptVisible\"></button>\n                <button type=\"button\" pButton [icon]=\"rejectIcon\" [label]=\"rejectLabel\" (click)=\"reject()\" *ngIf=\"rejectVisible\"></button>\n            </div>\n        </div>\n    ",
        animations: [
Severity: Major
Found in src/assets/primeng/components/confirmdialog/confirmdialog.js and 1 other location - About 7 hrs to fix
src/assets/primeng/components/splitbutton/splitbutton.js on lines 171..190

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

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

    ObjectUtils.prototype.resolveFieldData = function (data, field) {
        if (data && field) {
            if (field.indexOf('.') == -1) {
                return data[field];
            }
Severity: Major
Found in src/assets/primeng/components/utils/objectutils.js and 1 other location - About 6 hrs to fix
src/assets/primeng/components/datatable/datatable.js on lines 674..694

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

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

    DataTable.prototype.resolveFieldData = function (data, field) {
        if (data && field) {
            if (field.indexOf('.') == -1) {
                return data[field];
            }
Severity: Major
Found in src/assets/primeng/components/datatable/datatable.js and 1 other location - About 6 hrs to fix
src/assets/primeng/components/utils/objectutils.js on lines 62..82

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

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

describe('EntityDebugComponent', () => {
  let component: EntityDebugComponent;
  let fixture: ComponentFixture<EntityDebugComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('GameStateHeaderComponent', () => {
  let component: GameStateHeaderComponent;
  let fixture: ComponentFixture<GameStateHeaderComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('InlineHelpComponent', () => {
  let component: InlineHelpComponent;
  let fixture: ComponentFixture<InlineHelpComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('GameOverComponent', () => {
  let component: GameOverComponent;
  let fixture: ComponentFixture<GameOverComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('TokenDebugComponent', () => {
  let component: TokenDebugComponent;
  let fixture: ComponentFixture<TokenDebugComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('SentenceDebugCardComponent', () => {
  let component: SentenceDebugCardComponent;
  let fixture: ComponentFixture<SentenceDebugCardComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('ParserErrorComponent', () => {
  let component: ParserErrorComponent;
  let fixture: ComponentFixture<ParserErrorComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('TokenComponent', () => {
  let component: TokenComponent;
  let fixture: ComponentFixture<TokenComponent>;

  beforeEach(async(() => {
Severity: Major
Found in src/app/text-rendering/token/token.component.spec.ts and 14 other locations - About 6 hrs to fix
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/entity-reference/entity-reference.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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

describe('EntityReferenceComponent', () => {
  let component: EntityReferenceComponent;
  let fixture: ComponentFixture<EntityReferenceComponent>;

  beforeEach(async(() => {
src/app/command-area/command-area.component.spec.ts on lines 5..25
src/app/command-area/parser-command-area/parser-command-area.component.spec.ts on lines 5..25
src/app/command-area/tag-command-area/tag-command-area.component.spec.ts on lines 5..25
src/app/text-rendering/entity-debug/entity-debug.component.spec.ts on lines 5..25
src/app/text-rendering/game-over/game-over.component.spec.ts on lines 5..25
src/app/text-rendering/game-state-header/game-state-header.component.spec.ts on lines 5..25
src/app/text-rendering/inline-help/inline-help.component.spec.ts on lines 5..25
src/app/text-rendering/line-renderer/line-renderer.component.spec.ts on lines 5..25
src/app/text-rendering/parser-error/parser-error.component.spec.ts on lines 5..25
src/app/text-rendering/sentence-debug-card/sentence-debug-card.component.spec.ts on lines 5..25
src/app/text-rendering/text-list/text-list.component.spec.ts on lines 5..25
src/app/text-rendering/token-debug/token-debug.component.spec.ts on lines 5..25
src/app/text-rendering/token/token.component.spec.ts on lines 5..25
src/app/text-rendering/user-input/user-input.component.spec.ts on lines 5..25

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

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