Cleaned up CPD check in spring android. Better tests, more robust.