<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import { c } from 'ttag';
import { Input, Label, PasswordInput } from 'react-components';

const LoginForm = ({ username, setUsername, password, setPassword }) => {
    return (
        <>
            <Label htmlFor="login" className="bl sr-only">
                {c('Label').t`Username`}
            </Label>
            <Input
                type="text"
                name="login"
                className="w100 mb1"
                autoFocus
                autoCapitalize="off"
                autoCorrect="off"
                id="login"
                required
                value={username}
                placeholder={c('Placeholder').t`Username or email`}
                onChange={({ target: { value } }) => setUsername(value)}
                data-cy-login="username"
            />
            <Label htmlFor="password" className="bl sr-only">
                {c('Label').t`Password`}
            </Label>
            <PasswordInput
                name="password"
                className="w100 mb1"
                autoComplete="current-password"
                id="password"
                required
                value={password}
                placeholder={c('Placeholder').t`Password`}
                onChange={({ target: { value } }) => setPassword(value)}
                data-cy-login="password"
            />
        </>
    );
};

LoginForm.propTypes = {
    username: PropTypes.string,
    password: PropTypes.string,
    setUsername: PropTypes.func,
    setPassword: PropTypes.func
};

export default LoginForm;<commit_msg>Review login form for error<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import { c } from 'ttag';
import { Input, Label, PasswordInput } from 'react-components';

const LoginForm = ({ username, setUsername, password, setPassword }) => {
    return (
        <>
            <Label htmlFor="login" className="bl sr-only">
                {c('Label').t`Username`}
            </Label>
            <div className="mb1">
                <Input
                    type="text"
                    name="login"
                    autoFocus
                    autoCapitalize="off"
                    autoCorrect="off"
                    id="login"
                    required
                    value={username}
                    placeholder={c('Placeholder').t`Username or email`}
                    onChange={({ target: { value } }) => setUsername(value)}
                    data-cy-login="username"
                />
            </div>
            <Label htmlFor="password" className="bl sr-only">
                {c('Label').t`Password`}
            </Label>
            <div className="mb1">
                <PasswordInput
                    name="password"
                    autoComplete="current-password"
                    id="password"
                    required
                    value={password}
                    placeholder={c('Placeholder').t`Password`}
                    onChange={({ target: { value } }) => setPassword(value)}
                    data-cy-login="password"
                />
            </div>
        </>
    );
};

LoginForm.propTypes = {
    username: PropTypes.string,
    password: PropTypes.string,
    setUsername: PropTypes.func,
    setPassword: PropTypes.func
};

export default LoginForm;
{'fraction_non_alphanumeric': 0.12222222222222222, 'fraction_numerical': 0.0029239766081871343, 'mean_word_length': 1.4558506819813353, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 29, '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': '7242829', 'n_tokens_mistral': 867, 'n_tokens_neox': 817, 'n_words': 169}