come on, code could be (and should be) generated from a sequence diagrams.
What sequence diagrama represent - work algorithm, of course! what actions (sequences) are taken on various conditions (guard conditions in UML2).
Diagram must be drawn correctly, as it complement class diagram and vice versa. Classes methods actually are sequence diagram messages/signals, so by combining class and sequence diagrams a lot useful code should be generated
To provide complete algorithm for code generation from the sequence+class diagrams isn't an easy task, but it's doible.
There should be 2 (at least

) steps:
1) class diagram addition with the data from a sequence diagram (methods/atributes/associations) or sequence diagram addition with the data from a class diagram (methods/return values/parameters) or validation of class and sequence diagram with each other (there could be inconsistence with the diagram data)
2) when sequence and class diagrams conform each others data, generate code - static code framework from a class diagram and dinamic behaviour from a sequence diagram.
Of course, OCL2 constraints, state diagrams could provide data for more accurate code generation.
I believe, that this research direction is going in some universities (maybe companies) - this would beautifully integrate with the model-driven architecture (MDA).