<commit_before>import React, { PropTypes } from 'react'
import Path from 'path'

const RenameDialog = ({siapath, actions}) => {
	const onYesClick = (e) => {
		e.preventDefault()
		actions.renameFile(siapath, Path.join(Path.dirname(siapath), e.target.newsiapath.value))
	}
	const onNoClick = () => actions.hideRenameDialog()
	return (
		<div className="modal">
			<div className="rename-dialog">
				<div className="rename-text">
					Enter a new name for {Path.basename(siapath)}:
				</div>
				<form className="rename-form" onSubmit={onYesClick}>
					<div className="rename-field">
						<input type="text" name="newsiapath" required autoFocus defaultValue={Path.basename(siapath)} />
					</div>
					<div className="rename-buttons">
						<button type="submit">Confirm</button>
						<button type="button" onClick={onNoClick}>Cancel</button>
					</div>
				</form>
			</div>
		</div>
	)
}

RenameDialog.propTypes = {
	siapath: PropTypes.string.isRequired,
}

export default RenameDialog<commit_msg>changed input name on rename form to reflect new value<commit_after>import React, { PropTypes } from 'react'
import Path from 'path'

const RenameDialog = ({siapath, actions}) => {
	const onYesClick = (e) => {
		e.preventDefault()
		actions.renameFile(siapath, Path.join(Path.dirname(siapath), e.target.newname.value))
	}
	const onNoClick = () => actions.hideRenameDialog()
	return (
		<div className="modal">
			<div className="rename-dialog">
				<div className="rename-text">
					Enter a new name for {Path.basename(siapath)}:
				</div>
				<form className="rename-form" onSubmit={onYesClick}>
					<div className="rename-field">
						<input type="text" name="newname" required autoFocus defaultValue={Path.basename(siapath)} />
					</div>
					<div className="rename-buttons">
						<button type="submit">Confirm</button>
						<button type="button" onClick={onNoClick}>Cancel</button>
					</div>
				</form>
			</div>
		</div>
	)
}

RenameDialog.propTypes = {
	siapath: PropTypes.string.isRequired,
}

export default RenameDialog
{'fraction_non_alphanumeric': 0.15467449828683308, 'fraction_numerical': 0.0, 'mean_word_length': 4.161616161616162, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 43, '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': '122727', 'n_tokens_mistral': 771, 'n_tokens_neox': 679, 'n_words': 140}