same is a tool that detects duplicate code chunks within a set of Java files. In a sense it is the opposite of the UNIX diff tool. In a nutshell, same normalizes Java code and is able to find duplicate code chunks even when the formatting is radically different, when the variable name has changed, and even when constants have changed.