View | Details | Raw Unified | Return to bug 42253 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java (+1 lines)
Lines 1897-1902 Link Here
1897
		"import p2.*;\n" + 
1897
		"import p2.*;\n" + 
1898
		"public class X {\n" + 
1898
		"public class X {\n" + 
1899
		"  public void bar(){\n" + 
1899
		"  public void bar(){\n" + 
1900
		"    System.out.println();\n" + 
1900
		"  }\n" + 
1901
		"  }\n" + 
1901
		"}\n",
1902
		"}\n",
1902
		participant.ast
1903
		participant.ast
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java (-1 / +1 lines)
Lines 105-111 Link Here
105
	}
105
	}
106
106
107
	static {
107
	static {
108
//		TESTS_NAMES = new String[] {"test0602"};
108
//		TESTS_NAMES = new String[] {"test0577"};
109
//		TESTS_NUMBERS =  new int[] { 624 };
109
//		TESTS_NUMBERS =  new int[] { 624 };
110
	}
110
	}
111
	public static Test suite() {
111
	public static Test suite() {
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java (-1 / +1 lines)
Lines 42-48 Link Here
42
	}
42
	}
43
43
44
	static {
44
	static {
45
//		TESTS_NAMES = new String[] {"test0577"};
45
//		TESTS_NAMES = new String[] {"test0472"};
46
//		TESTS_NUMBERS =  new int[] { 606 };
46
//		TESTS_NUMBERS =  new int[] { 606 };
47
	}
47
	}
48
	public static Test suite() {
48
	public static Test suite() {
(-)src/org/eclipse/jdt/core/tests/dom/RunConverterTests.java (-1 / +2 lines)
Lines 31-37 Link Here
31
		ASTConverter15Test.class,
31
		ASTConverter15Test.class,
32
		ASTConverterAST3Test.class,
32
		ASTConverterAST3Test.class,
33
		ASTConverterTestAST3_2.class,
33
		ASTConverterTestAST3_2.class,
34
		ASTConverterBindingsTest.class
34
		ASTConverterBindingsTest.class,
35
		ASTConverterRecoveryTest.class
35
	};
36
	};
36
}
37
}
37
public static Test suite() {
38
public static Test suite() {
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java (-1 / +1 lines)
Lines 8109-8115 Link Here
8109
		assertNotNull("No compilation unit", result); //$NON-NLS-1$
8109
		assertNotNull("No compilation unit", result); //$NON-NLS-1$
8110
		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
8110
		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
8111
		CompilationUnit compilationUnit = (CompilationUnit) result;
8111
		CompilationUnit compilationUnit = (CompilationUnit) result;
8112
		assertEquals("No errors found", 3, compilationUnit.getMessages().length); //$NON-NLS-1$
8112
		assertEquals("No errors found", 4, compilationUnit.getMessages().length); //$NON-NLS-1$
8113
		ASTNode node = getASTNode(compilationUnit, 0, 0);
8113
		ASTNode node = getASTNode(compilationUnit, 0, 0);
8114
		assertNotNull("not null", node); //$NON-NLS-1$
8114
		assertNotNull("not null", node); //$NON-NLS-1$
8115
		assertTrue("not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
8115
		assertTrue("not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java (-1 / +1 lines)
Lines 8277-8283 Link Here
8277
		assertNotNull("No compilation unit", result); //$NON-NLS-1$
8277
		assertNotNull("No compilation unit", result); //$NON-NLS-1$
8278
		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
8278
		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
8279
		CompilationUnit compilationUnit = (CompilationUnit) result;
8279
		CompilationUnit compilationUnit = (CompilationUnit) result;
8280
		assertEquals("No errors found", 3, compilationUnit.getMessages().length); //$NON-NLS-1$
8280
		assertEquals("No errors found", 4, compilationUnit.getMessages().length); //$NON-NLS-1$
8281
		ASTNode node = getASTNode(compilationUnit, 0, 0);
8281
		ASTNode node = getASTNode(compilationUnit, 0, 0);
8282
		assertNotNull("not null", node); //$NON-NLS-1$
8282
		assertNotNull("not null", node); //$NON-NLS-1$
8283
		assertTrue("not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
8283
		assertTrue("not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
(-)src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java (+1 lines)
Lines 54-59 Link Here
54
	
54
	
55
	static {
55
	static {
56
//		TESTS_NUMBERS = new int[] { 609 } ;
56
//		TESTS_NUMBERS = new int[] { 609 } ;
57
//		TESTS_NAMES = new String[]{ "test123"};
57
	}
58
	}
58
	public static Test suite() {
59
	public static Test suite() {
59
		return buildTestSuite(FormatterRegressionTests.class);
60
		return buildTestSuite(FormatterRegressionTests.class);
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java (+251 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.jdt.core.tests.dom;
12
13
import java.util.List;
14
15
import junit.framework.Test;
16
17
import org.eclipse.jdt.core.ICompilationUnit;
18
import org.eclipse.jdt.core.JavaModelException;
19
import org.eclipse.jdt.core.dom.AST;
20
import org.eclipse.jdt.core.dom.ASTNode;
21
import org.eclipse.jdt.core.dom.Block;
22
import org.eclipse.jdt.core.dom.CompilationUnit;
23
import org.eclipse.jdt.core.dom.Expression;
24
import org.eclipse.jdt.core.dom.ExpressionStatement;
25
import org.eclipse.jdt.core.dom.ITypeBinding;
26
import org.eclipse.jdt.core.dom.MethodDeclaration;
27
import org.eclipse.jdt.core.dom.MethodInvocation;
28
import org.eclipse.jdt.core.dom.NumberLiteral;
29
import org.eclipse.jdt.core.dom.Statement;
30
31
public class ASTConverterRecoveryTest extends ConverterTestSetup {
32
	
33
	public void setUpSuite() throws Exception {
34
		super.setUpSuite();
35
		this.ast = AST.newAST(AST.JLS3);
36
	}
37
38
	public ASTConverterRecoveryTest(String name) {
39
		super(name);
40
	}
41
42
	static {
43
		TESTS_NAMES = new String[] {"test0003"};
44
//		TESTS_NUMBERS =  new int[] { 624 };
45
	}
46
	public static Test suite() {
47
		return buildTestSuite(ASTConverterRecoveryTest.class);
48
	}
49
	
50
	public void test0001() throws JavaModelException {
51
		this.workingCopies = new ICompilationUnit[1];
52
		this.workingCopies[0] = getWorkingCopy(
53
			"/Converter/src/test/X.java",
54
			"package test;\n"+
55
			"\n"+
56
			"public class X {\n"+
57
			"	void foo() {\n"+
58
			"	    bar(0)\n"+
59
			"	    baz(1);\n"+
60
			"	}\n"+
61
			"}\n");
62
		
63
		char[] source = this.workingCopies[0].getSource().toCharArray();
64
		ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true);
65
		
66
		assertASTNodeEquals(
67
			"package test;\n" + 
68
			"public class X {\n" + 
69
			"  void foo(){\n" + 
70
			"    bar(0);\n" + 
71
			"    baz(1);\n" + 
72
			"  }\n" + 
73
			"}\n",
74
			result);
75
		
76
		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
77
		assertNotNull(node);
78
		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
79
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
80
		Block block = methodDeclaration.getBody();
81
		List statements = block.statements();
82
		assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$
83
		Statement statement = (Statement) statements.get(0);
84
		assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
85
		ExpressionStatement expressionStatement = (ExpressionStatement) statement;
86
		checkSourceRange(expressionStatement, "bar(0)", source); //$NON-NLS-1$
87
		Expression expression = expressionStatement.getExpression();
88
		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
89
		MethodInvocation methodInvocation = (MethodInvocation) expression;
90
		checkSourceRange(methodInvocation, "bar(0)", source); //$NON-NLS-1$
91
		List list = methodInvocation.arguments();
92
		assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$
93
		Expression parameter = (Expression) list.get(0);
94
		assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$
95
		ITypeBinding typeBinding = parameter.resolveTypeBinding();
96
		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
97
		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
98
		checkSourceRange(parameter, "0", source); //$NON-NLS-1$
99
		Statement statement2 = (Statement) statements.get(1);
100
		assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
101
		ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2;
102
		checkSourceRange(expressionStatement2, "baz(1);", source); //$NON-NLS-1$
103
		Expression expression2 = expressionStatement2.getExpression();
104
		assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
105
		MethodInvocation methodInvocation2 = (MethodInvocation) expression2;
106
		checkSourceRange(methodInvocation2, "baz(1)", source); //$NON-NLS-1$
107
		List list2 = methodInvocation2.arguments();
108
		assertTrue("Parameter list is empty", list2.size() == 1); //$NON-NLS-1$
109
		Expression parameter2 = (Expression) list2.get(0);
110
		assertTrue("Not a number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$
111
		ITypeBinding typeBinding2 = parameter2.resolveTypeBinding();
112
		assertNotNull("No binding", typeBinding2); //$NON-NLS-1$
113
		assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
114
		checkSourceRange(parameter2, "1", source); //$NON-NLS-1$
115
	}
116
	
117
	public void test0002() throws JavaModelException {
118
		this.workingCopies = new ICompilationUnit[1];
119
		this.workingCopies[0] = getWorkingCopy(
120
			"/Converter/src/test/X.java",
121
			"package test;\n"+
122
			"\n"+
123
			"public class X {\n"+
124
			"	void foo() {\n"+
125
			"	    baz(0);\n"+
126
			"	    bar(1,\n"+
127
			"	}\n"+
128
			"}\n");
129
		
130
		char[] source = this.workingCopies[0].getSource().toCharArray();
131
		ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true);
132
		
133
		assertASTNodeEquals(
134
			"package test;\n" + 
135
			"public class X {\n" + 
136
			"  void foo(){\n" + 
137
			"    baz(0);\n" + 
138
			"    bar(1);\n" + 
139
			"  }\n" + 
140
			"}\n",
141
			result);
142
		
143
		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
144
		assertNotNull(node);
145
		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
146
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
147
		Block block = methodDeclaration.getBody();
148
		List statements = block.statements();
149
		assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$
150
		Statement statement = (Statement) statements.get(0);
151
		assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
152
		ExpressionStatement expressionStatement = (ExpressionStatement) statement;
153
		checkSourceRange(expressionStatement, "baz(0);", source); //$NON-NLS-1$
154
		Expression expression = expressionStatement.getExpression();
155
		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
156
		MethodInvocation methodInvocation = (MethodInvocation) expression;
157
		checkSourceRange(methodInvocation, "baz(0)", source); //$NON-NLS-1$
158
		List list = methodInvocation.arguments();
159
		assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$
160
		Expression parameter = (Expression) list.get(0);
161
		assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$
162
		ITypeBinding typeBinding = parameter.resolveTypeBinding();
163
		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
164
		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
165
		checkSourceRange(parameter, "0", source); //$NON-NLS-1$
166
		Statement statement2 = (Statement) statements.get(1);
167
		assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
168
		ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2;
169
		checkSourceRange(expressionStatement2, "bar(1", source); //$NON-NLS-1$
170
		Expression expression2 = expressionStatement2.getExpression();
171
		assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
172
		MethodInvocation methodInvocation2 = (MethodInvocation) expression2;
173
		checkSourceRange(methodInvocation2, "bar(1", source); //$NON-NLS-1$
174
		List list2 = methodInvocation2.arguments();
175
		assertTrue("Parameter list is empty", list2.size() == 1); //$NON-NLS-1$
176
		Expression parameter2 = (Expression) list2.get(0);
177
		assertTrue("Not a number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$
178
		ITypeBinding typeBinding2 = parameter2.resolveTypeBinding();
179
		assertNotNull("No binding", typeBinding2); //$NON-NLS-1$
180
		assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
181
		checkSourceRange(parameter2, "1", source); //$NON-NLS-1$
182
	}
183
	
184
	public void test0003() throws JavaModelException {
185
		this.workingCopies = new ICompilationUnit[1];
186
		this.workingCopies[0] = getWorkingCopy(
187
			"/Converter/src/test/X.java",
188
			"package test;\n"+
189
			"\n"+
190
			"public class X {\n"+
191
			"	void foo() {\n"+
192
			"	    baz(0);\n"+
193
			"	    bar(1,\n"+
194
			"	    foo(3);\n"+
195
			"	}\n"+
196
			"}\n");
197
		
198
		char[] source = this.workingCopies[0].getSource().toCharArray();
199
		ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true);
200
		
201
		assertASTNodeEquals(
202
			"package test;\n" + 
203
			"public class X {\n" + 
204
			"  void foo(){\n" + 
205
			"    baz(0);\n" + 
206
			"    bar(1,foo(3));\n" + 
207
			"  }\n" + 
208
			"}\n",
209
			result);
210
		
211
		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
212
		assertNotNull(node);
213
		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
214
		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
215
		Block block = methodDeclaration.getBody();
216
		List statements = block.statements();
217
		assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$
218
		Statement statement = (Statement) statements.get(0);
219
		assertTrue("Not an expression statement", statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
220
		ExpressionStatement expressionStatement = (ExpressionStatement) statement;
221
		checkSourceRange(expressionStatement, "baz(0);", source); //$NON-NLS-1$
222
		Expression expression = expressionStatement.getExpression();
223
		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
224
		MethodInvocation methodInvocation = (MethodInvocation) expression;
225
		checkSourceRange(methodInvocation, "baz(0)", source); //$NON-NLS-1$
226
		List list = methodInvocation.arguments();
227
		assertTrue("Parameter list is empty", list.size() == 1); //$NON-NLS-1$
228
		Expression parameter = (Expression) list.get(0);
229
		assertTrue("Not a number", parameter instanceof NumberLiteral); //$NON-NLS-1$
230
		ITypeBinding typeBinding = parameter.resolveTypeBinding();
231
		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
232
		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
233
		checkSourceRange(parameter, "0", source); //$NON-NLS-1$
234
		Statement statement2 = (Statement) statements.get(1);
235
		assertTrue("Not an expression statement", statement2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
236
		ExpressionStatement expressionStatement2 = (ExpressionStatement) statement2;
237
		checkSourceRange(expressionStatement2, "bar(1,\n\t    foo(3);", source); //$NON-NLS-1$
238
		Expression expression2 = expressionStatement2.getExpression();
239
		assertTrue("Not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
240
		MethodInvocation methodInvocation2 = (MethodInvocation) expression2;
241
		checkSourceRange(methodInvocation2, "bar(1,\n\t    foo(3)", source); //$NON-NLS-1$
242
		List list2 = methodInvocation2.arguments();
243
		assertTrue("Parameter list is empty", list2.size() == 2); //$NON-NLS-1$
244
		Expression parameter2 = (Expression) list2.get(0);
245
		assertTrue("Not a Number", parameter2 instanceof NumberLiteral); //$NON-NLS-1$
246
		parameter2 = (Expression) list2.get(1);
247
		assertTrue("Not a method invocation", parameter2 instanceof MethodInvocation); //$NON-NLS-1$
248
		MethodInvocation methodInvocation3 = (MethodInvocation) parameter2;
249
		checkSourceRange(methodInvocation3, "foo(3)", source); //$NON-NLS-1$
250
	}
251
}
(-)src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java (+1 lines)
Lines 901-906 Link Here
901
		"    super();\n" + 
901
		"    super();\n" + 
902
		"  }\n" + 
902
		"  }\n" + 
903
		"  void foo() {\n" + 
903
		"  void foo() {\n" + 
904
		"    Object o = (Y<Z>.W<U>) e;\n" + 
904
		"  }\n" + 
905
		"  }\n" + 
905
		"}\n";
906
		"}\n";
906
907
(-)src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java (+1 lines)
Lines 47-52 Link Here
47
		testClasses.add(GenericDietRecoveryTest.class);
47
		testClasses.add(GenericDietRecoveryTest.class);
48
		testClasses.add(EnumDietRecoveryTest.class);
48
		testClasses.add(EnumDietRecoveryTest.class);
49
		testClasses.add(AnnotationDietRecoveryTest.class);
49
		testClasses.add(AnnotationDietRecoveryTest.class);
50
		testClasses.add(StatementRecoveryTest.class);
50
		
51
		
51
		/* source element parser tests */
52
		/* source element parser tests */
52
		testClasses.add(SourceElementParserTest.class);
53
		testClasses.add(SourceElementParserTest.class);
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java (-6 / +31 lines)
Lines 20-30 Link Here
20
	}
20
	}
21
	// Static initializer to specify tests subset using TESTS_* static variables
21
	// Static initializer to specify tests subset using TESTS_* static variables
22
	// All specified tests which does not belong to the class are skipped...
22
	// All specified tests which does not belong to the class are skipped...
23
//	static {
23
	static {
24
//		TESTS_NAMES = new String[] { "test000" };
24
//		TESTS_NAMES = new String[] { "test0021" };
25
//		TESTS_NUMBERS = new int[] { 50 };
25
//		TESTS_NUMBERS = new int[] { 50 };
26
//		TESTS_RANGE = new int[] { 21, 50 };
26
//		TESTS_RANGE = new int[] { 21, 50 };
27
//	}
27
	}
28
	public static Test suite() {
28
	public static Test suite() {
29
		return buildTestSuite(testClass());
29
		return buildTestSuite(testClass());
30
	}
30
	}
Lines 494-499 Link Here
494
		"	assert true;\n" + 
494
		"	assert true;\n" + 
495
		"	^^^^^^\n" + 
495
		"	^^^^^^\n" + 
496
		"Syntax error on token \"assert\", AssignmentOperator expected after this token\n" + 
496
		"Syntax error on token \"assert\", AssignmentOperator expected after this token\n" + 
497
		"----------\n" + 
498
		"3. ERROR in X.java (at line 3)\n" + 
499
		"	assert true;\n" + 
500
		"	^^^^^^\n" + 
501
		"assert cannot be resolved\n" + 
497
		"----------\n";
502
		"----------\n";
498
	String expected14ProblemLog =
503
	String expected14ProblemLog =
499
		"";
504
		"";
Lines 609-615 Link Here
609
		"	    ^^^^^^^^^^^\n" + 
614
		"	    ^^^^^^^^^^^\n" + 
610
		"Syntax error, \'for each\' statements are only available if source level is 5.0\n" + 
615
		"Syntax error, \'for each\' statements are only available if source level is 5.0\n" + 
611
		"----------\n" + 
616
		"----------\n" + 
612
		"2. ERROR in X.java (at line 4)\n" + 
617
		"2. ERROR in X.java (at line 3)\n" + 
618
		"	for(String o: c) {\n" + 
619
		"	              ^\n" + 
620
		"c cannot be resolved\n" + 
621
		"----------\n" + 
622
		"3. ERROR in X.java (at line 4)\n" + 
613
		"	#\n" + 
623
		"	#\n" + 
614
		"	^\n" + 
624
		"	^\n" + 
615
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
625
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
Lines 619-625 Link Here
619
	
629
	
620
	String expected15ProblemLog = 
630
	String expected15ProblemLog = 
621
		"----------\n" + 
631
		"----------\n" + 
622
		"1. ERROR in X.java (at line 4)\n" + 
632
		"1. ERROR in X.java (at line 3)\n" + 
633
		"	for(String o: c) {\n" + 
634
		"	              ^\n" + 
635
		"c cannot be resolved\n" + 
636
		"----------\n" + 
637
		"2. ERROR in X.java (at line 4)\n" + 
623
		"	#\n" + 
638
		"	#\n" + 
624
		"	^\n" + 
639
		"	^\n" + 
625
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
640
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
Lines 853-859 Link Here
853
		"	^^^^^^\n" + 
868
		"	^^^^^^\n" + 
854
		"Syntax error on token \"assert\", AssignmentOperator expected after this token\n" + 
869
		"Syntax error on token \"assert\", AssignmentOperator expected after this token\n" + 
855
		"----------\n" + 
870
		"----------\n" + 
856
		"3. ERROR in X.java (at line 4)\n" + 
871
		"3. ERROR in X.java (at line 3)\n" + 
872
		"	assert true;\n" + 
873
		"	^^^^^^\n" + 
874
		"assert cannot be resolved\n" + 
875
		"----------\n" + 
876
		"4. ERROR in X.java (at line 4)\n" + 
857
		"	#\n" + 
877
		"	#\n" + 
858
		"	^\n" + 
878
		"	^\n" + 
859
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
879
		"Syntax error on token \"Invalid Character\", delete this token\n" + 
Lines 1118-1123 Link Here
1118
		"	for(Object o ? c){\n" + 
1138
		"	for(Object o ? c){\n" + 
1119
		"	             ^\n" + 
1139
		"	             ^\n" + 
1120
		"Syntax error on token \"?\", : expected\n" + 
1140
		"Syntax error on token \"?\", : expected\n" + 
1141
		"----------\n" + 
1142
		"2. ERROR in X.java (at line 3)\n" + 
1143
		"	for(Object o ? c){\n" + 
1144
		"	               ^\n" + 
1145
		"c cannot be resolved\n" + 
1121
		"----------\n";
1146
		"----------\n";
1122
	
1147
	
1123
	runComplianceParserTest(
1148
	runComplianceParserTest(
(-)src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java (-14 / +163 lines)
Lines 33-39 Link Here
33
	public static boolean optimizeStringLiterals = false;
33
	public static boolean optimizeStringLiterals = false;
34
	public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
34
	public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
35
static {
35
static {
36
//	TESTS_NUMBERS = new int[] { 113 };	
36
//	TESTS_NUMBERS = new int[] { 2 };	
37
}
37
}
38
public static Test suite() {
38
public static Test suite() {
39
	return buildTestSuite(DietRecoveryTest.class);
39
	return buildTestSuite(DietRecoveryTest.class);
Lines 340-348 Link Here
340
		"  public int h;\n" + 
340
		"  public int h;\n" + 
341
		"  public int[] i = {0, 1};\n" + 
341
		"  public int[] i = {0, 1};\n" + 
342
		"  public X() {\n" + 
342
		"  public X() {\n" + 
343
		"    super();\n" +
343
		"    super();\n" + 
344
		"  }\n" + 
344
		"  }\n" + 
345
		"  void foo() {\n" + 
345
		"  void foo() {\n" + 
346
		"    System.out.println();\n" + 
347
		"    class L {\n" + 
348
		"      L() {\n" + 
349
		"        super();\n" + 
350
		"      }\n" + 
351
		"      void baz() {\n" + 
352
		"      }\n" + 
353
		"    }\n" + 
346
		"  }\n" + 
354
		"  }\n" + 
347
		"  void bar() {\n" + 
355
		"  void bar() {\n" + 
348
		"  }\n" + 
356
		"  }\n" + 
Lines 599-604 Link Here
599
		"    super();\n" + 
607
		"    super();\n" + 
600
		"  }\n" + 
608
		"  }\n" + 
601
		"  void foo() {\n" + 
609
		"  void foo() {\n" + 
610
		"    System.out.println();\n" + 
611
		"    new baz() {\n" + 
612
		"    };\n" + 
602
		"  }\n" + 
613
		"  }\n" + 
603
		"  void bar() {\n" + 
614
		"  void bar() {\n" + 
604
		"  }\n" + 
615
		"  }\n" + 
Lines 1274-1282 Link Here
1274
	String expectedDietPlusBodyUnitToString = 
1285
	String expectedDietPlusBodyUnitToString = 
1275
		"public class X extends Thread {\n" + 
1286
		"public class X extends Thread {\n" + 
1276
		"  public X() {\n" + 
1287
		"  public X() {\n" + 
1277
		"    super();\n" + 	
1288
		"    super();\n" + 
1278
		"  }\n" + 
1289
		"  }\n" + 
1279
		"  void foo() {\n" + 
1290
		"  void foo() {\n" + 
1291
		"    ;\n" + 
1280
		"  }\n" + 
1292
		"  }\n" + 
1281
		"  void bar() {\n" + 
1293
		"  void bar() {\n" + 
1282
		"  }\n" + 
1294
		"  }\n" + 
Lines 1643-1651 Link Here
1643
		"public class X {\n" + 
1655
		"public class X {\n" + 
1644
		"  public int h;\n" + 
1656
		"  public int h;\n" + 
1645
		"  public X() {\n" + 
1657
		"  public X() {\n" + 
1646
		"    super();\n"+
1658
		"    super();\n" + 
1647
		"  }\n" + 
1659
		"  }\n" + 
1648
		"  void foo() {\n" + 
1660
		"  void foo() {\n" + 
1661
		"    System.out.println();\n" + 
1662
		"    class L {\n" + 
1663
		"      public int l;\n" + 
1664
		"      L() {\n" + 
1665
		"        super();\n" + 
1666
		"      }\n" + 
1667
		"      void baz() {\n" + 
1668
		"      }\n" + 
1669
		"    }\n" + 
1649
		"  }\n" + 
1670
		"  }\n" + 
1650
		"  void bar() {\n" + 
1671
		"  void bar() {\n" + 
1651
		"  }\n" + 
1672
		"  }\n" + 
Lines 1715-1723 Link Here
1715
		"public class X {\n" + 
1736
		"public class X {\n" + 
1716
		"  public int h;\n" + 
1737
		"  public int h;\n" + 
1717
		"  public X() {\n" + 
1738
		"  public X() {\n" + 
1718
		"    super();\n"+
1739
		"    super();\n" + 
1719
		"  }\n" + 
1740
		"  }\n" + 
1720
		"  void foo() {\n" + 
1741
		"  void foo() {\n" + 
1742
		"    System.out.println();\n" + 
1743
		"    class L {\n" + 
1744
		"      public int l;\n" + 
1745
		"      L() {\n" + 
1746
		"        super();\n" + 
1747
		"      }\n" + 
1748
		"      void baz() {\n" + 
1749
		"      }\n" + 
1750
		"    }\n" + 
1721
		"  }\n" + 
1751
		"  }\n" + 
1722
		"  void bar() {\n" + 
1752
		"  void bar() {\n" + 
1723
		"  }\n" + 
1753
		"  }\n" + 
Lines 1855-1863 Link Here
1855
		"import java.util.*;\n" + 
1885
		"import java.util.*;\n" + 
1856
		"public class X {\n" + 
1886
		"public class X {\n" + 
1857
		"  public X() {\n" + 
1887
		"  public X() {\n" + 
1858
		"    super();\n"+
1888
		"    super();\n" + 
1859
		"  }\n" + 
1889
		"  }\n" + 
1860
		"  void foo() {\n" + 
1890
		"  void foo() {\n" + 
1891
		"    System.out.println();\n" + 
1892
		"    new X() {\n" + 
1893
		"      public int h;\n" + 
1894
		"      () {\n" + 
1895
		"        super();\n" + 
1896
		"      }\n" + 
1897
		"      void baz() {\n" + 
1898
		"      }\n" + 
1899
		"      void bar() {\n" + 
1900
		"      }\n" + 
1901
		"      void truc() {\n" + 
1902
		"      }\n" + 
1903
		"    };\n" + 
1861
		"  }\n" + 
1904
		"  }\n" + 
1862
		"}\n";
1905
		"}\n";
1863
	
1906
	
Lines 1922-1930 Link Here
1922
		"public class X {\n" + 
1965
		"public class X {\n" + 
1923
		"  public int h;\n" + 
1966
		"  public int h;\n" + 
1924
		"  public X() {\n" + 
1967
		"  public X() {\n" + 
1925
		"    super();\n"+
1968
		"    super();\n" + 
1926
		"  }\n" + 
1969
		"  }\n" + 
1927
		"  void foo() {\n" + 
1970
		"  void foo() {\n" + 
1971
		"    System.out.println();\n" + 
1928
		"  }\n" + 
1972
		"  }\n" + 
1929
		"  void bar() {\n" + 
1973
		"  void bar() {\n" + 
1930
		"  }\n" + 
1974
		"  }\n" + 
Lines 1992-2000 Link Here
1992
		"import java.util.*;\n" + 
2036
		"import java.util.*;\n" + 
1993
		"public class X {\n" + 
2037
		"public class X {\n" + 
1994
		"  public X() {\n" + 
2038
		"  public X() {\n" + 
1995
		"    super();\n"+
2039
		"    super();\n" + 
1996
		"  }\n" + 
2040
		"  }\n" + 
1997
		"  void foo() {\n" + 
2041
		"  void foo() {\n" + 
2042
		"    System.out.println();\n" + 
2043
		"    class L {\n" + 
2044
		"      public int l;\n" + 
2045
		"      L() {\n" + 
2046
		"        super();\n" + 
2047
		"      }\n" + 
2048
		"      void baz() {\n" + 
2049
		"      }\n" + 
2050
		"    }\n" + 
2051
		"    int h;\n" + 
1998
		"  }\n" + 
2052
		"  }\n" + 
1999
		"  void bar() {\n" + 
2053
		"  void bar() {\n" + 
2000
		"  }\n" + 
2054
		"  }\n" + 
Lines 3119-3124 Link Here
3119
		"    super();\n" + 
3173
		"    super();\n" + 
3120
		"  }\n" + 
3174
		"  }\n" + 
3121
		"  int foo() {\n" + 
3175
		"  int foo() {\n" + 
3176
		"    if (true)\n" + 
3177
		"        {\n" + 
3178
		"          int x;\n" + 
3179
		"        }\n" + 
3122
		"  }\n" + 
3180
		"  }\n" + 
3123
		"}\n";
3181
		"}\n";
3124
	
3182
	
Lines 3162-3167 Link Here
3162
		"    super();\n" + 
3220
		"    super();\n" + 
3163
		"  }\n" + 
3221
		"  }\n" + 
3164
		"  int foo() {\n" + 
3222
		"  int foo() {\n" + 
3223
		"    {\n" + 
3224
		"      int x;\n" + 
3225
		"    }\n" + 
3165
		"  }\n" + 
3226
		"  }\n" + 
3166
		"}\n";
3227
		"}\n";
3167
	
3228
	
Lines 4247-4252 Link Here
4247
		"    super();\n" + 
4308
		"    super();\n" + 
4248
		"  }\n" + 
4309
		"  }\n" + 
4249
		"  int foo() {\n" + 
4310
		"  int foo() {\n" + 
4311
		"    new X();\n" + 
4250
		"  }\n" + 
4312
		"  }\n" + 
4251
		"}\n";
4313
		"}\n";
4252
	String expectedFullUnitToString = expectedDietUnitToString;
4314
	String expectedFullUnitToString = expectedDietUnitToString;
Lines 4361-4366 Link Here
4361
		"    return this;\n" + 
4423
		"    return this;\n" + 
4362
		"  }\n" + 
4424
		"  }\n" + 
4363
		"  int bar() {\n" + 
4425
		"  int bar() {\n" + 
4426
		"    class Local {\n" + 
4427
		"      Local() {\n" + 
4428
		"        super();\n" + 
4429
		"      }\n" + 
4430
		"      int hello() {\n" + 
4431
		"        fo = ;\n" + 
4432
		"      }\n" + 
4433
		"      int world() {\n" + 
4434
		"      }\n" + 
4435
		"      void foo() {\n" + 
4436
		"      }\n" + 
4437
		"    }\n" + 
4438
		"    int hello;\n" + 
4364
		"  }\n" + 
4439
		"  }\n" + 
4365
		"}\n";
4440
		"}\n";
4366
		
4441
		
Lines 4439-4444 Link Here
4439
		"    super();\n" + 		
4514
		"    super();\n" + 		
4440
		"  }\n" + 
4515
		"  }\n" + 
4441
		"  public static void main(String[] argv) {\n" + 
4516
		"  public static void main(String[] argv) {\n" + 
4517
		"    new Member().f = ;\n" + 
4442
		"  }\n" + 
4518
		"  }\n" + 
4443
		"}\n";	
4519
		"}\n";	
4444
4520
Lines 4506-4516 Link Here
4506
		"  private Post[] posts;\n" + 
4582
		"  private Post[] posts;\n" + 
4507
		"  private int numberOfDisks;\n" + 
4583
		"  private int numberOfDisks;\n" + 
4508
		"  IncompleteHanoi() {\n" + 
4584
		"  IncompleteHanoi() {\n" + 
4509
		"    super();\n" + 		
4585
		"    super();\n" + 
4510
		"  }\n" + 
4586
		"  }\n" + 
4511
		"  public Hanoi(int numberOfDisks) {\n" + 
4587
		"  public Hanoi(int numberOfDisks) {\n" + 
4512
		"  }\n" + 
4588
		"  }\n" + 
4513
		"  private void solve(int depth, Post start, Post free, Post end) {\n" + 
4589
		"  private void solve(int depth, Post start, Post free, Post end) {\n" + 
4590
		"    if ((depth == 1))\n" + 
4591
		"        moveDisk(start, end);\n" + 
4592
		"    else\n" + 
4593
		"        if ((depth > 1))\n" + 
4594
		"            {\n" + 
4595
		"              sol = ;\n" + 
4596
		"            }\n" + 
4514
		"  }\n" + 
4597
		"  }\n" + 
4515
		"}\n";
4598
		"}\n";
4516
	
4599
	
Lines 4552-4560 Link Here
4552
	String expectedDietPlusBodyUnitToString = 
4635
	String expectedDietPlusBodyUnitToString = 
4553
		"class X {\n" + 
4636
		"class X {\n" + 
4554
		"  X() {\n" + 
4637
		"  X() {\n" + 
4555
		"    super();\n" + 		
4638
		"    super();\n" + 
4556
		"  }\n" + 
4639
		"  }\n" + 
4557
		"  int foo() {\n" + 
4640
		"  int foo() {\n" + 
4641
		"    Vector v = new Vector();\n" + 
4642
		"    s v;\n" + 
4643
		"    addElement();\n" + 
4558
		"  }\n" + 
4644
		"  }\n" + 
4559
		"}\n";
4645
		"}\n";
4560
	
4646
	
Lines 4595-4603 Link Here
4595
	String expectedDietPlusBodyUnitToString = 
4681
	String expectedDietPlusBodyUnitToString = 
4596
		"class X {\n" + 
4682
		"class X {\n" + 
4597
		"  X() {\n" + 
4683
		"  X() {\n" + 
4598
		"    super();\n" + 		
4684
		"    super();\n" + 
4599
		"  }\n" + 
4685
		"  }\n" + 
4600
		"  int foo() {\n" + 
4686
		"  int foo() {\n" + 
4687
		"    Vector v = new Vector();\n" + 
4688
		"    public s v;\n" + 
4689
		"    addElement();\n" + 
4601
		"  }\n" + 
4690
		"  }\n" + 
4602
		"}\n";
4691
		"}\n";
4603
	
4692
	
Lines 4640-4648 Link Here
4640
	String expectedDietPlusBodyUnitToString = 
4729
	String expectedDietPlusBodyUnitToString = 
4641
		"class X {\n" + 
4730
		"class X {\n" + 
4642
		"  X() {\n" + 
4731
		"  X() {\n" + 
4643
		"    super();\n" + 		
4732
		"    super();\n" + 
4644
		"  }\n" + 
4733
		"  }\n" + 
4645
		"  int test() {\n" + 
4734
		"  int test() {\n" + 
4735
		"    int[] i;\n" + 
4736
		"    i bar = 1;\n" + 
4646
		"  }\n" + 
4737
		"  }\n" + 
4647
		"}\n";
4738
		"}\n";
4648
	
4739
	
Lines 4684-4689 Link Here
4684
		"    super();\n" + 
4775
		"    super();\n" + 
4685
		"  }\n" + 
4776
		"  }\n" + 
4686
		"  int foo() {\n" + 
4777
		"  int foo() {\n" + 
4778
		"    X(12);\n" + 
4687
		"  }\n" + 
4779
		"  }\n" + 
4688
		"}\n";
4780
		"}\n";
4689
	
4781
	
Lines 5297-5302 Link Here
5297
		"    super();\n" + 		
5389
		"    super();\n" + 		
5298
		"  }\n" + 
5390
		"  }\n" + 
5299
		"  void foo() {\n" + 
5391
		"  void foo() {\n" + 
5392
		"    bar(this.array.length, 10, fred());\n" + 
5300
		"  }\n" +
5393
		"  }\n" +
5301
		"  int fred() {\n" +
5394
		"  int fred() {\n" +
5302
		"  }\n" +
5395
		"  }\n" +
Lines 5583-5595 Link Here
5583
		"  {\n" + 
5676
		"  {\n" + 
5584
		"  }\n" + 
5677
		"  }\n" + 
5585
		"  X() {\n" + 
5678
		"  X() {\n" + 
5586
		"    super();\n" + 		
5679
		"    super();\n" + 
5587
		"  }\n" + 
5680
		"  }\n" + 
5588
		"  public void addThreadFilter(IJavaThread thread) {\n" + 
5681
		"  public void addThreadFilter(IJavaThread thread) {\n" + 
5682
		"    restricts breakpoint;\n" + 
5683
		"    given thread;\n" + 
5684
		"    any other;\n" + 
5685
		"    specified = ;\n" + 
5589
		"  }\n" + 
5686
		"  }\n" + 
5590
		"  public void removeThreadFilter(IJavaThread thread) {\n" + 
5687
		"  public void removeThreadFilter(IJavaThread thread) {\n" + 
5688
		"    removes the;\n" + 
5689
		"    thread restriction;\n" + 
5690
		"    will need = (re - create);\n" + 
5691
		"    request as;\n" + 
5692
		"    does not;\n" + 
5693
		"    the removal;\n" + 
5694
		"    thread = ;\n" + 
5591
		"  }\n" + 
5695
		"  }\n" + 
5592
		"  public IJavaThread[] getThreadFilters() {\n" + 
5696
		"  public IJavaThread[] getThreadFilters() {\n" + 
5697
		"    return the;\n" + 
5698
		"    of threads;\n" + 
5699
		"    breakpoint is;\n" + 
5700
		"    restricted to;\n" + 
5593
		"  }\n" + 
5701
		"  }\n" + 
5594
		"}\n";
5702
		"}\n";
5595
	
5703
	
Lines 5647-5655 Link Here
5647
		"  <clinit>() {\n" + 
5755
		"  <clinit>() {\n" + 
5648
		"  }\n" + 
5756
		"  }\n" + 
5649
		"  public Bug() {\n" + 
5757
		"  public Bug() {\n" + 
5650
		"    super();\n" + 		
5758
		"    super();\n" + 
5651
		"  }\n" + 
5759
		"  }\n" + 
5652
		"  public static void main(String[] arguments) {\n" + 
5760
		"  public static void main(String[] arguments) {\n" + 
5761
		"    Shell shell = new Shell((((SWT.MENU | SWT.RESIZE) | SWT.TITLE) | SWT.H_SCROLL));\n" + 
5762
		"    StyledText text = new StyledText(shell, SWT.WRAP);\n" + 
5763
		"    shell.addListener(SWT.Resize, new Listener() {\n" + 
5764
		"  () {\n" + 
5765
		"    super();\n" + 
5766
		"  }\n" + 
5767
		"  public void handleEvent(Event e) {\n" + 
5768
		"    text.setBounds(shell.getClientArea());\n" + 
5769
		"  }\n" + 
5770
		"});\n" + 
5771
		"    shell.addListener(SWT.KeyDown, new Listener() {\n" + 
5772
		"  public void handleEvent(Event e) {\n" + 
5773
		"    bold = (! bold);\n" + 
5774
		"  }\n" + 
5775
		"});\n" + 
5776
		"    text.addLineStyleListener(new LineStyleListener() {\n" + 
5777
		"  () {\n" + 
5778
		"    super();\n" + 
5779
		"  }\n" + 
5780
		"  public void lineGetStyle(LineStyleEvent event) {\n" + 
5781
		"  }\n" + 
5782
		"});\n" + 
5653
		"  }\n" + 
5783
		"  }\n" + 
5654
		"}\n";
5784
		"}\n";
5655
	
5785
	
Lines 6158-6163 Link Here
6158
		"    super();\n" + 
6288
		"    super();\n" + 
6159
		"  }\n" + 
6289
		"  }\n" + 
6160
		"  void bar() {\n" + 
6290
		"  void bar() {\n" + 
6291
		"    class Inner {\n" + 
6292
		"      Inner() {\n" + 
6293
		"        super();\n" + 
6294
		"      }\n" + 
6295
		"      void foo() {\n" + 
6296
		"        try \n" + 
6297
		"          {\n" + 
6298
		"          }\n" + 
6299
		"        catch (Exception e)           {\n" + 
6300
		"          }\n" + 
6301
		"      }\n" + 
6302
		"    }\n" + 
6161
		"  }\n" + 
6303
		"  }\n" + 
6162
		"}\n";
6304
		"}\n";
6163
	
6305
	
Lines 6256-6261 Link Here
6256
		"    super();\n" + 
6398
		"    super();\n" + 
6257
		"  }\n" + 
6399
		"  }\n" + 
6258
		"  public void foo() {\n" + 
6400
		"  public void foo() {\n" + 
6401
		"    try \n" + 
6402
		"      {\n" + 
6403
		"      }\n" + 
6404
		"    catch (Exception e)       {\n" + 
6405
		"        bar(\"blabla\");\n" + 
6406
		"        throw new Exception(prefix);\n" + 
6407
		"      }\n" + 
6259
		"  }\n" + 
6408
		"  }\n" + 
6260
		"}\n";
6409
		"}\n";
6261
	
6410
	
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java (-2 / +33 lines)
Lines 219-224 Link Here
219
		"	throws e;\n" + 
219
		"	throws e;\n" + 
220
		"	^^^^^^\n" + 
220
		"	^^^^^^\n" + 
221
		"Syntax error on token \"throws\", throw expected\n" + 
221
		"Syntax error on token \"throws\", throw expected\n" + 
222
		"----------\n" + 
223
		"2. ERROR in X.java (at line 3)\n" + 
224
		"	throws e;\n" + 
225
		"	       ^\n" + 
226
		"e cannot be resolved\n" + 
222
		"----------\n"
227
		"----------\n"
223
	);
228
	);
224
}
229
}
Lines 235-240 Link Here
235
		"----------\n" + 
240
		"----------\n" + 
236
		"1. ERROR in X.java (at line 2)\n" + 
241
		"1. ERROR in X.java (at line 2)\n" + 
237
		"	public void foo(X, Object o, String s) {\n" + 
242
		"	public void foo(X, Object o, String s) {\n" + 
243
		"	                ^^^^^^^^^\n" + 
244
		"X.Object cannot be resolved to a type\n" + 
245
		"----------\n" + 
246
		"2. ERROR in X.java (at line 2)\n" + 
247
		"	public void foo(X, Object o, String s) {\n" + 
238
		"	                 ^\n" + 
248
		"	                 ^\n" + 
239
		"Syntax error on token \",\", . expected\n" + 
249
		"Syntax error on token \",\", . expected\n" + 
240
		"----------\n"
250
		"----------\n"
Lines 461-475 Link Here
461
			"}"
471
			"}"
462
		},
472
		},
463
		"----------\n" + 
473
		"----------\n" + 
464
		"1. ERROR in X.java (at line 6)\n" + 
474
		"1. ERROR in X.java (at line 5)\n" + 
475
		"	if (sourceAttachmentPath != null) {\n" + 
476
		"	    ^^^^^^^^^^^^^^^^^^^^\n" + 
477
		"sourceAttachmentPath cannot be resolved\n" + 
478
		"----------\n" + 
479
		"2. ERROR in X.java (at line 6)\n" + 
480
		"	if (sourceAttachmentPath.isEmpty()) { && !\n" + 
481
		"	    ^^^^^^^^^^^^^^^^^^^^\n" + 
482
		"sourceAttachmentPath cannot be resolved\n" + 
483
		"----------\n" + 
484
		"3. ERROR in X.java (at line 6)\n" + 
465
		"	if (sourceAttachmentPath.isEmpty()) { && !\n" + 
485
		"	if (sourceAttachmentPath.isEmpty()) { && !\n" + 
466
		"	                                      ^^\n" + 
486
		"	                                      ^^\n" + 
467
		"Syntax error on token \"&&\", invalid (\n" + 
487
		"Syntax error on token \"&&\", invalid (\n" + 
468
		"----------\n" + 
488
		"----------\n" + 
469
		"2. ERROR in X.java (at line 7)\n" + 
489
		"4. ERROR in X.java (at line 6)\n" + 
490
		"	if (sourceAttachmentPath.isEmpty()) { && !\n" + 
491
		"sourceAttachmentPath.isAbsolute()) {\n" + 
492
		"	                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
493
		"The left-hand side of an assignment must be a variable\n" + 
494
		"----------\n" + 
495
		"5. ERROR in X.java (at line 7)\n" + 
470
		"	sourceAttachmentPath.isAbsolute()) {\n" + 
496
		"	sourceAttachmentPath.isAbsolute()) {\n" + 
471
		"	                                   ^\n" + 
497
		"	                                   ^\n" + 
472
		"Syntax error on token \"{\", invalid AssignmentOperator\n" + 
498
		"Syntax error on token \"{\", invalid AssignmentOperator\n" + 
499
		"----------\n" + 
500
		"6. ERROR in X.java (at line 10)\n" + 
501
		"	return null;\n" + 
502
		"	       ^^^^\n" + 
503
		"Type mismatch: cannot convert from null to int\n" + 
473
		"----------\n"
504
		"----------\n"
474
	);
505
	);
475
}
506
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java (-1 / +11 lines)
Lines 454-463 Link Here
454
		"----------\n" + 
454
		"----------\n" + 
455
		"2. ERROR in p1\\A.java (at line 11)\n" + 
455
		"2. ERROR in p1\\A.java (at line 11)\n" + 
456
		"	public void anotherMethod(int A) {};	\n" + 
456
		"	public void anotherMethod(int A) {};	\n" + 
457
		"	            ^^^^^^^^^^^^^\n" + 
458
		"void is an invalid type for the variable anotherMethod\n" + 
459
		"----------\n" + 
460
		"3. ERROR in p1\\A.java (at line 11)\n" + 
461
		"	public void anotherMethod(int A) {};	\n" + 
457
		"	                         ^\n" + 
462
		"	                         ^\n" + 
458
		"Syntax error on token \"(\", ; expected\n" + 
463
		"Syntax error on token \"(\", ; expected\n" + 
459
		"----------\n" + 
464
		"----------\n" + 
460
		"3. ERROR in p1\\A.java (at line 11)\n" + 
465
		"4. ERROR in p1\\A.java (at line 11)\n" + 
466
		"	public void anotherMethod(int A) {};	\n" + 
467
		"	                              ^\n" + 
468
		"Duplicate local variable A\n" + 
469
		"----------\n" + 
470
		"5. ERROR in p1\\A.java (at line 11)\n" + 
461
		"	public void anotherMethod(int A) {};	\n" + 
471
		"	public void anotherMethod(int A) {};	\n" + 
462
		"	                               ^\n" + 
472
		"	                               ^\n" + 
463
		"Syntax error on token \")\", ; expected\n" + 
473
		"Syntax error on token \")\", ; expected\n" + 
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java (-10 / +10 lines)
Lines 617-632 Link Here
617
					" public class X<T, U, V extend Exception> {}"
617
					" public class X<T, U, V extend Exception> {}"
618
			},
618
			},
619
			"----------\n" + 
619
			"----------\n" + 
620
				"1. ERROR in X.java (at line 7)\n" + 
620
			"1. ERROR in X.java (at line 7)\n" + 
621
				"	public class X<T, U, V extend Exception> {}\n" + 
621
			"	public class X<T, U, V extend Exception> {}\n" + 
622
				"	                       ^^^^^^\n" + 
622
			"	                       ^^^^^^\n" + 
623
				"Syntax error on token \"extend\", extends expected\n" + 
623
			"Syntax error on token \"extend\", extends expected\n" + 
624
				"----------\n" + 
624
			"----------\n" + 
625
				"2. ERROR in X.java (at line 7)\n" + 
625
			"2. ERROR in X.java (at line 7)\n" + 
626
				"	public class X<T, U, V extend Exception> {}\n" + 
626
			"	public class X<T, U, V extend Exception> {}\n" + 
627
				"	                       ^^^^^^\n" + 
627
			"	                       ^^^^^^\n" + 
628
				"extend cannot be resolved to a type\n" + 
628
			"extend cannot be resolved to a type\n" + 
629
				"----------\n"
629
			"----------\n"
630
		);
630
		);
631
	}
631
	}
632
632
(-)src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java (+5 lines)
Lines 2958-2963 Link Here
2958
		"----------\n" + 
2958
		"----------\n" + 
2959
		"1. ERROR in X.java (at line 3)\n" + 
2959
		"1. ERROR in X.java (at line 3)\n" + 
2960
		"	Object enum = null;\n" + 
2960
		"	Object enum = null;\n" + 
2961
		"	^^^^^^\n" + 
2962
		"Object cannot be resolved\n" + 
2963
		"----------\n" + 
2964
		"2. ERROR in X.java (at line 3)\n" + 
2965
		"	Object enum = null;\n" + 
2961
		"	       ^^^^\n" + 
2966
		"	       ^^^^\n" + 
2962
		"Syntax error on token \"enum\", delete this token\n" + 
2967
		"Syntax error on token \"enum\", delete this token\n" + 
2963
		"----------\n");
2968
		"----------\n");
(-)src/org/eclipse/jdt/core/tests/compiler/parser/StatementRecoveryTest.java (+5455 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2004 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials 
4
 * are made available under the terms of the Common Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/cpl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.jdt.core.tests.compiler.parser;
12
13
import java.util.Locale;
14
15
import junit.framework.Test;
16
17
import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
18
import org.eclipse.jdt.core.tests.util.Util;
19
import org.eclipse.jdt.internal.compiler.CompilationResult;
20
import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
21
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
22
import org.eclipse.jdt.internal.compiler.batch.CompilationUnit;
23
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
24
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
25
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
26
import org.eclipse.jdt.internal.compiler.parser.Parser;
27
import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
28
import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
29
30
public class StatementRecoveryTest extends AbstractCompilerTest {
31
	public static final boolean ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY = true;
32
	
33
	public static boolean optimizeStringLiterals = false;
34
	public static long sourceLevel = ClassFileConstants.JDK1_3; //$NON-NLS-1$
35
	
36
static {
37
//	TESTS_NAMES = new String[] { "test0037"};
38
//	TESTS_RANGE = new int[] {10, 20};
39
}
40
public static Test suite() {
41
	return buildTestSuite(StatementRecoveryTest.class);
42
}
43
public StatementRecoveryTest(String testName){
44
	super(testName);
45
}
46
47
public void checkParse(
48
	char[] source, 
49
	String expectedDietUnitToString,
50
	String expectedDietWithStatementRecoveryUnitToString,
51
	String expectedDietPlusBodyUnitToString,	
52
	String expectedDietPlusBodyWithStatementRecoveryUnitToString,	
53
	String expectedFullUnitToString,
54
	String expectedFullWithStatementRecoveryUnitToString,
55
	String testName) {
56
57
	/* using regular parser in DIET mode */
58
	if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
59
		Parser parser = 
60
			new Parser(
61
				new ProblemReporter(
62
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
63
					new CompilerOptions(getCompilerOptions()), 
64
					new DefaultProblemFactory(Locale.getDefault())),
65
				optimizeStringLiterals);
66
		parser.statementRecoveryEnabled = false;
67
		
68
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
69
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
70
		
71
		CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
72
		String computedUnitToString = computedUnit.toString();
73
		if (!expectedDietUnitToString.equals(computedUnitToString)){
74
			System.out.println(Util.displayString(computedUnitToString));
75
		}
76
		assertEquals(
77
			"Invalid unit diet structure" + testName,
78
			expectedDietUnitToString,
79
			computedUnitToString);
80
	}
81
	/* using regular parser in DIET mode and statementRecoveryEnabled */
82
	if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
83
		Parser parser = 
84
			new Parser(
85
				new ProblemReporter(
86
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
87
					new CompilerOptions(getCompilerOptions()), 
88
					new DefaultProblemFactory(Locale.getDefault())),
89
				optimizeStringLiterals);
90
91
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
92
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
93
		
94
		CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
95
		String computedUnitToString = computedUnit.toString();
96
		if (!expectedDietWithStatementRecoveryUnitToString.equals(computedUnitToString)){
97
			System.out.println(Util.displayString(computedUnitToString));
98
		}
99
		assertEquals(
100
			"Invalid unit diet structure with statement recovery enabled" + testName,
101
			expectedDietWithStatementRecoveryUnitToString,
102
			computedUnitToString);
103
	}
104
	/* using regular parser in DIET mode + getMethodBodies */
105
	if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
106
		Parser parser = 
107
			new Parser(
108
				new ProblemReporter(
109
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
110
					new CompilerOptions(getCompilerOptions()), 
111
					new DefaultProblemFactory(Locale.getDefault())),
112
				optimizeStringLiterals);
113
		parser.statementRecoveryEnabled = false;
114
115
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
116
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
117
		
118
		CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
119
		String computedUnitToString = computedUnit.toString();
120
		if (!expectedDietUnitToString.equals(computedUnitToString)){
121
			System.out.println(Util.displayString(computedUnitToString));
122
		}
123
		assertEquals(
124
			"Invalid unit diet structure" + testName,
125
			expectedDietUnitToString,
126
			computedUnitToString);
127
		if (computedUnit.types != null) {
128
			for (int i = computedUnit.types.length; --i >= 0;){
129
				computedUnit.types[i].parseMethod(parser, computedUnit);
130
			}
131
		}
132
		computedUnitToString = computedUnit.toString();
133
		if (!expectedDietPlusBodyUnitToString.equals(computedUnitToString)){
134
			System.out.println(Util.displayString(computedUnitToString));
135
		}
136
		
137
		assertEquals(
138
			"Invalid unit diet+body structure" + testName,
139
			expectedDietPlusBodyUnitToString,
140
			computedUnitToString);
141
	}
142
	/* using regular parser in DIET mode + getMethodBodies and statementRecoveryEnabled */
143
	{
144
		Parser parser = 
145
			new Parser(
146
				new ProblemReporter(
147
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
148
					new CompilerOptions(getCompilerOptions()), 
149
					new DefaultProblemFactory(Locale.getDefault())),
150
				optimizeStringLiterals);
151
152
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
153
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
154
		
155
		CompilationUnitDeclaration computedUnit = parser.dietParse(sourceUnit, compilationResult);
156
		String computedUnitToString = computedUnit.toString();
157
		if (!expectedDietWithStatementRecoveryUnitToString.equals(computedUnitToString)){
158
			System.out.println(Util.displayString(computedUnitToString));
159
		}
160
		assertEquals(
161
			"Invalid unit diet structure" + testName,
162
			expectedDietWithStatementRecoveryUnitToString,
163
			computedUnitToString);
164
		if (computedUnit.types != null) {
165
			for (int i = computedUnit.types.length; --i >= 0;){
166
				computedUnit.types[i].parseMethod(parser, computedUnit);
167
			}
168
		}
169
		computedUnitToString = computedUnit.toString();
170
		if (!expectedDietPlusBodyWithStatementRecoveryUnitToString.equals(computedUnitToString)){
171
			System.out.println(Util.displayString(computedUnitToString));
172
		}
173
		
174
		assertEquals(
175
			"Invalid unit diet+body structure with statement recovery enabled" + testName,
176
			expectedDietPlusBodyWithStatementRecoveryUnitToString,
177
			computedUnitToString);
178
	}
179
	/* using regular parser in FULL mode */
180
	if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
181
		Parser parser = 
182
			new Parser(
183
				new ProblemReporter(
184
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
185
					new CompilerOptions(getCompilerOptions()), 
186
					new DefaultProblemFactory(Locale.getDefault())),
187
				optimizeStringLiterals);
188
		parser.statementRecoveryEnabled = false;
189
190
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
191
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
192
		
193
		CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
194
		String computedUnitToString = computedUnit.toString();
195
		if (!expectedFullUnitToString.equals(computedUnitToString)){
196
			System.out.println(Util.displayString(computedUnitToString));
197
		}
198
		assertEquals(
199
			"Invalid unit full structure" + testName,
200
			expectedFullUnitToString,
201
			computedUnitToString);
202
203
	}
204
	/* using regular parser in FULL mode and statementRecoveryEnabled */
205
	if(!ONLY_DIET_PLUS_BODY_WITH_STATEMENT_RECOVERY){
206
		Parser parser = 
207
			new Parser(
208
				new ProblemReporter(
209
					DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
210
					new CompilerOptions(getCompilerOptions()), 
211
					new DefaultProblemFactory(Locale.getDefault())),
212
				optimizeStringLiterals);
213
214
		ICompilationUnit sourceUnit = new CompilationUnit(source, testName, null);
215
		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);	
216
		
217
		CompilationUnitDeclaration computedUnit = parser.parse(sourceUnit, compilationResult);
218
		String computedUnitToString = computedUnit.toString();
219
		if (!expectedFullWithStatementRecoveryUnitToString.equals(computedUnitToString)){
220
			System.out.println(Util.displayString(computedUnitToString));
221
		}
222
		assertEquals(
223
			"Invalid unit full structure with statement recovery enabled" + testName,
224
			expectedFullWithStatementRecoveryUnitToString,
225
			computedUnitToString);
226
227
	}
228
}
229
230
public void test0001() {
231
232
	String s = 
233
		"package a;											\n"
234
			+ "public class X {								\n"
235
			+ "  void foo() {								\n"
236
			+ "    System.out.println();					\n"
237
			+ "  }											\n"
238
			+ "}											\n"; 	
239
240
	String expectedDietUnitToString = 
241
		"package a;\n" + 
242
		"public class X {\n" + 
243
		"  public X() {\n" + 
244
		"  }\n" + 
245
		"  void foo() {\n" + 
246
		"  }\n" + 
247
		"}\n";
248
	
249
	String expectedDietWithStatementRecoveryUnitToString =
250
		expectedDietUnitToString;
251
	
252
	String expectedDietPlusBodyUnitToString = 
253
		"package a;\n" + 
254
		"public class X {\n" + 
255
		"  public X() {\n" + 
256
		"    super();\n" + 
257
		"  }\n" + 
258
		"  void foo() {\n" + 
259
		"    System.out.println();\n" + 
260
		"  }\n" + 
261
		"}\n";
262
263
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
264
		expectedDietPlusBodyUnitToString;
265
	
266
	String expectedFullUnitToString =
267
		expectedDietPlusBodyUnitToString;
268
	
269
	String expectedFullWithStatementRecoveryUnitToString =
270
		expectedFullUnitToString;
271
	
272
	String testName = "<test>";
273
	checkParse(
274
		s.toCharArray(),
275
		expectedDietUnitToString,
276
		expectedDietWithStatementRecoveryUnitToString,
277
		expectedDietPlusBodyUnitToString,
278
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
279
		expectedFullUnitToString,
280
		expectedFullWithStatementRecoveryUnitToString,
281
		testName);
282
}
283
public void test0002() {
284
285
	String s = 
286
		"package a;											\n"
287
			+ "public class X {								\n"
288
			+ "  void foo() {								\n"
289
			+ "    #                    					\n"
290
			+ "    System.out.println();					\n"
291
			+ "  }											\n"
292
			+ "}											\n"; 	
293
294
	String expectedDietUnitToString = 
295
		"package a;\n" + 
296
		"public class X {\n" + 
297
		"  public X() {\n" + 
298
		"  }\n" + 
299
		"  void foo() {\n" + 
300
		"  }\n" + 
301
		"}\n";
302
	
303
	String expectedDietWithStatementRecoveryUnitToString =
304
		expectedDietUnitToString;
305
	
306
	String expectedDietPlusBodyUnitToString = 
307
		"package a;\n" + 
308
		"public class X {\n" + 
309
		"  public X() {\n" + 
310
		"    super();\n" + 
311
		"  }\n" + 
312
		"  void foo() {\n" + 
313
		"  }\n" + 
314
		"}\n";
315
316
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
317
		"package a;\n" + 
318
		"public class X {\n" + 
319
		"  public X() {\n" + 
320
		"    super();\n" + 
321
		"  }\n" + 
322
		"  void foo() {\n" + 
323
		"    System.out.println();\n" + 
324
		"  }\n" + 
325
		"}\n";
326
	
327
	String expectedFullUnitToString =
328
		expectedDietUnitToString;
329
	
330
	String expectedFullWithStatementRecoveryUnitToString =
331
		expectedDietUnitToString;
332
	
333
	String testName = "<test>";
334
	checkParse(
335
		s.toCharArray(),
336
		expectedDietUnitToString,
337
		expectedDietWithStatementRecoveryUnitToString,
338
		expectedDietPlusBodyUnitToString,
339
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
340
		expectedFullUnitToString,
341
		expectedFullWithStatementRecoveryUnitToString,
342
		testName);
343
}
344
public void test0003() {
345
346
	String s = 
347
		"package a;											\n"
348
			+ "public class X {								\n"
349
			+ "  void foo() {								\n"
350
			+ "    System.out.println();					\n"
351
			+ "    #                    					\n"
352
			+ "  }											\n"
353
			+ "}											\n"; 	
354
355
	String expectedDietUnitToString = 
356
		"package a;\n" + 
357
		"public class X {\n" + 
358
		"  public X() {\n" + 
359
		"  }\n" + 
360
		"  void foo() {\n" + 
361
		"  }\n" + 
362
		"}\n";
363
	
364
	String expectedDietWithStatementRecoveryUnitToString =
365
		expectedDietUnitToString;
366
	
367
	String expectedDietPlusBodyUnitToString = 
368
		"package a;\n" + 
369
		"public class X {\n" + 
370
		"  public X() {\n" + 
371
		"    super();\n" + 
372
		"  }\n" + 
373
		"  void foo() {\n" + 
374
		"  }\n" + 
375
		"}\n";
376
377
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
378
		"package a;\n" + 
379
		"public class X {\n" + 
380
		"  public X() {\n" + 
381
		"    super();\n" + 
382
		"  }\n" + 
383
		"  void foo() {\n" + 
384
		"    System.out.println();\n" + 
385
		"  }\n" + 
386
		"}\n";
387
	
388
	String expectedFullUnitToString =
389
		expectedDietUnitToString;
390
	
391
	String expectedFullWithStatementRecoveryUnitToString =
392
		expectedDietUnitToString;
393
	
394
	String testName = "<test>";
395
	checkParse(
396
		s.toCharArray(),
397
		expectedDietUnitToString,
398
		expectedDietWithStatementRecoveryUnitToString,
399
		expectedDietPlusBodyUnitToString,
400
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
401
		expectedFullUnitToString,
402
		expectedFullWithStatementRecoveryUnitToString,
403
		testName);
404
}
405
public void test0004() {
406
407
	String s = 
408
		"package a;											\n"
409
			+ "public class X {								\n"
410
			+ "  void foo() {								\n"
411
			+ "    #                    					\n"
412
			+ "    System.out.println();					\n"
413
			+ "    System.out.println();					\n"
414
			+ "  }											\n"
415
			+ "}											\n"; 	
416
417
	String expectedDietUnitToString = 
418
		"package a;\n" + 
419
		"public class X {\n" + 
420
		"  public X() {\n" + 
421
		"  }\n" + 
422
		"  void foo() {\n" + 
423
		"  }\n" + 
424
		"}\n";
425
	
426
	String expectedDietWithStatementRecoveryUnitToString =
427
		expectedDietUnitToString;
428
	
429
	String expectedDietPlusBodyUnitToString = 
430
		"package a;\n" + 
431
		"public class X {\n" + 
432
		"  public X() {\n" + 
433
		"    super();\n" + 
434
		"  }\n" + 
435
		"  void foo() {\n" + 
436
		"  }\n" + 
437
		"}\n";
438
439
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
440
		"package a;\n" + 
441
		"public class X {\n" + 
442
		"  public X() {\n" + 
443
		"    super();\n" + 
444
		"  }\n" + 
445
		"  void foo() {\n" + 
446
		"    System.out.println();\n" + 
447
		"    System.out.println();\n" + 
448
		"  }\n" + 
449
		"}\n";
450
	
451
	String expectedFullUnitToString =
452
		expectedDietUnitToString;
453
	
454
	String expectedFullWithStatementRecoveryUnitToString =
455
		expectedDietUnitToString;
456
	
457
	String testName = "<test>";
458
	checkParse(
459
		s.toCharArray(),
460
		expectedDietUnitToString,
461
		expectedDietWithStatementRecoveryUnitToString,
462
		expectedDietPlusBodyUnitToString,
463
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
464
		expectedFullUnitToString,
465
		expectedFullWithStatementRecoveryUnitToString,
466
		testName);
467
}
468
public void test0005() {
469
470
	String s = 
471
		"package a;											\n"
472
			+ "public class X {								\n"
473
			+ "  void foo() {								\n"
474
			+ "    System.out.println();					\n"
475
			+ "    System.out.println();					\n"
476
			+ "    #                    					\n"
477
			+ "  }											\n"
478
			+ "}											\n"; 	
479
480
	String expectedDietUnitToString = 
481
		"package a;\n" + 
482
		"public class X {\n" + 
483
		"  public X() {\n" + 
484
		"  }\n" + 
485
		"  void foo() {\n" + 
486
		"  }\n" + 
487
		"}\n";
488
	
489
	String expectedDietWithStatementRecoveryUnitToString =
490
		expectedDietUnitToString;
491
	
492
	String expectedDietPlusBodyUnitToString = 
493
		"package a;\n" + 
494
		"public class X {\n" + 
495
		"  public X() {\n" + 
496
		"    super();\n" + 
497
		"  }\n" + 
498
		"  void foo() {\n" + 
499
		"  }\n" + 
500
		"}\n";
501
502
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
503
		"package a;\n" + 
504
		"public class X {\n" + 
505
		"  public X() {\n" + 
506
		"    super();\n" + 
507
		"  }\n" + 
508
		"  void foo() {\n" + 
509
		"    System.out.println();\n" + 
510
		"    System.out.println();\n" + 
511
		"  }\n" + 
512
		"}\n";
513
	
514
	String expectedFullUnitToString =
515
		expectedDietUnitToString;
516
	
517
	String expectedFullWithStatementRecoveryUnitToString =
518
		expectedDietUnitToString;
519
	
520
	String testName = "<test>";
521
	checkParse(
522
		s.toCharArray(),
523
		expectedDietUnitToString,
524
		expectedDietWithStatementRecoveryUnitToString,
525
		expectedDietPlusBodyUnitToString,
526
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
527
		expectedFullUnitToString,
528
		expectedFullWithStatementRecoveryUnitToString,
529
		testName);
530
}
531
public void test0006() {
532
533
	String s = 
534
		"package a;											\n"
535
			+ "public class X {								\n"
536
			+ "  void foo() {								\n"
537
			+ "    System.out.println();					\n"
538
			+ "    System.out.println();					\n"
539
			+ "    #                    					\n"
540
			+ "    System.out.println();					\n"
541
			+ "    System.out.println();					\n"
542
			+ "  }											\n"
543
			+ "}											\n"; 	
544
545
	String expectedDietUnitToString = 
546
		"package a;\n" + 
547
		"public class X {\n" + 
548
		"  public X() {\n" + 
549
		"  }\n" + 
550
		"  void foo() {\n" + 
551
		"  }\n" + 
552
		"}\n";
553
	
554
	String expectedDietWithStatementRecoveryUnitToString =
555
		expectedDietUnitToString;
556
	
557
	String expectedDietPlusBodyUnitToString = 
558
		"package a;\n" + 
559
		"public class X {\n" + 
560
		"  public X() {\n" + 
561
		"    super();\n" + 
562
		"  }\n" + 
563
		"  void foo() {\n" + 
564
		"  }\n" + 
565
		"}\n";
566
567
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
568
		"package a;\n" + 
569
		"public class X {\n" + 
570
		"  public X() {\n" + 
571
		"    super();\n" + 
572
		"  }\n" + 
573
		"  void foo() {\n" + 
574
		"    System.out.println();\n" + 
575
		"    System.out.println();\n" + 
576
		"    System.out.println();\n" + 
577
		"    System.out.println();\n" + 
578
		"  }\n" + 
579
		"}\n";
580
	
581
	String expectedFullUnitToString =
582
		expectedDietUnitToString;
583
	
584
	String expectedFullWithStatementRecoveryUnitToString =
585
		expectedDietUnitToString;
586
	
587
	String testName = "<test>";
588
	checkParse(
589
		s.toCharArray(),
590
		expectedDietUnitToString,
591
		expectedDietWithStatementRecoveryUnitToString,
592
		expectedDietPlusBodyUnitToString,
593
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
594
		expectedFullUnitToString,
595
		expectedFullWithStatementRecoveryUnitToString,
596
		testName);
597
}
598
public void test0007() {
599
600
	String s = 
601
		"package a;											\n"
602
			+ "public class X {								\n"
603
			+ "  void foo() {								\n"
604
			+ "    #                    					\n"
605
			+ "    System.out.println();					\n"
606
			+ "    if(true) {								\n"
607
			+ "      System.out.println();					\n"
608
			+ "    }										\n"
609
			+ "    System.out.println();					\n"
610
			+ "  }											\n"
611
			+ "}											\n"; 	
612
613
	String expectedDietUnitToString = 
614
		"package a;\n" + 
615
		"public class X {\n" + 
616
		"  public X() {\n" + 
617
		"  }\n" + 
618
		"  void foo() {\n" + 
619
		"  }\n" + 
620
		"}\n";
621
	
622
	String expectedDietWithStatementRecoveryUnitToString =
623
		expectedDietUnitToString;
624
	
625
	String expectedDietPlusBodyUnitToString = 
626
		"package a;\n" + 
627
		"public class X {\n" + 
628
		"  public X() {\n" + 
629
		"    super();\n" + 
630
		"  }\n" + 
631
		"  void foo() {\n" + 
632
		"  }\n" + 
633
		"}\n";
634
635
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
636
		"package a;\n" + 
637
		"public class X {\n" + 
638
		"  public X() {\n" + 
639
		"    super();\n" + 
640
		"  }\n" + 
641
		"  void foo() {\n" + 
642
		"    System.out.println();\n" + 
643
		"    if (true)\n" + 
644
		"        {\n" + 
645
		"          System.out.println();\n" + 
646
		"        }\n" + 
647
		"    System.out.println();\n" + 
648
		"  }\n" + 
649
		"}\n";
650
	
651
	String expectedFullUnitToString =
652
		expectedDietUnitToString;
653
	
654
	String expectedFullWithStatementRecoveryUnitToString =
655
		expectedDietUnitToString;
656
	
657
	String testName = "<test>";
658
	checkParse(
659
		s.toCharArray(),
660
		expectedDietUnitToString,
661
		expectedDietWithStatementRecoveryUnitToString,
662
		expectedDietPlusBodyUnitToString,
663
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
664
		expectedFullUnitToString,
665
		expectedFullWithStatementRecoveryUnitToString,
666
		testName);
667
}
668
public void test0008() {
669
670
	String s = 
671
		"package a;											\n"
672
			+ "public class X {								\n"
673
			+ "  void foo() {								\n"
674
			+ "    System.out.println();					\n"
675
			+ "    if(true) {								\n"
676
			+ "      System.out.println();					\n"
677
			+ "    }										\n"
678
			+ "    System.out.println();					\n"
679
			+ "    #                    					\n"
680
			+ "  }											\n"
681
			+ "}											\n"; 	
682
683
	String expectedDietUnitToString = 
684
		"package a;\n" + 
685
		"public class X {\n" + 
686
		"  public X() {\n" + 
687
		"  }\n" + 
688
		"  void foo() {\n" + 
689
		"  }\n" + 
690
		"}\n";
691
	
692
	String expectedDietWithStatementRecoveryUnitToString =
693
		expectedDietUnitToString;
694
	
695
	String expectedDietPlusBodyUnitToString = 
696
		"package a;\n" + 
697
		"public class X {\n" + 
698
		"  public X() {\n" + 
699
		"    super();\n" + 
700
		"  }\n" + 
701
		"  void foo() {\n" + 
702
		"  }\n" + 
703
		"}\n";
704
705
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
706
		"package a;\n" + 
707
		"public class X {\n" + 
708
		"  public X() {\n" + 
709
		"    super();\n" + 
710
		"  }\n" + 
711
		"  void foo() {\n" + 
712
		"    System.out.println();\n" + 
713
		"    if (true)\n" + 
714
		"        {\n" + 
715
		"          System.out.println();\n" + 
716
		"        }\n" + 
717
		"    System.out.println();\n" + 
718
		"  }\n" + 
719
		"}\n";
720
	
721
	String expectedFullUnitToString =
722
		expectedDietUnitToString;
723
	
724
	String expectedFullWithStatementRecoveryUnitToString =
725
		expectedDietUnitToString;
726
	
727
	String testName = "<test>";
728
	checkParse(
729
		s.toCharArray(),
730
		expectedDietUnitToString,
731
		expectedDietWithStatementRecoveryUnitToString,
732
		expectedDietPlusBodyUnitToString,
733
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
734
		expectedFullUnitToString,
735
		expectedFullWithStatementRecoveryUnitToString,
736
		testName);
737
}
738
public void test0009() {
739
740
	String s = 
741
		"package a;											\n"
742
			+ "public class X {								\n"
743
			+ "  void foo() {								\n"
744
			+ "    System.out.println();					\n"
745
			+ "    if(true) {								\n"
746
			+ "      System.out.println();					\n"
747
			+ "    }										\n"
748
			+ "    System.out.println();					\n"
749
			+ "    #                    					\n"
750
			+ "    System.out.println();					\n"
751
			+ "    if(true) {								\n"
752
			+ "      System.out.println();					\n"
753
			+ "    }										\n"
754
			+ "    System.out.println();					\n"
755
			+ "  }											\n"
756
			+ "}											\n"; 	
757
758
	String expectedDietUnitToString = 
759
		"package a;\n" + 
760
		"public class X {\n" + 
761
		"  public X() {\n" + 
762
		"  }\n" + 
763
		"  void foo() {\n" + 
764
		"  }\n" + 
765
		"}\n";
766
	
767
	String expectedDietWithStatementRecoveryUnitToString =
768
		expectedDietUnitToString;
769
	
770
	String expectedDietPlusBodyUnitToString = 
771
		"package a;\n" + 
772
		"public class X {\n" + 
773
		"  public X() {\n" + 
774
		"    super();\n" + 
775
		"  }\n" + 
776
		"  void foo() {\n" + 
777
		"  }\n" + 
778
		"}\n";
779
780
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
781
		"package a;\n" + 
782
		"public class X {\n" + 
783
		"  public X() {\n" + 
784
		"    super();\n" + 
785
		"  }\n" + 
786
		"  void foo() {\n" + 
787
		"    System.out.println();\n" + 
788
		"    if (true)\n" + 
789
		"        {\n" + 
790
		"          System.out.println();\n" + 
791
		"        }\n" + 
792
		"    System.out.println();\n" + 
793
		"    System.out.println();\n" + 
794
		"    if (true)\n" + 
795
		"        {\n" + 
796
		"          System.out.println();\n" + 
797
		"        }\n" + 
798
		"    System.out.println();\n" + 
799
		"  }\n" + 
800
		"}\n";
801
	
802
	String expectedFullUnitToString =
803
		expectedDietUnitToString;
804
	
805
	String expectedFullWithStatementRecoveryUnitToString =
806
		expectedDietUnitToString;
807
	
808
	String testName = "<test>";
809
	checkParse(
810
		s.toCharArray(),
811
		expectedDietUnitToString,
812
		expectedDietWithStatementRecoveryUnitToString,
813
		expectedDietPlusBodyUnitToString,
814
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
815
		expectedFullUnitToString,
816
		expectedFullWithStatementRecoveryUnitToString,
817
		testName);
818
}
819
public void test0010() {
820
821
	String s = 
822
		"package a;											\n"
823
			+ "public class X {								\n"
824
			+ "  void foo() {								\n"
825
			+ "    System.out.println();					\n"
826
			+ "    class Z {								\n"
827
			+ "      void foo() {}							\n"
828
			+ "    }										\n"
829
			+ "    System.out.println();					\n"
830
			+ "  }											\n"
831
			+ "}											\n"; 	
832
833
	String expectedDietUnitToString = 
834
		"package a;\n" + 
835
		"public class X {\n" + 
836
		"  public X() {\n" + 
837
		"  }\n" + 
838
		"  void foo() {\n" + 
839
		"  }\n" + 
840
		"}\n";
841
	
842
	String expectedDietWithStatementRecoveryUnitToString =
843
		expectedDietUnitToString;
844
	
845
	String expectedDietPlusBodyUnitToString = 
846
		"package a;\n" + 
847
		"public class X {\n" + 
848
		"  public X() {\n" + 
849
		"    super();\n" + 
850
		"  }\n" + 
851
		"  void foo() {\n" + 
852
		"    System.out.println();\n" + 
853
		"    class Z {\n" + 
854
		"      Z() {\n" + 
855
		"        super();\n" + 
856
		"      }\n" + 
857
		"      void foo() {\n" + 
858
		"      }\n" + 
859
		"    }\n" + 
860
		"    System.out.println();\n" + 
861
		"  }\n" + 
862
		"}\n";
863
864
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
865
		"package a;\n" + 
866
		"public class X {\n" + 
867
		"  public X() {\n" + 
868
		"    super();\n" + 
869
		"  }\n" + 
870
		"  void foo() {\n" + 
871
		"    System.out.println();\n" + 
872
		"    class Z {\n" + 
873
		"      Z() {\n" + 
874
		"        super();\n" + 
875
		"      }\n" + 
876
		"      void foo() {\n" + 
877
		"      }\n" + 
878
		"    }\n" + 
879
		"    System.out.println();\n" + 
880
		"  }\n" + 
881
		"}\n";
882
	
883
	String expectedFullUnitToString =
884
		expectedDietPlusBodyUnitToString;
885
	
886
	String expectedFullWithStatementRecoveryUnitToString =
887
		expectedDietPlusBodyUnitToString;
888
	
889
	String testName = "<test>";
890
	checkParse(
891
		s.toCharArray(),
892
		expectedDietUnitToString,
893
		expectedDietWithStatementRecoveryUnitToString,
894
		expectedDietPlusBodyUnitToString,
895
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
896
		expectedFullUnitToString,
897
		expectedFullWithStatementRecoveryUnitToString,
898
		testName);
899
}
900
public void test0011() {
901
902
	String s = 
903
		"package a;											\n"
904
			+ "public class X {								\n"
905
			+ "  void foo() {								\n"
906
			+ "    System.out.println();					\n"
907
			+ "    class Z {								\n"
908
			+ "      void foo() {}							\n"
909
			+ "    }										\n"
910
			+ "    System.out.println();					\n"
911
			+ "    #										\n"
912
			+ "  }											\n"
913
			+ "}											\n"; 	
914
915
	String expectedDietUnitToString = 
916
		"package a;\n" + 
917
		"public class X {\n" + 
918
		"  public X() {\n" + 
919
		"  }\n" + 
920
		"  void foo() {\n" + 
921
		"  }\n" + 
922
		"}\n";
923
	
924
	String expectedDietWithStatementRecoveryUnitToString =
925
		expectedDietUnitToString;
926
	
927
	String expectedDietPlusBodyUnitToString = 
928
		"package a;\n" + 
929
		"public class X {\n" + 
930
		"  public X() {\n" + 
931
		"    super();\n" + 
932
		"  }\n" + 
933
		"  void foo() {\n" + 
934
		"  }\n" + 
935
		"}\n";
936
937
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
938
		"package a;\n" + 
939
		"public class X {\n" + 
940
		"  public X() {\n" + 
941
		"    super();\n" + 
942
		"  }\n" + 
943
		"  void foo() {\n" + 
944
		"    System.out.println();\n" + 
945
		"    class Z {\n" + 
946
		"      Z() {\n" + 
947
		"        super();\n" + 
948
		"      }\n" + 
949
		"      void foo() {\n" + 
950
		"      }\n" + 
951
		"    }\n" + 
952
		"    System.out.println();\n" + 
953
		"  }\n" + 
954
		"}\n";
955
	
956
	String expectedFullUnitToString =
957
		expectedDietUnitToString;
958
	
959
	String expectedFullWithStatementRecoveryUnitToString =
960
		expectedDietUnitToString;
961
	
962
	String testName = "<test>";
963
	checkParse(
964
		s.toCharArray(),
965
		expectedDietUnitToString,
966
		expectedDietWithStatementRecoveryUnitToString,
967
		expectedDietPlusBodyUnitToString,
968
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
969
		expectedFullUnitToString,
970
		expectedFullWithStatementRecoveryUnitToString,
971
		testName);
972
}
973
public void test0012() {
974
975
	String s = 
976
		"package a;											\n"
977
			+ "public class X {								\n"
978
			+ "  void foo() {								\n"
979
			+ "    #										\n"
980
			+ "    System.out.println();					\n"
981
			+ "    class Z {								\n"
982
			+ "      void foo() {}							\n"
983
			+ "    }										\n"
984
			+ "    System.out.println();					\n"
985
			+ "  }											\n"
986
			+ "}											\n"; 	
987
988
	String expectedDietUnitToString = 
989
		"package a;\n" + 
990
		"public class X {\n" + 
991
		"  public X() {\n" + 
992
		"  }\n" + 
993
		"  void foo() {\n" + 
994
		"  }\n" + 
995
		"}\n";
996
	
997
	String expectedDietWithStatementRecoveryUnitToString =
998
		expectedDietUnitToString;
999
	
1000
	String expectedDietPlusBodyUnitToString = 
1001
		"package a;\n" + 
1002
		"public class X {\n" + 
1003
		"  public X() {\n" + 
1004
		"    super();\n" + 
1005
		"  }\n" + 
1006
		"  void foo() {\n" + 
1007
		"  }\n" + 
1008
		"}\n";
1009
1010
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1011
		"package a;\n" + 
1012
		"public class X {\n" + 
1013
		"  public X() {\n" + 
1014
		"    super();\n" + 
1015
		"  }\n" + 
1016
		"  void foo() {\n" + 
1017
		"    System.out.println();\n" + 
1018
		"    class Z {\n" + 
1019
		"      Z() {\n" + 
1020
		"        super();\n" + 
1021
		"      }\n" + 
1022
		"      void foo() {\n" + 
1023
		"      }\n" + 
1024
		"    }\n" + 
1025
		"    System.out.println();\n" + 
1026
		"  }\n" + 
1027
		"}\n";
1028
	
1029
	String expectedFullUnitToString =
1030
		expectedDietUnitToString;
1031
	
1032
	String expectedFullWithStatementRecoveryUnitToString =
1033
		expectedDietUnitToString;
1034
	
1035
	String testName = "<test>";
1036
	checkParse(
1037
		s.toCharArray(),
1038
		expectedDietUnitToString,
1039
		expectedDietWithStatementRecoveryUnitToString,
1040
		expectedDietPlusBodyUnitToString,
1041
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1042
		expectedFullUnitToString,
1043
		expectedFullWithStatementRecoveryUnitToString,
1044
		testName);
1045
}
1046
public void test0013() {
1047
1048
	String s = 
1049
		"package a;											\n"
1050
			+ "public class X {								\n"
1051
			+ "  void foo() {								\n"
1052
			+ "    System.out.println();					\n"
1053
			+ "    class Z {								\n"
1054
			+ "      void foo() {}							\n"
1055
			+ "    }										\n"
1056
			+ "    System.out.println();					\n"
1057
			+ "    #										\n"
1058
			+ "    System.out.println();					\n"
1059
			+ "    class Y {								\n"
1060
			+ "      void foo() {}							\n"
1061
			+ "    }										\n"
1062
			+ "    System.out.println();					\n"
1063
			+ "  }											\n"
1064
			+ "}											\n"; 	
1065
1066
	String expectedDietUnitToString = 
1067
		"package a;\n" + 
1068
		"public class X {\n" + 
1069
		"  public X() {\n" + 
1070
		"  }\n" + 
1071
		"  void foo() {\n" + 
1072
		"  }\n" + 
1073
		"}\n";
1074
	
1075
	String expectedDietWithStatementRecoveryUnitToString =
1076
		expectedDietUnitToString;
1077
	
1078
	String expectedDietPlusBodyUnitToString = 
1079
		"package a;\n" + 
1080
		"public class X {\n" + 
1081
		"  public X() {\n" + 
1082
		"    super();\n" + 
1083
		"  }\n" + 
1084
		"  void foo() {\n" + 
1085
		"  }\n" + 
1086
		"}\n";
1087
1088
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1089
		"package a;\n" + 
1090
		"public class X {\n" + 
1091
		"  public X() {\n" + 
1092
		"    super();\n" + 
1093
		"  }\n" + 
1094
		"  void foo() {\n" + 
1095
		"    System.out.println();\n" + 
1096
		"    class Z {\n" + 
1097
		"      Z() {\n" + 
1098
		"        super();\n" + 
1099
		"      }\n" + 
1100
		"      void foo() {\n" + 
1101
		"      }\n" + 
1102
		"    }\n" + 
1103
		"    System.out.println();\n" + 
1104
		"    System.out.println();\n" + 
1105
		"    class Y {\n" + 
1106
		"      Y() {\n" + 
1107
		"        super();\n" + 
1108
		"      }\n" + 
1109
		"      void foo() {\n" + 
1110
		"      }\n" + 
1111
		"    }\n" + 
1112
		"    System.out.println();\n" + 
1113
		"  }\n" + 
1114
		"}\n";
1115
	
1116
	String expectedFullUnitToString =
1117
		expectedDietUnitToString;
1118
	
1119
	String expectedFullWithStatementRecoveryUnitToString =
1120
		expectedDietUnitToString;
1121
	
1122
	String testName = "<test>";
1123
	checkParse(
1124
		s.toCharArray(),
1125
		expectedDietUnitToString,
1126
		expectedDietWithStatementRecoveryUnitToString,
1127
		expectedDietPlusBodyUnitToString,
1128
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1129
		expectedFullUnitToString,
1130
		expectedFullWithStatementRecoveryUnitToString,
1131
		testName);
1132
}
1133
public void test0014() {
1134
1135
	String s = 
1136
		"package a;											\n"
1137
			+ "public class X {								\n"
1138
			+ "  void foo() {								\n"
1139
			+ "    System.out.println();					\n"
1140
			+ "    class Z {								\n"
1141
			+ "      void foo() {							\n"
1142
			+ "        System.out.println();				\n"
1143
			+ "      }										\n"
1144
			+ "    }										\n"
1145
			+ "    System.out.println();					\n"
1146
			+ "    #										\n"
1147
			+ "  }											\n"
1148
			+ "}											\n"; 	
1149
1150
	String expectedDietUnitToString = 
1151
		"package a;\n" + 
1152
		"public class X {\n" + 
1153
		"  public X() {\n" + 
1154
		"  }\n" + 
1155
		"  void foo() {\n" + 
1156
		"  }\n" + 
1157
		"}\n";
1158
	
1159
	String expectedDietWithStatementRecoveryUnitToString =
1160
		expectedDietUnitToString;
1161
	
1162
	String expectedDietPlusBodyUnitToString = 
1163
		"package a;\n" + 
1164
		"public class X {\n" + 
1165
		"  public X() {\n" + 
1166
		"    super();\n" + 
1167
		"  }\n" + 
1168
		"  void foo() {\n" + 
1169
		"  }\n" + 
1170
		"}\n";
1171
1172
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1173
		"package a;\n" + 
1174
		"public class X {\n" + 
1175
		"  public X() {\n" + 
1176
		"    super();\n" + 
1177
		"  }\n" + 
1178
		"  void foo() {\n" + 
1179
		"    System.out.println();\n" + 
1180
		"    class Z {\n" + 
1181
		"      Z() {\n" + 
1182
		"        super();\n" + 
1183
		"      }\n" + 
1184
		"      void foo() {\n" + 
1185
		"        System.out.println();\n" + 
1186
		"      }\n" + 
1187
		"    }\n" + 
1188
		"    System.out.println();\n" + 
1189
		"  }\n" + 
1190
		"}\n";
1191
	
1192
	String expectedFullUnitToString =
1193
		expectedDietUnitToString;
1194
	
1195
	String expectedFullWithStatementRecoveryUnitToString =
1196
		expectedDietUnitToString;
1197
	
1198
	String testName = "<test>";
1199
	checkParse(
1200
		s.toCharArray(),
1201
		expectedDietUnitToString,
1202
		expectedDietWithStatementRecoveryUnitToString,
1203
		expectedDietPlusBodyUnitToString,
1204
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1205
		expectedFullUnitToString,
1206
		expectedFullWithStatementRecoveryUnitToString,
1207
		testName);
1208
}
1209
public void test0015() {
1210
1211
	String s = 
1212
		"package a;											\n"
1213
			+ "public class X {								\n"
1214
			+ "  void foo() {								\n"
1215
			+ "    #										\n"
1216
			+ "    System.out.println();					\n"
1217
			+ "    class Z {								\n"
1218
			+ "      void foo() {							\n"
1219
			+ "        System.out.println();				\n"
1220
			+ "      }										\n"
1221
			+ "    }										\n"
1222
			+ "    System.out.println();					\n"
1223
			+ "  }											\n"
1224
			+ "}											\n"; 	
1225
1226
	String expectedDietUnitToString = 
1227
		"package a;\n" + 
1228
		"public class X {\n" + 
1229
		"  public X() {\n" + 
1230
		"  }\n" + 
1231
		"  void foo() {\n" + 
1232
		"  }\n" + 
1233
		"}\n";
1234
	
1235
	String expectedDietWithStatementRecoveryUnitToString =
1236
		expectedDietUnitToString;
1237
	
1238
	String expectedDietPlusBodyUnitToString = 
1239
		"package a;\n" + 
1240
		"public class X {\n" + 
1241
		"  public X() {\n" + 
1242
		"    super();\n" + 
1243
		"  }\n" + 
1244
		"  void foo() {\n" + 
1245
		"  }\n" + 
1246
		"}\n";
1247
1248
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1249
		"package a;\n" + 
1250
		"public class X {\n" + 
1251
		"  public X() {\n" + 
1252
		"    super();\n" + 
1253
		"  }\n" + 
1254
		"  void foo() {\n" + 
1255
		"    System.out.println();\n" + 
1256
		"    class Z {\n" + 
1257
		"      Z() {\n" + 
1258
		"        super();\n" + 
1259
		"      }\n" + 
1260
		"      void foo() {\n" + 
1261
		"        System.out.println();\n" + 
1262
		"      }\n" + 
1263
		"    }\n" + 
1264
		"    System.out.println();\n" + 
1265
		"  }\n" + 
1266
		"}\n";
1267
	
1268
	String expectedFullUnitToString =
1269
		expectedDietUnitToString;
1270
	
1271
	String expectedFullWithStatementRecoveryUnitToString =
1272
		expectedDietUnitToString;
1273
	
1274
	String testName = "<test>";
1275
	checkParse(
1276
		s.toCharArray(),
1277
		expectedDietUnitToString,
1278
		expectedDietWithStatementRecoveryUnitToString,
1279
		expectedDietPlusBodyUnitToString,
1280
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1281
		expectedFullUnitToString,
1282
		expectedFullWithStatementRecoveryUnitToString,
1283
		testName);
1284
}
1285
public void test0016() {
1286
1287
	String s = 
1288
		"package a;											\n"
1289
			+ "public class X {								\n"
1290
			+ "  void foo() {								\n"
1291
			+ "    System.out.println();					\n"
1292
			+ "    class Z {								\n"
1293
			+ "      void foo() {							\n"
1294
			+ "        System.out.println();				\n"
1295
			+ "      }										\n"
1296
			+ "    }										\n"
1297
			+ "    System.out.println();					\n"
1298
			+ "    #										\n"
1299
			+ "    System.out.println();					\n"
1300
			+ "    class Z {								\n"
1301
			+ "      void foo() {							\n"
1302
			+ "        System.out.println();				\n"
1303
			+ "      }										\n"
1304
			+ "    }										\n"
1305
			+ "    System.out.println();					\n"
1306
			+ "  }											\n"
1307
			+ "}											\n"; 	
1308
1309
	String expectedDietUnitToString = 
1310
		"package a;\n" + 
1311
		"public class X {\n" + 
1312
		"  public X() {\n" + 
1313
		"  }\n" + 
1314
		"  void foo() {\n" + 
1315
		"  }\n" + 
1316
		"}\n";
1317
	
1318
	String expectedDietWithStatementRecoveryUnitToString =
1319
		expectedDietUnitToString;
1320
	
1321
	String expectedDietPlusBodyUnitToString = 
1322
		"package a;\n" + 
1323
		"public class X {\n" + 
1324
		"  public X() {\n" + 
1325
		"    super();\n" + 
1326
		"  }\n" + 
1327
		"  void foo() {\n" + 
1328
		"  }\n" + 
1329
		"}\n";
1330
1331
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1332
		"package a;\n" + 
1333
		"public class X {\n" + 
1334
		"  public X() {\n" + 
1335
		"    super();\n" + 
1336
		"  }\n" + 
1337
		"  void foo() {\n" + 
1338
		"    System.out.println();\n" + 
1339
		"    class Z {\n" + 
1340
		"      Z() {\n" + 
1341
		"        super();\n" + 
1342
		"      }\n" + 
1343
		"      void foo() {\n" + 
1344
		"        System.out.println();\n" + 
1345
		"      }\n" + 
1346
		"    }\n" + 
1347
		"    System.out.println();\n" + 
1348
		"    System.out.println();\n" + 
1349
		"    class Z {\n" + 
1350
		"      Z() {\n" + 
1351
		"        super();\n" + 
1352
		"      }\n" + 
1353
		"      void foo() {\n" + 
1354
		"        System.out.println();\n" + 
1355
		"      }\n" + 
1356
		"    }\n" + 
1357
		"    System.out.println();\n" + 
1358
		"  }\n" + 
1359
		"}\n";
1360
	
1361
	String expectedFullUnitToString =
1362
		expectedDietUnitToString;
1363
	
1364
	String expectedFullWithStatementRecoveryUnitToString =
1365
		expectedDietUnitToString;
1366
	
1367
	String testName = "<test>";
1368
	checkParse(
1369
		s.toCharArray(),
1370
		expectedDietUnitToString,
1371
		expectedDietWithStatementRecoveryUnitToString,
1372
		expectedDietPlusBodyUnitToString,
1373
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1374
		expectedFullUnitToString,
1375
		expectedFullWithStatementRecoveryUnitToString,
1376
		testName);
1377
}
1378
public void test0017() {
1379
1380
	String s = 
1381
		"package a;											\n"
1382
			+ "public class X {								\n"
1383
			+ "  void foo() {								\n"
1384
			+ "    System.out.println();					\n"
1385
			+ "    class Z {								\n"
1386
			+ "      void foo() {							\n"
1387
			+ "        System.out.println();				\n"
1388
			+ "        if(true) {							\n"
1389
			+ "          System.out.println();				\n"
1390
			+ "        }									\n"
1391
			+ "        System.out.println();				\n"
1392
			+ "        #									\n"
1393
			+ "      }										\n"
1394
			+ "    }										\n"
1395
			+ "    System.out.println();					\n"
1396
			+ "  }											\n"
1397
			+ "}											\n"; 	
1398
1399
	String expectedDietUnitToString = 
1400
		"package a;\n" + 
1401
		"public class X {\n" + 
1402
		"  public X() {\n" + 
1403
		"  }\n" + 
1404
		"  void foo() {\n" + 
1405
		"  }\n" + 
1406
		"}\n";
1407
	
1408
	String expectedDietWithStatementRecoveryUnitToString =
1409
		expectedDietUnitToString;
1410
	
1411
	String expectedDietPlusBodyUnitToString = 
1412
		"package a;\n" + 
1413
		"public class X {\n" + 
1414
		"  public X() {\n" + 
1415
		"    super();\n" + 
1416
		"  }\n" + 
1417
		"  void foo() {\n" + 
1418
		"  }\n" + 
1419
		"}\n";
1420
1421
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1422
		"package a;\n" + 
1423
		"public class X {\n" + 
1424
		"  public X() {\n" + 
1425
		"    super();\n" + 
1426
		"  }\n" + 
1427
		"  void foo() {\n" + 
1428
		"    System.out.println();\n" + 
1429
		"    class Z {\n" + 
1430
		"      Z() {\n" + 
1431
		"        super();\n" + 
1432
		"      }\n" + 
1433
		"      void foo() {\n" + 
1434
		"        System.out.println();\n" + 
1435
		"        if (true)\n" + 
1436
		"            {\n" + 
1437
		"              System.out.println();\n" + 
1438
		"            }\n" + 
1439
		"        System.out.println();\n" + 
1440
		"      }\n" + 
1441
		"    }\n" + 
1442
		"    System.out.println();\n" + 
1443
		"  }\n" + 
1444
		"}\n";
1445
	
1446
	String expectedFullUnitToString =
1447
		expectedDietUnitToString;
1448
	
1449
	String expectedFullWithStatementRecoveryUnitToString =
1450
		expectedDietUnitToString;
1451
	
1452
	String testName = "<test>";
1453
	checkParse(
1454
		s.toCharArray(),
1455
		expectedDietUnitToString,
1456
		expectedDietWithStatementRecoveryUnitToString,
1457
		expectedDietPlusBodyUnitToString,
1458
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1459
		expectedFullUnitToString,
1460
		expectedFullWithStatementRecoveryUnitToString,
1461
		testName);
1462
}
1463
public void test0018() {
1464
1465
	String s = 
1466
		"package a;											\n"
1467
			+ "public class X {								\n"
1468
			+ "  void foo() {								\n"
1469
			+ "    System.out.println();					\n"
1470
			+ "    class Z {								\n"
1471
			+ "      void foo() {							\n"
1472
			+ "        #									\n"
1473
			+ "        System.out.println();				\n"
1474
			+ "        if(true) {							\n"
1475
			+ "          System.out.println();				\n"
1476
			+ "        }									\n"
1477
			+ "        System.out.println();				\n"
1478
			+ "      }										\n"
1479
			+ "    }										\n"
1480
			+ "    System.out.println();					\n"
1481
			+ "  }											\n"
1482
			+ "}											\n"; 	
1483
1484
	String expectedDietUnitToString = 
1485
		"package a;\n" + 
1486
		"public class X {\n" + 
1487
		"  public X() {\n" + 
1488
		"  }\n" + 
1489
		"  void foo() {\n" + 
1490
		"  }\n" + 
1491
		"}\n";
1492
	
1493
	String expectedDietWithStatementRecoveryUnitToString =
1494
		expectedDietUnitToString;
1495
	
1496
	String expectedDietPlusBodyUnitToString = 
1497
		"package a;\n" + 
1498
		"public class X {\n" + 
1499
		"  public X() {\n" + 
1500
		"    super();\n" + 
1501
		"  }\n" + 
1502
		"  void foo() {\n" + 
1503
		"  }\n" + 
1504
		"}\n";
1505
1506
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1507
		"package a;\n" + 
1508
		"public class X {\n" + 
1509
		"  public X() {\n" + 
1510
		"    super();\n" + 
1511
		"  }\n" + 
1512
		"  void foo() {\n" + 
1513
		"    System.out.println();\n" + 
1514
		"    class Z {\n" + 
1515
		"      Z() {\n" + 
1516
		"        super();\n" + 
1517
		"      }\n" + 
1518
		"      void foo() {\n" + 
1519
		"        System.out.println();\n" + 
1520
		"        if (true)\n" + 
1521
		"            {\n" + 
1522
		"              System.out.println();\n" + 
1523
		"            }\n" + 
1524
		"        System.out.println();\n" + 
1525
		"      }\n" + 
1526
		"    }\n" + 
1527
		"    System.out.println();\n" + 
1528
		"  }\n" + 
1529
		"}\n";
1530
	
1531
	String expectedFullUnitToString =
1532
		expectedDietUnitToString;
1533
	
1534
	String expectedFullWithStatementRecoveryUnitToString =
1535
		expectedDietUnitToString;
1536
	
1537
	String testName = "<test>";
1538
	checkParse(
1539
		s.toCharArray(),
1540
		expectedDietUnitToString,
1541
		expectedDietWithStatementRecoveryUnitToString,
1542
		expectedDietPlusBodyUnitToString,
1543
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1544
		expectedFullUnitToString,
1545
		expectedFullWithStatementRecoveryUnitToString,
1546
		testName);
1547
}
1548
public void test0019() {
1549
1550
	String s = 
1551
		"package a;											\n"
1552
			+ "public class X {								\n"
1553
			+ "  void foo() {								\n"
1554
			+ "    System.out.println();					\n"
1555
			+ "    class Z {								\n"
1556
			+ "      void foo() {							\n"
1557
			+ "        System.out.println();				\n"
1558
			+ "        if(true) {							\n"
1559
			+ "          System.out.println();				\n"
1560
			+ "        }									\n"
1561
			+ "        System.out.println();				\n"
1562
			+ "        #									\n"
1563
			+ "        System.out.println();				\n"
1564
			+ "        if(true) {							\n"
1565
			+ "          System.out.println();				\n"
1566
			+ "        }									\n"
1567
			+ "        System.out.println();				\n"
1568
			+ "      }										\n"
1569
			+ "    }										\n"
1570
			+ "    System.out.println();					\n"
1571
			+ "  }											\n"
1572
			+ "}											\n"; 	
1573
1574
	String expectedDietUnitToString = 
1575
		"package a;\n" + 
1576
		"public class X {\n" + 
1577
		"  public X() {\n" + 
1578
		"  }\n" + 
1579
		"  void foo() {\n" + 
1580
		"  }\n" + 
1581
		"}\n";
1582
	
1583
	String expectedDietWithStatementRecoveryUnitToString =
1584
		expectedDietUnitToString;
1585
	
1586
	String expectedDietPlusBodyUnitToString = 
1587
		"package a;\n" + 
1588
		"public class X {\n" + 
1589
		"  public X() {\n" + 
1590
		"    super();\n" + 
1591
		"  }\n" + 
1592
		"  void foo() {\n" + 
1593
		"  }\n" + 
1594
		"}\n";
1595
1596
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1597
		"package a;\n" + 
1598
		"public class X {\n" + 
1599
		"  public X() {\n" + 
1600
		"    super();\n" + 
1601
		"  }\n" + 
1602
		"  void foo() {\n" + 
1603
		"    System.out.println();\n" + 
1604
		"    class Z {\n" + 
1605
		"      Z() {\n" + 
1606
		"        super();\n" + 
1607
		"      }\n" + 
1608
		"      void foo() {\n" + 
1609
		"        System.out.println();\n" + 
1610
		"        if (true)\n" + 
1611
		"            {\n" + 
1612
		"              System.out.println();\n" + 
1613
		"            }\n" + 
1614
		"        System.out.println();\n" + 
1615
		"        System.out.println();\n" + 
1616
		"        if (true)\n" + 
1617
		"            {\n" + 
1618
		"              System.out.println();\n" + 
1619
		"            }\n" + 
1620
		"        System.out.println();\n" + 
1621
		"      }\n" + 
1622
		"    }\n" + 
1623
		"    System.out.println();\n" + 
1624
		"  }\n" + 
1625
		"}\n";
1626
	
1627
	String expectedFullUnitToString =
1628
		expectedDietUnitToString;
1629
	
1630
	String expectedFullWithStatementRecoveryUnitToString =
1631
		expectedDietUnitToString;
1632
	
1633
	String testName = "<test>";
1634
	checkParse(
1635
		s.toCharArray(),
1636
		expectedDietUnitToString,
1637
		expectedDietWithStatementRecoveryUnitToString,
1638
		expectedDietPlusBodyUnitToString,
1639
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1640
		expectedFullUnitToString,
1641
		expectedFullWithStatementRecoveryUnitToString,
1642
		testName);
1643
}
1644
public void test0020() {
1645
1646
	String s = 
1647
		"package a;											\n"
1648
			+ "public class X {								\n"
1649
			+ "  void foo() {								\n"
1650
			+ "    #										\n"
1651
			+ "    System.out.println();					\n"
1652
			+ "    class Z {								\n"
1653
			+ "      void foo() {							\n"
1654
			+ "        System.out.println();				\n"
1655
			+ "        if(true) {							\n"
1656
			+ "          System.out.println();				\n"
1657
			+ "        }									\n"
1658
			+ "        System.out.println();				\n"
1659
			+ "        #									\n"
1660
			+ "        System.out.println();				\n"
1661
			+ "        if(true) {							\n"
1662
			+ "          System.out.println();				\n"
1663
			+ "        }									\n"
1664
			+ "        System.out.println();				\n"
1665
			+ "      }										\n"
1666
			+ "    }										\n"
1667
			+ "    System.out.println();					\n"
1668
			+ "  }											\n"
1669
			+ "}											\n"; 	
1670
1671
	String expectedDietUnitToString = 
1672
		"package a;\n" + 
1673
		"public class X {\n" + 
1674
		"  public X() {\n" + 
1675
		"  }\n" + 
1676
		"  void foo() {\n" + 
1677
		"  }\n" + 
1678
		"}\n";
1679
	
1680
	String expectedDietWithStatementRecoveryUnitToString =
1681
		expectedDietUnitToString;
1682
	
1683
	String expectedDietPlusBodyUnitToString = 
1684
		"package a;\n" + 
1685
		"public class X {\n" + 
1686
		"  public X() {\n" + 
1687
		"    super();\n" + 
1688
		"  }\n" + 
1689
		"  void foo() {\n" + 
1690
		"  }\n" + 
1691
		"}\n";
1692
1693
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1694
		"package a;\n" + 
1695
		"public class X {\n" + 
1696
		"  public X() {\n" + 
1697
		"    super();\n" + 
1698
		"  }\n" + 
1699
		"  void foo() {\n" + 
1700
		"    System.out.println();\n" + 
1701
		"    class Z {\n" + 
1702
		"      Z() {\n" + 
1703
		"        super();\n" + 
1704
		"      }\n" + 
1705
		"      void foo() {\n" + 
1706
		"        System.out.println();\n" + 
1707
		"        if (true)\n" + 
1708
		"            {\n" + 
1709
		"              System.out.println();\n" + 
1710
		"            }\n" + 
1711
		"        System.out.println();\n" + 
1712
		"        System.out.println();\n" + 
1713
		"        if (true)\n" + 
1714
		"            {\n" + 
1715
		"              System.out.println();\n" + 
1716
		"            }\n" + 
1717
		"        System.out.println();\n" + 
1718
		"      }\n" + 
1719
		"    }\n" + 
1720
		"    System.out.println();\n" + 
1721
		"  }\n" + 
1722
		"}\n";
1723
	
1724
	String expectedFullUnitToString =
1725
		expectedDietUnitToString;
1726
	
1727
	String expectedFullWithStatementRecoveryUnitToString =
1728
		expectedDietUnitToString;
1729
	
1730
	String testName = "<test>";
1731
	checkParse(
1732
		s.toCharArray(),
1733
		expectedDietUnitToString,
1734
		expectedDietWithStatementRecoveryUnitToString,
1735
		expectedDietPlusBodyUnitToString,
1736
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1737
		expectedFullUnitToString,
1738
		expectedFullWithStatementRecoveryUnitToString,
1739
		testName);
1740
}
1741
public void test0021() {
1742
1743
	String s = 
1744
		"package a;											\n"
1745
			+ "public class X {								\n"
1746
			+ "  void foo() {								\n"
1747
			+ "    System.out.println();					\n"
1748
			+ "    new Object() {							\n"
1749
			+ "      void foo() {}							\n"
1750
			+ "    };										\n"
1751
			+ "    System.out.println();					\n"
1752
			+ "  }											\n"
1753
			+ "}											\n"; 	
1754
1755
	String expectedDietUnitToString = 
1756
		"package a;\n" + 
1757
		"public class X {\n" + 
1758
		"  public X() {\n" + 
1759
		"  }\n" + 
1760
		"  void foo() {\n" + 
1761
		"  }\n" + 
1762
		"}\n";
1763
	
1764
	String expectedDietWithStatementRecoveryUnitToString =
1765
		expectedDietUnitToString;
1766
	
1767
	String expectedDietPlusBodyUnitToString = 
1768
		"package a;\n" + 
1769
		"public class X {\n" + 
1770
		"  public X() {\n" + 
1771
		"    super();\n" + 
1772
		"  }\n" + 
1773
		"  void foo() {\n" + 
1774
		"    System.out.println();\n" + 
1775
		"    new Object() {\n" + 
1776
		"      void foo() {\n" + 
1777
		"      }\n" + 
1778
		"    };\n" + 
1779
		"    System.out.println();\n" + 
1780
		"  }\n" + 
1781
		"}\n";
1782
1783
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1784
		"package a;\n" + 
1785
		"public class X {\n" + 
1786
		"  public X() {\n" + 
1787
		"    super();\n" + 
1788
		"  }\n" + 
1789
		"  void foo() {\n" + 
1790
		"    System.out.println();\n" + 
1791
		"    new Object() {\n" + 
1792
		"      void foo() {\n" + 
1793
		"      }\n" + 
1794
		"    };\n" + 
1795
		"    System.out.println();\n" + 
1796
		"  }\n" + 
1797
		"}\n";
1798
	
1799
	String expectedFullUnitToString =
1800
		expectedDietPlusBodyUnitToString;
1801
	
1802
	String expectedFullWithStatementRecoveryUnitToString =
1803
		expectedDietPlusBodyUnitToString;
1804
	
1805
	String testName = "<test>";
1806
	checkParse(
1807
		s.toCharArray(),
1808
		expectedDietUnitToString,
1809
		expectedDietWithStatementRecoveryUnitToString,
1810
		expectedDietPlusBodyUnitToString,
1811
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1812
		expectedFullUnitToString,
1813
		expectedFullWithStatementRecoveryUnitToString,
1814
		testName);
1815
}
1816
public void test0022() {
1817
1818
	String s = 
1819
		"package a;											\n"
1820
			+ "public class X {								\n"
1821
			+ "  void foo() {								\n"
1822
			+ "    System.out.println();					\n"
1823
			+ "    new Object() {							\n"
1824
			+ "      void foo() {}							\n"
1825
			+ "    };										\n"
1826
			+ "    System.out.println();					\n"
1827
			+ "    #										\n"
1828
			+ "  }											\n"
1829
			+ "}											\n"; 	
1830
1831
	String expectedDietUnitToString = 
1832
		"package a;\n" + 
1833
		"public class X {\n" + 
1834
		"  public X() {\n" + 
1835
		"  }\n" + 
1836
		"  void foo() {\n" + 
1837
		"  }\n" + 
1838
		"}\n";
1839
	
1840
	String expectedDietWithStatementRecoveryUnitToString =
1841
		expectedDietUnitToString;
1842
	
1843
	String expectedDietPlusBodyUnitToString = 
1844
		"package a;\n" + 
1845
		"public class X {\n" + 
1846
		"  public X() {\n" + 
1847
		"    super();\n" + 
1848
		"  }\n" + 
1849
		"  void foo() {\n" + 
1850
		"  }\n" + 
1851
		"}\n";
1852
1853
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1854
		"package a;\n" + 
1855
		"public class X {\n" + 
1856
		"  public X() {\n" + 
1857
		"    super();\n" + 
1858
		"  }\n" + 
1859
		"  void foo() {\n" + 
1860
		"    System.out.println();\n" + 
1861
		"    new Object() {\n" + 
1862
		"      () {\n" + 
1863
		"        super();\n" + 
1864
		"      }\n" + 
1865
		"      void foo() {\n" + 
1866
		"      }\n" + 
1867
		"    };\n" + 
1868
		"    System.out.println();\n" + 
1869
		"  }\n" + 
1870
		"}\n";
1871
	
1872
	String expectedFullUnitToString =
1873
		expectedDietUnitToString;
1874
	
1875
	String expectedFullWithStatementRecoveryUnitToString =
1876
		expectedDietUnitToString;
1877
	
1878
	String testName = "<test>";
1879
	checkParse(
1880
		s.toCharArray(),
1881
		expectedDietUnitToString,
1882
		expectedDietWithStatementRecoveryUnitToString,
1883
		expectedDietPlusBodyUnitToString,
1884
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1885
		expectedFullUnitToString,
1886
		expectedFullWithStatementRecoveryUnitToString,
1887
		testName);
1888
}
1889
public void test0023() {
1890
1891
	String s = 
1892
		"package a;											\n"
1893
			+ "public class X {								\n"
1894
			+ "  void foo() {								\n"
1895
			+ "    #										\n"
1896
			+ "    System.out.println();					\n"
1897
			+ "    new Object() {							\n"
1898
			+ "      void bar() {}							\n"
1899
			+ "    };										\n"
1900
			+ "    System.out.println();					\n"
1901
			+ "  }											\n"
1902
			+ "}											\n"; 	
1903
1904
	String expectedDietUnitToString = 
1905
		"package a;\n" + 
1906
		"public class X {\n" + 
1907
		"  public X() {\n" + 
1908
		"  }\n" + 
1909
		"  void foo() {\n" + 
1910
		"  }\n" + 
1911
		"}\n";
1912
	
1913
	String expectedDietWithStatementRecoveryUnitToString =
1914
		expectedDietUnitToString;
1915
	
1916
	String expectedDietPlusBodyUnitToString = 
1917
		"package a;\n" + 
1918
		"public class X {\n" + 
1919
		"  public X() {\n" + 
1920
		"    super();\n" + 
1921
		"  }\n" + 
1922
		"  void foo() {\n" + 
1923
		"  }\n" + 
1924
		"}\n";
1925
1926
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
1927
		"package a;\n" + 
1928
		"public class X {\n" + 
1929
		"  public X() {\n" + 
1930
		"    super();\n" + 
1931
		"  }\n" + 
1932
		"  void foo() {\n" + 
1933
		"    System.out.println();\n" + 
1934
		"    new Object() {\n" + 
1935
		"      () {\n" + 
1936
		"        super();\n" + 
1937
		"      }\n" + 
1938
		"      void bar() {\n" + 
1939
		"      }\n" + 
1940
		"    };\n" + 
1941
		"    System.out.println();\n" + 
1942
		"  }\n" + 
1943
		"}\n";
1944
	
1945
	String expectedFullUnitToString =
1946
		expectedDietUnitToString;
1947
	
1948
	String expectedFullWithStatementRecoveryUnitToString =
1949
		expectedDietUnitToString;
1950
	
1951
	String testName = "<test>";
1952
	checkParse(
1953
		s.toCharArray(),
1954
		expectedDietUnitToString,
1955
		expectedDietWithStatementRecoveryUnitToString,
1956
		expectedDietPlusBodyUnitToString,
1957
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
1958
		expectedFullUnitToString,
1959
		expectedFullWithStatementRecoveryUnitToString,
1960
		testName);
1961
}
1962
public void test0024() {
1963
1964
	String s = 
1965
		"package a;											\n"
1966
			+ "public class X {								\n"
1967
			+ "  void foo() {								\n"
1968
			+ "    System.out.println();					\n"
1969
			+ "    new Object() {							\n"
1970
			+ "      void bar() {}							\n"
1971
			+ "    };										\n"
1972
			+ "    System.out.println();					\n"
1973
			+ "    #										\n"
1974
			+ "    System.out.println();					\n"
1975
			+ "    new Object() {							\n"
1976
			+ "      void bar() {}							\n"
1977
			+ "    };										\n"
1978
			+ "    System.out.println();					\n"
1979
			+ "  }											\n"
1980
			+ "}											\n"; 	
1981
1982
	String expectedDietUnitToString = 
1983
		"package a;\n" + 
1984
		"public class X {\n" + 
1985
		"  public X() {\n" + 
1986
		"  }\n" + 
1987
		"  void foo() {\n" + 
1988
		"  }\n" + 
1989
		"}\n";
1990
	
1991
	String expectedDietWithStatementRecoveryUnitToString =
1992
		expectedDietUnitToString;
1993
	
1994
	String expectedDietPlusBodyUnitToString = 
1995
		"package a;\n" + 
1996
		"public class X {\n" + 
1997
		"  public X() {\n" + 
1998
		"    super();\n" + 
1999
		"  }\n" + 
2000
		"  void foo() {\n" + 
2001
		"  }\n" + 
2002
		"}\n";
2003
2004
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2005
		"package a;\n" + 
2006
		"public class X {\n" + 
2007
		"  public X() {\n" + 
2008
		"    super();\n" + 
2009
		"  }\n" + 
2010
		"  void foo() {\n" + 
2011
		"    System.out.println();\n" + 
2012
		"    new Object() {\n" + 
2013
		"      () {\n" + 
2014
		"        super();\n" + 
2015
		"      }\n" + 
2016
		"      void bar() {\n" + 
2017
		"      }\n" + 
2018
		"    };\n" + 
2019
		"    System.out.println();\n" + 
2020
		"    System.out.println();\n" + 
2021
		"    new Object() {\n" + 
2022
		"      () {\n" + 
2023
		"        super();\n" + 
2024
		"      }\n" + 
2025
		"      void bar() {\n" + 
2026
		"      }\n" + 
2027
		"    };\n" + 
2028
		"    System.out.println();\n" + 
2029
		"  }\n" + 
2030
		"}\n";
2031
	
2032
	String expectedFullUnitToString =
2033
		expectedDietUnitToString;
2034
	
2035
	String expectedFullWithStatementRecoveryUnitToString =
2036
		expectedDietUnitToString;
2037
	
2038
	String testName = "<test>";
2039
	checkParse(
2040
		s.toCharArray(),
2041
		expectedDietUnitToString,
2042
		expectedDietWithStatementRecoveryUnitToString,
2043
		expectedDietPlusBodyUnitToString,
2044
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2045
		expectedFullUnitToString,
2046
		expectedFullWithStatementRecoveryUnitToString,
2047
		testName);
2048
}
2049
public void test0025() {
2050
2051
	String s = 
2052
		"package a;											\n"
2053
			+ "public class X {								\n"
2054
			+ "  void foo() {								\n"
2055
			+ "    System.out.println();					\n"
2056
			+ "    new Object() {							\n"
2057
			+ "      void foo() {							\n"
2058
			+ "        System.out.println();				\n"
2059
			+ "      }										\n"
2060
			+ "    };										\n"
2061
			+ "    System.out.println();					\n"
2062
			+ "    #										\n"
2063
			+ "  }											\n"
2064
			+ "}											\n"; 	
2065
2066
	String expectedDietUnitToString = 
2067
		"package a;\n" + 
2068
		"public class X {\n" + 
2069
		"  public X() {\n" + 
2070
		"  }\n" + 
2071
		"  void foo() {\n" + 
2072
		"  }\n" + 
2073
		"}\n";
2074
	
2075
	String expectedDietWithStatementRecoveryUnitToString =
2076
		expectedDietUnitToString;
2077
	
2078
	String expectedDietPlusBodyUnitToString = 
2079
		"package a;\n" + 
2080
		"public class X {\n" + 
2081
		"  public X() {\n" + 
2082
		"    super();\n" + 
2083
		"  }\n" + 
2084
		"  void foo() {\n" + 
2085
		"  }\n" + 
2086
		"}\n";
2087
2088
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2089
		"package a;\n" + 
2090
		"public class X {\n" + 
2091
		"  public X() {\n" + 
2092
		"    super();\n" + 
2093
		"  }\n" + 
2094
		"  void foo() {\n" + 
2095
		"    System.out.println();\n" + 
2096
		"    new Object() {\n" + 
2097
		"      () {\n" + 
2098
		"        super();\n" + 
2099
		"      }\n" + 
2100
		"      void foo() {\n" + 
2101
		"        System.out.println();\n" + 
2102
		"      }\n" + 
2103
		"    };\n" + 
2104
		"    System.out.println();\n" + 
2105
		"  }\n" + 
2106
		"}\n";
2107
	
2108
	String expectedFullUnitToString =
2109
		expectedDietUnitToString;
2110
	
2111
	String expectedFullWithStatementRecoveryUnitToString =
2112
		expectedDietUnitToString;
2113
	
2114
	String testName = "<test>";
2115
	checkParse(
2116
		s.toCharArray(),
2117
		expectedDietUnitToString,
2118
		expectedDietWithStatementRecoveryUnitToString,
2119
		expectedDietPlusBodyUnitToString,
2120
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2121
		expectedFullUnitToString,
2122
		expectedFullWithStatementRecoveryUnitToString,
2123
		testName);
2124
}
2125
public void test0026() {
2126
2127
	String s = 
2128
		"package a;											\n"
2129
			+ "public class X {								\n"
2130
			+ "  void foo() {								\n"
2131
			+ "    #										\n"
2132
			+ "    System.out.println();					\n"
2133
			+ "    new Object() {							\n"
2134
			+ "      void foo() {							\n"
2135
			+ "        System.out.println();				\n"
2136
			+ "      }										\n"
2137
			+ "    };										\n"
2138
			+ "    System.out.println();					\n"
2139
			+ "  }											\n"
2140
			+ "}											\n"; 	
2141
2142
	String expectedDietUnitToString = 
2143
		"package a;\n" + 
2144
		"public class X {\n" + 
2145
		"  public X() {\n" + 
2146
		"  }\n" + 
2147
		"  void foo() {\n" + 
2148
		"  }\n" + 
2149
		"}\n";
2150
	
2151
	String expectedDietWithStatementRecoveryUnitToString =
2152
		expectedDietUnitToString;
2153
	
2154
	String expectedDietPlusBodyUnitToString = 
2155
		"package a;\n" + 
2156
		"public class X {\n" + 
2157
		"  public X() {\n" + 
2158
		"    super();\n" + 
2159
		"  }\n" + 
2160
		"  void foo() {\n" + 
2161
		"  }\n" + 
2162
		"}\n";
2163
2164
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2165
		"package a;\n" + 
2166
		"public class X {\n" + 
2167
		"  public X() {\n" + 
2168
		"    super();\n" + 
2169
		"  }\n" + 
2170
		"  void foo() {\n" + 
2171
		"    System.out.println();\n" + 
2172
		"    new Object() {\n" + 
2173
		"      () {\n" + 
2174
		"        super();\n" + 
2175
		"      }\n" + 
2176
		"      void foo() {\n" + 
2177
		"        System.out.println();\n" + 
2178
		"      }\n" + 
2179
		"    };\n" + 
2180
		"    System.out.println();\n" + 
2181
		"  }\n" + 
2182
		"}\n";
2183
	
2184
	String expectedFullUnitToString =
2185
		expectedDietUnitToString;
2186
	
2187
	String expectedFullWithStatementRecoveryUnitToString =
2188
		expectedDietUnitToString;
2189
	
2190
	String testName = "<test>";
2191
	checkParse(
2192
		s.toCharArray(),
2193
		expectedDietUnitToString,
2194
		expectedDietWithStatementRecoveryUnitToString,
2195
		expectedDietPlusBodyUnitToString,
2196
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2197
		expectedFullUnitToString,
2198
		expectedFullWithStatementRecoveryUnitToString,
2199
		testName);
2200
}
2201
public void test0027() {
2202
2203
	String s = 
2204
		"package a;											\n"
2205
			+ "public class X {								\n"
2206
			+ "  void foo() {								\n"
2207
			+ "    System.out.println();					\n"
2208
			+ "    new Object() {							\n"
2209
			+ "      void foo() {							\n"
2210
			+ "        System.out.println();				\n"
2211
			+ "      }										\n"
2212
			+ "    };										\n"
2213
			+ "    System.out.println();					\n"
2214
			+ "    #										\n"
2215
			+ "    System.out.println();					\n"
2216
			+ "    new Object() {							\n"
2217
			+ "      void foo() {							\n"
2218
			+ "        System.out.println();				\n"
2219
			+ "      }										\n"
2220
			+ "    };										\n"
2221
			+ "    System.out.println();					\n"
2222
			+ "  }											\n"
2223
			+ "}											\n"; 	
2224
2225
	String expectedDietUnitToString = 
2226
		"package a;\n" + 
2227
		"public class X {\n" + 
2228
		"  public X() {\n" + 
2229
		"  }\n" + 
2230
		"  void foo() {\n" + 
2231
		"  }\n" + 
2232
		"}\n";
2233
	
2234
	String expectedDietWithStatementRecoveryUnitToString =
2235
		expectedDietUnitToString;
2236
	
2237
	String expectedDietPlusBodyUnitToString = 
2238
		"package a;\n" + 
2239
		"public class X {\n" + 
2240
		"  public X() {\n" + 
2241
		"    super();\n" + 
2242
		"  }\n" + 
2243
		"  void foo() {\n" + 
2244
		"  }\n" + 
2245
		"}\n";
2246
2247
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2248
		"package a;\n" + 
2249
		"public class X {\n" + 
2250
		"  public X() {\n" + 
2251
		"    super();\n" + 
2252
		"  }\n" + 
2253
		"  void foo() {\n" + 
2254
		"    System.out.println();\n" + 
2255
		"    new Object() {\n" + 
2256
		"      () {\n" + 
2257
		"        super();\n" + 
2258
		"      }\n" + 
2259
		"      void foo() {\n" + 
2260
		"        System.out.println();\n" + 
2261
		"      }\n" + 
2262
		"    };\n" + 
2263
		"    System.out.println();\n" + 
2264
		"    System.out.println();\n" + 
2265
		"    new Object() {\n" + 
2266
		"      () {\n" + 
2267
		"        super();\n" + 
2268
		"      }\n" + 
2269
		"      void foo() {\n" + 
2270
		"        System.out.println();\n" + 
2271
		"      }\n" + 
2272
		"    };\n" + 
2273
		"    System.out.println();\n" + 
2274
		"  }\n" + 
2275
		"}\n";
2276
	
2277
	String expectedFullUnitToString =
2278
		expectedDietUnitToString;
2279
	
2280
	String expectedFullWithStatementRecoveryUnitToString =
2281
		expectedDietUnitToString;
2282
	
2283
	String testName = "<test>";
2284
	checkParse(
2285
		s.toCharArray(),
2286
		expectedDietUnitToString,
2287
		expectedDietWithStatementRecoveryUnitToString,
2288
		expectedDietPlusBodyUnitToString,
2289
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2290
		expectedFullUnitToString,
2291
		expectedFullWithStatementRecoveryUnitToString,
2292
		testName);
2293
}
2294
public void test0028() {
2295
2296
	String s = 
2297
		"package a;											\n"
2298
			+ "public class X {								\n"
2299
			+ "  void foo() {								\n"
2300
			+ "    System.out.println();					\n"
2301
			+ "    new Object() {							\n"
2302
			+ "      void foo() {							\n"
2303
			+ "        System.out.println();				\n"
2304
			+ "        if(true) {							\n"
2305
			+ "          System.out.println();				\n"
2306
			+ "        }									\n"
2307
			+ "        System.out.println();				\n"
2308
			+ "        #									\n"
2309
			+ "      }										\n"
2310
			+ "    };										\n"
2311
			+ "    System.out.println();					\n"
2312
			+ "  }											\n"
2313
			+ "}											\n"; 	
2314
2315
	String expectedDietUnitToString = 
2316
		"package a;\n" + 
2317
		"public class X {\n" + 
2318
		"  public X() {\n" + 
2319
		"  }\n" + 
2320
		"  void foo() {\n" + 
2321
		"  }\n" + 
2322
		"}\n";
2323
	
2324
	String expectedDietWithStatementRecoveryUnitToString =
2325
		expectedDietUnitToString;
2326
	
2327
	String expectedDietPlusBodyUnitToString = 
2328
		"package a;\n" + 
2329
		"public class X {\n" + 
2330
		"  public X() {\n" + 
2331
		"    super();\n" + 
2332
		"  }\n" + 
2333
		"  void foo() {\n" + 
2334
		"  }\n" + 
2335
		"}\n";
2336
2337
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2338
		"package a;\n" + 
2339
		"public class X {\n" + 
2340
		"  public X() {\n" + 
2341
		"    super();\n" + 
2342
		"  }\n" + 
2343
		"  void foo() {\n" + 
2344
		"    System.out.println();\n" + 
2345
		"    new Object() {\n" + 
2346
		"      () {\n" + 
2347
		"        super();\n" + 
2348
		"      }\n" + 
2349
		"      void foo() {\n" + 
2350
		"        System.out.println();\n" + 
2351
		"        if (true)\n" + 
2352
		"            {\n" + 
2353
		"              System.out.println();\n" + 
2354
		"            }\n" + 
2355
		"        System.out.println();\n" + 
2356
		"      }\n" + 
2357
		"    };\n" + 
2358
		"    System.out.println();\n" + 
2359
		"  }\n" + 
2360
		"}\n";
2361
	
2362
	String expectedFullUnitToString =
2363
		expectedDietUnitToString;
2364
	
2365
	String expectedFullWithStatementRecoveryUnitToString =
2366
		expectedDietUnitToString;
2367
	
2368
	String testName = "<test>";
2369
	checkParse(
2370
		s.toCharArray(),
2371
		expectedDietUnitToString,
2372
		expectedDietWithStatementRecoveryUnitToString,
2373
		expectedDietPlusBodyUnitToString,
2374
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2375
		expectedFullUnitToString,
2376
		expectedFullWithStatementRecoveryUnitToString,
2377
		testName);
2378
}
2379
public void test0029() {
2380
2381
	String s = 
2382
		"package a;											\n"
2383
			+ "public class X {								\n"
2384
			+ "  void foo() {								\n"
2385
			+ "    System.out.println();					\n"
2386
			+ "    new Object() {							\n"
2387
			+ "      void foo() {							\n"
2388
			+ "        #									\n"
2389
			+ "        System.out.println();				\n"
2390
			+ "        if(true) {							\n"
2391
			+ "          System.out.println();				\n"
2392
			+ "        }									\n"
2393
			+ "        System.out.println();				\n"
2394
			+ "      }										\n"
2395
			+ "    };										\n"
2396
			+ "    System.out.println();					\n"
2397
			+ "  }											\n"
2398
			+ "}											\n"; 	
2399
2400
	String expectedDietUnitToString = 
2401
		"package a;\n" + 
2402
		"public class X {\n" + 
2403
		"  public X() {\n" + 
2404
		"  }\n" + 
2405
		"  void foo() {\n" + 
2406
		"  }\n" + 
2407
		"}\n";
2408
	
2409
	String expectedDietWithStatementRecoveryUnitToString =
2410
		expectedDietUnitToString;
2411
	
2412
	String expectedDietPlusBodyUnitToString = 
2413
		"package a;\n" + 
2414
		"public class X {\n" + 
2415
		"  public X() {\n" + 
2416
		"    super();\n" + 
2417
		"  }\n" + 
2418
		"  void foo() {\n" + 
2419
		"  }\n" + 
2420
		"}\n";
2421
2422
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2423
		"package a;\n" + 
2424
		"public class X {\n" + 
2425
		"  public X() {\n" + 
2426
		"    super();\n" + 
2427
		"  }\n" + 
2428
		"  void foo() {\n" + 
2429
		"    System.out.println();\n" + 
2430
		"    new Object() {\n" + 
2431
		"      () {\n" + 
2432
		"        super();\n" + 
2433
		"      }\n" + 
2434
		"      void foo() {\n" + 
2435
		"        System.out.println();\n" + 
2436
		"        if (true)\n" + 
2437
		"            {\n" + 
2438
		"              System.out.println();\n" + 
2439
		"            }\n" + 
2440
		"        System.out.println();\n" + 
2441
		"      }\n" + 
2442
		"    };\n" + 
2443
		"    System.out.println();\n" + 
2444
		"  }\n" + 
2445
		"}\n";
2446
	
2447
	String expectedFullUnitToString =
2448
		expectedDietUnitToString;
2449
	
2450
	String expectedFullWithStatementRecoveryUnitToString =
2451
		expectedDietUnitToString;
2452
	
2453
	String testName = "<test>";
2454
	checkParse(
2455
		s.toCharArray(),
2456
		expectedDietUnitToString,
2457
		expectedDietWithStatementRecoveryUnitToString,
2458
		expectedDietPlusBodyUnitToString,
2459
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2460
		expectedFullUnitToString,
2461
		expectedFullWithStatementRecoveryUnitToString,
2462
		testName);
2463
}
2464
public void test0030() {
2465
2466
	String s = 
2467
		"package a;											\n"
2468
			+ "public class X {								\n"
2469
			+ "  void foo() {								\n"
2470
			+ "    System.out.println();					\n"
2471
			+ "    new Object() {							\n"
2472
			+ "      void foo() {							\n"
2473
			+ "        System.out.println();				\n"
2474
			+ "        if(true) {							\n"
2475
			+ "          System.out.println();				\n"
2476
			+ "        }									\n"
2477
			+ "        System.out.println();				\n"
2478
			+ "        #									\n"
2479
			+ "        System.out.println();				\n"
2480
			+ "        if(true) {							\n"
2481
			+ "          System.out.println();				\n"
2482
			+ "        }									\n"
2483
			+ "        System.out.println();				\n"
2484
			+ "      }										\n"
2485
			+ "    };										\n"
2486
			+ "    System.out.println();					\n"
2487
			+ "  }											\n"
2488
			+ "}											\n"; 	
2489
2490
	String expectedDietUnitToString = 
2491
		"package a;\n" + 
2492
		"public class X {\n" + 
2493
		"  public X() {\n" + 
2494
		"  }\n" + 
2495
		"  void foo() {\n" + 
2496
		"  }\n" + 
2497
		"}\n";
2498
	
2499
	String expectedDietWithStatementRecoveryUnitToString =
2500
		expectedDietUnitToString;
2501
	
2502
	String expectedDietPlusBodyUnitToString = 
2503
		"package a;\n" + 
2504
		"public class X {\n" + 
2505
		"  public X() {\n" + 
2506
		"    super();\n" + 
2507
		"  }\n" + 
2508
		"  void foo() {\n" + 
2509
		"  }\n" + 
2510
		"}\n";
2511
2512
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2513
		"package a;\n" + 
2514
		"public class X {\n" + 
2515
		"  public X() {\n" + 
2516
		"    super();\n" + 
2517
		"  }\n" + 
2518
		"  void foo() {\n" + 
2519
		"    System.out.println();\n" + 
2520
		"    new Object() {\n" + 
2521
		"      () {\n" + 
2522
		"        super();\n" + 
2523
		"      }\n" + 
2524
		"      void foo() {\n" + 
2525
		"        System.out.println();\n" + 
2526
		"        if (true)\n" + 
2527
		"            {\n" + 
2528
		"              System.out.println();\n" + 
2529
		"            }\n" + 
2530
		"        System.out.println();\n" + 
2531
		"        System.out.println();\n" + 
2532
		"        if (true)\n" + 
2533
		"            {\n" + 
2534
		"              System.out.println();\n" + 
2535
		"            }\n" + 
2536
		"        System.out.println();\n" + 
2537
		"      }\n" + 
2538
		"    };\n" + 
2539
		"    System.out.println();\n" + 
2540
		"  }\n" + 
2541
		"}\n";
2542
	
2543
	String expectedFullUnitToString =
2544
		expectedDietUnitToString;
2545
	
2546
	String expectedFullWithStatementRecoveryUnitToString =
2547
		expectedDietUnitToString;
2548
	
2549
	String testName = "<test>";
2550
	checkParse(
2551
		s.toCharArray(),
2552
		expectedDietUnitToString,
2553
		expectedDietWithStatementRecoveryUnitToString,
2554
		expectedDietPlusBodyUnitToString,
2555
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2556
		expectedFullUnitToString,
2557
		expectedFullWithStatementRecoveryUnitToString,
2558
		testName);
2559
}
2560
public void test0031() {
2561
2562
	String s = 
2563
		"package a;											\n"
2564
			+ "public class X {								\n"
2565
			+ "  void foo() {								\n"
2566
			+ "    #										\n"
2567
			+ "    System.out.println();					\n"
2568
			+ "    new Object() {							\n"
2569
			+ "      void foo() {							\n"
2570
			+ "        System.out.println();				\n"
2571
			+ "        if(true) {							\n"
2572
			+ "          System.out.println();				\n"
2573
			+ "        }									\n"
2574
			+ "        System.out.println();				\n"
2575
			+ "        #									\n"
2576
			+ "        System.out.println();				\n"
2577
			+ "        if(true) {							\n"
2578
			+ "          System.out.println();				\n"
2579
			+ "        }									\n"
2580
			+ "        System.out.println();				\n"
2581
			+ "      }										\n"
2582
			+ "    };										\n"
2583
			+ "    System.out.println();					\n"
2584
			+ "  }											\n"
2585
			+ "}											\n"; 	
2586
2587
	String expectedDietUnitToString = 
2588
		"package a;\n" + 
2589
		"public class X {\n" + 
2590
		"  public X() {\n" + 
2591
		"  }\n" + 
2592
		"  void foo() {\n" + 
2593
		"  }\n" + 
2594
		"}\n";
2595
	
2596
	String expectedDietWithStatementRecoveryUnitToString =
2597
		expectedDietUnitToString;
2598
	
2599
	String expectedDietPlusBodyUnitToString = 
2600
		"package a;\n" + 
2601
		"public class X {\n" + 
2602
		"  public X() {\n" + 
2603
		"    super();\n" + 
2604
		"  }\n" + 
2605
		"  void foo() {\n" + 
2606
		"  }\n" + 
2607
		"}\n";
2608
2609
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2610
		"package a;\n" + 
2611
		"public class X {\n" + 
2612
		"  public X() {\n" + 
2613
		"    super();\n" + 
2614
		"  }\n" + 
2615
		"  void foo() {\n" + 
2616
		"    System.out.println();\n" + 
2617
		"    new Object() {\n" + 
2618
		"      () {\n" + 
2619
		"        super();\n" + 
2620
		"      }\n" + 
2621
		"      void foo() {\n" + 
2622
		"        System.out.println();\n" + 
2623
		"        if (true)\n" + 
2624
		"            {\n" + 
2625
		"              System.out.println();\n" + 
2626
		"            }\n" + 
2627
		"        System.out.println();\n" + 
2628
		"        System.out.println();\n" + 
2629
		"        if (true)\n" + 
2630
		"            {\n" + 
2631
		"              System.out.println();\n" + 
2632
		"            }\n" + 
2633
		"        System.out.println();\n" + 
2634
		"      }\n" + 
2635
		"    };\n" + 
2636
		"    System.out.println();\n" + 
2637
		"  }\n" + 
2638
		"}\n";
2639
	
2640
	String expectedFullUnitToString =
2641
		expectedDietUnitToString;
2642
	
2643
	String expectedFullWithStatementRecoveryUnitToString =
2644
		expectedDietUnitToString;
2645
	
2646
	String testName = "<test>";
2647
	checkParse(
2648
		s.toCharArray(),
2649
		expectedDietUnitToString,
2650
		expectedDietWithStatementRecoveryUnitToString,
2651
		expectedDietPlusBodyUnitToString,
2652
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2653
		expectedFullUnitToString,
2654
		expectedFullWithStatementRecoveryUnitToString,
2655
		testName);
2656
}
2657
public void test0032() {
2658
2659
	String s = 
2660
		"package a;											\n"
2661
			+ "public class X {								\n"
2662
			+ "  void foo() {								\n"
2663
			+ "    #										\n"
2664
			+ "    System.out.println();					\n"
2665
			+ "    bar(new Object() {						\n"
2666
			+ "      void foo() {							\n"
2667
			+ "        System.out.println();				\n"
2668
			+ "        if(true) {							\n"
2669
			+ "          System.out.println();				\n"
2670
			+ "        }									\n"
2671
			+ "        System.out.println();				\n"
2672
			+ "        #									\n"
2673
			+ "        System.out.println();				\n"
2674
			+ "        if(true) {							\n"
2675
			+ "          System.out.println();				\n"
2676
			+ "        }									\n"
2677
			+ "        System.out.println();				\n"
2678
			+ "      }										\n"
2679
			+ "    });										\n"
2680
			+ "    System.out.println();					\n"
2681
			+ "  }											\n"
2682
			+ "}											\n"; 	
2683
2684
	String expectedDietUnitToString = 
2685
		"package a;\n" + 
2686
		"public class X {\n" + 
2687
		"  public X() {\n" + 
2688
		"  }\n" + 
2689
		"  void foo() {\n" + 
2690
		"  }\n" + 
2691
		"}\n";
2692
	
2693
	String expectedDietWithStatementRecoveryUnitToString =
2694
		expectedDietUnitToString;
2695
	
2696
	String expectedDietPlusBodyUnitToString = 
2697
		"package a;\n" + 
2698
		"public class X {\n" + 
2699
		"  public X() {\n" + 
2700
		"    super();\n" + 
2701
		"  }\n" + 
2702
		"  void foo() {\n" + 
2703
		"  }\n" + 
2704
		"}\n";
2705
2706
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2707
		"package a;\n" + 
2708
		"public class X {\n" + 
2709
		"  public X() {\n" + 
2710
		"    super();\n" + 
2711
		"  }\n" + 
2712
		"  void foo() {\n" + 
2713
		"    System.out.println();\n" + 
2714
		"    bar(new Object() {\n" + 
2715
		"  () {\n" + 
2716
		"    super();\n" + 
2717
		"  }\n" + 
2718
		"  void foo() {\n" + 
2719
		"    System.out.println();\n" + 
2720
		"    if (true)\n" + 
2721
		"        {\n" + 
2722
		"          System.out.println();\n" + 
2723
		"        }\n" + 
2724
		"    System.out.println();\n" + 
2725
		"    System.out.println();\n" + 
2726
		"    if (true)\n" + 
2727
		"        {\n" + 
2728
		"          System.out.println();\n" + 
2729
		"        }\n" + 
2730
		"    System.out.println();\n" + 
2731
		"  }\n" + 
2732
		"});\n" + 
2733
		"    System.out.println();\n" + 
2734
		"  }\n" + 
2735
		"}\n";
2736
	
2737
	String expectedFullUnitToString =
2738
		expectedDietUnitToString;
2739
	
2740
	String expectedFullWithStatementRecoveryUnitToString =
2741
		expectedDietUnitToString;
2742
	
2743
	String testName = "<test>";
2744
	checkParse(
2745
		s.toCharArray(),
2746
		expectedDietUnitToString,
2747
		expectedDietWithStatementRecoveryUnitToString,
2748
		expectedDietPlusBodyUnitToString,
2749
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2750
		expectedFullUnitToString,
2751
		expectedFullWithStatementRecoveryUnitToString,
2752
		testName);
2753
}
2754
public void test0033() {
2755
2756
	String s = 
2757
		"package a;											\n"
2758
			+ "public class X {								\n"
2759
			+ "  void foo() {								\n"
2760
			+ "    #										\n"
2761
			+ "    class Z {								\n"
2762
			+ "      void foo() {							\n"
2763
			+ "        System.out.println();				\n"
2764
			+ "      }										\n"
2765
			+ "    }										\n"
2766
			+ "  }											\n"
2767
			+ "}											\n"; 	
2768
2769
	String expectedDietUnitToString = 
2770
		"package a;\n" + 
2771
		"public class X {\n" + 
2772
		"  public X() {\n" + 
2773
		"  }\n" + 
2774
		"  void foo() {\n" + 
2775
		"  }\n" + 
2776
		"}\n";
2777
	
2778
	String expectedDietWithStatementRecoveryUnitToString =
2779
		expectedDietUnitToString;
2780
	
2781
	String expectedDietPlusBodyUnitToString = 
2782
		"package a;\n" + 
2783
		"public class X {\n" + 
2784
		"  public X() {\n" + 
2785
		"    super();\n" + 
2786
		"  }\n" + 
2787
		"  void foo() {\n" + 
2788
		"  }\n" + 
2789
		"}\n";
2790
2791
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2792
		"package a;\n" + 
2793
		"public class X {\n" + 
2794
		"  public X() {\n" + 
2795
		"    super();\n" + 
2796
		"  }\n" + 
2797
		"  void foo() {\n" + 
2798
		"    class Z {\n" + 
2799
		"      Z() {\n" + 
2800
		"        super();\n" + 
2801
		"      }\n" + 
2802
		"      void foo() {\n" + 
2803
		"        System.out.println();\n" + 
2804
		"      }\n" + 
2805
		"    }\n" + 
2806
		"  }\n" + 
2807
		"}\n";
2808
	
2809
	String expectedFullUnitToString =
2810
		expectedDietUnitToString;
2811
	
2812
	String expectedFullWithStatementRecoveryUnitToString =
2813
		expectedDietUnitToString;
2814
	
2815
	String testName = "<test>";
2816
	checkParse(
2817
		s.toCharArray(),
2818
		expectedDietUnitToString,
2819
		expectedDietWithStatementRecoveryUnitToString,
2820
		expectedDietPlusBodyUnitToString,
2821
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2822
		expectedFullUnitToString,
2823
		expectedFullWithStatementRecoveryUnitToString,
2824
		testName);
2825
}
2826
public void test0034() {
2827
2828
	String s = 
2829
		"package a;											\n"
2830
			+ "public class X {								\n"
2831
			+ "  void foo() {								\n"
2832
			+ "    #										\n"
2833
			+ "    new Object() {							\n"
2834
			+ "      void foo() {							\n"
2835
			+ "        System.out.println();				\n"
2836
			+ "      }										\n"
2837
			+ "    };										\n"
2838
			+ "  }											\n"
2839
			+ "}											\n"; 	
2840
2841
	String expectedDietUnitToString = 
2842
		"package a;\n" + 
2843
		"public class X {\n" + 
2844
		"  public X() {\n" + 
2845
		"  }\n" + 
2846
		"  void foo() {\n" + 
2847
		"  }\n" + 
2848
		"}\n";
2849
	
2850
	String expectedDietWithStatementRecoveryUnitToString =
2851
		expectedDietUnitToString;
2852
	
2853
	String expectedDietPlusBodyUnitToString = 
2854
		"package a;\n" + 
2855
		"public class X {\n" + 
2856
		"  public X() {\n" + 
2857
		"    super();\n" + 
2858
		"  }\n" + 
2859
		"  void foo() {\n" + 
2860
		"  }\n" + 
2861
		"}\n";
2862
2863
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2864
		"package a;\n" + 
2865
		"public class X {\n" + 
2866
		"  public X() {\n" + 
2867
		"    super();\n" + 
2868
		"  }\n" + 
2869
		"  void foo() {\n" + 
2870
		"    new Object() {\n" + 
2871
		"      () {\n" + 
2872
		"        super();\n" + 
2873
		"      }\n" + 
2874
		"      void foo() {\n" + 
2875
		"        System.out.println();\n" + 
2876
		"      }\n" + 
2877
		"    };\n" + 
2878
		"  }\n" + 
2879
		"}\n";
2880
	
2881
	String expectedFullUnitToString =
2882
		expectedDietUnitToString;
2883
	
2884
	String expectedFullWithStatementRecoveryUnitToString =
2885
		expectedDietUnitToString;
2886
	
2887
	String testName = "<test>";
2888
	checkParse(
2889
		s.toCharArray(),
2890
		expectedDietUnitToString,
2891
		expectedDietWithStatementRecoveryUnitToString,
2892
		expectedDietPlusBodyUnitToString,
2893
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2894
		expectedFullUnitToString,
2895
		expectedFullWithStatementRecoveryUnitToString,
2896
		testName);
2897
}
2898
public void test0035() {
2899
2900
	String s = 
2901
		"package a;											\n"
2902
			+ "public class X {								\n"
2903
			+ "  void foo() {								\n"
2904
			+ "    bar(\\u0029								\n"
2905
			+ "  }											\n"
2906
			+ "}											\n"; 	
2907
2908
	String expectedDietUnitToString = 
2909
		"package a;\n" + 
2910
		"public class X {\n" + 
2911
		"  public X() {\n" + 
2912
		"  }\n" + 
2913
		"  void foo() {\n" + 
2914
		"  }\n" + 
2915
		"}\n";
2916
	
2917
	String expectedDietWithStatementRecoveryUnitToString =
2918
		expectedDietUnitToString;
2919
	
2920
	String expectedDietPlusBodyUnitToString = 
2921
		"package a;\n" + 
2922
		"public class X {\n" + 
2923
		"  public X() {\n" + 
2924
		"    super();\n" + 
2925
		"  }\n" + 
2926
		"  void foo() {\n" + 
2927
		"  }\n" + 
2928
		"}\n";
2929
2930
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2931
		"package a;\n" + 
2932
		"public class X {\n" + 
2933
		"  public X() {\n" + 
2934
		"    super();\n" + 
2935
		"  }\n" + 
2936
		"  void foo() {\n" + 
2937
		"    bar();\n" + 
2938
		"  }\n" + 
2939
		"}\n";
2940
	
2941
	String expectedFullUnitToString =
2942
		expectedDietUnitToString;
2943
	
2944
	String expectedFullWithStatementRecoveryUnitToString =
2945
		expectedDietUnitToString;
2946
	
2947
	String testName = "<test>";
2948
	checkParse(
2949
		s.toCharArray(),
2950
		expectedDietUnitToString,
2951
		expectedDietWithStatementRecoveryUnitToString,
2952
		expectedDietPlusBodyUnitToString,
2953
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
2954
		expectedFullUnitToString,
2955
		expectedFullWithStatementRecoveryUnitToString,
2956
		testName);
2957
}
2958
public void test0036() {
2959
2960
	String s = 
2961
		"package a;											\n"
2962
			+ "public class X {								\n"
2963
			+ "  void foo() {								\n"
2964
			+ "    if(true) {								\n"
2965
			+ "      foo();									\n"
2966
			+ "    }										\n"
2967
			+ "    for(;									\n"
2968
			+ "    if(true) {								\n"
2969
			+ "      foo();									\n"
2970
			+ "    }										\n"
2971
			+ "  }											\n"
2972
			+ "}											\n";
2973
2974
	String expectedDietUnitToString = 
2975
		"package a;\n" + 
2976
		"public class X {\n" + 
2977
		"  public X() {\n" + 
2978
		"  }\n" + 
2979
		"  void foo() {\n" + 
2980
		"  }\n" + 
2981
		"}\n";
2982
	
2983
	String expectedDietWithStatementRecoveryUnitToString =
2984
		expectedDietUnitToString;
2985
	
2986
	String expectedDietPlusBodyUnitToString = 
2987
		"package a;\n" + 
2988
		"public class X {\n" + 
2989
		"  public X() {\n" + 
2990
		"    super();\n" + 
2991
		"  }\n" + 
2992
		"  void foo() {\n" + 
2993
		"  }\n" + 
2994
		"}\n";
2995
2996
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
2997
		"package a;\n" + 
2998
		"public class X {\n" + 
2999
		"  public X() {\n" + 
3000
		"    super();\n" + 
3001
		"  }\n" + 
3002
		"  void foo() {\n" + 
3003
		"    if (true)\n" + 
3004
		"        {\n" + 
3005
		"          foo();\n" + 
3006
		"        }\n" + 
3007
		"  }\n" + 
3008
		"}\n";
3009
	
3010
	String expectedFullUnitToString =
3011
		expectedDietUnitToString;
3012
	
3013
	String expectedFullWithStatementRecoveryUnitToString =
3014
		expectedDietUnitToString;
3015
	
3016
	String testName = "<test>";
3017
	checkParse(
3018
		s.toCharArray(),
3019
		expectedDietUnitToString,
3020
		expectedDietWithStatementRecoveryUnitToString,
3021
		expectedDietPlusBodyUnitToString,
3022
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3023
		expectedFullUnitToString,
3024
		expectedFullWithStatementRecoveryUnitToString,
3025
		testName);
3026
}
3027
public void test0037() {
3028
3029
	String s = 
3030
		"package a;											\n"
3031
			+ "public class X {								\n"
3032
			+ "  void foo() {								\n"
3033
			+ "    if() {									\n"
3034
			+ "      foo();									\n"
3035
			+ "    }										\n"
3036
			+ "  }											\n"
3037
			+ "}											\n";
3038
3039
	String expectedDietUnitToString = 
3040
		"package a;\n" + 
3041
		"public class X {\n" + 
3042
		"  public X() {\n" + 
3043
		"  }\n" + 
3044
		"  void foo() {\n" + 
3045
		"  }\n" + 
3046
		"}\n";
3047
	
3048
	String expectedDietWithStatementRecoveryUnitToString =
3049
		expectedDietUnitToString;
3050
	
3051
	String expectedDietPlusBodyUnitToString = 
3052
		"package a;\n" + 
3053
		"public class X {\n" + 
3054
		"  public X() {\n" + 
3055
		"    super();\n" + 
3056
		"  }\n" + 
3057
		"  void foo() {\n" + 
3058
		"  }\n" + 
3059
		"}\n";
3060
3061
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3062
		"package a;\n" + 
3063
		"public class X {\n" + 
3064
		"  public X() {\n" + 
3065
		"    super();\n" + 
3066
		"  }\n" + 
3067
		"  void foo() {\n" + 
3068
		"    if ()\n" + 
3069
		"        {\n" + 
3070
		"          foo();\n" + 
3071
		"        }\n" + 
3072
		"  }\n" + 
3073
		"}\n";
3074
	
3075
	String expectedFullUnitToString =
3076
		expectedDietUnitToString;
3077
	
3078
	String expectedFullWithStatementRecoveryUnitToString =
3079
		expectedDietUnitToString;
3080
	
3081
	String testName = "<test>";
3082
	checkParse(
3083
		s.toCharArray(),
3084
		expectedDietUnitToString,
3085
		expectedDietWithStatementRecoveryUnitToString,
3086
		expectedDietPlusBodyUnitToString,
3087
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3088
		expectedFullUnitToString,
3089
		expectedFullWithStatementRecoveryUnitToString,
3090
		testName);
3091
}
3092
public void test0038() {
3093
	String s = 
3094
		"package p1;										\n"+
3095
			"public class A {									\n"+
3096
			"	public interface B {							\n"+
3097
			"		public abstract void aMethod (int A);		\n"+
3098
			"		public interface C {						\n"+
3099
			"			public abstract void anotherMethod(int A);\n"+
3100
			"		}											\n"+
3101
			"	}												\n"+
3102
			"	public class aClass implements B, B.C {			\n"+
3103
			"		public void aMethod (int A) {				\n"+
3104
			"			public void anotherMethod(int A) {};	\n"+
3105
			"		}											\n"+
3106
			"	}												\n"+
3107
			"   	public static void main (String argv[]) {	\n"+
3108
			"		System.out.println(\"SUCCESS\");			\n"+
3109
			"	}												\n"+
3110
			"}";
3111
3112
	String expectedDietUnitToString = 
3113
		"package p1;\n" + 
3114
		"public class A {\n" + 
3115
		"  public interface B {\n" + 
3116
		"    public interface C {\n" + 
3117
		"      public abstract void anotherMethod(int A);\n" + 
3118
		"    }\n" + 
3119
		"    public abstract void aMethod(int A);\n" + 
3120
		"  }\n" + 
3121
		"  public class aClass implements B, B.C {\n" + 
3122
		"    public aClass() {\n" + 
3123
		"    }\n" + 
3124
		"    public void aMethod(int A) {\n" + 
3125
		"    }\n" + 
3126
		"  }\n" + 
3127
		"  public A() {\n" + 
3128
		"  }\n" + 
3129
		"  public static void main(String[] argv) {\n" + 
3130
		"  }\n" + 
3131
		"}\n";
3132
	
3133
	String expectedDietWithStatementRecoveryUnitToString =
3134
		expectedDietUnitToString;
3135
	
3136
	String expectedDietPlusBodyUnitToString = 
3137
		"package a;\n" + 
3138
		"public class X {\n" + 
3139
		"  public X() {\n" + 
3140
		"    super();\n" + 
3141
		"  }\n" + 
3142
		"  void foo() {\n" + 
3143
		"  }\n" + 
3144
		"}\n";
3145
3146
	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3147
		"package p1;\n" + 
3148
		"public class A {\n" + 
3149
		"  public interface B {\n" + 
3150
		"    public interface C {\n" + 
3151
		"      public abstract void anotherMethod(int A);\n" + 
3152
		"    }\n" + 
3153
		"    public abstract void aMethod(int A);\n" + 
3154
		"  }\n" + 
3155
		"  public class aClass implements B, B.C {\n" + 
3156
		"    public aClass() {\n" + 
3157
		"      super();\n" + 
3158
		"    }\n" + 
3159
		"    public void aMethod(int A) {\n" + 
3160
		"      public void anotherMethod;\n" + 
3161
		"      int A;\n" + 
3162
		"      ;\n" + 
3163
		"    }\n" + 
3164
		"  }\n" + 
3165
		"  public A() {\n" + 
3166
		"    super();\n" + 
3167
		"  }\n" + 
3168
		"  public static void main(String[] argv) {\n" + 
3169
		"    System.out.println(\"SUCCESS\");\n" + 
3170
		"  }\n" + 
3171
		"}\n";
3172
	
3173
	String expectedFullUnitToString =
3174
		expectedDietUnitToString;
3175
	
3176
	String expectedFullWithStatementRecoveryUnitToString =
3177
		expectedDietUnitToString;
3178
	
3179
	String testName = "<test>";
3180
	checkParse(
3181
		s.toCharArray(),
3182
		expectedDietUnitToString,
3183
		expectedDietWithStatementRecoveryUnitToString,
3184
		expectedDietPlusBodyUnitToString,
3185
		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3186
		expectedFullUnitToString,
3187
		expectedFullWithStatementRecoveryUnitToString,
3188
		testName);
3189
}
3190
//// incorrect statement
3191
//public void test0002() {
3192
//
3193
//	String s = 
3194
//		"package a;											\n"
3195
//			+ "public class X {								\n"
3196
//			+ "  void foo() {								\n"
3197
//			+ "    System.out.println();					\n"
3198
//			+ "    foo(										\n"
3199
//			+ "    System.out.println();					\n"
3200
//			+ "  }											\n"
3201
//			+ "}											\n"; 	
3202
//
3203
//	String expectedDietUnitToString = 
3204
//		"package a;\n" + 
3205
//		"public class X {\n" + 
3206
//		"  public X() {\n" + 
3207
//		"  }\n" + 
3208
//		"  void foo() {\n" + 
3209
//		"  }\n" + 
3210
//		"}\n";
3211
//	
3212
//	String expectedDietWithStatementRecoveryUnitToString =
3213
//		expectedDietUnitToString;
3214
//	
3215
//	String expectedDietPlusBodyUnitToString = 
3216
//		"package a;\n" + 
3217
//		"public class X {\n" + 
3218
//		"  public X() {\n" + 
3219
//		"    super();\n" + 
3220
//		"  }\n" + 
3221
//		"  void foo() {\n" + 
3222
//		"  }\n" + 
3223
//		"}\n";
3224
//	
3225
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3226
//		"package a;\n" + 
3227
//		"public class X {\n" + 
3228
//		"  public X() {\n" + 
3229
//		"    super();\n" + 
3230
//		"  }\n" + 
3231
//		"  void foo() {\n" + 
3232
//		"    System.out.println();\n" + 
3233
//		"    System.out.println();\n" + 
3234
//		"  }\n" + 
3235
//		"}\n";
3236
//	
3237
//	String expectedFullUnitToString = expectedDietUnitToString;
3238
//	
3239
//	String expectedFullWithStatementRecoveryUnitToString =
3240
//		expectedFullUnitToString;
3241
//	
3242
//	String testName = "<test>";
3243
//	checkParse(
3244
//		s.toCharArray(),
3245
//		expectedDietUnitToString,
3246
//		expectedDietWithStatementRecoveryUnitToString,
3247
//		expectedDietPlusBodyUnitToString,
3248
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3249
//		expectedFullUnitToString,
3250
//		expectedFullWithStatementRecoveryUnitToString,
3251
//		testName);
3252
//}
3253
//// try statement with incorrect statements
3254
//public void test0003() {
3255
//
3256
//	String s = 
3257
//		"package a;											\n"
3258
//			+ "public class X {								\n"
3259
//			+ "  void foo() {								\n"
3260
//			+ "    System.out.println();					\n"
3261
//			+ "    foo(										\n"
3262
//			+ "    System.out.println();					\n"
3263
//			+ "    try {									\n"
3264
//			+ "      System.out.println();					\n"
3265
//			+ "      foo(									\n"
3266
//			+ "      System.out.println();					\n"
3267
//			+ "    } catch(Exception e) {					\n"
3268
//			+ "      System.out.println();					\n"
3269
//			+ "      foo(									\n"
3270
//			+ "      System.out.println();					\n"
3271
//			+ "    }										\n"
3272
//			+ "  }											\n"
3273
//			+ "}											\n"; 	
3274
//
3275
//	String expectedDietUnitToString = 
3276
//		"package a;\n" + 
3277
//		"public class X {\n" + 
3278
//		"  public X() {\n" + 
3279
//		"  }\n" + 
3280
//		"  void foo() {\n" + 
3281
//		"  }\n" + 
3282
//		"}\n";
3283
//	
3284
//	String expectedDietWithStatementRecoveryUnitToString =
3285
//		expectedDietUnitToString;
3286
//	
3287
//	
3288
//	String expectedDietPlusBodyUnitToString = 
3289
//		"package a;\n" + 
3290
//		"public class X {\n" + 
3291
//		"  public X() {\n" + 
3292
//		"    super();\n" + 
3293
//		"  }\n" + 
3294
//		"  void foo() {\n" + 
3295
//		"  }\n" + 
3296
//		"}\n";
3297
//
3298
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3299
//		"package a;\n" + 
3300
//		"public class X {\n" + 
3301
//		"  public X() {\n" + 
3302
//		"    super();\n" + 
3303
//		"  }\n" + 
3304
//		"  void foo() {\n" + 
3305
//		"    System.out.println();\n" + 
3306
//		"    System.out.println();\n" + 
3307
//		"    try \n" + 
3308
//		"      {\n" + 
3309
//		"        System.out.println();\n" + 
3310
//		"        System.out.println();\n" + 
3311
//		"      }\n" + 
3312
//		"    catch (Exception e)\n" + 
3313
//		"      {\n" + 
3314
//		"        System.out.println();\n" + 
3315
//		"        System.out.println();\n" + 
3316
//		"      }\n" + 
3317
//		"  }\n" + 
3318
//		"}\n";
3319
//	
3320
//	String expectedFullUnitToString = expectedDietUnitToString;
3321
//	
3322
//	String expectedFullWithStatementRecoveryUnitToString =
3323
//		expectedFullUnitToString;
3324
//	
3325
//	String testName = "<test>";
3326
//	checkParse(
3327
//		s.toCharArray(),
3328
//		expectedDietUnitToString,
3329
//		expectedDietWithStatementRecoveryUnitToString,
3330
//		expectedDietPlusBodyUnitToString,
3331
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3332
//		expectedFullUnitToString,
3333
//		expectedFullWithStatementRecoveryUnitToString,
3334
//		testName);
3335
//}
3336
//// try statement with incorrect statements
3337
//public void test0004() {
3338
//
3339
//	String s = 
3340
//		"package a;											\n"
3341
//			+ "public class X {								\n"
3342
//			+ "  void foo() {								\n"
3343
//			+ "    System.out.println();					\n"
3344
//			+ "    foo(										\n"
3345
//			+ "    System.out.println();					\n"
3346
//			+ "    try {									\n"
3347
//			+ "      System.out.println();					\n"
3348
//			+ "      foo(									\n"
3349
//			+ "      System.out.println();					\n"
3350
//			+ "    } finally {								\n"
3351
//			+ "      System.out.println();					\n"
3352
//			+ "      foo(									\n"
3353
//			+ "      System.out.println();					\n"
3354
//			+ "    }										\n"
3355
//			+ "  }											\n"
3356
//			+ "}											\n"; 	
3357
//
3358
//	String expectedDietUnitToString = 
3359
//		"package a;\n" + 
3360
//		"public class X {\n" + 
3361
//		"  public X() {\n" + 
3362
//		"  }\n" + 
3363
//		"  void foo() {\n" + 
3364
//		"  }\n" + 
3365
//		"}\n";
3366
//	
3367
//	String expectedDietWithStatementRecoveryUnitToString =
3368
//		expectedDietUnitToString;
3369
//	
3370
//	String expectedDietPlusBodyUnitToString = 
3371
//		"package a;\n" + 
3372
//		"public class X {\n" + 
3373
//		"  public X() {\n" + 
3374
//		"    super();\n" + 
3375
//		"  }\n" + 
3376
//		"  void foo() {\n" + 
3377
//		"  }\n" + 
3378
//		"}\n";
3379
//
3380
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3381
//		"package a;\n" + 
3382
//		"public class X {\n" + 
3383
//		"  public X() {\n" + 
3384
//		"    super();\n" + 
3385
//		"  }\n" + 
3386
//		"  void foo() {\n" + 
3387
//		"    System.out.println();\n" + 
3388
//		"    System.out.println();\n" + 
3389
//		"    try \n" + 
3390
//		"      {\n" + 
3391
//		"        System.out.println();\n" + 
3392
//		"        System.out.println();\n" + 
3393
//		"      }\n" + 
3394
//		"    finally\n" + 
3395
//		"      {\n" + 
3396
//		"        System.out.println();\n" + 
3397
//		"        System.out.println();\n" + 
3398
//		"      }\n" + 
3399
//		"  }\n" + 
3400
//		"}\n";
3401
//	
3402
//	String expectedFullUnitToString = expectedDietUnitToString;
3403
//	
3404
//	String expectedFullWithStatementRecoveryUnitToString =
3405
//		expectedFullUnitToString;
3406
//	
3407
//	String testName = "<test>";
3408
//	checkParse(
3409
//		s.toCharArray(),
3410
//		expectedDietUnitToString,
3411
//		expectedDietWithStatementRecoveryUnitToString,
3412
//		expectedDietPlusBodyUnitToString,
3413
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3414
//		expectedFullUnitToString,
3415
//		expectedFullWithStatementRecoveryUnitToString,
3416
//		testName);
3417
//}
3418
//// incorrect try statement with incorrect statements
3419
//public void test0005() {
3420
//
3421
//	String s = 
3422
//		"package a;											\n"
3423
//			+ "public class X {								\n"
3424
//			+ "  void foo() {								\n"
3425
//			+ "    System.out.println();					\n"
3426
//			+ "    foo(										\n"
3427
//			+ "    System.out.println();					\n"
3428
//			+ "    try {									\n"
3429
//			+ "      System.out.println();					\n"
3430
//			+ "      foo(									\n"
3431
//			+ "      System.out.println();					\n"
3432
//			+ "    } finally								\n"
3433
//			+ "  }											\n"
3434
//			+ "}											\n"; 	
3435
//
3436
//	String expectedDietUnitToString = 
3437
//		"package a;\n" + 
3438
//		"public class X {\n" + 
3439
//		"  public X() {\n" + 
3440
//		"  }\n" + 
3441
//		"  void foo() {\n" + 
3442
//		"  }\n" + 
3443
//		"}\n";
3444
//	
3445
//	String expectedDietWithStatementRecoveryUnitToString =
3446
//		expectedDietUnitToString;
3447
//	
3448
//	String expectedDietPlusBodyUnitToString = 
3449
//		"package a;\n" + 
3450
//		"public class X {\n" + 
3451
//		"  public X() {\n" + 
3452
//		"    super();\n" + 
3453
//		"  }\n" + 
3454
//		"  void foo() {\n" + 
3455
//		"  }\n" + 
3456
//		"}\n";
3457
//
3458
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3459
//		"package a;\n" + 
3460
//		"public class X {\n" + 
3461
//		"  public X() {\n" + 
3462
//		"    super();\n" + 
3463
//		"  }\n" + 
3464
//		"  void foo() {\n" + 
3465
//		"    System.out.println();\n" + 
3466
//		"    System.out.println();\n" + 
3467
//		"    try \n" + 
3468
//		"      {\n" + 
3469
//		"        System.out.println();\n" + 
3470
//		"        System.out.println();\n" + 
3471
//		"      }\n" + 
3472
//		"    finally\n" + 
3473
//		"      {\n" + 
3474
//		"      }\n" + 
3475
//		"  }\n" + 
3476
//		"}\n";;
3477
//	
3478
//	String expectedFullUnitToString = expectedDietUnitToString;
3479
//	
3480
//	String expectedFullWithStatementRecoveryUnitToString =
3481
//		expectedFullUnitToString;
3482
//	
3483
//	String testName = "<test>";
3484
//	checkParse(
3485
//		s.toCharArray(),
3486
//		expectedDietUnitToString,
3487
//		expectedDietWithStatementRecoveryUnitToString,
3488
//		expectedDietPlusBodyUnitToString,
3489
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3490
//		expectedFullUnitToString,
3491
//		expectedFullWithStatementRecoveryUnitToString,
3492
//		testName);
3493
//}
3494
//// incorrect try statement with incorrect statements
3495
//public void test0006() {
3496
//
3497
//	String s = 
3498
//		"package a;											\n"
3499
//			+ "public class X {								\n"
3500
//			+ "  void foo() {								\n"
3501
//			+ "    System.out.println();					\n"
3502
//			+ "    foo(										\n"
3503
//			+ "    System.out.println();					\n"
3504
//			+ "    try {									\n"
3505
//			+ "      System.out.println();					\n"
3506
//			+ "      foo(									\n"
3507
//			+ "      System.out.println();					\n"
3508
//			+ "    } catch (Exception e)					\n"
3509
//			+ "  }											\n"
3510
//			+ "}											\n"; 	
3511
//
3512
//	String expectedDietUnitToString = 
3513
//		"package a;\n" + 
3514
//		"public class X {\n" + 
3515
//		"  public X() {\n" + 
3516
//		"  }\n" + 
3517
//		"  void foo() {\n" + 
3518
//		"  }\n" + 
3519
//		"}\n";
3520
//	
3521
//	String expectedDietWithStatementRecoveryUnitToString =
3522
//		expectedDietUnitToString;
3523
//	
3524
//	String expectedDietPlusBodyUnitToString = 
3525
//		"package a;\n" + 
3526
//		"public class X {\n" + 
3527
//		"  public X() {\n" + 
3528
//		"    super();\n" + 
3529
//		"  }\n" + 
3530
//		"  void foo() {\n" + 
3531
//		"  }\n" + 
3532
//		"}\n";
3533
//
3534
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3535
//		"package a;\n" + 
3536
//		"public class X {\n" + 
3537
//		"  public X() {\n" + 
3538
//		"    super();\n" + 
3539
//		"  }\n" + 
3540
//		"  void foo() {\n" + 
3541
//		"    System.out.println();\n" + 
3542
//		"    System.out.println();\n" + 
3543
//		"    try \n" + 
3544
//		"      {\n" + 
3545
//		"        System.out.println();\n" + 
3546
//		"        System.out.println();\n" + 
3547
//		"      }\n" + 
3548
//		"    finally\n" + 
3549
//		"      {\n" + 
3550
//		"      }\n" + 
3551
//		"  }\n" + 
3552
//		"}\n";
3553
//	
3554
//	String expectedFullUnitToString = expectedDietUnitToString;
3555
//	
3556
//	String expectedFullWithStatementRecoveryUnitToString =
3557
//		expectedFullUnitToString;
3558
//	
3559
//	String testName = "<test>";
3560
//	checkParse(
3561
//		s.toCharArray(),
3562
//		expectedDietUnitToString,
3563
//		expectedDietWithStatementRecoveryUnitToString,
3564
//		expectedDietPlusBodyUnitToString,
3565
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3566
//		expectedFullUnitToString,
3567
//		expectedFullWithStatementRecoveryUnitToString,
3568
//		testName);
3569
//}
3570
//// incorrect try statement with incorrect statements
3571
//public void test0007() {
3572
//
3573
//	String s = 
3574
//		"package a;											\n"
3575
//			+ "public class X {								\n"
3576
//			+ "  void foo() {								\n"
3577
//			+ "    System.out.println();					\n"
3578
//			+ "    foo(										\n"
3579
//			+ "    System.out.println();					\n"
3580
//			+ "    try {									\n"
3581
//			+ "      System.out.println();					\n"
3582
//			+ "      foo(									\n"
3583
//			+ "      System.out.println();					\n"
3584
//			+ "    }										\n"
3585
//			+ "    #										\n"
3586
//			+ "    catch (Exception e) {					\n"
3587
//			+ "      System.out.println();					\n"
3588
//			+ "      foo(									\n"
3589
//			+ "      System.out.println();					\n"
3590
//			+ "    }										\n"
3591
//			+ "  }											\n"
3592
//			+ "}											\n"; 	
3593
//
3594
//	String expectedDietUnitToString = 
3595
//		"package a;\n" + 
3596
//		"public class X {\n" + 
3597
//		"  public X() {\n" + 
3598
//		"  }\n" + 
3599
//		"  void foo() {\n" + 
3600
//		"  }\n" + 
3601
//		"}\n";
3602
//	
3603
//	String expectedDietWithStatementRecoveryUnitToString =
3604
//		expectedDietUnitToString;
3605
//	
3606
//	String expectedDietPlusBodyUnitToString = 
3607
//		"package a;\n" + 
3608
//		"public class X {\n" + 
3609
//		"  public X() {\n" + 
3610
//		"    super();\n" + 
3611
//		"  }\n" + 
3612
//		"  void foo() {\n" + 
3613
//		"  }\n" + 
3614
//		"}\n";
3615
//
3616
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3617
//		"package a;\n" + 
3618
//		"public class X {\n" + 
3619
//		"  public X() {\n" + 
3620
//		"    super();\n" + 
3621
//		"  }\n" + 
3622
//		"  void foo() {\n" + 
3623
//		"    System.out.println();\n" + 
3624
//		"    System.out.println();\n" + 
3625
//		"    try \n" + 
3626
//		"      {\n" + 
3627
//		"        System.out.println();\n" + 
3628
//		"        System.out.println();\n" + 
3629
//		"      }\n" + 
3630
//		"    finally\n" + 
3631
//		"      {\n" + 
3632
//		"      }\n" + 
3633
//		"    {\n" + 
3634
//		"      System.out.println();\n" + 
3635
//		"      System.out.println();\n" + 
3636
//		"    }\n" + 
3637
//		"  }\n" + 
3638
//		"}\n";
3639
//	
3640
//	String expectedFullUnitToString = expectedDietUnitToString;
3641
//	
3642
//	String expectedFullWithStatementRecoveryUnitToString =
3643
//		expectedFullUnitToString;
3644
//	
3645
//	String testName = "<test>";
3646
//	checkParse(
3647
//		s.toCharArray(),
3648
//		expectedDietUnitToString,
3649
//		expectedDietWithStatementRecoveryUnitToString,
3650
//		expectedDietPlusBodyUnitToString,
3651
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3652
//		expectedFullUnitToString,
3653
//		expectedFullWithStatementRecoveryUnitToString,
3654
//		testName);
3655
//}
3656
//// anonymous type statement with incorrect statements
3657
//public void test0008() {
3658
//
3659
//	String s = 
3660
//		"package a;											\n"
3661
//			+ "public class X {								\n"
3662
//			+ "  void foo() {								\n"
3663
//			+ "    System.out.println();					\n"
3664
//			+ "    foo(										\n"
3665
//			+ "    System.out.println();					\n"
3666
//			+ "    new Object(){};							\n"
3667
//			+ "  }											\n"
3668
//			+ "}											\n"; 	
3669
//
3670
//	String expectedDietUnitToString = 
3671
//		"package a;\n" + 
3672
//		"public class X {\n" + 
3673
//		"  public X() {\n" + 
3674
//		"  }\n" + 
3675
//		"  void foo() {\n" + 
3676
//		"  }\n" + 
3677
//		"}\n";
3678
//	
3679
//	String expectedDietWithStatementRecoveryUnitToString =
3680
//		expectedDietUnitToString;
3681
//	
3682
//	String expectedDietPlusBodyUnitToString = 
3683
//		"package a;\n" + 
3684
//		"public class X {\n" + 
3685
//		"  public X() {\n" + 
3686
//		"    super();\n" + 
3687
//		"  }\n" + 
3688
//		"  void foo() {\n" + 
3689
//		"  }\n" + 
3690
//		"}\n";
3691
//
3692
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3693
//		"package a;\n" + 
3694
//		"public class X {\n" + 
3695
//		"  public X() {\n" + 
3696
//		"    super();\n" + 
3697
//		"  }\n" + 
3698
//		"  void foo() {\n" + 
3699
//		"    System.out.println();\n" + 
3700
//		"    System.out.println();\n" + 
3701
//		"    new Object() {\n" + 
3702
//		"      () {\n" + 
3703
//		"        super();\n" + 
3704
//		"      }\n" + 
3705
//		"    };\n" + 
3706
//		"  }\n" + 
3707
//		"}\n";
3708
//	
3709
//	String expectedFullUnitToString =
3710
//		expectedDietUnitToString;
3711
//	
3712
//	String expectedFullWithStatementRecoveryUnitToString =
3713
//		expectedFullUnitToString;
3714
//	
3715
//	String testName = "<test>";
3716
//	checkParse(
3717
//		s.toCharArray(),
3718
//		expectedDietUnitToString,
3719
//		expectedDietWithStatementRecoveryUnitToString,
3720
//		expectedDietPlusBodyUnitToString,
3721
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3722
//		expectedFullUnitToString,
3723
//		expectedFullWithStatementRecoveryUnitToString,
3724
//		testName);
3725
//}
3726
//// anonymous type statement with incorrect statements
3727
//public void test0009() {
3728
//
3729
//	String s = 
3730
//		"package a;											\n"
3731
//			+ "public class X {								\n"
3732
//			+ "  void foo() {								\n"
3733
//			+ "    System.out.println();					\n"
3734
//			+ "    foo(										\n"
3735
//			+ "    System.out.println();					\n"
3736
//			+ "    new Object(){							\n"
3737
//			+ "      void foo() {}							\n"
3738
//			+ "    };										\n"
3739
//			+ "  }											\n"
3740
//			+ "}											\n"; 	
3741
//
3742
//	String expectedDietUnitToString = 
3743
//		"package a;\n" + 
3744
//		"public class X {\n" + 
3745
//		"  public X() {\n" + 
3746
//		"  }\n" + 
3747
//		"  void foo() {\n" + 
3748
//		"  }\n" + 
3749
//		"}\n";
3750
//	
3751
//	String expectedDietWithStatementRecoveryUnitToString =
3752
//		expectedDietUnitToString;
3753
//	
3754
//	String expectedDietPlusBodyUnitToString = 
3755
//		"package a;\n" + 
3756
//		"public class X {\n" + 
3757
//		"  public X() {\n" + 
3758
//		"    super();\n" + 
3759
//		"  }\n" + 
3760
//		"  void foo() {\n" + 
3761
//		"  }\n" + 
3762
//		"}\n";;
3763
//
3764
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3765
//		"package a;\n" + 
3766
//		"public class X {\n" + 
3767
//		"  public X() {\n" + 
3768
//		"    super();\n" + 
3769
//		"  }\n" + 
3770
//		"  void foo() {\n" + 
3771
//		"    System.out.println();\n" + 
3772
//		"    System.out.println();\n" + 
3773
//		"    new Object() {\n" + 
3774
//		"      () {\n" + 
3775
//		"        super();\n" + 
3776
//		"      }\n" + 
3777
//		"      void foo() {\n" + 
3778
//		"      }\n" + 
3779
//		"    };\n" + 
3780
//		"  }\n" + 
3781
//		"}\n";
3782
//	
3783
//	String expectedFullUnitToString =
3784
//		expectedDietUnitToString;
3785
//	
3786
//	String expectedFullWithStatementRecoveryUnitToString =
3787
//		expectedFullUnitToString;
3788
//	
3789
//	String testName = "<test>";
3790
//	checkParse(
3791
//		s.toCharArray(),
3792
//		expectedDietUnitToString,
3793
//		expectedDietWithStatementRecoveryUnitToString,
3794
//		expectedDietPlusBodyUnitToString,
3795
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3796
//		expectedFullUnitToString,
3797
//		expectedFullWithStatementRecoveryUnitToString,
3798
//		testName);
3799
//}
3800
//// incorrect anonymous type statement with incorrect statements
3801
//public void test0010() {
3802
//
3803
//	String s = 
3804
//		"package a;											\n"
3805
//			+ "public class X {								\n"
3806
//			+ "  void foo() {								\n"
3807
//			+ "    System.out.println();					\n"
3808
//			+ "    foo(										\n"
3809
//			+ "    System.out.println();					\n"
3810
//			+ "    new Object(){							\n"
3811
//			+ "      void foo() {}							\n"
3812
//			+ "    }										\n"
3813
//			+ "  }											\n"
3814
//			+ "}											\n"; 	
3815
//
3816
//	String expectedDietUnitToString = 
3817
//		"package a;\n" + 
3818
//		"public class X {\n" + 
3819
//		"  public X() {\n" + 
3820
//		"  }\n" + 
3821
//		"  void foo() {\n" + 
3822
//		"  }\n" + 
3823
//		"}\n";
3824
//	
3825
//	String expectedDietWithStatementRecoveryUnitToString =
3826
//		expectedDietUnitToString;
3827
//	
3828
//	String expectedDietPlusBodyUnitToString = 
3829
//		"package a;\n" + 
3830
//		"public class X {\n" + 
3831
//		"  public X() {\n" + 
3832
//		"    super();\n" + 
3833
//		"  }\n" + 
3834
//		"  void foo() {\n" + 
3835
//		"  }\n" + 
3836
//		"}\n";;
3837
//
3838
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3839
//		"package a;\n" + 
3840
//		"public class X {\n" + 
3841
//		"  public X() {\n" + 
3842
//		"    super();\n" + 
3843
//		"  }\n" + 
3844
//		"  void foo() {\n" + 
3845
//		"    System.out.println();\n" + 
3846
//		"    System.out.println();\n" + 
3847
//		"    new Object() {\n" + 
3848
//		"      () {\n" + 
3849
//		"        super();\n" + 
3850
//		"      }\n" + 
3851
//		"      void foo() {\n" + 
3852
//		"      }\n" + 
3853
//		"    };\n" + 
3854
//		"  }\n" + 
3855
//		"}\n";
3856
//	
3857
//	String expectedFullUnitToString =
3858
//		expectedDietUnitToString;
3859
//	
3860
//	String expectedFullWithStatementRecoveryUnitToString =
3861
//		expectedFullUnitToString;
3862
//	
3863
//	String testName = "<test>";
3864
//	checkParse(
3865
//		s.toCharArray(),
3866
//		expectedDietUnitToString,
3867
//		expectedDietWithStatementRecoveryUnitToString,
3868
//		expectedDietPlusBodyUnitToString,
3869
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3870
//		expectedFullUnitToString,
3871
//		expectedFullWithStatementRecoveryUnitToString,
3872
//		testName);
3873
//}
3874
//// anonymous type statement with incorrect statements
3875
//public void test0011() {
3876
//
3877
//	String s = 
3878
//		"package a;											\n"
3879
//			+ "public class X {								\n"
3880
//			+ "  void foo() {								\n"
3881
//			+ "    System.out.println();					\n"
3882
//			+ "    foo(										\n"
3883
//			+ "    System.out.println();					\n"
3884
//			+ "    new Object(){							\n"
3885
//			+ "      #										\n"
3886
//			+ "      void foo() {}							\n"
3887
//			+ "    };										\n"
3888
//			+ "  }											\n"
3889
//			+ "}											\n"; 	
3890
//
3891
//	String expectedDietUnitToString = 
3892
//		"package a;\n" + 
3893
//		"public class X {\n" + 
3894
//		"  public X() {\n" + 
3895
//		"  }\n" + 
3896
//		"  void foo() {\n" + 
3897
//		"  }\n" + 
3898
//		"}\n";
3899
//	
3900
//	String expectedDietWithStatementRecoveryUnitToString =
3901
//		expectedDietUnitToString;
3902
//	
3903
//	String expectedDietPlusBodyUnitToString = 
3904
//		"package a;\n" + 
3905
//		"public class X {\n" + 
3906
//		"  public X() {\n" + 
3907
//		"    super();\n" + 
3908
//		"  }\n" + 
3909
//		"  void foo() {\n" + 
3910
//		"  }\n" + 
3911
//		"}\n";;
3912
//
3913
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3914
//		"package a;\n" + 
3915
//		"public class X {\n" + 
3916
//		"  public X() {\n" + 
3917
//		"    super();\n" + 
3918
//		"  }\n" + 
3919
//		"  void foo() {\n" + 
3920
//		"    System.out.println();\n" + 
3921
//		"    System.out.println();\n" + 
3922
//		"    new Object() {\n" + 
3923
//		"      () {\n" + 
3924
//		"        super();\n" + 
3925
//		"      }\n" + 
3926
//		"      void foo() {\n" + 
3927
//		"      }\n" + 
3928
//		"    };\n" + 
3929
//		"  }\n" + 
3930
//		"}\n";
3931
//	
3932
//	String expectedFullUnitToString =
3933
//		expectedDietUnitToString;
3934
//	
3935
//	String expectedFullWithStatementRecoveryUnitToString =
3936
//		expectedFullUnitToString;
3937
//	
3938
//	String testName = "<test>";
3939
//	checkParse(
3940
//		s.toCharArray(),
3941
//		expectedDietUnitToString,
3942
//		expectedDietWithStatementRecoveryUnitToString,
3943
//		expectedDietPlusBodyUnitToString,
3944
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
3945
//		expectedFullUnitToString,
3946
//		expectedFullWithStatementRecoveryUnitToString,
3947
//		testName);
3948
//}
3949
//// method with incorrect statements
3950
//public void test0012() {
3951
//
3952
//	String s = 
3953
//		"package a;											\n"
3954
//			+ "public class X {								\n"
3955
//			+ "  void foo() {								\n"
3956
//			+ "    System.out.println();					\n"
3957
//			+ "    foo(										\n"
3958
//			+ "    System.out.println();					\n"
3959
//			+ "    new Object(){							\n"
3960
//			+ "      #										\n"
3961
//			+ "      void foo() {							\n"
3962
//			+ "        System.out.println();				\n"
3963
//			+ "        foo(									\n"
3964
//			+ "        System.out.println();				\n"
3965
//			+ "      }										\n"
3966
//			+ "    };										\n"
3967
//			+ "  }											\n"
3968
//			+ "}											\n"; 	
3969
//
3970
//	String expectedDietUnitToString = 
3971
//		"package a;\n" + 
3972
//		"public class X {\n" + 
3973
//		"  public X() {\n" + 
3974
//		"  }\n" + 
3975
//		"  void foo() {\n" + 
3976
//		"  }\n" + 
3977
//		"}\n";
3978
//	
3979
//	String expectedDietWithStatementRecoveryUnitToString =
3980
//		expectedDietUnitToString;
3981
//	
3982
//	String expectedDietPlusBodyUnitToString = 
3983
//		"package a;\n" + 
3984
//		"public class X {\n" + 
3985
//		"  public X() {\n" + 
3986
//		"    super();\n" + 
3987
//		"  }\n" + 
3988
//		"  void foo() {\n" + 
3989
//		"  }\n" + 
3990
//		"}\n";;
3991
//
3992
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
3993
//		"package a;\n" + 
3994
//		"public class X {\n" + 
3995
//		"  public X() {\n" + 
3996
//		"    super();\n" + 
3997
//		"  }\n" + 
3998
//		"  void foo() {\n" + 
3999
//		"    System.out.println();\n" + 
4000
//		"    System.out.println();\n" + 
4001
//		"    new Object() {\n" + 
4002
//		"      () {\n" + 
4003
//		"        super();\n" + 
4004
//		"      }\n" + 
4005
//		"      void foo() {\n" + 
4006
//		"        System.out.println();\n" + 
4007
//		"        System.out.println();\n" + 
4008
//		"      }\n" + 
4009
//		"    };\n" + 
4010
//		"  }\n" + 
4011
//		"}\n";
4012
//	
4013
//	String expectedFullUnitToString =
4014
//		expectedDietUnitToString;
4015
//	
4016
//	String expectedFullWithStatementRecoveryUnitToString =
4017
//		expectedFullUnitToString;
4018
//	
4019
//	String testName = "<test>";
4020
//	checkParse(
4021
//		s.toCharArray(),
4022
//		expectedDietUnitToString,
4023
//		expectedDietWithStatementRecoveryUnitToString,
4024
//		expectedDietPlusBodyUnitToString,
4025
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4026
//		expectedFullUnitToString,
4027
//		expectedFullWithStatementRecoveryUnitToString,
4028
//		testName);
4029
//}
4030
//// method with incorrect statements
4031
//public void test0013() {
4032
//
4033
//	String s = 
4034
//		"package a;											\n"
4035
//			+ "public class X {								\n"
4036
//			+ "  void foo() {								\n"
4037
//			+ "    System.out.println();					\n"
4038
//			+ "    foo(										\n"
4039
//			+ "    System.out.println();					\n"
4040
//			+ "    new Object(){							\n"
4041
//			+ "      #										\n"
4042
//			+ "      void foo() {							\n"
4043
//			+ "        #									\n"
4044
//			+ "        System.out.println();				\n"
4045
//			+ "        foo(									\n"
4046
//			+ "        System.out.println();				\n"
4047
//			+ "      }										\n"
4048
//			+ "    };										\n"
4049
//			+ "  }											\n"
4050
//			+ "}											\n"; 	
4051
//
4052
//	String expectedDietUnitToString = 
4053
//		"package a;\n" + 
4054
//		"public class X {\n" + 
4055
//		"  public X() {\n" + 
4056
//		"  }\n" + 
4057
//		"  void foo() {\n" + 
4058
//		"  }\n" + 
4059
//		"}\n";
4060
//	
4061
//	String expectedDietWithStatementRecoveryUnitToString =
4062
//		expectedDietUnitToString;
4063
//	
4064
//	String expectedDietPlusBodyUnitToString = 
4065
//		"package a;\n" + 
4066
//		"public class X {\n" + 
4067
//		"  public X() {\n" + 
4068
//		"    super();\n" + 
4069
//		"  }\n" + 
4070
//		"  void foo() {\n" + 
4071
//		"  }\n" + 
4072
//		"}\n";;
4073
//
4074
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4075
//		"package a;\n" + 
4076
//		"public class X {\n" + 
4077
//		"  public X() {\n" + 
4078
//		"    super();\n" + 
4079
//		"  }\n" + 
4080
//		"  void foo() {\n" + 
4081
//		"    System.out.println();\n" + 
4082
//		"    System.out.println();\n" + 
4083
//		"    new Object() {\n" + 
4084
//		"      () {\n" + 
4085
//		"        super();\n" + 
4086
//		"      }\n" + 
4087
//		"      void foo() {\n" + 
4088
//		"        System.out.println();\n" + 
4089
//		"        System.out.println();\n" + 
4090
//		"      }\n" + 
4091
//		"    };\n" + 
4092
//		"  }\n" + 
4093
//		"}\n";
4094
//	
4095
//	String expectedFullUnitToString =
4096
//		expectedDietUnitToString;
4097
//	
4098
//	String expectedFullWithStatementRecoveryUnitToString =
4099
//		expectedFullUnitToString;
4100
//	
4101
//	String testName = "<test>";
4102
//	checkParse(
4103
//		s.toCharArray(),
4104
//		expectedDietUnitToString,
4105
//		expectedDietWithStatementRecoveryUnitToString,
4106
//		expectedDietPlusBodyUnitToString,
4107
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4108
//		expectedFullUnitToString,
4109
//		expectedFullWithStatementRecoveryUnitToString,
4110
//		testName);
4111
//}
4112
//// incorrect statement at first position
4113
//public void test0014() {
4114
//
4115
//	String s = 
4116
//		"package a;											\n"
4117
//			+ "public class X {								\n"
4118
//			+ "  void foo() {								\n"
4119
//			+ "    foo(										\n"
4120
//			+ "    System.out.println();					\n"
4121
//			+ "  }											\n"
4122
//			+ "}											\n"; 	
4123
//
4124
//	String expectedDietUnitToString = 
4125
//		"package a;\n" + 
4126
//		"public class X {\n" + 
4127
//		"  public X() {\n" + 
4128
//		"  }\n" + 
4129
//		"  void foo() {\n" + 
4130
//		"  }\n" + 
4131
//		"}\n";
4132
//	
4133
//	String expectedDietWithStatementRecoveryUnitToString =
4134
//		expectedDietUnitToString;
4135
//	
4136
//	String expectedDietPlusBodyUnitToString = 
4137
//		"package a;\n" + 
4138
//		"public class X {\n" + 
4139
//		"  public X() {\n" + 
4140
//		"    super();\n" + 
4141
//		"  }\n" + 
4142
//		"  void foo() {\n" + 
4143
//		"  }\n" + 
4144
//		"}\n";;
4145
//
4146
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4147
//		"package a;\n" + 
4148
//		"public class X {\n" + 
4149
//		"  public X() {\n" + 
4150
//		"    super();\n" + 
4151
//		"  }\n" + 
4152
//		"  void foo() {\n" + 
4153
//		"    System.out.println();\n" + 
4154
//		"  }\n" + 
4155
//		"}\n";
4156
//	
4157
//	String expectedFullUnitToString =
4158
//		"package a;\n" + 
4159
//		"public class X {\n" + 
4160
//		"  public X() {\n" + 
4161
//		"  }\n" + 
4162
//		"  void foo() {\n" + 
4163
//		"  }\n" + 
4164
//		"}\n";
4165
//	
4166
//	String expectedFullWithStatementRecoveryUnitToString =
4167
//		expectedFullUnitToString;
4168
//	
4169
//	String testName = "<test>";
4170
//	checkParse(
4171
//		s.toCharArray(),
4172
//		expectedDietUnitToString,
4173
//		expectedDietWithStatementRecoveryUnitToString,
4174
//		expectedDietPlusBodyUnitToString,
4175
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4176
//		expectedFullUnitToString,
4177
//		expectedFullWithStatementRecoveryUnitToString,
4178
//		testName);
4179
//}
4180
//// incorrect method with incorrect statements
4181
//public void test0015() {
4182
//
4183
//	String s = 
4184
//		"package a;											\n"
4185
//			+ "public class X {								\n"
4186
//			+ "  void foo() {								\n"
4187
//			+ "    System.out.println();					\n"
4188
//			+ "    foo(										\n"
4189
//			+ "    System.out.println();					\n"
4190
//			+ "    new Object(){							\n"
4191
//			+ "      #										\n"
4192
//			+ "      void foo( {							\n"
4193
//			+ "        #									\n"
4194
//			+ "        System.out.println();				\n"
4195
//			+ "        foo(									\n"
4196
//			+ "        System.out.println();				\n"
4197
//			+ "      }										\n"
4198
//			+ "    };										\n"
4199
//			+ "  }											\n"
4200
//			+ "}											\n"; 	
4201
//
4202
//	String expectedDietUnitToString = 
4203
//		"package a;\n" + 
4204
//		"public class X {\n" + 
4205
//		"  public X() {\n" + 
4206
//		"  }\n" + 
4207
//		"  void foo() {\n" + 
4208
//		"  }\n" + 
4209
//		"}\n";
4210
//	
4211
//	String expectedDietWithStatementRecoveryUnitToString =
4212
//		expectedDietUnitToString;
4213
//	
4214
//	String expectedDietPlusBodyUnitToString = 
4215
//		"package a;\n" + 
4216
//		"public class X {\n" + 
4217
//		"  public X() {\n" + 
4218
//		"    super();\n" + 
4219
//		"  }\n" + 
4220
//		"  void foo() {\n" + 
4221
//		"  }\n" + 
4222
//		"}\n";;
4223
//
4224
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4225
//		"package a;\n" + 
4226
//		"public class X {\n" + 
4227
//		"  public X() {\n" + 
4228
//		"    super();\n" + 
4229
//		"  }\n" + 
4230
//		"  void foo() {\n" + 
4231
//		"    System.out.println();\n" + 
4232
//		"    System.out.println();\n" + 
4233
//		"    new Object() {\n" + 
4234
//		"      () {\n" + 
4235
//		"        super();\n" + 
4236
//		"      }\n" + 
4237
//		"      void foo() {\n" + 
4238
//		"        System.out.println();\n" + 
4239
//		"        System.out.println();\n" + 
4240
//		"      }\n" + 
4241
//		"    };\n" + 
4242
//		"  }\n" + 
4243
//		"}\n";
4244
//	
4245
//	String expectedFullUnitToString =
4246
//		expectedDietUnitToString;
4247
//	
4248
//	String expectedFullWithStatementRecoveryUnitToString =
4249
//		expectedFullUnitToString;
4250
//	
4251
//	String testName = "<test>";
4252
//	checkParse(
4253
//		s.toCharArray(),
4254
//		expectedDietUnitToString,
4255
//		expectedDietWithStatementRecoveryUnitToString,
4256
//		expectedDietPlusBodyUnitToString,
4257
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4258
//		expectedFullUnitToString,
4259
//		expectedFullWithStatementRecoveryUnitToString,
4260
//		testName);
4261
//}
4262
//// incorrect method with incorrect statements
4263
//public void test0016() {
4264
//
4265
//	String s = 
4266
//		"package a;											\n"
4267
//			+ "public class X {								\n"
4268
//			+ "  void foo() {								\n"
4269
//			+ "    System.out.println();					\n"
4270
//			+ "    foo(										\n"
4271
//			+ "    System.out.println();					\n"
4272
//			+ "    new Object(){							\n"
4273
//			+ "      #										\n"
4274
//			+ "      void foo( {							\n"
4275
//			+ "        #									\n"
4276
//			+ "        System.out.println();				\n"
4277
//			+ "        foo(									\n"
4278
//			+ "        System.out.println();				\n"
4279
//			+ "      }										\n"
4280
//			+ "    }										\n"
4281
//			+ "  }											\n"
4282
//			+ "}											\n"; 	
4283
//
4284
//	String expectedDietUnitToString = 
4285
//		"package a;\n" + 
4286
//		"public class X {\n" + 
4287
//		"  public X() {\n" + 
4288
//		"  }\n" + 
4289
//		"  void foo() {\n" + 
4290
//		"  }\n" + 
4291
//		"}\n";
4292
//	
4293
//	String expectedDietWithStatementRecoveryUnitToString =
4294
//		expectedDietUnitToString;
4295
//	
4296
//	String expectedDietPlusBodyUnitToString = 
4297
//		"package a;\n" + 
4298
//		"public class X {\n" + 
4299
//		"  public X() {\n" + 
4300
//		"    super();\n" + 
4301
//		"  }\n" + 
4302
//		"  void foo() {\n" + 
4303
//		"  }\n" + 
4304
//		"}\n";
4305
//
4306
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4307
//		"package a;\n" + 
4308
//		"public class X {\n" + 
4309
//		"  public X() {\n" + 
4310
//		"    super();\n" + 
4311
//		"  }\n" + 
4312
//		"  void foo() {\n" + 
4313
//		"    System.out.println();\n" + 
4314
//		"    System.out.println();\n" + 
4315
//		"    new Object() {\n" + 
4316
//		"      () {\n" + 
4317
//		"        super();\n" + 
4318
//		"      }\n" + 
4319
//		"      void foo() {\n" + 
4320
//		"        System.out.println();\n" + 
4321
//		"        System.out.println();\n" + 
4322
//		"      }\n" + 
4323
//		"    };\n" + 
4324
//		"  }\n" + 
4325
//		"}\n";
4326
//	
4327
//	String expectedFullUnitToString =
4328
//		expectedDietUnitToString;
4329
//	
4330
//	String expectedFullWithStatementRecoveryUnitToString =
4331
//		expectedFullUnitToString;
4332
//	
4333
//	String testName = "<test>";
4334
//	checkParse(
4335
//		s.toCharArray(),
4336
//		expectedDietUnitToString,
4337
//		expectedDietWithStatementRecoveryUnitToString,
4338
//		expectedDietPlusBodyUnitToString,
4339
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4340
//		expectedFullUnitToString,
4341
//		expectedFullWithStatementRecoveryUnitToString,
4342
//		testName);
4343
//}
4344
//// incorrect method with incorrect statements
4345
//public void test0017() {
4346
//
4347
//	String s = 
4348
//		"package a;											\n"
4349
//			+ "public class X {								\n"
4350
//			+ "  void foo() {								\n"
4351
//			+ "    System.out.println();					\n"
4352
//			+ "    foo(										\n"
4353
//			+ "    System.out.println();					\n"
4354
//			+ "    new Object(){							\n"
4355
//			+ "      #										\n"
4356
//			+ "      void foo() {							\n"
4357
//			+ "        #									\n"
4358
//			+ "        System.out.println();				\n"
4359
//			+ "        foo(									\n"
4360
//			+ "        System.out.println();				\n"
4361
//			+ "      }										\n"
4362
//			+ "    }										\n"
4363
//			+ "    System.out.println();					\n"
4364
//			+ "    foo(										\n"
4365
//			+ "    System.out.println();					\n"
4366
//			+ "  }											\n"
4367
//			+ "}											\n"; 	
4368
//
4369
//	String expectedDietUnitToString = 
4370
//		"package a;\n" + 
4371
//		"public class X {\n" + 
4372
//		"  public X() {\n" + 
4373
//		"  }\n" + 
4374
//		"  void foo() {\n" + 
4375
//		"  }\n" + 
4376
//		"}\n";
4377
//	
4378
//	String expectedDietWithStatementRecoveryUnitToString =
4379
//		expectedDietUnitToString;
4380
//	
4381
//	String expectedDietPlusBodyUnitToString = 
4382
//		"package a;\n" + 
4383
//		"public class X {\n" + 
4384
//		"  public X() {\n" + 
4385
//		"    super();\n" + 
4386
//		"  }\n" + 
4387
//		"  void foo() {\n" + 
4388
//		"  }\n" + 
4389
//		"}\n";;
4390
//
4391
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4392
//		"package a;\n" + 
4393
//		"public class X {\n" + 
4394
//		"  public X() {\n" + 
4395
//		"    super();\n" + 
4396
//		"  }\n" + 
4397
//		"  void foo() {\n" + 
4398
//		"    System.out.println();\n" + 
4399
//		"    System.out.println();\n" + 
4400
//		"    new Object() {\n" + 
4401
//		"      () {\n" + 
4402
//		"        super();\n" + 
4403
//		"      }\n" + 
4404
//		"      void foo() {\n" + 
4405
//		"        System.out.println();\n" + 
4406
//		"        System.out.println();\n" + 
4407
//		"      }\n" + 
4408
//		"    };\n" + 
4409
//		"    System.out.println();\n" + 
4410
//		"    System.out.println();\n" + 
4411
//		"  }\n" + 
4412
//		"}\n";
4413
//	
4414
//	String expectedFullUnitToString =
4415
//		expectedDietUnitToString;
4416
//	
4417
//	String expectedFullWithStatementRecoveryUnitToString =
4418
//		expectedFullUnitToString;
4419
//	
4420
//	String testName = "<test>";
4421
//	checkParse(
4422
//		s.toCharArray(),
4423
//		expectedDietUnitToString,
4424
//		expectedDietWithStatementRecoveryUnitToString,
4425
//		expectedDietPlusBodyUnitToString,
4426
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4427
//		expectedFullUnitToString,
4428
//		expectedFullWithStatementRecoveryUnitToString,
4429
//		testName);
4430
//}
4431
//// method without right brace and with incorrect statements
4432
//public void test0018() {
4433
//
4434
//	String s = 
4435
//		"package a;											\n"
4436
//			+ "public class X {								\n"
4437
//			+ "  void foo() {								\n"
4438
//			+ "    System.out.println();					\n"
4439
//			+ "    new Object(){							\n"
4440
//			+ "      void foo() {							\n"
4441
//			+ "        System.out.println();				\n"
4442
//			+ "        foo(									\n"
4443
//			+ "        System.out.println();				\n"
4444
//			+ "      void bar() {							\n"
4445
//			+ "        System.out.println();				\n"
4446
//			+ "        foo(									\n"
4447
//			+ "        System.out.println();				\n"
4448
//			+ "      }										\n"
4449
//			+ "    }										\n"
4450
//			+ "    System.out.println();					\n"
4451
//			+ "  }											\n"
4452
//			+ "}											\n"; 	
4453
//
4454
//	String expectedDietUnitToString = 
4455
//		"package a;\n" + 
4456
//		"public class X {\n" + 
4457
//		"  public X() {\n" + 
4458
//		"  }\n" + 
4459
//		"  void foo() {\n" + 
4460
//		"  }\n" + 
4461
//		"}\n";
4462
//	
4463
//	String expectedDietWithStatementRecoveryUnitToString =
4464
//		expectedDietUnitToString;
4465
//	
4466
//	String expectedDietPlusBodyUnitToString = 
4467
//		"package a;\n" + 
4468
//		"public class X {\n" + 
4469
//		"  public X() {\n" + 
4470
//		"    super();\n" + 
4471
//		"  }\n" + 
4472
//		"  void foo() {\n" + 
4473
//		"  }\n" + 
4474
//		"}\n";
4475
//
4476
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4477
//		"package a;\n" + 
4478
//		"public class X {\n" + 
4479
//		"  public X() {\n" + 
4480
//		"    super();\n" + 
4481
//		"  }\n" + 
4482
//		"  void foo() {\n" + 
4483
//		"    System.out.println();\n" + 
4484
//		"    new Object() {\n" + 
4485
//		"      () {\n" + 
4486
//		"        super();\n" + 
4487
//		"      }\n" + 
4488
//		"      void foo() {\n" + 
4489
//		"        System.out.println();\n" + 
4490
//		"        System.out.println();\n" + 
4491
//		"      }\n" + 
4492
//		"      void bar() {\n" + 
4493
//		"        System.out.println();\n" + 
4494
//		"        System.out.println();\n" + 
4495
//		"      }\n" + 
4496
//		"    };\n" + 
4497
//		"    System.out.println();\n" + 
4498
//		"  }\n" + 
4499
//		"}\n";
4500
//	
4501
//	String expectedFullUnitToString =
4502
//		expectedDietUnitToString;
4503
//	
4504
//	String expectedFullWithStatementRecoveryUnitToString =
4505
//		expectedFullUnitToString;
4506
//	
4507
//	String testName = "<test>";
4508
//	checkParse(
4509
//		s.toCharArray(),
4510
//		expectedDietUnitToString,
4511
//		expectedDietWithStatementRecoveryUnitToString,
4512
//		expectedDietPlusBodyUnitToString,
4513
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4514
//		expectedFullUnitToString,
4515
//		expectedFullWithStatementRecoveryUnitToString,
4516
//		testName);
4517
//}
4518
//// local type inside block statements
4519
//public void test0019() {
4520
//
4521
//	String s = 
4522
//		"package a;											\n"
4523
//			+ "public class X {								\n"
4524
//			+ "  void foo() {								\n"
4525
//			+ "    System.out.println();					\n"
4526
//			+ "    {										\n"
4527
//			+ "      class Y {		 						\n"
4528
//			+ "      } 										\n"
4529
//			+ "    }	               						\n"
4530
//			+ "    System.out.println();					\n"
4531
//			+ "  }											\n"
4532
//			+ "}											\n"; 	
4533
//
4534
//	String expectedDietUnitToString = 
4535
//		"package a;\n" + 
4536
//		"public class X {\n" + 
4537
//		"  public X() {\n" + 
4538
//		"  }\n" + 
4539
//		"  void foo() {\n" + 
4540
//		"  }\n" + 
4541
//		"}\n";
4542
//	
4543
//	String expectedDietWithStatementRecoveryUnitToString =
4544
//		expectedDietUnitToString;
4545
//	
4546
//	String expectedDietPlusBodyUnitToString = 
4547
//		"package a;\n" + 
4548
//		"public class X {\n" + 
4549
//		"  public X() {\n" + 
4550
//		"    super();\n" + 
4551
//		"  }\n" + 
4552
//		"  void foo() {\n" + 
4553
//		"    System.out.println();\n" + 
4554
//		"    {\n" + 
4555
//		"      class Y {\n" + 
4556
//		"        Y() {\n" + 
4557
//		"          super();\n" + 
4558
//		"        }\n" + 
4559
//		"      }\n" + 
4560
//		"    }\n" + 
4561
//		"    System.out.println();\n" + 
4562
//		"  }\n" + 
4563
//		"}\n";
4564
//
4565
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4566
//		expectedDietPlusBodyUnitToString;
4567
//	
4568
//	String expectedFullUnitToString =
4569
//		expectedDietPlusBodyUnitToString;
4570
//	
4571
//	String expectedFullWithStatementRecoveryUnitToString =
4572
//		expectedFullUnitToString;
4573
//	
4574
//	String testName = "<test>";
4575
//	checkParse(
4576
//		s.toCharArray(),
4577
//		expectedDietUnitToString,
4578
//		expectedDietWithStatementRecoveryUnitToString,
4579
//		expectedDietPlusBodyUnitToString,
4580
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4581
//		expectedFullUnitToString,
4582
//		expectedFullWithStatementRecoveryUnitToString,
4583
//		testName);
4584
//}
4585
//// local type inside block statements
4586
//public void test0020() {
4587
//
4588
//	String s = 
4589
//		"package a;											\n"
4590
//			+ "public class X {								\n"
4591
//			+ "  void foo() {								\n"
4592
//			+ "    #   										\n"
4593
//			+ "    System.out.println();					\n"
4594
//			+ "    {										\n"
4595
//			+ "      class Y {		 						\n"
4596
//			+ "      } 										\n"
4597
//			+ "    }	               						\n"
4598
//			+ "    System.out.println();					\n"
4599
//			+ "  }											\n"
4600
//			+ "}											\n"; 	
4601
//
4602
//	String expectedDietUnitToString = 
4603
//		"package a;\n" + 
4604
//		"public class X {\n" + 
4605
//		"  public X() {\n" + 
4606
//		"  }\n" + 
4607
//		"  void foo() {\n" + 
4608
//		"  }\n" + 
4609
//		"}\n";
4610
//	
4611
//	String expectedDietWithStatementRecoveryUnitToString =
4612
//		expectedDietUnitToString;
4613
//	
4614
//	String expectedDietPlusBodyUnitToString = 
4615
//		"package a;\n" + 
4616
//		"public class X {\n" + 
4617
//		"  public X() {\n" + 
4618
//		"    super();\n" + 
4619
//		"  }\n" + 
4620
//		"  void foo() {\n" + 
4621
//		"  }\n" + 
4622
//		"}\n";;
4623
//
4624
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4625
//		"package a;\n" + 
4626
//		"public class X {\n" + 
4627
//		"  public X() {\n" + 
4628
//		"    super();\n" + 
4629
//		"  }\n" + 
4630
//		"  void foo() {\n" + 
4631
//		"    System.out.println();\n" + 
4632
//		"    {\n" + 
4633
//		"      class Y {\n" + 
4634
//		"        Y() {\n" + 
4635
//		"          super();\n" + 
4636
//		"        }\n" + 
4637
//		"      }\n" + 
4638
//		"    }\n" + 
4639
//		"    System.out.println();\n" + 
4640
//		"  }\n" + 
4641
//		"}\n";
4642
//	
4643
//	String expectedFullUnitToString =
4644
//		"package a;\n" + 
4645
//		"public class X {\n" + 
4646
//		"  public X() {\n" + 
4647
//		"  }\n" + 
4648
//		"  void foo() {\n" + 
4649
//		"  }\n" + 
4650
//		"}\n";
4651
//	
4652
//	String expectedFullWithStatementRecoveryUnitToString =
4653
//		expectedFullUnitToString;
4654
//	
4655
//	String testName = "<test>";
4656
//	checkParse(
4657
//		s.toCharArray(),
4658
//		expectedDietUnitToString,
4659
//		expectedDietWithStatementRecoveryUnitToString,
4660
//		expectedDietPlusBodyUnitToString,
4661
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4662
//		expectedFullUnitToString,
4663
//		expectedFullWithStatementRecoveryUnitToString,
4664
//		testName);
4665
//}
4666
//// local type inside block statements
4667
//public void test0021() {
4668
//
4669
//	String s = 
4670
//		"package a;											\n"
4671
//			+ "public class X {								\n"
4672
//			+ "  void foo() {								\n"
4673
//			+ "    #   										\n"
4674
//			+ "    System.out.println();					\n"
4675
//			+ "    {										\n"
4676
//			+ "      System.out.println();					\n"
4677
//			+ "      class Y {		 						\n"
4678
//			+ "      } 										\n"
4679
//			+ "      System.out.println();					\n"
4680
//			+ "    }	               						\n"
4681
//			+ "    System.out.println();					\n"
4682
//			+ "  }											\n"
4683
//			+ "}											\n"; 	
4684
//
4685
//	String expectedDietUnitToString = 
4686
//		"package a;\n" + 
4687
//		"public class X {\n" + 
4688
//		"  public X() {\n" + 
4689
//		"  }\n" + 
4690
//		"  void foo() {\n" + 
4691
//		"  }\n" + 
4692
//		"}\n";
4693
//	
4694
//	String expectedDietWithStatementRecoveryUnitToString =
4695
//		expectedDietUnitToString;
4696
//	
4697
//	String expectedDietPlusBodyUnitToString = 
4698
//		"package a;\n" + 
4699
//		"public class X {\n" + 
4700
//		"  public X() {\n" + 
4701
//		"    super();\n" + 
4702
//		"  }\n" + 
4703
//		"  void foo() {\n" + 
4704
//		"  }\n" + 
4705
//		"}\n";;
4706
//
4707
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4708
//		"package a;\n" + 
4709
//		"public class X {\n" + 
4710
//		"  public X() {\n" + 
4711
//		"    super();\n" + 
4712
//		"  }\n" + 
4713
//		"  void foo() {\n" + 
4714
//		"    System.out.println();\n" + 
4715
//		"    {\n" + 
4716
//		"      System.out.println();\n" + 
4717
//		"      class Y {\n" + 
4718
//		"        Y() {\n" + 
4719
//		"          super();\n" + 
4720
//		"        }\n" + 
4721
//		"      }\n" + 
4722
//		"      System.out.println();\n" + 
4723
//		"    }\n" + 
4724
//		"    System.out.println();\n" + 
4725
//		"  }\n" + 
4726
//		"}\n";
4727
//	
4728
//	String expectedFullUnitToString =
4729
//		"package a;\n" + 
4730
//		"public class X {\n" + 
4731
//		"  public X() {\n" + 
4732
//		"  }\n" + 
4733
//		"  void foo() {\n" + 
4734
//		"  }\n" + 
4735
//		"}\n";
4736
//	
4737
//	String expectedFullWithStatementRecoveryUnitToString =
4738
//		expectedFullUnitToString;
4739
//	
4740
//	String testName = "<test>";
4741
//	checkParse(
4742
//		s.toCharArray(),
4743
//		expectedDietUnitToString,
4744
//		expectedDietWithStatementRecoveryUnitToString,
4745
//		expectedDietPlusBodyUnitToString,
4746
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4747
//		expectedFullUnitToString,
4748
//		expectedFullWithStatementRecoveryUnitToString,
4749
//		testName);
4750
//}
4751
//// anonymous types inside message send
4752
//public void test0022() {
4753
//
4754
//	String s = 
4755
//		"package a;											\n"
4756
//			+ "public class X {								\n"
4757
//			+ "  void foo() {								\n"
4758
//			+ "    System.out.println();					\n"
4759
//			+ "    bar(										\n"
4760
//			+ "      new Object(){}, 						\n"
4761
//			+ "      var,									\n"
4762
//			+ "      new Object(){} 						\n"
4763
//			+ "    );                						\n"
4764
//			+ "    System.out.println();					\n"
4765
//			+ "  }											\n"
4766
//			+ "}											\n"; 	
4767
//
4768
//	String expectedDietUnitToString = 
4769
//		"package a;\n" + 
4770
//		"public class X {\n" + 
4771
//		"  public X() {\n" + 
4772
//		"  }\n" + 
4773
//		"  void foo() {\n" + 
4774
//		"  }\n" + 
4775
//		"}\n";
4776
//	
4777
//	String expectedDietWithStatementRecoveryUnitToString =
4778
//		expectedDietUnitToString;
4779
//	
4780
//	String expectedDietPlusBodyUnitToString = 
4781
//		"package a;\n" + 
4782
//		"public class X {\n" + 
4783
//		"  public X() {\n" + 
4784
//		"    super();\n" + 
4785
//		"  }\n" + 
4786
//		"  void foo() {\n" + 
4787
//		"    System.out.println();\n" + 
4788
//		"    bar(new Object() {\n" + 
4789
//		"}, var, new Object() {\n" + 
4790
//		"});\n" + 
4791
//		"    System.out.println();\n" + 
4792
//		"  }\n" + 
4793
//		"}\n";
4794
//
4795
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4796
//		expectedDietPlusBodyUnitToString;
4797
//	
4798
//	String expectedFullUnitToString =
4799
//		expectedDietPlusBodyUnitToString;
4800
//	
4801
//	String expectedFullWithStatementRecoveryUnitToString =
4802
//		expectedFullUnitToString;
4803
//	
4804
//	String testName = "<test>";
4805
//	checkParse(
4806
//		s.toCharArray(),
4807
//		expectedDietUnitToString,
4808
//		expectedDietWithStatementRecoveryUnitToString,
4809
//		expectedDietPlusBodyUnitToString,
4810
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4811
//		expectedFullUnitToString,
4812
//		expectedFullWithStatementRecoveryUnitToString,
4813
//		testName);
4814
//}
4815
//// anonymous types inside message send
4816
//public void test0023() {
4817
//
4818
//	String s = 
4819
//		"package a;											\n"
4820
//			+ "public class X {								\n"
4821
//			+ "  void foo() {								\n"
4822
//			+ "    #										\n"
4823
//			+ "    System.out.println();					\n"
4824
//			+ "    bar(										\n"
4825
//			+ "      new Object(){}, 						\n"
4826
//			+ "      var,									\n"
4827
//			+ "      new Object(){} 						\n"
4828
//			+ "    );                						\n"
4829
//			+ "    System.out.println();					\n"
4830
//			+ "  }											\n"
4831
//			+ "}											\n"; 	
4832
//
4833
//	String expectedDietUnitToString = 
4834
//		"package a;\n" + 
4835
//		"public class X {\n" + 
4836
//		"  public X() {\n" + 
4837
//		"  }\n" + 
4838
//		"  void foo() {\n" + 
4839
//		"  }\n" + 
4840
//		"}\n";
4841
//	
4842
//	String expectedDietWithStatementRecoveryUnitToString =
4843
//		expectedDietUnitToString;
4844
//	
4845
//	String expectedDietPlusBodyUnitToString = 
4846
//		"package a;\n" + 
4847
//		"public class X {\n" + 
4848
//		"  public X() {\n" + 
4849
//		"    super();\n" + 
4850
//		"  }\n" + 
4851
//		"  void foo() {\n" + 
4852
//		"  }\n" + 
4853
//		"}\n";;
4854
//
4855
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4856
//		"package a;\n" + 
4857
//		"public class X {\n" + 
4858
//		"  public X() {\n" + 
4859
//		"    super();\n" + 
4860
//		"  }\n" + 
4861
//		"  void foo() {\n" + 
4862
//		"    System.out.println();\n" + 
4863
//		"    bar(new Object() {\n" + 
4864
//		"  () {\n" + 
4865
//		"    super();\n" + 
4866
//		"  }\n" + 
4867
//		"}, var, new Object() {\n" + 
4868
//		"  () {\n" + 
4869
//		"    super();\n" + 
4870
//		"  }\n" + 
4871
//		"});\n" + 
4872
//		"    System.out.println();\n" + 
4873
//		"  }\n" + 
4874
//		"}\n";
4875
//	
4876
//	String expectedFullUnitToString =
4877
//		"package a;\n" + 
4878
//		"public class X {\n" + 
4879
//		"  public X() {\n" + 
4880
//		"  }\n" + 
4881
//		"  void foo() {\n" + 
4882
//		"  }\n" + 
4883
//		"}\n";
4884
//	
4885
//	String expectedFullWithStatementRecoveryUnitToString =
4886
//		expectedFullUnitToString;
4887
//	
4888
//	String testName = "<test>";
4889
//	checkParse(
4890
//		s.toCharArray(),
4891
//		expectedDietUnitToString,
4892
//		expectedDietWithStatementRecoveryUnitToString,
4893
//		expectedDietPlusBodyUnitToString,
4894
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4895
//		expectedFullUnitToString,
4896
//		expectedFullWithStatementRecoveryUnitToString,
4897
//		testName);
4898
//}
4899
//// anonymous types inside message send
4900
//public void test0024() {
4901
//
4902
//	String s = 
4903
//		"package a;											\n"
4904
//			+ "public class X {								\n"
4905
//			+ "  void foo() {								\n"
4906
//			+ "    #										\n"
4907
//			+ "    System.out.println();					\n"
4908
//			+ "    bar(										\n"
4909
//			+ "      new Object(){}, 						\n"
4910
//			+ "      var,									\n"
4911
//			+ "      new Object(){} 						\n"
4912
//			+ "    )                						\n"
4913
//			+ "    System.out.println();					\n"
4914
//			+ "  }											\n"
4915
//			+ "}											\n"; 	
4916
//
4917
//	String expectedDietUnitToString = 
4918
//		"package a;\n" + 
4919
//		"public class X {\n" + 
4920
//		"  public X() {\n" + 
4921
//		"  }\n" + 
4922
//		"  void foo() {\n" + 
4923
//		"  }\n" + 
4924
//		"}\n";
4925
//	
4926
//	String expectedDietWithStatementRecoveryUnitToString =
4927
//		expectedDietUnitToString;
4928
//	
4929
//	String expectedDietPlusBodyUnitToString = 
4930
//		"package a;\n" + 
4931
//		"public class X {\n" + 
4932
//		"  public X() {\n" + 
4933
//		"    super();\n" + 
4934
//		"  }\n" + 
4935
//		"  void foo() {\n" + 
4936
//		"  }\n" + 
4937
//		"}\n";;
4938
//
4939
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
4940
//		"package a;\n" + 
4941
//		"public class X {\n" + 
4942
//		"  public X() {\n" + 
4943
//		"    super();\n" + 
4944
//		"  }\n" + 
4945
//		"  void foo() {\n" + 
4946
//		"    System.out.println();\n" + 
4947
//		"    new Object() {\n" + 
4948
//		"      () {\n" + 
4949
//		"        super();\n" + 
4950
//		"      }\n" + 
4951
//		"    };\n" + 
4952
//		"    new Object() {\n" + 
4953
//		"      () {\n" + 
4954
//		"        super();\n" + 
4955
//		"      }\n" + 
4956
//		"    };\n" + 
4957
//		"    System.out.println();\n" + 
4958
//		"  }\n" + 
4959
//		"}\n";
4960
//	
4961
//	String expectedFullUnitToString =
4962
//		"package a;\n" + 
4963
//		"public class X {\n" + 
4964
//		"  public X() {\n" + 
4965
//		"  }\n" + 
4966
//		"  void foo() {\n" + 
4967
//		"  }\n" + 
4968
//		"}\n";
4969
//			
4970
//	String expectedFullWithStatementRecoveryUnitToString =
4971
//		expectedFullUnitToString;
4972
//	
4973
//	String testName = "<test>";
4974
//	checkParse(
4975
//		s.toCharArray(),
4976
//		expectedDietUnitToString,
4977
//		expectedDietWithStatementRecoveryUnitToString,
4978
//		expectedDietPlusBodyUnitToString,
4979
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
4980
//		expectedFullUnitToString,
4981
//		expectedFullWithStatementRecoveryUnitToString,
4982
//		testName);
4983
//}
4984
//public void test0025() {
4985
//
4986
//	String s = 
4987
//		"package a;											\n"
4988
//			+ "public class X {								\n"
4989
//			+ "  void foo() {								\n"
4990
//			+ "    System.out.println();					\n"
4991
//			+ "    bar(new Object1(){						\n"
4992
//			+ "      new Object2(){}, 						\n"
4993
//			+ "      var,									\n"
4994
//			+ "      new Object3(){} 						\n"
4995
//			+ "    );                						\n"
4996
//			+ "    System.out.println();					\n"
4997
//			+ "  }											\n"
4998
//			+ "}											\n"; 	
4999
//
5000
//	String expectedDietUnitToString = 
5001
//		"package a;\n" + 
5002
//		"public class X {\n" + 
5003
//		"  public X() {\n" + 
5004
//		"  }\n" + 
5005
//		"  void foo() {\n" + 
5006
//		"  }\n" + 
5007
//		"}\n";
5008
//	
5009
//	String expectedDietWithStatementRecoveryUnitToString =
5010
//		expectedDietUnitToString;
5011
//	
5012
//	String expectedDietPlusBodyUnitToString = 
5013
//		"package a;\n" + 
5014
//		"public class X {\n" + 
5015
//		"  public X() {\n" + 
5016
//		"    super();\n" + 
5017
//		"  }\n" + 
5018
//		"  void foo() {\n" + 
5019
//		"  }\n" + 
5020
//		"}\n";
5021
//
5022
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5023
//		"package a;\n" + 
5024
//		"public class X {\n" + 
5025
//		"  public X() {\n" + 
5026
//		"    super();\n" + 
5027
//		"  }\n" + 
5028
//		"  void foo() {\n" + 
5029
//		"    System.out.println();\n" + 
5030
//		"    bar(new Object1() {\n" + 
5031
//		"  () {\n" + 
5032
//		"    super();\n" + 
5033
//		"  }\n" + 
5034
//		"}, var, new Object3() {\n" + 
5035
//		"  () {\n" + 
5036
//		"    super();\n" + 
5037
//		"  }\n" + 
5038
//		"});\n" + 
5039
//		"    System.out.println();\n" + 
5040
//		"  }\n" + 
5041
//		"}\n";
5042
//	
5043
//	String expectedFullUnitToString =
5044
//		"package a;\n" + 
5045
//		"public class X {\n" + 
5046
//		"  public X() {\n" + 
5047
//		"  }\n" + 
5048
//		"  void foo() {\n" + 
5049
//		"  }\n" + 
5050
//		"}\n";
5051
//	
5052
//	String expectedFullWithStatementRecoveryUnitToString =
5053
//		expectedFullUnitToString;
5054
//	
5055
//	String testName = "<test>";
5056
//	checkParse(
5057
//		s.toCharArray(),
5058
//		expectedDietUnitToString,
5059
//		expectedDietWithStatementRecoveryUnitToString,
5060
//		expectedDietPlusBodyUnitToString,
5061
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5062
//		expectedFullUnitToString,
5063
//		expectedFullWithStatementRecoveryUnitToString,
5064
//		testName);
5065
//}
5066
//public void test0026() {
5067
//
5068
//	String s = 
5069
//		"package a;											\n"
5070
//			+ "import java.lang.*;							\n"
5071
//			+ "import java.util.*;							\n"
5072
//			+ "												\n"
5073
//			+ "public class X {								\n"
5074
//			+ "	void foo() {								\n"
5075
//			+ "		System.out.println();					\n"
5076
//			+ "												\n"
5077
//			+ "		class L {								\n"
5078
//			+ "			void baz(){}						\n"
5079
//			+ "		}										\n"
5080
//			+ "												\n"
5081
//			+ "	public int h;								\n"
5082
//			+ "	public int[] i = { 0, 1 };					\n"
5083
//			+ "												\n"
5084
//			+ "	void bar(){									\n"
5085
//			+ "	void truc(){								\n"
5086
//			+ "}											\n"; 
5087
//
5088
//	String expectedDietUnitToString = 
5089
//		"package a;\n" + 
5090
//		"import java.lang.*;\n" + 
5091
//		"import java.util.*;\n" + 
5092
//		"public class X {\n" + 
5093
//		"  public int h;\n" + 
5094
//		"  public int[] i = {0, 1};\n" + 
5095
//		"  public X() {\n" + 
5096
//		"  }\n" + 
5097
//		"  void foo() {\n" + 
5098
//		"  }\n" + 
5099
//		"  void bar() {\n" + 
5100
//		"  }\n" + 
5101
//		"  void truc() {\n" + 
5102
//		"  }\n" + 
5103
//		"}\n";
5104
//	
5105
//	String expectedDietWithStatementRecoveryUnitToString =
5106
//		expectedDietUnitToString;
5107
//	
5108
//	String expectedDietPlusBodyUnitToString = 
5109
//		"package a;\n" + 
5110
//		"import java.lang.*;\n" + 
5111
//		"import java.util.*;\n" + 
5112
//		"public class X {\n" + 
5113
//		"  public int h;\n" + 
5114
//		"  public int[] i = {0, 1};\n" + 
5115
//		"  public X() {\n" + 
5116
//		"    super();\n" + 
5117
//		"  }\n" + 
5118
//		"  void foo() {\n" + 
5119
//		"  }\n" + 
5120
//		"  void bar() {\n" + 
5121
//		"  }\n" + 
5122
//		"  void truc() {\n" + 
5123
//		"  }\n" + 
5124
//		"}\n";
5125
//
5126
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5127
//		"package a;\n" + 
5128
//		"import java.lang.*;\n" + 
5129
//		"import java.util.*;\n" + 
5130
//		"public class X {\n" + 
5131
//		"  public int h;\n" + 
5132
//		"  public int[] i = {0, 1};\n" + 
5133
//		"  public X() {\n" + 
5134
//		"    super();\n" + 
5135
//		"  }\n" + 
5136
//		"  void foo() {\n" + 
5137
//		"    System.out.println();\n" + 
5138
//		"    class L {\n" + 
5139
//		"      L() {\n" + 
5140
//		"        super();\n" + 
5141
//		"      }\n" + 
5142
//		"      void baz() {\n" + 
5143
//		"      }\n" + 
5144
//		"    }\n" + 
5145
//		"  }\n" + 
5146
//		"  void bar() {\n" + 
5147
//		"  }\n" + 
5148
//		"  void truc() {\n" + 
5149
//		"  }\n" + 
5150
//		"}\n";
5151
//	
5152
//	String expectedFullUnitToString =
5153
//		expectedDietUnitToString;
5154
//	
5155
//	String expectedFullWithStatementRecoveryUnitToString =
5156
//		expectedFullUnitToString;
5157
//	
5158
//	String testName = "<test>";
5159
//	checkParse(
5160
//		s.toCharArray(),
5161
//		expectedDietUnitToString,
5162
//		expectedDietWithStatementRecoveryUnitToString,
5163
//		expectedDietPlusBodyUnitToString,
5164
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5165
//		expectedFullUnitToString,
5166
//		expectedFullWithStatementRecoveryUnitToString,
5167
//		testName);
5168
//}
5169
//public void test0027() {
5170
//
5171
//	String s =
5172
//		"public class X {							\n"+
5173
//		"   int foo(){								\n"+
5174
//		"	  if(true){								\n"+
5175
//		"     	int x;								\n"+
5176
//		"	 										\n";
5177
//
5178
//	String expectedDietUnitToString = 
5179
//		"public class X {\n" + 
5180
//		"  public X() {\n" + 
5181
//		"  }\n" + 
5182
//		"  int foo() {\n" + 
5183
//		"  }\n" + 
5184
//		"}\n";
5185
//	
5186
//	String expectedDietWithStatementRecoveryUnitToString =
5187
//		expectedDietUnitToString;
5188
//	
5189
//	String expectedDietPlusBodyUnitToString = 
5190
//		"public class X {\n" + 
5191
//		"  public X() {\n" + 
5192
//		"    super();\n" + 
5193
//		"  }\n" + 
5194
//		"  int foo() {\n" + 
5195
//		"  }\n" + 
5196
//		"}\n";
5197
//
5198
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5199
//		"public class X {\n" + 
5200
//		"  public X() {\n" + 
5201
//		"    super();\n" + 
5202
//		"  }\n" + 
5203
//		"  int foo() {\n" + 
5204
//		"  }\n" + 
5205
//		"}\n";
5206
//	
5207
//	String expectedFullUnitToString =
5208
//		expectedDietUnitToString;
5209
//	
5210
//	String expectedFullWithStatementRecoveryUnitToString =
5211
//		expectedFullUnitToString;
5212
//	
5213
//	String testName = "<test>";
5214
//	checkParse(
5215
//		s.toCharArray(),
5216
//		expectedDietUnitToString,
5217
//		expectedDietWithStatementRecoveryUnitToString,
5218
//		expectedDietPlusBodyUnitToString,
5219
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5220
//		expectedFullUnitToString,
5221
//		expectedFullWithStatementRecoveryUnitToString,
5222
//		testName);
5223
//}
5224
//public void test0028() {
5225
//
5226
//	String s = 
5227
//		"import ;\n"+
5228
//		"class X {\n"+
5229
//		"}\n"+
5230
//		"- public void addThreadFilter(IJavaThread thread) - restricts breakpoint to \n"+
5231
//		"given thread and any other previously specified threads\n"+
5232
//		"- public void removeThreadFilter(IJavaThread thread)- removes the given thread \n"+
5233
//		"restriction (will need to re-create breakpoint request as JDI does not support \n"+
5234
//		"the removal of thread filters)\n"+
5235
//		"- public IJavaThread[] getThreadFilters() - return the set of threads this \n"+
5236
//		"breakpoint is currently restricted to\n";
5237
//
5238
//	String expectedDietUnitToString = 
5239
//		"class X {\n" + 
5240
//		"  {\n" + 
5241
//		"  }\n" + 
5242
//		"  X() {\n" + 
5243
//		"  }\n" + 
5244
//		"  public void addThreadFilter(IJavaThread thread) {\n" + 
5245
//		"  }\n" + 
5246
//		"  public void removeThreadFilter(IJavaThread thread) {\n" + 
5247
//		"  }\n" + 
5248
//		"  public IJavaThread[] getThreadFilters() {\n" + 
5249
//		"  }\n" + 
5250
//		"}\n";
5251
//	
5252
//	String expectedDietWithStatementRecoveryUnitToString =
5253
//		expectedDietUnitToString;
5254
//	
5255
//	String expectedDietPlusBodyUnitToString = 
5256
//		"class X {\n" + 
5257
//		"  {\n" + 
5258
//		"  }\n" + 
5259
//		"  X() {\n" + 
5260
//		"    super();\n" + 
5261
//		"  }\n" + 
5262
//		"  public void addThreadFilter(IJavaThread thread) {\n" + 
5263
//		"  }\n" + 
5264
//		"  public void removeThreadFilter(IJavaThread thread) {\n" + 
5265
//		"  }\n" + 
5266
//		"  public IJavaThread[] getThreadFilters() {\n" + 
5267
//		"  }\n" + 
5268
//		"}\n";
5269
//
5270
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5271
//		"class X {\n" + 
5272
//		"  {\n" + 
5273
//		"  }\n" + 
5274
//		"  X() {\n" + 
5275
//		"    super();\n" + 
5276
//		"  }\n" + 
5277
//		"  public void addThreadFilter(IJavaThread thread) {\n" + 
5278
//		"  }\n" + 
5279
//		"  public void removeThreadFilter(IJavaThread thread) {\n" + 
5280
//		"  }\n" + 
5281
//		"  public IJavaThread[] getThreadFilters() {\n" + 
5282
//		"  }\n" + 
5283
//		"}\n";
5284
//	
5285
//	String expectedFullUnitToString =
5286
//		expectedDietUnitToString;
5287
//	
5288
//	String expectedFullWithStatementRecoveryUnitToString =
5289
//		expectedFullUnitToString;
5290
//	
5291
//	String testName = "<test>";
5292
//	checkParse(
5293
//		s.toCharArray(),
5294
//		expectedDietUnitToString,
5295
//		expectedDietWithStatementRecoveryUnitToString,
5296
//		expectedDietPlusBodyUnitToString,
5297
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5298
//		expectedFullUnitToString,
5299
//		expectedFullWithStatementRecoveryUnitToString,
5300
//		testName);
5301
//}
5302
//public void test0029() {
5303
//
5304
//	String s = 
5305
//		"public class X {\n" +
5306
//		"	void bar(){\n" +
5307
//		"		#\n" +
5308
//		"		class Inner {\n" +
5309
//		"			void foo() {\n" +
5310
//		"				try {\n" +
5311
//		"				} catch(Exception e) {\n" +
5312
//		"					e.\n" +
5313
//		"				}\n" +
5314
//		"			}\n" +
5315
//		"		}\n" +
5316
//		"	}\n" +
5317
//		"}";
5318
//
5319
//	String expectedDietUnitToString = 
5320
//		"public class X {\n" + 
5321
//		"  public X() {\n" + 
5322
//		"  }\n" + 
5323
//		"  void bar() {\n" + 
5324
//		"  }\n" + 
5325
//		"}\n";
5326
//	
5327
//	String expectedDietWithStatementRecoveryUnitToString =
5328
//		expectedDietUnitToString;
5329
//	
5330
//	String expectedDietPlusBodyUnitToString = 
5331
//		"public class X {\n" + 
5332
//		"  public X() {\n" + 
5333
//		"    super();\n" + 
5334
//		"  }\n" + 
5335
//		"  void bar() {\n" + 
5336
//		"  }\n" + 
5337
//		"}\n";
5338
//
5339
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5340
//		"public class X {\n" + 
5341
//		"  public X() {\n" + 
5342
//		"    super();\n" + 
5343
//		"  }\n" + 
5344
//		"  void bar() {\n" + 
5345
//		"    class Inner {\n" + 
5346
//		"      Inner() {\n" + 
5347
//		"        super();\n" + 
5348
//		"      }\n" + 
5349
//		"      void foo() {\n" + 
5350
//		"        try \n" + 
5351
//		"          {\n" + 
5352
//		"          }\n" + 
5353
//		"        catch (Exception e)\n" + 
5354
//		"          {\n" + 
5355
//		"          }\n" + 
5356
//		"      }\n" + 
5357
//		"    }\n" + 
5358
//		"  }\n" + 
5359
//		"}\n";
5360
//	
5361
//	String expectedFullUnitToString =
5362
//		expectedDietUnitToString;
5363
//	
5364
//	String expectedFullWithStatementRecoveryUnitToString =
5365
//		expectedFullUnitToString;
5366
//	
5367
//	String testName = "<test>";
5368
//	checkParse(
5369
//		s.toCharArray(),
5370
//		expectedDietUnitToString,
5371
//		expectedDietWithStatementRecoveryUnitToString,
5372
//		expectedDietPlusBodyUnitToString,
5373
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5374
//		expectedFullUnitToString,
5375
//		expectedFullWithStatementRecoveryUnitToString,
5376
//		testName);
5377
//}
5378
//public void test0030() {
5379
//
5380
//	String s = 
5381
//		"package p;										\n" + 
5382
//		"/**											\n" + 
5383
//		" * 1FLHNKX										\n" + 
5384
//		" */											\n" + 
5385
//		"public class ATB {								\n" + 
5386
//		"  void foo() {									\n" + 
5387
//		"    if(true)									\n" + 
5388
//		"      System.out.println(\"true\");			\n" + 
5389
//		"    else										\n" + 
5390
//		"      (System.out.println(\"true\"));			\n" + 
5391
//		"  }											\n" + 
5392
//		"}												";
5393
//
5394
//	String expectedDietUnitToString = 
5395
//		"package p;\n" + 
5396
//		"public class ATB {\n" + 
5397
//		"  public ATB() {\n" + 
5398
//		"  }\n" + 
5399
//		"  void foo() {\n" + 
5400
//		"  }\n" + 
5401
//		"}\n";
5402
//	
5403
//	String expectedDietWithStatementRecoveryUnitToString =
5404
//		expectedDietUnitToString;
5405
//	
5406
//	String expectedDietPlusBodyUnitToString = 
5407
//		"package p;\n" + 
5408
//		"public class ATB {\n" + 
5409
//		"  public ATB() {\n" + 
5410
//		"    super();\n" + 
5411
//		"  }\n" + 
5412
//		"  void foo() {\n" + 
5413
//		"  }\n" + 
5414
//		"}\n";
5415
//
5416
//	String expectedDietPlusBodyWithStatementRecoveryUnitToString = 
5417
//		"public class X {\n" + 
5418
//		"  public X() {\n" + 
5419
//		"    super();\n" + 
5420
//		"  }\n" + 
5421
//		"  void bar() {\n" + 
5422
//		"    class Inner {\n" + 
5423
//		"      Inner() {\n" + 
5424
//		"        super();\n" + 
5425
//		"      }\n" + 
5426
//		"      void foo() {\n" + 
5427
//		"        try \n" + 
5428
//		"          {\n" + 
5429
//		"          }\n" + 
5430
//		"        catch (Exception e)\n" + 
5431
//		"          {\n" + 
5432
//		"          }\n" + 
5433
//		"      }\n" + 
5434
//		"    }\n" + 
5435
//		"  }\n" + 
5436
//		"}\n";
5437
//	
5438
//	String expectedFullUnitToString =
5439
//		expectedDietUnitToString;
5440
//	
5441
//	String expectedFullWithStatementRecoveryUnitToString =
5442
//		expectedFullUnitToString;
5443
//	
5444
//	String testName = "<test>";
5445
//	checkParse(
5446
//		s.toCharArray(),
5447
//		expectedDietUnitToString,
5448
//		expectedDietWithStatementRecoveryUnitToString,
5449
//		expectedDietPlusBodyUnitToString,
5450
//		expectedDietPlusBodyWithStatementRecoveryUnitToString,
5451
//		expectedFullUnitToString,
5452
//		expectedFullWithStatementRecoveryUnitToString,
5453
//		testName);
5454
//}
5455
}
(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/FromJikesPRs.java (+5 lines)
Lines 240-245 Link Here
240
		"----------\n" + 
240
		"----------\n" + 
241
		"1. ERROR in Test.java (at line 4)\n" + 
241
		"1. ERROR in Test.java (at line 4)\n" + 
242
		"	3+4; \n" + 
242
		"	3+4; \n" + 
243
		"	^\n" + 
244
		"The left-hand side of an assignment must be a variable\n" + 
245
		"----------\n" + 
246
		"2. ERROR in Test.java (at line 4)\n" + 
247
		"	3+4; \n" + 
243
		"	 ^\n" + 
248
		"	 ^\n" + 
244
		"Syntax error on token \"+\", invalid AssignmentOperator\n" + 
249
		"Syntax error on token \"+\", invalid AssignmentOperator\n" + 
245
		"----------\n");
250
		"----------\n");
(-)Eclipse Java Tests Compiler/org/eclipse/jdt/tests/compiler/regression/NegativeTest.java (-10 / +96 lines)
Lines 1035-1043 Link Here
1035
}
1035
}
1036
// Use this static initializer to specify subset for tests
1036
// Use this static initializer to specify subset for tests
1037
// All specified tests which does not belong to the class are skipped...
1037
// All specified tests which does not belong to the class are skipped...
1038
//static {
1038
static {
1039
//	TESTS_NUMBERS = new int[] { 437 };
1039
//	TESTS_NUMBERS = new int[] { 437 };
1040
//}
1040
//	TESTS_NAMES = new String[]{ "test123" };
1041
}
1041
public static Test suite() {
1042
public static Test suite() {
1042
	return buildTestSuite(testClass());
1043
	return buildTestSuite(testClass());
1043
}
1044
}
Lines 1646-1651 Link Here
1646
		"	--a %= 4;  \n" + 
1647
		"	--a %= 4;  \n" + 
1647
		"	^^\n" + 
1648
		"	^^\n" + 
1648
		"Syntax error on token \"--\", delete this token\n" + 
1649
		"Syntax error on token \"--\", delete this token\n" + 
1650
		"----------\n" + 
1651
		"8. ERROR in p\\X.java (at line 28)\n" + 
1652
		"	a-- %= 4;    \n" + 
1653
		"	^^^\n" + 
1654
		"The left-hand side of an assignment must be a variable\n" + 
1655
		"----------\n" + 
1656
		"9. ERROR in p\\X.java (at line 31)\n" + 
1657
		"	return 0;\n" + 
1658
		"	^^^^^^^^\n" + 
1659
		"Void methods cannot return a value\n" + 
1649
		"----------\n"
1660
		"----------\n"
1650
	);
1661
	);
1651
}
1662
}
Lines 2576-2585 Link Here
2576
		"----------\n" + 
2587
		"----------\n" + 
2577
		"1. ERROR in p\\X.java (at line 4)\n" + 
2588
		"1. ERROR in p\\X.java (at line 4)\n" + 
2578
		"	if (args.length == 0) (System.out.println(\"if is true\"));\n" + 
2589
		"	if (args.length == 0) (System.out.println(\"if is true\"));\n" + 
2590
		"	                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2591
		"The left-hand side of an assignment must be a variable\n" + 
2592
		"----------\n" + 
2593
		"2. ERROR in p\\X.java (at line 4)\n" + 
2594
		"	if (args.length == 0) (System.out.println(\"if is true\"));\n" + 
2579
		"	                                                       ^\n" + 
2595
		"	                                                       ^\n" + 
2580
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
2596
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
2581
		"----------\n" + 
2597
		"----------\n" + 
2582
		"2. ERROR in p\\X.java (at line 5)\n" + 
2598
		"3. ERROR in p\\X.java (at line 5)\n" + 
2599
		"	else (System.out.println(\"if is false\"));\n" + 
2600
		"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2601
		"The left-hand side of an assignment must be a variable\n" + 
2602
		"----------\n" + 
2603
		"4. ERROR in p\\X.java (at line 5)\n" + 
2583
		"	else (System.out.println(\"if is false\"));\n" + 
2604
		"	else (System.out.println(\"if is false\"));\n" + 
2584
		"	                                       ^\n" + 
2605
		"	                                       ^\n" + 
2585
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
2606
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
Lines 3708-3721 Link Here
3708
		"3. ERROR in p\\Test.java (at line 8)\n" + 
3729
		"3. ERROR in p\\Test.java (at line 8)\n" + 
3709
		"	void bar() { 1; }\n" + 
3730
		"	void bar() { 1; }\n" + 
3710
		"	             ^\n" + 
3731
		"	             ^\n" + 
3732
		"The left-hand side of an assignment must be a variable\n" + 
3733
		"----------\n" + 
3734
		"4. ERROR in p\\Test.java (at line 8)\n" + 
3735
		"	void bar() { 1; }\n" + 
3736
		"	             ^\n" + 
3711
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
3737
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
3712
		"----------\n" + 
3738
		"----------\n" + 
3713
		"4. ERROR in p\\Test.java (at line 13)\n" + 
3739
		"5. ERROR in p\\Test.java (at line 13)\n" + 
3714
		"	int foo();\n" + 
3740
		"	int foo();\n" + 
3715
		"	    ^^^^^\n" + 
3741
		"	    ^^^^^\n" + 
3716
		"This method requires a body instead of a semicolon\n" + 
3742
		"This method requires a body instead of a semicolon\n" + 
3717
		"----------\n" + 
3743
		"----------\n" + 
3718
		"5. ERROR in p\\Test.java (at line 18)\n" + 
3744
		"6. ERROR in p\\Test.java (at line 16)\n" + 
3745
		"	void foo();\n" + 
3746
		"	     ^^^^^\n" + 
3747
		"This method requires a body instead of a semicolon\n" + 
3748
		"----------\n" + 
3749
		"7. ERROR in p\\Test.java (at line 18)\n" + 
3750
		"	return new Object(){ public void run() { 1; };};}\n" + 
3751
		"	                                         ^\n" + 
3752
		"The left-hand side of an assignment must be a variable\n" + 
3753
		"----------\n" + 
3754
		"8. ERROR in p\\Test.java (at line 18)\n" + 
3719
		"	return new Object(){ public void run() { 1; };};}\n" + 
3755
		"	return new Object(){ public void run() { 1; };};}\n" + 
3720
		"	                                         ^\n" + 
3756
		"	                                         ^\n" + 
3721
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
3757
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
Lines 4599-4604 Link Here
4599
		"----------\n" + 
4635
		"----------\n" + 
4600
		"1. ERROR in p\\Example3.java (at line 10)\n" + 
4636
		"1. ERROR in p\\Example3.java (at line 10)\n" + 
4601
		"	int myVal = condition ? x = 7 : x = 3;\n" + 
4637
		"	int myVal = condition ? x = 7 : x = 3;\n" + 
4638
		"	            ^^^^^^^^^\n" + 
4639
		"condition cannot be resolved\n" + 
4640
		"----------\n" + 
4641
		"2. ERROR in p\\Example3.java (at line 10)\n" + 
4642
		"	int myVal = condition ? x = 7 : x = 3;\n" + 
4602
		"	                                  ^\n" + 
4643
		"	                                  ^\n" + 
4603
		"Syntax error on token \"=\", != expected\n" + 
4644
		"Syntax error on token \"=\", != expected\n" + 
4604
		"----------\n"
4645
		"----------\n"
Lines 4731-4745 Link Here
4731
		"----------\n" + 
4772
		"----------\n" + 
4732
		"1. ERROR in p\\NA.java (at line 7)\n" + 
4773
		"1. ERROR in p\\NA.java (at line 7)\n" + 
4733
		"	(new Class1).run();\n" + 
4774
		"	(new Class1).run();\n" + 
4775
		"	^^^^^^^^^^^^\n" + 
4776
		"Class1 cannot be resolved\n" + 
4777
		"----------\n" + 
4778
		"2. ERROR in p\\NA.java (at line 7)\n" + 
4779
		"	(new Class1).run();\n" + 
4734
		"	 ^^^\n" + 
4780
		"	 ^^^\n" + 
4735
		"Syntax error on token \"new\", delete this token\n" + 
4781
		"Syntax error on token \"new\", delete this token\n" + 
4736
		"----------\n" + 
4782
		"----------\n" + 
4737
		"2. ERROR in p\\NA.java (at line 8)\n" + 
4783
		"3. ERROR in p\\NA.java (at line 8)\n" + 
4784
		"	(new Class2).run();\n" + 
4785
		"	^^^^^^^^^^^^\n" + 
4786
		"Class2 cannot be resolved\n" + 
4787
		"----------\n" + 
4788
		"4. ERROR in p\\NA.java (at line 8)\n" + 
4738
		"	(new Class2).run();\n" + 
4789
		"	(new Class2).run();\n" + 
4739
		"	 ^^^\n" + 
4790
		"	 ^^^\n" + 
4740
		"Syntax error on token \"new\", delete this token\n" + 
4791
		"Syntax error on token \"new\", delete this token\n" + 
4741
		"----------\n" + 
4792
		"----------\n" + 
4742
		"3. ERROR in p\\NA.java (at line 9)\n" + 
4793
		"5. ERROR in p\\NA.java (at line 9)\n" + 
4794
		"	(new Class3).run();\n" + 
4795
		"	^^^^^^^^^^^^\n" + 
4796
		"Class3 cannot be resolved\n" + 
4797
		"----------\n" + 
4798
		"6. ERROR in p\\NA.java (at line 9)\n" + 
4743
		"	(new Class3).run();\n" + 
4799
		"	(new Class3).run();\n" + 
4744
		"	 ^^^\n" + 
4800
		"	 ^^^\n" + 
4745
		"Syntax error on token \"new\", delete this token\n" + 
4801
		"Syntax error on token \"new\", delete this token\n" + 
Lines 4932-4943 Link Here
4932
			"}",
4988
			"}",
4933
		}, 
4989
		}, 
4934
		"----------\n" + 
4990
		"----------\n" + 
4935
		"1. ERROR in p\\AJA.java (at line 11)\n" + 
4991
		"1. ERROR in p\\AJA.java (at line 7)\n" + 
4992
		"	Object item = new String() {\n" + 
4993
		"	                  ^^^^^^\n" + 
4994
		"An anonymous class cannot subclass the final class String\n" + 
4995
		"----------\n" + 
4996
		"2. ERROR in p\\AJA.java (at line 11)\n" + 
4936
		"	}.;\n" + 
4997
		"	}.;\n" + 
4937
		"	  ^\n" + 
4998
		"	  ^\n" + 
4938
		"Syntax error on token \";\", delete this token\n" + 
4999
		"Syntax error on token \";\", delete this token\n" + 
4939
		"----------\n" + 
5000
		"----------\n" + 
4940
		"2. ERROR in p\\AJA.java (at line 12)\n" + 
5001
		"3. ERROR in p\\AJA.java (at line 12)\n" + 
5002
		"	item.\n" + 
5003
		"	^^^^\n" + 
5004
		"item cannot be resolved or is not a field\n" + 
5005
		"----------\n" + 
5006
		"4. ERROR in p\\AJA.java (at line 12)\n" + 
4941
		"	item.\n" + 
5007
		"	item.\n" + 
4942
		"	    ^\n" + 
5008
		"	    ^\n" + 
4943
		"Syntax error on token \".\", ; expected\n" + 
5009
		"Syntax error on token \".\", ; expected\n" + 
Lines 5114-5119 Link Here
5114
		"----------\n" + 
5180
		"----------\n" + 
5115
		"1. ERROR in p\\AEA.java (at line 37)\n" + 
5181
		"1. ERROR in p\\AEA.java (at line 37)\n" + 
5116
		"	a TopLevelLocal.;\n" + 
5182
		"	a TopLevelLocal.;\n" + 
5183
		"	^\n" + 
5184
		"a cannot be resolved to a type\n" + 
5185
		"----------\n" + 
5186
		"2. ERROR in p\\AEA.java (at line 37)\n" + 
5187
		"	a TopLevelLocal.;\n" + 
5117
		"	               ^\n" + 
5188
		"	               ^\n" + 
5118
		"Syntax error on token \".\", delete this token\n" + 
5189
		"Syntax error on token \".\", delete this token\n" + 
5119
		"----------\n"
5190
		"----------\n"
Lines 6514-6519 Link Here
6514
		"----------\n" + 
6585
		"----------\n" + 
6515
		"1. ERROR in p\\ATB.java (at line 10)\n" + 
6586
		"1. ERROR in p\\ATB.java (at line 10)\n" + 
6516
		"	(System.out.println(\"true\"));\n" + 
6587
		"	(System.out.println(\"true\"));\n" + 
6588
		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
6589
		"The left-hand side of an assignment must be a variable\n" + 
6590
		"----------\n" + 
6591
		"2. ERROR in p\\ATB.java (at line 10)\n" + 
6592
		"	(System.out.println(\"true\"));\n" + 
6517
		"	                           ^\n" + 
6593
		"	                           ^\n" + 
6518
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
6594
		"Syntax error, insert \"AssignmentOperator ArrayInitializer\" to complete Expression\n" + 
6519
		"----------\n"
6595
		"----------\n"
Lines 12937-12946 Link Here
12937
		"----------\n" + 
13013
		"----------\n" + 
12938
		"1. ERROR in X.java (at line 4)\n" + 
13014
		"1. ERROR in X.java (at line 4)\n" + 
12939
		"	Object o2 = ((Object)) new X();	\n" + 
13015
		"	Object o2 = ((Object)) new X();	\n" + 
13016
		"	            ^^^^^^^^^^\n" + 
13017
		"Object cannot be resolved\n" + 
13018
		"----------\n" + 
13019
		"2. ERROR in X.java (at line 4)\n" + 
13020
		"	Object o2 = ((Object)) new X();	\n" + 
12940
		"	                     ^\n" + 
13021
		"	                     ^\n" + 
12941
		"Syntax error, insert \";\" to complete LocalVariableDeclarationStatement\n" + 
13022
		"Syntax error, insert \";\" to complete LocalVariableDeclarationStatement\n" + 
12942
		"----------\n" + 
13023
		"----------\n" + 
12943
		"2. ERROR in X.java (at line 5)\n" + 
13024
		"3. ERROR in X.java (at line 5)\n" + 
13025
		"	Object o3 = (((Object))) new X();	\n" + 
13026
		"	            ^^^^^^^^^^^^\n" + 
13027
		"Object cannot be resolved\n" + 
13028
		"----------\n" + 
13029
		"4. ERROR in X.java (at line 5)\n" + 
12944
		"	Object o3 = (((Object))) new X();	\n" + 
13030
		"	Object o3 = (((Object))) new X();	\n" + 
12945
		"	                       ^\n" + 
13031
		"	                       ^\n" + 
12946
		"Syntax error, insert \";\" to complete LocalVariableDeclarationStatement\n" + 
13032
		"Syntax error, insert \";\" to complete LocalVariableDeclarationStatement\n" + 

Return to bug 42253