Google Groups

Re: [incquery-users] How to serialise a generated PatternModel


Jan Reimann Oct 26, 2012 1:12 AM
Posted in group: EMF-IncQuery Users
Hi Zoltán,
thanks for your answer
 
Basically, there are some issues you should be aware of when using EMF-IncQuery this way:
 * Be careful when instantiating Variables - as local variables (the ones contained in the PatternBody objects) are created automatically using a derived feature - so there is no need to create that manually for the defined variable references.
So how can I do this instead then?
 
 * We have some issues in test environments when our patternlanguage.emf.ui project is loaded in the Run configuration. Consider unloading them if not needed.

I don't have dependencies to ui plugins since I'm running a standalone JUnit test.
 
I did not have time to set up your environment yet, so it is quite possible that I have missed something. If my ideas were not helpful to you, could you please attach the "strange error messages" to get a better understanding of your problem?

It would be very nice if some of you guys could have a look at my setting. I assume reason for failing is my way of creating the pattern model programmatically since a reference cannot be resolved as can be seen in the following stacktrace I get when executing the test case:

0    [main] ERROR xt.linking.lazy.LazyLinkingResource  - resolution of uriFragment 'xtextLink_::0.2.0::0::/2' failed.
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.resolveShortFragment(LazyURIEncoder.java:101)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.decode(LazyURIEncoder.java:89)
    at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:166)
    at org.eclipse.xtext.xbase.resource.XbaseResource.access$0(XbaseResource.java:1)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:239)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:1)
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:124)
    at org.eclipse.xtext.xbase.resource.XbaseResource.getEObject(XbaseResource.java:237)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:203)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:263)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1483)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.PackageImportImpl.getEPackage(PackageImportImpl.java:76)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_PackageImport(AbstractEMFPatternLanguageSemanticSequencer.java:1221)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:119)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_EMFPatternModel(AbstractEMFPatternLanguageSemanticSequencer.java:1197)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:125)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
    at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:316)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1423)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:992)
    at org.emftext.refactoring.matching.incquery.CopyOfIncQueryTest.generatePatternTest(CopyOfIncQueryTest.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
16   [main] ERROR xt.linking.lazy.LazyLinkingResource  - resolution of uriFragment 'xtextLink_::0.2.0::0::/2' failed.
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.resolveShortFragment(LazyURIEncoder.java:101)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.decode(LazyURIEncoder.java:89)
    at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:166)
    at org.eclipse.xtext.xbase.resource.XbaseResource.access$0(XbaseResource.java:1)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:239)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:1)
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:124)
    at org.eclipse.xtext.xbase.resource.XbaseResource.getEObject(XbaseResource.java:237)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:207)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:263)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1483)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.PackageImportImpl.getEPackage(PackageImportImpl.java:76)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_PackageImport(AbstractEMFPatternLanguageSemanticSequencer.java:1221)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:119)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_EMFPatternModel(AbstractEMFPatternLanguageSemanticSequencer.java:1197)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:125)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
    at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:316)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1423)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:992)
    at org.emftext.refactoring.matching.incquery.CopyOfIncQueryTest.generatePatternTest(CopyOfIncQueryTest.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
80904 [main] ERROR xt.linking.lazy.LazyLinkingResource  - resolution of uriFragment 'xtextLink_::0.1.0.3.0.1::1::/2' failed.
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.resolveShortFragment(LazyURIEncoder.java:101)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.decode(LazyURIEncoder.java:89)
    at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:166)
    at org.eclipse.xtext.xbase.resource.XbaseResource.access$0(XbaseResource.java:1)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:239)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:1)
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:124)
    at org.eclipse.xtext.xbase.resource.XbaseResource.getEObject(XbaseResource.java:237)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:203)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:263)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1483)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.ClassTypeImpl.getClassname(ClassTypeImpl.java:77)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.ClassTypeImpl.eGet(ClassTypeImpl.java:121)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1021)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1013)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1008)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer$SerializableObject.<init>(BacktrackingSemanticSequencer.java:146)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:412)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_Type(AbstractEMFPatternLanguageSemanticSequencer.java:1240)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:97)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:222)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:401)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.core.serializer.AbstractPatternLanguageSemanticSequencer.sequence_Parameter(AbstractPatternLanguageSemanticSequencer.java:1329)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:291)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.core.serializer.AbstractPatternLanguageSemanticSequencer.sequence_Pattern(AbstractPatternLanguageSemanticSequencer.java:1431)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:251)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_EMFPatternModel(AbstractEMFPatternLanguageSemanticSequencer.java:1197)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:125)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
    at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:316)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1423)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:992)
    at org.emftext.refactoring.matching.incquery.CopyOfIncQueryTest.generatePatternTest(CopyOfIncQueryTest.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
80919 [main] ERROR xt.linking.lazy.LazyLinkingResource  - resolution of uriFragment 'xtextLink_::0.1.0.3.0.1::1::/2' failed.
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
    at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.resolveShortFragment(LazyURIEncoder.java:101)
    at org.eclipse.xtext.linking.lazy.LazyURIEncoder.decode(LazyURIEncoder.java:89)
    at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:166)
    at org.eclipse.xtext.xbase.resource.XbaseResource.access$0(XbaseResource.java:1)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:239)
    at org.eclipse.xtext.xbase.resource.XbaseResource$2.exec(XbaseResource.java:1)
    at org.eclipse.xtext.util.OnChangeEvictingCache.execWithoutCacheClear(OnChangeEvictingCache.java:124)
    at org.eclipse.xtext.xbase.resource.XbaseResource.getEObject(XbaseResource.java:237)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:219)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:207)
    at org.eclipse.emf.ecore.util.EcoreUtil.resolve(EcoreUtil.java:263)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eResolveProxy(BasicEObjectImpl.java:1483)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.ClassTypeImpl.getClassname(ClassTypeImpl.java:77)
    at org.eclipse.viatra2.patternlanguage.eMFPatternLanguage.impl.ClassTypeImpl.eGet(ClassTypeImpl.java:121)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1021)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1013)
    at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1008)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer$SerializableObject.<init>(BacktrackingSemanticSequencer.java:146)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:412)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_Type(AbstractEMFPatternLanguageSemanticSequencer.java:1240)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:97)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:222)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:401)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.core.serializer.AbstractPatternLanguageSemanticSequencer.sequence_Parameter(AbstractPatternLanguageSemanticSequencer.java:1329)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:291)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.core.serializer.AbstractPatternLanguageSemanticSequencer.sequence_Pattern(AbstractPatternLanguageSemanticSequencer.java:1431)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:251)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
    at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:394)
    at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:439)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.sequence_EMFPatternModel(AbstractEMFPatternLanguageSemanticSequencer.java:1197)
    at org.eclipse.viatra2.patternlanguage.serializer.AbstractEMFPatternLanguageSemanticSequencer.createSequence(AbstractEMFPatternLanguageSemanticSequencer.java:125)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
    at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
    at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:316)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1423)
    at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:992)
    at org.emftext.refactoring.matching.incquery.CopyOfIncQueryTest.generatePatternTest(CopyOfIncQueryTest.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)