when they say that a project is open source (i.e. LifeRay) does it mean that I can take anything I want from that project?
I want to use some of the icons used in LifeRay portal for my own (commercial) apps. Is this legal?
"Open source" means that it is offered under a license that fits http://www.opensource.org/osd.html. However you are responsible for following the license. And if you use the source in a way that is not compatible with the license, then you are violating copyright. Furthermore if they have not OKed the reuse of software in proprietary apps, then you will be disliked by the community at large in addition to the legal penalties you face.
In the case of LifeRay in particular, from http://sourceforge.net/projects/lportal/ it looks like they are licensing their software under the LGPL. From my understanding of that license it is not OK for you just to borrow pieces and integrate it into your application.
(Insert standard disclaimer, I am not a lawyer, this is not legal advice. However I've been involved with open source software for as long as the term has existed.)