<commit_before>import Expo from 'expo';
import React from 'react';
import { AsyncStorage, StyleSheet, View } from 'react-native';
import { FontAwesome } from '@expo/vector-icons';
import { Root } from 'native-base';

import Navigator from './navigation/RootNavigation';
import cacheAssetsAsync from './utilities/cacheAssetsAsync';
import themes from './constants/Themes';

const HISTORY_KEY = 'request_history';
const NIGHT_MODE_KEY = 'night_mode';

class AppContainer extends React.Component {
  state = {
    appIsReady: false,
    requestHistory: [],
    theme: themes.lightTheme,
    requestBodyType: 'form-data',
    requestParametersData: [],
    requestHeadersData: [],
    bodyFormData: [],
    bodyUrlEncodedData: [],
    bodyRawData: [],
  };

  componentWillMount() {
    this._loadAssetsAsync();
    AsyncStorage.multiGet([HISTORY_KEY, NIGHT_MODE_KEY]).then((data) => {
      if (data != null) {
        this.setState({ requestHistory: JSON.parse(data[0][1]) });
      }
      // AsyncStorage stores data as strings, we are using this expression to convert data back to a boolean
      const isNightModeToggled = data[1][1] != null ? (data[1][1] == 'true') : false;
      this.setState({ nightModeToggled: isNightModeToggled });
      this._toggleNightMode(isNightModeToggled);
    }).then(this.setState({ appIsReady: true }));
  }

  async _loadAssetsAsync() {
    try {
      await cacheAssetsAsync({
        images: [require('./assets/images/expo-wordmark.png')],
        fonts: [
          FontAwesome.font,
          {
            'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
            'Roboto_medium': require('./assets/fonts/Roboto-Medium.ttf'),
          },
        ],
      });
    } catch (e) {<commit_msg>Fixed raw data type<commit_after>import Expo from 'expo';
import React from 'react';
import { AsyncStorage, StyleSheet, View } from 'react-native';
import { FontAwesome } from '@expo/vector-icons';
import { Root } from 'native-base';

import Navigator from './navigation/RootNavigation';
import cacheAssetsAsync from './utilities/cacheAssetsAsync';
import themes from './constants/Themes';

const HISTORY_KEY = 'request_history';
const NIGHT_MODE_KEY = 'night_mode';

class AppContainer extends React.Component {
  state = {
    appIsReady: false,
    requestHistory: [],
    theme: themes.lightTheme,
    requestBodyType: 'form-data',
    requestParametersData: [],
    requestHeadersData: [],
    bodyFormData: [],
    bodyUrlEncodedData: [],
    bodyRawData: "",
  };

  componentWillMount() {
    this._loadAssetsAsync();
    AsyncStorage.multiGet([HISTORY_KEY, NIGHT_MODE_KEY]).then((data) => {
      if (data != null) {
        this.setState({ requestHistory: JSON.parse(data[0][1]) });
      }
      // AsyncStorage stores data as strings, we are using this expression to convert data back to a boolean
      const isNightModeToggled = data[1][1] != null ? (data[1][1] == 'true') : false;
      this.setState({ nightModeToggled: isNightModeToggled });
      this._toggleNightMode(isNightModeToggled);
    }).then(this.setState({ appIsReady: true }));
  }

  async _loadAssetsAsync() {
    try {
      await cacheAssetsAsync({
        images: [require('./assets/images/expo-wordmark.png')],
        fonts: [
          FontAwesome.font,
          {
            'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
            'Roboto_medium': require('./assets/fonts/Roboto-Medium.ttf'),
          },
        ],
      });
    } catch (e) {
{'fraction_non_alphanumeric': 0.14220445459737294, 'fraction_numerical': 0.0034266133637921186, 'mean_word_length': 3.28239608801956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5113395', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1063, 'n_words': 229}