yahoo/pngjs-image

View on GitHub

Showing 256 of 322 total issues

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

    describe('3x3', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('37x37', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('38x38', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('34x34', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('40x40', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669

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

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

    describe('4x4', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('9x9', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('33x33', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('36x36', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('6x6', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('1x1', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('8x8', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('39x39', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 671..708

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

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

    describe('32x32', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('7x7', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('35x35', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('2x2', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 164..201
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

    describe('5x5', function () {

        describe('Interlaced', function () {

            testGen.addDecodeTests({
Severity: Major
Found in test/png/decode/sizes.js and 17 other locations - About 6 hrs to fix
test/png/decode/sizes.js on lines 8..45
test/png/decode/sizes.js on lines 47..84
test/png/decode/sizes.js on lines 86..123
test/png/decode/sizes.js on lines 125..162
test/png/decode/sizes.js on lines 203..240
test/png/decode/sizes.js on lines 242..279
test/png/decode/sizes.js on lines 281..318
test/png/decode/sizes.js on lines 320..357
test/png/decode/sizes.js on lines 359..396
test/png/decode/sizes.js on lines 398..435
test/png/decode/sizes.js on lines 437..474
test/png/decode/sizes.js on lines 476..513
test/png/decode/sizes.js on lines 515..552
test/png/decode/sizes.js on lines 554..591
test/png/decode/sizes.js on lines 593..630
test/png/decode/sizes.js on lines 632..669
test/png/decode/sizes.js on lines 671..708

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

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

Scaler.prototype.decodeValue = function (value) {

    var bitDepth = this.getHeaderChunk().getBitDepth(),
        result = null;

Severity: Major
Found in lib/png/processor/scaler.js and 1 other location - About 6 hrs to fix
lib/png/processor/scaler.js on lines 268..299

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

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

Scaler.prototype.encodeValue = function (value) {

    var bitDepth = this.getHeaderChunk().getBitDepth(),
        result = null;

Severity: Major
Found in lib/png/processor/scaler.js and 1 other location - About 6 hrs to fix
lib/png/processor/scaler.js on lines 228..259

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

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