<commit_before>import React, { useContext } from 'react';
import Button from '@material-ui/core/Button';
import { FormattedMessage } from 'react-intl';
import { ApiContext } from 'AppComponents/Apis/Details/ApiContext';
import { Box } from '@material-ui/core';
import { useHistory } from 'react-router-dom';

const styles = {
    button: {
        mt: 2,
        mr: 1,
    },
    wizardButtons: {
        pl: 2,
    },
};

const ButtonPanel = (props) => {
    const { currentStep, handleCurrentStep, handleReset } = props;
    const stepsLength = 5;
    const { api } = useContext(ApiContext);
    const history = useHistory();

    /**
     * Redirect  to the API console page
     */
    const handleTest = () => {
        history.push(`/apis/${api.id}/test`);
    };

    /**
     * Redirect back to credentials page
     */
    const handleCancel = () => {
        history.push(`/apis/${api.id}/credentials`);
    };

    return (<commit_msg>handle wizard cancel<commit_after>import React, { useContext } from 'react';
import Button from '@material-ui/core/Button';
import { FormattedMessage } from 'react-intl';
import { ApiContext } from 'AppComponents/Apis/Details/ApiContext';
import { Box } from '@material-ui/core';
import { useHistory } from 'react-router-dom';

const styles = {
    button: {
        mt: 2,
        mr: 1,
    },
    wizardButtons: {
        pl: 2,
    },
};

const ButtonPanel = (props) => {
    const { currentStep, handleCurrentStep, handleReset } = props;
    const stepsLength = 5;
    const { api, updateSubscriptionData } = useContext(ApiContext);
    const history = useHistory();

    /**
     * Redirect  to the API console page
     */
    const handleTest = () => {
        history.push(`/apis/${api.id}/test`);
    };

    /**
     * Redirect back to credentials page
     */
    const handleCancel = () => {
        updateSubscriptionData(history.push('credentials'));
    };

    return (
{'fraction_non_alphanumeric': 0.14485256078634248, 'fraction_numerical': 0.004138644593895499, 'mean_word_length': 2.6490566037735848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '4270418', 'n_tokens_mistral': 589, 'n_tokens_neox': 582, 'n_words': 143}