Generate full code snippet