<commit_before>package com.cloudkick;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class NodeViewActivity extends Activity {
	private static final String TAG = "Node";
	private Node node;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Bundle data = this.getIntent().getExtras();
		node = (Node) data.getSerializable("node");

		RelativeLayout nodeView;
		String inflater = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li = (LayoutInflater) getSystemService(inflater);

		nodeView = new RelativeLayout(this);
		li.inflate(R.layout.node_view, nodeView, true);

		// Build the tag string
		StringBuilder tagString = new StringBuilder();
		if (node.getTags().length > 0) {
			tagString.append(node.getTags()[0]);
			for (int i = 1; i < node.tags.length; i++) {
				tagString.append(", ");
				tagString.append(node.getTags()[i]);
			}
		}

		// Build the info string
		StringBuilder infoString = new StringBuilder();
		infoString.append("IP Address: " + node.getIpAddress() + "\n");
		infoString.append("Provider:   " + node.getProviderName() + "\n");
		infoString.append("Status:     " + node.getStatus() + "\n");
		infoString.append("Agent:      " + node.getAgentState() + "\n");

		// Set the background
		nodeView.setBackgroundDrawable(new ColorDrawable(node.getColor()));

		// Fill in the views
		TextView nameText = (TextView) nodeView
				.findViewById(R.id.node_detail_name);
		TextView tagsText = (TextView) nodeView
				.findViewById(R.id.node_detail_tags);
		nameText.setText(node.getName());
		tagsText.setText(tagString.toString());
		((TextView) nodeView.findViewById(R.id.value_ip_addr)).setText(node
				.getIpAddress());
		((TextView) nodeView.findViewById(R.id.value_provider)).setText(node
				.getProviderName());
		((TextView) nodeView.findViewById(R.id.value_status)).setText(node
				.getStatus());
		((TextView) nodeView.findViewById(R.id.value_agent)).setText(node
				.getAgentState());

		setContentView(nodeView);
		setTitle("Node: " + node.getName());
	}
}<commit_msg>Minor code cleanup<commit_after>package com.cloudkick;

import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class NodeViewActivity extends Activity {
	private static final String TAG = "Node";
	private Node node;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Bundle data = this.getIntent().getExtras();
		node = (Node) data.getSerializable("node");

		RelativeLayout nodeView;
		String inflater = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li = (LayoutInflater) getSystemService(inflater);

		nodeView = new RelativeLayout(this);
		li.inflate(R.layout.node_view, nodeView, true);

		// Build the tag string
		StringBuilder tagString = new StringBuilder();
		if (node.getTags().length > 0) {
			tagString.append(node.getTags()[0]);
			for (int i = 1; i < node.tags.length; i++) {
				tagString.append(", ");
				tagString.append(node.getTags()[i]);
			}
		}

		// Set the background
		nodeView.setBackgroundDrawable(new ColorDrawable(node.getColor()));

		// Fill in the views
		((TextView) nodeView.findViewById(R.id.node_detail_name)).setText(node
				.getName());
		((TextView) nodeView.findViewById(R.id.node_detail_tags))
				.setText(tagString.toString());
		((TextView) nodeView.findViewById(R.id.value_ip_addr)).setText(node
				.getIpAddress());
		((TextView) nodeView.findViewById(R.id.value_provider)).setText(node
				.getProviderName());
		((TextView) nodeView.findViewById(R.id.value_status)).setText(node
				.getStatus());
		((TextView) nodeView.findViewById(R.id.value_agent)).setText(node
				.getAgentState());

		setContentView(nodeView);
		setTitle("Node: " + node.getName());
	}
}
{'fraction_non_alphanumeric': 0.14022319262493935, 'fraction_numerical': 0.001455604075691412, 'mean_word_length': 4.9238505747126435, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1354185', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1235, 'n_words': 245}