<commit_before>import { MaterialIcons } from '@expo/vector-icons';
import React from 'react';
import {
  Alert,
  Button,
  FlatList,
  Linking,
  PixelRatio,
  Platform,
  StyleSheet,
  Text,
  TouchableHighlight,
  TouchableNativeFeedback,
  View,
} from 'react-native';
import SafeAreaView from 'react-native-safe-area-view';

import { getTestModules } from '../TestUtils';

class ListItem extends React.Component {
  onPress = () => {
    this.props.onPressItem(this.props.id);
  };

  renderView = () => {
    const checkBox = this.props.selected ? 'check-box' : 'check-box-outline-blank';
    return (
      <View style={styles.listItem}>
        <MaterialIcons name={checkBox} size={26} />
        <Text style={styles.label}>{this.props.title}</Text>
      </View>
    );
  };

  render() {
    return Platform.select({
      android: (
        <TouchableNativeFeedback onPress={this.onPress}>
          {this.renderView()}
        </TouchableNativeFeedback>
      ),
      default: (
        <TouchableHighlight onPress={this.onPress} underlayColor="lightgray">
          {this.renderView()}
        </TouchableHighlight>
      ),
    });
  }
}

export default class SelectScreen extends React.PureComponent {
  constructor(props) {
    super(props);

    if (global.ErrorUtils) {
      const originalErrorHandler = global.ErrorUtils.getGlobalHandler();

      global.ErrorUtils.setGlobalHandler((error, isFatal) => {
        // Prevent optionalRequire from failing
        if (
          isFatal &&
          (error.message.includes('Native module cannot be null') ||
            error.message.includes(
              `from NativeViewManagerAdapter isn't exported by @unimodules/react-native-adapter. Views of this type may not render correctly. Exported view managers: `
            ))
        ) {
          console.log('Caught require error');
        } else {
          global.expoErrorDelegate.throw(error, isFatal);
          originalErrorHandler(error, isFatal);
        }
      });
    }<commit_msg>[test-suite] Remove broken expoErrorDelegate call<commit_after>import { MaterialIcons } from '@expo/vector-icons';
import React from 'react';
import {
  Alert,
  Button,
  FlatList,
  Linking,
  PixelRatio,
  Platform,
  StyleSheet,
  Text,
  TouchableHighlight,
  TouchableNativeFeedback,
  View,
} from 'react-native';
import SafeAreaView from 'react-native-safe-area-view';

import { getTestModules } from '../TestUtils';

class ListItem extends React.Component {
  onPress = () => {
    this.props.onPressItem(this.props.id);
  };

  renderView = () => {
    const checkBox = this.props.selected ? 'check-box' : 'check-box-outline-blank';
    return (
      <View style={styles.listItem}>
        <MaterialIcons name={checkBox} size={26} />
        <Text style={styles.label}>{this.props.title}</Text>
      </View>
    );
  };

  render() {
    return Platform.select({
      android: (
        <TouchableNativeFeedback onPress={this.onPress}>
          {this.renderView()}
        </TouchableNativeFeedback>
      ),
      default: (
        <TouchableHighlight onPress={this.onPress} underlayColor="lightgray">
          {this.renderView()}
        </TouchableHighlight>
      ),
    });
  }
}

export default class SelectScreen extends React.PureComponent {
  constructor(props) {
    super(props);

    if (global.ErrorUtils) {
      const originalErrorHandler = global.ErrorUtils.getGlobalHandler();

      global.ErrorUtils.setGlobalHandler((error, isFatal) => {
        // Prevent optionalRequire from failing
        if (
          isFatal &&
          (error.message.includes('Native module cannot be null') ||
            error.message.includes(
              `from NativeViewManagerAdapter isn't exported by @unimodules/react-native-adapter. Views of this type may not render correctly. Exported view managers: `
            ))
        ) {
          console.log('Caught require error');
        } else {
          originalErrorHandler(error, isFatal);
        }
      });
    }
{'fraction_non_alphanumeric': 0.12400199600798403, 'fraction_numerical': 0.000998003992015968, 'mean_word_length': 2.671245421245421, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, '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': '5549604', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1147, 'n_words': 238}