<commit_before>package com.thesis.expression;

import com.thesis.LocalVariable;

import java.io.IOException;
import java.io.Writer;

public class PrimaryExpression extends Expression {

	private String mType;
	private Object mValue;

	public PrimaryExpression(Object value) {
		super();
		mValue = value;
		mType = value.getClass().getSimpleName();
	}

	public PrimaryExpression(Object value, String type) {
		super();
		mValue = value;
		mType = type;
	}

	public PrimaryExpression(LocalVariable value, String type) {
		super();
		mValue = value;
		value.setType(type);
		mType = type;
	}

	@Override
	public void write(Writer writer) throws IOException {
		String output = mValue.toString();
		if (mValue instanceof LocalVariable) {
			output = ((LocalVariable)mValue).getName();<commit_msg>string handling<commit_after>package com.thesis.expression;

import com.thesis.LocalVariable;

import java.io.IOException;
import java.io.Writer;

public class PrimaryExpression extends Expression {

	private static final String QUOTE = "\"";

	private Object mValue;

	public PrimaryExpression(Object value) {
		mValue = value;
	}

	public PrimaryExpression(Object value, String type) {
		mValue = value;
		mType = type;
	}

	public PrimaryExpression(String value, String type) {
		mValue = QUOTE + value + QUOTE;
		mType = type;
	}

	public PrimaryExpression(LocalVariable value, String type) {
		super();
		mValue = value;
		value.setType(type);
		mType = type;
	}

	@Override
	public void write(Writer writer) throws IOException {
		String output = mValue.toString();
		if (mValue instanceof LocalVariable) {
			output = ((LocalVariable)mValue).getName();
{'fraction_non_alphanumeric': 0.10290556900726393, 'fraction_numerical': 0.0, 'mean_word_length': 4.603389830508474, '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': '6979959', 'n_tokens_mistral': 531, 'n_tokens_neox': 486, 'n_words': 137}