owncloud/core

View on GitHub

Showing 1,269 of 4,504 total issues

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

OC.L10N.register(
    "systemtags",
    {
    "Tags" : "Birkas",
    "No files in here" : "Šeit nav failu",
Severity: Major
Found in apps/systemtags/l10n/lv.js and 32 other locations - About 40 mins to fix
apps/dav/l10n/ca.js on lines 1..11
apps/dav/l10n/de_AT.js on lines 1..11
apps/dav/l10n/eo.js on lines 1..11
apps/dav/l10n/es_AR.js on lines 1..11
apps/dav/l10n/es_MX.js on lines 1..11
apps/dav/l10n/et_EE.js on lines 1..11
apps/dav/l10n/eu.js on lines 1..11
apps/dav/l10n/fa.js on lines 1..11
apps/dav/l10n/gu.js on lines 1..11
apps/dav/l10n/hr.js on lines 1..11
apps/dav/l10n/ia.js on lines 1..11
apps/dav/l10n/lb.js on lines 1..11
apps/dav/l10n/lo.js on lines 1..11
apps/dav/l10n/mk.js on lines 1..11
apps/dav/l10n/nn_NO.js on lines 1..11
apps/dav/l10n/sr.js on lines 1..11
apps/federation/l10n/eo.js on lines 1..11
apps/files_external/l10n/pa.js on lines 1..11
apps/files_sharing/l10n/ku_IQ.js on lines 1..11
apps/files_sharing/l10n/ml_IN.js on lines 1..11
apps/files_sharing/l10n/ta_IN.js on lines 1..11
apps/systemtags/l10n/az.js on lines 1..11
apps/systemtags/l10n/es_AR.js on lines 1..11
apps/systemtags/l10n/hy.js on lines 1..11
apps/systemtags/l10n/id.js on lines 1..11
apps/systemtags/l10n/nn_NO.js on lines 1..11
apps/systemtags/l10n/sk_SK.js on lines 1..11
apps/systemtags/l10n/sr@latin.js on lines 1..11
core/l10n/mr.js on lines 1..11
lib/l10n/be.js on lines 1..11
lib/l10n/es_ES.js on lines 1..11
settings/l10n/pl_PL.js on lines 1..11

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

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

OC.L10N.register(
    "dav",
    {
    "Contact birthdays" : "કોન્ટાક્ટ ના જન્મદિવસ ",
    "Personal" : "વ્યક્તિગત",
Severity: Major
Found in apps/dav/l10n/gu.js and 32 other locations - About 40 mins to fix
apps/dav/l10n/ca.js on lines 1..11
apps/dav/l10n/de_AT.js on lines 1..11
apps/dav/l10n/eo.js on lines 1..11
apps/dav/l10n/es_AR.js on lines 1..11
apps/dav/l10n/es_MX.js on lines 1..11
apps/dav/l10n/et_EE.js on lines 1..11
apps/dav/l10n/eu.js on lines 1..11
apps/dav/l10n/fa.js on lines 1..11
apps/dav/l10n/hr.js on lines 1..11
apps/dav/l10n/ia.js on lines 1..11
apps/dav/l10n/lb.js on lines 1..11
apps/dav/l10n/lo.js on lines 1..11
apps/dav/l10n/mk.js on lines 1..11
apps/dav/l10n/nn_NO.js on lines 1..11
apps/dav/l10n/sr.js on lines 1..11
apps/federation/l10n/eo.js on lines 1..11
apps/files_external/l10n/pa.js on lines 1..11
apps/files_sharing/l10n/ku_IQ.js on lines 1..11
apps/files_sharing/l10n/ml_IN.js on lines 1..11
apps/files_sharing/l10n/ta_IN.js on lines 1..11
apps/systemtags/l10n/az.js on lines 1..11
apps/systemtags/l10n/es_AR.js on lines 1..11
apps/systemtags/l10n/hy.js on lines 1..11
apps/systemtags/l10n/id.js on lines 1..11
apps/systemtags/l10n/lv.js on lines 1..11
apps/systemtags/l10n/nn_NO.js on lines 1..11
apps/systemtags/l10n/sk_SK.js on lines 1..11
apps/systemtags/l10n/sr@latin.js on lines 1..11
core/l10n/mr.js on lines 1..11
lib/l10n/be.js on lines 1..11
lib/l10n/es_ES.js on lines 1..11
settings/l10n/pl_PL.js on lines 1..11

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

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

OC.L10N.register(
    "dav",
    {
    "Contact birthdays" : "ຕິດຕໍ່ວັນເກີດ",
    "Personal" : "ສ່ວນບຸກຄົນ",
Severity: Major
Found in apps/dav/l10n/lo.js and 32 other locations - About 40 mins to fix
apps/dav/l10n/ca.js on lines 1..11
apps/dav/l10n/de_AT.js on lines 1..11
apps/dav/l10n/eo.js on lines 1..11
apps/dav/l10n/es_AR.js on lines 1..11
apps/dav/l10n/es_MX.js on lines 1..11
apps/dav/l10n/et_EE.js on lines 1..11
apps/dav/l10n/eu.js on lines 1..11
apps/dav/l10n/fa.js on lines 1..11
apps/dav/l10n/gu.js on lines 1..11
apps/dav/l10n/hr.js on lines 1..11
apps/dav/l10n/ia.js on lines 1..11
apps/dav/l10n/lb.js on lines 1..11
apps/dav/l10n/mk.js on lines 1..11
apps/dav/l10n/nn_NO.js on lines 1..11
apps/dav/l10n/sr.js on lines 1..11
apps/federation/l10n/eo.js on lines 1..11
apps/files_external/l10n/pa.js on lines 1..11
apps/files_sharing/l10n/ku_IQ.js on lines 1..11
apps/files_sharing/l10n/ml_IN.js on lines 1..11
apps/files_sharing/l10n/ta_IN.js on lines 1..11
apps/systemtags/l10n/az.js on lines 1..11
apps/systemtags/l10n/es_AR.js on lines 1..11
apps/systemtags/l10n/hy.js on lines 1..11
apps/systemtags/l10n/id.js on lines 1..11
apps/systemtags/l10n/lv.js on lines 1..11
apps/systemtags/l10n/nn_NO.js on lines 1..11
apps/systemtags/l10n/sk_SK.js on lines 1..11
apps/systemtags/l10n/sr@latin.js on lines 1..11
core/l10n/mr.js on lines 1..11
lib/l10n/be.js on lines 1..11
lib/l10n/es_ES.js on lines 1..11
settings/l10n/pl_PL.js on lines 1..11

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

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

OC.L10N.register(
    "dav",
    {
    "Contact birthdays" : "Gebuertsdeeg vun de Kontakter",
    "Personal" : "Perséinlech",
Severity: Major
Found in apps/dav/l10n/lb.js and 32 other locations - About 40 mins to fix
apps/dav/l10n/ca.js on lines 1..11
apps/dav/l10n/de_AT.js on lines 1..11
apps/dav/l10n/eo.js on lines 1..11
apps/dav/l10n/es_AR.js on lines 1..11
apps/dav/l10n/es_MX.js on lines 1..11
apps/dav/l10n/et_EE.js on lines 1..11
apps/dav/l10n/eu.js on lines 1..11
apps/dav/l10n/fa.js on lines 1..11
apps/dav/l10n/gu.js on lines 1..11
apps/dav/l10n/hr.js on lines 1..11
apps/dav/l10n/ia.js on lines 1..11
apps/dav/l10n/lo.js on lines 1..11
apps/dav/l10n/mk.js on lines 1..11
apps/dav/l10n/nn_NO.js on lines 1..11
apps/dav/l10n/sr.js on lines 1..11
apps/federation/l10n/eo.js on lines 1..11
apps/files_external/l10n/pa.js on lines 1..11
apps/files_sharing/l10n/ku_IQ.js on lines 1..11
apps/files_sharing/l10n/ml_IN.js on lines 1..11
apps/files_sharing/l10n/ta_IN.js on lines 1..11
apps/systemtags/l10n/az.js on lines 1..11
apps/systemtags/l10n/es_AR.js on lines 1..11
apps/systemtags/l10n/hy.js on lines 1..11
apps/systemtags/l10n/id.js on lines 1..11
apps/systemtags/l10n/lv.js on lines 1..11
apps/systemtags/l10n/nn_NO.js on lines 1..11
apps/systemtags/l10n/sk_SK.js on lines 1..11
apps/systemtags/l10n/sr@latin.js on lines 1..11
core/l10n/mr.js on lines 1..11
lib/l10n/be.js on lines 1..11
lib/l10n/es_ES.js on lines 1..11
settings/l10n/pl_PL.js on lines 1..11

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

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

OC.L10N.register(
    "lib",
    {
    "today" : "Сёння",
    "yesterday" : "Ўчора",
Severity: Major
Found in lib/l10n/be.js and 32 other locations - About 40 mins to fix
apps/dav/l10n/ca.js on lines 1..11
apps/dav/l10n/de_AT.js on lines 1..11
apps/dav/l10n/eo.js on lines 1..11
apps/dav/l10n/es_AR.js on lines 1..11
apps/dav/l10n/es_MX.js on lines 1..11
apps/dav/l10n/et_EE.js on lines 1..11
apps/dav/l10n/eu.js on lines 1..11
apps/dav/l10n/fa.js on lines 1..11
apps/dav/l10n/gu.js on lines 1..11
apps/dav/l10n/hr.js on lines 1..11
apps/dav/l10n/ia.js on lines 1..11
apps/dav/l10n/lb.js on lines 1..11
apps/dav/l10n/lo.js on lines 1..11
apps/dav/l10n/mk.js on lines 1..11
apps/dav/l10n/nn_NO.js on lines 1..11
apps/dav/l10n/sr.js on lines 1..11
apps/federation/l10n/eo.js on lines 1..11
apps/files_external/l10n/pa.js on lines 1..11
apps/files_sharing/l10n/ku_IQ.js on lines 1..11
apps/files_sharing/l10n/ml_IN.js on lines 1..11
apps/files_sharing/l10n/ta_IN.js on lines 1..11
apps/systemtags/l10n/az.js on lines 1..11
apps/systemtags/l10n/es_AR.js on lines 1..11
apps/systemtags/l10n/hy.js on lines 1..11
apps/systemtags/l10n/id.js on lines 1..11
apps/systemtags/l10n/lv.js on lines 1..11
apps/systemtags/l10n/nn_NO.js on lines 1..11
apps/systemtags/l10n/sk_SK.js on lines 1..11
apps/systemtags/l10n/sr@latin.js on lines 1..11
core/l10n/mr.js on lines 1..11
lib/l10n/es_ES.js on lines 1..11
settings/l10n/pl_PL.js on lines 1..11

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

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

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

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

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

Refactorings

Further Reading

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

            if (_.isUndefined(options.properties)) {
                properties = this.getPropfindProperties();
            } else {
                properties = options.properties;
            }
Severity: Minor
Found in core/js/files/client.js and 1 other location - About 40 mins to fix
core/js/files/client.js on lines 491..495

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

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

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

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

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

Refactorings

Further Reading

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

            if (groupIsChecked && !groupIsRemovable) {
                $groupsSelect.append($('<option value="' + escapeHTML(gid) + '" disabled="disabled">' + escapeHTML(group['name']) + '</option>'));
                return;
            }
Severity: Minor
Found in settings/js/users/users.js and 1 other location - About 40 mins to fix
settings/js/users/users.js on lines 648..651

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

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

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

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

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

Refactorings

Further Reading

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

            if (!groupIsChecked && !groupIsAssignable) {
                $groupsSelect.append($('<option value="' + escapeHTML(gid) + '" disabled="disabled">' + escapeHTML(group['name']) + '</option>'));
                return;
            }
Severity: Minor
Found in settings/js/users/users.js and 1 other location - About 40 mins to fix
settings/js/users/users.js on lines 652..655

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

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

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

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

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

Refactorings

Further Reading

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

        _toggleLoading: function(state) {
            this._loading = state;
            this.$el.find('.loading').toggleClass('hidden', !state);
        },
Severity: Minor
Found in apps/comments/js/commentstabview.js and 1 other location - About 40 mins to fix
apps/files_versions/js/versionstabview.js on lines 237..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 48.

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

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

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

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

Refactorings

Further Reading

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

        _toggleLoading: function(state) {
            this._loading = state;
            this.$el.find('.loading').toggleClass('hidden', !state);
        },
Severity: Minor
Found in apps/files_versions/js/versionstabview.js and 1 other location - About 40 mins to fix
apps/comments/js/commentstabview.js on lines 188..191

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

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

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

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

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

Refactorings

Further Reading

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

            if (_.isUndefined(options.properties)) {
                properties = this.getPropfindProperties();
            } else {
                properties = options.properties;
            }
Severity: Minor
Found in core/js/files/client.js and 1 other location - About 40 mins to fix
core/js/files/client.js on lines 447..451

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

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 (that._trigger(
                        'change',
                        $.Event('change', {delegatedEvent: e}),
                        data
                    ) !== false) {
Severity: Minor
Found in apps/files/js/jquery.fileupload.js and 1 other location - About 40 mins to fix
apps/files/js/jquery.fileupload.js on lines 1336..1342

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

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 ((permissions & OC.PERMISSION_SHARE) !== 0) {
                            var $actionLink = $(self.renderPublicLinkAction());
                            context.$file.find('a.name>span.fileactions').append($actionLink);
                            return $actionLink;
                        }
Severity: Minor
Found in apps/files_sharing/js/share.js and 1 other location - About 40 mins to fix
apps/files/js/filelockplugin.js on lines 142..146

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

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 showArea() {
                    area.slideDown(OC.menuSpeed*4, function() {
                        area.trigger(new $.Event('show'));
                    });
                }
Severity: Minor
Found in core/js/apps.js and 1 other location - About 40 mins to fix
core/js/apps.js on lines 81..85

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

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 ($('#CheckBoxPasswordOnUserCreate').is(':checked')) {
            OC.AppConfig.setValue('core', 'umgmt_set_password', 'true');
            $('#newemail').hide();
            $('#newuserpassword').show();
        } else {
Severity: Minor
Found in settings/js/users/users.js and 1 other location - About 40 mins to fix
settings/js/users/users.js on lines 1100..1104

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

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

                        filteredAttributes.push({
                            scope : filteredRegisteredAttribute.scope,
                            key: filteredRegisteredAttribute.key,
                            incompatibleAttributes: filteredRegisteredAttribute.incompatibleAttributes,
                            enabled: currentAttribute.enabled
Severity: Minor
Found in core/js/shareitemmodel.js and 1 other location - About 40 mins to fix
core/js/shareitemmodel.js on lines 993..998

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

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 (isLocked && isLocked.length > 0) {
                        var $actionLink = $(self.renderLink());
                        context.$file.find('a.name>span.fileactions').append($actionLink);
                        return $actionLink;
                    }
Severity: Minor
Found in apps/files/js/filelockplugin.js and 1 other location - About 40 mins to fix
apps/files_sharing/js/share.js on lines 235..239

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

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

        } else {
            OC.AppConfig.setValue('core', 'umgmt_set_password', 'false');
            $('#newemail').show();
            $("#newuserpassword").hide();
        }
Severity: Minor
Found in settings/js/users/users.js and 1 other location - About 40 mins to fix
settings/js/users/users.js on lines 1096..1100

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

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

                    filteredAttributes.push({
                        scope : filteredRegisteredAttribute.scope,
                        key: filteredRegisteredAttribute.key,
                        incompatibleAttributes: filteredRegisteredAttribute.incompatibleAttributes,
                        enabled: filteredRegisteredAttribute.default
Severity: Minor
Found in core/js/shareitemmodel.js and 1 other location - About 40 mins to fix
core/js/shareitemmodel.js on lines 979..984

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

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 (that._trigger(
                            'drop',
                            $.Event('drop', {delegatedEvent: e}),
                            data
                        ) !== false) {
Severity: Minor
Found in apps/files/js/jquery.fileupload.js and 1 other location - About 40 mins to fix
apps/files/js/jquery.fileupload.js on lines 1296..1302

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

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