<commit_before>package in.th.llun.tent.model;

import in.th.llun.tent.remote.Tent;

import java.text.ParseException;
import java.util.Date;

import org.json.JSONObject;

import android.util.Log;

public class Topic extends JSONRemoteObject {

	public Topic(JSONObject raw) {
	  super(raw);
  }
	
	public String getId() {
		return mRaw.optString("id");
	}
	
	public String getTitle() {
		return mRaw.optString("title");
	}
	
	public String getExcerpt() {
		return mRaw.optString("excerpt");
	}
	
	public People getLastUpdater() {
		return new People(mRaw.optJSONObject("last_updater"));
	}
	
	public String getTopicId() {
		return getTopicable().optString("id");
	}
	
	public String getType() {
		return getTopicable().optString("type");
	}
	
	public String getUrl() {
		return getTopicable().optString("url");
	}
	
	public Date getUpdatedAt() {
		try {
			return Formatter.dateFromStringWithTimezone(mRaw.optString("updated_at"));
		} catch (ParseException e) {
			Log.e(Tent.LOG_TAG, "Can't parse date format", e);
			return null;
		}
	}

	public Date getCreatedAt() {
		try {
			return Formatter.dateFromStringWithTimezone(mRaw.optString("created_at"));
		} catch (ParseException e) {
			Log.e(Tent.LOG_TAG, "Can't parse date format", e);
			return null;
		}
	}
	
	public int getNumberOfAttachment() {
		return mRaw.optInt("attachments");
	}
	
	private JSONObject getTopicable() {
		return mRaw.optJSONObject("topicable");
	}

}<commit_msg>Format topic code.<commit_after>package in.th.llun.tent.model;

import in.th.llun.tent.remote.Tent;

import java.text.ParseException;
import java.util.Date;

import org.json.JSONObject;

import android.util.Log;

public class Topic extends JSONRemoteObject {

	public Topic(JSONObject raw) {
		super(raw);
	}

	public String getId() {
		return mRaw.optString("id");
	}

	public String getTitle() {
		return mRaw.optString("title");
	}

	public String getExcerpt() {
		return mRaw.optString("excerpt");
	}

	public People getLastUpdater() {
		return new People(mRaw.optJSONObject("last_updater"));
	}

	public String getTopicId() {
		return getTopicable().optString("id");
	}

	public String getType() {
		return getTopicable().optString("type");
	}

	public String getUrl() {
		return getTopicable().optString("url");
	}

	public Date getUpdatedAt() {
		try {
			return Formatter.dateFromStringWithTimezone(mRaw.optString("updated_at"));
		} catch (ParseException e) {
			Log.e(Tent.LOG_TAG, "Can't parse date format", e);
			return null;
		}
	}

	public Date getCreatedAt() {
		try {
			return Formatter.dateFromStringWithTimezone(mRaw.optString("created_at"));
		} catch (ParseException e) {
			Log.e(Tent.LOG_TAG, "Can't parse date format", e);
			return null;
		}
	}

	public int getNumberOfAttachment() {
		return mRaw.optInt("attachments");
	}

	private JSONObject getTopicable() {
		return mRaw.optJSONObject("topicable");
	}

}
{'fraction_non_alphanumeric': 0.13451511991657977, 'fraction_numerical': 0.0, 'mean_word_length': 4.369402985074627, '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': '3936170', 'n_tokens_mistral': 1077, 'n_tokens_neox': 979, 'n_words': 204}