nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

        migrations.AlterField(
            model_name='mobiliario',
            name='codigo_establecimiento',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='mobiliario',
            name='codigo_institucion',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='sanitario',
            name='codigo_departamento',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='serviciobasico',
            name='codigo_zona',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='serviciobasico',
            name='codigo_establecimiento',
            field=models.CharField(max_length=200, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

            var x = style.x - Math.cos(angle) * width * (width >= r / 3 ? 1 : 2);
Severity: Minor
Found in static/js/dncp/util/shape/GaugePointer.js and 1 other location - About 30 mins to fix
static/js/dncp/util/shape/GaugePointer.js on lines 50..50

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

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

            var y = style.y + Math.sin(angle) * width * (width >= r / 3 ? 1 : 2);
Severity: Minor
Found in static/js/dncp/util/shape/GaugePointer.js and 1 other location - About 30 mins to fix
static/js/dncp/util/shape/GaugePointer.js on lines 49..49

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

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

        migrations.AlterField(
            model_name='espacio',
            name='codigo_establecimiento',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='mobiliario',
            name='codigo_departamento',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='sanitario',
            name='codigo_distrito',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

                for (var j = 0; j < axisSize; j++) {
                    tmp[j] = source[idx];
                    idx += stride;
                }
Severity: Minor
Found in static/js/dncp/util/ndarray.js and 2 other locations - About 30 mins to fix
static/js/dncp/util/ndarray.js on lines 511..514
static/js/dncp/util/ndarray.js on lines 1191..1194

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

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

        migrations.AlterField(
            model_name='mobiliario',
            name='codigo_zona',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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 not permiso_cambiar and not permiso_verificar:
        return JsonResponse({'error': 'No tiene permisos para realizar esta accion'}, status=403)
Severity: Minor
Found in openfonacide/views.py and 1 other location - About 30 mins to fix
openfonacide/views.py on lines 549..550

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

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

        albers.scale = function (x) {
            if (!arguments.length) {
                return scale;
            }
            scale = +x;
Severity: Minor
Found in static/js/dncp/util/projection/albers.js and 1 other location - About 30 mins to fix
static/js/dncp/util/projection/mercator.js on lines 36..42

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

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

        migrations.AlterField(
            model_name='serviciobasico',
            name='codigo_distrito',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='espacio',
            name='codigo_distrito',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='espacio',
            name='codigo_zona',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='serviciobasico',
            name='codigo_departamento',
            field=models.CharField(max_length=256, null=True, db_index=True),
Severity: Major
Found in openfonacide/migrations/0041_auto_20150507_0500.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0008_auto_20141130_2305.py on lines 236..239
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        migrations.AlterField(
            model_name='institucion',
            name='codigo_establecimiento',
            field=models.CharField(max_length=256, serialize=False, primary_key=True),
Severity: Major
Found in openfonacide/migrations/0008_auto_20141130_2305.py and 22 other locations - About 30 mins to fix
openfonacide/migrations/0041_auto_20150507_0500.py on lines 14..17
openfonacide/migrations/0041_auto_20150507_0500.py on lines 20..23
openfonacide/migrations/0041_auto_20150507_0500.py on lines 26..29
openfonacide/migrations/0041_auto_20150507_0500.py on lines 32..35
openfonacide/migrations/0041_auto_20150507_0500.py on lines 38..41
openfonacide/migrations/0041_auto_20150507_0500.py on lines 110..113
openfonacide/migrations/0041_auto_20150507_0500.py on lines 116..119
openfonacide/migrations/0041_auto_20150507_0500.py on lines 122..125
openfonacide/migrations/0041_auto_20150507_0500.py on lines 128..131
openfonacide/migrations/0041_auto_20150507_0500.py on lines 134..137
openfonacide/migrations/0041_auto_20150507_0500.py on lines 140..143
openfonacide/migrations/0041_auto_20150507_0500.py on lines 146..149
openfonacide/migrations/0041_auto_20150507_0500.py on lines 152..155
openfonacide/migrations/0041_auto_20150507_0500.py on lines 158..161
openfonacide/migrations/0041_auto_20150507_0500.py on lines 164..167
openfonacide/migrations/0041_auto_20150507_0500.py on lines 170..173
openfonacide/migrations/0041_auto_20150507_0500.py on lines 176..179
openfonacide/migrations/0041_auto_20150507_0500.py on lines 182..185
openfonacide/migrations/0041_auto_20150507_0500.py on lines 188..191
openfonacide/migrations/0041_auto_20150507_0500.py on lines 194..197
openfonacide/migrations/0044_auto_20150513_0340.py on lines 24..27
openfonacide/migrations/0056_auto_20150615_0159.py on lines 44..47

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

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

        othersVisible: function() {
          return ($sidebars.not($module).filter('.' + className.visible).length > 0);
        },
Severity: Minor
Found in static/components/sidebar.js and 1 other location - About 30 mins to fix
static/components/sidebar.js on lines 418..420

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

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