diff --git a/src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java b/src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java index 7a771592f4..3c5d734f5d 100644 --- a/src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java +++ b/src/main/java/gr/uom/java/xmi/diff/UMLClassBaseDiff.java @@ -2498,7 +2498,7 @@ private boolean operationsBeforeAndAfterMatch(UMLOperation removedOperation, UML boolean operationsBeforeMatch = false; if(operationBefore1 != null && operationBefore2 != null) { - operationsBeforeMatch = (operationBefore1.equalReturnParameter(operationBefore2) && operationBefore1.equalParameterTypes(operationBefore2) && operationBefore1.getName().equals(operationBefore2.getName())) + operationsBeforeMatch = (operationBefore1.equalReturnParameter(operationBefore2) && operationBefore1.getName().equals(operationBefore2.getName())) || (matchingDataProviderAnnotation(removedOperation, operationBefore1) && matchingDataProviderAnnotation(addedOperation, operationBefore2)); } else if(operationBefore1 == null && operationBefore2 == null) { @@ -2508,7 +2508,7 @@ else if(operationBefore1 == null && operationBefore2 == null) { boolean operationsAfterMatch = false; if(operationAfter1 != null && operationAfter2 != null) { - operationsAfterMatch = (operationAfter1.equalReturnParameter(operationAfter2) && operationAfter1.equalParameterTypes(operationAfter2) && operationAfter1.getName().equals(operationAfter2.getName())) + operationsAfterMatch = (operationAfter1.equalReturnParameter(operationAfter2) && operationAfter1.getName().equals(operationAfter2.getName())) || (matchingDataProviderAnnotation(removedOperation, operationAfter1) && matchingDataProviderAnnotation(addedOperation, operationAfter2)); } else if(operationAfter1 == null && operationAfter2 == null) { diff --git a/src/test/java/org/refactoringminer/test/TestAllRefactorings.java b/src/test/java/org/refactoringminer/test/TestAllRefactorings.java index 1eff9af597..9663552e3e 100644 --- a/src/test/java/org/refactoringminer/test/TestAllRefactorings.java +++ b/src/test/java/org/refactoringminer/test/TestAllRefactorings.java @@ -15,6 +15,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(12150, 20, 240); + test.assertExpectationsWithGitHubAPI(12159, 20, 238); } } diff --git a/src/test/resources/oracle/data.json b/src/test/resources/oracle/data.json index eb61b399c0..3ec053efb0 100644 --- a/src/test/resources/oracle/data.json +++ b/src/test/resources/oracle/data.json @@ -84633,15 +84633,15 @@ "type": "Add Method Annotation", "description": "Add Method Annotation @Deprecated in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", "comment": "null", - "validation": "CTP", - "detectionTools": "GumTreeDiff", + "validation": "TP", + "detectionTools": "RefactoringMiner, GumTreeDiff", "validators": "Nikos" }, { "type": "Add Method Annotation", "description": "Add Method Annotation @SneakyThrows in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", "comment": "null", - "validation": "CTP", - "detectionTools": "GumTreeDiff", + "validation": "TP", + "detectionTools": "RefactoringMiner, GumTreeDiff", "validators": "Nikos" }, { "type": "Add Method Annotation", @@ -85672,6 +85672,55 @@ "validation": "TP", "detectionTools": "RefactoringMiner", "validators": null + }, { + "type": "Add Variable Modifier", + "description": "Add Variable Modifier final in variable entry : Entry in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Add Variable Modifier", + "description": "Add Variable Modifier final in variable oos : ObjectOutputStream in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Remove Parameter", + "description": "Remove Parameter path : String in method public writeModel(path String) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Add Parameter", + "description": "Add Parameter model : Model in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Add Parameter", + "description": "Add Parameter outputStream : OutputStream in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Add Method Modifier", + "description": "Add Method Modifier static in method public writeModel(model Model, outputStream OutputStream) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null + }, { + "type": "Remove Thrown Exception Type", + "description": "Remove Thrown Exception Type IOException in method public writeModel(path String) : void from class org.ansj.app.crf.Model", + "comment": null, + "validation": "TP", + "detectionTools": "RefactoringMiner", + "validators": null }], "refDiffExecutionTime": 0 }, { diff --git a/src/test/resources/oracle/expected.txt b/src/test/resources/oracle/expected.txt index 98b434dc6d..71ad1432b2 100644 --- a/src/test/resources/oracle/expected.txt +++ b/src/test/resources/oracle/expected.txt @@ -288,7 +288,7 @@ c8e09e2056c54ead97bce4386a25b222154223b1, 25, 0, 0 7ffc62aa554f5884064b81ee80078e35e3833006, 2, 0, 0 7837d0baf1aef45340eec699516a8c3a22aeb553, 1, 0, 0 1ef86e69d5a108c2b4d836b0634ebdea912cfe00, 4, 0, 0 -913704e835169255530c7408cad11ce9a714d4ec, 159, 0, 4 +913704e835169255530c7408cad11ce9a714d4ec, 168, 0, 2 95bfa40630e34f6f369e0055d9f37f49bca60247, 1, 0, 0 bf5ee44b3b576e01ab09cae9f50300417b01dc07, 480, 0, 0 2fd96c777164dd812e8b5a4294b162889601df1d, 7, 0, 0