<commit_before>import React from 'react'
import { View, Text, TextInput ,Image} from 'react-native';

function textbox(locals) {

  var stylesheet = locals.stylesheet;
  var formGroupStyle = stylesheet.formGroup.normal;
  var controlLabelStyle = stylesheet.controlLabel.normal;
  var controlIconStyle = stylesheet.controlIcon.normal;
  var textboxStyle = stylesheet.textbox.normal;
  var helpBlockStyle = stylesheet.helpBlock.normal;
  var errorBlockStyle = stylesheet.errorBlock;

  if (locals.hasError) {
    formGroupStyle = stylesheet.formGroup.error;
    controlLabelStyle = stylesheet.controlLabel.error;
    textboxStyle = stylesheet.textbox.error;
    helpBlockStyle = stylesheet.helpBlock.error;
  }

  if (locals.editable === false) {
    textboxStyle = stylesheet.textbox.notEditable;
  }

  var label = locals.label ? <Text style={controlLabelStyle}>{locals.label}</Text> : null;
  var help = locals.help ? <Text style={helpBlockStyle}>{locals.help}</Text> : null;
  var error = locals.hasError && locals.error ? <Text style={errorBlockStyle}>{locals.error}</Text> : null;
  var icon = locals.icon ? <Image style={controlIconStyle} source={require(locals.icon)}></Image> : null;
  var test = locals.test;

  return (
    <View style={formGroupStyle}>
      <View style={{flexDirection: 'row', flex: 1, alignItems: 'center', justifyContent: 'center'}}>
        {label}
        <TextInput
          ref="input"
          autoCapitalize={locals.autoCapitalize}
          autoCorrect={locals.autoCorrect}
          autoFocus={locals.autoFocus}
          bufferDelay={locals.bufferDelay}
          clearButtonMode={locals.clearButtonMode}
          editable={locals.editable}
          enablesReturnKeyAutomatically={locals.enablesReturnKeyAutomatically}
          keyboardType={locals.keyboardType}
          multiline={locals.multiline}
          onBlur={locals.onBlur}
          onEndEditing={locals.onEndEditing}
          onFocus={locals.onFocus}
          onSubmitEditing={locals.onSubmitEditing}
          password={<PASSWORD>}
          placeholderTextColor={locals.placeholderTextColor}
          returnKeyType={locals.returnKeyType}
          selectTextOnFocus={locals.selectTextOnFocus}
          secureTextEntry={locals.secureTextEntry}
          selectionState={locals.selectionState}
          onChangeText={(value) => locals.onChange(value)}
          placeholder={locals.placeholder}
          maxLength={locals.maxLength}
          numberOfLines={locals.numberOfLines}
          textAlign={locals.textAlign}
          textAlignVertical={locals.textAlignVertical}
          underlineColorAndroid={locals.underlineColorAndroid}
          style={textboxStyle}
          DefaultValue={locals.value} />
      </View>
      {help}
      {error}
    </View>
  );
}

module.exports = textbox;
<commit_msg>[fix] default vaule<commit_after>import React from 'react'
import { View, Text, TextInput ,Image} from 'react-native';

function textbox(locals) {

  var stylesheet = locals.stylesheet;
  var formGroupStyle = stylesheet.formGroup.normal;
  var controlLabelStyle = stylesheet.controlLabel.normal;
  var controlIconStyle = stylesheet.controlIcon.normal;
  var textboxStyle = stylesheet.textbox.normal;
  var helpBlockStyle = stylesheet.helpBlock.normal;
  var errorBlockStyle = stylesheet.errorBlock;

  if (locals.hasError) {
    formGroupStyle = stylesheet.formGroup.error;
    controlLabelStyle = stylesheet.controlLabel.error;
    textboxStyle = stylesheet.textbox.error;
    helpBlockStyle = stylesheet.helpBlock.error;
  }

  if (locals.editable === false) {
    textboxStyle = stylesheet.textbox.notEditable;
  }

  var label = locals.label ? <Text style={controlLabelStyle}>{locals.label}</Text> : null;
  var help = locals.help ? <Text style={helpBlockStyle}>{locals.help}</Text> : null;
  var error = locals.hasError && locals.error ? <Text style={errorBlockStyle}>{locals.error}</Text> : null;
  var icon = locals.icon ? <Image style={controlIconStyle} source={require(locals.icon)}></Image> : null;
  var test = locals.test;

  return (
    <View style={formGroupStyle}>
      <View style={{flexDirection: 'row', flex: 1, alignItems: 'center', justifyContent: 'center'}}>
        {label}
        <TextInput
          ref="input"
          autoCapitalize={locals.autoCapitalize}
          autoCorrect={locals.autoCorrect}
          autoFocus={locals.autoFocus}
          bufferDelay={locals.bufferDelay}
          clearButtonMode={locals.clearButtonMode}
          editable={locals.editable}
          enablesReturnKeyAutomatically={locals.enablesReturnKeyAutomatically}
          keyboardType={locals.keyboardType}
          multiline={locals.multiline}
          onBlur={locals.onBlur}
          onEndEditing={locals.onEndEditing}
          onFocus={locals.onFocus}
          onSubmitEditing={locals.onSubmitEditing}
          password={<PASSWORD>}
          placeholderTextColor={locals.placeholderTextColor}
          returnKeyType={locals.returnKeyType}
          selectTextOnFocus={locals.selectTextOnFocus}
          secureTextEntry={locals.secureTextEntry}
          selectionState={locals.selectionState}
          onChangeText={(value) => locals.onChange(value)}
          placeholder={locals.placeholder}
          maxLength={locals.maxLength}
          numberOfLines={locals.numberOfLines}
          textAlign={locals.textAlign}
          textAlignVertical={locals.textAlignVertical}
          underlineColorAndroid={locals.underlineColorAndroid}
          style={textboxStyle}
          defaultValue={locals.value} />
      </View>
      {help}
      {error}
    </View>
  );
}

module.exports = textbox;

{'fraction_non_alphanumeric': 0.11260623229461757, 'fraction_numerical': 0.0003541076487252125, 'mean_word_length': 3.423649177760376, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, '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': '1989350', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1638, 'n_words': 258}