owncloud/core

View on GitHub

Showing 1,269 of 4,504 total issues

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

OC.L10N.register(
    "systemtags",
    {
    "Tags" : "Tunnisteet",
    "Tagged files" : "Tunnisteella merkityt tiedostot",
Severity: Major
Found in apps/systemtags/l10n/fi_FI.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "files_sharing",
    {
    "Shared by link" : "通過連結分享<br>",
    "Cancel" : "取消",
Severity: Major
Found in apps/files_sharing/l10n/zh_HK.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "updatenotification",
    {
    "Update notifications" : "Uuenduste teavitused",
    "{version} is available. Get more information on how to update." : "{version} on saadaval. Vaata lisainfot uuendamise kohta.",
Severity: Major
Found in apps/updatenotification/l10n/et_EE.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "settings",
    {
    "Email sent" : "ईमेल भेज दिया गया है ",
    "Delete" : "हटाना",
Severity: Major
Found in settings/l10n/hi.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "updatenotification",
    {
    "Update notifications" : "Actualizar notificaciones",
    "{version} is available. Get more information on how to update." : "{version} está disponible. Obtenga más información sobre cómo actualizar.",
Severity: Major
Found in apps/updatenotification/l10n/es_AR.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "files",
    {
    "All files" : "Todos los archivos",
    "Close" : "Cerrar",
Severity: Major
Found in apps/files/l10n/es_ES.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "files_sharing",
    {
    "Shared by link" : "Podijeljeno putem linka",
    "Cancel" : "Odustani",
Severity: Major
Found in apps/files_sharing/l10n/bs.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "files",
    {
    "Unknown error" : "ਅਣਜਾਣ ਗਲਤੀ",
    "All files" : "ਸਾਰੀਆਂ ਫਾਈਲਾਂ",
Severity: Major
Found in apps/files/l10n/pa.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pl_PL.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

OC.L10N.register(
    "files",
    {
    "All files" : "Wszystkie pliki",
    "Close" : "Zamknij",
Severity: Major
Found in apps/files/l10n/pl_PL.js and 12 other locations - About 2 hrs to fix
apps/federatedfilesharing/l10n/et_EE.js on lines 1..17
apps/files/l10n/es_ES.js on lines 1..17
apps/files/l10n/pa.js on lines 1..17
apps/files_external/l10n/kn.js on lines 1..17
apps/files_sharing/l10n/bs.js on lines 1..17
apps/files_sharing/l10n/zh_HK.js on lines 1..17
apps/systemtags/l10n/fi_FI.js on lines 1..17
apps/systemtags/l10n/mk.js on lines 1..17
apps/updatenotification/l10n/es_AR.js on lines 1..17
apps/updatenotification/l10n/et_EE.js on lines 1..17
core/l10n/pl_PL.js on lines 1..17
settings/l10n/hi.js on lines 1..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        template: function(data) {
            if (!OCA.Files.FileActionsMenu._TEMPLATE) {
                OCA.Files.FileActionsMenu._TEMPLATE = Handlebars.compile(TEMPLATE_MENU);
            }
            return OCA.Files.FileActionsMenu._TEMPLATE(data);
Severity: Major
Found in apps/files/js/fileactionsmenu.js and 2 other locations - About 2 hrs to fix
apps/files/js/fileactionsapplicationselectmenu.js on lines 53..58
apps/files/js/newfilemenu.js on lines 83..88

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        template: function(data) {
            if (!OCA.Files.FileActionsApplicationSelectMenu._TEMPLATE) {
                OCA.Files.FileActionsApplicationSelectMenu._TEMPLATE = Handlebars.compile(TEMPLATE_MENU);
            }
            return OCA.Files.FileActionsApplicationSelectMenu._TEMPLATE(data);
Severity: Major
Found in apps/files/js/fileactionsapplicationselectmenu.js and 2 other locations - About 2 hrs to fix
apps/files/js/fileactionsmenu.js on lines 51..56
apps/files/js/newfilemenu.js on lines 83..88

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        template: function(data) {
            if (!OCA.Files.NewFileMenu._TEMPLATE) {
                OCA.Files.NewFileMenu._TEMPLATE = Handlebars.compile(TEMPLATE_MENU);
            }
            return OCA.Files.NewFileMenu._TEMPLATE(data);
Severity: Major
Found in apps/files/js/newfilemenu.js and 2 other locations - About 2 hrs to fix
apps/files/js/fileactionsapplicationselectmenu.js on lines 53..58
apps/files/js/fileactionsmenu.js on lines 51..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) {
            return app.id.toLowerCase().indexOf(query) !== -1;
        }));
Severity: Major
Found in settings/js/admin-apps.js and 1 other location - About 2 hrs to fix
settings/js/admin-apps.js on lines 526..528

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

        apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) {
            return app.description.toLowerCase().indexOf(query) !== -1;
        }));
Severity: Major
Found in settings/js/admin-apps.js and 1 other location - About 2 hrs to fix
settings/js/admin-apps.js on lines 521..523

Duplicated Code

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

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

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

Tuning

This issue has a mass of 78.

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

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

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

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

Refactorings

Further Reading

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

    $('#shareapiExpireAfterNDaysUserShare').change(function() {
        var value = parseInt($(this).val(), 10)

        if (value <= 0 || isNaN(value)) {
            $(this).val(7);
Severity: Major
Found in settings/js/admin.js and 2 other locations - About 2 hrs to fix
settings/js/admin.js on lines 93..99
settings/js/admin.js on lines 105..111

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

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

        getDefaultExpireDateGroup: function(format) {
            format = format || false;
            defaultExpireDateGroup = parseInt(this.get('defaultExpireDateGroup'), 10);

            if (format) {
Severity: Major
Found in core/js/shareconfigmodel.js and 1 other location - About 2 hrs to fix
core/js/shareconfigmodel.js on lines 179..188

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

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

    $('#shareapiExpireAfterNDaysGroupShare').change(function() {
        var value = parseInt($(this).val(), 10)

        if (value <= 0 || isNaN(value)) {
            $(this).val(7);
Severity: Major
Found in settings/js/admin.js and 2 other locations - About 2 hrs to fix
settings/js/admin.js on lines 81..87
settings/js/admin.js on lines 105..111

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

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

        getDefaultExpireDateRemote: function(format) {
            format = format || false;
            defaultExpireDateRemote = parseInt(this.get('defaultExpireDateRemote'), 10);

            if (format) {
Severity: Major
Found in core/js/shareconfigmodel.js and 1 other location - About 2 hrs to fix
core/js/shareconfigmodel.js on lines 151..160

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

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

    $('#shareapiExpireAfterNDaysFederatedShare').change(function() {
        var value = parseInt($(this).val(), 10)

        if (value <= 0 || isNaN(value)) {
            $(this).val(7);
Severity: Major
Found in settings/js/admin.js and 2 other locations - About 2 hrs to fix
settings/js/admin.js on lines 81..87
settings/js/admin.js on lines 93..99

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

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

                            } else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {
                                remotesLength = remotes.length;
                                for (j = 0; j < remotesLength; j++) {
                                    if (remotes[j].value.shareWith === share.share_with) {
                                        remotes.splice(j, 1);
Severity: Major
Found in core/js/sharedialogview.js and 2 other locations - About 2 hrs to fix
core/js/sharedialogview.js on lines 247..271
core/js/sharedialogview.js on lines 255..271

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

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