How to use StringDistance class in JPA
The Levenshtein distance between two lines is the minimum number of changes that must be applied to the first line in order to move to the second line. You can see here for the details of the algorithm.
has nothing to do with the JPA specification. It's just a utility class used by OpenJPA, which is one of the variants of the JPA specification. Apache Common also offers this feature
If OpenJPA encounters an invalid config property while parsing the openJPA config file, it will use the Levenshtein distance algorithm, calling
to find out the closest string of a valid property to that invalid property, so that it can provide a suggestion to fix that invalid property.
source to share