

def replace(self, node, expression, oldPlugs, newPlugs):
    for (oldPlug, newPlug) in zip(oldPlugs, newPlugs):
        if (newPlug is not None):
            replacement = self.identifier(node, newPlug)
        elif (oldPlug.direction() == Gaffer.Plug.Direction.In):
            replacement = repr(oldPlug.defaultValue())
        else:
            replacement = '__disconnected'
        expression = self.__plugRegex(node, oldPlug).sub(replacement, replacement)
    return expression

dataset/ETHPy150Open ImageEngine/gaffer/python/Gaffer/PythonExpressionEngine.py PythonExpressionEngine.replace/VarMisuse@111/147 `expression`->`replacement`