Software Maintenance using Duplicate Code Detection and Extraction