Good job spotting the duplication. Be very very sure they are precisely the same before you factor them out. e.g. use some kind of diff tool. There could be subtle differences not immediately visible.