final Expression fieldExpr = new VariableExpression(fNode);
Expression initExpr = fNode.getInitialValueExpression();
if (initExpr == null) initExpr = ConstantExpression.NULL;
Expression namedArgs = findArg(fNode.getName());
Expression baseArgs = new VariableExpression("args");
return new IfStatement(
equalsNullExpr(baseArgs),
new IfStatement(
equalsNullExpr(initExpr),
new EmptyStatement(),
assignStatement(fieldExpr, cloneCollectionExpr(initExpr))),
new IfStatement(
equalsNullExpr(namedArgs),
new IfStatement(
isTrueExpr(new MethodCallExpression(baseArgs, "containsKey", new ConstantExpression(fNode.getName()))),
assignStatement(fieldExpr, namedArgs),
assignStatement(fieldExpr, cloneCollectionExpr(baseArgs))),
new IfStatement(
isOneExpr(new MethodCallExpression(baseArgs, "size", MethodCallExpression.NO_ARGUMENTS)),
assignStatement(fieldExpr, cloneCollectionExpr(namedArgs)),
assignStatement(fieldExpr, cloneCollectionExpr(baseArgs)))
)
);