I am designing my own algorithm to check if 2 codes are similar or identical?

How do pre-exsting softwares do this?
What logic do they use?
Are there different levels of testing for this?
please give detailed answers

There are techniques from bioinformatics to perform this kind of task. Try looking at this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.