I use Dia for drawing UML diagrams (as well as other diagrams), but it cannot generate code (at least not without some additional tools, like dia2code). It's more like a general-purpose diagram drawing tool with a decent support for UML.
Umbrello is a tool dedicated to UML-based modelling. It's comparable to Dia in terms of drawing, plus it can export and import code from/to several languages.
The above apps are, in my opinion, the best you can get from Ubuntu. Nevertheless, there are several other apps/libraries that are somehow related to UML modelling. Open System -> Administration -> Synaptic Package Manager and type "uml" in the search box.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…