What is the name of the refactoring, as a result of which they got rid of low-quality code but at the same time broke half of the functionality?
Everything seems to compile and look perfect, but it doesn't work.
refactoring as a result of which they got rid of low-quality code but at the same time broke half of the functionality
This is called "regression" or "regression", and it doesn't matter what you did: add new functionality and break the old one, or just refactor without adding new features and reworking the current ones.
Let's take a few definitions as an example.
Roy Osheroff, The Art of Unit Testing:
A regression is one or more units of work that once worked but no longer work.
The International Software Testing Qualifications Board (certificate program) in the glossary defines:
regression – A degradation in the quality of a component or system due to a change.
There is a set of activities aimed at trying to diagnose such things – regression testing or testing for regression.
Typically, such testing is so complex that the Q&A team does a full regression test at the end of the iteration.