<commit_before>package com.MOS.fastfood;

import java.util.ArrayList;

public class RestaurantData {

	static ArrayList<String> Data = new ArrayList<String>();
	static ArrayList<String> lng = new ArrayList<String>();
	static ArrayList<String> lat = new ArrayList<String>();
	static ArrayList<String> name = new ArrayList<String>();
	static ArrayList<String> comment = new ArrayList<String>();
	static String savelng;
	static String saveLat;
	static String saveName = "";
	

	public void parse(String word)
	{
		int startPosition = word.indexOf("?name?") + "?name?".length();
		int endPosition = word.indexOf("?/name?", startPosition);
		name.add(word.substring(startPosition, endPosition));
		
		int startPosition2 = word.indexOf("?lng?") + "?lng?".length();
		int endPosition2 = word.indexOf("?/lng?", startPosition2);
		lng.add(word.substring(startPosition2, endPosition2));
		
		int startPosition3 = word.indexOf("?lat?") + "?lat?".length();
		int endPosition3 = word.indexOf("?/lat?", startPosition3);
		lat.add(word.substring(startPosition3, endPosition3));

	}

	//hi?/?15?/?14?/?





}<commit_msg>Update RestaurantData.java<commit_after>package com.MOS.fastfood;

import java.util.ArrayList;

public class RestaurantData {

	//******* Arrays that holds information of restaurants taken from SERVER
	static public ArrayList<String> name = new ArrayList<String>();
	static public ArrayList<String> lng = new ArrayList<String>();
	static public ArrayList<String> lat = new ArrayList<String>();
	static public ArrayList<String> address = new ArrayList<String>();
	static public ArrayList<String> rate = new ArrayList<String>();
	
	//******* in ListActivity for chosing a restaurant to view
	static public int restaurantNumber;
	static public String setName;
	static public String setAddress;
	static public String setRating;
	
	
	//******* in MapActivity for adding a new restaurant
	static public String savelng;
	static public String saveLat;
	static public String saveName = "";
	static public String saveRate;
	static public int numOfRes;
	
	boolean checkIfExist;
	public void parse(String toParse)
	{
		while(!toParse.equals(""))
		{
			checkIfExist = false;
			String resTemp;
			resTemp = toParse.substring(0, toParse.indexOf("#"));
			//System.out.println(resTemp);
			String[] parsed = resTemp.split(",");
			
			for(int i = 0; i<name.size(); i++)
			{
				if(name.get(i).equals(parsed[0])
						&& lng.get(i).equals(parsed[1])
						&& lat.get(i).equals(parsed[2])
						&& address.get(i).equals(parsed[3]))
				{
					checkIfExist = true;
				}
			}
			if(!checkIfExist)
			{
				name.add(parsed[0]);
				address.add(parsed[1]);
				lng.add(parsed[2]);
				lat.add(parsed[3]);
				try{
				rate.add(parsed[4]);
				}
				catch(Exception e)
				{
					rate.add("0");
				}
			}
			/*name.add(parsed[0]);
			lng.add(parsed[1]);
			lat.add(parsed[2]);
			address.add(parsed[3]);
			rate.add(parsed[4]);*/
			int y = toParse.indexOf("#");
			for(int i = 0; i <= y; i++)
			{
				int j = 1;
				toParse = toParse.substring(j);
			}
		}

	}

}
{'fraction_non_alphanumeric': 0.15792922673656618, 'fraction_numerical': 0.010812581913499346, 'mean_word_length': 4.071428571428571, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '5700601', 'n_tokens_mistral': 1132, 'n_tokens_neox': 983, 'n_words': 232}