JPlag compares programs by trying to cover one of the programs with (preferably big) sequences from the other program. The coverage of a program is defined as the ratio of covered source code to the total size of the source code.
The average similarity is defined as the average of both program
coverages.
This is the default similarity which works in most cases: Matches with a high
average similarity indicate that the programs work in a very similar way.
The maximum similarity is defined as the maximum of both program
coverages.
This ranking is especially useful if the programs are very different in
size. This can happen when dead code was inserted to disguise the origin
of the plagiarized program.