Code is art, and like other art forms like music and painting, good source code exhibits similar patterns. These are not only design patterns—they are regular code patterns that occur frequently. The information about code patterns can be helpful in a multitude of situations.
Useful Patterns in Code Mining
For example, these patterns can be useful in identifying duplicate to near duplicate code blocks, checking the difference between two versions of the same code, identifying dependancies, detecting plagiarism, and understanding the construction of the code ...