@Test
	public void testSearchWholeProgramNoNull() throws Exception {

		dialog = getDialog();
		Container container = dialog.getComponent();

		// turn off null Terminate box
		JCheckBox cb = (JCheckBox) findButton(container, "Require Null Termination");
		cb.setSelected(false);

		StringTableProvider provider = performSearch();
		StringTableModel model = (StringTableModel) getInstanceField("stringModel", provider);
		GhidraTable table = (GhidraTable) getInstanceField("table", provider);
		waitForTableModel(model);
		setAutoLabelCheckbox(provider, true);

		// test the results size and the first entry and the last unicode and last string entry
		// they are in the list in a different order than they are in the dialog the
		// dialog shows them in address order the array list has all the regular
		// strings first and then all the unicode - each set in address order first entry
		assertEquals("00401286", getModelValue(model, 0, addressColumnIndex).toString());
		// last entry
		assertEquals("00405e02",
			getModelValue(model, model.getRowCount() - 1, addressColumnIndex).toString());

		// check the table entries in some of the rows to make sure they are
		// populated correctly
		assertEquals("00401286", getModelValue(model, 0, addressColumnIndex).toString());
		assertEquals(null, getModelValue(model, 0, labelColumnIndex));

		CodeUnitTableCellData data =
			(CodeUnitTableCellData) getModelValue(model, 0, previewColumnIndex);
		assertEquals("?? 59h    Y", data.getDisplayString());

		assertEquals("\"YYh P@\"", getModelValue(model, 0, asciiColumnIndex));
		assertEquals("string", getModelValue(model, 0, stringTypeColumnIndex));

		String debug_initial_word_value_at_401286 =
			(String) getModelValue(model, 0, isWordColumnIndex);

		assertEquals("004014b8", getModelValue(model, 1, addressColumnIndex).toString());
		assertEquals(null, getModelValue(model, 1, labelColumnIndex));

		data = (CodeUnitTableCellData) getModelValue(model, 1, previewColumnIndex);
		assertEquals("?? 3Fh    ?", data.getDisplayString());
		assertEquals("\"?=t\\\"U\"", getModelValue(model, 1, asciiColumnIndex));

		int row = findRow(model, addr(0x404f41));
		assertEquals("00404f41", getModelValue(model, row, addressColumnIndex).toString());
		assertEquals(null, getModelValue(model, row, labelColumnIndex));
		assertEquals("unicode", getModelValue(model, row, stringTypeColumnIndex));

		data = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);
		assertEquals("?? 0Ah", data.getDisplayString());
		assertEquals("u\"\\n\\rString10\\n\\r\"", getModelValue(model, row, asciiColumnIndex));

		row = findRow(model, addr(0x405423));
		assertEquals("00405423", getModelValue(model, row, addressColumnIndex).toString());
		assertEquals(null, getModelValue(model, row, labelColumnIndex));
		assertEquals("unicode32", getModelValue(model, row, stringTypeColumnIndex));

		data = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);
		assertEquals("?? 0Ah", data.getDisplayString());
		assertEquals("U\"\\n\\rString9\\n\\r\"", getModelValue(model, row, asciiColumnIndex));

		String stringData = (String) getModelValue(model, row, isWordColumnIndex);
		assertEquals("true", stringData);

		//*******************************************
		// ********* TEST MAKE STRING ***************
		//*******************************************
		selectRow(table, 0);

		DockingAction makeStringAction =
			(DockingAction) getInstanceField("makeStringAction", provider);

		performAction(makeStringAction, model);

		// test that the string was actually made correctly
		Data d = listing.getDataAt(addr(0x401286));
		DataType dt = d.getBaseDataType();
		assertTrue(dt instanceof StringDataType);
		assertEquals("YYh P@", d.getValue());

		// test that the string len is correct to get the end of chars
		assertEquals(7, d.getLength());

		// test that the label was made
		Symbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x401286));
		assertEquals("s_YYh_P@", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("s_YYh_P@", getModelValue(model, 0, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, 0, previewColumnIndex);
		assertEquals("ds \"YYh P@\"", data.getDisplayString());

		stringData = (String) getModelValue(model, 0, isWordColumnIndex);

		// TODO this is debug for issue that is timing or real bug
		if ("true".equals(stringData)) {
			// the test is about to fail--diagnose
			System.out.println("Word value at 0x401286 is not true, but expected false.\nThe " +
				"initial value at the start of the test was " + debug_initial_word_value_at_401286);

		}

		// TODO debug
		System.out.println("\n\nWord value at 0x401286 is expected false.\n\tThe " +
			"initial value at the start of the test was " + debug_initial_word_value_at_401286 +
			"\n\tThe current value is: " + stringData);
		FoundStringWithWordStatus foundString =
			(FoundStringWithWordStatus) getModelRowObject(model, 0);

		System.out.println("Last-loaded model path: " + NGramUtils.getLastLoadedTrigramModelPath());

		StringAndScores candidateString = new StringAndScores(
			foundString.getString(program.getMemory()), NGramUtils.isLowerCaseModel());
		NGramUtils.scoreString(candidateString);
		boolean isWord = candidateString.isScoreAboveThreshold();
		double score = candidateString.getNgramScore();
		double threshold = candidateString.getScoreThreshold();
		System.out.println(
			"\tisWord? " + isWord + "\n\tscore: " + score + "\n\tthreshold: " + threshold + "\n\n");

		System.out.println("found string in model: " + foundString + "\n" + "StringAndScores: " +
			candidateString + "\n\n");

		assertEquals("false", stringData);

		// check that the selected row in the table moves to the next row
		int[] selectedRows = table.getSelectedRows();
		assertEquals(1, selectedRows.length);
		assertEquals(1, selectedRows[0]);

		//***********************************************************
		// ********* TEST MAKE ASCII ********************************
		//***********************************************************

		// select the second row
		selectRow(table, 1);

		DockingAction makeAsciiAction =
			(DockingAction) getInstanceField("makeCharArrayAction", provider);

		performAction(makeAsciiAction, model);

		// test that the ascii array was actually made correctly
		d = listing.getDataAt(addr(0x4014b8));
		dt = d.getBaseDataType();
		assertEquals("char[5]", dt.getName());

		// test to make sure that 5 ascii chars were created
		assertEquals(5, d.getLength());

		// test that the label was made
		sym = program.getSymbolTable().getPrimarySymbol(addr(0x4014b8));
		assertEquals("s_?=t\"U", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("s_?=t\"U", getModelValue(model, 1, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, 1, previewColumnIndex);
		assertEquals("char[5] \"?=t\\\"U\"", data.getDisplayString());

		stringData = (String) getModelValue(model, 1, isWordColumnIndex);
		assertEquals("false", stringData);

		// check that the selected row in the table moves to the next row
		selectedRows = table.getSelectedRows();
		assertEquals(1, selectedRows.length);
		assertEquals(2, selectedRows[0]);

		//*************************************************************
		// ********* TEST MAKE unicode STRING      ********************
		//*************************************************************

		row = findRow(model, addr(0x404f41));
		selectRow(table, row);

		performAction(makeStringAction, model);

		// test that the string was actually made correctly
		d = listing.getDataAt(addr(0x404f41));
		assertEquals(26, d.getLength());

		assertEquals("\n\rString10\n\r", d.getValue());

		dt = d.getBaseDataType();
		assertEquals("unicode", dt.getName());

		// test that the label was made correctly
		sym = program.getSymbolTable().getPrimarySymbol(addr(0x404f41));
		assertEquals("u_String10", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("u_String10", getModelValue(model, row, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);
		assertEquals("unicode u\"\\n\\rString10\\n\\r\"", data.getDisplayString());

		stringData = (String) getModelValue(model, row, isWordColumnIndex);
		assertEquals("true", stringData);

		//*************************************************************
		// ********* TEST MAKE UNICODE32 STRING      ********************
		//*************************************************************

		row = findRow(model, addr(0x405423));
		selectRow(table, row);

		performAction(makeStringAction, model);

		// test that the string was actually made correctly
		d = listing.getDataAt(addr(0x405423));
		assertEquals(48, d.getLength());

		assertEquals("\n\rString9\n\r", d.getValue());

		dt = d.getBaseDataType();
		assertEquals("unicode32", dt.getName());

		// test that the label was made correctly
		sym = program.getSymbolTable().getPrimarySymbol(addr(0x405423));
		assertEquals("u_String9", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("u_String9", getModelValue(model, row, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);
		assertEquals("unicode32 U\"\\n\\rString9\\n\\r\"", data.getDisplayString());

		stringData = (String) getModelValue(model, row, isWordColumnIndex);
		assertEquals("true", stringData);
	}
*****************************************************
		//***********TEST SELECTING ROW IN TABLE*******************
		// ********* test that selecting a row does the following:
		//**********************************************************
		selectRow(table, 0);

		// test that the row is really selected
		int[] ts = table.getSelectedRows();
		assertEquals(1, ts.length);
		assertEquals(0, ts[0]);

		// is the make string button enabled (should be)
		JButton makeStringButton = (JButton) findButton(provider.getComponent(), "Make String");
		assertTrue(makeStringButton.isEnabled());

		// is the make ascii button enabled
		JButton makeAsciiButton = (JButton) findButton(provider.getComponent(), "Make Char Array");
		assertTrue(makeAsciiButton.isEnabled());

		DockingAction makeStringAction =
			(DockingAction) getInstanceField("makeStringAction", provider);

		toggleDefinedStateButtons(provider, true, true, false, false);
		waitForTableModel(model);
		int selectedRow = table.getSelectedRow();

		performAction(makeStringAction, model);

		// test that the string was actually made correctly
		Data d = listing.getDataAt(addr(0x404f10));
		DataType dt = d.getBaseDataType();
		assertTrue(dt instanceof PascalUnicodeDataType);

		// test that the string len is correct to get the end of chars
		assertEquals(22, d.getLength());

		// test that the label was made
		Symbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x404f10));
		assertEquals("pu_String9", sym.getName());

		AddressBasedLocation location =
			(AddressBasedLocation) getModelValue(model, selectedRow, addressColumnIndex);
		Address address = location.getAddress();
		if (address.getOffset() != 0x404f10) {
			TableSortState tableSortState = model.getTableSortState();
			Msg.debug(this, "sort state = " + tableSortState); // should be address column
			List<FoundString> modelData = model.getModelData();
			Msg.debug(this,
				"selected model row address is " + address.getOffset() + " expected " + 0x404f10);
			for (int i = 0; i < modelData.size(); i++) {
				Msg.debug(this,
					"row " + i + "  addr = " + getModelValue(model, i, addressColumnIndex));
			}
			Assert.fail();
		}

		// test that the table was updated with the label and preview
		assertEquals("pu_String9", getModelValue(model, selectedRow, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);
		assertEquals("p_unicode u\"\\rString9\\n\\r\"", data.getDisplayString());

		stringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);
		assertEquals("true", stringData);

		// test that the String Type is correct
		assertEquals("PascalUnicode",
			getModelValue(model, selectedRow, stringTypeColumnIndex).toString());

		// check that the selected row in the table moves to the next row
		ts = table.getSelectedRows();
		assertEquals(1, ts.length);
		assertEquals(selectedRow + 1, ts[0]);

		// Test Pascal 255
		// select the fourth row
		selectRows(table, addr(0x0405d80));
		selectedRow = table.getSelectedRow();
		performAction(makeStringAction, model);

		// test that the pascal 255 string was actually made correctly
		d = listing.getDataAt(addr(0x405d80));
		dt = d.getBaseDataType();
		assertTrue(dt instanceof PascalString255DataType);

		// test that the string len is correct to get the end of chars
		assertEquals(6, d.getLength());

		// test that the label was made
		sym = program.getSymbolTable().getPrimarySymbol(addr(0x405d80));
		assertEquals("p_Test1", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("p_Test1", getModelValue(model, selectedRow, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);
		assertEquals("p_string255 \"Test1\"", data.getDisplayString());

		stringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);
		assertEquals("true", stringData);

		// test that the String Type is correct
		assertEquals("PascalString255",
			getModelValue(model, selectedRow, stringTypeColumnIndex).toString());

		// Test Pascal
		// select the sixth row
		selectRows(table, addr(0x405d91));
		selectedRow = table.getSelectedRow();
		performAction(makeStringAction, model);

		// test the dialog message once the run is finished
		// test that the pascal string was actually made correctly
		d = listing.getDataAt(addr(0x405d91));
		dt = d.getBaseDataType();
		assertTrue(dt instanceof PascalStringDataType);

		// test that the string len is correct to get the end of chars
		assertEquals(9, d.getLength());

		// test that the label was made
		sym = program.getSymbolTable().getPrimarySymbol(addr(0x405d91));
		assertEquals("p_p2Test1", sym.getName());

		// test that the table was updated with the label and preview
		assertEquals("p_p2Test1", getModelValue(model, selectedRow, labelColumnIndex).toString());

		data = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);
		assertEquals("p_string \"p2Test1\"", data.getDisplayString());

		stringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);
		assertEquals("false", stringData);

		// test that the String Type is correct
		assertEquals("PascalString",
			getModelValue(model, selectedRow, stringTypeColumnIndex).toString());

	}

	/*
Try to run a search with first an invalid string model, then no model, to ensure that
the filter and columns related to high-confidence words are not shown.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringTableSearchTest.java