Skip to content

Commit 7b77896

Browse files
committed
Correction in benchmark 2. all checkstyle commits validated
1 parent ec588bf commit 7b77896

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Table of Contents
1818
* [Refactoring-aware tooltips](#refactoring-aware-tooltips)
1919
* [Refactoring listing with links to diffs](#refactoring-listing-with-links-to-diffs)
2020
* [Single Page View](#single-page-view)
21-
* [Embedded GitHub Code Review Comments](#embedded-gitHub-code-review-comments)
21+
* [Embedded GitHub Code Review Comments](#embedded-github-code-review-comments)
2222
* [Diff for code moved between different files](#diff-for-code-moved-between-different-files)
2323
* [On-demand diff generation](#on-demand-diff-generation)
2424
* [Javadoc and comment reformatting](#javadoc-and-comment-reformatting)
@@ -223,6 +223,8 @@ Currently, it supports the detection of the following refactorings:
223223
101. Try With Resources
224224
102. Replace Conditional With Ternary
225225
103. Assert Timeout
226+
104. Replace Conditional with Assumption
227+
105. Extract Fixture
226228

227229
# Supported Refactoring Types
228230

@@ -342,11 +344,13 @@ Currently, it supports the detection of the following refactorings:
342344
</details>
343345

344346
<details>
345-
<summary>Test-specific (3)</summary>
347+
<summary>Test-specific (5)</summary>
346348

347349
1. Parameterize Test (JUnit 5 @ParameterizedTest with @ValueSource)
348350
2. Assert Throws
349351
3. Assert Timeout
352+
4. Replace Conditional with Assumption
353+
5. Extract Fixture
350354
</details>
351355

352356
# Contributors
@@ -503,12 +507,13 @@ Moreover, the benchmark has been extended with valid instances for the following
503507
* `Split Method`
504508
* `Replace Anonymous With Class`
505509
* `Move Code`
510+
* `Split Class`
506511

507-
As of **November 11, 2025** the precision and recall of RefactoringMiner on this benchmark is:
512+
As of **November 13, 2025** the precision and recall of RefactoringMiner on this benchmark is:
508513

509514
| Refactoring Type | TP | FP | FN | Precision | Recall |
510515
|:-----------------------|-----------:|--------:|--------:|--------:|--------:|
511-
|**Total**|3432 | 48 | 92 | 0.986 | 0.974|
516+
|**Total**|3434 | 47 | 91 | 0.986 | 0.974|
512517
|Extract Method|371 | 1 | 4 | 0.997 | 0.989|
513518
|Rename Class|233 | 0 | 1 | 1.000 | 0.996|
514519
|Move Attribute|72 | 0 | 7 | 1.000 | 0.911|
@@ -530,10 +535,10 @@ As of **November 11, 2025** the precision and recall of RefactoringMiner on this
530535
|Extract And Move Method|123 | 2 | 5 | 0.984 | 0.961|
531536
|Move And Inline Method|29 | 1 | 6 | 0.967 | 0.829|
532537
|Replace Anonymous With Class| 5 | 0 | 0 | 1.000 | 1.000|
533-
|Extract Variable|290 | 1 | 9 | 0.997 | 0.970|
538+
|Extract Variable|290 | 1 | 8 | 0.997 | 0.973|
534539
|Extract Attribute| 3 | 0 | 0 | 1.000 | 1.000|
535540
|Inline Variable|127 | 0 | 12 | 1.000 | 0.914|
536-
|Rename Variable|304 | 6 | 8 | 0.981 | 0.974|
541+
|Rename Variable|305 | 5 | 8 | 0.984 | 0.974|
537542
|Rename Attribute|107 | 4 | 8 | 0.964 | 0.930|
538543
|Replace Variable With Attribute|11 | 0 | 0 | 1.000 | 1.000|
539544
|Replace Attribute With Variable|30 | 0 | 0 | 1.000 | 1.000|
@@ -542,6 +547,7 @@ As of **November 11, 2025** the precision and recall of RefactoringMiner on this
542547
|Change Attribute Type|164 | 2 | 3 | 0.988 | 0.982|
543548
|Change Type Declaration Kind| 4 | 0 | 0 | 1.000 | 1.000|
544549
|Replace Pipeline With Loop| 2 | 0 | 0 | 1.000 | 1.000|
550+
|Split Class| 1 | 0 | 0 | 1.000 | 1.000|
545551
|Merge Method| 1 | 0 | 0 | 1.000 | 1.000|
546552
|Split Method| 8 | 0 | 0 | 1.000 | 1.000|
547553
|Move Code|12 | 0 | 0 | 1.000 | 1.000|

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ public void testAllRefactorings() throws Exception {
4848
.or(Refactorings.ReplacePipelineWithLoop.getValue())
4949
.or(Refactorings.ReplaceVariableWithAttribute.getValue())
5050
.or(Refactorings.ReplaceAttributeWithVariable.getValue())
51-
.or(Refactorings.MoveCode.getValue());
51+
.or(Refactorings.MoveCode.getValue())
52+
.or(Refactorings.SplitClass.getValue());
5253
TestBuilder test = new TestBuilder(detector, REPOS, types);
5354
RefactoringPopulator.feedTSERefactoringInstances(test);
54-
test.assertExpectationsWithGitHubAPI(3432, 48, 92);
55+
test.assertExpectationsWithGitHubAPI(3434, 47, 91);
5556
}
5657
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@
929929
{
930930
"type": "RENAME_VARIABLE",
931931
"description": "Rename Variable\tembeddedExpressionEnd : DetailAstImpl to stringTemplateMiddle : DetailAstImpl in method private buildStringTemplateMiddle(ctx JavaLanguageParser.StringTemplateMiddleContext) : DetailAstImpl from class com.puppycrawl.tools.checkstyle.JavaAstVisitor",
932-
"validation": false
932+
"validation": true
933933
}
934934
]
935935
},
@@ -1047,7 +1047,7 @@
10471047
{
10481048
"type": "EXTRACT_VARIABLE",
10491049
"description": "Extract Variable\tfilePath : File in method public testWithCheckNotHavingTreeWalkerAsParent() : void from class com.puppycrawl.tools.checkstyle.TreeWalkerTest",
1050-
"validation": true
1050+
"validation": false
10511051
}
10521052
],
10531053
"baseline": []

0 commit comments

Comments
 (0)