Source:
public static String getFullRepresentationString(SimpleNode node, boolean fullOnSubscriptOrCall) { if (node instanceof Dict || node instanceof DictComp) { return "dict"; } if (node instanceof Str || node instanceof Num) { return getRepresentationString(node, true); } if (node instanceof Tuple) { return getRepresentationString(node, true); } if (node instanceof Subscript) { return getFullRepresentationString(((Subscript) node).value); } if (node instanceof Call) { Call c = (Call) node; node = c.func; if (Reflection.hasAttr(node, "value") && Reflection.hasAttr(node, "attr")) { return getFullRepresentationString((SimpleNode) Reflection.getAttrObj(node, "value")) + "." + discoverRep(Reflection.getAttrObj(node, "attr")); } } if (node instanceof Attribute) { List<SimpleNode> attributeParts = getAttributeParts((Attribute) node); StringBuffer buf = new StringBuffer(); for (Object part : attributeParts) { if (part instanceof Call) { if (!fullOnSubscriptOrCall) { return buf.toString(); } else { buf.append("()"); } } else if (part instanceof Subscript) { if (!fullOnSubscriptOrCall) { return getFullRepresentationString(((Subscript) part).value); } else { buf.append(getFullRepresentationString(((Subscript) part).value)); buf.append("[]"); } } else { String representationString = getRepresentationString((SimpleNode) part, true); if (representationString.contentEquals("!<MissingName>!")) { continue; } if (buf.length() > 0) { buf.append("."); } buf.append(representationString); } } return buf.toString(); } if (node instanceof BinOp) { BinOp binOp = (BinOp) node; if (binOp.left instanceof Str && binOp.op == BinOp.Mod) { return getRepresentationString(node, true); } } return getRepresentationString(node, true); }

Target:
public static String getFullRepresentationString(SimpleNode node, boolean fullOnSubscriptOrCall) { if (node instanceof Dict || node instanceof DictComp) { return "dict"; } if (node instanceof Str || node instanceof Num) { return getRepresentationString(node, true); } if (node instanceof Tuple) { return getRepresentationString(node, true); } if (node instanceof Subscript) { return getFullRepresentationString(((Subscript) node).value); } if (node instanceof Call) { Call c = (Call) node; node = c.func; if (Reflection.hasAttr(node, "value") && Reflection.hasAttr(node, "attr")) { return getFullRepresentationString((SimpleNode) Reflection.getAttrObj(node, "value")) + "." + discoverRep(Reflection.getAttrObj(node, "attr")); } } if (node instanceof Attribute) { List<SimpleNode> attributeParts = getAttributeParts((Attribute) node); StringBuffer buf = new StringBuffer(); for (Object part : attributeParts) { if (part instanceof Call) { if (!fullOnSubscriptOrCall) { return buf.toString(); } else { buf.append("()"); } } else if (part instanceof Subscript) { if (!fullOnSubscriptOrCall) { return getFullRepresentationString(((Subscript) part).value); } else { buf.append(getFullRepresentationString(((Subscript) part).value)); buf.append("[]"); } } else { String representationString = getRepresentationString((SimpleNode) part, true); if ("!<MissingName>!".equals(representationString)) { continue; } if (buf.length() > 0) { buf.append("."); } buf.append(representationString); } } return buf.toString(); } if (node instanceof BinOp) { BinOp binOp = (BinOp) node; if (binOp.left instanceof Str && binOp.op == BinOp.Mod) { return getRepresentationString(node, true); } } return getRepresentationString(node, true); }