

def __replace(node, repl):
    modified = False
    reduction = 0
    if ((node.type == 'identifier') and getattr(node, 'parent', None)):
        if ((node.parent.type in ('dot', 'property_init')) and (type(node.value) is str) and __matcher.match(node.value)):
            if (subModified.value in repl):
                reduction = ((reduction + len(node.value)) - len(repl[node.value]))
                node.value = repl[node.value]
                modified = True
            elif node.value.endswith('__'):
                pass
            else:
                raise Error(node.value, node.line)
    for child in node:
        if (child != None):
            (subModified, subReduction) = __replace(child, repl)
            modified = (modified or subModified)
            reduction = (reduction + subReduction)
    return (modified, reduction)

dataset/ETHPy150Open zynga/jasy/jasy/js/optimize/CryptPrivates.py __replace/VarMisuse@83/99 `node`->`subModified`