})
@Ensures("result != null")
static String rebaseLocalCalls(String code, String that,
Set<String> whitelist) {
StringBuilder buffer = new StringBuilder();
PushbackTokenizer tokenizer = new PushbackTokenizer(new StringReader(code));
boolean qualified = false;
while (tokenizer.hasNext()) {
Token token = tokenizer.next();
if (!qualified && token.kind == TokenKind.WORD
&& (whitelist == null || !whitelist.contains(token.text))) {
if (token.text.equals("this")) {
buffer.append("( ");
buffer.append(JavaUtils.BEGIN_GENERATED_CODE);