Skip to content

Commit

Permalink
Fix last failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Jan 2, 2025
1 parent b22a612 commit 273991a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,13 @@ else if(!PrefixSuffixUtils.normalize(replacement.getBefore()).equals(PrefixSuffi
candidate.setRenamedVariableDeclaration(v2.getKey());
ExtractVariableRefactoring conflictingExtractVariableRefactoring = existsConflictingExtractVariableRefactoring(candidate);
if(conflictingExtractVariableRefactoring == null) {
this.candidateAttributeRenames.add(candidate);
boolean skip = false;
if(v1 != null && v2 == null && v1.getValue().isConstructor()) {
skip = true;
}
if(!skip) {
this.candidateAttributeRenames.add(candidate);
}
}
else {
for(LeafMapping mapping : conflictingExtractVariableRefactoring.getSubExpressionMappings()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public void testAllRefactorings() throws Exception {
GitHistoryRefactoringMinerImpl detector = new GitHistoryRefactoringMinerImpl();
TestBuilder test = new TestBuilder(detector, REPOS, Refactorings.All.getValue());
RefactoringPopulator.feedRefactoringsInstances(Refactorings.All.getValue(), Systems.FSE.getValue(), test);
test.assertExpectationsWithGitHubAPI(12403, 21, 226);
test.assertExpectationsWithGitHubAPI(12403, 20, 226);
}
}

0 comments on commit 273991a

Please sign in to comment.