prowide/prowide-core

View on GitHub
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java

Summary

Maintainability
C
1 day
Test Coverage

Define a constant instead of duplicating this literal "//ATBBBBB" 4 times.
Open

        Field56C f = new Field56C("//ATBBBBB");

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "//ATBBBBB\r ADDRESS1\r ADDRESS2\r ADDRESS3\r ADDRESS4" 8 times.
Open

        Field52D f = new Field52D("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "/ATBBBBB" 11 times.
Open

        assertEquals("/ATBBBBB", f.getComponent2()); // component getter will keep the extra slash

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "ABNANL2A" 5 times.
Open

        assertEquals("ABNANL2A", f.getIdentifierCode());

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "CHBBBBBB" 4 times.
Open

        assertEquals("CHBBBBBB", f.getAccount());

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "ATBBBBB" 14 times.
Open

        assertEquals("ATBBBBB", f.getAccount()); // account getter will trims the starting slash

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

Define a constant instead of duplicating this literal "//ATBBBBB\r ABNANL2A" 9 times.
Open

        Field52A f = new Field52A("//ATBBBBB\r\nABNANL2A");

Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

Noncompliant Code Example

With the default threshold of 3:

public void run() {
  prepare("action1");                              // Noncompliant - "action1" is duplicated 3 times
  execute("action1");
  release("action1");
}

@SuppressWarning("all")                            // Compliant - annotations are excluded
private void method1() { /* ... */ }
@SuppressWarning("all")
private void method2() { /* ... */ }

public String method3(String a) {
  System.out.println("'" + a + "'");               // Compliant - literal "'" has less than 5 characters and is excluded
  return "";                                       // Compliant - literal "" has less than 5 characters and is excluded
}

Compliant Solution

private static final String ACTION_1 = "action1";  // Compliant

public void run() {
  prepare(ACTION_1);                               // Compliant
  execute(ACTION_1);
  release(ACTION_1);
}

Exceptions

To prevent generating some false-positives, literals having less than 5 characters are excluded.

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

    @Test
    public void testField52A_4() {
        Field52A f = new Field52A("/DA/TBBBBB\r\nABNANL2A");
        assertEquals("/DA/TBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 40..49
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 63..72

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

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

    @Test
    public void testField52AParse() {
        Field52A f = new Field52A("//ATBBBBB\r\nABNANL2A");
        assertEquals("//ATBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 63..72
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 85..94

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

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

    @Test
    public void testField52A_2() {
        Field52A f = new Field52A("/ATBBBBB\r\nABNANL2A");
        assertEquals("/ATBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 40..49
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 85..94

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

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

    @Test
    public void testField58A() {
        Field58A f = new Field58A("//ATBBBBB\r\nABNANL2A");
        assertEquals("//ATBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 110..118
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 128..136
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 138..146
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 156..164
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 176..184

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

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

    @Test
    public void testField56A() {
        Field56A f = new Field56A("//ATBBBBB\r\nABNANL2A");
        assertEquals("//ATBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 128..136
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 138..146
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 156..164
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 166..174
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 176..184

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

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

    @Test
    public void testField56D() {
        Field56D f = new Field56D("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 110..118
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 138..146
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 156..164
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 166..174
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 176..184

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

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

    @Test
    public void testField58D() {
        Field58D f = new Field58D("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 110..118
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 128..136
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 138..146
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 156..164
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 166..174

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

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

    @Test
    public void testField57A() {
        Field57A f = new Field57A("//ATBBBBB\r\nABNANL2A");
        assertEquals("//ATBBBBB\r\nABNANL2A", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 110..118
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 128..136
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 156..164
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 166..174
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 176..184

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

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

    @Test
    public void testField57D() {
        Field57D f = new Field57D("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("//ATBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertNull(f.getDCMark());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 110..118
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 128..136
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 138..146
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 166..174
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 176..184

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

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

    @Test
    public void testField59() {
        Field59 f = new Field59("//CHBBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("//CHBBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertEquals("/CHBBBBBB", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 120..126
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 148..154
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 194..200
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 202..208
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 210..216

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

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

    @Test
    public void testField59_2() {
        Field59 f = new Field59("/CHBBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("/CHBBBBBB\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertEquals("CHBBBBBB", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 120..126
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 148..154
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 186..192
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 202..208
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 210..216

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

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

    @Test
    public void testField57C() {
        Field57C f = new Field57C("//ATBBBBB");
        assertEquals("//ATBBBBB", f.getValue());
        assertEquals("/ATBBBBB", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 120..126
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 186..192
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 194..200
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 202..208
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 210..216

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

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

    @Test
    public void testField59A() {
        Field59A f = new Field59A("//CHBBBBBB\r\nABNANL2A");
        assertEquals("//CHBBBBBB\r\nABNANL2A", f.getValue());
        assertEquals("/CHBBBBBB", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 120..126
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 148..154
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 186..192
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 194..200
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 202..208

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

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

    @Test
    public void testField59_3() {
        Field59 f = new Field59("///\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4");
        assertEquals("///\r\nADDRESS1\r\nADDRESS2\r\nADDRESS3\r\nADDRESS4", f.getValue());
        assertEquals("//", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 120..126
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 148..154
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 186..192
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 194..200
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 210..216

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

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

    @Test
    public void testField56C() {
        Field56C f = new Field56C("//ATBBBBB");
        assertEquals("//ATBBBBB", f.getValue());
        assertEquals("/ATBBBBB", f.getComponent1());
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 148..154
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 186..192
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 194..200
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 202..208
src/test/java/com/prowidesoftware/swift/model/field/NationalClearingSystemComponentTest.java on lines 210..216

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

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

There are no issues that match your filters.

Category
Status