class CloneGenerator extends NodeGenerator {
    public CloneGenerator(SourceRoot sourceRoot) {
        super(sourceRoot);
    }

    @Override
    protected void generateNode(BaseNodeMetaModel nodeMetaModel, CompilationUnit nodeCu, ClassOrInterfaceDeclaration nodeCoid) {<FILL_FUNCTION_BODY>}
}

        nodeCu.addImport(CloneVisitor.class);
        MethodDeclaration cloneMethod = (MethodDeclaration) parseBodyDeclaration(f(
                "@Override public %s clone() { return (%s) accept(new CloneVisitor(), null); }",
                nodeMetaModel.getTypeNameGenerified(),
                nodeMetaModel.getTypeNameGenerified()
        ));
        addOrReplaceWhenSameSignature(nodeCoid, cloneMethod);
    
<methods>public final void generate() throws java.lang.Exception<variables>