This paper introduces an enhanced algorithm for clone detection in software using a bijective matching technique based on the stable marriage problem (SMP). It aims to improve the precision of clone detection by expanding the range of similarity measures and incorporating the preferences of code segments, demonstrating improved scalability and accuracy. The authors provide a prototype implementation that showcases the effectiveness of their approach in detecting code clones across different source files.