sS combineToDollarVarPattern(S a, S b) { L tok1 = codeTokens(dropPunctuation(javaTok(a))); L tok2 = codeTokens(dropPunctuation(javaTok(b))); if (l(tok1) != l(tok2)) null; new L out; Iterator varNames = allWordsOfAlphabet(lowerCaseAlphabet()); varNames.next(); // Skip "$" for i over tok1: { S t = tok1.get(i); out.add(eq(t, tok2.get(i)) ? t : "$" + varNames.next()); } ret joinWithSpace(out); }