prowide/prowide-core

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

Summary

Maintainability
F
1 wk
Test Coverage

File NarrativeResolverTest.java has 751 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright 2006-2023 Prowide
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.

    NarrativeResolverTest has 76 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class NarrativeResolverTest {
    
        @Test
        public void testWrongField() {
            Narrative n = NarrativeResolver.parse(new Field15O());

      Method testFormat2_13 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Test
          public void testFormat2_13() {
              String v = "/BNF/RETN\n"
                      + "//THE TRANSACTION IS REJECTED DUE T\n"
                      + "//O INTERNAL POLICY\n"

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

                assertEquals("UNKNOWN BENEFICIARY", n.getStructured("BE02").getNarrative());

        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 "CABLE" 3 times.
        Open

                assertEquals("USD", n.getStructured("CABLE").getCurrency());

        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 "//UNKNOWN BENEFICIARY " 3 times.
        Open

                String v = "/RETN/59\n" + "//UNKNOWN BENEFICIARY\n" + "/MREF/0511030094000014";

        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 "/RETN/ " 4 times.
        Open

                String v = "/RETN/\n" + "/BE02/UNKNOWN BENEFICIARY\n" + "/MREF/0511030094000014";

        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 "/MREF/0511030094000014" 6 times.
        Open

                String v = "/RETN/59\n" + "/BE02/UNKNOWN BENEFICIARY\n" + "/MREF/0511030094000014";

        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 "BENEFRES" 4 times.
        Open

                assertEquals("IT", n.getStructured("BENEFRES").getCountry());

        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 "Foo bar" 4 times.
        Open

                String v = "Foo bar";

        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 "TELECHAR" 7 times.
        Open

                assertEquals("USD", n.getStructured("TELECHAR").getCurrency());

        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 "0511030094000014" 7 times.
        Open

                assertEquals("0511030094000014", n.getStructured("MREF").getNarrative());

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

            @Test
            public void testFormat3_3() {
                String v = "/COMM/EUR300,\n" + "/CABLE/USD20,3";
                Narrative n = NarrativeResolver.parse(new Field71D(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 453..465

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

        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

            @Test
            public void testFormat3_4() {
                String v = "/TELECHAR/USD21,\n" + "/COMM/USD14,";
                Narrative n = NarrativeResolver.parse(new Field71B(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 436..448

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

        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

            @Test
            public void testFormat3Score_1() {
                String v = "/ACGH/O/EUR1,00Fees";
                Narrative n = NarrativeResolver.parse(new Field71B(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 529..539

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

        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

            @Test
            public void testFormat3Score_2() {
                String v = "/ACGH/B/EUR1,00Fees";
                Narrative n = NarrativeResolver.parse(new Field71B(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 514..524

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

        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

            @Test
            public void testFormat2_5() {
                String v = "/RETN/59\n" + "//UNKNOWN BENEFICIARY\n" + "/MREF/0511030094000014";
                Narrative n = NarrativeResolver.parse(new Field72(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 302..310

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 81.

        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

            @Test
            public void testFormat2_9() {
                String v = "/RETN/\n" + "//UNKNOWN BENEFICIARY\n" + "/MREF/0511030094000014";
                Narrative n = NarrativeResolver.parse(new Field72(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 206..214

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

        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

            @Test
            public void testFormat8_3() {
                String v = "/NAME/Jones/Brian/DEPT/IRS Back Office\n" + " - more DEPT description";
                Narrative n = NarrativeResolver.parse(new Field29A(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 955..963

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 77.

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

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

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

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

        Refactorings

        Further Reading

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

            @Test
            public void testFormat7_5() {
                String v = "/VALD/20040509\n" + "/SETC/USD";
                Narrative n = NarrativeResolver.parse(new Field77D(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 999..1009

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 77.

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

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

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

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

        Refactorings

        Further Reading

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

            @Test
            public void testFormat5_7() {
                String v = "/1/FIRST QUERY RESPONSE/SUPPLEMENT";
                Narrative n = NarrativeResolver.parse(new Field76(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 668..676
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 989..997

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

            @Test
            public void testFormat8_2() {
                String v = "/NAME/Jones/DEPT/IRS Back Office";
                Narrative n = NarrativeResolver.parse(new Field29A(v));
                assertEquals(2, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 668..676
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 827..835

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

            @Test
            public void testFormat4_4() {
                String v = "/12NEFRES/IT//Test narrative";
                Narrative n = NarrativeResolver.parse(new Field77B(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 827..835
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 989..997

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 73.

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

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

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

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

        Refactorings

        Further Reading

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

            @Test
            public void testFormat7_2() {
                String v = "/CNC/FRA. 2213 CUENTA 18 SEPTIEMBRE\n" + "// MANT\n" + "//NIMIENTO EQUIPOS E INSTALACIONES";
                Narrative n = NarrativeResolver.parse(new Field70(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 315..325

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 67.

        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

            @Test
            public void testFormat2_10() {
                String v = "/12BNF34/1000057346REDEMPTION MERRILL L\n" + "//YNCH FUNDSFFC 123455600000078 //BAN\n"
                        + "//COFOO / FOO";
                Narrative n = NarrativeResolver.parse(new Field72(v));
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 927..936

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

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

            @Test
            public void testFormat5_6() {
                String v = "/1/FIRST QUERY RESPONSE\n//SECOND LINE";
                Narrative n = NarrativeResolver.parse(new Field76(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 126..133
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 138..145
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 918..925
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 946..953

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

            @Test
            public void testFormat1_9() {
                String v = "/AAA/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 126..133
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 815..822
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 918..925
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 946..953

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

            @Test
            public void testFormat1_8() {
                String v = "/AAA/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 138..145
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 815..822
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 918..925
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 946..953

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

            @Test
            public void testFormat7_4() {
                String v = "/MASTER/EMAD";
                Narrative n = NarrativeResolver.parse(new Field77D(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 126..133
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 138..145
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 815..822
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 918..925

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

            @Test
            public void testFormat7_1() {
                String v = "/RFB/C767405OCP021001";
                Narrative n = NarrativeResolver.parse(new Field70(v));
                assertEquals(1, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 126..133
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 138..145
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 815..822
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 946..953

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

            @Test
            public void testFormat2_1() {
                String v = "WE NOTED FCR SHOWING YOURSELVES\n" + "AS CONSIGNEE PLEASE DISCHARGE\n" + "US SOONEST";
                Narrative n = NarrativeResolver.parse(new Field72Z(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 414..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 57.

        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

            @Test
            public void testFormat3_1() {
                String v = "YOUR CHARGES GBP 95,\n" + "CABLE GBP10,\n" + "INTEREST GBP18,";
                Narrative n = NarrativeResolver.parse(new Field73A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 157..163

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

        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

            @Test
            public void testFormat1_1() {
                // empty value
                Narrative n = NarrativeResolver.parse(new Field77A());
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 26..33

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

        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

            @Test
            public void testWrongField() {
                Narrative n = NarrativeResolver.parse(new Field15O());
                assertEquals(0, n.getStructured().size());
                assertNull(n.getUnstructured("\n"));
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 45..53

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

        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

            @Test
            public void testFormat8_5() {
                String v = "/unstruct/NAME/Jones/DEPT/IRS Back Office\n" + " - more DEPT description/description2/GENDER/Male";
                Narrative n = NarrativeResolver.parse(new Field29A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 793..799

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

        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

            @Test
            public void testFormat5_4() {
                String v = "WE HAVE RECEIVED THE FOLLOWING\n" + "MESSAGE FROM BNF BANK FBACUAUX";
                Narrative n = NarrativeResolver.parse(new Field75(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 1024..1030

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

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

            @Test
            public void testFormat1_4() {
                String v = "/111/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat1_5() {
                String v = "/aaa/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat1_7() {
                String v = "/AA$AA/Long codeword";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat2_2() {
                String v = "/aaa/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat7_3() {
                String v = "RESERVATION OF HOTEL";
                Narrative n = NarrativeResolver.parse(new Field70(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431

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

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

            @Test
            public void testFormat3_2() {
                String v = "COMMISSION EUR200,";
                Narrative n = NarrativeResolver.parse(new Field73A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat1_3() {
                String v = "/WE NOTED FCR SHOWING YOURSELVES";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 104..110
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat1_6() {
                String v = "/AAAAAAAAA/Long codeword";
                Narrative n = NarrativeResolver.parse(new Field77A(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 71..77
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 82..88
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 93..99
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 115..121
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 168..174
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 425..431
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 938..944

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

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

            @Test
            public void testFormat4_1() {
                String v = "61A";
                Narrative n = NarrativeResolver.parse(new Field77B(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 644..650
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 767..773
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 804..810

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

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

            @Test
            public void testFormat4_2() {
                String v = "Foo bar";
                Narrative n = NarrativeResolver.parse(new Field77B(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 633..639
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 767..773
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 804..810

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

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

            @Test
            public void testFormat5_5() {
                String v = "//";
                Narrative n = NarrativeResolver.parse(new Field75(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 633..639
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 644..650
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 767..773

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

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

            @Test
            public void testFormat5_2() {
                String v = "/A/";
                Narrative n = NarrativeResolver.parse(new Field75(v));
                assertEquals(0, n.getStructured().size());
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 633..639
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 644..650
        src/test/java/com/prowidesoftware/swift/model/field/NarrativeResolverTest.java on lines 804..810

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

        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