We've all got bad metrics stories, but wanted to share this one.
Friend at megacorp was doing JS work, and working with the offshore team in India (few people in the US, and 3-4x as many in India IIRC). India team was "killing it" because of all the issues closed, and the US team was getting crap because they "took forever".
One of the mandates was "when you commit code, you need to have a test for it". Friend checked out the offshored code, ran the tests, and ... they failed. Almost all - a few worked by accident, but they were failing tests. Actually, when he first ran the test suite, his whole system locked up and crashed - the test suite runner couldn't deal with that many failures (that was my impression based on the symptoms and repeatability).
The 'defense', such as it was, was that no one had instructed anyone that the tests should actually be run or pass, just that test files needed to be committed with regular code. So they'd write empty tests, or copy/paste code from other tests. The line count and 'closed issues' were both great - so much better than the US counterparts. It's just that... literally... nothing was actually being tested. Budgets were cut and he and a bunch of other folks didn't have their contract renewed - they put more money in to the offshore team. :/