protected TokenPair getCurrentTokenPair(
			DecompilerCodeComparisonPanel decompPanel) {

		DecompilerPanel focusedPanel = decompPanel.getActiveDisplay().getDecompilerPanel();

		if (!(focusedPanel.getCurrentLocation() instanceof DecompilerLocation focusedLocation)) {
			return null;
		}

		ClangToken focusedToken = focusedLocation.getToken();
		if (focusedToken == null) {
			return null;
		}
		List<TokenBin> tokenBin = diffPanel.getHighBins();
		if (tokenBin == null) {
			return null;
		}
		TokenBin containingBin = TokenBin.getBinContainingToken(tokenBin, focusedToken);
		if (containingBin == null) {
			return null;
		}
		TokenBin matchedBin = containingBin.getMatch();
		if (matchedBin == null) {
			return null;
		}
		//loop over the tokens in the matching bin and return the first one in the same
		//class as focusedToken
		Iterator<ClangToken> tokenIter = matchedBin.iterator();
		while (tokenIter.hasNext()) {
			ClangToken currentMatch = tokenIter.next();
			if (currentMatch.getClass().equals(focusedToken.getClass())) {
				return decompPanel.getActiveSide() == LEFT
						? new TokenPair(focusedToken, currentMatch)
						: new TokenPair(currentMatch, focusedToken);
			}
		}
		return null;
	}
Returns a {@link TokenPair} consisting of the token under the cursor in the focused
decompiler panel and its counterpart in the other panel. 

@param decompPanel decomp panel
@return matching tokens (or null if no match)
Ghidra/Features/CodeCompare/src/main/java/ghidra/features/codecompare/decompile/AbstractMatchedTokensAction.java