AuthorizeNet/sdk-java

View on GitHub

Showing 231 of 231 total issues

ObjectFactory has 244 methods (exceeds 20 allowed). Consider refactoring.
Open

@XmlRegistry
public class ObjectFactory {

    private final static QName _ErrorResponse_QNAME = new QName("AnetApi/xml/v1/schema/AnetApiSchema.xsd", "ErrorResponse");
Severity: Major
Found in src/main/java/net/authorize/api/contract/v1/ObjectFactory.java - About 4 days to fix

    TransactionDetailsType has 104 methods (exceeds 20 allowed). Consider refactoring.
    Open

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "transactionDetailsType", propOrder = {
        "transId",
        "refTransId",
        "splitTenderId",

      File ObjectFactory.java has 744 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      //
      // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
      // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
      // Any modifications to this file will be lost upon recompilation of the source schema. 
      // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 
      Severity: Major
      Found in src/main/java/net/authorize/api/contract/v1/ObjectFactory.java - About 1 day to fix

        TransactionRequestType has 72 methods (exceeds 20 allowed). Consider refactoring.
        Open

        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "transactionRequestType", propOrder = {
            "transactionType",
            "amount",
            "currencyCode",

          File TransactionDetailsType.java has 483 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          //
          // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
          // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
          // Any modifications to this file will be lost upon recompilation of the source schema. 
          // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 

            File TransactionResponse.java has 479 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            //
            // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
            // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
            // Any modifications to this file will be lost upon recompilation of the source schema. 
            // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 
            Severity: Minor
            Found in src/main/java/net/authorize/api/contract/v1/TransactionResponse.java - About 7 hrs to fix

              LineItemType has 52 methods (exceeds 20 allowed). Consider refactoring.
              Open

              @XmlAccessorType(XmlAccessType.FIELD)
              @XmlType(name = "lineItemType", propOrder = {
                  "itemId",
                  "name",
                  "description",
              Severity: Major
              Found in src/main/java/net/authorize/api/contract/v1/LineItemType.java - About 7 hrs to fix

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

                //
                // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
                // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
                // Any modifications to this file will be lost upon recompilation of the source schema. 
                // Generated on: 2014.09.02 at 04:19:10 PM PDT 
                src/main/java/net/authorize/api/contract/v1/EnumCollection.java on lines 1..332

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

                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

                //
                // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
                // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
                // Any modifications to this file will be lost upon recompilation of the source schema. 
                // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 
                src/main/java/net/authorize/api/contract/v1/XXDoNotUseDummyRequest.java on lines 1..332

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

                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

                TransactionResponse has 50 methods (exceeds 20 allowed). Consider refactoring.
                Open

                @XmlAccessorType(XmlAccessType.FIELD)
                @XmlType(name = "transactionResponse", propOrder = {
                    "responseCode",
                    "rawResponseCode",
                    "authCode",
                Severity: Minor
                Found in src/main/java/net/authorize/api/contract/v1/TransactionResponse.java - About 7 hrs to fix

                  BatchStatisticType has 42 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  @XmlAccessorType(XmlAccessType.FIELD)
                  @XmlType(name = "batchStatisticType", propOrder = {
                      "accountType",
                      "chargeAmount",
                      "chargeCount",
                  Severity: Minor
                  Found in src/main/java/net/authorize/api/contract/v1/BatchStatisticType.java - About 5 hrs to fix

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

                    //
                    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
                    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
                    // Any modifications to this file will be lost upon recompilation of the source schema. 
                    // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 
                    src/main/java/net/authorize/api/contract/v1/ARBSubscriptionType.java on lines 1..331

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

                    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

                    //
                    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
                    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
                    // Any modifications to this file will be lost upon recompilation of the source schema. 
                    // Generated on: 2021.01.27 at 04:18:12 PM GMT+05:30 
                    src/main/java/net/authorize/api/contract/v1/PaymentDetails.java on lines 1..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 293.

                    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

                    OrderType has 36 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    @XmlAccessorType(XmlAccessType.FIELD)
                    @XmlType(name = "orderType", propOrder = {
                        "invoiceNumber",
                        "description",
                        "discountAmount",
                    Severity: Minor
                    Found in src/main/java/net/authorize/api/contract/v1/OrderType.java - About 4 hrs to fix

                      TransactionSummaryType has 34 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      @XmlAccessorType(XmlAccessType.FIELD)
                      @XmlType(name = "transactionSummaryType", propOrder = {
                          "transId",
                          "submitTimeUTC",
                          "submitTimeLocal",

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

                        @XmlAccessorType(XmlAccessType.FIELD)
                        @XmlType(name = "merchantAuthenticationType", propOrder = {
                            "name",
                            "transactionKey",
                            "sessionToken",
                        src/main/java/net/authorize/api/contract/v1/TransactionResponse.java on lines 1618..1858

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

                        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

                                @XmlAccessorType(XmlAccessType.FIELD)
                                @XmlType(name = "", propOrder = {
                                    "transId",
                                    "responseCode",
                                    "responseToCustomer",
                        src/main/java/net/authorize/api/contract/v1/MerchantAuthenticationType.java on lines 69..309

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

                        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

                        Method create has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                        Open

                            @SuppressWarnings("unchecked")
                            public static synchronized <T extends Serializable> T create(String xml, Class<T> classType) throws JAXBException, ParserConfigurationException, SAXException
                            {
                                T entity = null;
                                
                        Severity: Minor
                        Found in src/main/java/net/authorize/util/XmlUtility.java - About 4 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Method call has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                        Open

                            @SuppressWarnings("unchecked")
                            /**
                             * Makes a http call, using the proxy if requested, and returns apiresponse
                             * with error code set appropriately
                             * @return ANetApiResponse  successful or failed response 
                        Severity: Minor
                        Found in src/main/java/net/authorize/util/HttpCallTask.java - About 4 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        SubscriptionDetail has 32 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        @XmlAccessorType(XmlAccessType.FIELD)
                        @XmlType(name = "SubscriptionDetail", propOrder = {
                            "id",
                            "name",
                            "status",
                        Severity: Minor
                        Found in src/main/java/net/authorize/api/contract/v1/SubscriptionDetail.java - About 4 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language