Skip to content

Commit 44a95c4

Browse files
committed
group statements based on comment, only if method bodies differ (#976)
jabgui/src/test/java/org/jabref/gui/externalfiles/ImportHandlerTest.java
1 parent 3ad6ee1 commit 44a95c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,8 @@ else if(streamAPIStatements1.size() > 0 && streamAPIStatements2.size() == 0) {
702702
boolean isomorphic = isomorphicCompositeStructure(innerNodes1, innerNodes2);
703703
//check if it is possible to group statements based on comments, useful for junit tests
704704
if((operation1.hasTestAnnotation() || operation1.hasDataPointsAnnotation() || operation1.hasDataProviderAnnotation() || operation1.hasParametersAnnotation()) &&
705-
(operation2.hasTestAnnotation() || operation2.hasDataPointsAnnotation() || operation2.hasDataProviderAnnotation() || operation2.hasParametersAnnotation())) {
705+
(operation2.hasTestAnnotation() || operation2.hasDataPointsAnnotation() || operation2.hasDataProviderAnnotation() || operation2.hasParametersAnnotation()) &&
706+
operation1.getBodyHashCode() != operation2.getBodyHashCode()) {
706707
List<CodeBlockBetweenComments> blocks1 = CodeBlockBetweenComments.generateCodeBlocks(leaves1, operation1);
707708
List<CodeBlockBetweenComments> blocks2 = CodeBlockBetweenComments.generateCodeBlocks(leaves2, operation2);
708709
if(blocks1.size() <= blocks2.size()) {

0 commit comments

Comments
 (0)