code: private static int indexOfName(List<UnresolvedReferenceExpression> inputFieldReferences, String targetName) {
  		int i;
  		for (i = 0; i < inputFieldReferences.size(); ++i) {
  			if (inputFieldReferences.get(i).getName().equals(targetName)) {
  				break;
  			}
  		}
  		return i == inputFieldReferences.size() ? -1 : i;
  	}
docs: Find the index of targetName in the list. Return -1 if not found.