Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 417659

Summary: [dom][ast][1.8] test failures - ast structure - when debug tracing is on
Product: [Eclipse Project] JDT Reporter: Manoj N Palat <manoj.palat>
Component: CoreAssignee: Manoj N Palat <manoj.palat>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, srikanth_sankaran
Version: 4.4   
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Manoj N Palat CLA 2013-09-19 22:23:40 EDT
Following tests fail when the following debug options are on:

org.eclipse.jdt.core/debug/dom/ast=true
org.eclipse.jdt.core/debug/dom/ast/throw= true
org.eclipse.jdt.core/debug/dom/ast/rewrite = true

The failures are listed below:

TypeAnnotationsConverterTests : test0003, test0004, test0005, test0008.
ASTConverter18Test : test0004, test0006, test0015, test399794.
ASTRewritingMethodDeclTest: testListInserts(JLS8), TestMethodReturnTypeChanges2_only_2(
JLS2),TestMethodReturnTypeChanges_only_2 (JLS2).
ASTRewritingTypeAnnotationsTest: testClassInheritenceAnnotations(JLS8).
ASTRewritingReferenceExpressionsTest:
4 failures testRE_test00{1,3,4,5}_since_8


This may be converted to an umbrella bug for better tracking if the patches are grouped for particular sets.
Comment 1 Manoj N Palat CLA 2013-09-24 20:05:37 EDT
(In reply to Manoj Palat from comment #0)
> ASTRewritingMethodDeclTest: testListInserts(JLS8),
> 4 failures testRE_test00{1,3,4,5}_since_8
5 rewrite failures listed above are fixed via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=b42e8d4e3737175b925c20ff2d83cccd857d4944
Comment 2 Manoj N Palat CLA 2013-09-25 05:38:48 EDT
The following were addressed as part of bug 413569 fix
TypeAnnotationsConverterTests : test0008.
ASTConverter18Test :test0015, test399794.

currently these are the remaining failures:

TypeAnnotationsConverterTests : test0003, test0004, test0005.
ASTConverter18Test : test0004, test0006.
ASTRewritingMethodDeclTest: TestMethodReturnTypeChanges2_only_2(JLS2), TestMethodReturnTypeChanges_only_2 (JLS2).
Comment 3 Markus Keller CLA 2013-09-25 06:28:35 EDT
Just to reduce confusion: The commit message for http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=b3031b3455034eac76b444fd20cbebeea6a2f5ff says it's for this bug, but the commit is really for bug 413569 comment 22:
[1.8][dom ast] AST for annotated multi-dimensional array type is not well-formed
Comment 4 Markus Keller CLA 2013-09-25 06:34:16 EDT
> org.eclipse.jdt.core/debug/dom/ast/rewrite

Note that not all of these are necessarily real bugs (but all the fixes from comment 1 are indeed good).

Once the other tests are green, we should add this to AbstractASTTests to enable the first two options out of the box:

	public void setUpSuite() throws Exception {
		super.setUpSuite();
		
		SourceRangeVerifier.DEBUG = true;
		SourceRangeVerifier.DEBUG_THROW = true;
	}
Comment 5 Manoj N Palat CLA 2013-09-25 06:37:34 EDT
(In reply to Markus Keller from comment #3)
> Just to reduce confusion: The commit message for
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=b3031b3455034eac76b444fd20cbebeea6a2f5ff says it's for this bug, but the
> commit is really for bug 413569 comment 22:
> [1.8][dom ast] AST for annotated multi-dimensional array type is not
> well-formed

Oops.. Thanks for correcting this, Markus.
Comment 6 Manoj N Palat CLA 2013-10-08 23:14:24 EDT
(In reply to Manoj Palat from comment #2)
> test0006.

Issue captured in bug 418979
Comment 7 Manoj N Palat CLA 2013-10-16 06:26:22 EDT
(In reply to Manoj Palat from comment #2)

> currently these are the remaining failures:
> 
> TypeAnnotationsConverterTests : test0003, test0004, test0005.
> ASTConverter18Test : test0004, test0006.
> ASTRewritingMethodDeclTest: TestMethodReturnTypeChanges2_only_2(JLS2),
> TestMethodReturnTypeChanges_only_2 (JLS2).

Temporarily disabled these tests via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=a38d26ea4f2f03195744026af44f070900d21cea
Comment 8 Srikanth Sankaran CLA 2013-10-17 07:29:48 EDT
(In reply to Manoj Palat from comment #7)
> (In reply to Manoj Palat from comment #2)
> 
> > currently these are the remaining failures:
> > 
> > TypeAnnotationsConverterTests : test0003, test0004, test0005.
> > ASTConverter18Test : test0004, test0006.
> > ASTRewritingMethodDeclTest: TestMethodReturnTypeChanges2_only_2(JLS2),
> > TestMethodReturnTypeChanges_only_2 (JLS2).
> 
> Temporarily disabled these tests via
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?h=BETA_JAVA8&id=a38d26ea4f2f03195744026af44f070900d21cea

Another bunch of tests Manoj missed are disabled here:
http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=d18a6738cbd421cd821f056cabd3de07c564f224

Please remember to reenable after the fix. TIA.
Comment 9 Manoj N Palat CLA 2013-11-06 10:44:26 EST
(In reply to Srikanth Sankaran from comment #8)

> Please remember to reenable after the fix. TIA.
TypeBindingTests308.java:test016 enabled via commit http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=2077a29bc8cfe42c01e5c07aa5d0c90e2eceb36b

test018 and test020 pending in TypeBindingTests308.java.
Comment 10 Manoj N Palat CLA 2013-11-07 07:53:29 EST
(In reply to Manoj Palat from comment #9)

> TypeBindingTests308.java:test016 enabled via commit ...

which actually fixed the following three tests as well.
TypeAnnotationsConverterTests : test0003, test0004, test0005.

Enabled the above tests and fixed TypeBindingTests308.java:test018 via commit http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=ba2b33c0750d6d7311c1eadcadc15015d0ae8f36

Following Tests have the same issue as listed in bug 418979 comment 4
ASTConverter18Test : test0006
TypeBindingTests308 : test020

Tests to be tracked in this bug is listed below:
ASTConverter18Test : test0004.
ASTRewritingMethodDeclTest: TestMethodReturnTypeChanges2_only_2(JLS2), TestMethodReturnTypeChanges_only_2 (JLS2).
Comment 11 Manoj N Palat CLA 2013-11-25 23:58:18 EST
(In reply to Manoj Palat from comment #10)

> Tests to be tracked in this bug is listed below:
> ASTConverter18Test : test0004.
> ASTRewritingMethodDeclTest: TestMethodReturnTypeChanges2_only_2(JLS2),
> TestMethodReturnTypeChanges_only_2 (JLS2).

Fixed via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=bea7b508525f70d680963772996546f2bcf8018f