Skip to content

Commit

Permalink
Fixed one of the failing statement mapping tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Feb 15, 2024
1 parent 9cfb0fb commit cad28ed
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5883,7 +5883,10 @@ private void checkForOtherPossibleMatchesForFragment1(List<? extends AbstractCod
break;
}
}
if(parent1 != null && parent2 != null && (parent1.getString().equals(parent2.getString()) || possibleExtractVariable || possibleInlineVariable)) {
if(parent1 != null && parent2 != null && (parent1.getString().equals(parent2.getString()) ||
parent1.getLocationInfo().getCodeElementType().equals(CodeElementType.TRY_STATEMENT) ||
parent2.getLocationInfo().getCodeElementType().equals(CodeElementType.TRY_STATEMENT) ||
possibleExtractVariable || possibleInlineVariable)) {
ReplacementInfo replacementInfo = initializeReplacementInfo(leaf1, leaf, leaves1, leaves2);
Set<Replacement> replacements = findReplacementsWithExactMatching(leaf1, leaf, parameterToArgumentMap, replacementInfo, equalNumberOfAssertions, this);
if (replacements != null) {
Expand Down

0 comments on commit cad28ed

Please sign in to comment.