gr.uom.java.xmi.diff.StringDistance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refactoring-miner Show documentation
Show all versions of refactoring-miner Show documentation
RefactoringMiner is a library/API written in Java that can detect refactorings applied in the history of a Java project.
package gr.uom.java.xmi.diff;
import org.apache.commons.text.similarity.LevenshteinDistance;
public class StringDistance {
public static int editDistance(String a, String b, int threshold) {
return new LevenshteinDistance(threshold).apply(a, b);
}
public static int editDistance(String a, String b) {
return new LevenshteinDistance().apply(a, b);
}
}