What is transformative enough to be legal is fuzzy. At the end of the day, it only matters how the courts rule. I do know that the amount of actual mechanical change has less bearing on determining if the work was transformative. There are cases where you can copy 90% of a code base verbatim legally, and there are cases where no code is copied verbatim and it is a copyright violation. What you are describing most likely would not fly in court.