private static Integer findNextMatch(DiffLinesValidator source, ValidatableLine sourceLine,
			DiffLinesValidator other) {

		//
		// The goal of this method is to find a match for the line from the source structure in
		// the other structure.  Further, we are trying to match an item that was pushed down due
		// to a user inserting a new item into the structure.  We do NOT want to match the 
		// case when the user changed an item.  In that case, there is no logical match, but there
		// may be other matching items in the list (which we do not want).  We assume that matching
		// lines at the same offset is a signal that the given item we seek can not exists.
		//

		/*
		 
		 	Good Match:    
		 	
			 	struct 1 {
			 		byte
			 		int
			 		byte
			 	}
			 	
			 	struct 1.1 {
			 		word
			 		byte
			 		int
			 		byte
			 	}
		 	
			source - struct 1
			source line - the first 'byte'
			other - struct 1.1
			
			result: there should be a match for the 'byte' at index 1 in 'struct 1.1'
			
			
			Bad Match:
			
				struct 1 {
			 		byte
			 		int
			 		byte
			 	}
			 	
			 	struct 1.1 {
			 		word
			 		int
			 		byte
			 	}
		 	
			source - struct 1
			source line - the first 'byte'
			other - struct 1.1
			
			result: there should NOT be a match for the 'byte' at index 2 in 'struct 1.1'; rather
			        the eventual pairing for the diff algorithm will be for struct 1[0] to 
			        struct 1.1[0], from 'byte' -> 'word'
		 	
		 
		 */

		Integer index = other.findNextMatch(sourceLine);
		if (index == null) {
			return null; // no other match for the item at all in the list
		}

		//
		// Starting after the index of the current line, see if there is a match in the structures,
		// at the same index.  If so, then we don't want to use the match from another 
		// offset that we found above.
		//
		int start = source.indexOf(sourceLine) + 1;
		int end = Math.min(source.size(), index);
		for (int i = start; i < end; i++) {
			ValidatableLine nextOther = other.getLine(i);
			ValidatableLine nextSource = source.getLine(i);

			if (nextSource.matches(nextOther)) {
				return null;
			}
		}

		return index;
	}
Returns a line that matches the given line that occurs later in the 'other' validator; 
returns null if no suitable match is found.

@param source the validator that has a line which needs matching
@param sourceLine the line that needs matching
@param other the validator in which to find a match for the given line
@return a line that matches the given line that occurs later in the 'other' validator; 
		   returns null if no suitable match is found.
Ghidra/Features/Base/src/main/java/ghidra/app/util/html/diff/DataTypeDiffBuilder.java