<commit_before>package net.authorize.sample;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import net.authorize.sample.ApplePayTransactions.CreateAnApplePayTransaction;

import net.authorize.sample.VisaCheckout.*;
import net.authorize.sample.PaymentTransactions.*;
import net.authorize.sample.PaypalExpressCheckout.*;
import net.authorize.sample.PaypalExpressCheckout.Void;
import net.authorize.sample.RecurringBilling.*;
import net.authorize.sample.TransactionReporting.*;
import net.authorize.sample.CustomerProfiles.*;
import net.authorize.sample.ApplePayTransactions.*;
/**
 * Created by anetdeveloper on 8/5/15.
 */
public class SampleCode {

    public static void main( String[] args )
    {

        if (args.length == 0)
        {
            SelectMethod();
        }
        else if (args.length == 1)
        {
            RunMethod(args[0]);
            return;
        }
        else
        {
            ShowUsage();
        }

        System.out.println("");
        System.out.print("Press <Return> to finish ...");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            int i = Integer.parseInt(br.readLine());
        }catch(Exception ex){
        }

    }

    private static void ShowUsage()
    {
        System.out.println("Usage : java -jar SampleCode.jar [CodeSampleName]");
        System.out.println("");
        System.out.println("Run with no parameter to select a method.  Otherwise pass a method name.");
        System.out.println("");
        System.out.println("Code Sample Names: ");
        ShowMethods();


    }

    private static void SelectMethod()
    {
        System.out.println("Code Sample Names: ");
        System.out.println("");
        ShowMethods();
        System.out.println("");
        System.out.print("Type a sample name & then press <Return> : ");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            RunMethod(br.readLine());
        }catch(Exception ex){
            System.out.print("Error no such method");
        }
    }

    private static void ShowMethods()
    {
        System.out.println("    DecryptVisaCheckoutData");
        System.out.println("    CreateVisaCheckoutTransaction");
        System.out.println("    ChargeCreditCard");
        System.out.println("    AuthorizeCreditCard");
        System.out.println("    RefundTransaction");
        System.out.println("    VoidTransaction");
        System.out.println("    CreateCustomerProfileFromTransaction");
        System.out.println("    CaptureOnly");
        System.out.println("    CapturePreviouslyAuthorizedAmount");
        System.out.println("    DebitBankAccount");
        System.out.println("    CreditBankAccount");
        System.out.println("    ChargeTokenizedCreditCard");
        System.out.println("    CreateAnApplePayTransaction");
        System.out.println("    ChargeCustomerProfile");
        System.out.println("    CreateSubscription");
        System.out.println("    GetSubscription");
        System.out.println("    GetSubscriptionStatus");
        System.out.println("    CancelSubscription");
        System.out.println("    UpdateSubscription");
        System.out.println("    GetListOfSubscriptions");
        System.out.println("    GetBatchStatistics");
        System.out.println("    GetSettledBatchList");
        System.out.println("    GetTransactionList");
        System.out.println("    GetUnsettledTransactionList");
        System.out.println("    GetTransactionDetails");
        System.out.println("    CreateCustomerProfile");
        System.out.println("    CreateCustomerPaymentProfile");
        System.out.println("    CreateCustomerShippingAddress");
        System.out.println("    DeleteCustomerPaymentProfile");
        System.out.println("    DeleteCustomerProfile");
        System.out.println("    DeleteCustomerShippingAddress");
        System.out.println("    GetCustomerPaymentProfile");
        System.out.println("    GetCustomerPaymentProfileList");
        System.out.println("    GetCustomerProfile");
        System.out.println("    GetCustomerProfileIds");
        System.out.println("    GetCustomerShippingAddress");
        System.out.println("    GetHostedProfilePage");
        System.out.println("    UpdateCustomerPaymentProfile");
        System.out.println("    UpdateCustomerShippingAddress");
        System.out.println("    PayPalAuthorizeCapture");
        System.out.println("    PayPalVoid");
        System.out.println("    PayPalAuthorizationOnly");
        System.out.println("    PayPalAuthorizeCaptureContinue");
        System.out.println("    PayPalGetDetails");
        System.out.println("    PayPalPriorAuthorizationCapture");	
        System.out.println("    PayPalAuthorizeOnlyContinue");
        System.out.println("    PayPalCredit");
        System.out.println("    UpdateSplitTenderGroup");
    }

    private static void RunMethod(String methodName)
    {
        // These are default transaction keys.
        // You can create your own keys in seconds by signing up for a sandbox account here: https://developer.authorize.net/sandbox/
        String apiLoginId           = "5KP3u95bQpv";
        String transactionKey       = "<KEY>";
        //Update the payedId with which you want to run the sample code
        String payerId 				= "";
        //Update the transactionId with which you want to run the sample code
        String transactionId 		= "";

        switch (methodName) {
            case "VisaCheckoutDecrypt":
                DecryptVisaCheckoutData.run(apiLoginId, transactionKey);
                break;
            case "VisaCheckoutTransaction":
                CreateVisaCheckoutTransaction.run(apiLoginId, transactionKey);
                break;<commit_msg>Modified the SampleCode.java for running Visa Checkout sample codes<commit_after>package net.authorize.sample;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import net.authorize.sample.ApplePayTransactions.CreateAnApplePayTransaction;

import net.authorize.sample.VisaCheckout.*;
import net.authorize.sample.PaymentTransactions.*;
import net.authorize.sample.PaypalExpressCheckout.*;
import net.authorize.sample.PaypalExpressCheckout.Void;
import net.authorize.sample.RecurringBilling.*;
import net.authorize.sample.TransactionReporting.*;
import net.authorize.sample.CustomerProfiles.*;
import net.authorize.sample.ApplePayTransactions.*;
/**
 * Created by anetdeveloper on 8/5/15.
 */
public class SampleCode {

    public static void main( String[] args )
    {

        if (args.length == 0)
        {
            SelectMethod();
        }
        else if (args.length == 1)
        {
            RunMethod(args[0]);
            return;
        }
        else
        {
            ShowUsage();
        }

        System.out.println("");
        System.out.print("Press <Return> to finish ...");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            int i = Integer.parseInt(br.readLine());
        }catch(Exception ex){
        }

    }

    private static void ShowUsage()
    {
        System.out.println("Usage : java -jar SampleCode.jar [CodeSampleName]");
        System.out.println("");
        System.out.println("Run with no parameter to select a method.  Otherwise pass a method name.");
        System.out.println("");
        System.out.println("Code Sample Names: ");
        ShowMethods();


    }

    private static void SelectMethod()
    {
        System.out.println("Code Sample Names: ");
        System.out.println("");
        ShowMethods();
        System.out.println("");
        System.out.print("Type a sample name & then press <Return> : ");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            RunMethod(br.readLine());
        }catch(Exception ex){
            System.out.print("Error no such method");
        }
    }

    private static void ShowMethods()
    {
        System.out.println("    DecryptVisaCheckoutData");
        System.out.println("    CreateVisaCheckoutTransaction");
        System.out.println("    ChargeCreditCard");
        System.out.println("    AuthorizeCreditCard");
        System.out.println("    RefundTransaction");
        System.out.println("    VoidTransaction");
        System.out.println("    CreateCustomerProfileFromTransaction");
        System.out.println("    CaptureOnly");
        System.out.println("    CapturePreviouslyAuthorizedAmount");
        System.out.println("    DebitBankAccount");
        System.out.println("    CreditBankAccount");
        System.out.println("    ChargeTokenizedCreditCard");
        System.out.println("    CreateAnApplePayTransaction");
        System.out.println("    ChargeCustomerProfile");
        System.out.println("    CreateSubscription");
        System.out.println("    GetSubscription");
        System.out.println("    GetSubscriptionStatus");
        System.out.println("    CancelSubscription");
        System.out.println("    UpdateSubscription");
        System.out.println("    GetListOfSubscriptions");
        System.out.println("    GetBatchStatistics");
        System.out.println("    GetSettledBatchList");
        System.out.println("    GetTransactionList");
        System.out.println("    GetUnsettledTransactionList");
        System.out.println("    GetTransactionDetails");
        System.out.println("    CreateCustomerProfile");
        System.out.println("    CreateCustomerPaymentProfile");
        System.out.println("    CreateCustomerShippingAddress");
        System.out.println("    DeleteCustomerPaymentProfile");
        System.out.println("    DeleteCustomerProfile");
        System.out.println("    DeleteCustomerShippingAddress");
        System.out.println("    GetCustomerPaymentProfile");
        System.out.println("    GetCustomerPaymentProfileList");
        System.out.println("    GetCustomerProfile");
        System.out.println("    GetCustomerProfileIds");
        System.out.println("    GetCustomerShippingAddress");
        System.out.println("    GetHostedProfilePage");
        System.out.println("    UpdateCustomerPaymentProfile");
        System.out.println("    UpdateCustomerShippingAddress");
        System.out.println("    PayPalAuthorizeCapture");
        System.out.println("    PayPalVoid");
        System.out.println("    PayPalAuthorizationOnly");
        System.out.println("    PayPalAuthorizeCaptureContinue");
        System.out.println("    PayPalGetDetails");
        System.out.println("    PayPalPriorAuthorizationCapture");	
        System.out.println("    PayPalAuthorizeOnlyContinue");
        System.out.println("    PayPalCredit");
        System.out.println("    UpdateSplitTenderGroup");
    }

    private static void RunMethod(String methodName)
    {
        // These are default transaction keys.
        // You can create your own keys in seconds by signing up for a sandbox account here: https://developer.authorize.net/sandbox/
        String apiLoginId           = "5KP3u95bQpv";
        String transactionKey       = "<KEY>";
        //Update the payedId with which you want to run the sample code
        String payerId 				= "";
        //Update the transactionId with which you want to run the sample code
        String transactionId 		= "";

        switch (methodName) {
            case "DecryptVisaCheckoutData":
                DecryptVisaCheckoutData.run(apiLoginId, transactionKey);
                break;
            case "CreateVisaCheckoutTransaction":
                CreateVisaCheckoutTransaction.run(apiLoginId, transactionKey);
                break;
{'fraction_non_alphanumeric': 0.11290869049635778, 'fraction_numerical': 0.0018634592580044046, 'mean_word_length': 2.571385359951603, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820545', 'n_tokens_mistral': 3076, 'n_tokens_neox': 3016, 'n_words': 605}