The code fragment is usually imported from the development environment either by using copy/paste or by selecting Import Source option in Edit menu.
Suppose we have the following code fragment that is an implementation of Singleton design pattern.