Skip to content

Commit 655dcdc

Browse files
committed
Fix failing tests
1 parent fbf0312 commit 655dcdc

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ As of **November 1, 2025** the precision and recall of RefactoringMiner on this
507507

508508
| Refactoring Type | TP | FP | FN | Precision | Recall |
509509
|:-----------------------|-----------:|--------:|--------:|--------:|--------:|
510-
|**Total**|3416 | 50 | 120 | 0.986 | 0.966|
510+
|**Total**|3414 | 50 | 120 | 0.986 | 0.966|
511511
|Extract Method|371 | 1 | 4 | 0.997 | 0.989|
512512
|Rename Class|232 | 1 | 2 | 0.996 | 0.991|
513513
|Move Attribute|72 | 0 | 7 | 1.000 | 0.911|
@@ -537,7 +537,7 @@ As of **November 1, 2025** the precision and recall of RefactoringMiner on this
537537
|Replace Variable With Attribute|11 | 0 | 0 | 1.000 | 1.000|
538538
|Replace Attribute With Variable|30 | 0 | 0 | 1.000 | 1.000|
539539
|Change Return Type|166 | 2 | 12 | 0.988 | 0.933|
540-
|Change Variable Type|377 | 7 | 6 | 0.982 | 0.984|
540+
|Change Variable Type|375 | 7 | 6 | 0.982 | 0.984|
541541
|Change Attribute Type|164 | 2 | 4 | 0.988 | 0.976|
542542
|Change Type Declaration Kind| 4 | 0 | 0 | 1.000 | 1.000|
543543
|Replace Pipeline With Loop| 2 | 0 | 0 | 1.000 | 1.000|

src/test/java/org/refactoringminer/test/TestNewDatasetRefactorings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ public void testAllRefactorings() throws Exception {
5050
.or(Refactorings.ReplaceAttributeWithVariable.getValue());
5151
TestBuilder test = new TestBuilder(detector, REPOS, types);
5252
RefactoringPopulator.feedTSERefactoringInstances(test);
53-
test.assertExpectationsWithGitHubAPI(3416, 50, 120);
53+
test.assertExpectationsWithGitHubAPI(3414, 50, 120);
5454
}
5555
}

src/test/java/org/refactoringminer/test/TestRelatedStatementMappingsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void testCustomRunnerMappingsForSlowCommits(String url, String commit, St
189189
//Introduce Equality Method // TODO: Completely new refactoring needed! Replace multiple property checks with a single assertEqual of the entire object
190190
//"https://github.com/JodaOrg/joda-time.git, 119f68ba20f38f7b4b9d676d4a7b787e5e005b89, joda-time-119f68ba20f38f7b4b9d676d4a7b787e5e005b89.txt", // FIXME: Replacements are one-to-one, not one-to-many. Thus, it might be hard to detect this refactoring
191191
//Consolidate Multiple Assertions into a Fluent Assertion
192-
"https://github.com/cbeust/testng.git, 706dcf52c5df3591e7d9d49f0fb980f041fae385, testng-706dcf52c5df3591e7d9d49f0fb980f041fae385.txt", // FIXME: Missing fluent assertion replacements/mappings (InjectBeforeAndAfterMethodsWithTestResultSampleTest.java:46)
192+
"https://github.com/cbeust/testng.git, 706dcf52c5df3591e7d9d49f0fb980f041fae385, testng-706dcf52c5df3591e7d9d49f0fb980f041fae385.txt",
193193
//"https://github.com/dCache/dcache.git, 4a6e55f40f1c, dcache-4a6e55f40f1c.txt", // FIXME: Hamcrest assertion syntax not supported yet
194194
"https://github.com/atlanmod/NeoEMF.git, 0188e9aa280b800710848d68a93af4cb28b050da, NeoEMF-0188e9aa280b800710848d68a93af4cb28b050da.txt", // FIXME: Hamcrest assertion syntax not supported yet
195195
//Replace assertTrue(Double.isInfinite(x)) with assertEqual(Double.POSITIVE_INFINITY, x)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
public after(m Method, r ITestResult) : void -> public after(m Method, r ITestResult) : void
12
public noNameTest() : void -> public noNameTest() : void
23
public noNameTestWithXml() : void -> public noNameTestWithXml() : void
34
public testOnClassFromReporter() : void -> public testOnClassFromReporter() : void

src/test/resources/oracle/tse-dataset/hadoop.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -484,11 +484,6 @@
484484
"description": "Extract Variable\trange0 : CombinedFileRange in method public testSortAndMerge() : void from class org.apache.hadoop.fs.impl.TestVectoredReadUtils",
485485
"validation": false
486486
},
487-
{
488-
"type": "CHANGE_VARIABLE_TYPE",
489-
"description": "Change Variable Type\toutputList : List<CombinedFileRange> to input : List<? extends FileRange> in method private assertOrderedDisjoint(input List<? extends FileRange>, chunkSize int, minimumSeek int) : void from class org.apache.hadoop.fs.impl.TestVectoredReadUtils",
490-
"validation": true
491-
},
492487
{
493488
"type": "REPLACE_VARIABLE_WITH_ATTRIBUTE",
494489
"description": "Replace Variable With Attribute\tpath : Path to vectorPath : Path in method public setup() : void from class org.apache.hadoop.fs.contract.AbstractContractVectoredReadTest",
@@ -1331,11 +1326,6 @@
13311326
"description": "Inline Variable\trangeList : List<FileRange> in method public test_045_vectoredIOHugeFile() : void from class org.apache.hadoop.fs.s3a.scale.AbstractSTestS3AHugeFiles",
13321327
"validation": true
13331328
},
1334-
{
1335-
"type": "CHANGE_VARIABLE_TYPE",
1336-
"description": "Change Variable Type\toutputList : List<CombinedFileRange> to input : List<? extends FileRange> in method private assertOrderedDisjoint(input List<? extends FileRange>, chunkSize int, minimumSeek int) : void from class org.apache.hadoop.fs.impl.TestVectoredReadUtils",
1337-
"validation": true
1338-
},
13391329
{
13401330
"type": "REPLACE_VARIABLE_WITH_ATTRIBUTE",
13411331
"description": "Replace Variable With Attribute\tpath : Path to vectorPath : Path in method public setup() : void from class org.apache.hadoop.fs.contract.AbstractContractVectoredReadTest",

0 commit comments

Comments
 (0)