Flycut is a clean and simple clipboard manager for developers. It based on open source app called Jumpcut. Flycut is also open source.
Every time you copy code pieces Flycut store it in history. Later you can past it using Shift-Command-V even if you have something different in your current clipboard. You can change hotkey and other settings in preferences.