<commit_before>package jp.tkji.yapcasiaviewer;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

import org.json.JSONException;
import org.json.JSONObject;

import android.text.TextUtils;

public class Talk implements Serializable {

	private static final long serialVersionUID = 1L;

	public String id;
	public String title;
	public String titleEn;
	//XXX abstract
	public String description;
	public String category;
	public int duration;
	public Calendar startOn;
	public int venueId;
	public Speaker speaker;
	
	public Talk(JSONObject json) throws JSONException {
		id = json.getString("id");
		title = !json.isNull("title") ? json.getString("title") : null;
		titleEn = !json.isNull("title_en") ? json.getString("title_en") : null;
		description = !json.isNull("abstract") ? json.getString("abstract") : null;
		category = !json.isNull("category") ? json.getString("category") : null;
		duration = json.getInt("duration");
		
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:MM:SS");
		
		try {
			startOn = Calendar.getInstance();
			startOn.setTime(sdf.parse(json.getString("start_on")));
		} catch (ParseException e) {
			e.printStackTrace();
		}
		
		venueId = json.getInt("venue_id");
		speaker = new Speaker(json.getJSONObject("speaker"));
	}
	
	public String getTitle() {
		if (!TextUtils.isEmpty(title) && Locale.JAPAN.equals(Locale.getDefault())) {
			return title;
		} else if (!TextUtils.isEmpty(titleEn)) {
			return titleEn;
		} else if (!TextUtils.isEmpty(title)) {
			return title;
		} else {
			return "";
		}<commit_msg>開始日時のフォーマットを間違えていた<commit_after>package jp.tkji.yapcasiaviewer;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

import org.json.JSONException;
import org.json.JSONObject;

import android.text.TextUtils;

public class Talk implements Serializable {

	private static final long serialVersionUID = 1L;

	public String id;
	public String title;
	public String titleEn;
	//XXX abstract
	public String description;
	public String category;
	public int duration;
	public Calendar startOn;
	public int venueId;
	public Speaker speaker;
	
	public Talk(JSONObject json) throws JSONException {
		id = json.getString("id");
		title = !json.isNull("title") ? json.getString("title") : null;
		titleEn = !json.isNull("title_en") ? json.getString("title_en") : null;
		description = !json.isNull("abstract") ? json.getString("abstract") : null;
		category = !json.isNull("category") ? json.getString("category") : null;
		duration = json.getInt("duration");
		
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		
		try {
			startOn = Calendar.getInstance();
			startOn.setTime(sdf.parse(json.getString("start_on")));
		} catch (ParseException e) {
			e.printStackTrace();
		}
		
		venueId = json.getInt("venue_id");
		speaker = new Speaker(json.getJSONObject("speaker"));
	}
	
	public String getTitle() {
		if (!TextUtils.isEmpty(title) && Locale.JAPAN.equals(Locale.getDefault())) {
			return title;
		} else if (!TextUtils.isEmpty(titleEn)) {
			return titleEn;
		} else if (!TextUtils.isEmpty(title)) {
			return title;
		} else {
			return "";
		}
{'fraction_non_alphanumeric': 0.1321266968325792, 'fraction_numerical': 0.0006033182503770739, 'mean_word_length': 4.707401032702237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5547143', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1036, 'n_words': 242}