owncloud/core

View on GitHub

Showing 1,269 of 4,504 total issues

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

    getSendStatusNode : function(){
        if (!$('#lost-password').length){
            $('<p id="lost-password"></p>').insertBefore($('#remember_login'));
        } else {
            $('#lost-password').replaceWith($('<p id="lost-password"></p>'));
Severity: Major
Found in core/js/lostpassword.js and 1 other location - About 2 hrs to fix
core/js/lostpassword.js on lines 145..152

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

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

                            } else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {
                                groupsLength = groups.length;
                                for (j = 0; j < groupsLength; j++) {
                                    if (groups[j].value.shareWith === share.share_with) {
                                        groups.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 263..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

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

    getResetStatusNode : function (){
        if (!$('#lost-password').length){
            $('#reset-password .submit-wrap').prepend($('<p id="lost-password"></p>'));
        } else {
            $('#lost-password').replaceWith($('<p id="lost-password"></p>'));
Severity: Major
Found in core/js/lostpassword.js and 1 other location - About 2 hrs to fix
core/js/lostpassword.js on lines 67..74

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

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

                            if (share.share_type === OC.Share.SHARE_TYPE_USER) {
                                usersLength = users.length;
                                for (j = 0; j < usersLength; j++) {
                                    if (users[j].value.shareWith === share.share_with) {
                                        users.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 255..271
core/js/sharedialogview.js on lines 263..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

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

    public function unlockFile($path, $type, $lockMountPoint = false) {
        $absolutePath = $this->getAbsolutePath($path);
        $absolutePath = Filesystem::normalizePath($absolutePath);
        if (!$this->shouldLockFile($absolutePath)) {
            return false;
Severity: Major
Found in lib/private/Files/View.php and 1 other location - About 2 hrs to fix
lib/private/Files/View.php on lines 2143..2158

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

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

    public function lockFile($path, $type, $lockMountPoint = false) {
        $absolutePath = $this->getAbsolutePath($path);
        $absolutePath = Filesystem::normalizePath($absolutePath);
        if (!$this->shouldLockFile($absolutePath)) {
            return false;
Severity: Major
Found in lib/private/Files/View.php and 1 other location - About 2 hrs to fix
lib/private/Files/View.php on lines 2169..2184

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

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

                    tags = _.chain(tags).filter(function(xmlvalue) {
                        return (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'tag');
                    }).map(function(xmlvalue) {
                        return xmlvalue.textContent || xmlvalue.text;
                    }).value();
Severity: Major
Found in apps/files/js/tagsplugin.js and 1 other location - About 2 hrs to fix
apps/files_sharing/js/share.js on lines 122..126

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

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

                try {
                    if (!Files.isFileNameValid(filename)) {
                        // Files.isFileNameValid(filename) throws an exception itself
                    } else if (self.fileList.inList(filename)) {
                        throw t('files', '{newname} already exists', {newname: filename});
Severity: Major
Found in apps/files/js/newfilemenu.js and 2 other locations - About 2 hrs to fix
apps/files/js/filelist.js on lines 2384..2474
apps/files/js/filelist.js on lines 2479..2489

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

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

                try {
                    checkInput();
                    input.tooltip('hide');
                    input.removeClass('error');
                } catch (error) {
Severity: Major
Found in apps/files/js/filelist.js and 2 other locations - About 2 hrs to fix
apps/files/js/filelist.js on lines 2384..2474
apps/files/js/newfilemenu.js on lines 156..170

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

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

                try {
                    var newName = input.val().trim();
                    input.tooltip('hide');
                    form.remove();

Severity: Major
Found in apps/files/js/filelist.js and 2 other locations - About 2 hrs to fix
apps/files/js/filelist.js on lines 2479..2489
apps/files/js/newfilemenu.js on lines 156..170

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

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

                    data.shareTypes = _.chain(shareTypesProp).filter(function(xmlvalue) {
                        return (xmlvalue.namespaceURI === OC.Files.Client.NS_OWNCLOUD && xmlvalue.nodeName.split(':')[1] === 'share-type');
                    }).map(function(xmlvalue) {
                        return parseInt(xmlvalue.textContent || xmlvalue.text, 10);
                    }).value();
Severity: Major
Found in apps/files_sharing/js/share.js and 1 other location - About 2 hrs to fix
apps/files/js/tagsplugin.js on lines 188..192

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

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 ($this->offsetGet($path) === null) {
            // TODO: chunking if more than 1000 properties
            $sql = self::SELECT_BY_PATH_STMT;

            $whereValues = [$path];
Severity: Major
Found in apps/dav/lib/DAV/MiscCustomPropertiesBackend.php and 1 other location - About 2 hrs to fix
apps/dav/lib/DAV/FileCustomPropertiesBackend.php on lines 142..157

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

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 ($this->offsetGet($fileId) === null) {
            // TODO: chunking if more than 1000 properties
            $sql = self::SELECT_BY_ID_STMT;
            $whereValues = [$fileId];
            $whereTypes = [null];
Severity: Major
Found in apps/dav/lib/DAV/FileCustomPropertiesBackend.php and 1 other location - About 2 hrs to fix
apps/dav/lib/DAV/MiscCustomPropertiesBackend.php on lines 88..104

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

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

        for(var i in groups) {
            var gid = groups[i]['gid'];
            var $li = GroupList.getGroupLI(gid);
            var userCount = GroupList.getUserCount($li);
            GroupList.setUserCount($li, userCount - 1);
Severity: Major
Found in settings/js/users/users.js and 1 other location - About 1 hr to fix
settings/js/users/users.js on lines 320..325

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

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

        for(var i in groups) {
            var gid = groups[i]['gid'];
            var $li = GroupList.getGroupLI(gid);
            var userCount = GroupList.getUserCount($li);
            GroupList.setUserCount($li, userCount + 1);
Severity: Major
Found in settings/js/users/users.js and 1 other location - About 1 hr to fix
settings/js/users/users.js on lines 305..310

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

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

<?php
namespace OC\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
Severity: Major
Found in core/Migrations/Version20240112140951.php and 1 other location - About 1 hr to fix
core/Migrations/Version20170711191432.php on lines 1..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 120.

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

<?php
namespace OC\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
Severity: Major
Found in core/Migrations/Version20170711191432.php and 1 other location - About 1 hr to fix
core/Migrations/Version20240112140951.php on lines 1..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 120.

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

OC.L10N.register(
    "federation",
    {
    "Server added to the list of trusted ownClouds" : "Der Server wurde in die Liste der vertrauenswürdigen Server aufgenommen",
    "Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
Severity: Major
Found in apps/federation/l10n/de.js and 51 other locations - About 1 hr to fix
apps/federation/l10n/af_ZA.js on lines 1..16
apps/federation/l10n/ar.js on lines 1..16
apps/federation/l10n/bg_BG.js on lines 1..16
apps/federation/l10n/ca.js on lines 1..16
apps/federation/l10n/cs_CZ.js on lines 1..16
apps/federation/l10n/da.js on lines 1..16
apps/federation/l10n/de_CH.js on lines 1..16
apps/federation/l10n/de_DE.js on lines 1..16
apps/federation/l10n/el.js on lines 1..16
apps/federation/l10n/en_GB.js on lines 1..16
apps/federation/l10n/es.js on lines 1..16
apps/federation/l10n/es_AR.js on lines 1..16
apps/federation/l10n/es_MX.js on lines 1..16
apps/federation/l10n/eu.js on lines 1..16
apps/federation/l10n/fi_FI.js on lines 1..16
apps/federation/l10n/fr.js on lines 1..16
apps/federation/l10n/gl.js on lines 1..16
apps/federation/l10n/he.js on lines 1..16
apps/federation/l10n/hu_HU.js on lines 1..16
apps/federation/l10n/id.js on lines 1..16
apps/federation/l10n/is.js on lines 1..16
apps/federation/l10n/it.js on lines 1..16
apps/federation/l10n/ja.js on lines 1..16
apps/federation/l10n/ko.js on lines 1..16
apps/federation/l10n/lb.js on lines 1..16
apps/federation/l10n/nb_NO.js on lines 1..16
apps/federation/l10n/nl.js on lines 1..16
apps/federation/l10n/nn_NO.js on lines 1..16
apps/federation/l10n/oc.js on lines 1..16
apps/federation/l10n/pl.js on lines 1..16
apps/federation/l10n/pt_BR.js on lines 1..16
apps/federation/l10n/pt_PT.js on lines 1..16
apps/federation/l10n/ro.js on lines 1..16
apps/federation/l10n/ru.js on lines 1..16
apps/federation/l10n/ru_RU.js on lines 1..16
apps/federation/l10n/sl.js on lines 1..16
apps/federation/l10n/sq.js on lines 1..16
apps/federation/l10n/sr.js on lines 1..16
apps/federation/l10n/sv.js on lines 1..16
apps/federation/l10n/th_TH.js on lines 1..16
apps/federation/l10n/tr.js on lines 1..16
apps/federation/l10n/ug.js on lines 1..16
apps/federation/l10n/uk.js on lines 1..16
apps/federation/l10n/zh_CN.js on lines 1..16
apps/federation/l10n/zh_TW.js on lines 1..16
apps/files/l10n/ur_PK.js on lines 1..16
apps/files_external/l10n/ia.js on lines 1..16
apps/files_sharing/l10n/ms_MY.js on lines 1..16
core/l10n/es_ES.js on lines 1..16
core/l10n/gu.js on lines 1..16
lib/l10n/my_MM.js on lines 1..16

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

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

OC.L10N.register(
    "federation",
    {
    "Server added to the list of trusted ownClouds" : "Server aggiunto all'elenco di ownCloud affidabili",
    "Server is already in the list of trusted servers." : "Il server è già nell'elenco dei server affidabili.",
Severity: Major
Found in apps/federation/l10n/it.js and 51 other locations - About 1 hr to fix
apps/federation/l10n/af_ZA.js on lines 1..16
apps/federation/l10n/ar.js on lines 1..16
apps/federation/l10n/bg_BG.js on lines 1..16
apps/federation/l10n/ca.js on lines 1..16
apps/federation/l10n/cs_CZ.js on lines 1..16
apps/federation/l10n/da.js on lines 1..16
apps/federation/l10n/de.js on lines 1..16
apps/federation/l10n/de_CH.js on lines 1..16
apps/federation/l10n/de_DE.js on lines 1..16
apps/federation/l10n/el.js on lines 1..16
apps/federation/l10n/en_GB.js on lines 1..16
apps/federation/l10n/es.js on lines 1..16
apps/federation/l10n/es_AR.js on lines 1..16
apps/federation/l10n/es_MX.js on lines 1..16
apps/federation/l10n/eu.js on lines 1..16
apps/federation/l10n/fi_FI.js on lines 1..16
apps/federation/l10n/fr.js on lines 1..16
apps/federation/l10n/gl.js on lines 1..16
apps/federation/l10n/he.js on lines 1..16
apps/federation/l10n/hu_HU.js on lines 1..16
apps/federation/l10n/id.js on lines 1..16
apps/federation/l10n/is.js on lines 1..16
apps/federation/l10n/ja.js on lines 1..16
apps/federation/l10n/ko.js on lines 1..16
apps/federation/l10n/lb.js on lines 1..16
apps/federation/l10n/nb_NO.js on lines 1..16
apps/federation/l10n/nl.js on lines 1..16
apps/federation/l10n/nn_NO.js on lines 1..16
apps/federation/l10n/oc.js on lines 1..16
apps/federation/l10n/pl.js on lines 1..16
apps/federation/l10n/pt_BR.js on lines 1..16
apps/federation/l10n/pt_PT.js on lines 1..16
apps/federation/l10n/ro.js on lines 1..16
apps/federation/l10n/ru.js on lines 1..16
apps/federation/l10n/ru_RU.js on lines 1..16
apps/federation/l10n/sl.js on lines 1..16
apps/federation/l10n/sq.js on lines 1..16
apps/federation/l10n/sr.js on lines 1..16
apps/federation/l10n/sv.js on lines 1..16
apps/federation/l10n/th_TH.js on lines 1..16
apps/federation/l10n/tr.js on lines 1..16
apps/federation/l10n/ug.js on lines 1..16
apps/federation/l10n/uk.js on lines 1..16
apps/federation/l10n/zh_CN.js on lines 1..16
apps/federation/l10n/zh_TW.js on lines 1..16
apps/files/l10n/ur_PK.js on lines 1..16
apps/files_external/l10n/ia.js on lines 1..16
apps/files_sharing/l10n/ms_MY.js on lines 1..16
core/l10n/es_ES.js on lines 1..16
core/l10n/gu.js on lines 1..16
lib/l10n/my_MM.js on lines 1..16

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

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

OC.L10N.register(
    "federation",
    {
    "Server added to the list of trusted ownClouds" : "Þjóninum bætt við listann yfir treyst ownCloud-ský",
    "Server is already in the list of trusted servers." : "Þjónninn er nú þegar á listanum yfir treysta þjóna.",
Severity: Major
Found in apps/federation/l10n/is.js and 51 other locations - About 1 hr to fix
apps/federation/l10n/af_ZA.js on lines 1..16
apps/federation/l10n/ar.js on lines 1..16
apps/federation/l10n/bg_BG.js on lines 1..16
apps/federation/l10n/ca.js on lines 1..16
apps/federation/l10n/cs_CZ.js on lines 1..16
apps/federation/l10n/da.js on lines 1..16
apps/federation/l10n/de.js on lines 1..16
apps/federation/l10n/de_CH.js on lines 1..16
apps/federation/l10n/de_DE.js on lines 1..16
apps/federation/l10n/el.js on lines 1..16
apps/federation/l10n/en_GB.js on lines 1..16
apps/federation/l10n/es.js on lines 1..16
apps/federation/l10n/es_AR.js on lines 1..16
apps/federation/l10n/es_MX.js on lines 1..16
apps/federation/l10n/eu.js on lines 1..16
apps/federation/l10n/fi_FI.js on lines 1..16
apps/federation/l10n/fr.js on lines 1..16
apps/federation/l10n/gl.js on lines 1..16
apps/federation/l10n/he.js on lines 1..16
apps/federation/l10n/hu_HU.js on lines 1..16
apps/federation/l10n/id.js on lines 1..16
apps/federation/l10n/it.js on lines 1..16
apps/federation/l10n/ja.js on lines 1..16
apps/federation/l10n/ko.js on lines 1..16
apps/federation/l10n/lb.js on lines 1..16
apps/federation/l10n/nb_NO.js on lines 1..16
apps/federation/l10n/nl.js on lines 1..16
apps/federation/l10n/nn_NO.js on lines 1..16
apps/federation/l10n/oc.js on lines 1..16
apps/federation/l10n/pl.js on lines 1..16
apps/federation/l10n/pt_BR.js on lines 1..16
apps/federation/l10n/pt_PT.js on lines 1..16
apps/federation/l10n/ro.js on lines 1..16
apps/federation/l10n/ru.js on lines 1..16
apps/federation/l10n/ru_RU.js on lines 1..16
apps/federation/l10n/sl.js on lines 1..16
apps/federation/l10n/sq.js on lines 1..16
apps/federation/l10n/sr.js on lines 1..16
apps/federation/l10n/sv.js on lines 1..16
apps/federation/l10n/th_TH.js on lines 1..16
apps/federation/l10n/tr.js on lines 1..16
apps/federation/l10n/ug.js on lines 1..16
apps/federation/l10n/uk.js on lines 1..16
apps/federation/l10n/zh_CN.js on lines 1..16
apps/federation/l10n/zh_TW.js on lines 1..16
apps/files/l10n/ur_PK.js on lines 1..16
apps/files_external/l10n/ia.js on lines 1..16
apps/files_sharing/l10n/ms_MY.js on lines 1..16
core/l10n/es_ES.js on lines 1..16
core/l10n/gu.js on lines 1..16
lib/l10n/my_MM.js on lines 1..16

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

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