Large systems require maintenance because the needs are changing and the programmers or designers make some mistakes. If we want to correct these mistakes or to make the maintenance phase easier, some refactorings have to be made on the code. The refactoring operations make the code more understandable and correct the mistakes which occur in it. The refactoring operations are well-defined, but the locations where they can be applied are unknown. These locations can be discovered by finding bad smells. Bad smells are signs in the code, and refer to places where refactoring is needed.