<commit_before>package todomore.android.metawidget;

import java.util.Map;

import org.metawidget.android.widget.AndroidMetawidget;
import org.metawidget.widgetbuilder.iface.WidgetBuilder;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

public class TodoMoreAndroidWidgetBuilder implements WidgetBuilder<View, AndroidMetawidget> {

	private static final String TAG = "TAWB";

	public TodoMoreAndroidWidgetBuilder() {
		Log.d(TAG, "TodoAndroidWidgetBuilder()");
		// empty
	}
	
	@Override
	public View buildWidget(String elementName, 
			Map<String, String> attributes, 
			AndroidMetawidget metaWidget) {
		// Log.d(TAG, String.format("buildWidget(%s, %s, %s)", elementName, attributes, metaWidget));
		Context context = metaWidget.getContext();
		String type = attributes.get("type");
		String readOnlyStr = attributes.get("read-only");
		boolean readOnly = Boolean.parseBoolean(readOnlyStr);
		if (elementName.equals("entity") && type.equals("com.darwinsys.todo.model.Date")) {<commit_msg>Remove duplicate labels from Date fields.<commit_after>package todomore.android.metawidget;

import java.util.Map;

import org.metawidget.android.widget.AndroidMetawidget;
import org.metawidget.widgetbuilder.iface.WidgetBuilder;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.darwinsys.todo.model.Date;

public class TodoMoreAndroidWidgetBuilder implements WidgetBuilder<View, AndroidMetawidget> {

	private static final String TAG = "TAWB";

	public TodoMoreAndroidWidgetBuilder() {
		Log.d(TAG, "TodoAndroidWidgetBuilder()");
		// empty
	}
	
	@Override
	public View buildWidget(String elementName, 
			Map<String, String> attributes, 
			AndroidMetawidget metaWidget) {
		// Log.d(TAG, String.format("buildWidget(%s, %s, %s)", elementName, attributes, metaWidget));
		Context context = metaWidget.getContext();
		String type = attributes.get("type");
		String readOnlyStr = attributes.get("read-only");
		boolean readOnly = Boolean.parseBoolean(readOnlyStr);
		if (type.equals(Date.class.getName())) {
{'fraction_non_alphanumeric': 0.11820652173913043, 'fraction_numerical': 0.0, 'mean_word_length': 5.881619937694704, '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': '2014888', 'n_tokens_mistral': 689, 'n_tokens_neox': 658, 'n_words': 140}