Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Parent Child Relationships and lambdas #1100

Closed
arturbosch opened this issue Jan 10, 2017 · 0 comments
Closed

Wrong Parent Child Relationships and lambdas #1100

arturbosch opened this issue Jan 10, 2017 · 0 comments

Comments

@arturbosch
Copy link
Contributor

arturbosch commented Jan 10, 2017

In elasticsearch there is one file (file.zip)
which throws following error.

2017-01-10 14:24:40,716 WARN   [de.unibremen.st.ismell.detection.SpoonLauncher] : Error while building spoon model 
java.lang.IllegalStateException: java.util.function.Function<org.elasticsearch.tasks.TaskId, ? extends java.lang.Iterable<? extends java.lang.Throwable>> is set as child of
Element: org.elasticsearch.action.admin.cluster.node.tasks.TasksIT#lambda$50(org.elasticsearch.tasks.TaskId)
Signature: spoon.support.reflect.reference.CtExecutableReferenceImpl@1
Class: class spoon.support.reflect.reference.CtExecutableReferenceImpl
however it is visited as a child of
Element: ( id) -> {
    java.lang.Exception e = expectThrows(java.lang.Exception.class, () -> client().admin().cluster().prepareGetTask(id).setWaitForCompletion(true).setTimeout(timeValueMillis(100)).get());
    return java.util.Collections.singleton(e);
}
Signature: spoon.support.reflect.code.CtLambdaImpl@1c20d099
Class: class spoon.support.reflect.code.CtLambdaImpl

	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:32)
	at spoon.reflect.visitor.CtScanner.visitCtLambda(CtScanner.java:589)
	at spoon.support.reflect.code.CtLambdaImpl.accept(CtLambdaImpl.java:50)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtInvocation(CtScanner.java:479)
	at spoon.support.reflect.code.CtInvocationImpl.accept(CtInvocationImpl.java:48)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtBlock(CtScanner.java:270)
	at spoon.support.reflect.code.CtBlockImpl.accept(CtBlockImpl.java:45)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.visitCtMethod(CtScanner.java:535)
	at spoon.support.reflect.declaration.CtMethodImpl.accept(CtMethodImpl.java:62)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtClass(CtScanner.java:306)
	at spoon.support.reflect.declaration.CtClassImpl.accept(CtClassImpl.java:62)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:628)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:148)
	at spoon.reflect.visitor.AstParentConsistencyChecker.scan(AstParentConsistencyChecker.java:36)
	at spoon.reflect.visitor.CtScanner.scan(CtScanner.java:137)
	at spoon.reflect.visitor.CtScanner.visitCtPackage(CtScanner.java:627)
	at spoon.support.reflect.declaration.CtPackageImpl.accept(CtPackageImpl.java:47)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.checkModel(JDTBasedSpoonCompiler.java:134)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:128)
	at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:102)
	at spoon.Launcher.buildModel(Launcher.java:700)
	at de.unibremen.st.ismell.detection.SpoonLauncher.build(SpoonLauncher.java:124)
	at de.unibremen.st.ismell.Analyzer.analyzeCurrentVersion(Analyzer.java:111)
	at de.unibremen.st.ismell.Analyzer.run(Analyzer.java:100)
	at de.unibremen.st.ismell.Runner.main(Runner.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
msteinbeck pushed a commit to msteinbeck/spoon that referenced this issue Jan 11, 2017
@msteinbeck msteinbeck mentioned this issue Jan 11, 2017
@surli surli closed this as completed in c17598e Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant