@Test public void wrongCommitWillNotBeGuessed() { Smell instance = new Smell("MIM", "d.e.f", sameCommit.newFile); Commit commit = new Commit("anyothercommit", 1); SmellDuplicationChecker checker = getDuplicationChecker(); Smell original = checker.original(instance, commit, parent); assertNull(original); }
public Smell original(Smell instance, Commit commit, Commit previous) { logger.trace("==> Trying to guess original smell for: " + instance); int index = fileRenamings.indexOf(FileRenameEntry.fromSmell(instance, commit)); if (index > -1) { logger.trace(" ==> Guessing new original smell!"); return guessOriginalSmell(instance, previous, fileRenamings.get(index)); } logger.trace(" ==> No original smell found"); return null; }
SmellDuplicationChecker { public Smell original(Smell instance, Commit commit, Commit previous) { logger.trace("==> Trying to guess original smell for: " + instance); int index = fileRenamings.indexOf(FileRenameEntry.fromSmell(instance, commit)); if (index > -1) { logger.trace(" ==> Guessing new original smell!"); return guessOriginalSmell(instance, previous, fileRenamings.get(index)); } logger.trace(" ==> No original smell found"); return null; } }
SmellDuplicationChecker { public Smell original(Smell instance, Commit commit, Commit previous) { logger.trace("==> Trying to guess original smell for: " + instance); int index = fileRenamings.indexOf(FileRenameEntry.fromSmell(instance, commit)); if (index > -1) { logger.trace(" ==> Guessing new original smell!"); return guessOriginalSmell(instance, previous, fileRenamings.get(index)); } logger.trace(" ==> No original smell found"); return null; } SmellDuplicationChecker(int projectId, Persistence persistence, QueryEngine queryEngine); }
SmellDuplicationChecker { public Smell original(Smell instance, Commit commit, Commit previous) { logger.trace("==> Trying to guess original smell for: " + instance); int index = fileRenamings.indexOf(FileRenameEntry.fromSmell(instance, commit)); if (index > -1) { logger.trace(" ==> Guessing new original smell!"); return guessOriginalSmell(instance, previous, fileRenamings.get(index)); } logger.trace(" ==> No original smell found"); return null; } SmellDuplicationChecker(int projectId, Persistence persistence, QueryEngine queryEngine); Smell original(Smell instance, Commit commit, Commit previous); }
SmellDuplicationChecker { public Smell original(Smell instance, Commit commit, Commit previous) { logger.trace("==> Trying to guess original smell for: " + instance); int index = fileRenamings.indexOf(FileRenameEntry.fromSmell(instance, commit)); if (index > -1) { logger.trace(" ==> Guessing new original smell!"); return guessOriginalSmell(instance, previous, fileRenamings.get(index)); } logger.trace(" ==> No original smell found"); return null; } SmellDuplicationChecker(int projectId, Persistence persistence, QueryEngine queryEngine); Smell original(Smell instance, Commit commit, Commit previous); static final String QUALIFIED_NAME; }