<commit_before>package org.apache.jmeter.gui.util;

import java.awt.Component;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseEvent;
import java.util.EventObject;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;

/**
 * @author mstover
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 */
public class TextAreaTableCellEditor implements TableCellEditor,FocusListener {
	JScrollPane pane;
	JTextArea editor;
	String value = "";
	LinkedList listeners = new LinkedList();
	int row,col;
	
	public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
    {
    	editor = new JTextArea(value.toString());
    	editor.addFocusListener(this);
    	editor.setEnabled(true);
    	editor.setRows(editor.getRows());
    	editor.revalidate();
    	pane = new JScrollPane(editor,JScrollPane.VERTICAL_SCROLLBAR_NEVER,
    			JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    	pane.validate();
    	this.row = row;
    	this.col = col;
    	return pane;
    }
    
    public int getColumn()
    {
    	return col;
    }
    
    public int getRow()
    {
    	return row;
    }
    
    public void focusLost(FocusEvent fe)
    {<commit_msg>The column parameter in getTableCellEditorComponent was being ignored.  (Code set this.col to itself, rather than to the column parameter.)  I don't know what effect this bug actually has, but this fix is obviously the intended behavior.<commit_after>package org.apache.jmeter.gui.util;

import java.awt.Component;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseEvent;
import java.util.EventObject;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;

/**
 * @author mstover
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 */
public class TextAreaTableCellEditor implements TableCellEditor,FocusListener {
	JScrollPane pane;
	JTextArea editor;
	String value = "";
	LinkedList listeners = new LinkedList();
	int row,col;
	
	public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
    {
    	editor = new JTextArea(value.toString());
    	editor.addFocusListener(this);
    	editor.setEnabled(true);
    	editor.setRows(editor.getRows());
    	editor.revalidate();
    	pane = new JScrollPane(editor,JScrollPane.VERTICAL_SCROLLBAR_NEVER,
    			JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    	pane.validate();
    	this.row = row;
    	this.col = column;
    	return pane;
    }
    
    public int getColumn()
    {
    	return col;
    }
    
    public int getRow()
    {
    	return row;
    }
    
    public void focusLost(FocusEvent fe)
    {
{'fraction_non_alphanumeric': 0.08585445625511039, 'fraction_numerical': 0.0, 'mean_word_length': 2.563106796116505, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7320632', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1023, 'n_words': 243}