I came across this phrase in source code files open-sourced by Apple.
Here is one such example:
The warning basically means the source code is internal to Apple and is subject to change. We (software developers who use these files) should not expect the 'interface' to stay the same between version. If the interface is indeed changed, any program that depends on the file will be broken.
What I do not quite understand are:
1) Is the phrase "When breaks, you get to keep both pieces" a common one? If so, how is it usually used?
2) Does 'both pieces' means 'two pieces' here?
3) Is it supposed to be playful in tone? Is there any other implied meaning based on the context?