AuthorizeNet/sdk-java

View on GitHub

Showing 36 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

                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

                    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",

                        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

                          File TransactionRequestType.java has 315 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 

                            ApiOperationBase has 26 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                            public abstract class ApiOperationBase<Q extends ANetApiRequest, S extends ANetApiResponse> implements IApiOperation<Q, S> {
                            
                                protected static Logger logger = LogManager.getLogger(ApiOperationBase.class);
                            
                                private static Environment environment = null;
                            Severity: Minor
                            Found in src/main/java/net/authorize/api/controller/base/ApiOperationBase.java - About 3 hrs to fix

                              GetMerchantDetailsResponse has 24 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              @XmlAccessorType(XmlAccessType.FIELD)
                              @XmlType(name = "", propOrder = {
                                  "isTestMode",
                                  "processors",
                                  "merchantName",

                                SubMerchantType has 22 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                @XmlAccessorType(XmlAccessType.FIELD)
                                @XmlType(name = "subMerchantType", propOrder = {
                                    "identifier",
                                    "doingBusinessAs",
                                    "paymentServiceProviderName",
                                Severity: Minor
                                Found in src/main/java/net/authorize/api/contract/v1/SubMerchantType.java - About 2 hrs to fix

                                  ProfileTransOrderType has 22 methods (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  @XmlAccessorType(XmlAccessType.FIELD)
                                  @XmlType(name = "profileTransOrderType", propOrder = {
                                      "customerProfileId",
                                      "customerPaymentProfileId",
                                      "customerShippingAddressId",

                                    Method call has 57 lines of code (exceeds 25 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: Major
                                    Found in src/main/java/net/authorize/util/HttpCallTask.java - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language