public ProgramLocation getLocation(int eolRow, int eolColumn) {

		if (eolRow < 0) {
			return null;
		}

		int numEol = eols.size();
		int numRepeatable = repeatables.size();
		int numRefRepeats = refRepeatables.size();
		int numAutomatic = autos.size();

		int beforeRepeatable = numEol;
		int beforeRefRepeats = beforeRepeatable;
		if (!repeatables.isEmpty()) {
			beforeRefRepeats += numRepeatable;
		}

		int beforeAutomatic = beforeRefRepeats;
		if (!refRepeatables.isEmpty()) {
			beforeAutomatic += numRefRepeats;
		}

		int numTotal = beforeAutomatic;
		if (!autos.isEmpty()) {
			numTotal += numAutomatic;
		}

		Program program = codeUnit.getProgram();
		Address minAddress = codeUnit.getMinAddress();
		int[] cpath = null;
		if (codeUnit instanceof Data) {
			cpath = ((Data) codeUnit).getComponentPath();
		}
		if (eolRow < beforeRepeatable) {
			return new EolCommentFieldLocation(program, minAddress, cpath, getCommentsArray(),
				eolRow, eolColumn, eolRow);
		}

		if (eolRow < beforeRefRepeats) {
			return new RepeatableCommentFieldLocation(program, minAddress, cpath,
				getCommentsArray(), eolRow, eolColumn, eolRow - beforeRepeatable);
		}

		if (eolRow < beforeAutomatic) {
			int rowInAllRefRepeats = eolRow - beforeRefRepeats;
			return new RefRepeatCommentFieldLocation(program, minAddress, cpath, getCommentsArray(),
				eolRow, eolColumn, getRefRepeatRow(rowInAllRefRepeats),
				getRefRepeatAddress(rowInAllRefRepeats));
		}

		if (eolRow < numTotal) {
			return new AutomaticCommentFieldLocation(program, minAddress, cpath, getCommentsArray(),
				eolRow, eolColumn, eolRow - beforeAutomatic);
		}

		return null;
	}
Gets the automatic comments
@return the comments
Ghidra/Features/Base/src/main/java/ghidra/app/util/EolComments.java