Empirical investigation of causes and effects of code clones