<commit_before>package com.bbcnewsreader.resource.web;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.util.Log;

public class HtmlParser {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws ClientProtocolException 
	 */
	public static void getPage(URI uri) throws ClientProtocolException, IOException {
		// TODO Auto-generated method stub
		HttpClient client = new DefaultHttpClient();
		//HttpGet request = new HttpGet(uri.toString());
		HttpGet request = new HttpGet(uri.toString());
		HttpResponse response = client.execute(request);

		String html = "";
		InputStream in = response.getEntity().getContent();
		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
		StringBuilder str = new StringBuilder();
		String line = null;
		while((line = reader.readLine()) != null)
		{
		    str.append(line);
		}
		in.close();
		html = str.toString();
		String parsed;
		Pattern p=Pattern.compile("<div class=\"storybody\">.</div>");
		Matcher m = p.matcher(html);
		parsed=m.toMatchResult().group(0);
		Log.v("TEST",parsed);
	}

}<commit_msg>A few changes<commit_after>package com.bbcnewsreader.resource.web;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.util.Log;

public class HtmlParser {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws ClientProtocolException 
	 */
	public static void getPage(URI uri) throws ClientProtocolException, IOException {
		// TODO Auto-generated method stub
		HttpClient client = new DefaultHttpClient();
		//HttpGet request = new HttpGet(uri.toString());
		HttpGet request = new HttpGet(uri.toString());
		HttpResponse response = client.execute(request);

		String html = "";
		InputStream in = response.getEntity().getContent();
		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
		StringBuilder str = new StringBuilder();
		String line = null;
		while((line = reader.readLine()) != null)
		{
		    str.append(line);
		}
		in.close();
		html = str.toString();
		String parsed;
		Pattern p=Pattern.compile("<div class=\"storybody\">.*?</div>");
		Matcher m = p.matcher(html);
		parsed=m.toMatchResult().group(0);
		Log.v("TEST",html);
		Log.v("TEST",parsed);
	}

}
{'fraction_non_alphanumeric': 0.13263935527199464, 'fraction_numerical': 0.000671591672263264, 'mean_word_length': 4.7398843930635834, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5101624', 'n_tokens_mistral': 944, 'n_tokens_neox': 887, 'n_words': 199}