pouryafard75 / rm-astdiff Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tsantalis/refactoringminer
License: MIT License
This project forked from tsantalis/refactoringminer
License: MIT License
wordpress-mobile/WordPress-Android@2252ed3
shouldShowTagToolbar
-> shouldShowTagToolbar()
infinispan/infinispan@8f446b6
File: server/integration/jgroups/src/test/java/org/jboss/as/clustering/jgroups/subsystem/OperationsTestCase.java -> server/integration/jgroups/src/test/java/org/infinispan/server/jgroups/subsystem/OperationsTestCase.java
readTransportRackOp : ModelNode
readSubsystemDefaultStackOp : ModelNode
readProtocolSocketBindingOp : ModelNode
addStackOpWithParams : ModelNode
writeProtocolSocketBindingOp : ModelNode
writeTransportRackOp : ModelNode
dateFormatter : SimpleDateFormat
2022-10-24 16:02:52 INFO Processing /home/tsantalis/eclipse-workspace/RefactoringMiner 6095e84 ...
Populating File execution: 0 seconds
2022-10-24 16:02:52 INFO RefactoringMiner Started...
2022-10-24 16:03:01 INFO RefactoringMiner ModelDiff execution: 9 seconds
2022-10-24 16:03:01 INFO ModelDiff.getRefactorings() execution time: 0 seconds
2022-10-24 16:03:18 INFO Diff execution: 16 seconds
Exception in thread "main" java.util.NoSuchElementException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1513)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at diffTool.matchers.MultiMappingStore.isDstMultiMapped(MultiMappingStore.java:56)
at diffTool.actions.ChawatheScriptGenerator.generate(ChawatheScriptGenerator.java:91)
at diffTool.actions.ChawatheScriptGenerator.computeActions(ChawatheScriptGenerator.java:49)
at diffTool.actions.SimplifiedChawatheScriptGenerator.computeActions(SimplifiedChawatheScriptGenerator.java:21)
at diffTool.actions.ASTDiff.computeEditScript(ASTDiff.java:59)
at diffTool.diff.ProjectASTDiffer.computeAllEditScripts(ProjectASTDiffer.java:128)
at diffTool.diff.ProjectASTDiffer.diff(ProjectASTDiffer.java:120)
at diffTool.Run.main(Run.java:59)
In class GitHistoryRefactoringMinerImpl
in method populateWithGitHubAPI
in line:
String rawURLInParentCommit = currentRawURL.toString().replace(currentCommitId, parentCommitId).replace(fileName, previousFilename);
In currentRawURL special characters are encoded so fileName was not found
intent.putExtra(INTENT_EXTRA_URL, url.toString());
-> chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);
Commit pockethub/PocketHub@a7401e5 File: LoginActivity.java
hibernate/hibernate-orm@5329bba
hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java
Split Conditional Refactoring:
inheritanceState.hasParents()
should be matched
&& inheritanceState.hasParents()
if ( inheritanceState.hasParents() )
NLPchina/ansj_seg@913704e#diff-37efb71e313d229310c23302fb8788212cafe759abfdcca86e60fbde9deb7c7cL158
model.smartForest.addBranch(key, w); QualifiedName: model.smartForest
smartForest.addBranch(key, w); SimpleName: smartForest
Different AST-Types are causing the problem.
Composite replacement: the resource expressions correspond to extra statements
NLPchina/ansj_seg@913704e#diff-37efb71e313d229310c23302fb8788212cafe759abfdcca86e60fbde9deb7c7cR105
neo4j/neo4j@d3533c1#diff-b32651bf4edb0ff7028d860d1deed635ff9a5ab38b7e422d4bcca2eeccb36124R144
DataInputStream dis = null;
try
{
FileInputStream fis = new FileInputStream(privateKeyFile);
dis = new DataInputStream(fis);
becomes
try(DataInputStream in = new DataInputStream(new FileInputStream(privateKeyFile)))
nutzam/nutz@6599c74#diff-d47d95ef90d7f70d88b06a02d8505b58a81c7c1174c2494e56c9b09d090bc6edL307
apache/giraph@03ade42
if(!conf.isStaticGraph() && !file.delete())
to [if(!conf.isStaticGraph() || serviceWorker.getSuperstep() == BspServiceWorker.INPUT_SUPERSTEP)
, if(!file.delete())
]
While Split to While + If
thymeleaf/thymeleaf@378ba37#diff-fe47a14afb3317314d81d6f5278d04b52ae3ce0d65dedc1d84cb6c40aa3908ceR270-R278
While Split to If + While
apache/drill@711992f#diff-6c459fac9e29d1448e6a4a08041df7c7250f6aed611eaa036a24a529196b490dR148-R151
netty/netty@d31fa31#diff-ac1404c2792cc01bf80c28d4a352a533a9e8d2937e7b97d65d16842e2b7f1ad4L80-L84
linkedin/rest.li@54fa890#diff-ad956a39fb8d6f1ba66cc531080cbc28877e2f10781c2633b0ccc321b69d1c00R231-R234
public onRestRequest(req RestRequest, requestContext RequestContext, wireAttrs Map<String,String>, nextFilter NextFilter<RestRequest,RestResponse>) : void
req.builder().addHeaderValue(HttpConstants.ACCEPT_ENCODING, _acceptEncodingHeader).build();
is extracted to
public addResponseCompressionHeaders(responseCompressionOverride CompressionOption, req RestRequest) : RestRequest
jfinal/jfinal@881baed#diff-e19efa6dd99d3caacc529cb4b7d1038422f5f791ce618b4c6c48cbf9d2ef68e3R112
iluwatar/java-design-patterns@dd971d8
jersey/fab1516773d50bf86d9cc37e2f6db13496f0ecae
core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/JarFileScanner.java
} catch (final IOException e) {
LOGGER.log(Level.CONFIG, "Unable to read the next jar entry.", e);
return false;
} catch (final SecurityException e) {
LOGGER.log(Level.CONFIG, "Unable to read the next jar entry.", e);
return false;
}
becomes
} catch (final IOException | SecurityException e) {
LOGGER.log(Level.CONFIG, LocalizationMessages.JAR_SCANNER_UNABLE_TO_READ_ENTRY(), e);
return false;
}
Graylog2/graylog2-server@2ef067f
facebook/buck@f26d234#diff-8b1672ed0167e6b7a425fbf4a33be8fc18c01a3a79d830495e4835a41797de14R246
apache/cassandra@3566843#diff-a5de948460b9aa759b9c5af1da662661484df0820d82615af7028089a7e87331R87
addthis/hydra@7fea4c9#diff-6e31c93704ae2e71e5bcda132ae0f9cb9d6cca9a0169f14cf32bac7697fc7868R75-R80
kiegroup/drools@1bf2875#diff-59225e3f98b0396f7a4b33b3de9c5c8aeb2369d213e0ee3575c737179e7f7e60R57-R58
ImmutableMap<String, Optional<? extends Element>> deferredElements = deferredElementsBuilder.build();
-> return deferredElements.build();
Given the fact that deferredElements has been renamed to deferredElementsBuilder
Probably we can avoid matching textually similar deferredElements
in those statements.
This came from google/auto@8fc60d8, File BasicAnnotationProcessor.java
wicketstuff/core@8ea46f4
File:FoundationTabTest.java
Reported in tsantalis#417
#46
File: server/integration/jgroups/src/main/java/org/jboss/as/clustering/jgroups/subsystem/RemoteSiteResourceDefinition.java -> server/integration/jgroups/src/main/java/org/infinispan/server/jgroups/subsystem/RemoteSiteResourceDefinition.java
Reported in tsantalis#418
In all buffer.append()
statements, the then
part of the conditional expression is matched with the else
part and vice versa.
Commit: JetBrains/intellij-community@619a601
File: ChooseByNameBase.java
object
sub-expression should match with item
and not itemKey
Note that there is an Extract Variable refactoring for itemKey
Also, in the parent for-loop object
is replaced with item
Maybe this can help to match properly the sub-expressions
case1: iNPUTmice/Conversations@e6cb12d
File: MessageAdapter.java
#50
File: DebugPathSanitizer.java
case3: VoltDB/voltdb@669e072
File: AdHocPlannerWork.java
Reported in tsantalis#420
The fourth argument of the AdHocPlannerWork
Class instance Creation: false
in Line 102 parent version
The seventh argument (the last one) of the makeStoredProcAdHocPlannerWork
method invocation: false
in Line 102 child version
case4: orientechnologies/orientdb@1089957
File:ODatabaseImport.java
case5: Netflix/eureka@f6212a7
File:DiscoveryClient.java
Its two separate 2to1 Mappings:
Thanks to @pedramnoori for providing the last 9 cases.
netty/netty@d31fa31
java.lang.NullPointerException
at org.refactoringminer.astDiff.matchers.ExtendedMultiMappingStore.addMappingRecursively(ExtendedMultiMappingStore.java:197)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.processImports(ProjectASTDiffer.java:912)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.process(ProjectASTDiffer.java:104)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:70)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.diff(ProjectASTDiffer.java:50)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.(ProjectASTDiffer.java:37)
Commit: hazelcast/hazelcast@76d7f5e
The locationInfo for the following leaf mapping seems to be incorrect. The problem is most likely in List<Refactoring> getClassDiffRefactorings
. It probably returns incorrect class.
Extract Method protected startSelectors() : void extracted from public start() : void in class com.hazelcast.client.connection.nio.ClientConnectionManagerImpl
hazelcast-client/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
inSelector.start();
LineRange:158-158 Offset:6860-6879
hazelcast-client/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
inSelector.start();
LineRange:168-168 Offset:7212-7231
Extract Method protected startSelectors() : void extracted from public start() : void in class com.hazelcast.client.connection.nio.ClientConnectionManagerImpl
hazelcast-client/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
outSelector.start();
LineRange:159-159 Offset:6888-6908
hazelcast-client/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
outSelector.start();
LineRange:169-169 Offset:7240-7260
Extract Method protected startSelectors() : void extracted from public start() : void in class com.hazelcast.client.connection.nio.ClientConnectionManagerImpl
hazelcast-client-new/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
inSelector.start();
LineRange:159-159 Offset:6929-6948
hazelcast-client-new/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
inSelector.start();
LineRange:168-168 Offset:7280-7299
Extract Method protected startSelectors() : void extracted from public start() : void in class com.hazelcast.client.connection.nio.ClientConnectionManagerImpl
hazelcast-client-new/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
outSelector.start();
LineRange:160-160 Offset:6957-6977
hazelcast-client-new/src/main/java/com/hazelcast/client/connection/nio/ClientConnectionManagerImpl.java
outSelector.start();
LineRange:169-169 Offset:7308-7328
RevWalk revWalk = new RevWalk(repo);
has been split to statements
RevWalk revWalk = null;
revWalk = new RevWalk(repo);
I thought we were avoiding the unnecessary added/deleted edits around =
and ;
In the case of MergeVariableRefactoring, the types are not mapped properly.
Commit: JetBrains/intellij-community@7655200
File: BreakpointManager.java
infinispan/infinispan@8f446b6
server/integration/jgroups/src/main/java/org/jboss/as/clustering/jgroups/subsystem/RemoteSiteResourceDefinition.java -> server/integration/jgroups/src/main/java/org/infinispan/server/jgroups/subsystem/RemoteSiteResourceDefinition.java
java.util.NoSuchElementException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1513)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at org.refactoringminer.astDiff.matchers.ExtendedMultiMappingStore.getSrcToDstMono(ExtendedMultiMappingStore.java:70)
at org.refactoringminer.astDiff.matchers.ExtendedMultiMappingStore.getMonoMappingStore(ExtendedMultiMappingStore.java:102)
at org.refactoringminer.astDiff.actions.ASTDiff.(ASTDiff.java:27)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.process(ProjectASTDiffer.java:118)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:69)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.diff(ProjectASTDiffer.java:50)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.(ProjectASTDiffer.java:37)
There is a case of Extract Variable with multi-mappings in file
spring-data-neo4j/src/main/java/org/springframework/data/neo4j/repository/query/GraphRepositoryQuery.java
parameters[i]
is extracted from two different places into
Object parameterValue = session.resolveGraphIdFor(parameters[i]);
and
parameterValue = parameters[i];
So, there are 2 pairs of multi-mappings.
While the moved methods are properly indicated, the moved attributes don't have a move tooltip.
private static final Pattern SPLIT_CONDITIONAL_PATTERN = Pattern.compile("(\\|\\|)|(&&)|(\\?)|(:)");
public static final Pattern SPLIT_CONCAT_STRING_PATTERN = Pattern.compile("(\\s)*(\\+)(\\s)*");
moved from
src/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java
to
src/gr/uom/java/xmi/decomposition/StringBasedHeuristics.java
Execution time is also problematic:
2022-10-19 13:40:23 INFO RefactoringMiner Started...
2022-10-19 13:41:24 INFO RefactoringMiner ModelDiff execution: 60 seconds
2022-10-19 13:43:26 INFO Diff execution: 122 seconds
2022-10-19 13:43:27 INFO EditScript execution: 1 seconds
VoltDB/voltdb@669e072
File:TestSystemProcedureSuite.java
project.addLiteralSchema(
"CREATE TABLE WAREHOUSE (\n" +
" W_ID SMALLINT DEFAULT '0' NOT NULL,\n" +
" W_NAME VARCHAR(16) DEFAULT NULL,\n" +
" W_STREET_1 VARCHAR(32) DEFAULT NULL,\n" +
" W_STREET_2 VARCHAR(32) DEFAULT NULL,\n" +
" W_CITY VARCHAR(32) DEFAULT NULL,\n" +
" W_STATE VARCHAR(2) DEFAULT NULL,\n" +
" W_ZIP VARCHAR(9) DEFAULT NULL,\n" +
" W_TAX FLOAT DEFAULT NULL,\n" +
" W_YTD FLOAT DEFAULT NULL,\n" +
" CONSTRAINT W_PK_TREE PRIMARY KEY (W_ID)\n" +
");\n" +
"CREATE TABLE ITEM (\n" +
" I_ID INTEGER DEFAULT '0' NOT NULL,\n" +
" I_IM_ID INTEGER DEFAULT NULL,\n" +
" I_NAME VARCHAR(32) DEFAULT NULL,\n" +
" I_PRICE FLOAT DEFAULT NULL,\n" +
" I_DATA VARCHAR(64) DEFAULT NULL,\n" +
" CONSTRAINT I_PK_TREE PRIMARY KEY (I_ID)\n" +
");\n" +
"CREATE TABLE NEW_ORDER (\n" +
" NO_W_ID SMALLINT DEFAULT '0' NOT NULL\n" +
");\n");
mapped to
project.addLiteralSchema(
"CREATE TABLE WAREHOUSE (\n" +
" W_ID SMALLINT DEFAULT '0' NOT NULL,\n" +
" W_NAME VARCHAR(16) DEFAULT NULL,\n" +
" W_STREET_1 VARCHAR(32) DEFAULT NULL,\n" +
" W_STREET_2 VARCHAR(32) DEFAULT NULL,\n" +
" W_CITY VARCHAR(32) DEFAULT NULL,\n" +
" W_STATE VARCHAR(2) DEFAULT NULL,\n" +
" W_ZIP VARCHAR(9) DEFAULT NULL,\n" +
" W_TAX FLOAT DEFAULT NULL,\n" +
" W_YTD FLOAT DEFAULT NULL,\n" +
" CONSTRAINT W_PK_TREE PRIMARY KEY (W_ID)\n" +
");\n" +
"CREATE TABLE ITEM (\n" +
" I_ID INTEGER DEFAULT '0' NOT NULL,\n" +
" I_IM_ID INTEGER DEFAULT NULL,\n" +
" I_NAME VARCHAR(32) DEFAULT NULL,\n" +
" I_PRICE FLOAT DEFAULT NULL,\n" +
" I_DATA VARCHAR(64) DEFAULT NULL,\n" +
" CONSTRAINT I_PK_TREE PRIMARY KEY (I_ID)\n" +
");\n" +
"CREATE TABLE NEW_ORDER (\n" +
" NO_W_ID SMALLINT DEFAULT '0' NOT NULL\n" +
");\n" +
"CREATE TABLE PAUSE_TEST_TBL (\n" +
" TEST_ID SMALLINT DEFAULT '0' NOT NULL\n" +
");\n");
There are multiple candidates for ");\n"
which seems to be troublesome.
Commit: gwtproject/gwt@e0dda9f
File: MessageDigest.java
Import statement Moved from one file to another and the original file got merged into the new file.
Task :Run.main()
2022-12-13 12:13:27 INFO Processing https://github.com/Graylog2/graylog2-server.git 2ef067fc70055fc4d55c75937303414ddcf07e0e ...
2022-12-13 12:13:28 INFO Connected to GitHub with OAuth token
2022-12-13 12:13:30 INFO Population From GitHub execution: 3 seconds
2022-12-13 12:13:30 INFO RefactoringMiner Started...
2022-12-13 12:13:31 INFO RefactoringMiner ModelDiff execution: 0 seconds
2022-12-13 12:13:32 INFO ModelDiff.getRefactorings() execution time: 0 seconds
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at diffTool.tree.Tree.getChild(Tree.java:74)
at diffTool.matchers.MultiMappingStore.addMappingRecursively(MultiMappingStore.java:296)
at diffTool.matchers.MultiMappingStore.addMappingRecursively(MultiMappingStore.java:296)
at diffTool.diff.ProjectASTDiffer.processPackageDeclaration(ProjectASTDiffer.java:853)
at diffTool.diff.ProjectASTDiffer.process(ProjectASTDiffer.java:191)
at diffTool.diff.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:148)
at diffTool.diff.ProjectASTDiffer.diff(ProjectASTDiffer.java:124)
at diffTool.Run.main(Run.java:62)
NullPointerException in release
branch
phishman3579/java-algorithms-implementation@ab98bca
Exception in thread "main" java.lang.NullPointerException
at ASTDiff.ProjectASTDiffer.processAttributeJavaDoc(ProjectASTDiffer.java:530)
at ASTDiff.ProjectASTDiffer.processFieldDeclaration(ProjectASTDiffer.java:525)
at ASTDiff.ProjectASTDiffer.processClassAttributes(ProjectASTDiffer.java:481)
at ASTDiff.ProjectASTDiffer.processClassDeclarationMapping(ProjectASTDiffer.java:725)
at ASTDiff.ProjectASTDiffer.process(ProjectASTDiffer.java:124)
at ASTDiff.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:98)
at ASTDiff.ProjectASTDiffer.diff(ProjectASTDiffer.java:74)
at ASTDiff.Run.main(Run.java:15)
Dir: community/server/src/main/java/org/neo4j/server/security/
ssl/SslCertificateFactory.java | ssl/Certificates.java |
---|
MultiMappings must be discussed. @tsantalis
checkForTestRoots
. @tsantalis Should we matchtestFolders.addAll(ModuleRootManager.getInstance(srcModule).getSourceRoots(JavaSourceRootType.TEST_SOURCE));
testFolders.addAll(ModuleRootManager.getInstance(module).getSourceRoots(JavaSourceRootType.TEST_SOURCE));
?Two subtrees to be matched:
return Arrays.asList(new Object[][] {
{ new ParameterSet(TimeZone.getTimeZone("UTC") , inputTimeMap, TimeZone.getTimeZone("UTC") , "2014-03-30T04:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("UTC") , inputTimeMap, TimeZone.getTimeZone("CET") , "2014-03-30T02:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("UTC") , "2014-03-30T04:58:47UTS" , "2014-03-30T04:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , inputTimeMap, TimeZone.getTimeZone("UTC") , "2014-03-30T04:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , inputTimeMap, TimeZone.getTimeZone("CET") , "2014-03-30T02:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , "2014-03-30T04:58:47UTS" , "2014-03-30T04:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT+2"), inputTimeMap, TimeZone.getTimeZone("GMT+3") , "2014-03-30T01:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT-2"), inputTimeMap, TimeZone.getTimeZone("GMT+3") , "2014-03-30T01:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT-2"), inputTimeMap, TimeZone.getTimeZone("GMT-3") , "2014-03-30T07:58:47") },
});
&
return Arrays.asList(new Object[][] {
{ new ParameterSet(TimeZone.getTimeZone("UTC") , initTimeMap(), TimeZone.getTimeZone("UTC") , "2014-03-30T10:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("UTC") , initTimeMap(), TimeZone.getTimeZone("CET") , "2014-03-30T08:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("UTC") , "2014-03-30T10:58:47UTS" , "2014-03-30T10:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , initTimeMap(), TimeZone.getTimeZone("UTC") , "2014-03-30T12:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , initTimeMap(), TimeZone.getTimeZone("CET") , "2014-03-30T10:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("CET") , "2014-03-30T10:58:47UTS" , "2014-03-30T10:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT"), initTimeMap(), TimeZone.getTimeZone("GMT") , "2014-03-30T10:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT+2"), initTimeMap(), TimeZone.getTimeZone("GML") , "2014-03-30T12:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT-2"), initTimeMap(), TimeZone.getTimeZone("GMT+3") , "2014-03-30T05:58:47") },
{ new ParameterSet(TimeZone.getTimeZone("GMT-2"), initTimeMap(), TimeZone.getTimeZone("GMT-4") , "2014-03-30T12:58:47") },
});
The problem is shown as highlighted! Must be discussed!!!
Two subtrees to be matched:
switch (ast.getType()) {
case TokenTypes.OBJBLOCK:
case TokenTypes.SLIST:
case TokenTypes.LITERAL_FOR:
case TokenTypes.METHOD_DEF:
case TokenTypes.CTOR_DEF:
case TokenTypes.STATIC_INIT:
case TokenTypes.INSTANCE_INIT:
scopeStack.push(new HashMap<String, DetailAST>());
break;
case TokenTypes.PARAMETER_DEF:
if (ScopeUtils.inInterfaceBlock(ast)
|| inAbstractOrNativeMethod(ast)
|| inLambda(ast)) {
break;
}
case TokenTypes.VARIABLE_DEF:
if (ast.getParent().getType() != TokenTypes.OBJBLOCK
&& shouldCheckEnhancedForLoopVariable(ast)
&& isVariableInForInit(ast)
&& !ast.branchContains(TokenTypes.FINAL)) {
insertVariable(ast);
}
break;
case TokenTypes.IDENT:
final int parentType = ast.getParent().getType();
if (isAssignOperator(parentType)
&& ast.getParent().getFirstChild() == ast) {
removeVariable(ast);
}
break;
default:
}
&
switch (ast.getType()) {
case TokenTypes.OBJBLOCK:
case TokenTypes.SLIST:
case TokenTypes.LITERAL_FOR:
case TokenTypes.METHOD_DEF:
case TokenTypes.CTOR_DEF:
case TokenTypes.STATIC_INIT:
case TokenTypes.INSTANCE_INIT:
scopeStack.push(new HashMap<String, DetailAST>());
break;
case TokenTypes.PARAMETER_DEF:
if (!inLambda(ast)
&& !ast.branchContains(TokenTypes.FINAL)
&& !inAbstractOrNativeMethod(ast)
&& !ScopeUtils.inInterfaceBlock(ast)) {
insertVariable(ast);
}
break;
case TokenTypes.VARIABLE_DEF:
if (ast.getParent().getType() != TokenTypes.OBJBLOCK
&& isVariableInForInit(ast)
&& shouldCheckEnhancedForLoopVariable(ast)
&& !ast.branchContains(TokenTypes.FINAL)) {
insertVariable(ast);
}
break;
case TokenTypes.IDENT:
final int parentType = ast.getParent().getType();
if (isAssignOperator(parentType)
&& ast.getParent().getFirstChild() == ast) {
removeVariable(ast);
}
break;
default:
}
CyanogenMod/android_frameworks_base@910397f
Populating File execution: 0 seconds
2022-12-23 03:50:40 INFO RefactoringMiner Started...
2022-12-23 03:50:46 INFO RefactoringMiner ModelDiff execution: 6 seconds
2022-12-23 03:50:47 INFO ModelDiff.getRefactorings() execution time: 0 seconds
2022-12-23 03:50:59 INFO Diff execution: 11 seconds
2022-12-23 03:51:00 INFO EditScript execution: 0 seconds
[main] INFO org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl - Processing tmp1/TestCases 1da76a369c988da62c3b826d5c97a047a1f1d1e9 ...
[main] INFO org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl - Processing tmp1/TestCases 0ae8f723a59722694e394300656128f9136ef466 ...
[main] INFO org.refactoringminer.astDiff.matchers.ProjectASTDiffer - ModelDiff.getRefactorings() execution time: 0 seconds
[main] WARN org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl - Ignored revision 0ae8f723a59722694e394300656128f9136ef466 due to error
java.lang.NullPointerException
at com.github.gumtreediff.matchers.heuristic.gt.MappingComparators$SiblingsSimilarityMappingComparator.commonDescendantsNb(MappingComparators.java:102)
at com.github.gumtreediff.matchers.heuristic.gt.MappingComparators$SiblingsSimilarityMappingComparator.compare(MappingComparators.java:86)
at com.github.gumtreediff.matchers.heuristic.gt.MappingComparators$FullMappingComparator.compare(MappingComparators.java:49)
at com.github.gumtreediff.matchers.heuristic.gt.MappingComparators$FullMappingComparator.compare(MappingComparators.java:33)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.base/java.util.TimSort.sort(TimSort.java:220)
at java.base/java.util.Arrays.sort(Arrays.java:1515)
at java.base/java.util.ArrayList.sort(ArrayList.java:1750)
at java.base/java.util.Collections.sort(Collections.java:179)
at com.github.gumtreediff.matchers.heuristic.gt.GreedySubtreeMatcher.filterMappings(GreedySubtreeMatcher.java:65)
at com.github.gumtreediff.matchers.heuristic.gt.AbstractSubtreeMatcher.match(AbstractSubtreeMatcher.java:90)
at com.github.gumtreediff.matchers.Matcher.match(Matcher.java:50)
at org.refactoringminer.astDiff.matchers.LeafMatcher.match(LeafMatcher.java:32)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.processLastStepMappings(ProjectASTDiffer.java:135)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.process(ProjectASTDiffer.java:108)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:69)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.diff(ProjectASTDiffer.java:49)
at org.refactoringminer.astDiff.matchers.ProjectASTDiffer.(ProjectASTDiffer.java:36)
at org.refactoringminer.rm1.GitHistoryRefactoringMinerImpl.diffAtCommit(GitHistoryRefactoringMinerImpl.java:1021)
at org.refactoringminer.astDiff.test.testAllCases.initData(testAllCases.java:58)
Commit: JetBrains/intellij-community@7655200
File: BreakpointManager.java
Commit: ReactiveX/RxJava@8ad2260
File: BlockingObservableTest.java
phishman3579/java-algorithms-implementation@ab98bca
In this case an attribute is moved to a newly introduced inner class, and its initializer has an anonymous class declaration.
Task :Run.main()
2022-11-15 01:08:24 INFO Processing /home/tsantalis/eclipse-workspace/RefactoringMiner/tmp1/java-algorithms-implementation f689bf3137fad0ae712e036ed36e00dd3f7cab6b ...
2022-11-15 01:08:24 INFO Processing /home/tsantalis/eclipse-workspace/RefactoringMiner/tmp1/java-algorithms-implementation ab98bcacf6e5bf1c3a06f6bcca68f178f880ffc9 ...
Populating File execution: 0 seconds
2022-11-15 01:08:24 INFO RefactoringMiner Started...
2022-11-15 01:09:42 INFO RefactoringMiner ModelDiff execution: 78 seconds
2022-11-15 01:09:48 INFO ModelDiff.getRefactorings() execution time: 6 seconds
Exception in thread "main" java.lang.NullPointerException
at diffTool.diff.LeafMatcher.pruneTrees(LeafMatcher.java:35)
at diffTool.diff.LeafMatcher.match(LeafMatcher.java:26)
at diffTool.diff.ProjectASTDiffer.processLastStepMappings(ProjectASTDiffer.java:216)
at diffTool.diff.ProjectASTDiffer.process(ProjectASTDiffer.java:206)
at diffTool.diff.ProjectASTDiffer.makeASTDiff(ProjectASTDiffer.java:148)
at diffTool.diff.ProjectASTDiffer.diff(ProjectASTDiffer.java:124)
at diffTool.Run.main(Run.java:58)
opentripplanner/OpenTripPlanner@334dbc7
File: AnalystWorker.java
Method: public AnalystWorker()
this.statsStore = s -> {};
-> this.statsStore = s -> {};
but the {}
part is not mapped.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.