Skip to content

Commit

Permalink
Fixed the matching of comments in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Oct 6, 2024
1 parent 4dfe331 commit df71350
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2651,7 +2651,12 @@ else if(streamAPIStatements1.size() > 0 && streamAPIStatements2.size() == 0) {
inlinedVariableAssignment(statement, nonMappedLeavesT2);
}
if(parentMapper != null && parentMapper.commentListDiff != null) {
this.commentListDiff = new UMLCommentListDiff(parentMapper.commentListDiff.getDeletedComments(), container2.getComments());
List<UMLComment> deletedComments = new ArrayList<UMLComment>();
deletedComments.addAll(parentMapper.commentListDiff.getDeletedComments());
for(UMLOperationBodyMapper childMapper : parentMapper.getChildMappers()) {
deletedComments.addAll(childMapper.commentListDiff.getDeletedComments());
}
this.commentListDiff = new UMLCommentListDiff(deletedComments, container2.getComments());
checkUnmatchedStatementsBeingCommented();
}
}
Expand Down Expand Up @@ -3035,7 +3040,12 @@ else if(streamAPIStatements1.size() > 0 && streamAPIStatements2.size() == 0) {
inlinedVariableAssignment(statement, nonMappedLeavesT2);
}
if(parentMapper != null && parentMapper.commentListDiff != null) {
this.commentListDiff = new UMLCommentListDiff(container1.getComments(), parentMapper.commentListDiff.getAddedComments());
List<UMLComment> addedComments = new ArrayList<UMLComment>();
addedComments.addAll(parentMapper.commentListDiff.getAddedComments());
for(UMLOperationBodyMapper childMapper : parentMapper.getChildMappers()) {
addedComments.addAll(childMapper.commentListDiff.getAddedComments());
}
this.commentListDiff = new UMLCommentListDiff(container1.getComments(), addedComments);
checkUnmatchedStatementsBeingCommented();
}
}
Expand Down

0 comments on commit df71350

Please sign in to comment.