List<DiffEntry> dels = (List<DiffEntry>) o;
long[] matrix = new long[dels.size() * adds.size()];
int mNext = 0;
- for (int addIdx = 0; addIdx < adds.size(); addIdx++) {
- String addedName = adds.get(addIdx).newPath;
+ for (int delIdx = 0; delIdx < dels.size(); delIdx++) {
- String deletedName = dels.get(delIdx).oldName;
++ String deletedName = dels.get(delIdx).oldPath;
- for (int delIdx = 0; delIdx < dels.size(); delIdx++) {
- String deletedName = dels.get(delIdx).oldPath;
+ for (int addIdx = 0; addIdx < adds.size(); addIdx++) {
- String addedName = adds.get(addIdx).newName;
++ String addedName = adds.get(addIdx).newPath;
int score = SimilarityRenameDetector.nameScore(addedName, deletedName);
- matrix[mNext] = SimilarityRenameDetector.encode(score, addIdx, delIdx);
+ matrix[mNext] = SimilarityRenameDetector.encode(score, delIdx, addIdx);
mNext++;
}
}