Skip to content

Commit

Permalink
fix: πŸ› mappings found in lcs shouldn't used in histogram phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanonymous-GitHub committed Aug 18, 2024
1 parent 72b3e47 commit ac74369
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ class BottomUpMatcher : TreeMatcher<GumTree> {
if ((leftNodes != null && rightNodes != null) && (leftNodes.size == 1 && rightNodes.size == 1)) {
val left = leftNodes.single()
val right = rightNodes.single()

if (storage.isLeftMapped(left) || storage.isRightMapped(right)) {
return@forEach
}

storage.addMappingOf(
realTreePool.tryExtractRealOf(left to right)
)
Expand Down

0 comments on commit ac74369

Please sign in to comment.