The primary objective of this work is to identify the scope of requirements for existing software projects by considering the source code metrics. In this work, the authors used Deep Q Network (DQN) for refactoring prediction, for which three open-source real-time projects, Antlr4, Junit, and Oryx, are taken into consideration. Different code metrics like Cyclomatic Complexity, Lines of Code, Coupling between Objects Lack of Cohesion are taken as input parameters. Based on the experimental analysis, five different types of refactoring predictions are performed, and the requirement of Extract Method and Move Class is higher as compared to other techniques. JUnit framework identifies a high scope of refactoring for which the performance evaluation metrics values are with an accuracy 97%, recall of .96, f-measure of 0.96, precison of 0.96. Q-Learning can be considered as one of the best techniques for identifying the need for code alteration by considering the probable values that resemble the Q-Value used for analysing the maintainability index.