Answer : (3). Both P and Q only
Reason :
Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure. The statement is TRUE and given by MartinFowler in Refactoring Improving The Design Of Existing Code.
Refactoring essentially is cleaning up an existing code base to enable changes to be made more efficiently, or to improve the performance of the existing system. Refactoring usually involves restructuring or rewriting portions of code which are convoluted, difficult to understand, poorly documented or unnecessarily complex. Refactoring, the engineers argued, is essential to add future features, so developers should be given time to “refactor” existing code– even if it is the only activity in that sprint or release.
So Both the statements are TRUE.