<commit_before>import java.awt.Component;
import java.awt.image.BufferedImage;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;

@SuppressWarnings("unused")
public class PairingListCellRenderer implements ListCellRenderer<Pairing> {
	
	@Override
	public Component getListCellRendererComponent(JList<? extends Pairing> list, Pairing value, int index, boolean isSelected, boolean cellHasFocus) {
		
		String latex = "?";
		
		if (value != null) {
			
			String type = value.getVariableExpression().getType().toString();
			
			if (value.isPaired()) {
				//make a copy of the expression so that any selections can be removed,
				//otherwise the selected subexpression will show as highlighted in the pairings list.
				Expression copy = value.getPairedExpression().duplicate();
				copy.deselectRecursive();
				latex = type + " " + value.getVariableExpression().toLatex() + " \\leftarrow " + copy.toLatex();
				//latex = value.getVariableExpression().toLatex() + " \\leftarrow " + value.getPairedExpression().toLatex();
			}
			else {
				latex = type + " " + value.getVariableExpression().toLatex() + " \\textrm{ is unpaired}";
			}
			
			if (isSelected) {
	            latex = "\\bgcolor{" + LookAndFeel.SELECTED_LATEX_COLOR + "}{" + latex + "}";
			}
		}
		
		return new JLabel(new ImageIcon(LatexHandler.latexToImage(latex)));
	}
}<commit_msg>Improve output for Pairing lists<commit_after>import java.awt.Component;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;

public class PairingListCellRenderer implements ListCellRenderer<Pairing> {
	
	@Override
	public Component getListCellRendererComponent(JList<? extends Pairing> list, Pairing value, int index, boolean isSelected, boolean cellHasFocus) {
		
		String latex = "?";
		
		if (value != null) {
			
			String type = value.getVariableExpression().getType().toString();
			
			if (value.isPaired()) {
				//make a copy of the expression so that any selections can be removed,
				//otherwise the selected subexpression will show as highlighted in the pairings list.
				Expression copy = value.getPairedExpression().duplicate();
				copy.deselectRecursive();
				latex = String.format("\\textrm{%s } %s \\leftarrow %s",
						type,
						value.getVariableExpression().toLatex(),
						copy.toLatex());
			}
			else {
				latex = String.format("\\textrm{%s } %s \\textrm{ is unpaired}",
						type,
						value.getVariableExpression().toLatex());
			}
			
			if (isSelected)
	            latex = String.format("\\bgcolor{%s}{%s}",
	            		LookAndFeel.SELECTED_LATEX_COLOR,
	            		latex);
		}
		
		return new JLabel(new ImageIcon(LatexHandler.latexToImage(latex)));
	}
}
{'fraction_non_alphanumeric': 0.12513445679455001, 'fraction_numerical': 0.0, 'mean_word_length': 3.6655518394648827, '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': '6064025', 'n_tokens_mistral': 990, 'n_tokens_neox': 815, 'n_words': 198}