What is your definition of the duplicate code? Is it the code that looks identical/similar now? Or Is it the code that looks identical now and also changes together for the same reason? If it's the latter then what is the best time to remove the duplicate?