On the other hand, it is often debated whether those diagrams are needed at all, during what stages of the software development process they should be used, and how (if at all) they should be kept up to date.
Code generation in this context means that the user creates UML diagrams, which have some connected model data, and the UML tool derives from the diagrams part or all of the source code for the software system.
An often cited criticism is that the UML diagrams lack the detail that is needed to contain the same information as is covered with the program source: Jack W. Reeves states that the final embodiment of the design lies in the source code.
(His often quoted statement that "the Code is the design" [1] has been misinterpreted to mean that there is no need for intermediate- and high-level software-design artifacts, such as UML diagrams or software-requirements documents).
Reverse engineering in this context means, that the UML tool reads program source code as input and derives model data and corresponding graphical UML diagrams from it (as opposed to the somewhat broader meaning described in the article "Reverse engineering").