rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
return haveMinimumServerVersion("7.1"); | return connection.haveMinimumServerVersion("7.1"); | public boolean supportsUnionAll() throws SQLException { return haveMinimumServerVersion("7.1"); } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/184505bbfc2484103083728601999f8b7cb87944/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
6146,
14325,
1595,
1435,
1216,
6483,
225,
288,
1377,
327,
1459,
18,
21516,
13042,
2081,
1444,
2932,
27,
18,
21,
8863,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
6146,
14325,
1595,
1435,
1216,
6483,
225,
288,
1377,
327,
1459,
18,
21516,
13042,
2081,
1444,
2932,
27,
18,
21,
8863,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
checkParserStateNs(xpp, 0, xpp.END_DOCUMENT, null, 0, null, null, null, false, -1); | checkParserStateNs(xpp, 0, XmlPullParser.END_DOCUMENT, null, 0, null, null, null, false, -1); | public void testMultipleOverlappingNamespaces() throws Exception { XmlSerializer ser = factory.newSerializer(); //<section xmlns='urn:com:books-r-us'> // <!-- 2 --> <title>Book-Signing Event</title> // <!-- 3 --> <signing> // <!-- 4 --> <author title="Mr" name="Vikram Seth" /> // <!-- 5 --> <book title="A Suitable Boy" price="$22.95" /> // </signing> // </section> // check namespaces generation with explicit prefixes // byte[] binput = ("<foo xmlns='namesp' xmlns:ns1='namesp1' xmlns:ns2='namesp2'>"+ // "<ns1:bar xmlns:ns1='x1' xmlns:ns3='namesp3' xmlns='n1'>"+ // "<ns2:gugu a1='v1' ns2:a2='v2' xml:lang='en' ns1:a3=\"v3\"/>"+ // "<baz xmlns:ns1='y1'></baz>"+ // "</ns1:bar></foo>").getBytes("US-ASCII"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ser.setOutput(baos, "UTF8"); ser.startDocument(null, null); ser.setPrefix("", "namesp"); ser.setPrefix("ns1", "namesp1"); ser.setPrefix("ns2", "namesp2"); ser.startTag("namesp", "foo"); ser.setPrefix("ns1", "x1"); ser.setPrefix("ns3", "namesp3"); ser.setPrefix("", "namesp1"); ser.startTag("x1", "bar"); ser.startTag("namesp2", "gugu"); ser.attribute("", "a1", "v1"); ser.attribute("namesp2", "a2", "v2" ); ser.attribute("http://www.w3.org/XML/1998/namespace", "lang", "en"); ser.attribute("x1", "a3", "v3"); ser.endTag("namesp2", "gugu"); ser.setPrefix("ns1", "y1"); ser.startTag("namesp1", "baz"); ser.endTag("namesp1", "baz"); ser.endTag("x1", "bar"); ser.endTag("namesp", "foo"); ser.endDocument(); byte[] binput = baos.toByteArray(); //System.out.println(getClass().getName()+"serialized="+new String(binput, "US-ASCII")); xpp.setInput(new ByteArrayInputStream( binput ), "US-ASCII" ); assertEquals("US-ASCII", xpp.getInputEncoding()); checkParserStateNs(xpp, 0, xpp.START_DOCUMENT, null, 0, null, null, null, false, -1); xpp.next(); checkParserStateNs(xpp, 1, xpp.START_TAG, null, 3, "namesp", "foo", null, false, 0); assertEquals(0, xpp.getNamespaceCount(0)); assertEquals(3, xpp.getNamespaceCount(1)); checkNamespace(xpp, 0, null, "namesp", true); checkNamespace(xpp, 1, "ns1", "namesp1", true); checkNamespace(xpp, 2, "ns2", "namesp2", true); xpp.next(); checkParserStateNs(xpp, 2, xpp.START_TAG, "ns1", 6, "x1", "bar", null, false, 0); assertEquals(0, xpp.getNamespaceCount(0)); assertEquals(3, xpp.getNamespaceCount(1)); assertEquals(6, xpp.getNamespaceCount(2)); checkNamespace(xpp, 3, "ns1", "x1", true); checkNamespace(xpp, 4, "ns3", "namesp3", true); checkNamespace(xpp, 5, null, "namesp1", true); xpp.next(); checkParserStateNs(xpp, 3, xpp.START_TAG, "ns2", 6, "namesp2", "gugu", null, true, 4); assertEquals(6, xpp.getNamespaceCount(2)); assertEquals(6, xpp.getNamespaceCount(3)); assertEquals("x1", xpp.getNamespace("ns1")); assertEquals("namesp2", xpp.getNamespace("ns2")); assertEquals("namesp3", xpp.getNamespace("ns3")); checkAttribNs(xpp, 0, null, "", "a1", "v1"); checkAttribNs(xpp, 1, "ns2", "namesp2", "a2", "v2"); checkAttribNs(xpp, 2, "xml", "http://www.w3.org/XML/1998/namespace", "lang", "en"); checkAttribNs(xpp, 3, "ns1", "x1", "a3", "v3"); xpp.next(); checkParserStateNs(xpp, 3, xpp.END_TAG, "ns2", 6, "namesp2", "gugu", null, false, -1); xpp.next(); checkParserStateNs(xpp, 3, xpp.START_TAG, null, 7, "namesp1", "baz", null, xpp.isEmptyElementTag(), 0); assertEquals(0, xpp.getNamespaceCount(0)); assertEquals(3, xpp.getNamespaceCount(1)); assertEquals(6, xpp.getNamespaceCount(2)); assertEquals(7, xpp.getNamespaceCount(3)); checkNamespace(xpp, 6, "ns1", "y1", true); assertEquals("y1", xpp.getNamespace("ns1")); assertEquals("namesp2", xpp.getNamespace("ns2")); assertEquals("namesp3", xpp.getNamespace("ns3")); xpp.next(); checkParserStateNs(xpp, 3, xpp.END_TAG, null, 7, "namesp1", "baz", null, false, -1); assertEquals("y1", xpp.getNamespace("ns1")); assertEquals("namesp2", xpp.getNamespace("ns2")); assertEquals("namesp3", xpp.getNamespace("ns3")); // check that declared namespaces can be accessed for current end tag assertEquals(3, xpp.getDepth()); assertEquals(6, xpp.getNamespaceCount(2)); assertEquals(7, xpp.getNamespaceCount(3)); // chekc that namespace is accessible by direct addresssing assertEquals(null, xpp.getNamespacePrefix(0)); assertEquals("namesp", xpp.getNamespaceUri(0)); assertEquals("ns1", xpp.getNamespacePrefix(1)); assertEquals("namesp1", xpp.getNamespaceUri(1)); assertEquals("ns1", xpp.getNamespacePrefix(3)); assertEquals("x1", xpp.getNamespaceUri(3)); assertEquals("ns1", xpp.getNamespacePrefix(6)); assertEquals("y1", xpp.getNamespaceUri(6)); xpp.next(); checkParserStateNs(xpp, 2, xpp.END_TAG, "ns1", 6, "x1", "bar", null, false, -1); // check that namespace is undelcared assertEquals("x1", xpp.getNamespace("ns1")); xpp.next(); checkParserStateNs(xpp, 1, xpp.END_TAG, null, 3, "namesp", "foo", null, false, -1); assertEquals("namesp1", xpp.getNamespace("ns1")); assertEquals("namesp2", xpp.getNamespace("ns2")); assertEquals(null, xpp.getNamespace("ns3")); xpp.next(); checkParserStateNs(xpp, 0, xpp.END_DOCUMENT, null, 0, null, null, null, false, -1); assertEquals(null, xpp.getNamespace("ns1")); assertEquals(null, xpp.getNamespace("ns2")); assertEquals(null, xpp.getNamespace("ns3")); } | 3949 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3949/25be6df80154469aacea3441a8e7758596d46574/TestSerializeWithNs.java/clean/src/java/tests/org/xmlpull/v1/tests/TestSerializeWithNs.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
8438,
17411,
1382,
13180,
1435,
1216,
1185,
288,
3639,
5714,
6306,
703,
273,
3272,
18,
2704,
6306,
5621,
7734,
368,
32,
3464,
12302,
2218,
321,
30,
832,
30,
12567,
17,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
8438,
17411,
1382,
13180,
1435,
1216,
1185,
288,
3639,
5714,
6306,
703,
273,
3272,
18,
2704,
6306,
5621,
7734,
368,
32,
3464,
12302,
2218,
321,
30,
832,
30,
12567,
17,
86... |
protected void addNewSeriesDefinition( ) { // Create a series definition without data definition SeriesDefinition sdTmp = SeriesDefinitionImpl.create( ); sdTmp.getSeriesPalette( ).update( -seriesDefns.size( ) ); sdTmp.getSeries( ) .add( EcoreUtil.copy( ( (SeriesDefinition) seriesDefns.get( 0 ) ).getDesignTimeSeries( ) ) ); // Add grouping query of the first series definition sdTmp.setQuery( (Query) EcoreUtil.copy( ( (SeriesDefinition) seriesDefns.get( 0 ) ).getQuery( ) ) ); cleanDataDefinition( sdTmp ); sdTmp.eAdapters( ) .addAll( ( (SeriesDefinition) seriesDefns.get( 0 ) ).eAdapters( ) ); int firstIndex = getFirstIndexOfSameAxis( ); EList list = getChart( ).getSampleData( ).getOrthogonalSampleData( ); // Create a new OrthogonalSampleData instance from the existing one OrthogonalSampleData sdOrthogonal = (OrthogonalSampleData) EcoreUtil.copy( (EObject) list.get( firstIndex ) ); sdOrthogonal.setSeriesDefinitionIndex( list.size( ) ); sdOrthogonal.eAdapters( ).addAll( getChart( ).getSampleData( ) .eAdapters( ) ); // Update the Sample Data without event fired. boolean isNotificaionIgnored = ChartAdapter.isNotificationIgnored( ); ChartAdapter.ignoreNotifications( true ); list.add( sdOrthogonal ); ChartAdapter.ignoreNotifications( isNotificaionIgnored ); seriesDefns.add( sdTmp ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4f9bd23f1146330eb005988c0b90159876d3d104/DataDefinitionSelector.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/data/DataDefinitionSelector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
1289,
1908,
6485,
1852,
1435,
202,
95,
202,
202,
759,
1684,
345,
3924,
6907,
13299,
892,
6907,
202,
202,
6485,
1852,
6427,
9161,
33,
6485,
1852,
2828,
18,
2640,
5621,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
6459,
1289,
1908,
6485,
1852,
1435,
202,
95,
202,
202,
759,
1684,
345,
3924,
6907,
13299,
892,
6907,
202,
202,
6485,
1852,
6427,
9161,
33,
6485,
1852,
2828,
18,
2640,
5621,
202... | ||
fs.put("routingBackoff", Long.toString((Math.max(routingBackedOffUntil - now, 0)))); | fs.put("routingBackoff", Long.toString((Math.max(getRoutingBackedOffUntil() - now, 0)))); | public SimpleFieldSet exportVolatileFieldSet() { SimpleFieldSet fs = new SimpleFieldSet(true); fs.put("averagePingTime", Double.toString(averagePingTime())); long now = System.currentTimeMillis(); long idle = now - lastReceivedPacketTime(); if(idle > (60 * 1000)) { // 1 minute fs.put("idle", Long.toString(idle)); } fs.put("lastRoutingBackoffReason", getLastBackoffReason()); long tempPeerAddedTime = getPeerAddedTime(); if(tempPeerAddedTime > 1) { fs.put("peerAddedTime", Long.toString(tempPeerAddedTime)); } fs.put("routingBackoffPercent", Double.toString(backedOffPercent.currentValue() * 100)); fs.put("routingBackoff", Long.toString((Math.max(routingBackedOffUntil - now, 0)))); fs.put("routingBackoffLength", Integer.toString(getRoutingBackoffLength())); fs.put("status", getPeerNodeStatusString()); return fs; } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/7575bc3fb32360236cef62f655076b5de182f7d4/PeerNode.java/buggy/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
974,
694,
3359,
17431,
20295,
974,
694,
1435,
288,
377,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
15621,
17223,
950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4477,
974,
694,
3359,
17431,
20295,
974,
694,
1435,
288,
377,
202,
5784,
974,
694,
2662,
273,
394,
4477,
974,
694,
12,
3767,
1769,
202,
202,
2556,
18,
458,
2932,
15621,
17223,
950,
... |
fDocumentHandler.emptyElement(element, attributes, augs); | fDocumentHandler.emptyElement(element, attributes, modifiedAugs); | public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { handleStartElement(element, attributes, augs); // in the case where there is a {value constraint}, and the element // doesn't have any text content, change emptyElement call to // start + characters + end XMLString defaultValue = handleEndElement(element, augs); // call handlers if (fDocumentHandler != null) { fDocumentHandler.emptyElement(element, attributes, augs); // REVISIT: should we send default element value? /*if (defaultValue == null) { fDocumentHandler.emptyElement(element, attributes); } else { fDocumentHandler.startElement(element, attributes); fDocumentHandler.characters(defaultValue); fDocumentHandler.endElement(element); } */ } } // emptyElement(QName,XMLAttributes) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/760ff9e68c2dd10dbc9982f043ce891f1aa6dbb1/XMLSchemaValidator.java/buggy/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1008,
1046,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
565,
1216,
1139,
50,
45,
503,
288,
3639,
1640,
1685,
1046,
12,
2956,
16,
1677,
16,
279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1008,
1046,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
565,
1216,
1139,
50,
45,
503,
288,
3639,
1640,
1685,
1046,
12,
2956,
16,
1677,
16,
279,... |
getTickStyle( axaOverlayOrthogonal[i], MAJOR ) ), | switchTickStyle( getTickStyle( axaOverlayOrthogonal[i], MAJOR ) ) ), | final void buildAxes( ) throws IllegalArgumentException, ChartException { final Axis[] axa = cwa.getPrimaryBaseAxes( ); final Axis axPrimaryBase = axa[0]; // NOTE: FOR REL 1 AXIS RENDERS, WE // SUPPORT A SINGLE PRIMARY BASE AXIS // ONLY if ( !axPrimaryBase.isSetOrientation( ) ) { axPrimaryBase.setOrientation( Orientation.HORIZONTAL_LITERAL ); } validateAxis( axPrimaryBase ); final Axis axPrimaryOrthogonal = cwa.getPrimaryOrthogonalAxis( axPrimaryBase ); validateAxis( axPrimaryOrthogonal ); if ( !axPrimaryOrthogonal.isSetOrientation( ) ) { axPrimaryOrthogonal.setOrientation( Orientation.VERTICAL_LITERAL ); } final Axis[] axaOverlayOrthogonal = cwa.getOrthogonalAxes( axPrimaryBase, false ); aax = new AllAxes( cwa.getPlot( ) .getClientArea( ) .getInsets( ) .scaledInstance( dPointToPixel ) ); // CONVERSION insCA = aax.getInsets( ); // SeriesDefinition sdBase = null; // // ONLY SUPPORT 1 BASE AXIS // if ( !axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) // { // // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS // sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) // .get( 0 ); // final ArrayList alRuntimeBaseSeries = sdBase.getRunTimeSeries( ); // if ( alRuntimeBaseSeries != null ) // { // // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS // seBaseRuntime = (Series) sdBase.getRunTimeSeries( ).get( 0 ); // } // } aax.swapAxes( cwa.isTransposed( ) ); // SETUP THE PRIMARY BASE-AXIS PROPERTIES AND ITS SCALE final OneAxis oaxPrimaryBase = new OneAxis( axPrimaryBase ); oaxPrimaryBase.set( getOrientation( IConstants.BASE ), transposeLabelPosition( IConstants.BASE, getLabelPosition( axPrimaryBase.getLabelPosition( ) ) ), transposeLabelPosition( IConstants.BASE, getLabelPosition( axPrimaryBase.getTitlePosition( ) ) ), axPrimaryBase.isSetCategoryAxis( ) && axPrimaryBase.isCategoryAxis( ) ); oaxPrimaryBase.setGridProperties( axPrimaryBase.getMajorGrid( ) .getLineAttributes( ), axPrimaryBase.getMinorGrid( ).getLineAttributes( ), axPrimaryBase.getMajorGrid( ).getTickAttributes( ), axPrimaryBase.getMinorGrid( ).getTickAttributes( ), transposeTickStyle( IConstants.BASE, getTickStyle( axPrimaryBase, MAJOR ) ), transposeTickStyle( IConstants.BASE, getTickStyle( axPrimaryBase, MINOR ) ), axPrimaryBase.getScale( ).getMinorGridsPerUnit( ) ); if ( cwa.isTransposed( ) ) { // TRANSPOSE ROTATION OF LABELS AS APPROPRIATE final Label laAxisLabels = (Label) EcoreUtil.copy( axPrimaryBase.getLabel( ) ); final Label laAxisTitle = (Label) EcoreUtil.copy( axPrimaryBase.getTitle( ) ); laAxisLabels.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisLabels.getCaption( ) .getFont( ) .getRotation( ) ) ); laAxisTitle.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisTitle.getCaption( ) .getFont( ) .getRotation( ) ) ); oaxPrimaryBase.set( laAxisLabels, laAxisTitle ); // ASSOCIATE // FONT, // ETC } else { oaxPrimaryBase.set( axPrimaryBase.getLabel( ), axPrimaryBase.getTitle( ) ); // ASSOCIATE FONT } oaxPrimaryBase.set( getIntersection( axPrimaryBase ) ); oaxPrimaryBase.set( axPrimaryBase.getLineAttributes( ) ); aax.definePrimary( oaxPrimaryBase ); // ADD TO AXIS SET // SETUP THE PRIMARY ORTHOGONAL-AXIS PROPERTIES AND ITS SCALE final OneAxis oaxPrimaryOrthogonal = new OneAxis( axPrimaryOrthogonal ); oaxPrimaryOrthogonal.set( getOrientation( IConstants.ORTHOGONAL ), transposeLabelPosition( IConstants.ORTHOGONAL, getLabelPosition( axPrimaryOrthogonal.getLabelPosition( ) ) ), transposeLabelPosition( IConstants.ORTHOGONAL, getLabelPosition( axPrimaryOrthogonal.getTitlePosition( ) ) ), axPrimaryOrthogonal.isSetCategoryAxis( ) && axPrimaryOrthogonal.isCategoryAxis( ) ); oaxPrimaryOrthogonal.setGridProperties( axPrimaryOrthogonal.getMajorGrid( ) .getLineAttributes( ), axPrimaryOrthogonal.getMinorGrid( ).getLineAttributes( ), axPrimaryOrthogonal.getMajorGrid( ).getTickAttributes( ), axPrimaryOrthogonal.getMinorGrid( ).getTickAttributes( ), transposeTickStyle( IConstants.ORTHOGONAL, getTickStyle( axPrimaryOrthogonal, MAJOR ) ), transposeTickStyle( IConstants.ORTHOGONAL, getTickStyle( axPrimaryOrthogonal, MINOR ) ), axPrimaryOrthogonal.getScale( ).getMinorGridsPerUnit( ) ); if ( cwa.isTransposed( ) ) { // TRANSPOSE ROTATION OF LABELS AS APPROPRIATE final Label laAxisLabels = (Label) EcoreUtil.copy( axPrimaryOrthogonal.getLabel( ) ); final Label laAxisTitle = (Label) EcoreUtil.copy( axPrimaryOrthogonal.getTitle( ) ); laAxisLabels.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisLabels.getCaption( ) .getFont( ) .getRotation( ) ) ); laAxisTitle.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisTitle.getCaption( ) .getFont( ) .getRotation( ) ) ); oaxPrimaryOrthogonal.set( laAxisLabels, laAxisTitle ); // ASSOCIATE // FONT, ETC } else { oaxPrimaryOrthogonal.set( axPrimaryOrthogonal.getLabel( ), axPrimaryOrthogonal.getTitle( ) ); // ASSOCIATE FONT, // ETC } oaxPrimaryOrthogonal.set( getIntersection( axPrimaryOrthogonal ) ); oaxPrimaryOrthogonal.set( axPrimaryOrthogonal.getLineAttributes( ) ); aax.definePrimary( oaxPrimaryOrthogonal ); // ADD TO AXIS SET // SETUP THE OVERLAY AXES aax.initOverlays( axaOverlayOrthogonal.length, getOrientation( IConstants.ORTHOGONAL ) ); OneAxis oaxOverlayOrthogonal; for ( int i = 0; i < axaOverlayOrthogonal.length; i++ ) { validateAxis( axaOverlayOrthogonal[i] ); if ( !axaOverlayOrthogonal[i].isSetOrientation( ) ) { axaOverlayOrthogonal[i].setOrientation( Orientation.VERTICAL_LITERAL ); } oaxOverlayOrthogonal = new OneAxis( axaOverlayOrthogonal[i] ); oaxOverlayOrthogonal.set( getOrientation( IConstants.ORTHOGONAL ), transposeLabelPosition( IConstants.ORTHOGONAL, getLabelPosition( axaOverlayOrthogonal[i].getLabelPosition( ) ) ), transposeLabelPosition( IConstants.ORTHOGONAL, getLabelPosition( axaOverlayOrthogonal[i].getTitlePosition( ) ) ), axaOverlayOrthogonal[i].isSetCategoryAxis( ) && axaOverlayOrthogonal[i].isCategoryAxis( ) ); oaxOverlayOrthogonal.setGridProperties( axaOverlayOrthogonal[i].getMajorGrid( ) .getLineAttributes( ), axaOverlayOrthogonal[i].getMinorGrid( ).getLineAttributes( ), axaOverlayOrthogonal[i].getMajorGrid( ).getTickAttributes( ), axaOverlayOrthogonal[i].getMinorGrid( ).getTickAttributes( ), transposeTickStyle( IConstants.ORTHOGONAL, getTickStyle( axaOverlayOrthogonal[i], MAJOR ) ), transposeTickStyle( IConstants.ORTHOGONAL, getTickStyle( axaOverlayOrthogonal[i], MINOR ) ), axaOverlayOrthogonal[i].getScale( ).getMinorGridsPerUnit( ) ); if ( cwa.isTransposed( ) ) { // TRANSPOSE ROTATION OF LABELS AS APPROPRIATE final Label laAxisLabels = (Label) EcoreUtil.copy( axaOverlayOrthogonal[i].getLabel( ) ); final Label laAxisTitle = (Label) EcoreUtil.copy( axaOverlayOrthogonal[i].getTitle( ) ); laAxisLabels.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisLabels.getCaption( ) .getFont( ) .getRotation( ) ) ); laAxisTitle.getCaption( ) .getFont( ) .setRotation( transposeAngle( laAxisTitle.getCaption( ) .getFont( ) .getRotation( ) ) ); oaxOverlayOrthogonal.set( laAxisLabels, laAxisTitle ); // ASSOCIATE // FONT, // ETC } else { oaxOverlayOrthogonal.set( axaOverlayOrthogonal[i].getLabel( ), axaOverlayOrthogonal[i].getTitle( ) ); } oaxOverlayOrthogonal.set( axaOverlayOrthogonal[i].getLineAttributes( ) ); oaxOverlayOrthogonal.set( getIntersection( axaOverlayOrthogonal[i] ) ); aax.defineOverlay( i, oaxOverlayOrthogonal ); } // BUILD STACKED STRUCTURE (FOR STACKED SERIES) ASSOCIATED WITH EACH // ORTHOGONAL AXIS ssl = StackedSeriesLookup.create( cwa, rtc ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/536b54a46b25aa99e427a2fbd8217e09108c905a/PlotWith2DAxes.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/PlotWith2DAxes.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
918,
1361,
26494,
12,
262,
1216,
2754,
16,
14804,
503,
202,
95,
202,
202,
6385,
15509,
8526,
1740,
69,
273,
14098,
69,
18,
588,
6793,
2171,
26494,
12,
11272,
202,
202,
6385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6385,
918,
1361,
26494,
12,
262,
1216,
2754,
16,
14804,
503,
202,
95,
202,
202,
6385,
15509,
8526,
1740,
69,
273,
14098,
69,
18,
588,
6793,
2171,
26494,
12,
11272,
202,
202,
6385,
... |
Map result = new HashMap(); getRuleParameters(result, ((RuleDescr) rules.get(0)).getLhs().getDescrs()); Iterator iterator2 = result.keySet().iterator(); while (iterator2.hasNext()) { String name = (String) iterator2.next(); RuleCompletionProposal proposal = new RuleCompletionProposal(prefix.length(), name); proposal.setPriority(-1); proposal.setImage(methodIcon); list.add(proposal); } | getRuleParameters(params, ((RuleDescr) rules.get(0)).getLhs().getDescrs()); | private void addLHSCompletionProposals(ITextViewer viewer, final List list, DSLAdapter adapter, final String prefix, String backText) throws CoreException, DroolsParserException { Iterator iterator; Image droolsIcon = DroolsPluginImages.getImage(DroolsPluginImages.DROOLS); if (!adapter.hasConditions()) { // determine location in condition LocationDeterminator.Location location = LocationDeterminator.getLocationInCondition(backText); switch (location.getType()) { case LocationDeterminator.LOCATION_BEGIN_OF_CONDITION: // if we are at the beginning of a new condition // add drools keywords list.add( new RuleCompletionProposal(prefix.length(), "and", "and ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "or", "or ", droolsIcon)); RuleCompletionProposal prop = new RuleCompletionProposal(prefix.length(), "eval", "eval( )", 6 ); prop.setImage(droolsIcon); list.add(prop); prop = new RuleCompletionProposal(prefix.length(), "then", "then" + System.getProperty("line.separator") + "\t"); prop.setImage(droolsIcon); list.add(prop); // we do not break but also add all elements that are needed for and/or case LocationDeterminator.LOCATION_BEGIN_OF_CONDITION_AND_OR: list.add( new RuleCompletionProposal(prefix.length(), "not", "not ", droolsIcon)); // we do not break but also add all elements that are needed for not case LocationDeterminator.LOCATION_BEGIN_OF_CONDITION_NOT: list.add( new RuleCompletionProposal(prefix.length(), "exists", "exists ", droolsIcon)); // we do not break but also add all elements that are needed for exists case LocationDeterminator.LOCATION_BEGIN_OF_CONDITION_EXISTS: // and add imported classes List imports = getDRLEditor().getImports(); iterator = imports.iterator(); while (iterator.hasNext()) { String name = (String) iterator.next(); int index = name.lastIndexOf("."); if (index != -1) { String className = name.substring(index + 1); RuleCompletionProposal p = new RuleCompletionProposal(prefix.length(), className, className + "( )", className.length() + 2); p.setPriority(-1); p.setImage(classIcon); list.add(p); } } List classesInPackage = getDRLEditor().getClassesInPackage(); iterator = classesInPackage.iterator(); while (iterator.hasNext()) { String name = (String) iterator.next(); int index = name.lastIndexOf("."); if (index != -1) { String className = name.substring(index + 1); RuleCompletionProposal p = new RuleCompletionProposal(prefix.length(), className, className + "( )", className.length() + 2); p.setPriority(-1); p.setImage(classIcon); list.add(p); } } break; case LocationDeterminator.LOCATION_INSIDE_CONDITION_START : String className = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME); if (className != null) { ClassTypeResolver resolver = new ClassTypeResolver(getDRLEditor().getImports(), ProjectClassLoader.getProjectClassLoader(getEditor())); try { Class clazz = resolver.resolveType(className); if (clazz != null) { Iterator iterator2 = new ClassFieldInspector(clazz).getFieldNames().keySet().iterator(); while (iterator2.hasNext()) { String name = (String) iterator2.next(); RuleCompletionProposal p = new RuleCompletionProposal(prefix.length(), name, name + " "); p.setImage(methodIcon); list.add(p); } } } catch (IOException exc) { // Do nothing } catch (ClassNotFoundException exc) { // Do nothing } } break; case LocationDeterminator.LOCATION_INSIDE_CONDITION_OPERATOR : className = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME); String property = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME); String type = getPropertyClass(className, property); list.add( new RuleCompletionProposal(prefix.length(), "==", "== ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "!=", "!= ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), ":", ": ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "->", "-> ( )", 5, droolsIcon)); if (isComparable(type)) { list.add( new RuleCompletionProposal(prefix.length(), "<", "< ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "<=", "<= ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), ">", "> ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), ">=", ">= ", droolsIcon)); } if (type.equals("java.lang.String")) { list.add( new RuleCompletionProposal(prefix.length(), "matches", "matches \"\"", 9, droolsIcon)); } if (isSubtypeOf(type, "java.util.Collection")) { list.add( new RuleCompletionProposal(prefix.length(), "contains", "contains ", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "excludes", "excludes ", droolsIcon)); } break; case LocationDeterminator.LOCATION_INSIDE_CONDITION_ARGUMENT : // determine type className = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_CLASS_NAME); property = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_PROPERTY_NAME); String operator = (String) location.getProperty(LocationDeterminator.LOCATION_PROPERTY_OPERATOR); type = getPropertyClass(className, property); if ("contains".equals(operator) || "excludes".equals(operator)) { type = "java.lang.Object"; } boolean isObject = false; if ("java.lang.Object".equals(type)) { isObject = true; } list.add( new RuleCompletionProposal(prefix.length(), "null", "null", droolsIcon)); if ("boolean".equals(type)) { list.add( new RuleCompletionProposal(prefix.length(), "true", "true", droolsIcon)); list.add( new RuleCompletionProposal(prefix.length(), "false", "false", droolsIcon)); } if (isObject || "java.lang.String".equals(type)) { list.add( new RuleCompletionProposal(prefix.length(), "\"\"", "\"\"", 1, droolsIcon)); } if (isObject || "java.util.Date".equals(type)) { list.add( new RuleCompletionProposal(prefix.length(), "\"dd-mmm-yyyy\"", "\"dd-mmm-yyyy\"", 1, droolsIcon)); } list.add( new RuleCompletionProposal(prefix.length(), "()", "( )", 2, droolsIcon)); DrlParser parser = new DrlParser(); try { PackageDescr descr = parser.parse(backText); List rules = descr.getRules(); if (rules != null && rules.size() == 1) { Map result = new HashMap(); getRuleParameters(result, ((RuleDescr) rules.get(0)).getLhs().getDescrs()); Iterator iterator2 = result.entrySet().iterator(); while (iterator2.hasNext()) { Map.Entry entry = (Map.Entry) iterator2.next(); String paramName = (String) entry.getKey(); String paramType = (String) entry.getValue(); if (isSubtypeOf(paramType, type)) { RuleCompletionProposal proposal = new RuleCompletionProposal(prefix.length(), paramName); proposal.setPriority(-1); proposal.setImage(methodIcon); list.add(proposal); } } } } catch (DroolsParserException exc) { // do nothing } break; case LocationDeterminator.LOCATION_INSIDE_EVAL : try { parser = new DrlParser(); PackageDescr descr = parser.parse(backText); List rules = descr.getRules(); if (rules != null && rules.size() == 1) { Map result = new HashMap(); getRuleParameters(result, ((RuleDescr) rules.get(0)).getLhs().getDescrs()); Iterator iterator2 = result.keySet().iterator(); while (iterator2.hasNext()) { String name = (String) iterator2.next(); RuleCompletionProposal proposal = new RuleCompletionProposal(prefix.length(), name); proposal.setPriority(-1); proposal.setImage(methodIcon); list.add(proposal); } } } catch (DroolsParserException exc) { // do nothing } break; } } } | 56149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56149/83f56cf259fd6ab63e77ac79f470f41aede5ecca/RuleCompletionProcessor.java/buggy/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
48,
13173,
11238,
626,
22536,
12,
1285,
408,
18415,
14157,
16,
727,
987,
666,
16,
28053,
4216,
4516,
16,
727,
514,
1633,
16,
514,
1473,
1528,
13,
1216,
30015,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
527,
48,
13173,
11238,
626,
22536,
12,
1285,
408,
18415,
14157,
16,
727,
987,
666,
16,
28053,
4216,
4516,
16,
727,
514,
1633,
16,
514,
1473,
1528,
13,
1216,
30015,
16,
2... |
public void fireTableCellUpdated(int row, int column) { fireTableChanged(new TableModelEvent(this, row, row, column)); } | public void fireTableCellUpdated (int row, int column) { fireTableChanged (new TableModelEvent (this, row, row, column)); } | public void fireTableCellUpdated(int row, int column) { fireTableChanged(new TableModelEvent(this, row, row, column)); } // fireTableCellUpdated() | 56365 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56365/fab59a31bd9990444e42708fa321ad9450bd4564/AbstractTableModel.java/clean/libjava/javax/swing/table/AbstractTableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4452,
1388,
4020,
7381,
12,
474,
1027,
16,
509,
1057,
13,
288,
202,
202,
12179,
1388,
5033,
12,
2704,
3555,
1488,
1133,
12,
2211,
16,
1027,
16,
1027,
16,
1057,
10019,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4452,
1388,
4020,
7381,
12,
474,
1027,
16,
509,
1057,
13,
288,
202,
202,
12179,
1388,
5033,
12,
2704,
3555,
1488,
1133,
12,
2211,
16,
1027,
16,
1027,
16,
1057,
10019,
202... |
for (int i= 0; i < m1Parameters.length; i++) { if ( ! (equals(m2Parameters[i], m1Parameters[i]) || equals(m2Parameters[i].getErasure(), m1Parameters[i]))) | if (equals(m1Params, m2Params)) return true; for (int i= 0; i < m1Params.length; i++) { ITypeBinding m1Param= m1Params[i]; if (m1Param.isRawType()) m1Param= m1Param.getTypeDeclaration(); if (! (equals(m1Param, m2Params[i].getErasure()))) | public static boolean isSubsignature(IMethodBinding m1, IMethodBinding m2) { //TODO: use IMethodBinding#isSubsignature(..) once it is tested and fixed (only erasure of m1's parameter types, considering type variable counts, doing type variable substitution if (! m1.getName().equals(m2.getName())) return false; ITypeBinding[] m1Parameters= m1.getParameterTypes(); ITypeBinding[] m2Parameters= m2.getParameterTypes(); if (m1Parameters.length != m2Parameters.length) return false; ITypeBinding[] m1TypeParameters= m1.getTypeParameters(); ITypeBinding[] m2TypeParameters= m2.getTypeParameters(); if (m1TypeParameters.length != m2TypeParameters.length) return false; if (m1TypeParameters.length != 0) { //Note: this branch does not 100% adhere to the spec and may report some false positives. // Full compliance would require major duplication of compiler code. //Compare erasures of type parameter bounds: for (int i= 0; i < m1TypeParameters.length; i++) { ITypeBinding[] m2TypeParameterBounds= m1TypeParameters[i].getTypeBounds(); ITypeBinding[] m1TypeParameterBounds= m2TypeParameters[i].getTypeBounds(); if (m1TypeParameterBounds.length != m2TypeParameterBounds.length) return false; for (int b= 0; b < m2TypeParameterBounds.length; b++) { if (! equals(m1TypeParameterBounds[b].getErasure(), m2TypeParameterBounds[b].getErasure())) return false; } } //Compare erasures of parameter types: for (int i= 0; i < m1Parameters.length; i++) { if ( ! (equals(m2Parameters[i], m1Parameters[i]) || equals(m2Parameters[i].getErasure(), m1Parameters[i].getErasure()))) // try to achieve effect of "rename type variables" return false; } return true; } else { for (int i= 0; i < m1Parameters.length; i++) { if ( ! (equals(m2Parameters[i], m1Parameters[i]) || equals(m2Parameters[i].getErasure(), m1Parameters[i]))) // subsignature return false; } return true; } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/c2828d491ccaa3d00dac87cfda6a3cc5e5057d29/Bindings.java/buggy/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
16523,
8195,
12,
45,
1305,
5250,
312,
21,
16,
467,
1305,
5250,
312,
22,
13,
288,
202,
202,
759,
6241,
30,
999,
467,
1305,
5250,
7,
291,
1676,
8195,
12,
838,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
16523,
8195,
12,
45,
1305,
5250,
312,
21,
16,
467,
1305,
5250,
312,
22,
13,
288,
202,
202,
759,
6241,
30,
999,
467,
1305,
5250,
7,
291,
1676,
8195,
12,
838,
13,
... |
for (int i = 0 ; i < compileList.length ; i++) { | for (int i = 0; i < compileList.length; i++) { | protected void compile() { String compilerImpl = getCompiler(); if (compileList.length > 0) { log("Compiling " + compileList.length + " source file" + (compileList.length == 1 ? "" : "s") + (destDir != null ? " to " + destDir : "")); if (listFiles) { for (int i = 0 ; i < compileList.length ; i++) { String filename = compileList[i].getAbsolutePath(); log(filename) ; } } CompilerAdapter adapter = CompilerAdapterFactory.getCompiler(compilerImpl, this); // now we need to populate the compiler adapter adapter.setJavac(this); // finally, lets execute the compiler!! if (!adapter.execute()) { if (failOnError) { throw new BuildException(FAIL_MSG, getLocation()); } else { log(FAIL_MSG, Project.MSG_ERR); } } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/29b5568d6053aa7b9b7fba411ef77242b170f634/Javac.java/buggy/src/main/org/apache/tools/ant/taskdefs/Javac.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4074,
1435,
288,
3639,
514,
5274,
2828,
273,
336,
9213,
5621,
3639,
309,
261,
11100,
682,
18,
2469,
405,
374,
13,
288,
5411,
613,
2932,
2945,
4973,
315,
397,
4074,
682,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4074,
1435,
288,
3639,
514,
5274,
2828,
273,
336,
9213,
5621,
3639,
309,
261,
11100,
682,
18,
2469,
405,
374,
13,
288,
5411,
613,
2932,
2945,
4973,
315,
397,
4074,
682,
18,
2... |
void startElement (String elname) | void startElement(String elname) | void startElement (String elname) throws SAXException { ContentHandler handler = contentHandler; // // NOTE: this implementation of namespace support adds something // like six percent to parsing CPU time, in a large (~50 MB) // document that doesn't use namespaces at all. (Measured by PC // sampling, with a bug where endElement processing was omitted.) // [Measurement referred to older implementation, older JVM ...] // // It ought to become notably faster in such cases. Most // costs are the prefix stack calling Hashtable.get() (2%), // String.hashCode() (1.5%) and about 1.3% each for pushing // the context, and two chunks of name processing. // if (!attributes) { if (namespaces) prefixStack.pushContext (); } else if (namespaces) { // now we can patch up namespace refs; we saw all the // declarations, so now we'll do the Right Thing Iterator itt = attributesList.iterator (); while(itt.hasNext()) { Attribute attribute = (Attribute) itt.next(); String qname = attribute.name; int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) continue; } else { if ("xmlns".equals(qname)) continue; } //Illegal in the new Namespaces Draft //should it be only in 1.1 docs?? if (qname.equals (":")) fatal ("namespace names consisting of a single colon " + "character are invalid"); index = qname.indexOf (':'); // NS prefix declaration? if (index == 5 && qname.startsWith ("xmlns")) continue; // it's not a NS decl; patch namespace info items if (prefixStack.processName (qname, nsTemp, true) == null) fatal ("undeclared attribute prefix in: " + qname); else { attribute.nameSpace = nsTemp[0]; attribute.localName = nsTemp[1]; } } } // save element name so attribute callbacks work elementName = elname; if (namespaces) { if (prefixStack.processName (elname, nsTemp, false) == null) { fatal ("undeclared element prefix in: " + elname); nsTemp [0] = nsTemp [1] = ""; } handler.startElement (nsTemp [0], nsTemp [1], elname, this); } else handler.startElement ("", "", elname, this); // elementName = null; // elements with no attributes are pretty common! if (attributes) { attributesList.clear(); attributeCount = 0; attributes = false; } } | 5916 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5916/7fb7568e63c3fe14af521de4699cb37898923ca7/SAXDriver.java/buggy/libjava/gnu/xml/aelfred2/SAXDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13591,
12,
780,
415,
529,
13,
565,
1216,
14366,
565,
288,
202,
1350,
1503,
1838,
273,
913,
1503,
31,
202,
759,
202,
759,
5219,
30,
225,
333,
4471,
434,
1981,
2865,
4831,
5943,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
13591,
12,
780,
415,
529,
13,
565,
1216,
14366,
565,
288,
202,
1350,
1503,
1838,
273,
913,
1503,
31,
202,
759,
202,
759,
5219,
30,
225,
333,
4471,
434,
1981,
2865,
4831,
5943,
202,... |
public org.quickfix.field.LegDatedDate getLegDatedDate() throws FieldNotFound { org.quickfix.field.LegDatedDate value = new org.quickfix.field.LegDatedDate(); | public quickfix.field.LegDatedDate getLegDatedDate() throws FieldNotFound { quickfix.field.LegDatedDate value = new quickfix.field.LegDatedDate(); | public org.quickfix.field.LegDatedDate getLegDatedDate() throws FieldNotFound { org.quickfix.field.LegDatedDate value = new org.quickfix.field.LegDatedDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/News.java/clean/src/java/src/quickfix/fix44/News.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
40,
690,
1626,
336,
8329,
40,
690,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
40,
690,
1626,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
40,
690,
1626,
336,
8329,
40,
690,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
40,
690,
1626,
460,
... |
public void ruleAction(int ruleNumber) { switch (ruleNumber) { // // Rule 1: TypeName ::= TypeName . ErrorId // case 1: { //#line 6 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name TypeName = (Name) getRhsSym(1); //#line 8 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, "*")); break; } // // Rule 2: PackageName ::= PackageName . ErrorId // case 2: { //#line 16 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name PackageName = (Name) getRhsSym(1); //#line 18 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, "*")); break; } // // Rule 3: ExpressionName ::= AmbiguousName . ErrorId // case 3: { //#line 26 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 28 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 4: MethodName ::= AmbiguousName . ErrorId // case 4: { //#line 36 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 38 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 5: PackageOrTypeName ::= PackageOrTypeName . ErrorId // case 5: { //#line 46 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 48 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, "*")); break; } // // Rule 6: AmbiguousName ::= AmbiguousName . ErrorId // case 6: { //#line 56 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 58 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 7: FieldAccess ::= Primary . ErrorId // case 7: { //#line 66 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 68 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(), Primary, "*")); break; } // // Rule 8: FieldAccess ::= super . ErrorId // case 8: { //#line 73 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), "*")); break; } // // Rule 9: FieldAccess ::= ClassName . super$sup . ErrorId // case 9: { //#line 76 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 76 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 78 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), "*")); break; } // // Rule 10: MethodInvocation ::= MethodPrimaryPrefix ( ArgumentListopt ) // case 10: { //#line 82 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object MethodPrimaryPrefix = (Object) getRhsSym(1); //#line 82 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 84 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) ((Object[]) MethodPrimaryPrefix)[0]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodPrimaryPrefix)[1]; setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 11: MethodInvocation ::= MethodSuperPrefix ( ArgumentListopt ) // case 11: { //#line 89 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier MethodSuperPrefix = (polyglot.lex.Identifier) getRhsSym(1); //#line 89 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 91 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier identifier = MethodSuperPrefix; setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 12: MethodInvocation ::= MethodClassNameSuperPrefix ( ArgumentListopt ) // case 12: { //#line 95 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object MethodClassNameSuperPrefix = (Object) getRhsSym(1); //#line 95 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 97 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) ((Object[]) MethodClassNameSuperPrefix)[0]; JPGPosition super_pos = (JPGPosition) ((Object[]) MethodClassNameSuperPrefix)[1]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodClassNameSuperPrefix)[2]; setResult(nf.Call(pos(), nf.Super(super_pos, ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 13: MethodPrimaryPrefix ::= Primary . ErrorId$ErrorId // case 13: { //#line 104 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 104 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 106 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[2]; a[0] = Primary; a[1] = id(getRhsFirstTokenIndex(3)); setResult(a); break; } // // Rule 14: MethodSuperPrefix ::= super . ErrorId$ErrorId // case 14: { //#line 112 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 114 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(id(getRhsFirstTokenIndex(3))); break; } // // Rule 15: MethodClassNameSuperPrefix ::= ClassName . super$sup . ErrorId$ErrorId // case 15: { //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(5); //#line 119 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[3]; a[0] = ClassName; a[1] = pos(getRhsFirstTokenIndex(3)); a[2] = id(getRhsFirstTokenIndex(5)); setResult(a); break; } // // Rule 16: identifier ::= IDENTIFIER$ident // case 16: { //#line 94 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken ident = (IToken) getRhsIToken(1); //#line 96 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ident.setKind(X10Parsersym.TK_IDENTIFIER); setResult(id(getRhsFirstTokenIndex(1))); break; } // // Rule 19: IntegralType ::= byte // case 19: { //#line 121 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 20: IntegralType ::= char // case 20: { //#line 126 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 21: IntegralType ::= short // case 21: { //#line 131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 22: IntegralType ::= int // case 22: { //#line 136 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 23: IntegralType ::= long // case 23: { //#line 141 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 24: FloatingPointType ::= float // case 24: { //#line 147 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 25: FloatingPointType ::= double // case 25: { //#line 152 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 28: TypeName ::= identifier // case 28: { //#line 175 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 177 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 29: TypeName ::= TypeName . identifier // case 29: { //#line 180 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(1); //#line 180 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 182 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, identifier.getIdentifier())); break; } // // Rule 31: ArrayType ::= Type [ ] // case 31: { //#line 194 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 196 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.array(Type, pos(), 1)); break; } // // Rule 32: PackageName ::= identifier // case 32: { //#line 241 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 243 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 33: PackageName ::= PackageName . identifier // case 33: { //#line 246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageName = (Name) getRhsSym(1); //#line 246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 248 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, identifier.getIdentifier())); break; } // // Rule 34: ExpressionName ::= identifier // case 34: { //#line 262 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 264 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 35: ExpressionName ::= AmbiguousName . identifier // case 35: { //#line 267 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 267 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 269 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 36: MethodName ::= identifier // case 36: { //#line 277 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 279 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 37: MethodName ::= AmbiguousName . identifier // case 37: { //#line 282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 284 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 38: PackageOrTypeName ::= identifier // case 38: { //#line 292 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 294 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= PackageOrTypeName . identifier // case 39: { //#line 297 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 297 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 299 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, identifier.getIdentifier())); break; } // // Rule 40: AmbiguousName ::= identifier // case 40: { //#line 307 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 309 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= AmbiguousName . identifier // case 41: { //#line 312 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 312 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 314 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 42: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 42: { //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" PackageNode PackageDeclarationopt = (PackageNode) getRhsSym(1); //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarationsopt = (List) getRhsSym(2); //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarationsopt = (List) getRhsSym(3); //#line 326 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); int token_pos = (ImportDeclarationsopt.size() == 0 ? TypeDeclarationsopt.size() == 0 ? super.getSize() - 1 : getPrevious(getRhsFirstTokenIndex(3)) : getRhsLastTokenIndex(2) ); Import x10LangImport = nf.Import(pos(token_pos), Import.PACKAGE, x10Lang.toString()); ImportDeclarationsopt.add(x10LangImport); setResult(nf.SourceFile(pos(getLeftSpan(), getRightSpan()), PackageDeclarationopt, ImportDeclarationsopt, TypeDeclarationsopt)); break; } // // Rule 43: ImportDeclarations ::= ImportDeclaration // case 43: { //#line 342 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(1); //#line 344 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Import.class, false); l.add(ImportDeclaration); setResult(l); break; } // // Rule 44: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 44: { //#line 349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarations = (List) getRhsSym(1); //#line 349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(2); //#line 351 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (ImportDeclaration != null) ImportDeclarations.add(ImportDeclaration); //setResult(l); break; } // // Rule 45: TypeDeclarations ::= TypeDeclaration // case 45: { //#line 357 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(1); //#line 359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); if (TypeDeclaration != null) l.add(TypeDeclaration); setResult(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 46: { //#line 365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarations = (List) getRhsSym(1); //#line 365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(2); //#line 367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (TypeDeclaration != null) TypeDeclarations.add(TypeDeclaration); //setResult(l); break; } // // Rule 49: SingleTypeImportDeclaration ::= import TypeName ; // case 49: { //#line 380 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(2); //#line 382 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.CLASS, TypeName.toString())); break; } // // Rule 50: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 50: { //#line 386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(2); //#line 388 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.PACKAGE, PackageOrTypeName.toString())); break; } // // Rule 53: TypeDeclaration ::= ; // case 53: { //#line 402 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(null); break; } // // Rule 56: ClassModifiers ::= ClassModifiers ClassModifier // case 56: { //#line 414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifiers = (Flags) getRhsSym(1); //#line 414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifier = (Flags) getRhsSym(2); //#line 416 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassModifiers.set(ClassModifier)); break; } // // Rule 57: ClassModifier ::= public // case 57: { //#line 424 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 58: ClassModifier ::= protected // case 58: { //#line 429 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 59: ClassModifier ::= private // case 59: { //#line 434 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 60: ClassModifier ::= abstract // case 60: { //#line 439 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 61: ClassModifier ::= static // case 61: { //#line 444 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 62: ClassModifier ::= final // case 62: { //#line 449 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 63: ClassModifier ::= strictfp // case 63: { //#line 454 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 64: Super ::= extends ClassType // case 64: { //#line 466 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ClassType = (TypeNode) getRhsSym(2); //#line 468 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassType); break; } // // Rule 65: Interfaces ::= implements InterfaceTypeList // case 65: { //#line 477 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(2); //#line 479 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceTypeList); break; } // // Rule 66: InterfaceTypeList ::= InterfaceType // case 66: { //#line 483 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(1); //#line 485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 67: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 67: { //#line 490 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(1); //#line 490 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 492 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceTypeList.add(InterfaceType); setResult(InterfaceTypeList); break; } // // Rule 68: ClassBody ::= { ClassBodyDeclarationsopt } // case 68: { //#line 502 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarationsopt = (List) getRhsSym(2); //#line 504 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(getLeftSpan(), getRightSpan()), ClassBodyDeclarationsopt)); break; } // // Rule 70: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 70: { //#line 509 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarations = (List) getRhsSym(1); //#line 509 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclaration = (List) getRhsSym(2); //#line 511 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassBodyDeclarations.addAll(ClassBodyDeclaration); // setResult(a); break; } // // Rule 72: ClassBodyDeclaration ::= InstanceInitializer // case 72: { //#line 517 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block InstanceInitializer = (Block) getRhsSym(1); //#line 519 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.NONE, InstanceInitializer)); setResult(l); break; } // // Rule 73: ClassBodyDeclaration ::= StaticInitializer // case 73: { //#line 524 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block StaticInitializer = (Block) getRhsSym(1); //#line 526 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.STATIC, StaticInitializer)); setResult(l); break; } // // Rule 74: ClassBodyDeclaration ::= ConstructorDeclaration // case 74: { //#line 531 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ConstructorDecl ConstructorDeclaration = (ConstructorDecl) getRhsSym(1); //#line 533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ConstructorDeclaration); setResult(l); break; } // // Rule 76: ClassMemberDeclaration ::= MethodDeclaration // case 76: { //#line 540 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodDeclaration = (MethodDecl) getRhsSym(1); //#line 542 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(MethodDeclaration); setResult(l); break; } // // Rule 77: ClassMemberDeclaration ::= ClassDeclaration // case 77: { //#line 547 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 549 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 78: ClassMemberDeclaration ::= InterfaceDeclaration // case 78: { //#line 554 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 556 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 79: ClassMemberDeclaration ::= ; // case 79: { //#line 563 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); setResult(l); break; } // // Rule 80: VariableDeclarators ::= VariableDeclarator // case 80: { //#line 571 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(1); //#line 573 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(VariableDeclarator); setResult(l); break; } // // Rule 81: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 81: { //#line 578 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(1); //#line 578 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(3); //#line 580 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclarators.add(VariableDeclarator); // setResult(VariableDeclarators); break; } // // Rule 83: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 83: { //#line 586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 588 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclaratorId.init = VariableInitializer; VariableDeclaratorId.position(pos()); // setResult(VariableDeclaratorId); break; } // // Rule 84: TraditionalVariableDeclaratorId ::= identifier // case 84: { //#line 594 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier())); break; } // // Rule 85: TraditionalVariableDeclaratorId ::= TraditionalVariableDeclaratorId [ ] // case 85: { //#line 599 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator TraditionalVariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 601 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TraditionalVariableDeclaratorId.dims++; TraditionalVariableDeclaratorId.position(pos()); // setResult(a); break; } // // Rule 87: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 87: { //#line 608 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 608 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(3); //#line 610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier(), IdentifierList)); break; } // // Rule 88: VariableDeclaratorId ::= [ IdentifierList ] // case 88: { //#line 613 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(2); //#line 615 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), IdentifierList)); break; } // // Rule 92: FieldModifiers ::= FieldModifiers FieldModifier // case 92: { //#line 623 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifiers = (Flags) getRhsSym(1); //#line 623 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifier = (Flags) getRhsSym(2); //#line 625 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(FieldModifiers.set(FieldModifier)); break; } // // Rule 93: FieldModifier ::= public // case 93: { //#line 633 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 94: FieldModifier ::= protected // case 94: { //#line 638 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 95: FieldModifier ::= private // case 95: { //#line 643 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 96: FieldModifier ::= static // case 96: { //#line 648 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 97: FieldModifier ::= final // case 97: { //#line 653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 98: FieldModifier ::= transient // case 98: { //#line 658 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.TRANSIENT); break; } // // Rule 100: ResultType ::= void // case 100: { //#line 675 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 101: FormalParameterList ::= LastFormalParameter // case 101: { //#line 695 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(1); //#line 697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(LastFormalParameter); setResult(l); break; } // // Rule 102: FormalParameterList ::= FormalParameters , LastFormalParameter // case 102: { //#line 702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(3); //#line 704 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(LastFormalParameter); // setResult(FormalParameters); break; } // // Rule 103: FormalParameters ::= FormalParameter // case 103: { //#line 709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(1); //#line 711 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(FormalParameter); setResult(l); break; } // // Rule 104: FormalParameters ::= FormalParameters , FormalParameter // case 104: { //#line 716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 718 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(FormalParameter); // setResult(FormalParameters); break; } // // Rule 105: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 105: { //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(3); //#line 725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableDeclaratorId != null) setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); else setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), 1), "", new AmbExpr[0])); break; } // // Rule 107: VariableModifiers ::= VariableModifiers VariableModifier // case 107: { //#line 733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiers = (Flags) getRhsSym(1); //#line 733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifier = (Flags) getRhsSym(2); //#line 735 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(VariableModifiers.set(VariableModifier)); break; } // // Rule 108: VariableModifier ::= final // case 108: { //#line 741 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 109: LastFormalParameter ::= VariableModifiersopt Type ...opt$opt VariableDeclaratorId // case 109: { //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(4); //#line 749 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" assert(opt == null); setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); break; } // // Rule 111: MethodModifiers ::= MethodModifiers MethodModifier // case 111: { //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifiers = (Flags) getRhsSym(1); //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifier = (Flags) getRhsSym(2); //#line 763 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(MethodModifiers.set(MethodModifier)); break; } // // Rule 112: MethodModifier ::= public // case 112: { //#line 771 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 113: MethodModifier ::= protected // case 113: { //#line 776 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 114: MethodModifier ::= private // case 114: { //#line 781 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 115: MethodModifier ::= abstract // case 115: { //#line 786 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 116: MethodModifier ::= static // case 116: { //#line 791 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 117: MethodModifier ::= final // case 117: { //#line 796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 118: MethodModifier ::= native // case 118: { //#line 806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NATIVE); break; } // // Rule 119: MethodModifier ::= strictfp // case 119: { //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 120: Throws ::= throws ExceptionTypeList // case 120: { //#line 815 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(2); //#line 817 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExceptionTypeList); break; } // // Rule 121: ExceptionTypeList ::= ExceptionType // case 121: { //#line 821 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(1); //#line 823 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(ExceptionType); setResult(l); break; } // // Rule 122: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 122: { //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(1); //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(3); //#line 830 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExceptionTypeList.add(ExceptionType); // setResult(ExceptionTypeList); break; } // // Rule 125: MethodBody ::= ; // case 125: setResult(null); break; // // Rule 127: StaticInitializer ::= static Block // case 127: { //#line 850 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 128: SimpleTypeName ::= identifier // case 128: { //#line 867 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 869 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 130: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 130: { //#line 874 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifiers = (Flags) getRhsSym(1); //#line 874 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifier = (Flags) getRhsSym(2); //#line 876 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstructorModifiers.set(ConstructorModifier)); break; } // // Rule 131: ConstructorModifier ::= public // case 131: { //#line 884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 132: ConstructorModifier ::= protected // case 132: { //#line 889 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 133: ConstructorModifier ::= private // case 133: { //#line 894 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 134: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 134: { //#line 898 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt ExplicitConstructorInvocationopt = (Stmt) getRhsSym(2); //#line 898 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(3); //#line 900 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l; l = new TypedList(new LinkedList(), Stmt.class, false); if (ExplicitConstructorInvocationopt == null) { l.add(nf.SuperCall(pos(), Collections.EMPTY_LIST)); } else { l.add(ExplicitConstructorInvocationopt); } l.addAll(BlockStatementsopt); setResult(nf.Block(pos(), l)); break; } // // Rule 135: Arguments ::= ( ArgumentListopt ) // case 135: { //#line 933 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(2); //#line 935 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ArgumentListopt); break; } // // Rule 138: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 138: { //#line 951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifiers = (Flags) getRhsSym(1); //#line 951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifier = (Flags) getRhsSym(2); //#line 953 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceModifiers.set(InterfaceModifier)); break; } // // Rule 139: InterfaceModifier ::= public // case 139: { //#line 961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 140: InterfaceModifier ::= protected // case 140: { //#line 966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 141: InterfaceModifier ::= private // case 141: { //#line 971 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 142: InterfaceModifier ::= abstract // case 142: { //#line 976 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 143: InterfaceModifier ::= static // case 143: { //#line 981 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 144: InterfaceModifier ::= strictfp // case 144: { //#line 986 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 145: ExtendsInterfaces ::= extends InterfaceType // case 145: { //#line 990 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(2); //#line 992 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 146: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 146: { //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExtendsInterfaces = (List) getRhsSym(1); //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 999 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExtendsInterfaces.add(InterfaceType); // setResult(ExtendsInterfaces); break; } // // Rule 147: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 147: { //#line 1009 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarationsopt = (List) getRhsSym(2); //#line 1011 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(), InterfaceMemberDeclarationsopt)); break; } // // Rule 149: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 149: { //#line 1016 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarations = (List) getRhsSym(1); //#line 1016 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclaration = (List) getRhsSym(2); //#line 1018 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceMemberDeclarations.addAll(InterfaceMemberDeclaration); // setResult(l); break; } // // Rule 151: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 151: { //#line 1024 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl AbstractMethodDeclaration = (MethodDecl) getRhsSym(1); //#line 1026 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(AbstractMethodDeclaration); setResult(l); break; } // // Rule 152: InterfaceMemberDeclaration ::= ClassDeclaration // case 152: { //#line 1031 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1033 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 153: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 153: { //#line 1038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 1040 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 154: InterfaceMemberDeclaration ::= ; // case 154: { //#line 1047 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Collections.EMPTY_LIST); break; } // // Rule 155: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 155: { //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiersopt = (Flags) getRhsSym(1); //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1053 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(getRhsFirstTokenIndex(2), getRightSpan()), ConstantModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), d.dims), d.name, d.init)); } setResult(l); break; } // // Rule 157: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 157: { //#line 1071 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiers = (Flags) getRhsSym(1); //#line 1071 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifier = (Flags) getRhsSym(2); //#line 1073 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstantModifiers.set(ConstantModifier)); break; } // // Rule 158: ConstantModifier ::= public // case 158: { //#line 1081 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 159: ConstantModifier ::= static // case 159: { //#line 1086 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 160: ConstantModifier ::= final // case 160: { //#line 1091 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 162: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 162: { //#line 1098 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifiers = (Flags) getRhsSym(1); //#line 1098 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifier = (Flags) getRhsSym(2); //#line 1100 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(AbstractMethodModifiers.set(AbstractMethodModifier)); break; } // // Rule 163: AbstractMethodModifier ::= public // case 163: { //#line 1108 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 164: AbstractMethodModifier ::= abstract // case 164: { //#line 1113 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 165: SimpleName ::= identifier // case 165: { //#line 1169 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 166: ArrayInitializer ::= { VariableInitializersopt ,opt$opt } // case 166: { //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializersopt = (List) getRhsSym(2); //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 1200 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableInitializersopt == null) setResult(nf.ArrayInit(pos())); else setResult(nf.ArrayInit(pos(), VariableInitializersopt)); break; } // // Rule 167: VariableInitializers ::= VariableInitializer // case 167: { //#line 1206 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(1); //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(VariableInitializer); setResult(l); break; } // // Rule 168: VariableInitializers ::= VariableInitializers , VariableInitializer // case 168: { //#line 1213 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializers = (List) getRhsSym(1); //#line 1213 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 1215 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableInitializers.add(VariableInitializer); //setResult(VariableInitializers); break; } // // Rule 169: Block ::= { BlockStatementsopt } // case 169: { //#line 1234 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(2); //#line 1236 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Block(pos(), BlockStatementsopt)); break; } // // Rule 170: BlockStatements ::= BlockStatement // case 170: { //#line 1240 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(1); //#line 1242 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.addAll(BlockStatement); setResult(l); break; } // // Rule 171: BlockStatements ::= BlockStatements BlockStatement // case 171: { //#line 1247 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(1); //#line 1247 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(2); //#line 1249 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" BlockStatements.addAll(BlockStatement); //setResult(l); break; } // // Rule 173: BlockStatement ::= ClassDeclaration // case 173: { //#line 1255 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), ClassDeclaration)); setResult(l); break; } // // Rule 174: BlockStatement ::= Statement // case 174: { //#line 1262 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(1); //#line 1264 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(Statement); setResult(l); break; } // // Rule 176: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 176: { //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1274 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); if (VariableDeclarators != null) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag(VariableModifiersopt); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(Type, pos(d), d.dims), d.name, d.init)); // [IP] TODO: Add X10Local with exploded variables if (d.hasExplodedVars()) s.addAll(X10Formal_c.explode(nf, ts, d.name, pos(d), d.flags, d.names())); } } l.addAll(s); setResult(l); break; } // // Rule 200: IfThenStatement ::= if ( Expression ) Statement // case 200: { //#line 1335 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1335 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1337 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, Statement)); break; } // // Rule 201: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 201: { //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(7); //#line 1343 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, StatementNoShortIf, Statement)); break; } // // Rule 202: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf$true_stmt else StatementNoShortIf$false_stmt // case 202: { //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt true_stmt = (Stmt) getRhsSym(5); //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt false_stmt = (Stmt) getRhsSym(7); //#line 1349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, true_stmt, false_stmt)); break; } // // Rule 203: EmptyStatement ::= ; // case 203: { //#line 1355 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Empty(pos())); break; } // // Rule 204: LabeledStatement ::= identifier : Statement // case 204: { //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(3); //#line 1361 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), Statement)); break; } // // Rule 205: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 205: { //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(3); //#line 1367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), StatementNoShortIf)); break; } // // Rule 206: ExpressionStatement ::= StatementExpression ; // case 206: { //#line 1370 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1372 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Eval(pos(), StatementExpression)); break; } // // Rule 214: AssertStatement ::= assert Expression ; // case 214: { //#line 1393 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1395 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), Expression)); break; } // // Rule 215: AssertStatement ::= assert Expression$expr1 : Expression$expr2 ; // case 215: { //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr1 = (Expr) getRhsSym(2); //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr2 = (Expr) getRhsSym(4); //#line 1400 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), expr1, expr2)); break; } // // Rule 216: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 216: { //#line 1404 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1404 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlock = (List) getRhsSym(5); //#line 1406 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Switch(pos(), Expression, SwitchBlock)); break; } // // Rule 217: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 217: { //#line 1410 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroupsopt = (List) getRhsSym(2); //#line 1410 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabelsopt = (List) getRhsSym(3); //#line 1412 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroupsopt.addAll(SwitchLabelsopt); setResult(SwitchBlockStatementGroupsopt); break; } // // Rule 219: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 219: { //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroups = (List) getRhsSym(1); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroup = (List) getRhsSym(2); //#line 1420 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroups.addAll(SwitchBlockStatementGroup); // setResult(SwitchBlockStatementGroups); break; } // // Rule 220: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 220: { //#line 1425 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1425 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(2); //#line 1427 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), SwitchElement.class, false); l.addAll(SwitchLabels); l.add(nf.SwitchBlock(pos(), BlockStatements)); setResult(l); break; } // // Rule 221: SwitchLabels ::= SwitchLabel // case 221: { //#line 1434 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(1); //#line 1436 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Case.class, false); l.add(SwitchLabel); setResult(l); break; } // // Rule 222: SwitchLabels ::= SwitchLabels SwitchLabel // case 222: { //#line 1441 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1441 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(2); //#line 1443 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchLabels.add(SwitchLabel); //setResult(SwitchLabels); break; } // // Rule 223: SwitchLabel ::= case ConstantExpression : // case 223: { //#line 1448 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConstantExpression = (Expr) getRhsSym(2); //#line 1450 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Case(pos(), ConstantExpression)); break; } // // Rule 224: SwitchLabel ::= default : // case 224: { //#line 1457 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Default(pos())); break; } // // Rule 225: WhileStatement ::= while ( Expression ) Statement // case 225: { //#line 1464 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1464 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1466 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, Statement)); break; } // // Rule 226: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 226: { //#line 1470 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1470 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1472 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, StatementNoShortIf)); break; } // // Rule 227: DoStatement ::= do Statement while ( Expression ) ; // case 227: { //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(2); //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(5); //#line 1478 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Do(pos(), Statement, Expression)); break; } // // Rule 230: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 230: { //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(9); //#line 1487 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, Statement)); break; } // // Rule 231: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 231: { //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(9); //#line 1493 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, StatementNoShortIf)); break; } // // Rule 233: ForInit ::= LocalVariableDeclaration // case 233: { //#line 1498 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List LocalVariableDeclaration = (List) getRhsSym(1); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ForInit.class, false); l.addAll(LocalVariableDeclaration); //setResult(l); break; } // // Rule 235: StatementExpressionList ::= StatementExpression // case 235: { //#line 1508 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1510 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Eval.class, false); l.add(nf.Eval(pos(), StatementExpression)); setResult(l); break; } // // Rule 236: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 236: { //#line 1515 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List StatementExpressionList = (List) getRhsSym(1); //#line 1515 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(3); //#line 1517 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" StatementExpressionList.add(nf.Eval(pos(), StatementExpression)); //setResult(StatementExpressionList); break; } // // Rule 237: BreakStatement ::= break identifieropt ; // case 237: { //#line 1525 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1527 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Break(pos())); else setResult(nf.Break(pos(), identifieropt.toString())); break; } // // Rule 238: ContinueStatement ::= continue identifieropt ; // case 238: { //#line 1533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1535 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Continue(pos())); else setResult(nf.Continue(pos(), identifieropt.toString())); break; } // // Rule 239: ReturnStatement ::= return Expressionopt ; // case 239: { //#line 1541 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(2); //#line 1543 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Return(pos(), Expressionopt)); break; } // // Rule 240: ThrowStatement ::= throw Expression ; // case 240: { //#line 1547 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1549 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Throw(pos(), Expression)); break; } // // Rule 241: TryStatement ::= try Block Catches // case 241: { //#line 1559 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1559 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(3); //#line 1561 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catches)); break; } // // Rule 242: TryStatement ::= try Block Catchesopt Finally // case 242: { //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catchesopt = (List) getRhsSym(3); //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Finally = (Block) getRhsSym(4); //#line 1566 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catchesopt, Finally)); break; } // // Rule 243: Catches ::= CatchClause // case 243: { //#line 1570 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(1); //#line 1572 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Catch.class, false); l.add(CatchClause); setResult(l); break; } // // Rule 244: Catches ::= Catches CatchClause // case 244: { //#line 1577 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(1); //#line 1577 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(2); //#line 1579 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catches.add(CatchClause); //setResult(Catches); break; } // // Rule 245: CatchClause ::= catch ( FormalParameter ) Block // case 245: { //#line 1584 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1584 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(5); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Catch(pos(), FormalParameter, Block)); break; } // // Rule 246: Finally ::= finally Block // case 246: { //#line 1590 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1592 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 250: PrimaryNoNewArray ::= Type . class // case 250: { //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1612 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 251: PrimaryNoNewArray ::= void . class // case 251: { //#line 1631 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 252: PrimaryNoNewArray ::= this // case 252: { //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos())); break; } // // Rule 253: PrimaryNoNewArray ::= ClassName . this // case 253: { //#line 1640 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1642 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 254: PrimaryNoNewArray ::= ( Expression ) // case 254: { //#line 1645 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1647 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ParExpr(pos(), Expression)); break; } // // Rule 259: Literal ::= IntegerLiteral$IntegerLiteral // case 259: { //#line 1655 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken IntegerLiteral = (IToken) getRhsIToken(1); //#line 1657 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.IntegerLiteral a = int_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 260: Literal ::= LongLiteral$LongLiteral // case 260: { //#line 1661 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken LongLiteral = (IToken) getRhsIToken(1); //#line 1663 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.LongLiteral a = long_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 261: Literal ::= FloatingPointLiteral$FloatLiteral // case 261: { //#line 1667 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken FloatLiteral = (IToken) getRhsIToken(1); //#line 1669 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.FloatLiteral a = float_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 262: Literal ::= DoubleLiteral$DoubleLiteral // case 262: { //#line 1673 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken DoubleLiteral = (IToken) getRhsIToken(1); //#line 1675 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.DoubleLiteral a = double_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 263: Literal ::= BooleanLiteral // case 263: { //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.BooleanLiteral BooleanLiteral = (polyglot.lex.BooleanLiteral) getRhsSym(1); //#line 1681 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.BooleanLit(pos(), BooleanLiteral.getValue().booleanValue())); break; } // // Rule 264: Literal ::= CharacterLiteral$CharacterLiteral // case 264: { //#line 1684 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken CharacterLiteral = (IToken) getRhsIToken(1); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.CharacterLiteral a = char_lit(getRhsFirstTokenIndex(1)); setResult(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 265: Literal ::= StringLiteral$str // case 265: { //#line 1690 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken str = (IToken) getRhsIToken(1); //#line 1692 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.StringLiteral a = string_lit(getRhsFirstTokenIndex(1)); setResult(nf.StringLit(pos(), a.getValue())); break; } // // Rule 266: Literal ::= null // case 266: { //#line 1698 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.NullLit(pos())); break; } // // Rule 267: BooleanLiteral ::= true$trueLiteral // case 267: { //#line 1702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken trueLiteral = (IToken) getRhsIToken(1); //#line 1704 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 268: BooleanLiteral ::= false$falseLiteral // case 268: { //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken falseLiteral = (IToken) getRhsIToken(1); //#line 1709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 269: ArgumentList ::= Expression // case 269: { //#line 1722 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(1); //#line 1724 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Expression); setResult(l); break; } // // Rule 270: ArgumentList ::= ArgumentList , Expression // case 270: { //#line 1729 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentList = (List) getRhsSym(1); //#line 1729 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1731 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ArgumentList.add(Expression); //setResult(ArgumentList); break; } // // Rule 271: DimExprs ::= DimExpr // case 271: { //#line 1765 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(1); //#line 1767 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); setResult(l); break; } // // Rule 272: DimExprs ::= DimExprs DimExpr // case 272: { //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List DimExprs = (List) getRhsSym(1); //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(2); //#line 1774 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" DimExprs.add(DimExpr); //setResult(DimExprs); break; } // // Rule 273: DimExpr ::= [ Expression ] // case 273: { //#line 1779 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1781 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Expression.position(pos())); break; } // // Rule 274: Dims ::= [ ] // case 274: { //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(1)); break; } // // Rule 275: Dims ::= Dims [ ] // case 275: { //#line 1790 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Integer Dims = (Integer) getRhsSym(1); //#line 1792 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(Dims.intValue() + 1)); break; } // // Rule 276: FieldAccess ::= Primary . identifier // case 276: { //#line 1796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Primary = (Expr) getRhsSym(1); //#line 1796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1798 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(), Primary, identifier.getIdentifier())); break; } // // Rule 277: FieldAccess ::= super . identifier // case 277: { //#line 1801 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 278: FieldAccess ::= ClassName . super$sup . identifier // case 278: { //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken sup = (IToken) getRhsIToken(3); //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1808 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 279: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 279: { //#line 1812 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name MethodName = (Name) getRhsSym(1); //#line 1812 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 1814 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Call(pos(), MethodName.prefix == null ? null : MethodName.prefix.toReceiver(), MethodName.name, ArgumentListopt)); break; } // // Rule 281: PostfixExpression ::= ExpressionName // case 281: { //#line 1837 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 1839 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 284: PostIncrementExpression ::= PostfixExpression ++ // case 284: { //#line 1845 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1847 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_INC)); break; } // // Rule 285: PostDecrementExpression ::= PostfixExpression -- // case 285: { //#line 1851 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1853 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_DEC)); break; } // // Rule 288: UnaryExpression ::= + UnaryExpression // case 288: { //#line 1859 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1861 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.POS, UnaryExpression)); break; } // // Rule 289: UnaryExpression ::= - UnaryExpression // case 289: { //#line 1864 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1866 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NEG, UnaryExpression)); break; } // // Rule 291: PreIncrementExpression ::= ++ UnaryExpression // case 291: { //#line 1871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1873 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_INC, UnaryExpression)); break; } // // Rule 292: PreDecrementExpression ::= -- UnaryExpression // case 292: { //#line 1877 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1879 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_DEC, UnaryExpression)); break; } // // Rule 294: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 294: { //#line 1884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1886 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.BIT_NOT, UnaryExpression)); break; } // // Rule 295: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 295: { //#line 1889 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1891 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NOT, UnaryExpression)); break; } // // Rule 298: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 298: { //#line 1903 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1903 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1905 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MUL, UnaryExpression)); break; } // // Rule 299: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 299: { //#line 1908 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1908 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1910 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.DIV, UnaryExpression)); break; } // // Rule 300: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 300: { //#line 1913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1915 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MOD, UnaryExpression)); break; } // // Rule 302: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 302: { //#line 1920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1922 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.ADD, MultiplicativeExpression)); break; } // // Rule 303: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 303: { //#line 1925 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1925 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1927 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.SUB, MultiplicativeExpression)); break; } // // Rule 305: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 305: { //#line 1932 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1932 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(3); //#line 1934 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ShiftExpression, Binary.SHL, AdditiveExpression)); break; } // // Rule 306: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 306: { //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(4); //#line 1939 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.SHR, AdditiveExpression)); break; } // // Rule 307: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 307: { //#line 1943 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1943 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(5); //#line 1945 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.USHR, AdditiveExpression)); break; } // // Rule 309: RelationalExpression ::= RelationalExpression < ShiftExpression // case 309: { //#line 1951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1953 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LT, ShiftExpression)); break; } // // Rule 310: RelationalExpression ::= RelationalExpression > ShiftExpression // case 310: { //#line 1956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1958 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.GT, ShiftExpression)); break; } // // Rule 311: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 311: { //#line 1961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1963 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LE, ShiftExpression)); break; } // // Rule 312: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 312: { //#line 1966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(4); //#line 1968 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), RelationalExpression, Binary.GE, ShiftExpression)); break; } // // Rule 314: EqualityExpression ::= EqualityExpression == RelationalExpression // case 314: { //#line 1982 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1982 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1984 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.EQ, RelationalExpression)); break; } // // Rule 315: EqualityExpression ::= EqualityExpression != RelationalExpression // case 315: { //#line 1987 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1987 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1989 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.NE, RelationalExpression)); break; } // // Rule 317: AndExpression ::= AndExpression & EqualityExpression // case 317: { //#line 1994 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(1); //#line 1994 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(3); //#line 1996 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AndExpression, Binary.BIT_AND, EqualityExpression)); break; } // // Rule 319: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 319: { //#line 2001 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(1); //#line 2001 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(3); //#line 2003 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ExclusiveOrExpression, Binary.BIT_XOR, AndExpression)); break; } // // Rule 321: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 321: { //#line 2008 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(1); //#line 2008 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(3); //#line 2010 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), InclusiveOrExpression, Binary.BIT_OR, ExclusiveOrExpression)); break; } // // Rule 323: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 323: { //#line 2015 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(1); //#line 2015 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(3); //#line 2017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalAndExpression, Binary.COND_AND, InclusiveOrExpression)); break; } // // Rule 325: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 325: { //#line 2022 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2022 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(3); //#line 2024 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalOrExpression, Binary.COND_OR, ConditionalAndExpression)); break; } // // Rule 327: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 327: { //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalExpression = (Expr) getRhsSym(5); //#line 2031 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Conditional(pos(), ConditionalOrExpression, Expression, ConditionalExpression)); break; } // // Rule 330: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 330: { //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr LeftHandSide = (Expr) getRhsSym(1); //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Assign.Operator AssignmentOperator = (Assign.Operator) getRhsSym(2); //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AssignmentExpression = (Expr) getRhsSym(3); //#line 2040 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assign(pos(), LeftHandSide, AssignmentOperator, AssignmentExpression)); break; } // // Rule 331: LeftHandSide ::= ExpressionName // case 331: { //#line 2044 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 2046 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 334: AssignmentOperator ::= = // case 334: { //#line 2054 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ASSIGN); break; } // // Rule 335: AssignmentOperator ::= *= // case 335: { //#line 2059 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MUL_ASSIGN); break; } // // Rule 336: AssignmentOperator ::= /= // case 336: { //#line 2064 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.DIV_ASSIGN); break; } // // Rule 337: AssignmentOperator ::= %= // case 337: { //#line 2069 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MOD_ASSIGN); break; } // // Rule 338: AssignmentOperator ::= += // case 338: { //#line 2074 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ADD_ASSIGN); break; } // // Rule 339: AssignmentOperator ::= -= // case 339: { //#line 2079 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SUB_ASSIGN); break; } // // Rule 340: AssignmentOperator ::= <<= // case 340: { //#line 2084 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SHL_ASSIGN); break; } // // Rule 341: AssignmentOperator ::= > > = // case 341: { //#line 2089 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.SHR_ASSIGN); break; } // // Rule 342: AssignmentOperator ::= > > > = // case 342: { //#line 2095 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.USHR_ASSIGN); break; } // // Rule 343: AssignmentOperator ::= &= // case 343: { //#line 2101 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_AND_ASSIGN); break; } // // Rule 344: AssignmentOperator ::= ^= // case 344: { //#line 2106 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_XOR_ASSIGN); break; } // // Rule 345: AssignmentOperator ::= |= // case 345: { //#line 2111 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_OR_ASSIGN); break; } // // Rule 348: Dimsopt ::= $Empty // case 348: { //#line 2124 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(0)); break; } // // Rule 350: Catchesopt ::= $Empty // case 350: { //#line 2131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 352: identifieropt ::= $Empty // case 352: setResult(null); break; // // Rule 353: identifieropt ::= identifier // case 353: { //#line 2138 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2140 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 354: ForUpdateopt ::= $Empty // case 354: { //#line 2146 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 356: Expressionopt ::= $Empty // case 356: setResult(null); break; // // Rule 358: ForInitopt ::= $Empty // case 358: { //#line 2157 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 360: SwitchLabelsopt ::= $Empty // case 360: { //#line 2164 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 362: SwitchBlockStatementGroupsopt ::= $Empty // case 362: { //#line 2171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 364: VariableModifiersopt ::= $Empty // case 364: { //#line 2178 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 366: VariableInitializersopt ::= $Empty // case 366: setResult(null); break; // // Rule 368: AbstractMethodModifiersopt ::= $Empty // case 368: { //#line 2208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 370: ConstantModifiersopt ::= $Empty // case 370: { //#line 2215 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 372: InterfaceMemberDeclarationsopt ::= $Empty // case 372: { //#line 2222 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 374: ExtendsInterfacesopt ::= $Empty // case 374: { //#line 2229 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 376: InterfaceModifiersopt ::= $Empty // case 376: { //#line 2236 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 378: ClassBodyopt ::= $Empty // case 378: setResult(null); break; // // Rule 380: Argumentsopt ::= $Empty // case 380: setResult(null); break; // // Rule 381: Argumentsopt ::= Arguments // case 381: throw new Error("No action specified for rule " + 381); // // Rule 382: ,opt ::= $Empty // case 382: setResult(null); break; // // Rule 384: ArgumentListopt ::= $Empty // case 384: { //#line 2266 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 386: BlockStatementsopt ::= $Empty // case 386: { //#line 2273 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 388: ExplicitConstructorInvocationopt ::= $Empty // case 388: setResult(null); break; // // Rule 390: ConstructorModifiersopt ::= $Empty // case 390: { //#line 2284 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 392: ...opt ::= $Empty // case 392: setResult(null); break; // // Rule 394: FormalParameterListopt ::= $Empty // case 394: { //#line 2295 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 396: Throwsopt ::= $Empty // case 396: { //#line 2302 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 398: MethodModifiersopt ::= $Empty // case 398: { //#line 2309 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 400: FieldModifiersopt ::= $Empty // case 400: { //#line 2316 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 402: ClassBodyDeclarationsopt ::= $Empty // case 402: { //#line 2323 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 404: Interfacesopt ::= $Empty // case 404: { //#line 2330 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 406: Superopt ::= $Empty // case 406: { //#line 2337 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), "x10.lang.Object").toType()); break; } // // Rule 408: ClassModifiersopt ::= $Empty // case 408: { //#line 2348 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 410: TypeDeclarationsopt ::= $Empty // case 410: { //#line 2360 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 412: ImportDeclarationsopt ::= $Empty // case 412: { //#line 2367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 414: PackageDeclarationopt ::= $Empty // case 414: setResult(null); break; // // Rule 416: ClassType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 416: { //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 417: InterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 417: { //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 734 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 418: PackageDeclaration ::= package PackageName ; // case 418: { //#line 740 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name PackageName = (Name) getRhsSym(2); //#line 742 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(PackageName.toPackage()); break; } // // Rule 419: NormalClassDeclaration ::= X10ClassModifiersopt class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 419: { //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 748 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(X10Flags.isValue(X10ClassModifiersopt) ? nf.ValueClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody) : nf.ClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 421: X10ClassModifiers ::= X10ClassModifiers X10ClassModifier // case 421: { //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiers = (X10Flags) getRhsSym(1); //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifier = (X10Flags) getRhsSym(2); //#line 763 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags result = X10ClassModifiers.setX(X10ClassModifier); setResult(result); break; } // // Rule 422: X10ClassModifier ::= ClassModifier // case 422: { //#line 769 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags ClassModifier = (Flags) getRhsSym(1); //#line 771 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(ClassModifier)); break; } // // Rule 423: X10ClassModifier ::= safe // case 423: { //#line 776 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 424: PropertyList ::= ( Properties WhereClauseopt ) // case 424: { //#line 780 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(2); //#line 780 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(3); //#line 782 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = Properties; result[1] = WhereClauseopt; setResult(result); break; } // // Rule 425: PropertyList ::= ( WhereClause ) // case 425: { //#line 787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(2); //#line 789 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = null; result[1] = WhereClause; setResult(result); break; } // // Rule 426: Properties ::= Property // case 426: { //#line 796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(1); //#line 798 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), PropertyDecl.class, false); l.add(Property); setResult(l); break; } // // Rule 427: Properties ::= Properties , Property // case 427: { //#line 803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(1); //#line 803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(3); //#line 805 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Properties.add(Property); // setResult(FormalParameters); break; } // // Rule 428: Property ::= Type identifier // case 428: { //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(2); //#line 813 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.PropertyDecl(pos(), Flags.PUBLIC.Final(), Type, identifier.getIdentifier())); break; } // // Rule 429: MethodDeclaration ::= ThisClauseopt MethodModifiersopt ResultType MethodDeclarator Throwsopt MethodBody // case 429: { //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags MethodModifiersopt = (Flags) getRhsSym(2); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(6); //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name c = (MethodDeclarator != null) ? (Name) MethodDeclarator[0] : null; List d = (MethodDeclarator != null) ? (List) MethodDeclarator[1] : null; Integer e = (MethodDeclarator != null) ? (Integer) MethodDeclarator[2] : null; Expr where = (MethodDeclarator != null) ? (Expr) MethodDeclarator[3] : null; if (ResultType.type() == ts.Void() && e != null && e.intValue() > 0) { // TODO: error!!! System.err.println("Fix me - encountered method returning void but with non-zero rank?"); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, MethodModifiersopt, nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e != null ? e.intValue() : 1), c != null ? c.toString() : "", d, where, Throwsopt, MethodBody)); break; } // // Rule 430: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 430: { //#line 850 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), ArgumentListopt)); break; } // // Rule 431: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 431: { //#line 855 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 857 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), ArgumentListopt)); break; } // // Rule 432: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 432: { //#line 860 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 860 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 862 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 433: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 433: { //#line 865 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 865 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 867 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 434: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier PropertyListopt ExtendsInterfacesopt InterfaceBody // case 434: { //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags InterfaceModifiersopt = (Flags) getRhsSym(1); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ExtendsInterfacesopt = (List) getRhsSym(5); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody InterfaceBody = (ClassBody) getRhsSym(6); //#line 873 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(nf.ClassDecl(pos(), InterfaceModifiersopt.Interface(), identifier.getIdentifier(), props, ci, null, ExtendsInterfacesopt, InterfaceBody)); break; } // // Rule 435: AbstractMethodDeclaration ::= ThisClauseopt AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 435: { //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags AbstractMethodModifiersopt = (Flags) getRhsSym(2); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 890 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name c = (Name) MethodDeclarator[0]; List d = (List) MethodDeclarator[1]; Integer e = (Integer) MethodDeclarator[2]; Expr where = (Expr) MethodDeclarator[3]; if (ResultType.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, AbstractMethodModifiersopt , nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e.intValue()), c.toString(), d, where, Throwsopt, null)); break; } // // Rule 436: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 436: { //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ClassOrInterfaceType = (TypeNode) getRhsSym(2); //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(4); //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(6); //#line 915 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ClassBodyopt == null) setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt)); else setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt, ClassBodyopt)); break; } // // Rule 437: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 437: { //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 922 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 438: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 438: { //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name AmbiguousName = (Name) getRhsSym(1); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 930 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 439: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 439: { //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 939 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 440: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 440: { //#line 942 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 942 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 441: MethodInvocation ::= ClassName . super$sup . identifier ( ArgumentListopt ) // case 441: { //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(7); //#line 949 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 443: AssignPropertyCall ::= property ( ArgumentList ) // case 443: { //#line 954 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AssignPropertyCall(pos(), ArgumentList)); break; } // // Rule 444: Type ::= DataType // case 444: { //#line 965 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(1); //#line 967 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 445: Type ::= nullable < Type > DepParametersopt // case 445: { //#line 970 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 970 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(5); //#line 972 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode t = nf.Nullable(pos(), Type); setResult(DepParametersopt == null ? t : t.dep(null, DepParametersopt)); break; } // // Rule 446: Type ::= future < Type > // case 446: { //#line 978 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 980 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 450: PrimitiveType ::= NumericType DepParametersopt // case 450: { //#line 995 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode NumericType = (TypeNode) getRhsSym(1); //#line 995 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parser: parsed PrimitiveType |" + NumericType + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? NumericType : ((X10TypeNode) NumericType).dep(null, DepParametersopt)); break; } // // Rule 451: PrimitiveType ::= boolean DepParametersopt // case 451: { //#line 1003 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1005 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode res = (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.Boolean()); setResult(DepParametersopt==null ? res : res.dep(null, DepParametersopt)); break; } // // Rule 456: ClassOrInterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 456: { //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 1019 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode type; if (ts.isPrimitiveTypeName(TypeName.name)) { try { type= (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.primitiveForName(TypeName.name)); } catch (SemanticException e) { throw new InternalCompilerError("Unable to create primitive type for '" + TypeName.name + "'!"); } } else type= (X10TypeNode) TypeName.toType(); // System.out.println("Parser: parsed ClassOrInterfaceType |" + TypeName + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? type : type.dep(null, DepParametersopt)); break; } // // Rule 457: DepParameters ::= ( DepParameterExpr ) // case 457: { //#line 1036 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(2); //#line 1038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParameterExpr); break; } // // Rule 458: DepParameterExpr ::= ArgumentList WhereClauseopt // case 458: { //#line 1042 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(1); //#line 1042 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(2); //#line 1044 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), ArgumentList, WhereClauseopt)); break; } // // Rule 459: DepParameterExpr ::= WhereClause // case 459: { //#line 1047 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(1); //#line 1049 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), Collections.EMPTY_LIST, WhereClause)); break; } // // Rule 460: WhereClause ::= : ConstExpression // case 460: { //#line 1053 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1055 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 461: ConstPrimary ::= Literal // case 461: { //#line 1060 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.ast.Lit Literal = (polyglot.ast.Lit) getRhsSym(1); //#line 1062 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Literal); break; } // // Rule 462: ConstPrimary ::= Type . class // case 462: { //#line 1065 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1067 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 463: ConstPrimary ::= void . class // case 463: { //#line 1086 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 464: ConstPrimary ::= this // case 464: { //#line 1092 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos())); break; } // // Rule 465: ConstPrimary ::= here // case 465: { //#line 1097 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Here(pos())); break; } // // Rule 466: ConstPrimary ::= ClassName . this // case 466: { //#line 1100 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1102 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 467: ConstPrimary ::= ( ConstExpression ) // case 467: { //#line 1105 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1107 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 469: ConstPrimary ::= self // case 469: { //#line 1113 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Self(pos())); break; } // // Rule 470: ConstPostfixExpression ::= ConstPrimary // case 470: { //#line 1119 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1121 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstPrimary); break; } // // Rule 471: ConstPostfixExpression ::= ExpressionName // case 471: { //#line 1124 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1126 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ExpressionName.toExpr()); break; } // // Rule 472: ConstUnaryExpression ::= ConstPostfixExpression // case 472: { //#line 1129 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPostfixExpression = (Expr) getRhsSym(1); //#line 1131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstPostfixExpression); break; } // // Rule 473: ConstUnaryExpression ::= + ConstUnaryExpression // case 473: { //#line 1134 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1136 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.POS, ConstUnaryExpression)); break; } // // Rule 474: ConstUnaryExpression ::= - ConstUnaryExpression // case 474: { //#line 1139 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1141 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NEG, ConstUnaryExpression)); break; } // // Rule 475: ConstUnaryExpression ::= ! ConstUnaryExpression // case 475: { //#line 1144 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1146 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NOT, ConstUnaryExpression)); break; } // // Rule 476: ConstMultiplicativeExpression ::= ConstUnaryExpression // case 476: { //#line 1150 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(1); //#line 1152 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstUnaryExpression); break; } // // Rule 477: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression * ConstUnaryExpression // case 477: { //#line 1155 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1155 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1157 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MUL, ConstUnaryExpression)); break; } // // Rule 478: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression / ConstUnaryExpression // case 478: { //#line 1160 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1160 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1162 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.DIV, ConstUnaryExpression)); break; } // // Rule 479: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression % ConstUnaryExpression // case 479: { //#line 1165 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1165 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1167 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MOD, ConstUnaryExpression)); break; } // // Rule 480: ConstAdditiveExpression ::= ConstMultiplicativeExpression // case 480: { //#line 1171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1173 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstMultiplicativeExpression); break; } // // Rule 481: ConstAdditiveExpression ::= ConstAdditiveExpression + ConstMultiplicativeExpression // case 481: { //#line 1176 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1176 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1178 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.ADD, ConstMultiplicativeExpression)); break; } // // Rule 482: ConstAdditiveExpression ::= ConstAdditiveExpression - ConstMultiplicativeExpression // case 482: { //#line 1181 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1181 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1183 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.SUB, ConstMultiplicativeExpression)); break; } // // Rule 483: ConstRelationalExpression ::= ConstAdditiveExpression // case 483: { //#line 1188 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1190 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstAdditiveExpression); break; } // // Rule 484: ConstRelationalExpression ::= ConstRelationalExpression < ConstAdditiveExpression // case 484: { //#line 1193 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1193 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1195 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LT, ConstAdditiveExpression)); break; } // // Rule 485: ConstRelationalExpression ::= ConstRelationalExpression > ConstAdditiveExpression // case 485: { //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1200 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GT, ConstAdditiveExpression)); break; } // // Rule 486: ConstRelationalExpression ::= ConstRelationalExpression <= ConstAdditiveExpression // case 486: { //#line 1203 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1203 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1205 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LE, ConstAdditiveExpression)); break; } // // Rule 487: ConstRelationalExpression ::= ConstRelationalExpression > = ConstAdditiveExpression // case 487: { //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(4); //#line 1210 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GE, ConstAdditiveExpression)); break; } // // Rule 488: ConstEqualityExpression ::= ConstRelationalExpression // case 488: { //#line 1214 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1216 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstRelationalExpression); break; } // // Rule 489: ConstEqualityExpression ::= ConstEqualityExpression == ConstRelationalExpression // case 489: { //#line 1219 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1219 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1221 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.EQ, ConstRelationalExpression)); break; } // // Rule 490: ConstEqualityExpression ::= ConstEqualityExpression != ConstRelationalExpression // case 490: { //#line 1224 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1224 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1226 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.NE, ConstRelationalExpression)); break; } // // Rule 491: ConstAndExpression ::= ConstEqualityExpression // case 491: { //#line 1230 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1232 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstEqualityExpression); break; } // // Rule 492: ConstAndExpression ::= ConstAndExpression && ConstEqualityExpression // case 492: { //#line 1235 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1235 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(3); //#line 1237 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAndExpression, Binary.COND_AND, ConstEqualityExpression)); break; } // // Rule 493: ConstExclusiveOrExpression ::= ConstAndExpression // case 493: { //#line 1241 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1243 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstAndExpression); break; } // // Rule 494: ConstExclusiveOrExpression ::= ConstExclusiveOrExpression ^ ConstAndExpression // case 494: { //#line 1246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(3); //#line 1248 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstExclusiveOrExpression, Binary.BIT_XOR, ConstAndExpression)); break; } // // Rule 495: ConstInclusiveOrExpression ::= ConstExclusiveOrExpression // case 495: { //#line 1252 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1254 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExclusiveOrExpression); break; } // // Rule 496: ConstInclusiveOrExpression ::= ConstInclusiveOrExpression || ConstExclusiveOrExpression // case 496: { //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(3); //#line 1259 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstInclusiveOrExpression, Binary.COND_OR, ConstExclusiveOrExpression)); break; } // // Rule 497: ConstExpression ::= ConstInclusiveOrExpression // case 497: { //#line 1263 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1265 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstInclusiveOrExpression); break; } // // Rule 498: ConstExpression ::= ConstInclusiveOrExpression ? ConstExpression$first : ConstExpression // case 498: { //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr first = (Expr) getRhsSym(3); //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(5); //#line 1270 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Conditional(pos(), ConstInclusiveOrExpression, first, ConstExpression)); break; } // // Rule 499: ConstFieldAccess ::= ConstPrimary . identifier // case 499: { //#line 1275 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1275 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1277 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(), ConstPrimary, identifier.getIdentifier())); break; } // // Rule 500: ConstFieldAccess ::= super . identifier // case 500: { //#line 1280 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 501: ConstFieldAccess ::= ClassName . super$sup . identifier // case 501: { //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1287 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 503: X10ArrayType ::= Type [ . ] // case 503: { //#line 1303 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1305 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, null)); break; } // // Rule 504: X10ArrayType ::= Type value [ . ] // case 504: { //#line 1308 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1310 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, null)); break; } // // Rule 505: X10ArrayType ::= Type [ DepParameterExpr ] // case 505: { //#line 1313 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1313 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(3); //#line 1315 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, DepParameterExpr)); break; } // // Rule 506: X10ArrayType ::= Type value [ DepParameterExpr ] // case 506: { //#line 1318 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1318 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(4); //#line 1320 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, DepParameterExpr)); break; } // // Rule 507: ObjectKind ::= value // case 507: throw new Error("No action specified for rule " + 507); // // Rule 508: ObjectKind ::= reference // case 508: throw new Error("No action specified for rule " + 508); // // Rule 509: MethodModifier ::= atomic // case 509: { //#line 1334 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.ATOMIC); break; } // // Rule 510: MethodModifier ::= extern // case 510: { //#line 1339 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Flags.NATIVE); break; } // // Rule 511: MethodModifier ::= safe // case 511: { //#line 1344 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 512: MethodModifier ::= sequential // case 512: { //#line 1349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SEQUENTIAL); break; } // // Rule 513: MethodModifier ::= local // case 513: { //#line 1354 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.LOCAL); break; } // // Rule 514: MethodModifier ::= nonblocking // case 514: { //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.NON_BLOCKING); break; } // // Rule 516: ValueClassDeclaration ::= X10ClassModifiersopt value identifier PropertyListopt Superopt Interfacesopt ClassBody // case 516: { //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 1367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 517: ValueClassDeclaration ::= X10ClassModifiersopt value class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 517: { //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(5); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(6); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(7); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(8); //#line 1377 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 518: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 518: { //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags ConstructorModifiersopt = (Flags) getRhsSym(1); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] ConstructorDeclarator = (Object[]) getRhsSym(2); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(3); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block ConstructorBody = (Block) getRhsSym(4); //#line 1388 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name a = (Name) ConstructorDeclarator[1]; DepParameterExpr c = (DepParameterExpr) ConstructorDeclarator[2]; List b = (List) ConstructorDeclarator[3]; Expr e = (Expr) ConstructorDeclarator[4]; setResult(nf.ConstructorDecl(pos(), ConstructorModifiersopt, a.toString(), c, b, e, Throwsopt, ConstructorBody)); break; } // // Rule 519: ConstructorDeclarator ::= SimpleTypeName DepParametersopt ( FormalParameterListopt WhereClauseopt ) // case 519: { //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name SimpleTypeName = (Name) getRhsSym(1); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(4); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(5); //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] a = new Object[5]; a[1] = SimpleTypeName; a[2] = DepParametersopt; a[3] = FormalParameterListopt; a[4] = WhereClauseopt; setResult(a); break; } // // Rule 520: ThisClause ::= this DepParameters // case 520: { //#line 1406 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameters = (DepParameterExpr) getRhsSym(2); //#line 1408 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParameters); break; } // // Rule 521: Super ::= extends DataType // case 521: { //#line 1412 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(2); //#line 1414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 522: MethodDeclarator ::= identifier ( FormalParameterListopt WhereClauseopt ) // case 522: { //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(3); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(4); //#line 1420 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parsing methoddeclarator..."); Object[] a = new Object[5]; a[0] = new Name(nf, ts, pos(), identifier.getIdentifier()); a[1] = FormalParameterListopt; a[2] = new Integer(0); a[3] = WhereClauseopt; setResult(a); break; } // // Rule 523: MethodDeclarator ::= MethodDeclarator [ ] // case 523: { //#line 1430 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(1); //#line 1432 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" MethodDeclarator[2] = new Integer(((Integer) MethodDeclarator[2]).intValue() + 1); // setResult(MethodDeclarator); break; } // // Rule 524: FieldDeclaration ::= ThisClauseopt FieldModifiersopt Type VariableDeclarators ; // case 524: { //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags FieldModifiersopt = (Flags) getRhsSym(2); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List VariableDeclarators = (List) getRhsSym(4); //#line 1440 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), ClassMember.class, false); if (VariableDeclarators != null && VariableDeclarators.size() > 0) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(FieldModifiersopt); l.add(nf.FieldDecl(d.position(), ThisClauseopt, d.flags, nf.array(Type, Type.position(), d.dims), d.name, d.init)); } } setResult(l); break; } // // Rule 525: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt Dims ArrayInitializer // case 525: { //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(4); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ArrayInit ArrayInitializer = (ArrayInit) getRhsSym(5); //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Dims.intValue(), ArrayInitializer)); break; } // // Rule 526: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr Dims // case 526: { //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(5); //#line 1482 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Collections.singletonList(DimExpr), Dims.intValue())); break; } // // Rule 527: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr DimExprs Dimsopt // case 527: { //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List DimExprs = (List) getRhsSym(5); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dimsopt = (Integer) getRhsSym(6); //#line 1488 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); l.addAll(DimExprs); setResult(nf.NewArray(pos(), ArrayBaseType, l, Dimsopt.intValue())); break; } // // Rule 528: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] // case 528: { //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1497 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, null)); break; } // // Rule 529: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression$distr ] Expression$initializer // case 529: { //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr distr = (Expr) getRhsSym(6); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr initializer = (Expr) getRhsSym(8); //#line 1502 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, distr, initializer)); break; } // // Rule 530: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] ($lparen FormalParameter ) MethodBody // case 530: { //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken lparen = (IToken) getRhsIToken(8); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(9); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(11); //#line 1507 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr initializer = makeInitializer( pos(getRhsFirstTokenIndex(8), getRightSpan()), ArrayBaseType, FormalParameter, MethodBody ); setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, initializer)); break; } // // Rule 531: Valueopt ::= $Empty // case 531: setResult(null); break; // // Rule 532: Valueopt ::= value // case 532: { //#line 1516 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 535: ArrayBaseType ::= nullable < Type > // case 535: { //#line 1523 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1525 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Nullable(pos(), Type)); break; } // // Rule 536: ArrayBaseType ::= future < Type > // case 536: { //#line 1528 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1530 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 537: ArrayBaseType ::= ( Type ) // case 537: { //#line 1533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1535 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Type); break; } // // Rule 538: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 538: { //#line 1539 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1539 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1541 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), ExpressionName.toExpr(), (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), ExpressionName.toExpr(), ArgumentList)); break; } // // Rule 539: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 539: { //#line 1546 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PrimaryNoNewArray = (Expr) getRhsSym(1); //#line 1546 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1548 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), PrimaryNoNewArray, (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), PrimaryNoNewArray, ArgumentList)); break; } // // Rule 556: NowStatement ::= now ( Clock ) Statement // case 556: { //#line 1574 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1574 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1576 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, Statement)); break; } // // Rule 557: ClockedClause ::= clocked ( ClockList ) // case 557: { //#line 1580 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(3); //#line 1582 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ClockList); break; } // // Rule 558: AsyncStatement ::= async PlaceExpressionSingleListopt ClockedClauseopt Statement // case 558: { //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(4); //#line 1588 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, Statement)); break; } // // Rule 559: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 559: { //#line 1596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(3); //#line 1598 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Statement)); break; } // // Rule 560: WhenStatement ::= when ( Expression ) Statement // case 560: { //#line 1605 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1605 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1607 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, Statement)); break; } // // Rule 561: WhenStatement ::= WhenStatement or$or ( Expression ) Statement // case 561: { //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(6); //#line 1612 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, Statement); setResult(WhenStatement); break; } // // Rule 562: ForEachStatement ::= foreach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 562: { //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1619 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 563: AtEachStatement ::= ateach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 563: { //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1629 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 564: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 564: { //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(7); //#line 1639 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, Statement)); break; } // // Rule 565: FinishStatement ::= finish Statement // case 565: { //#line 1646 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(2); //#line 1648 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), Statement)); break; } // // Rule 566: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 566: { //#line 1653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1655 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, StatementNoShortIf)); break; } // // Rule 567: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt ClockedClauseopt StatementNoShortIf // case 567: { //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(4); //#line 1661 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 568: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 568: { //#line 1668 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1670 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), nf.Here(pos(getLeftSpan())), StatementNoShortIf)); break; } // // Rule 569: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 569: { //#line 1674 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1674 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1676 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, StatementNoShortIf)); break; } // // Rule 570: WhenStatementNoShortIf ::= WhenStatement or$or ( Expression ) StatementNoShortIf // case 570: { //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(6); //#line 1681 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, StatementNoShortIf); setResult(WhenStatement); break; } // // Rule 571: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 571: { //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1688 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 572: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 572: { //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1699 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 573: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 573: { //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(7); //#line 1709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, StatementNoShortIf)); break; } // // Rule 574: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 574: { //#line 1716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1718 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), StatementNoShortIf)); break; } // // Rule 575: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 575: { //#line 1723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpression = (Expr) getRhsSym(2); //#line 1725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(PlaceExpression); break; } // // Rule 577: NextStatement ::= next ; // case 577: { //#line 1733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Next(pos())); break; } // // Rule 578: AwaitStatement ::= await Expression ; // case 578: { //#line 1737 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(2); //#line 1739 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Await(pos(), Expression)); break; } // // Rule 579: ClockList ::= Clock // case 579: { //#line 1743 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(1); //#line 1745 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Clock); setResult(l); break; } // // Rule 580: ClockList ::= ClockList , Clock // case 580: { //#line 1750 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(1); //#line 1750 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1752 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClockList.add(Clock); setResult(ClockList); break; } // // Rule 581: Clock ::= Expression // case 581: { //#line 1758 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(1); //#line 1760 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Expression); break; } // // Rule 582: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 582: { //#line 1770 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1770 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(4); //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Cast(pos(), Type, UnaryExpressionNotPlusMinus)); break; } // // Rule 583: CastExpression ::= ( @ Expression ) UnaryExpressionNotPlusMinus // case 583: { //#line 1775 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1775 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(5); //#line 1777 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.PlaceCast(pos(), Expression, UnaryExpressionNotPlusMinus)); break; } // // Rule 584: RelationalExpression ::= RelationalExpression instanceof Type // case 584: { //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1789 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Instanceof(pos(), RelationalExpression, Type)); break; } // // Rule 585: IdentifierList ::= identifier // case 585: { //#line 1795 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1797 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(l); break; } // // Rule 586: IdentifierList ::= IdentifierList , identifier // case 586: { //#line 1802 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List IdentifierList = (List) getRhsSym(1); //#line 1802 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1804 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IdentifierList.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(IdentifierList); break; } // // Rule 587: Primary ::= here // case 587: { //#line 1811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(((X10NodeFactory) nf).Here(pos()));//// A "here" expression used to be treated as an ExpressionName instead// of as a primary.//// setResult(new Name(nf, ts, pos(), "here"){// public Expr toExpr() {// return ((X10NodeFactory) nf).Here(pos);// }// }); break; } // // Rule 590: RegionExpression ::= Expression$expr1 : Expression$expr2 // case 590: { //#line 1827 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1827 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1829 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" /*Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(expr1); l.add(expr2); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); */ Call regionCall = nf.RegionMaker(pos(), expr1, expr2); setResult(regionCall); break; } // // Rule 591: RegionExpressionList ::= RegionExpression // case 591: { //#line 1845 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(1); //#line 1847 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(RegionExpression); setResult(l); break; } // // Rule 592: RegionExpressionList ::= RegionExpressionList , RegionExpression // case 592: { //#line 1852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(1); //#line 1852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(3); //#line 1854 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" RegionExpressionList.add(RegionExpression); //setResult(RegionExpressionList); break; } // // Rule 593: Primary ::= [ RegionExpressionList ] // case 593: { //#line 1859 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(2); //#line 1861 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, RegionExpressionList); setResult(tuple); break; } // // Rule 594: AssignmentExpression ::= Expression$expr1 -> Expression$expr2 // case 594: { //#line 1875 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1875 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1877 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ConstantDistMaker call = nf.ConstantDistMaker(pos(), expr1, expr2); setResult(call); break; } // // Rule 595: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 595: { //#line 1882 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1882 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Expression)); break; } // // Rule 596: FieldModifier ::= mutable // case 596: { //#line 1892 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.MUTABLE); break; } // // Rule 597: FieldModifier ::= const // case 597: { //#line 1897 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 598: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 598: throw new Error("No action specified for rule " + 598); // // Rule 599: MethodInvocation ::= MethodName ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 599: throw new Error("No action specified for rule " + 599); // // Rule 600: MethodInvocation ::= Primary . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 600: throw new Error("No action specified for rule " + 600); // // Rule 601: MethodInvocation ::= super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 601: throw new Error("No action specified for rule " + 601); // // Rule 602: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 602: throw new Error("No action specified for rule " + 602); // // Rule 603: MethodInvocation ::= TypeName . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 603: throw new Error("No action specified for rule " + 603); // // Rule 604: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 604: throw new Error("No action specified for rule " + 604); // // Rule 605: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 605: throw new Error("No action specified for rule " + 605); // // Rule 606: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 606: throw new Error("No action specified for rule " + 606); // // Rule 607: MethodModifier ::= synchronized // case 607: { //#line 1928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "\"synchronized\" is an invalid X10 Method Modifier", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(Flags.SYNCHRONIZED); break; } // // Rule 608: FieldModifier ::= volatile // case 608: { //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "\"volatile\" is an invalid X10 Field Modifier", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(Flags.VOLATILE); break; } // // Rule 609: SynchronizedStatement ::= synchronized ( Expression ) Block // case 609: { //#line 1944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block Block = (Block) getRhsSym(5); //#line 1946 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "Synchronized Statement is invalid in X10", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(nf.Synchronized(pos(), Expression, Block)); break; } // // Rule 610: ThisClauseopt ::= $Empty // case 610: setResult(null); break; // // Rule 612: PlaceTypeSpecifieropt ::= $Empty // case 612: setResult(null); break; // // Rule 614: DepParametersopt ::= $Empty // case 614: setResult(null); break; // // Rule 616: PropertyListopt ::= $Empty // case 616: setResult(null); break; // // Rule 618: WhereClauseopt ::= $Empty // case 618: setResult(null); break; // // Rule 620: ObjectKindopt ::= $Empty // case 620: setResult(null); break; // // Rule 622: ArrayInitializeropt ::= $Empty // case 622: setResult(null); break; // // Rule 624: PlaceExpressionSingleListopt ::= $Empty // case 624: setResult(null); break; // // Rule 626: ArgumentListopt ::= $Empty // case 626: setResult(null); break; // // Rule 628: X10ClassModifiersopt ::= $Empty // case 628: { //#line 1992 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(Flags.NONE)); break; } // // Rule 630: DepParametersopt ::= $Empty // case 630: setResult(null); break; // // Rule 632: Unsafeopt ::= $Empty // case 632: setResult(null); break; // // Rule 633: Unsafeopt ::= unsafe // case 633: { //#line 2004 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 634: ParamIdopt ::= $Empty // case 634: setResult(null); break; // // Rule 635: ParamIdopt ::= identifier // case 635: { //#line 2011 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2013 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 636: ClockedClauseopt ::= $Empty // case 636: { //#line 2019 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(new TypedList(new LinkedList(), Expr.class, false)); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/f8e1720cd66996a6339b992bf154aa0d019240a3/X10Parser.java/clean/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | ||
String supplyType = pg.getSupplyType(); | String supplyType = pg.getSupplyType(); | public static String getUnitForAsset(Asset invAsset) { SupplyClassPG pg = (SupplyClassPG)invAsset.searchForPropertyGroup(SupplyClassPG.class); String supplyType = pg.getSupplyType(); if(supplyType.equals(SUBSISTENCE_SUPPLY_TYPE)) { return SUBSISTENCE_UNIT; } else if(supplyType.equals(BULK_POL_SUPPLY_TYPE)) { return BULK_POL_UNIT; } else if(supplyType.equals(PACKAGED_POL_SUPPLY_TYPE)) { return PACKAGED_POL_UNIT; } else if(supplyType.equals(AMMUNITION_SUPPLY_TYPE)) { return AMMUNITION_UNIT; } else if(supplyType.equals(CONSUMABLE_SUPPLY_TYPE)) { return CONSUMABLE_UNIT; } return "UNKNOWN UNIT"; } | 11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/3c5da4a17db473b8f1094089e88e37b446b21e3b/LogisticsInventoryFormatter.java/buggy/bbn/src/org/cougaar/logistics/plugin/inventory/LogisticsInventoryFormatter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
19194,
1290,
6672,
12,
6672,
2198,
6672,
13,
288,
202,
3088,
1283,
797,
18679,
7184,
273,
261,
3088,
1283,
797,
18679,
13,
5768,
6672,
18,
3072,
1290,
1396,
1114,
12,
3088... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
19194,
1290,
6672,
12,
6672,
2198,
6672,
13,
288,
202,
3088,
1283,
797,
18679,
7184,
273,
261,
3088,
1283,
797,
18679,
13,
5768,
6672,
18,
3072,
1290,
1396,
1114,
12,
3088... |
final DimensionCalc dimensionCalc = compiler.compileDimension(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {dimensionCalc}) { | final MemberCalc memberCalc = compiler.compileMember(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {memberCalc}) { | public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) { final DimensionCalc dimensionCalc = compiler.compileDimension(call.getArg(0)); return new AbstractStringCalc(call, new Calc[] {dimensionCalc}) { public String evaluateString(Evaluator evaluator) { final Dimension dimension = dimensionCalc.evaluateDimension(evaluator); return dimension.getName(); } }; } | 4891 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4891/759b141925c76c1aa0aaf89d93dc38bfe19d7c5a/BuiltinFunTable.java/clean/src/main/mondrian/olap/fun/BuiltinFunTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
29128,
4074,
1477,
12,
12793,
22783,
1477,
745,
16,
7784,
9213,
5274,
13,
288,
7734,
727,
13037,
25779,
4968,
25779,
273,
13491,
5274,
18,
11100,
8611,
12,
1991,
18,
588,
4117,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
29128,
4074,
1477,
12,
12793,
22783,
1477,
745,
16,
7784,
9213,
5274,
13,
288,
7734,
727,
13037,
25779,
4968,
25779,
273,
13491,
5274,
18,
11100,
8611,
12,
1991,
18,
588,
4117,
12,
... |
logProbability -= curState.getProbability(); | private SearchStateArc createNextWordState(LexTreeState curState, LexTree.WordLexNode nextWord) { WordSequence wordSequence = curState.getWordSequence(); float logProbability = logOne; if (!nextWord.isSilence()) { wordSequence = wordSequence.addWord (nextWord.getPronunciation().getWord(), languageModel.getMaxDepth()); logProbability = languageModel.getProbability(wordSequence); // remove the probability encountered so far logProbability -= curState.getProbability(); if (false) { System.out.println(wordSequence + " " + logProbability); } } // The left unit of a word state doesn't matter to the world, // so we can reduce the number of word states (especially for // one unit words) by eliminating the lef it (by setting it to // 0). LexTree.UnitLexNode right = maintainSeparateRightContextsForWords ? curState.getRight() : null; return new LexTreeWordState(0, curState.getCentral(), right, wordSequence.trim(languageModel.getMaxDepth() - 1), nextWord, logProbability); } | 47105 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47105/12665f28fef69d23bc1e1366e494499ca406a5ba/LexTreeLinguist.java/clean/sphinx4/edu/cmu/sphinx/decoder/linguist/lextree/LexTreeLinguist.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5167,
1119,
14598,
752,
2134,
3944,
1119,
12,
14756,
2471,
1119,
5411,
662,
1119,
16,
15123,
2471,
18,
3944,
14756,
907,
1024,
3944,
13,
288,
3639,
9926,
4021,
2076,
4021,
273,
662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
5167,
1119,
14598,
752,
2134,
3944,
1119,
12,
14756,
2471,
1119,
5411,
662,
1119,
16,
15123,
2471,
18,
3944,
14756,
907,
1024,
3944,
13,
288,
3639,
9926,
4021,
2076,
4021,
273,
662,
... | |
+ Integer.toHexString(tds.peek()&0xff)); | + Integer.toHexString(actTds.peek()&0xff)); | public java.sql.ResultSet getResultSet() throws SQLException { try { if (tds == null) { throw new SQLException("Statement is closed"); } closeResults(); if (tds.peek()==TdsDefinitions.TDS_DONEINPROC) { PacketResult tmp = tds.processSubPacket(); } if (tds.isResultSet()) // JJ 1999-01-09 used be: ;getMoreResults()) { startResultSet(); } else if (updateCount!=-1) { if (! tds.isEndOfResults()) { // XXX throw new SQLException("Internal error. "+ " expected EndOfResults, found 0x" + Integer.toHexString(tds.peek()&0xff)); } PacketEndTokenResult end = (PacketEndTokenResult) tds.processSubPacket(); updateCount = end.getRowCount(); results = null; } else { // We didn't have more data and we didn't have an update count, // now what? throw new SQLException("Internal error. Confused"); } } catch(java.io.IOException e) { throw new SQLException(e.getMessage()); } catch(TdsException e) { throw new SQLException(e.getMessage()); } return results; } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/ba5b8f497b6d03c346efa441c78b79f7041f00ff/TdsStatement.java/clean/src.old/main/com/internetcds/jdbc/tds/TdsStatement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
2252,
18,
4669,
18,
13198,
8601,
694,
1435,
1216,
6483,
282,
288,
1377,
775,
1377,
288,
540,
309,
261,
88,
2377,
422,
446,
13,
540,
288,
5411,
604,
394,
6483,
2932,
3406,
353,
437... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
2252,
18,
4669,
18,
13198,
8601,
694,
1435,
1216,
6483,
282,
288,
1377,
775,
1377,
288,
540,
309,
261,
88,
2377,
422,
446,
13,
540,
288,
5411,
604,
394,
6483,
2932,
3406,
353,
437... |
public NameNode() throws IOException { this(new File(NutchConf.get().get("ndfs.name.dir", | public NameNode(NutchConf nutchConf) throws IOException { this(new File(nutchConf.get("ndfs.name.dir", | public NameNode() throws IOException { this(new File(NutchConf.get().get("ndfs.name.dir", "/tmp/nutch/ndfs/name")), DataNode.createSocketAddr (NutchConf.get().get("fs.default.name", "local")).getPort()); } | 1316 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1316/329ff64e9d7295aff108f85e9a8103f5e5f8f398/NameNode.java/buggy/src/java/org/apache/nutch/ndfs/NameNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1770,
907,
1435,
1216,
1860,
288,
3639,
333,
12,
2704,
1387,
12,
50,
322,
343,
3976,
18,
588,
7675,
588,
2932,
82,
12381,
18,
529,
18,
1214,
3113,
4766,
1850,
2206,
5645,
19,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1770,
907,
1435,
1216,
1860,
288,
3639,
333,
12,
2704,
1387,
12,
50,
322,
343,
3976,
18,
588,
7675,
588,
2932,
82,
12381,
18,
529,
18,
1214,
3113,
4766,
1850,
2206,
5645,
19,
82,
... |
public org.quickfix.field.WaveNo getWaveNo() throws FieldNotFound { org.quickfix.field.WaveNo value = new org.quickfix.field.WaveNo(); | public quickfix.field.WaveNo getWaveNo() throws FieldNotFound { quickfix.field.WaveNo value = new quickfix.field.WaveNo(); | public org.quickfix.field.WaveNo getWaveNo() throws FieldNotFound { org.quickfix.field.WaveNo value = new org.quickfix.field.WaveNo(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/ListStatusRequest.java/buggy/src/java/src/quickfix/fix40/ListStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
22368,
2279,
13876,
836,
2279,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
22368,
2279,
460,
273,
394,
2358,
18,
19525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
22368,
2279,
13876,
836,
2279,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
22368,
2279,
460,
273,
394,
2358,
18,
19525,... |
this.informationmemory = new InformationMemory(administrator, caadminsession, raadminsession, authorizationsession, signsession, certificatestoresession, hardtokensession, publishersession, globalconfiguration); | this.informationmemory = new InformationMemory(administrator, caadminsession, raadminsession, authorizationsession, certificatestoresession, hardtokensession, publishersession, globalconfiguration); | private void commonInit() throws Exception { ServiceLocator locator = ServiceLocator.getInstance(); ISignSessionLocalHome signsessionhome = (ISignSessionLocalHome) locator.getLocalHome(ISignSessionLocalHome.COMP_NAME); ISignSessionLocal signsession = signsessionhome.create(); IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) locator.getLocalHome(IRaAdminSessionLocalHome.COMP_NAME); IRaAdminSessionLocal raadminsession = raadminsessionhome.create(); ILogSessionLocalHome logsessionhome = (ILogSessionLocalHome) locator.getLocalHome(ILogSessionLocalHome.COMP_NAME); logsession = logsessionhome.create(); ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) locator.getLocalHome(ICAAdminSessionLocalHome.COMP_NAME); ICAAdminSessionLocal caadminsession = caadminsessionhome.create(); ICertificateStoreSessionLocalHome certificatestoresessionhome = (ICertificateStoreSessionLocalHome) locator.getLocalHome(ICertificateStoreSessionLocalHome.COMP_NAME); ICertificateStoreSessionLocal certificatestoresession = certificatestoresessionhome.create(); IAuthorizationSessionLocalHome authorizationsessionhome = (IAuthorizationSessionLocalHome) locator.getLocalHome(IAuthorizationSessionLocalHome.COMP_NAME); IAuthorizationSessionLocal authorizationsession = authorizationsessionhome.create(); IHardTokenSessionLocalHome hardtokensessionhome = (IHardTokenSessionLocalHome) locator.getLocalHome(IHardTokenSessionLocalHome.COMP_NAME); IHardTokenSessionLocal hardtokensession = hardtokensessionhome.create(); IPublisherSessionLocalHome publishersessionhome = (IPublisherSessionLocalHome) locator.getLocalHome(IPublisherSessionLocalHome.COMP_NAME); IPublisherSessionLocal publishersession = publishersessionhome.create(); globaldataconfigurationdatahandler = new GlobalConfigurationDataHandler(administrator, raadminsession, authorizationsession); globalconfiguration = this.globaldataconfigurationdatahandler.loadGlobalConfiguration(); this.informationmemory = new InformationMemory(administrator, caadminsession, raadminsession, authorizationsession, signsession, certificatestoresession, hardtokensession, publishersession, globalconfiguration); authorizedatahandler = new AuthorizationDataHandler(administrator, informationmemory, authorizationsession); } | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/7252922d8cb9bfc101faf67e3ecd4ab689b85a9e/EjbcaWebBean.java/buggy/src/java/se/anatom/ejbca/webdist/webconfiguration/EjbcaWebBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2975,
2570,
1435,
1216,
1185,
288,
3639,
21443,
8871,
273,
21443,
18,
588,
1442,
5621,
3639,
467,
2766,
2157,
2042,
8684,
1573,
3184,
8712,
273,
261,
45,
2766,
2157,
2042,
8684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2975,
2570,
1435,
1216,
1185,
288,
3639,
21443,
8871,
273,
21443,
18,
588,
1442,
5621,
3639,
467,
2766,
2157,
2042,
8684,
1573,
3184,
8712,
273,
261,
45,
2766,
2157,
2042,
8684,
... |
public ActionForward editEvaluationMethod(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException { HttpSession session = request.getSession(false); Integer objectCode = getObjectCode(request); Integer evaluationMethodCode = getParameter(request, "evaluationMethodCode"); DynaActionForm evaluationForm = (DynaActionForm) form; InfoEvaluationMethod infoEvaluationMethod = new InfoEvaluationMethod(); infoEvaluationMethod.setIdInternal(evaluationMethodCode); infoEvaluationMethod.setEvaluationElements((String) evaluationForm.get("evaluationElements")); infoEvaluationMethod .setEvaluationElementsEn((String) evaluationForm.get("evaluationElementsEn")); Object args[] = { objectCode, evaluationMethodCode, infoEvaluationMethod }; UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW); try { ServiceManagerServiceFactory.executeService(userView, "EditEvaluation", args); } catch (FenixServiceException e) { throw new FenixActionException(e); } return viewEvaluationMethod(mapping, form, request, response); // BEFORE // HttpSession session = request.getSession(false); // Integer objectCode = getObjectCode(request); // String curricularCourseCodeString = // request.getParameter("curricularCourseCode"); // Integer curricularCourseCode = new // Integer(curricularCourseCodeString); // // DynaActionForm evaluationForm = (DynaActionForm) form; // // InfoCurriculum infoCurriculumNew = new InfoCurriculum(); // infoCurriculumNew.setIdInternal(curricularCourseCode); // infoCurriculumNew.setEvaluationElements((String) // evaluationForm.get("evaluationElements")); // infoCurriculumNew.setEvaluationElementsEn((String) // evaluationForm.get("evaluationElementsEn")); // // Object args[] = { objectCode, curricularCourseCode, // infoCurriculumNew }; // // UserView userView = (UserView) // session.getAttribute(SessionConstants.U_VIEW); // GestorServicos serviceManager = GestorServicos.manager(); // try { // ServiceManagerServiceFactory.executeService(userView, // "EditEvaluation", args); // // } catch (FenixServiceException e) { // throw new FenixActionException(e); // } // return viewEvaluationMethod(mapping, form, request, response); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/f1790994e90150a41f878ae3110bab38ce01b720/TeacherAdministrationViewerDispatchAction.java/clean/src/net/sourceforge/fenixedu/presentationTier/Action/teacher/TeacherAdministrationViewerDispatchAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
3874,
13468,
1305,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
1216,
478,
275,
697,
1803,
503,
16,
5411,
478,
275,
697,
1586,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
3874,
13468,
1305,
12,
1803,
3233,
2874,
16,
4382,
1204,
646,
16,
5411,
9984,
590,
16,
12446,
766,
13,
1216,
478,
275,
697,
1803,
503,
16,
5411,
478,
275,
697,
1586,
5... | ||
Column(Table table, MondrianDef.Expression expression, | Column(Table table, MondrianDef.Expression expression, | Column(Table table, MondrianDef.Expression expression, boolean isNumeric) { this.table = table; this.expression = expression; this.isNumeric = isNumeric; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/07361d134494edaf7e47eaedb40351c66d2a28b0/RolapStar.java/buggy/src/main/mondrian/rolap/RolapStar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4753,
12,
1388,
1014,
16,
7734,
490,
1434,
566,
304,
3262,
18,
2300,
2652,
16,
7734,
1250,
26434,
13,
288,
5411,
333,
18,
2121,
273,
1014,
31,
5411,
333,
18,
8692,
273,
2652,
31,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4753,
12,
1388,
1014,
16,
7734,
490,
1434,
566,
304,
3262,
18,
2300,
2652,
16,
7734,
1250,
26434,
13,
288,
5411,
333,
18,
2121,
273,
1014,
31,
5411,
333,
18,
8692,
273,
2652,
31,
5411,
... |
return downloadTask(url, taskIntegrator, len); | return downloadTask(url, null, len); | protected static String downloadPatch(String url, ITaskIntegrator taskIntegrator, String contentLength) throws IOException { try { long len = -1; try { len = Long.parseLong(contentLength); } catch (NullPointerException npe) { // ignore } catch (NumberFormatException nfe) { // ignore } return downloadTask(url, taskIntegrator, len); } catch (IOException ioe) { if (ioe.getCause() != null) ioe = (IOException)ioe.getCause(); throw new IOException(ioe.toString() + " while downloading " + url); } } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/0a5905d1e16953ac0266e03dc507eb5c39d03194/GenePatternAnalysisTask.java/buggy/src/org/genepattern/server/genepattern/GenePatternAnalysisTask.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
514,
4224,
7332,
12,
780,
880,
16,
467,
2174,
11476,
639,
1562,
11476,
639,
16,
514,
17117,
13,
1216,
1860,
288,
202,
202,
698,
288,
1082,
202,
5748,
562,
273,
300,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
760,
514,
4224,
7332,
12,
780,
880,
16,
467,
2174,
11476,
639,
1562,
11476,
639,
16,
514,
17117,
13,
1216,
1860,
288,
202,
202,
698,
288,
1082,
202,
5748,
562,
273,
300,
21,
... |
runOperatorTest(); } | runOperatorTest(); } | public void testDividesLeftSubexpressionByRightSubexpression() throws Exception { runOperatorTest(); } | 2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/a917aff361c58c31c5dce12a5e8052df6803dbe1/DivisionTest.java/buggy/jmock/examples/calculator/src/test/jmock/examples/calculator/expression/DivisionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
7244,
4369,
3910,
1676,
8692,
858,
4726,
1676,
8692,
1435,
1216,
1185,
288,
202,
202,
2681,
5592,
4709,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
7244,
4369,
3910,
1676,
8692,
858,
4726,
1676,
8692,
1435,
1216,
1185,
288,
202,
202,
2681,
5592,
4709,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public synchronized void setRemoteSettings( RemoteSettings remote ) | public synchronized void setRemoteSettings( RemoteSettings newSettings ) | public synchronized void setRemoteSettings( RemoteSettings remote ) throws NetworkException { /* XXXXXXXXX Implement me */ NetworkUtilPriv nup = NetworkUtilPriv.getPrivInstance(); String pa = nup.getPublicAddress( this.networkSettings, remote, this.ddnsSettings ); this.remote = new RemoteInternalSettings( remote, pa ); if ( logger.isDebugEnabled()) logger.debug( "Loaded remote settings: " + this.remote ); callRemoteListeners(); } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/bfa06245f14532c14cc907ac81911f02de9e264f/NetworkManagerImpl.java/buggy/mvvm/main/com/metavize/mvvm/networking/NetworkManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
444,
5169,
2628,
12,
6304,
2628,
394,
2628,
262,
3639,
1216,
5128,
503,
565,
288,
3639,
1748,
11329,
24303,
5619,
10886,
1791,
1195,
3639,
5128,
1304,
15475,
290,
416,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
444,
5169,
2628,
12,
6304,
2628,
394,
2628,
262,
3639,
1216,
5128,
503,
565,
288,
3639,
1748,
11329,
24303,
5619,
10886,
1791,
1195,
3639,
5128,
1304,
15475,
290,
416,
273,... |
}else if(sample<0 || sample>=sample3D.length){ return; }else{ | } else if (sample < 0 || sample >= sample3D.length) { return; } else { | public static void setSamplePosition(int sample, float x, float y, float z){ if(sample3D==null){ return; }else if(sample<0 || sample>=sample3D.length){ return; }else{ sample3D[sample].setPosition(x, y, z); } } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/6aaba14bb39fd6af9aea6f599180d9ac7dbd923d/SoundSystem.java/buggy/src/com/jmex/sound/fmod/SoundSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
444,
8504,
2555,
12,
474,
3296,
16,
1431,
619,
16,
1431,
677,
16,
1431,
998,
15329,
3639,
309,
12,
6358,
23,
40,
631,
2011,
15329,
5411,
327,
31,
3639,
289,
12107,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
444,
8504,
2555,
12,
474,
3296,
16,
1431,
619,
16,
1431,
677,
16,
1431,
998,
15329,
3639,
309,
12,
6358,
23,
40,
631,
2011,
15329,
5411,
327,
31,
3639,
289,
12107,
309,
... |
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER) { System.out.println("Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassOrInterfaceType ::= ClassType // case 15: break; // // Rule 16: ClassType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: InterfaceType ::= TypeName // case 17: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 18: TypeName ::= identifier // case 18: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 19: TypeName ::= TypeName DOT identifier // case 19: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 20: ClassName ::= TypeName // case 20: break; // // Rule 21: TypeVariable ::= identifier // case 21: break; // // Rule 22: ArrayType ::= Type LBRACKET RBRACKET // case 22: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(array(a, pos(), 1)); break; } // // Rule 23: TypeParameter ::= TypeVariable TypeBoundopt // case 23: bad_rule = 23; break; // // Rule 24: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 26: bad_rule = 26; break; // // Rule 27: AdditionalBound ::= AND InterfaceType // case 27: bad_rule = 27; break; // // Rule 28: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 30: bad_rule = 30; break; // // Rule 31: Wildcard ::= QUESTION WildcardBoundsOpt // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= extends ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: WildcardBounds ::= super ReferenceType // case 33: bad_rule = 33; break; // // Rule 34: PackageName ::= identifier // case 34: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 35: PackageName ::= PackageName DOT identifier // case 35: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 36: ExpressionName ::= identifier // case 36: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 37: ExpressionName ::= AmbiguousName DOT identifier // case 37: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 38: MethodName ::= identifier // case 38: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 39: MethodName ::= AmbiguousName DOT identifier // case 39: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= identifier // case 40: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 41: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 41: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= identifier // case 42: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 43: AmbiguousName ::= AmbiguousName DOT identifier // case 43: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 44: CompilationUnit ::= Commentsopt PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 44: { Object comment = btParser.getSym(1); PackageNode a = (PackageNode) btParser.getSym(2); List b = (List) btParser.getSym(3), c = (List) btParser.getSym(4); Node n = nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c); if (comment != null) { n.setComment(comment.toString()); } btParser.setSym1(n); break; } // // Rule 45: Comments ::= Comment // case 45: { Object comment = comment(btParser.getToken(1)); btParser.setSym1(comment); break; } // // Rule 46: Comments ::= Comments Comment // case 46: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 47: ImportDeclarations ::= ImportDeclaration // case 47: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 48: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 48: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 49: TypeDeclarations ::= Commentsopt TypeDeclaration // case 49: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(2); if (a != null) l.add(a); if (comment != null) { a.setComment(comment.toString()); } btParser.setSym1(l); break; } // // Rule 50: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 50: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 51: PackageDeclaration ::= package PackageName SEMICOLON // case 51: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 52: ImportDeclaration ::= SingleTypeImportDeclaration // case 52: break; // // Rule 53: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 53: break; // // Rule 54: ImportDeclaration ::= SingleStaticImportDeclaration // case 54: break; // // Rule 55: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 55: break; // // Rule 56: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 56: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 57: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 57: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 58: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 58: bad_rule = 58; break; // // Rule 59: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 59: bad_rule = 59; break; // // Rule 60: TypeDeclaration ::= ClassDeclaration // case 60: break; // // Rule 61: TypeDeclaration ::= InterfaceDeclaration // case 61: break; // // Rule 62: TypeDeclaration ::= SEMICOLON // case 62: { btParser.setSym1(null); break; } // // Rule 63: ClassDeclaration ::= NormalClassDeclaration // case 63: break; // // Rule 64: NormalClassDeclaration ::= Commentsopt ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 64: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(5); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); Node n = a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e); if (comment != null) n.setComment(comment.toString()); btParser.setSym1(n); break; } // // Rule 65: ClassModifiers ::= ClassModifier // case 65: break; // // Rule 66: ClassModifiers ::= ClassModifiers ClassModifier // case 66: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 67: ClassModifier ::= public // case 67: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 68: ClassModifier ::= protected // case 68: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 69: ClassModifier ::= private // case 69: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 70: ClassModifier ::= abstract // case 70: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 71: ClassModifier ::= static // case 71: { btParser.setSym1(Flags.STATIC); break; } // // Rule 72: ClassModifier ::= final // case 72: { btParser.setSym1(Flags.FINAL); break; } // // Rule 73: ClassModifier ::= strictfp // case 73: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 74: TypeParameters ::= LESS TypeParameterList GREATER // case 74: bad_rule = 74; break; // // Rule 75: TypeParameterList ::= TypeParameter // case 75: bad_rule = 75; break; // // Rule 76: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 76: bad_rule = 76; break; // // Rule 77: Super ::= extends ClassType // case 77: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 78: Interfaces ::= implements InterfaceTypeList // case 78: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 79: InterfaceTypeList ::= InterfaceType // case 79: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 80: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 80: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 81: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 81: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 82: ClassBodyDeclarations ::= ClassBodyDeclaration // case 82: break; // // Rule 83: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 83: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 84: ClassBodyDeclaration ::= ClassMemberDeclaration // case 84: break; // // Rule 85: ClassBodyDeclaration ::= InstanceInitializer // case 85: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 86: ClassBodyDeclaration ::= StaticInitializer // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 87: ClassBodyDeclaration ::= ConstructorDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= FieldDeclaration // case 88: break; // // Rule 89: ClassMemberDeclaration ::= MethodDeclaration // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 90: ClassMemberDeclaration ::= ClassDeclaration // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 91: ClassMemberDeclaration ::= InterfaceDeclaration // case 91: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: ClassMemberDeclaration ::= SEMICOLON // case 92: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 93: FieldDeclaration ::= Commentsopt FieldModifiersopt Type VariableDeclarators SEMICOLON // case 93: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(2); TypeNode b = (TypeNode) btParser.getSym(3); List c = (List) btParser.getSym(4); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } if (comment != null) ((Node) l.get(0)).setComment(comment.toString()); btParser.setSym1(l); break; } // // Rule 94: VariableDeclarators ::= VariableDeclarator // case 94: { List l = new TypedList(new LinkedList(), VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 95: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 95: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 96: VariableDeclarator ::= VariableDeclaratorId // case 96: break; // // Rule 97: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 97: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 98: VariableDeclaratorId ::= identifier // case 98: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 99: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 99: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 100: VariableInitializer ::= Expression // case 100: break; // // Rule 101: VariableInitializer ::= ArrayInitializer // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifier // case 102: break; // // Rule 103: FieldModifiers ::= FieldModifiers FieldModifier // case 103: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 104: FieldModifier ::= public // case 104: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 105: FieldModifier ::= protected // case 105: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 106: FieldModifier ::= private // case 106: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 107: FieldModifier ::= static // case 107: { btParser.setSym1(Flags.STATIC); break; } // // Rule 108: FieldModifier ::= final // case 108: { btParser.setSym1(Flags.FINAL); break; } // // Rule 109: FieldModifier ::= transient // case 109: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 110: FieldModifier ::= volatile // case 110: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 111: MethodDeclaration ::= Commentsopt MethodHeader MethodBody // case 111: { Object comment = btParser.getSym(1); MethodDecl a = (MethodDecl) btParser.getSym(2); Block b = (Block) btParser.getSym(3); if (comment != null) a.setComment(comment.toString()); btParser.setSym1(a.body(b)); break; } // // Rule 112: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 112: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 113: ResultType ::= Type // case 113: break; // // Rule 114: ResultType ::= void // case 114: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 115: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 115: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 116: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 116: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 117: FormalParameterList ::= LastFormalParameter // case 117: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 118: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 118: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameter // case 119: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 120: FormalParameters ::= FormalParameters COMMA FormalParameter // case 120: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 121: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 121: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); VarDeclarator b = (VarDeclarator) btParser.getSym(3); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 123: VariableModifiers ::= VariableModifiers VariableModifier // case 123: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 124: VariableModifier ::= final // case 124: { btParser.setSym1(Flags.FINAL); break; } // // Rule 125: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 125: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); VarDeclarator b = (VarDeclarator) btParser.getSym(4); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 126: MethodModifiers ::= MethodModifier // case 126: break; // // Rule 127: MethodModifiers ::= MethodModifiers MethodModifier // case 127: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 128: MethodModifier ::= public // case 128: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 129: MethodModifier ::= protected // case 129: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 130: MethodModifier ::= private // case 130: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 131: MethodModifier ::= abstract // case 131: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 132: MethodModifier ::= static // case 132: { btParser.setSym1(Flags.STATIC); break; } // // Rule 133: MethodModifier ::= final // case 133: { btParser.setSym1(Flags.FINAL); break; } // // Rule 134: MethodModifier ::= synchronized // case 134: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 135: MethodModifier ::= native // case 135: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 136: MethodModifier ::= strictfp // case 136: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 137: Throws ::= throws ExceptionTypeList // case 137: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 138: ExceptionTypeList ::= ExceptionType // case 138: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 139: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 139: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 140: ExceptionType ::= ClassType // case 140: break; // // Rule 141: ExceptionType ::= TypeVariable // case 141: break; // // Rule 142: MethodBody ::= Block // case 142: break; // // Rule 143: MethodBody ::= SEMICOLON // case 143: btParser.setSym1(null); break; // // Rule 144: InstanceInitializer ::= Block // case 144: break; // // Rule 145: StaticInitializer ::= static Block // case 145: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 146: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 146: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 147: ConstructorDeclarator ::= SimpleTypeName LPAREN FormalParameterListopt RPAREN // case 147: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 148: SimpleTypeName ::= identifier // case 148: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 149: ConstructorModifiers ::= ConstructorModifier // case 149: break; // // Rule 150: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 150: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 151: ConstructorModifier ::= public // case 151: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 152: ConstructorModifier ::= protected // case 152: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 153: ConstructorModifier ::= private // case 153: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 154: ConstructorBody ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // case 154: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 155: ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON // case 155: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON // case 156: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 157: ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // case 157: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 158: ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // case 158: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 159: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 159: bad_rule = 159; break; // // Rule 160: EnumBody ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 160: bad_rule = 160; break; // // Rule 161: EnumConstants ::= EnumConstant // case 161: bad_rule = 161; break; // // Rule 162: EnumConstants ::= EnumConstants COMMA EnumConstant // case 162: bad_rule = 162; break; // // Rule 163: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 163: bad_rule = 163; break; // // Rule 164: Arguments ::= LPAREN ArgumentListopt RPAREN // case 164: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 165: EnumBodyDeclarations ::= SEMICOLON ClassBodyDeclarationsopt // case 165: bad_rule = 165; break; // // Rule 166: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 166: break; // // Rule 167: NormalInterfaceDeclaration ::= Commentsopt InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 167: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(5); ClassBody d = (ClassBody) btParser.getSym(6); Node n = nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d); if (comment != null) n.setComment( comment.toString() ); btParser.setSym1(n); break; } // // Rule 168: InterfaceModifiers ::= InterfaceModifier // case 168: break; // // Rule 169: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 169: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 170: InterfaceModifier ::= public // case 170: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 171: InterfaceModifier ::= protected // case 171: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 172: InterfaceModifier ::= private // case 172: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 173: InterfaceModifier ::= abstract // case 173: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 174: InterfaceModifier ::= static // case 174: { btParser.setSym1(Flags.STATIC); break; } // // Rule 175: InterfaceModifier ::= strictfp // case 175: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 176: ExtendsInterfaces ::= extends InterfaceType // case 176: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 177: ExtendsInterfaces ::= ExtendsInterfaces COMMA InterfaceType // case 177: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 178: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // case 178: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 179: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 180: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ConstantDeclaration // case 181: break; // // Rule 182: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ClassDeclaration // case 183: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 184: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 185: InterfaceMemberDeclaration ::= SEMICOLON // case 185: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 186: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 186: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 187: ConstantModifiers ::= ConstantModifier // case 187: break; // // Rule 188: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 188: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 189: ConstantModifier ::= public // case 189: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 190: ConstantModifier ::= static // case 190: { btParser.setSym1(Flags.STATIC); break; } // // Rule 191: ConstantModifier ::= final // case 191: { btParser.setSym1(Flags.FINAL); break; } // // Rule 192: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt SEMICOLON // case 192: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 193: AbstractMethodModifiers ::= AbstractMethodModifier // case 193: break; // // Rule 194: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 194: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 195: AbstractMethodModifier ::= public // case 195: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 196: AbstractMethodModifier ::= abstract // case 196: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 197: AnnotationTypeDeclaration ::= InterfaceModifiersopt AT interface identifier AnnotationTypeBody // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier LPAREN RPAREN DefaultValueopt SEMICOLON // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 205: bad_rule = 205; break; // // Rule 206: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 206: bad_rule = 206; break; // // Rule 207: AnnotationTypeElementDeclaration ::= SEMICOLON // case 207: bad_rule = 207; break; // // Rule 208: DefaultValue ::= default ElementValue // case 208: bad_rule = 208; break; // // Rule 209: Annotations ::= Annotation // case 209: bad_rule = 209; break; // // Rule 210: Annotations ::= Annotations Annotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= NormalAnnotation // case 211: bad_rule = 211; break; // // Rule 212: Annotation ::= MarkerAnnotation // case 212: bad_rule = 212; break; // // Rule 213: Annotation ::= SingleElementAnnotation // case 213: bad_rule = 213; break; // // Rule 214: NormalAnnotation ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePairs ::= ElementValuePair // case 215: bad_rule = 215; break; // // Rule 216: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 216: bad_rule = 216; break; // // Rule 217: ElementValuePair ::= SimpleName EQUAL ElementValue // case 217: bad_rule = 217; break; // // Rule 218: SimpleName ::= identifier // case 218: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 219: ElementValue ::= ConditionalExpression // case 219: bad_rule = 219; break; // // Rule 220: ElementValue ::= Annotation // case 220: bad_rule = 220; break; // // Rule 221: ElementValue ::= ElementValueArrayInitializer // case 221: bad_rule = 221; break; // // Rule 222: ElementValueArrayInitializer ::= LBRACE ElementValuesopt ,opt RBRACE // case 222: bad_rule = 222; break; // // Rule 223: ElementValues ::= ElementValue // case 223: bad_rule = 223; break; // // Rule 224: ElementValues ::= ElementValues COMMA ElementValue // case 224: bad_rule = 224; break; // // Rule 225: MarkerAnnotation ::= AT TypeName // case 225: bad_rule = 225; break; // // Rule 226: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 226: bad_rule = 226; break; // // Rule 227: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // case 227: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 228: VariableInitializers ::= VariableInitializer // case 228: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 229: VariableInitializers ::= VariableInitializers COMMA VariableInitializer // case 229: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 230: Block ::= LBRACE BlockStatementsopt RBRACE // case 230: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 231: BlockStatements ::= BlockStatement // case 231: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 232: BlockStatements ::= BlockStatements BlockStatement // case 232: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= LocalVariableDeclarationStatement // case 233: break; // // Rule 234: BlockStatement ::= ClassDeclaration // case 234: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 235: BlockStatement ::= Statement // case 235: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 236: LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON // case 236: break; // // Rule 237: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 237: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.LocalDecl(pos(d), flags, array(a, pos(d), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 238: Statement ::= StatementWithoutTrailingSubstatement // case 238: break; // // Rule 239: Statement ::= LabeledStatement // case 239: break; // // Rule 240: Statement ::= IfThenStatement // case 240: break; // // Rule 241: Statement ::= IfThenElseStatement // case 241: break; // // Rule 242: Statement ::= WhileStatement // case 242: break; // // Rule 243: Statement ::= ForStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= Block // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= AssertStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= DoStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= BreakStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 253: break; // // Rule 254: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 254: break; // // Rule 255: StatementWithoutTrailingSubstatement ::= TryStatement // case 255: break; // // Rule 256: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 256: break; // // Rule 257: StatementNoShortIf ::= LabeledStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 258: break; // // Rule 259: StatementNoShortIf ::= WhileStatementNoShortIf // case 259: break; // // Rule 260: StatementNoShortIf ::= ForStatementNoShortIf // case 260: break; // // Rule 261: IfThenStatement ::= if LPAREN Expression RPAREN Statement // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 262: IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else Statement // case 262: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 263: IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf else StatementNoShortIf // case 263: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 264: EmptyStatement ::= SEMICOLON // case 264: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 265: LabeledStatement ::= identifier COLON Statement // case 265: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 266: LabeledStatementNoShortIf ::= identifier COLON StatementNoShortIf // case 266: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 267: ExpressionStatement ::= StatementExpression SEMICOLON // case 267: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 268: StatementExpression ::= Assignment // case 268: break; // // Rule 269: StatementExpression ::= PreIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PreDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= PostIncrementExpression // case 271: break; // // Rule 272: StatementExpression ::= PostDecrementExpression // case 272: break; // // Rule 273: StatementExpression ::= MethodInvocation // case 273: break; // // Rule 274: StatementExpression ::= ClassInstanceCreationExpression // case 274: break; // // Rule 275: AssertStatement ::= assert Expression SEMICOLON // case 275: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 276: AssertStatement ::= assert Expression COLON Expression SEMICOLON // case 276: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 277: SwitchStatement ::= switch LPAREN Expression RPAREN SwitchBlock // case 277: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 278: SwitchBlock ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // case 278: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 279: break; // // Rule 280: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 280: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 281: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 281: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 282: SwitchLabels ::= SwitchLabel // case 282: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 283: SwitchLabels ::= SwitchLabels SwitchLabel // case 283: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 284: SwitchLabel ::= case ConstantExpression COLON // case 284: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 285: SwitchLabel ::= case EnumConstant COLON // case 285: bad_rule = 285; break; // // Rule 286: SwitchLabel ::= default COLON // case 286: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 287: EnumConstant ::= identifier // case 287: bad_rule = 287; break; // // Rule 288: WhileStatement ::= while LPAREN Expression RPAREN Statement // case 288: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 289: WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf // case 289: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 290: DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON // case 290: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 291: ForStatement ::= BasicForStatement // case 291: break; // // Rule 292: ForStatement ::= EnhancedForStatement // case 292: break; // // Rule 293: BasicForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN Statement // case 293: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 294: ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN StatementNoShortIf // case 294: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 295: ForInit ::= StatementExpressionList // case 295: break; // // Rule 296: ForInit ::= LocalVariableDeclaration // case 296: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 297: ForUpdate ::= StatementExpressionList // case 297: break; // // Rule 298: StatementExpressionList ::= StatementExpression // case 298: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 299: StatementExpressionList ::= StatementExpressionList COMMA StatementExpression // case 299: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 300: BreakStatement ::= break identifieropt SEMICOLON // case 300: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 301: ContinueStatement ::= continue identifieropt SEMICOLON // case 301: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 302: ReturnStatement ::= return Expressionopt SEMICOLON // case 302: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 303: ThrowStatement ::= throw Expression SEMICOLON // case 303: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 304: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN Block // case 304: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 305: TryStatement ::= try Block Catches // case 305: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 306: TryStatement ::= try Block Catchesopt Finally // case 306: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 307: Catches ::= CatchClause // case 307: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 308: Catches ::= Catches CatchClause // case 308: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 309: CatchClause ::= catch LPAREN FormalParameter RPAREN Block // case 309: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 310: Finally ::= finally Block // case 310: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 311: Primary ::= PrimaryNoNewArray // case 311: break; // // Rule 312: Primary ::= ArrayCreationExpression // case 312: break; // // Rule 313: PrimaryNoNewArray ::= Literal // case 313: break; // // Rule 314: PrimaryNoNewArray ::= Type DOT class // case 314: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 315: PrimaryNoNewArray ::= void DOT class // case 315: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 316: PrimaryNoNewArray ::= this // case 316: { btParser.setSym1(nf.This(pos())); break; } // // Rule 317: PrimaryNoNewArray ::= ClassName DOT this // case 317: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 318: PrimaryNoNewArray ::= LPAREN Expression RPAREN // case 318: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 319: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 319: break; // // Rule 320: PrimaryNoNewArray ::= FieldAccess // case 320: break; // // Rule 321: PrimaryNoNewArray ::= MethodInvocation // case 321: break; // // Rule 322: PrimaryNoNewArray ::= ArrayAccess // case 322: break; // // Rule 323: Literal ::= IntegerLiteral // case 323: { // TODO: remove any prefix (such as 0x) polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 324: Literal ::= LongLiteral // case 324: { // TODO: remove any suffix (such as L) or prefix (such as 0x) polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 325: Literal ::= FloatingPointLiteral // case 325: { // TODO: remove any suffix (such as F) polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 326: Literal ::= DoubleLiteral // case 326: { // TODO: remove any suffix (such as D) polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 327: Literal ::= BooleanLiteral // case 327: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 328: Literal ::= CharacterLiteral // case 328: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 329: Literal ::= StringLiteral // case 329: { String s = prsStream.getName(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), s.substring(1, s.length() - 2))); break; } // // Rule 330: Literal ::= null // case 330: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 331: BooleanLiteral ::= true // case 331: break; // // Rule 332: BooleanLiteral ::= false // case 332: break; // // Rule 333: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN ClassBodyopt // case 333: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 334: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 334: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 335: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 335: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 336: ArgumentList ::= Expression // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: ArgumentList ::= ArgumentList COMMA Expression // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 338: DimExprs ::= DimExpr // case 338: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 339: DimExprs ::= DimExprs DimExpr // case 339: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 340: DimExpr ::= LBRACKET Expression RBRACKET // case 340: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 341: Dims ::= LBRACKET RBRACKET // case 341: { btParser.setSym1(new Integer(1)); break; } // // Rule 342: Dims ::= Dims LBRACKET RBRACKET // case 342: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 343: FieldAccess ::= Primary DOT identifier // case 343: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 344: FieldAccess ::= super DOT identifier // case 344: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 345: FieldAccess ::= ClassName DOT super DOT identifier // case 345: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 346: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 346: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 347: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 347: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 348: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 348: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 349: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 349: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 350: PostfixExpression ::= Primary // case 350: break; // // Rule 351: PostfixExpression ::= ExpressionName // case 351: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 352: PostfixExpression ::= PostIncrementExpression // case 352: break; // // Rule 353: PostfixExpression ::= PostDecrementExpression // case 353: break; // // Rule 354: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 354: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 355: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 355: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 356: UnaryExpression ::= PreIncrementExpression // case 356: break; // // Rule 357: UnaryExpression ::= PreDecrementExpression // case 357: break; // // Rule 358: UnaryExpression ::= PLUS UnaryExpression // case 358: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 359: UnaryExpression ::= MINUS UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 361: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 362: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 363: break; // // Rule 364: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 365: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 365: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 367: MultiplicativeExpression ::= UnaryExpression // case 367: break; // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 369: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 369: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 370: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 371: AdditiveExpression ::= MultiplicativeExpression // case 371: break; // // Rule 372: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 373: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 374: ShiftExpression ::= AdditiveExpression // case 374: break; // // Rule 375: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 375: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 376: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 376: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 377: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 377: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 378: RelationalExpression ::= ShiftExpression // case 378: break; // // Rule 379: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 381: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 382: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 383: EqualityExpression ::= RelationalExpression // case 383: break; // // Rule 384: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 385: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 386: AndExpression ::= EqualityExpression // case 386: break; // // Rule 387: AndExpression ::= AndExpression AND EqualityExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 388: ExclusiveOrExpression ::= AndExpression // case 388: break; // // Rule 389: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 390: InclusiveOrExpression ::= ExclusiveOrExpression // case 390: break; // // Rule 391: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 392: ConditionalAndExpression ::= InclusiveOrExpression // case 392: break; // // Rule 393: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 394: ConditionalOrExpression ::= ConditionalAndExpression // case 394: break; // // Rule 395: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 396: ConditionalExpression ::= ConditionalOrExpression // case 396: break; // // Rule 397: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 397: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 398: AssignmentExpression ::= ConditionalExpression // case 398: break; // // Rule 399: AssignmentExpression ::= Assignment // case 399: break; // // Rule 400: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 400: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 401: LeftHandSide ::= ExpressionName // case 401: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 402: LeftHandSide ::= FieldAccess // case 402: break; // // Rule 403: LeftHandSide ::= ArrayAccess // case 403: break; // // Rule 404: AssignmentOperator ::= EQUAL // case 404: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 405: AssignmentOperator ::= MULTIPLY_EQUAL // case 405: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= DIVIDE_EQUAL // case 406: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= REMAINDER_EQUAL // case 407: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= PLUS_EQUAL // case 408: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= MINUS_EQUAL // case 409: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 410: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= GREATER GREATER EQUAL // case 411: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 412: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= AND_EQUAL // case 413: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= XOR_EQUAL // case 414: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 415: AssignmentOperator ::= OR_EQUAL // case 415: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 416: Expression ::= AssignmentExpression // case 416: break; // // Rule 417: ConstantExpression ::= Expression // case 417: break; // // Rule 418: Dimsopt ::= // case 418: { btParser.setSym1(new Integer(0)); break; } // // Rule 419: Dimsopt ::= Dims // case 419: break; // // Rule 420: Catchesopt ::= // case 420: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 421: Catchesopt ::= Catches // case 421: break; // // Rule 422: identifieropt ::= // case 422: btParser.setSym1(null); break; // // Rule 423: identifieropt ::= identifier // case 423: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 424: ForUpdateopt ::= // case 424: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 425: ForUpdateopt ::= ForUpdate // case 425: break; // // Rule 426: Expressionopt ::= // case 426: btParser.setSym1(null); break; // // Rule 427: Expressionopt ::= Expression // case 427: break; // // Rule 428: ForInitopt ::= // case 428: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 429: ForInitopt ::= ForInit // case 429: break; // // Rule 430: SwitchLabelsopt ::= // case 430: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 431: SwitchLabelsopt ::= SwitchLabels // case 431: break; // // Rule 432: SwitchBlockStatementGroupsopt ::= // case 432: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 433: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 433: break; // // Rule 434: VariableModifiersopt ::= // case 434: { btParser.setSym1(Flags.NONE); break; } // // Rule 435: VariableModifiersopt ::= VariableModifiers // case 435: break; // // Rule 436: VariableInitializersopt ::= // case 436: btParser.setSym1(null); break; // // Rule 437: VariableInitializersopt ::= VariableInitializers // case 437: break; // // Rule 438: ElementValuesopt ::= // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuesopt ::= ElementValues // case 439: bad_rule = 439; break; // // Rule 440: ElementValuePairsopt ::= // case 440: btParser.setSym1(null); break; // // Rule 441: ElementValuePairsopt ::= ElementValuePairs // case 441: bad_rule = 441; break; // // Rule 442: DefaultValueopt ::= // case 442: btParser.setSym1(null); break; // // Rule 443: DefaultValueopt ::= DefaultValue // case 443: break; // // Rule 444: AnnotationTypeElementDeclarationsopt ::= // case 444: btParser.setSym1(null); break; // // Rule 445: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 445: bad_rule = 445; break; // // Rule 446: AbstractMethodModifiersopt ::= // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 447: break; // // Rule 448: ConstantModifiersopt ::= // case 448: { btParser.setSym1(Flags.NONE); break; } // // Rule 449: ConstantModifiersopt ::= ConstantModifiers // case 449: break; // // Rule 450: InterfaceMemberDeclarationsopt ::= // case 450: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 451: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 451: break; // // Rule 452: ExtendsInterfacesopt ::= // case 452: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 453: ExtendsInterfacesopt ::= ExtendsInterfaces // case 453: break; // // Rule 454: InterfaceModifiersopt ::= // case 454: { btParser.setSym1(Flags.NONE); break; } // // Rule 455: InterfaceModifiersopt ::= InterfaceModifiers // case 455: break; // // Rule 456: ClassBodyopt ::= // case 456: btParser.setSym1(null); break; // // Rule 457: ClassBodyopt ::= ClassBody // case 457: break; // // Rule 458: Argumentsopt ::= // case 458: btParser.setSym1(null); break; // // Rule 459: Argumentsopt ::= Arguments // case 459: bad_rule = 459; break; // // Rule 460: EnumBodyDeclarationsopt ::= // case 460: btParser.setSym1(null); break; // // Rule 461: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 461: bad_rule = 461; break; // // Rule 462: ,opt ::= // case 462: btParser.setSym1(null); break; // // Rule 463: ,opt ::= COMMA // case 463: break; // // Rule 464: EnumConstantsopt ::= // case 464: btParser.setSym1(null); break; // // Rule 465: EnumConstantsopt ::= EnumConstants // case 465: bad_rule = 465; break; // // Rule 466: ArgumentListopt ::= // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 467: ArgumentListopt ::= ArgumentList // case 467: break; // // Rule 468: BlockStatementsopt ::= // case 468: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 469: BlockStatementsopt ::= BlockStatements // case 469: break; // // Rule 470: ExplicitConstructorInvocationopt ::= // case 470: btParser.setSym1(null); break; // // Rule 471: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 471: break; // // Rule 472: ConstructorModifiersopt ::= // case 472: { btParser.setSym1(Flags.NONE); break; } // // Rule 473: ConstructorModifiersopt ::= ConstructorModifiers // case 473: break; // // Rule 474: ...opt ::= // case 474: btParser.setSym1(null); break; // // Rule 475: ...opt ::= ELLIPSIS // case 475: break; // // Rule 476: FormalParameterListopt ::= // case 476: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 477: FormalParameterListopt ::= FormalParameterList // case 477: break; // // Rule 478: Throwsopt ::= // case 478: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 479: Throwsopt ::= Throws // case 479: break; // // Rule 480: MethodModifiersopt ::= // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: MethodModifiersopt ::= MethodModifiers // case 481: break; // // Rule 482: FieldModifiersopt ::= // case 482: { btParser.setSym1(Flags.NONE); break; } // // Rule 483: FieldModifiersopt ::= FieldModifiers // case 483: break; // // Rule 484: ClassBodyDeclarationsopt ::= // case 484: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 485: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 485: break; // // Rule 486: Interfacesopt ::= // case 486: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 487: Interfacesopt ::= Interfaces // case 487: break; // // Rule 488: Superopt ::= // case 488: btParser.setSym1(null); break; // // Rule 489: Superopt ::= Super // case 489: break; // // Rule 490: TypeParametersopt ::= // case 490: btParser.setSym1(null); break; // // Rule 491: TypeParametersopt ::= TypeParameters // case 491: break; // // Rule 492: ClassModifiersopt ::= // case 492: { btParser.setSym1(Flags.NONE); break; } // // Rule 493: ClassModifiersopt ::= ClassModifiers // case 493: break; // // Rule 494: Annotationsopt ::= // case 494: btParser.setSym1(null); break; // // Rule 495: Annotationsopt ::= Annotations // case 495: bad_rule = 495; break; // // Rule 496: TypeDeclarationsopt ::= // case 496: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 497: TypeDeclarationsopt ::= TypeDeclarations // case 497: break; // // Rule 498: ImportDeclarationsopt ::= // case 498: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 499: ImportDeclarationsopt ::= ImportDeclarations // case 499: break; // // Rule 500: PackageDeclarationopt ::= // case 500: btParser.setSym1(null); break; // // Rule 501: PackageDeclarationopt ::= PackageDeclaration // case 501: break; // // Rule 502: WildcardBoundsOpt ::= // case 502: btParser.setSym1(null); break; // // Rule 503: WildcardBoundsOpt ::= WildcardBounds // case 503: bad_rule = 503; break; // // Rule 504: AdditionalBoundListopt ::= // case 504: btParser.setSym1(null); break; // // Rule 505: AdditionalBoundListopt ::= AdditionalBoundList // case 505: bad_rule = 505; break; // // Rule 506: TypeBoundopt ::= // case 506: btParser.setSym1(null); break; // // Rule 507: TypeBoundopt ::= TypeBound // case 507: bad_rule = 507; break; // // Rule 508: TypeArgumentsopt ::= // case 508: btParser.setSym1(null); break; // // Rule 509: TypeArgumentsopt ::= TypeArguments // case 509: bad_rule = 509; break; // // Rule 510: Commentsopt ::= // case 510: btParser.setSym1(null); break; // // Rule 511: Commentsopt ::= Comments // case 511: break; // // Rule 512: Type ::= DataType PlaceTypeSpecifieropt // case 512: { assert(btParser.getSym(2) == null); //btParser.setSym1(); break; } // // Rule 513: Type ::= nullable LESS Type GREATER // case 513: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 514: Type ::= future LESS Type GREATER // case 514: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 515: Type ::= boxed LESS Type GREATER // case 515: bad_rule = 515; break; // // Rule 516: Type ::= fun LESS Type COMMA Type GREATER // case 516: bad_rule = 516; break; // // Rule 517: DataType ::= PrimitiveType // case 517: break; // // Rule 518: DataType ::= ClassOrInterfaceType // case 518: break; // // Rule 519: DataType ::= ArrayType // case 519: break; // // Rule 520: PlaceTypeSpecifier ::= AT PlaceType // case 520: bad_rule = 520; break; // // Rule 521: PlaceType ::= place // case 521: break; // // Rule 522: PlaceType ::= activity // case 522: break; // // Rule 523: PlaceType ::= method // case 523: break; // // Rule 524: PlaceType ::= current // case 524: break; // // Rule 525: PlaceType ::= PlaceExpression // case 525: break; // // Rule 526: ClassOrInterfaceType ::= TypeName DepParametersopt // case 526: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 527: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 527: break; // // Rule 528: DepParameterExpr ::= ArgumentList WhereClauseopt // case 528: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 529: DepParameterExpr ::= WhereClause // case 529: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 530: WhereClause ::= COLON Expression // case 530: break; // // Rule 532: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 533: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 533: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 534: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 534: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 535: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 535: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 536: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 536: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 537: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 537: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 538: ObjectKind ::= value // case 538: bad_rule = 538; break; // // Rule 539: ObjectKind ::= reference // case 539: bad_rule = 539; break; // // Rule 540: MethodModifier ::= atomic // case 540: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 541: MethodModifier ::= extern // case 541: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 542: ClassDeclaration ::= ValueClassDeclaration // case 542: break; // // Rule 543: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 543: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 544: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 544: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 545: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET RBRACKET ArrayInitializer // case 545: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 546: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET // case 546: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 547: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET Expression // case 547: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, d)); break; } // // Rule 548: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET // case 548: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 549: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET Expression // case 549: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 550: ArrayBaseType ::= PrimitiveType // case 550: break; // // Rule 551: ArrayBaseType ::= ClassOrInterfaceType // case 551: break; // // Rule 552: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 552: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 553: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 553: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 554: Statement ::= NowStatement // case 554: break; // // Rule 555: Statement ::= ClockedStatement // case 555: break; // // Rule 556: Statement ::= AsyncStatement // case 556: break; // // Rule 557: Statement ::= AtomicStatement // case 557: break; // // Rule 558: Statement ::= WhenStatement // case 558: break; // // Rule 559: Statement ::= ForEachStatement // case 559: break; // // Rule 560: Statement ::= AtEachStatement // case 560: break; // // Rule 561: Statement ::= FinishStatement // case 561: break; // // Rule 562: StatementWithoutTrailingSubstatement ::= NextStatement // case 562: break; // // Rule 563: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 563: break; // // Rule 564: StatementNoShortIf ::= NowStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= ClockedStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= AsyncStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtomicStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= WhenStatementNoShortIf // case 568: break; // // Rule 569: StatementNoShortIf ::= ForEachStatementNoShortIf // case 569: break; // // Rule 570: StatementNoShortIf ::= AtEachStatementNoShortIf // case 570: break; // // Rule 571: StatementNoShortIf ::= FinishStatementNoShortIf // case 571: break; // // Rule 572: NowStatement ::= now LPAREN Clock RPAREN Statement // case 572: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 573: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 573: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 574: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 574: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 575: AsyncStatement ::= async LPAREN here RPAREN Statement // case 575: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 576: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 576: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 577: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 577: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 578: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 578: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 579: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 579: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 580: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 580: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 581: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 581: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 582: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 582: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 583: FinishStatement ::= finish Statement // case 583: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 584: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 584: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 585: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 585: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 586: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 586: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 587: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 587: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 588: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 588: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 589: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 589: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 590: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 590: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 591: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 591: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 592: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 592: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 593: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 593: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 594: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 594: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 595: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 595: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 596: PlaceExpression ::= here // case 596: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 597: PlaceExpression ::= this // case 597: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 598: PlaceExpression ::= Expression // case 598: break; // // Rule 599: PlaceExpression ::= ArrayAccess // case 599: bad_rule = 599; break; // // Rule 600: NextStatement ::= next SEMICOLON // case 600: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 601: AwaitStatement ::= await Expression SEMICOLON // case 601: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 602: ClockList ::= Clock // case 602: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 603: ClockList ::= ClockList COMMA Clock // case 603: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 604: Clock ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 605: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 605: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 606: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 606: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 607: RelationalExpression ::= RelationalExpression instanceof Type // case 607: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 608: ExpressionName ::= here // case 608: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return nf.Here(pos); } }); break; } // // Rule 609: Primary ::= FutureExpression // case 609: break; // // Rule 610: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 610: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 611: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 611: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 612: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: ConcreteDistributionopt ::= // case 631: btParser.setSym1(null); break; // // Rule 632: ConcreteDistributionopt ::= ConcreteDistribution // case 632: break; // // Rule 633: PlaceExpressionSingleListopt ::= // case 633: btParser.setSym1(null); break; // // Rule 634: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 634: break; // // Rule 635: ArgumentListopt ::= // case 635: btParser.setSym1(null); break; // // Rule 636: ArgumentListopt ::= ArgumentList // case 636: break; // // Rule 637: DepParametersopt ::= // case 637: btParser.setSym1(null); break; // // Rule 638: DepParametersopt ::= DepParameters // case 638: break; // // Rule 639: Unsafeopt ::= // case 639: btParser.setSym1(null); break; // // Rule 640: Unsafeopt ::= unsafe // case 640: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/a0ef25c366453f5aff64a3c99c145987b17c8f23/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... | ||
100); expected = "\"string 104, with comma\",102,\"string 103\",101\n" + "\"string 204\t with tab\",202,\"string 203\",201\n"; | 100, objectFormatter); expected = "\"string 104, with comma\",\"\t,\",\"string 103\",101\n" + "\"string 204\t with tab\",\"\t,\",\"string 203\",201\n"; | public void testWriteCommaDelimitedTable() throws Exception { ByteArrayOutputStream baos; String expected; String results; baos = new ByteArrayOutputStream(); TextFileUtil.writeCSVTable(baos, getTestRows(), new int[] {0, 1, 2, 3}, new boolean[] {true, true, true, true}, 100); expected = "101,102,\"string 103\",\"string 104, with comma\"\n" + "201,202,\"string 203\",\"string 204\t with tab\"\n"; results = baos.toString(); assertEquals(expected, results); baos = new ByteArrayOutputStream(); TextFileUtil.writeCSVTable(baos, getTestRows(), new int[] {0, 1, 2, 3}, new boolean[] {false, true, true, true}, 100); expected = "102,\"string 103\",\"string 104, with comma\"\n" + "202,\"string 203\",\"string 204\t with tab\"\n"; results = baos.toString(); assertEquals(expected, results); baos = new ByteArrayOutputStream(); TextFileUtil.writeCSVTable(baos, getTestRows(), new int[] {3, 1, 2, 0}, new boolean[] {true, true, true, true}, 100); expected = "\"string 104, with comma\",102,\"string 103\",101\n" + "\"string 204\t with tab\",202,\"string 203\",201\n"; results = baos.toString(); assertEquals(expected, results); baos = new ByteArrayOutputStream(); TextFileUtil.writeCSVTable(baos, getTestRows(), new int[] {3, 2, 1, 0}, new boolean[] {false, true, true, false}, 100); expected = "\"string 103\",102\n\"string 203\",202\n"; results = baos.toString(); assertEquals(expected, results); baos = new ByteArrayOutputStream(); TextFileUtil.writeCSVTable(baos, getTestRows(), new int[] {3, 2, 1, 0}, new boolean[] {false, false, true, false}, 100); expected = "102\n202\n"; results = baos.toString(); assertEquals(expected, results); } | 7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/7315fcfe98d91ec34c5da0374768d1b027fe7425/TextFileUtilTest.java/clean/intermine/objectstore/test/src/org/intermine/util/TextFileUtilTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
15594,
23531,
329,
1388,
1435,
1216,
1185,
288,
3639,
11559,
17548,
31,
3639,
514,
2665,
31,
3639,
514,
1686,
31,
3639,
17548,
273,
394,
11559,
5621,
3639,
3867,
812,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
3067,
15594,
23531,
329,
1388,
1435,
1216,
1185,
288,
3639,
11559,
17548,
31,
3639,
514,
2665,
31,
3639,
514,
1686,
31,
3639,
17548,
273,
394,
11559,
5621,
3639,
3867,
812,... |
if ( probeSetId.startsWith( "Search" ) ) return null; | if ( probeId.startsWith( "Search" ) ) return null; | public Object parseOneLine( String line ) { String[] sArray = line.split( "\t" ); if ( sArray.length == 0 ) throw new IllegalArgumentException( "Line format is not valid" ); String probeSetId = sArray[0]; if ( probeSetId == null || probeSetId.length() == 0 ) throw new IllegalArgumentException( "Probe id invalid" ); if ( probeSetId.startsWith( "Search" ) ) return null; if ( sArray.length < 10 ) throw new IllegalArgumentException( "Line format is not valid" ); String sequence = sArray[9]; if ( sequence == null || sequence.length() == 0 ) throw new IllegalArgumentException( "Sequence is invalid" ); Reporter ap = Reporter.Factory.newInstance(); BioSequence immobChar = BioSequence.Factory.newInstance(); immobChar.setSequence( sequence ); ap.setImmobilizedCharacteristic( immobChar ); return ap; } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/f4cdb5edf8b8b0404d281e44cd8c66bead326fda/IlluminaProbeReader.java/buggy/src/impl/edu/columbia/gemma/loader/arraydesign/IlluminaProbeReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1109,
3335,
1670,
12,
514,
980,
262,
288,
3639,
514,
8526,
272,
1076,
273,
980,
18,
4939,
12,
1548,
88,
6,
11272,
3639,
309,
261,
272,
1076,
18,
2469,
422,
374,
262,
604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1109,
3335,
1670,
12,
514,
980,
262,
288,
3639,
514,
8526,
272,
1076,
273,
980,
18,
4939,
12,
1548,
88,
6,
11272,
3639,
309,
261,
272,
1076,
18,
2469,
422,
374,
262,
604,
... |
ZimbraSoapContext lc = getZimbraContext(context); | ZimbraSoapContext lc = getZimbraSoapContext(context); | public Element handle(Element request, Map context) throws ServiceException { ZimbraSoapContext lc = getZimbraContext(context); Provisioning prov = Provisioning.getInstance(); Element d = request.getElement(AdminService.E_COS); String key = d.getAttribute(AdminService.A_BY); String value = d.getText(); Cos cos = null; if (key.equals(BY_NAME)) { cos = prov.getCosByName(value); } else if (key.equals(BY_ID)) { cos = prov.getCosById(value); } else { throw ServiceException.INVALID_REQUEST("unknown value for by: "+key, null); } if (cos == null) throw AccountServiceException.NO_SUCH_COS(value); Element response = lc.createElement(AdminService.GET_COS_RESPONSE); doCos(response, cos); return response; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/73c7a43f58826ebd459515a85e8460518f31e6cc/GetCos.java/buggy/ZimbraServer/src/java/com/zimbra/cs/service/admin/GetCos.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
202,
5411,
2285,
381,
15397,
20601,
1042,
9109,
273,
23448,
381,
15397,
20601,
1042,
12,
2472,
1769,
3639,
26423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3010,
1640,
12,
1046,
590,
16,
1635,
819,
13,
1216,
16489,
288,
202,
5411,
2285,
381,
15397,
20601,
1042,
9109,
273,
23448,
381,
15397,
20601,
1042,
12,
2472,
1769,
3639,
26423,
... |
int currentLineNumber = reader.getLineNumber(); if(currentLineNumber == this.lineNumber) { buf.append(currentLineNumber); buf.append(": "); buf.append(currentLine); buf.append("\n"); } else if(currentLineNumber == this.lineNumber + 1) { buf.append(currentLineNumber); buf.append(": "); buf.append(currentLine); break; } currentLine = reader.readLine(); } this.codeSnippet = buf.toString().split("\n"); } } } catch(NumberFormatException nfex) { } catch (IOException e) { LOG.warn("[GrailsWrappedRuntimeException] I/O error reading line diagnostics: " + e.getMessage(), e); } finally { if(reader != null) try { reader.close(); } catch (IOException e) { } } | StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); this.t.printStackTrace(pw); this.stackTrace = sw.toString(); Pattern extractDetails = Pattern.compile("\\((\\w+)\\.groovy:(\\d+)\\)"); Matcher matcher = extractDetails.matcher(stackTrace); if(matcher.find()) { this.className = matcher.group(1); LineNumberReader reader = null; try { this.lineNumber = Integer.parseInt(matcher.group(2)); if(getLineNumber() > -1) { String fileName = this.className.replace('.', '/') + ".groovy"; InputStream in = getClass().getClassLoader().getResourceAsStream(fileName); if(in != null) { reader = new LineNumberReader(new InputStreamReader( in )); String currentLine = reader.readLine(); StringBuffer buf = new StringBuffer(); while(currentLine != null) { | public GrailsWrappedRuntimeException(GroovyRuntimeException gre) { super(gre.getMessage(), gre); this.gre = gre; if(gre.getModule() == null) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); gre.printStackTrace(pw); this.stackTrace = sw.toString(); Pattern extractDetails = Pattern.compile("\\((\\w+)\\.groovy:(\\d+)\\)"); Matcher matcher = extractDetails.matcher(stackTrace); if(matcher.find()) { this.className = matcher.group(1); LineNumberReader reader = null; try { this.lineNumber = Integer.parseInt(matcher.group(2)); if(getLineNumber() > -1) { String fileName = this.className.replace('.', '/') + ".groovy"; InputStream in = getClass().getClassLoader().getResourceAsStream(fileName); if(in != null) { reader = new LineNumberReader(new InputStreamReader( in )); String currentLine = reader.readLine(); StringBuffer buf = new StringBuffer(); while(currentLine != null) { int currentLineNumber = reader.getLineNumber(); if(currentLineNumber == this.lineNumber) { buf.append(currentLineNumber); buf.append(": "); buf.append(currentLine); buf.append("\n"); } else if(currentLineNumber == this.lineNumber + 1) { buf.append(currentLineNumber); buf.append(": "); buf.append(currentLine); break; } currentLine = reader.readLine(); } this.codeSnippet = buf.toString().split("\n"); } } } catch(NumberFormatException nfex) { // ignore } catch (IOException e) { LOG.warn("[GrailsWrappedRuntimeException] I/O error reading line diagnostics: " + e.getMessage(), e); } finally { if(reader != null) try { reader.close(); } catch (IOException e) { // ignore } } } } } | 50129 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50129/a1cfacbb56e963e9c5c30b98fb844509dee7e0b1/GrailsWrappedRuntimeException.java/buggy/src/web/org/codehaus/groovy/grails/web/errors/GrailsWrappedRuntimeException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10812,
14573,
17665,
11949,
12,
43,
12859,
11949,
5174,
13,
288,
202,
202,
9565,
12,
11556,
18,
24906,
9334,
5174,
1769,
202,
202,
2211,
18,
11556,
273,
5174,
31,
9506,
202,
430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
10812,
14573,
17665,
11949,
12,
43,
12859,
11949,
5174,
13,
288,
202,
202,
9565,
12,
11556,
18,
24906,
9334,
5174,
1769,
202,
202,
2211,
18,
11556,
273,
5174,
31,
9506,
202,
430... |
public org.quickfix.field.LegMaturityMonthYear getLegMaturityMonthYear() throws FieldNotFound { org.quickfix.field.LegMaturityMonthYear value = new org.quickfix.field.LegMaturityMonthYear(); | public quickfix.field.LegMaturityMonthYear getLegMaturityMonthYear() throws FieldNotFound { quickfix.field.LegMaturityMonthYear value = new quickfix.field.LegMaturityMonthYear(); | public org.quickfix.field.LegMaturityMonthYear getLegMaturityMonthYear() throws FieldNotFound { org.quickfix.field.LegMaturityMonthYear value = new org.quickfix.field.LegMaturityMonthYear(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityList.java/clean/src/java/src/quickfix/fix43/SecurityList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
15947,
2336,
5445,
5593,
336,
8329,
15947,
2336,
5445,
5593,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
15947,
2336,
5445,
5593,
336,
8329,
15947,
2336,
5445,
5593,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8329,
15... |
System.out.println("Input class list: " + classList); System.out.println("Output class list: " + this.classList); System.out.println("indx: " + indx); System.out.println("Method: " + method); | public FollowMethod(Method method, ClassList classList) { this.method = method; Class methodClass = method.getDeclaringClass(); Class[] paramTypes = method.getParameterTypes(); Class returnType = method.getReturnType(); this.indx = classList.size() - paramTypes.length; if(!methodClass.isAssignableFrom(classList.getClass(indx-1))) { throw new IllegalArgumentException("Can't apply " + method + " to " + methodClass + " at index " + (indx-1) + " in " + classList); } for(int i = indx; i < classList.size(); i++) { if(!paramTypes[i-indx].isAssignableFrom(classList.getClass(indx))) { throw new IllegalArgumentException("Illegal argument type in " + method + " at index " + (i) + " in " + classList ); } } Class[] classArray = new Class[indx]; for(int i = 0; i < indx-1; i++) { classArray[i] = classList.getClass(i); } classArray[indx-1] = returnType; this.classList = new SimpleTuple.ClassList(classArray); System.out.println("Input class list: " + classList); System.out.println("Output class list: " + this.classList); System.out.println("indx: " + indx); System.out.println("Method: " + method); } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/16e211b30f2de853621b0c083c1e7d659c54cfd1/Tuple.java/clean/src/org/biojava/utils/query/Tuple.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16093,
1305,
12,
1305,
707,
16,
1659,
682,
16035,
13,
288,
1377,
333,
18,
2039,
273,
707,
31,
1377,
1659,
707,
797,
273,
707,
18,
588,
3456,
14682,
5621,
5411,
1659,
8526,
21265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
16093,
1305,
12,
1305,
707,
16,
1659,
682,
16035,
13,
288,
1377,
333,
18,
2039,
273,
707,
31,
1377,
1659,
707,
797,
273,
707,
18,
588,
3456,
14682,
5621,
5411,
1659,
8526,
21265,
... | |
if (reference != null) { reference.clear(); } } } | } } if (reference != null) { reference.clear(); } } } | public final void run() { while (true) { // Get the next reference to dispose. Reference reference = null; try { reference = referenceQueue.remove(); } catch (final InterruptedException e) { // Reference will be null. } // Check to see if we've been told to stop. if (reference == endMarker) { break; } // Remove the images and dispose them. final Object value = map.remove(reference); if (value instanceof Image[]) { Display display = Display.getCurrent(); if (display == null) { display = Display.getDefault(); } display.syncExec(new Runnable() { public void run() { final Image[] images = (Image[]) value; for (int i = 0; i < images.length; i++) { final Image image = images[i]; if ((image != null) && (!image.isDisposed())) { image.dispose(); } } } }); } // Clear the reference. if (reference != null) { reference.clear(); } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/c2f95a0909f2eb15cc65bbc902b893fdf7b3dc8d/ImageCache.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageCache.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
727,
918,
1086,
1435,
288,
1082,
202,
17523,
261,
3767,
13,
288,
9506,
202,
759,
968,
326,
1024,
2114,
358,
15825,
18,
9506,
202,
2404,
2114,
273,
446,
31,
9506,
202,
698,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
727,
918,
1086,
1435,
288,
1082,
202,
17523,
261,
3767,
13,
288,
9506,
202,
759,
968,
326,
1024,
2114,
358,
15825,
18,
9506,
202,
2404,
2114,
273,
446,
31,
9506,
202,
698,
28... |
.getUnionTableSchema()).getDatabaseSchema(); final String tableName = action.getUnionTableName(); | .getTargetTableSchema()).getDatabaseSchema(); final String tableName = action.getTargetTableName(); | public void doUnion(final Union action, final List statements) throws Exception { final String schemaName = action.getUnionTableSchema() == null ? action .getDataSetSchemaName() : ((JDBCSchema) action .getUnionTableSchema()).getDatabaseSchema(); final String tableName = action.getUnionTableName(); final StringBuffer sb = new StringBuffer(); sb.append("create table " + schemaName + "." + tableName + " as select * from "); for (int i = 0; i < action.getTargetTableSchemas().size(); i++) { if (i > 0) sb.append(" union select * from "); final String targetSchemaName = action.getTargetTableSchemas().get( i) == null ? action.getDataSetSchemaName() : ((Schema) action.getTargetTableSchemas().get(i)) .getName(); final String targetTableName = (String) action .getTargetTableNames().get(i); sb.append(targetSchemaName); sb.append('.'); sb.append(targetTableName); } statements.add(sb.toString()); } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/697fc52b912bb5a1524113edc0e15bf091f78336/OracleDialect.java/buggy/src/java/org/biomart/builder/controller/dialects/OracleDialect.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
14325,
12,
6385,
9589,
1301,
16,
727,
987,
6317,
13,
1082,
202,
15069,
1185,
288,
202,
202,
6385,
514,
21960,
273,
1301,
18,
588,
14325,
1388,
3078,
1435,
422,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
14325,
12,
6385,
9589,
1301,
16,
727,
987,
6317,
13,
1082,
202,
15069,
1185,
288,
202,
202,
6385,
514,
21960,
273,
1301,
18,
588,
14325,
1388,
3078,
1435,
422,
446,
... |
int big_base = MPN.big_base (base); | public static int set_str (int dest[], byte[] str, int str_len, int base) { int big_base = MPN.big_base (base); int size = 0; if ((base & (base - 1)) == 0) { // The base is a power of 2. Read the input string from // least to most significant character/digit. */ int next_bitpos = 0; int bits_per_indigit = big_base; int res_digit = 0; for (int i = str_len; --i >= 0; ) { int inp_digit = str[i]; res_digit |= inp_digit << next_bitpos; next_bitpos += bits_per_indigit; if (next_bitpos >= 32) { dest[size++] = res_digit; next_bitpos -= 32; res_digit = inp_digit >> (bits_per_indigit - next_bitpos); } } if (res_digit != 0) dest[size++] = res_digit; } else { // General case. The base is not a power of 2. int indigits_per_limb = MPN.chars_per_word (base); int j; int cy_limb; int str_pos = 0; int res_digit; int i; for (i = indigits_per_limb ; i < str_len; i += indigits_per_limb) { res_digit = str[str_pos++]; for (j = 1; j < indigits_per_limb; j++) res_digit = res_digit * base + str[str_pos++]; if (size == 0) { if (res_digit != 0) { dest[0] = res_digit; size = 1; } } else { cy_limb = MPN.mul_1 (dest, dest, size, big_base); cy_limb += MPN.add_1 (dest, dest, size, res_digit); if (cy_limb != 0) dest[size++] = cy_limb; } } big_base = base; res_digit = str[str_pos++]; for (j = 1; j < str_len - (i - indigits_per_limb); j++) { res_digit = res_digit * base + str[str_pos++]; big_base *= base; } if (size == 0) { if (res_digit != 0) { dest[0] = res_digit; size = 1; } } else { cy_limb = MPN.mul_1 (dest, dest, size, big_base); cy_limb += MPN.add_1 (dest, dest, size, res_digit); if (cy_limb != 0) dest[size++] = cy_limb; } } return size; } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/7acadb672b61196e62c8342f649887d92b6e82b1/MPN.java/clean/gnu/math/MPN.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
444,
67,
701,
261,
474,
1570,
63,
6487,
1160,
8526,
609,
16,
509,
609,
67,
1897,
16,
509,
1026,
13,
225,
288,
4202,
509,
963,
273,
374,
31,
565,
309,
14015,
1969,
473,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
509,
444,
67,
701,
261,
474,
1570,
63,
6487,
1160,
8526,
609,
16,
509,
609,
67,
1897,
16,
509,
1026,
13,
225,
288,
4202,
509,
963,
273,
374,
31,
565,
309,
14015,
1969,
473,... | |
long count = 0; while (count != nBytes) { long nRequired = nBytes - count; if (nRequired > buffer.length) { nRequired = buffer.length; } long nRead = in.read(buffer, 0, (int) nRequired); if (nRead == -1) { throw new IOException("Not enough data in source bucket."); } out.write(buffer, 0, (int) nRead); count += nRead; } | try { | public final static void paddedCopy( Bucket from, Bucket to, long nBytes, int blockSize) throws IOException { if (nBytes > blockSize) { throw new IllegalArgumentException("nBytes > blockSize"); } OutputStream out = to.getOutputStream(); byte[] buffer = new byte[16384]; InputStream in = from.getInputStream(); long count = 0; while (count != nBytes) { long nRequired = nBytes - count; if (nRequired > buffer.length) { nRequired = buffer.length; } long nRead = in.read(buffer, 0, (int) nRequired); if (nRead == -1) { throw new IOException("Not enough data in source bucket."); } out.write(buffer, 0, (int) nRead); count += nRead; } if (count < blockSize) { // hmmm... better to just allocate a new buffer // instead of explicitly zeroing the old one? // Zero pad to blockSize long padLength = buffer.length; if (padLength > blockSize - nBytes) { padLength = blockSize - nBytes; } for (int i = 0; i < padLength; i++) { buffer[i] = 0; } while (count != blockSize) { long nRequired = blockSize - count; if (blockSize - count > buffer.length) { nRequired = buffer.length; } out.write(buffer, 0, (int) nRequired); count += nRequired; } } in.close(); out.close(); } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/fbdde7654afdefd24ae4365520a38c1c680248a7/BucketTools.java/buggy/src/freenet/support/BucketTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
760,
918,
14426,
2951,
12,
202,
202,
4103,
628,
16,
202,
202,
4103,
358,
16,
202,
202,
5748,
290,
2160,
16,
202,
202,
474,
13766,
13,
202,
202,
15069,
1860,
288,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
760,
918,
14426,
2951,
12,
202,
202,
4103,
628,
16,
202,
202,
4103,
358,
16,
202,
202,
5748,
290,
2160,
16,
202,
202,
474,
13766,
13,
202,
202,
15069,
1860,
288,
202,
2... |
myKeys.addExpected(key); | myKeys.addExpected(key); | public void addExpectedMissing( Object key ) { myKeys.addExpected(key); } | 57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/ExpectationMap.java/buggy/jmock/core/src/org/jmock/expectation/ExpectationMap.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
6861,
4841,
12,
1033,
498,
262,
288,
202,
202,
4811,
2396,
18,
1289,
6861,
12,
856,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
527,
6861,
4841,
12,
1033,
498,
262,
288,
202,
202,
4811,
2396,
18,
1289,
6861,
12,
856,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public static CdrOutputStream getInstanceForEncapsulation() { | public static CdrOutputStream getInstanceForEncapsulation() { | public static CdrOutputStream getInstanceForEncapsulation() { CdrOutputStream output = getInstance(); output.write_boolean(false); // byte order: big endian return output; } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/5c788225030ea2bb15cb5f3f9696c52b755b6d54/CdrOutputStream.java/buggy/modules/interop/src/java/org/apache/geronimo/interop/rmi/iiop/CdrOutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
385,
3069,
4632,
3694,
1290,
4280,
6679,
6234,
1435,
288,
3639,
385,
3069,
4632,
876,
273,
3694,
5621,
3639,
876,
18,
2626,
67,
6494,
12,
5743,
1769,
368,
1160,
1353,
30,
5446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
385,
3069,
4632,
3694,
1290,
4280,
6679,
6234,
1435,
288,
3639,
385,
3069,
4632,
876,
273,
3694,
5621,
3639,
876,
18,
2626,
67,
6494,
12,
5743,
1769,
368,
1160,
1353,
30,
5446,... |
protected boolean isAccessible(MemberInstance mi, ClassType ctc) { | public boolean isAccessible(MemberInstance mi, ClassType ctc) { | protected boolean isAccessible(MemberInstance mi, ClassType ctc) { if (mi instanceof InterTypeMemberInstance) { // the following code has been copied from TypeSystem_c.isAccessible // the only change is the definition of target ReferenceType target = ((InterTypeMemberInstance) mi).origin(); // accessibility of intertype declarations // is with respect to origin, not container Flags flags = mi.flags(); if (flags.isPublic()) return true; if (equals(target, ctc)) return true; if (! target.isClass()) return false; ClassType ctt = target.toClass(); // If the current class and the target class are both in the // same class body, then protection doesn't matter, i.e. // protected and private members may be accessed. Do this by // working up through ctc's containers. if (isEnclosed(ctc, ctt)) return true; if (isEnclosed(ctt, ctc)) return true; ClassType ctcContainer = ctc; while (!ctcContainer.isTopLevel()) { ctcContainer = ctcContainer.outer(); if (isEnclosed(ctt, ctcContainer)) return true; }; // Check for package level scope. // FIXME: protected too? if (ctt.package_() == null && ctc.package_() == null && flags.isPackage()) return true; if (ctt.package_() != null && ctt.package_().equals (ctc.package_()) && (flags.isPackage() || flags.isProtected())) { return true; } return false; // ITDs cannot be protected } else return super.isAccessible(mi,ctc); } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/c907dc17bb2d6f090110592db4d237d088698b6e/AspectJTypeSystem_c.java/clean/aop/abc/src/abc/aspectj/types/AspectJTypeSystem_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
10451,
12,
4419,
1442,
12837,
16,
1659,
559,
276,
5111,
13,
288,
3639,
309,
261,
9197,
1276,
5294,
559,
4419,
1442,
13,
288,
540,
202,
759,
326,
3751,
981,
711,
2118,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
10451,
12,
4419,
1442,
12837,
16,
1659,
559,
276,
5111,
13,
288,
3639,
309,
261,
9197,
1276,
5294,
559,
4419,
1442,
13,
288,
540,
202,
759,
326,
3751,
981,
711,
2118,
9... |
protected boolean compare( BaseMessage expected0, BaseMessage actual0 ) { LogEntryMessage expected = ( LogEntryMessage ) expected0; LogEntryMessage actual = ( LogEntryMessage ) actual0; // We don't compare operation here because it is {@link OperationCodec}'s // duty to serialize and deserialize Invocations. return expected.getType() == actual.getType() && expected.getSequence() == actual.getSequence() && expected.getOperation().getCSN().equals( actual.getOperation().getCSN() ) && expected.getOperation().getClass() == actual.getOperation().getClass(); } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/cfc1e0db255153cb8ed18cd1e735fa4815ad666b/LogEntryMessageCodecTest.java/clean/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/LogEntryMessageCodecTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
3400,
12,
3360,
1079,
2665,
20,
16,
3360,
1079,
3214,
20,
262,
288,
3639,
30039,
1079,
2665,
273,
261,
30039,
1079,
262,
2665,
20,
31,
3639,
30039,
1079,
3214,
273,
261,
30039... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1250,
3400,
12,
3360,
1079,
2665,
20,
16,
3360,
1079,
3214,
20,
262,
288,
3639,
30039,
1079,
2665,
273,
261,
30039,
1079,
262,
2665,
20,
31,
3639,
30039,
1079,
3214,
273,
261,
30039... | ||
for (int read; -1 != (read = in.read(buffer,0,BUFFERLENGTH));) { file_buffer.append(buffer, 0, read) ; } ; | String line ; String revision = null ; String date_time = null ; try { BufferedReader in = new BufferedReader(new InputStreamReader(new CheckedInputStream(new FileInputStream(files[i]), checksum), "8859_1")) ; while (null != (line = in.readLine())) { if (null == revision && perl.match("/\\$"+"Revision: (\\d+(?:\\.\\d+)+) "+"\\$/",line)) { revision = perl.group(1) ; } if (null == date_time && perl.match("/\\$"+"Date: (\\S+)\\s+(\\S+) "+"\\$/",line)) { date_time = perl.group(1) + ' ' + perl.group(2) ; } } } catch (IOException ignored) { } catch (OutOfMemoryError ignored) { } | public void checksumDirectory(File parent_dir, String sub_dir, ServletOutputStream out) throws java.io.IOException { Perl5Util perl = new Perl5Util() ; File dir = new File(parent_dir,sub_dir) ; File[] files = dir.listFiles(new NotDirectoryFilter()) ; // Loop through the files and get a checksum for each. for (int i = 0; i < files.length; ++i) { out.print(files[i].getPath().substring(parent_dir.getPath().length()+1)+' ') ; Checksum checksum = new CRC32() ; int file_length = (int)files[i].length() ; char[] buffer = new char[BUFFERLENGTH] ; Reader in = new InputStreamReader(new CheckedInputStream(new FileInputStream(files[i]), checksum), "8859_1") ; StringBuffer file_buffer = new StringBuffer() ; // Read the classfile, and have the inputstream compute the checksum as we go. for (int read; -1 != (read = in.read(buffer,0,BUFFERLENGTH));) { file_buffer.append(buffer, 0, read) ; } ; // Find and print the revision. if (perl.match("/\\$"+"Revision: (\\d+(?:\\.\\d+)+) "+"\\$/",file_buffer.toString())) { String revision = perl.group(1) ; out.print(revision+' ') ; } else { out.print("Unknown ") ; } // Find and print the date. if (perl.match("/\\$"+"Date: (\\S+)\\s+(\\S+) "+"\\$/",file_buffer.toString())) { String date = perl.group(1) ; String time = perl.group(2) ; out.print(date+' '+time+' ') ; } else { out.print("Unknown ") ; } // Print the checksum. out.print(checksum.getValue()+" ") ; // Find and print the last-modified date. DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT) ; out.print(df.format(new Date(files[i].lastModified()))+" ") ; out.println(file_length) ; } File[] subdirs = dir.listFiles(new DirectoryFilter()) ; for (int i = 0; i < subdirs.length; ++i) { checksumDirectory(parent_dir, subdirs[i].getPath().substring(parent_dir.getPath().length()), out) ; } } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/f81c5fdda80d9402cb2a888c75959ea02397b70f/Version.java/clean/servlets/Version.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6697,
2853,
12,
812,
982,
67,
1214,
16,
514,
720,
67,
1214,
16,
7971,
4632,
596,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
202,
2173,
80,
25,
1304,
1534,
80,
273,
394,
5722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6697,
2853,
12,
812,
982,
67,
1214,
16,
514,
720,
67,
1214,
16,
7971,
4632,
596,
13,
1216,
2252,
18,
1594,
18,
14106,
288,
202,
2173,
80,
25,
1304,
1534,
80,
273,
394,
5722... |
IntroductionContainer container = (IntroductionContainer)constructor. newInstance(new Object[]{implClass}); return container; | return (IntroductionContainer)constructor.newInstance(new Object[]{implClass}); | public static IntroductionContainer createIntroductionContainer(final Class implClass) { if (implClass == null) return null; // interface introduction; skip try { Class klass = ContextClassLoader.loadClass(INTRODUCTION_CONTAINER_IMPLEMENTATION_CLASS); Constructor constructor = klass.getConstructor(new Class[]{Class.class}); IntroductionContainer container = (IntroductionContainer)constructor. newInstance(new Object[]{implClass}); return container; } catch (Exception e) { StringBuffer cause = new StringBuffer(); cause.append("could not create introduction container using specified class <"); cause.append(INTRODUCTION_CONTAINER_IMPLEMENTATION_CLASS); cause.append(">: "); cause.append(e.getMessage()); throw new RuntimeException(cause.toString()); } } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/a963297246be4fe2dccc15b9a0d970317687b6f3/DefinitionManager.java/clean/aspectwerkz/src/main/org/codehaus/aspectwerkz/definition/DefinitionManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3094,
303,
2544,
349,
2170,
752,
1702,
303,
2544,
349,
2170,
12,
6385,
1659,
9380,
797,
13,
288,
3639,
309,
261,
11299,
797,
422,
446,
13,
327,
446,
31,
368,
1560,
16658,
349... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
3094,
303,
2544,
349,
2170,
752,
1702,
303,
2544,
349,
2170,
12,
6385,
1659,
9380,
797,
13,
288,
3639,
309,
261,
11299,
797,
422,
446,
13,
327,
446,
31,
368,
1560,
16658,
349... |
if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | public RubyObject convertType(Class type, String className, String method) { if (type.isAssignableFrom(getClass())) { return this; } RubyObject result = null; try { result = funcall(getRuby().intern(method)); } catch (RubyNameException rnExcptn) { throw new RubyTypeException( getRuby(), "failed to convert " + getRubyClass().toName() + " into " + className); //} catch (RubyS rnExcptn) { } if (!type.isAssignableFrom(result.getClass())) { throw new RubyTypeException( getRuby(), getRubyClass().toName() + "#" + method + " should return " + className); } return result; } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/clean/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
1765,
559,
12,
797,
618,
16,
514,
2658,
16,
514,
707,
13,
288,
202,
202,
430,
261,
723,
18,
291,
7961,
1265,
12,
588,
797,
1435,
3719,
288,
1082,
202,
2463,
333,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
1765,
559,
12,
797,
618,
16,
514,
2658,
16,
514,
707,
13,
288,
202,
202,
430,
261,
723,
18,
291,
7961,
1265,
12,
588,
797,
1435,
3719,
288,
1082,
202,
2463,
333,... |
} | public boolean absolute(int index) throws SQLException { // index is 1-based, but internally we use 0-based indices int internalIndex; if (index==0) throw new SQLException("Cannot move to index of 0"); //if index<0, count from the end of the result set, but check //to be sure that it is not beyond the first index if (index<0) { if (index>=-rows.size()) internalIndex=rows.size()+index; else { beforeFirst(); return false; } } else { //must be the case that index>0, //find the correct place, assuming that //the index is not too large if (index<=rows.size()) internalIndex = index-1; else { afterLast(); return false; } } current_row=internalIndex; this_row = (byte [][])rows.elementAt(internalIndex); return true; } | 46312 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46312/960c18618486bf1815003d3ebe766f50a5fb2c55/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
770,
353,
404,
17,
12261,
16,
1496,
12963,
732,
999,
374,
17,
12261,
4295,
202,
474,
2713,
1016,
31,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
4967,
12,
474,
770,
13,
1216,
6483,
565,
288,
202,
759,
770,
353,
404,
17,
12261,
16,
1496,
12963,
732,
999,
374,
17,
12261,
4295,
202,
474,
2713,
1016,
31,
202,
430,
261,
... | |
String superClassName; this.scriptOrFn = scriptOrFn; if (scriptOrFn.getType() == Token.FUNCTION) { fnCurrent = (OptFunctionNode)scriptOrFn; generatedClassName = fnCurrent.getClassName(); superClassName = FUNCTION_SUPER_CLASS_NAME; } else { if (scriptOrFn.getType() != Token.SCRIPT) badTree(); fnCurrent = null; boolean isPrimary = (nameHelper.getTargetExtends() == null && nameHelper.getTargetImplements() == null); generatedClassName = getScriptClassName(null, isPrimary); superClassName = SCRIPT_SUPER_CLASS_NAME; | String sourceFile = null; if (generateDebugInfo) { sourceFile = scriptOrFnNodes[0].getSourceName(); | private void generateCode(Context cx, ScriptOrFnNode scriptOrFn, ObjArray names, ObjArray classFiles) { String superClassName; this.scriptOrFn = scriptOrFn; if (scriptOrFn.getType() == Token.FUNCTION) { fnCurrent = (OptFunctionNode)scriptOrFn; generatedClassName = fnCurrent.getClassName(); superClassName = FUNCTION_SUPER_CLASS_NAME; } else { // better be a script if (scriptOrFn.getType() != Token.SCRIPT) badTree(); fnCurrent = null; boolean isPrimary = (nameHelper.getTargetExtends() == null && nameHelper.getTargetImplements() == null); generatedClassName = getScriptClassName(null, isPrimary); superClassName = SCRIPT_SUPER_CLASS_NAME; } String sourceFile = null; // default is to generate debug info if (!cx.isGeneratingDebugChanged() || cx.isGeneratingDebug()) { sourceFile = scriptOrFn.getSourceName(); } cfw = new ClassFileWriter(generatedClassName, superClassName, sourceFile); generatedClassSignature = cfw.classNameToSignature(generatedClassName); // Generate nested function code int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; ++i) { OptFunctionNode fn = (OptFunctionNode)scriptOrFn.getFunctionNode(i); Codegen codegen = new Codegen(mainCodegen); codegen.generateCode(cx, fn, names, classFiles); } Node codegenBase; if (fnCurrent != null) { generateInit(cx, superClassName); if (fnCurrent.isTargetOfDirectCall()) { cfw.startMethod("call", "(Lorg/mozilla/javascript/Context;" + "Lorg/mozilla/javascript/Scriptable;" + "Lorg/mozilla/javascript/Scriptable;" + "[Ljava/lang/Object;)Ljava/lang/Object;", (short)(ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_FINAL)); cfw.add(ByteCode.ALOAD_0); cfw.add(ByteCode.ALOAD_1); cfw.add(ByteCode.ALOAD_2); cfw.add(ByteCode.ALOAD_3); for (int i = 0; i < scriptOrFn.getParamCount(); i++) { cfw.addPush(i); cfw.add(ByteCode.ALOAD, 4); cfw.add(ByteCode.ARRAYLENGTH); int undefArg = cfw.acquireLabel(); int beyond = cfw.acquireLabel(); cfw.add(ByteCode.IF_ICMPGE, undefArg); cfw.add(ByteCode.ALOAD, 4); cfw.addPush(i); cfw.add(ByteCode.AALOAD); cfw.addPush(0.0); cfw.add(ByteCode.GOTO, beyond); cfw.markLabel(undefArg); pushUndefined(cfw); cfw.addPush(0.0); cfw.markLabel(beyond); } cfw.add(ByteCode.ALOAD, 4); cfw.addInvoke(ByteCode.INVOKEVIRTUAL, generatedClassName, "callDirect", fnCurrent.getDirectCallMethodSignature()); cfw.add(ByteCode.ARETURN); cfw.stopMethod((short)5, null); // 1 for this, 1 for js this, 1 for args[] emitDirectConstructor(); } } else { // script cfw.addInterface("org/mozilla/javascript/Script"); generateInit(cx, superClassName); generateScriptCtor(cx, superClassName); generateMain(cx); generateExecute(cx); } BodyCodegen bodygen = new BodyCodegen(); bodygen.cfw = cfw; bodygen.mainCodegen = mainCodegen; bodygen.currentCodegen = this; bodygen.scriptOrFn = scriptOrFn; bodygen.fnCurrent = fnCurrent; bodygen.itsSourceFile = sourceFile; bodygen.generateBodyCode(cx); emitConstantDudeInitializers(); if (isMainCodegen && mainCodegen.directCallTargets != null) { int N = mainCodegen.directCallTargets.size(); for (int i = 0; i != N; ++i) { OptFunctionNode fn = (OptFunctionNode)directCallTargets.get(i); cfw.addField(getDirectTargetFieldName(i), cfw.classNameToSignature(fn.getClassName()), (short)0); } } byte[] bytes = cfw.toByteArray(); names.add(generatedClassName); classFiles.add(bytes); cfw = null; } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/7de4ae25f0fd144cbc3ddabc47e7a327a747af5a/Codegen.java/clean/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
12,
1042,
9494,
16,
7739,
1162,
5372,
907,
2728,
1162,
5372,
16,
17311,
18760,
1076,
1257,
16,
18760,
1076,
667,
2697,
13,
565,
288,
3639,
514,
2240,
3834,
31,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
1085,
12,
1042,
9494,
16,
7739,
1162,
5372,
907,
2728,
1162,
5372,
16,
17311,
18760,
1076,
1257,
16,
18760,
1076,
667,
2697,
13,
565,
288,
3639,
514,
2240,
3834,
31,
3639... |
public boolean add(IndexItem item){ | public synchronized boolean add(IndexItem item){ | public boolean add(IndexItem item){ addLast(item); return true; } | 17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/5367f1ecb078074ac02e673a8a911d8aed6ed3ec/DiskIndexLinkedList.java/clean/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1250,
527,
12,
1016,
1180,
761,
15329,
3639,
28426,
12,
1726,
1769,
3639,
327,
638,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
1250,
527,
12,
1016,
1180,
761,
15329,
3639,
28426,
12,
1726,
1769,
3639,
327,
638,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
logError( "Cannot add stress " | if ( _logger.isErrorEnabled() ) _logger.error( "Cannot add stress " | public void addThreatType( ThreatModelInterface threat_mi ) { logDetail( "==== Start: Add Threat Model ====" ); if ( threat_mi == null ) { logDebug( "addThreatType() sent NULL ThreatModelInterface. " ); return; } // Here we need to walk the threat model to find all the // transitive effects that this threat will have. We build a // graph of all these stresses, connecting them where there is // a causal relationship. The causality can span state // dimensions as well as asset types, so the complete graph // needs to be built up here, above all the specific // AssetTypeModel and AssetTypeDimensionModels. // Vector new_stress_set = new Vector(); _stress_graph.add( threat_mi, new_stress_set ); logDetail( "Added " + new_stress_set.size() + " new stresses. Current Stress Graph: " + _stress_graph.toString() ); // However, when constructing the stress model graph for a // particular asset state dimension, the // AssetStateDimensionModel only needs to look at those // stresses on that particular state dimension. It will // build a set of direct effects on that asset but uses // the linking structure in the larger stress graph to // compute the probbailities. For this reason, we need to // make sure the asset models have a cache of the stresses // for their asset type and state dimension. // Enumeration stress_enum = new_stress_set.elements(); while ( stress_enum.hasMoreElements() ) { StressInstance stress = (StressInstance) stress_enum.nextElement(); // Do not make the assumption that the asset type model // exists. First attempt to add, or simply retrieve the asset // model. // AssetType asset_type = stress.getAffectedAssetType(); AssetTypeModel asset_type_model = getOrCreateAssetTypeModel( asset_type ); if ( asset_type_model == null ) { logDebug( "Cannot find AssetTypeModel for asset type: " + asset_type.getName() ); continue; } try { logDetail( "Adding new stress to asset model: " + stress.getName() ); asset_type_model.addStressInstance( stress ); } catch (BelievabilityException be) { logError( "Cannot add stress " + stress.getName() + " to asset model : " + be.getMessage() ); return; } } // while stress_enum logDebug( "Added threat: " + threat_mi.getName() ); } // method addThreatModel | 11869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11869/b46bccd9c04fcb2db618966e6d9b5841c1fc8c6b/ModelManager.java/clean/believability/src/org/cougaar/coordinator/believability/ModelManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
1315,
6150,
559,
12,
935,
6150,
1488,
1358,
286,
6150,
67,
9197,
262,
565,
288,
3639,
613,
6109,
12,
315,
894,
3603,
30,
1436,
935,
6150,
3164,
422,
31713,
11272,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
1315,
6150,
559,
12,
935,
6150,
1488,
1358,
286,
6150,
67,
9197,
262,
565,
288,
3639,
613,
6109,
12,
315,
894,
3603,
30,
1436,
935,
6150,
3164,
422,
31713,
11272,
3639,
... |
selectable.addListener(SWT.KeyDown, selectionListener); selectable.addListener(SWT.KeyUp, selectionListener); | selectable.getDisplay().addListener(SWT.KeyDown, selectionListener); selectable.getDisplay().addListener(SWT.KeyUp, selectionListener); | SelectionList(EventList source, Selectable selectable) { super(source); deselectedList = new DeselectedList(source); this.selectable = selectable; barcode = new Barcode(); source.addListEventListener(this); selectionListener = new AdvancedSelectionListener(); selectable.addSelectionListener(selectionListener); if((selectable.getStyle() & SWT.SINGLE) == SWT.SINGLE) { selectionChangeStrategy = new SingleLineSelectionChangeStrategy(); } else if((selectable.getStyle() & SWT.MULTI) == SWT.MULTI) { selectable.addListener(SWT.KeyDown, selectionListener); selectable.addListener(SWT.KeyUp, selectionListener); selectionChangeStrategy = new MultiLineSelectionChangeStrategy(); } } | 10062 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10062/df11e8b5092352ab79c73ed627d468c1b45a6716/SelectionList.java/buggy/source/ca/odell/glazedlists/swt/SelectionList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
12977,
682,
12,
1133,
682,
1084,
16,
6766,
429,
26208,
13,
288,
3639,
2240,
12,
3168,
1769,
3639,
2832,
292,
828,
682,
273,
394,
10597,
292,
828,
682,
12,
3168,
1769,
3639,
333,
18,
402... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
12977,
682,
12,
1133,
682,
1084,
16,
6766,
429,
26208,
13,
288,
3639,
2240,
12,
3168,
1769,
3639,
2832,
292,
828,
682,
273,
394,
10597,
292,
828,
682,
12,
3168,
1769,
3639,
333,
18,
402... |
fileSet = mgfau.makeCachedUrlSet(rSpec); | fileSet = plugin.makeCachedUrlSet(mgfau, rSpec); | public void testIrregularHashStorage() throws Exception { // check that estimation isn't changed for single node sets createLeaf("http://www.example.com/testDir", null, null); CachedUrlSetSpec sSpec = new SingleNodeCachedUrlSetSpec("http://www.example.com/testDir"); CachedUrlSet fileSet = mgfau.makeCachedUrlSet(sSpec); fileSet.storeActualHashDuration(123, null); assertEquals(-1, nodeMan.getNodeState(fileSet).getAverageHashDuration()); // check that estimation isn't changed for ranged sets CachedUrlSetSpec rSpec = new RangeCachedUrlSetSpec("http://www.example.com/testDir", "ab", "yz"); fileSet = mgfau.makeCachedUrlSet(rSpec); fileSet.storeActualHashDuration(123, null); assertEquals(-1, nodeMan.getNodeState(fileSet).getAverageHashDuration()); // check that estimation isn't changed for exceptions rSpec = new RangeCachedUrlSetSpec("http://www.example.com/testDir"); fileSet = mgfau.makeCachedUrlSet(rSpec); fileSet.storeActualHashDuration(123, new Exception("bad")); assertEquals(-1, nodeMan.getNodeState(fileSet).getAverageHashDuration()); // check that estimation is grown for timeout exceptions rSpec = new RangeCachedUrlSetSpec("http://www.example.com/testDir"); fileSet = mgfau.makeCachedUrlSet(rSpec); fileSet.storeActualHashDuration(100, null); assertEquals(100, nodeMan.getNodeState(fileSet).getAverageHashDuration()); // simulate a timeout fileSet.storeActualHashDuration(200, new HashService.Timeout("test")); assertEquals(300, nodeMan.getNodeState(fileSet).getAverageHashDuration()); // and another,less than current estimate, shouldn't change it fileSet.storeActualHashDuration(100, new HashService.Timeout("test")); assertEquals(300, nodeMan.getNodeState(fileSet).getAverageHashDuration()); } | 8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/dd9e1f3ab8106b03ae4df6121efd05be279ecb66/TestGenericFileCachedUrlSet.java/buggy/test/src/org/lockss/plugin/TestGenericFileCachedUrlSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
45,
86,
16819,
2310,
3245,
1435,
1216,
1185,
288,
565,
368,
866,
716,
29284,
5177,
1404,
3550,
364,
2202,
756,
1678,
565,
752,
9858,
2932,
2505,
2207,
5591,
18,
8236,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
45,
86,
16819,
2310,
3245,
1435,
1216,
1185,
288,
565,
368,
866,
716,
29284,
5177,
1404,
3550,
364,
2202,
756,
1678,
565,
752,
9858,
2932,
2505,
2207,
5591,
18,
8236,
18,... |
private SerialContext writeOpeningTag(Object child, String childtagname, SAXAccessMethod topgetmethod) { SerialContext top = null; try { SerialContext oldtop = getDeSAXingObject(); if (oldtop != null && !oldtop.writtenchild) { xmlw.writeRaw(">"); if (indentlevel != COMPACT_MODE) { xmlw.writeRaw("\n"); } oldtop.writtenchild = true; } xmlw.writeRaw("<" + childtagname, getIndent()); String genericdata = null; if (child instanceof GenericSAX) { GenericSAX generic = (GenericSAX) child; SAXAccessMethodSpec[] getmethods = generic.getSAXGetMethods(); // QQQQQ There may be getmethods defined by other means. // Generic needs review! if (generic.size() == 0 && (getmethods == null || getmethods.length == 0)) genericdata = generic.getData(); } boolean isleaf = mappingcontext.saxleafparser .isLeafType(child.getClass()); top = isleaf ? null : new SerialContext(child, mappingcontext); // leaf is NOT DeSAXalizable OR we found some valid text boolean closenow = (isleaf || genericdata != null); Logger.println("Got generic data |" + genericdata + "|", Logger.DEBUG_SUBATOMIC); if (closenow) { // it is a leaf object xmlw.writeRaw(">", 0); // NB - 10/11/05 - final end of support for "Generic" objects. Check SVN should it ever need to come back. // use leafparser to render it into text if (genericdata == null) { xmlw.write(mappingcontext.saxleafparser.render(child)); } // use writeRaw so that < is not deentitised xmlw.writeRaw("</" + childtagname + ">\n", 0); top = null; } else { // it is not a leaf object. writing it will require another pass around Logger.println("Pushed", Logger.DEBUG_EXTRA_INFO); String polynick = mappingcontext.classnamemanager.getClassName(child.getClass()); if (polynick != null && topgetmethod != null && topgetmethod.ispolymorphic) { appendAttr(Constants.TYPE_ATTRIBUTE_NAME, polynick); } SAMIterator getattrenum = top.ma.attrmethods .getGetEnumeration(); if (getattrenum.valid() || child instanceof SAXalizableExtraAttrs) { Logger.println("Child has attributes", Logger.DEBUG_SUBATOMIC); // renderinto.clear(); renderAttrs(child, getattrenum); // xmlw.write(renderinto.storage, renderinto.offset, renderinto.size); } //xmlw.writeRaw(">\n", 0); desaxingobjects.push(top); } // else not a leaf object } catch (Throwable t) { throw UniversalRuntimeException.accumulate(t, "Error while writing tag " + childtagname); } return top; } | 50671 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50671/2c7054522a7f60f579308717c49cc3ec2fc0d2cf/DeSAXalizer.java/buggy/src/uk/org/ponder/saxalizer/DeSAXalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
225,
7366,
1042,
225,
1045,
21378,
1805,
12,
921,
225,
1151,
16,
225,
514,
225,
1151,
2692,
529,
16,
225,
10168,
1862,
1305,
225,
1760,
588,
2039,
13,
225,
288,
3639,
7366,
1042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
225,
7366,
1042,
225,
1045,
21378,
1805,
12,
921,
225,
1151,
16,
225,
514,
225,
1151,
2692,
529,
16,
225,
10168,
1862,
1305,
225,
1760,
588,
2039,
13,
225,
288,
3639,
7366,
1042,
... | ||
categoryBuilder.addOutageService(monitoredService.getNodeId(), ipInterface.getId(), ipInterface.getIpAddress(), ipInterface.getNode().getLabel(), monitoredService.getServiceType().getName()); | categoryBuilder.addOutageService( monitoredService.getNodeId(), ipInterface.getId(), ipInterface.getIpAddress(), ipInterface.getNode().getLabel(), serviceType.getName()); | private StatusCategory createCategory(String category) { Collection <OnmsOutage>outages; CategoryBuilder categoryBuilder = new CategoryBuilder(); StatusCategory statusCategory = new StatusCategory(); Category categoryDetail = m_categorydao.getCategoryByLabel(category); //statusCategory.setComment(categoryDetail.getCategoryComment()); statusCategory.setLabel(category); ServiceSelector selector = new ServiceSelector(categoryDetail.getRule(),categoryDetail.getServiceCollection()); outages = m_outagedao.matchingCurrentOutages(selector); for (OnmsOutage outage : outages) { OnmsMonitoredService monitoredService = outage.getMonitoredService(); OnmsServiceType serviceType = monitoredService.getServiceType(); OnmsIpInterface ipInterface = monitoredService.getIpInterface(); categoryBuilder.addOutageService(monitoredService.getNodeId(), ipInterface.getId(), ipInterface.getIpAddress(), ipInterface.getNode().getLabel(), monitoredService.getServiceType().getName()); } for (StatusNode node : categoryBuilder.getNodes()) { statusCategory.addNode(node); } return statusCategory; } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/93cf3b4c64d485c130096445564b205a02ae07fd/DefaultCategoryStatusService.java/clean/opennms-webapp/src/main/java/org/opennms/web/svclayer/catstatus/support/DefaultCategoryStatusService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2685,
4457,
752,
4457,
12,
780,
3150,
13,
288,
202,
202,
2532,
411,
1398,
959,
1182,
410,
34,
659,
1023,
31,
4697,
202,
4457,
1263,
3150,
1263,
273,
394,
9856,
1263,
5621,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
2685,
4457,
752,
4457,
12,
780,
3150,
13,
288,
202,
202,
2532,
411,
1398,
959,
1182,
410,
34,
659,
1023,
31,
4697,
202,
4457,
1263,
3150,
1263,
273,
394,
9856,
1263,
5621,
95... |
if (definingElement.getAttribute(DecoratorDefinition.ATT_CLASS) == null) decorator = new DeclarativeDecorator(definingElement, getIconLocation()); else { | if (definingElement.getAttribute(DecoratorDefinition.ATT_CLASS) == null) decorator = new DeclarativeDecorator(definingElement, getIconLocation()); else { | protected ILightweightLabelDecorator internalGetDecorator() throws CoreException { if (labelProviderCreationFailed) return null; final CoreException[] exceptions = new CoreException[1]; if (decorator == null) { if (definingElement.getAttribute(DecoratorDefinition.ATT_CLASS) == null) decorator = new DeclarativeDecorator(definingElement, getIconLocation()); else { Platform.run(new ISafeRunnable() { public void run() { try { decorator = (ILightweightLabelDecorator) WorkbenchPlugin .createExtension(definingElement, DecoratorDefinition.ATT_CLASS); decorator.addListener(WorkbenchPlugin.getDefault() .getDecoratorManager()); } catch (CoreException exception) { exceptions[0] = exception; } } /* (non-Javadoc) * Method declared on ISafeRunnable. */ public void handleException(Throwable e) { //Do nothing as Core will handle the logging } }); } } else return decorator; if (decorator == null) { this.labelProviderCreationFailed = true; setEnabled(false); } if (exceptions[0] != null) throw exceptions[0]; return decorator; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/8f66eec23d7a08f4aa505a2195f540c4639b8038/LightweightDecoratorDefinition.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/LightweightDecoratorDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
12128,
4865,
2224,
10361,
2713,
967,
10361,
1435,
5411,
1216,
30015,
288,
3639,
309,
261,
1925,
2249,
9906,
2925,
13,
5411,
327,
446,
31,
3639,
727,
30015,
8526,
4798,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
467,
12128,
4865,
2224,
10361,
2713,
967,
10361,
1435,
5411,
1216,
30015,
288,
3639,
309,
261,
1925,
2249,
9906,
2925,
13,
5411,
327,
446,
31,
3639,
727,
30015,
8526,
4798,
273,
394,
... |
public Dimension getPreferredSize (); | Dimension getPreferredSize(); | public Dimension getPreferredSize (); | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/42de8277e53eabea04a48598c12ed6d488412a7b/ComponentPeer.java/buggy/libjava/java/awt/peer/ComponentPeer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
261,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
261,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
catch (IOException io) { io.printStackTrace(); } | catch (IOException io) { } | @Test public void testByteArrayDimensions() { boolean success = true; try { int imageCount = reader.getImageCount(currentFile); int sizeX = reader.getSizeX(currentFile); int sizeY = reader.getSizeY(currentFile); int bytesPerPixel = FormatReader.getBytesPerPixel(reader.getPixelType(currentFile)); int sizeC = reader.getSizeC(currentFile); boolean rgb = reader.isRGB(currentFile); int expectedBytes = sizeX * sizeY * bytesPerPixel * (rgb ? sizeC : 1); for (int i=0; i<imageCount; i++) { byte[] b = reader.openBytes(currentFile, i); if (b.length != expectedBytes) success = false; } } catch (Exception e) { e.printStackTrace(); success = false; } try { if (!success) { logFile.write(currentFile + " failed byte array test\n"); logFile.flush(); } } catch (IOException io) { io.printStackTrace(); } assertTrue(success); } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/099f018499f749c51c5b9b2e744efa18eb5b8045/ReaderTest.java/clean/loci/formats/test/ReaderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
632,
4709,
1071,
918,
1842,
8826,
10796,
1435,
288,
565,
1250,
2216,
273,
638,
31,
565,
775,
288,
1377,
509,
1316,
1380,
273,
2949,
18,
588,
2040,
1380,
12,
2972,
812,
1769,
1377,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
632,
4709,
1071,
918,
1842,
8826,
10796,
1435,
288,
565,
1250,
2216,
273,
638,
31,
565,
775,
288,
1377,
509,
1316,
1380,
273,
2949,
18,
588,
2040,
1380,
12,
2972,
812,
1769,
1377,
509,
... |
WorkbenchBrowserSupport.getInstance().createBrowser(flags, "org.eclipse.mylar.tasklist", "Browser", "tasktooltip"); | browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, "org.eclipse.mylar.tasklist", "Browser", ""); browser.openURL(null); | public void run(IAction action) { String url = ""; try {// IWebBrowser browser = null; int flags = 0; if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) { flags = WorkbenchBrowserSupport.AS_EDITOR | WorkbenchBrowserSupport.LOCATION_BAR | WorkbenchBrowserSupport.NAVIGATION_BAR; } else { flags = WorkbenchBrowserSupport.AS_EXTERNAL | WorkbenchBrowserSupport.LOCATION_BAR | WorkbenchBrowserSupport.NAVIGATION_BAR; } WorkbenchBrowserSupport.getInstance().createBrowser(flags, "org.eclipse.mylar.tasklist", "Browser", "tasktooltip");// browser.openURL(new URL(url)); } catch (PartInitException e) { MessageDialog.openError(Display.getDefault().getActiveShell(), "URL not found", url + " could not be opened"); } // catch (MalformedURLException e) {// MessageDialog.openError(Display.getDefault().getActiveShell(), "URL not found", url// + " could not be opened");// } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/7209f0cda61e8ca7b3502aaf520755e3f5374bc8/NewWebBrowserAction.java/buggy/sandbox/org.eclipse.mylyn.web.ui/src/org/eclipse/mylyn/internal/web/ui/NewWebBrowserAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
45,
1803,
1301,
13,
288,
202,
202,
780,
880,
273,
1408,
31,
3196,
202,
698,
288,
759,
1082,
202,
45,
4079,
9132,
4748,
273,
446,
31,
1082,
202,
474,
2943,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
12,
45,
1803,
1301,
13,
288,
202,
202,
780,
880,
273,
1408,
31,
3196,
202,
698,
288,
759,
1082,
202,
45,
4079,
9132,
4748,
273,
446,
31,
1082,
202,
474,
2943,
273... |
((PEforCollections) pe).setReceivedResult(ar); logplan.change(pe, null); | } catch (RuntimeException re) { logger.error("Caught exception while processing DelayedAggregateResults for "+pe+"("+id+")", re); | public void execute(LogPlanServesLogicProvider logplan) { Workflow wf = pe.getWorkflow(); // compute the new result from the subtask results. AllocationResult ar = wf.aggregateAllocationResults(); if (ar != null) { // if the aggragation is defined: // get the TaskScoreTable used in the aggregation TaskScoreTable aggTST = ((WorkflowImpl)wf).getCurrentTST(); // get the UID of the child task that caused this aggregation int l = ids.size(); for (int i = 0; i<l; i++) { UID childuid = (UID) ids.get(i); // yuck! another n^2 operation. sigh. // surely we should be able to do better... ((ExpansionImpl)pe).setSubTaskResults(aggTST,childuid); } // set the result on the ((PEforCollections) pe).setReceivedResult(ar); // publish the change to the blackboard. logplan.change(pe, null); // drop the change details. //logplan.change(pe, changes); //System.err.print("="); } } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/d64a1b2a6f1c62758df813345c826defeb9261e6/ReceiveNotificationLP.java/clean/core/src/org/cougaar/planning/ldm/lps/ReceiveNotificationLP.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
12,
1343,
5365,
827,
3324,
20556,
2249,
613,
7088,
13,
288,
1377,
11363,
11578,
273,
2804,
18,
588,
8484,
5621,
1377,
368,
3671,
326,
394,
563,
628,
326,
720,
4146,
1686,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1836,
12,
1343,
5365,
827,
3324,
20556,
2249,
613,
7088,
13,
288,
1377,
11363,
11578,
273,
2804,
18,
588,
8484,
5621,
1377,
368,
3671,
326,
394,
563,
628,
326,
720,
4146,
1686,... |
context.put("tlang", rb); | protected String build_instructor_new_edit_assignment_context(VelocityPortlet portlet, Context context, RunData data, SessionState state) { context.put("tlang", rb); // is the assignment an new assignment String assignmentId = (String) state.getAttribute(EDIT_ASSIGNMENT_ID); if (assignmentId != null) { try { Assignment a = AssignmentService.getAssignment(assignmentId); context.put("assignment", a); } catch (IdUnusedException e) { addAlert(state, rb.getString("cannotfin3") + ": " + assignmentId); } catch (PermissionException e) { addAlert(state, rb.getString("youarenot14") + ": " + assignmentId); } } // set up context variables setAssignmentFormContext(state, context); context.put("fField", state.getAttribute(NEW_ASSIGNMENT_FOCUS)); String sortedBy = (String) state.getAttribute(SORTED_BY); String sortedAsc = (String) state.getAttribute(SORTED_ASC); context.put("sortedBy", sortedBy); context.put("sortedAsc", sortedAsc); String template = (String) getContext(data).get("template"); return template + TEMPLATE_INSTRUCTOR_NEW_EDIT_ASSIGNMENT; } // build_instructor_new_assignment_context | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/6ca0d5287110aec4df5d576206868efddee66ef0/AssignmentAction.java/clean/assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
67,
267,
2732,
67,
2704,
67,
4619,
67,
12960,
67,
2472,
12,
27522,
18566,
13114,
16,
1772,
819,
16,
1939,
751,
501,
16,
1082,
202,
2157,
1119,
919,
13,
202,
95,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
67,
267,
2732,
67,
2704,
67,
4619,
67,
12960,
67,
2472,
12,
27522,
18566,
13114,
16,
1772,
819,
16,
1939,
751,
501,
16,
1082,
202,
2157,
1119,
919,
13,
202,
95,
... | |
Set days = new HashSet(); | Set days = new HashSet(); | public Set getDays(int month, int year) { String start = toKey(year, month, 1); String end = toKey(year, month, 31); List snips = SnipSpace.getInstance().getByDate(start, end); Iterator iterator = snips.iterator(); Set days = new HashSet(); while (iterator.hasNext()) { Snip snip = (Snip) iterator.next(); // test for "2002-03-26" format if (snip.getName().length() == 10) { days.add(snip.getName()); } } return days; } | 6853 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6853/ce40bc073404655fdd633d72fd1b9e545d632e66/Month.java/clean/src/org/snipsnap/date/Month.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1000,
2343,
8271,
12,
474,
3138,
16,
509,
3286,
13,
288,
565,
514,
787,
273,
358,
653,
12,
6874,
16,
3138,
16,
404,
1769,
565,
514,
679,
273,
358,
653,
12,
6874,
16,
3138,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1000,
2343,
8271,
12,
474,
3138,
16,
509,
3286,
13,
288,
565,
514,
787,
273,
358,
653,
12,
6874,
16,
3138,
16,
404,
1769,
565,
514,
679,
273,
358,
653,
12,
6874,
16,
3138,
16,
... |
public Address getUsersMainAddress(int userID) throws EJBException,RemoteException; | public com.idega.core.data.Address getUsersMainAddress(com.idega.user.data.User p0)throws java.rmi.RemoteException, java.rmi.RemoteException; | public Address getUsersMainAddress(int userID) throws EJBException,RemoteException; | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/3f876363b0289328621279dffae1cb2048136b83/UserBusiness.java/buggy/src/java/com/idega/user/business/UserBusiness.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5267,
27564,
6376,
1887,
12,
474,
16299,
13,
1216,
12157,
503,
16,
5169,
503,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5267,
27564,
6376,
1887,
12,
474,
16299,
13,
1216,
12157,
503,
16,
5169,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
LongCounter(String name, boolean start, boolean gconly) { super(name, start, gconly); count = new long[Stats.MAX_PHASES]; | LongCounter(String name) { this(name, true, false); | LongCounter(String name, boolean start, boolean gconly) { super(name, start, gconly); count = new long[Stats.MAX_PHASES]; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/b1d602e0bc7fd879df0cc80e1fa0af2ca44c69e3/LongCounter.java/buggy/MMTk/src/org/mmtk/utility/statistics/LongCounter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3407,
4789,
12,
780,
508,
16,
1250,
787,
16,
1250,
314,
591,
715,
13,
288,
565,
2240,
12,
529,
16,
787,
16,
314,
591,
715,
1769,
565,
1056,
273,
394,
1525,
63,
4195,
18,
6694,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3407,
4789,
12,
780,
508,
16,
1250,
787,
16,
1250,
314,
591,
715,
13,
288,
565,
2240,
12,
529,
16,
787,
16,
314,
591,
715,
1769,
565,
1056,
273,
394,
1525,
63,
4195,
18,
6694,
67,
8... |
Interval theDay = new Interval(date, Period.days(1)); | Interval theDay = date.toInterval(timeZone); | public List getEvents() throws CalendarException { Interval theDay = new Interval(date, Period.days(1)); if (events == null) { if (calendar == null) return Collections.EMPTY_LIST; events = calendar.findEvents(theDay); Collections.sort(events, new EventComparator()); } return events; } | 18469 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/18469/03bf0462052e16faf8bdc800ea80217bb2752cfb/Day.java/buggy/src/java/com/atlassian/confluence/extra/calendar/display/Day.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
31215,
1435,
1216,
5542,
503,
565,
288,
3639,
10803,
326,
4245,
273,
1509,
18,
869,
4006,
12,
957,
4226,
1769,
3639,
309,
261,
5989,
422,
446,
13,
3639,
288,
5411,
309,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
987,
31215,
1435,
1216,
5542,
503,
565,
288,
3639,
10803,
326,
4245,
273,
1509,
18,
869,
4006,
12,
957,
4226,
1769,
3639,
309,
261,
5989,
422,
446,
13,
3639,
288,
5411,
309,
261,
... |
File file = new File ( PLUGIN_PATH + getClassFolder( ) + INPUT_FOLDER + fileName ); | File file = new File ( getClassFolder( ) + INPUT_FOLDER + fileName ); | public void testOpendesign7() throws Exception { openDesign( fileName ); File file = new File ( PLUGIN_PATH + getClassFolder( ) + INPUT_FOLDER + fileName ); InputStream is = new FileInputStream( file ); assertTrue( is != null ); String s7 = PLUGIN_PATH + getClassFolder( ) + INPUT_FOLDER; openDesign( s7 , is ); } | 58644 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58644/bc2117a51472c9631803fa1f26c58ab34da73d07/OpenDesignTest.java/clean/plugins/org.eclipse.birt.report.tests.model/src/org/eclipse/birt/report/tests/model/api/OpenDesignTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
51,
1302,
281,
724,
27,
1435,
1216,
1185,
225,
202,
95,
202,
202,
3190,
15478,
12,
3968,
11272,
202,
202,
812,
585,
273,
394,
1387,
261,
22704,
67,
4211,
397,
2900,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
51,
1302,
281,
724,
27,
1435,
1216,
1185,
225,
202,
95,
202,
202,
3190,
15478,
12,
3968,
11272,
202,
202,
812,
585,
273,
394,
1387,
261,
22704,
67,
4211,
397,
2900,... |
if (matcher.matches()) | if (matcher.matches()) | public String getExternalApiDocRoot(String className) { for (Iterator iter = apiDocMap.entrySet().iterator(); iter.hasNext();) { Map.Entry mapEntry = (Map.Entry)iter.next(); Pattern regex = (Pattern)mapEntry.getKey(); Matcher matcher = regex.matcher(className); if (matcher.matches()) return (String)mapEntry.getValue(); } return null; } | 47201 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47201/79a8c001740f08d96264606e9d548d69f12a9fbf/ClassGraph.java/buggy/src/org/umlgraph/doclet/ClassGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
22319,
3064,
1759,
2375,
12,
780,
2658,
13,
288,
202,
202,
1884,
261,
3198,
1400,
273,
1536,
1759,
863,
18,
4099,
694,
7675,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
22319,
3064,
1759,
2375,
12,
780,
2658,
13,
288,
202,
202,
1884,
261,
3198,
1400,
273,
1536,
1759,
863,
18,
4099,
694,
7675,
9838,
5621,
1400,
18,
5332,
2134,
5621,
13,
2... |
if (determineShouldBeWhiteChecked(treeElement)) setWhiteChecked(treeElement, true); | if (determineShouldBeWhiteChecked(treeElement)) { setWhiteChecked(treeElement, true); } | protected void determineWhiteCheckedDescendents(Object treeElement) { // always go through all children first since their white-checked // statuses will be needed to determine the white-checked status for // this tree element Object[] children = treeContentProvider.getElements(treeElement); for (int i = 0; i < children.length; ++i) determineWhiteCheckedDescendents(children[i]); // now determine the white-checked status for this tree element if (determineShouldBeWhiteChecked(treeElement)) setWhiteChecked(treeElement, true); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/CheckboxTreeAndListGroup.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/CheckboxTreeAndListGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4199,
13407,
11454,
18225,
4877,
12,
921,
2151,
1046,
13,
288,
3639,
368,
3712,
1960,
3059,
777,
2325,
1122,
3241,
3675,
9578,
17,
4532,
3639,
368,
13516,
903,
506,
3577,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4199,
13407,
11454,
18225,
4877,
12,
921,
2151,
1046,
13,
288,
3639,
368,
3712,
1960,
3059,
777,
2325,
1122,
3241,
3675,
9578,
17,
4532,
3639,
368,
13516,
903,
506,
3577,
358,
... |
match(input,35,FOLLOW_35_in_auto_focus1012); | match(input,35,FOLLOW_35_in_auto_focus1058); | public AttributeDescr auto_focus() throws RecognitionException { AttributeDescr d; Token loc=null; Token t=null; d = null; try { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:320:17: ( (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) | (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) ) int alt36=2; int LA36_0 = input.LA(1); if ( LA36_0==35 ) { int LA36_1 = input.LA(2); if ( LA36_1==BOOL ) { alt36=2; } else if ( LA36_1==EOL||LA36_1==16||LA36_1==22||LA36_1==29||LA36_1==31||(LA36_1>=33 && LA36_1<=38) ) { alt36=1; } else { NoViableAltException nvae = new NoViableAltException("315:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 36, 1, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("315:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 36, 0, input); throw nvae; } switch (alt36) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:320:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:320:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:321:25: loc= 'auto-focus' opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,35,FOLLOW_35_in_auto_focus980); following.push(FOLLOW_opt_eol_in_auto_focus982); opt_eol(); following.pop(); // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:321:50: ( ';' )? int alt34=2; int LA34_0 = input.LA(1); if ( LA34_0==16 ) { alt34=1; } else if ( LA34_0==EOL||LA34_0==22||LA34_0==29||LA34_0==31||(LA34_0>=33 && LA34_0<=38) ) { alt34=2; } else { NoViableAltException nvae = new NoViableAltException("321:50: ( \';\' )?", 34, 0, input); throw nvae; } switch (alt34) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:321:50: ';' { match(input,16,FOLLOW_16_in_auto_focus984); } break; } following.push(FOLLOW_opt_eol_in_auto_focus987); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", "true" ); d.setLocation( loc.getLine(), loc.getCharPositionInLine() ); } } break; case 2 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:328:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:328:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:329:25: loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,35,FOLLOW_35_in_auto_focus1012); t=(Token)input.LT(1); match(input,BOOL,FOLLOW_BOOL_in_auto_focus1016); following.push(FOLLOW_opt_eol_in_auto_focus1018); opt_eol(); following.pop(); // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:329:57: ( ';' )? int alt35=2; int LA35_0 = input.LA(1); if ( LA35_0==16 ) { alt35=1; } else if ( LA35_0==EOL||LA35_0==22||LA35_0==29||LA35_0==31||(LA35_0>=33 && LA35_0<=38) ) { alt35=2; } else { NoViableAltException nvae = new NoViableAltException("329:57: ( \';\' )?", 35, 0, input); throw nvae; } switch (alt35) { case 1 : // C:\Projects\jboss-rules\drools-compiler\src\main\resources\org\drools\lang\drl.g:329:57: ';' { match(input,16,FOLLOW_16_in_auto_focus1020); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1023); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", t.getText() ); d.setLocation( loc.getLine(), loc.getCharPositionInLine() ); } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
1171,
202,
202,
72,
273,
446,
31,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
1171,
202,
202,
72,
273,
446,
31,
5... |
office1 = createClusteredPostOffice("node1", "testgroup"); office2 = createClusteredPostOffice("node2", "testgroup"); office3 = createClusteredPostOffice("node3", "testgroup"); | office1 = createClusteredPostOffice(1, "testgroup"); office2 = createClusteredPostOffice(2, "testgroup"); office3 = createClusteredPostOffice(3, "testgroup"); | public final void testClusteredBindUnbind() throws Throwable { ClusteredPostOffice office1 = null; ClusteredPostOffice office2 = null; ClusteredPostOffice office3 = null; try { //Start one office office1 = createClusteredPostOffice("node1", "testgroup"); //Add a couple of bindings LocalClusteredQueue queue1 = new LocalClusteredQueue(office1, "node1", "sub1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding1 = office1.bindClusteredQueue("topic1", queue1); LocalClusteredQueue queue2 = new LocalClusteredQueue(office1, "node1", "sub2", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding2 = office1.bindClusteredQueue("topic1", queue2); //Start another office - make sure it picks up the bindings from the first node office2 = createClusteredPostOffice("node2", "testgroup"); Collection bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); Iterator iter = bindings.iterator(); assertEquivalent(binding1, (Binding)iter.next()); assertEquivalent(binding2, (Binding)iter.next()); //Add another binding on node 2 LocalClusteredQueue queue3 = new LocalClusteredQueue(office2, "node2", "sub3", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding3 = office2.bindClusteredQueue("topic1", queue3); //Make sure both nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding1, (Binding)iter.next()); assertEquivalent(binding2, (Binding)iter.next()); assertEquivalent(binding3, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding1, (Binding)iter.next()); assertEquivalent(binding2, (Binding)iter.next()); assertEquivalent(binding3, (Binding)iter.next()); //Add another binding on node 1 LocalClusteredQueue queue4 = new LocalClusteredQueue(office2, "node2", "sub4", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding4 = office2.bindClusteredQueue("topic1", queue4); // Make sure both nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding1, (Binding)iter.next()); assertEquivalent(binding2, (Binding)iter.next()); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding1, (Binding)iter.next()); assertEquivalent(binding2, (Binding)iter.next()); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); //Unbind binding 1 and binding 2 office1.unbindClusteredQueue("sub1"); office1.unbindClusteredQueue("sub2"); //Make sure bindings are not longer available on either node bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); //Add a third office office3 = createClusteredPostOffice("node3", "testgroup"); //Maks sure it picks up the bindings bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); //Add another binding on node 3 LocalClusteredQueue queue5 = new LocalClusteredQueue(office3, "node3", "sub5", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding5 = office3.bindClusteredQueue("topic1", queue5); // Make sure all nodes pick it up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(3, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); //Add a durable and a non durable binding on node 1 LocalClusteredQueue queue6 = new LocalClusteredQueue(office1, "node1", "sub6", im.getId(), ms, pm, true, true, (QueuedExecutor)pool.get(), null, tr); Binding binding6 = office1.bindClusteredQueue("topic1", queue6); LocalClusteredQueue queue7 = new LocalClusteredQueue(office1, "node1", "sub7", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null, tr); Binding binding7 = office1.bindClusteredQueue("topic1", queue7); // Make sure all nodes pick them up bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); assertEquivalent(binding7, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); assertEquivalent(binding7, (Binding)iter.next()); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(5, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); assertEquivalent(binding7, (Binding)iter.next()); //Stop office 1 office1.stop(); //Need to sleep since it may take some time for the view changed request to reach the //members which causes the bindings to be removed Thread.sleep(1000); //All it's non durable bindings should be removed from the other nodes //Durable bindings should remain bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(4, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding3, (Binding)iter.next()); assertEquivalent(binding4, (Binding)iter.next()); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); //Stop office 2 office2.stop(); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); //Restart office 1 and office 2 office1 = createClusteredPostOffice("node1", "testgroup"); office2 = createClusteredPostOffice("node2", "testgroup"); bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(2, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding5, (Binding)iter.next()); assertEquivalent(binding6, (Binding)iter.next()); //Stop all offices office1.stop(); office2.stop(); office3.stop(); //Start them all office1 = createClusteredPostOffice("node1", "testgroup"); office2 = createClusteredPostOffice("node2", "testgroup"); office3 = createClusteredPostOffice("node3", "testgroup"); //Only the durable queue should survive bindings = office1.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding6, (Binding)iter.next()); bindings = office2.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding6, (Binding)iter.next()); bindings = office3.listBindingsForCondition("topic1"); assertNotNull(bindings); assertEquals(1, bindings.size()); iter = bindings.iterator(); assertEquivalent(binding6, (Binding)iter.next()); } finally { if (office1 != null) { try { office1.unbindClusteredQueue("sub6"); } catch (Exception ignore) { } office1.stop(); } if (office2 != null) { office2.stop(); } if (office3 != null) { office2.stop(); } checkNoBindingData(); } } | 3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/f54f55cea0aabacd10797be5e0ff1d3bd3f8db88/DefaultClusteredPostOfficeTest.java/buggy/tests/src/org/jboss/test/messaging/core/plugin/postoffice/cluster/DefaultClusteredPostOfficeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
727,
918,
1842,
3629,
329,
3357,
984,
4376,
1435,
1216,
4206,
282,
288,
1377,
5584,
329,
3349,
30126,
3397,
1812,
21,
273,
446,
31,
5411,
5584,
329,
3349,
30126,
3397,
1812,
22,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
727,
918,
1842,
3629,
329,
3357,
984,
4376,
1435,
1216,
4206,
282,
288,
1377,
5584,
329,
3349,
30126,
3397,
1812,
21,
273,
446,
31,
5411,
5584,
329,
3349,
30126,
3397,
1812,
22,
273... |
if (this.pattern != null) { this.hatch.setPatternID(this.pattern.getId()); } } | if (this.pattern != null) { this.hatch.setDXFHatchPatternID(this.pattern.getID()); } } | public void endDXFEntity() { if (this.linePattern != null) { this.linePattern.setPattern(this.parameters); } if (this.pattern != null) { this.hatch.setPatternID(this.pattern.getId()); } } | 4096 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4096/97da13d420d72405018ba732b60712bffbfe3482/DXFHatchHandler.java/clean/src/java/org/kabeja/parser/entities/DXFHatchHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
28826,
42,
1943,
1435,
288,
3639,
309,
261,
2211,
18,
1369,
3234,
480,
446,
13,
288,
5411,
333,
18,
1369,
3234,
18,
542,
3234,
12,
2211,
18,
3977,
1769,
3639,
289,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
28826,
42,
1943,
1435,
288,
3639,
309,
261,
2211,
18,
1369,
3234,
480,
446,
13,
288,
5411,
333,
18,
1369,
3234,
18,
542,
3234,
12,
2211,
18,
3977,
1769,
3639,
289,
3639,... |
LayoutCacheUtil.putLayoutCacheResponseData( _companyId, key, data); | if (data.getData().length > 0) { LayoutCacheUtil.putLayoutCacheResponseData( _companyId, key, data); } | public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (USE_LAYOUT_CACHE_FILTER) { _log.debug("Layout cache is enabled"); } else { _log.debug("Layout cache is disabled"); } HttpServletRequest request = (HttpServletRequest)req; HttpServletResponse response = (HttpServletResponse)res; if (USE_LAYOUT_CACHE_FILTER && !_isPortletRequest(request) && _isLayout(request) && !_isSignedIn(request) && !_isInclude(request) && !_isAlreadyFiltered(request)) { request.setAttribute(_ALREADY_FILTERED, Boolean.TRUE); String key = getCacheKey(request); LayoutCacheResponseData data = LayoutCacheUtil.getLayoutCacheResponseData(_companyId, key); if (data == null) { if (!_isCacheable(request)) { _log.debug("Layout is not cacheable " + key); chain.doFilter(req, res); return; } _log.info("Caching layout " + key); LayoutCacheResponse layoutCacheResponse = new LayoutCacheResponse(response); chain.doFilter(req, layoutCacheResponse); data = new LayoutCacheResponseData( layoutCacheResponse.getData(), layoutCacheResponse.getContentType(), layoutCacheResponse.getHeaders()); LayoutCacheUtil.putLayoutCacheResponseData( _companyId, key, data); } Map headers = data.getHeaders(); Iterator itr = headers.keySet().iterator(); while (itr.hasNext()) { String headerKey = (String)itr.next(); List headerValues = (List)headers.get(headerKey); for (int i = 0; i < headerValues.size(); i++) { Header header = (Header)headerValues.get(i); int type = header.getType(); if (type == Header.DATE_TYPE) { response.addDateHeader( headerKey, header.getDateValue()); } else if (type == Header.INTEGER_TYPE) { response.addIntHeader( headerKey, header.getIntValue()); } else if (type == Header.STRING_TYPE) { response.addHeader( headerKey, header.getStringValue()); } } } byte[] byteArray = data.getData(); response.setContentLength(byteArray.length); response.setContentType(data.getContentType()); ServletOutputStream out = response.getOutputStream(); out.write(byteArray, 0, byteArray.length); out.flush(); out.close(); } else { _log.debug("Did not request a layout"); chain.doFilter(req, res); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/9bf311c23d7e8d0ff9d9d1d4e311f822d9559fc9/LayoutCacheFilter.java/buggy/portal-ejb/src/com/liferay/portal/servlet/filters/layoutcache/LayoutCacheFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
1586,
12,
1082,
202,
18572,
1111,
16,
7971,
1064,
400,
16,
4008,
3893,
2687,
13,
202,
202,
15069,
1860,
16,
16517,
288,
202,
202,
430,
261,
8001,
67,
7868,
5069,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
1586,
12,
1082,
202,
18572,
1111,
16,
7971,
1064,
400,
16,
4008,
3893,
2687,
13,
202,
202,
15069,
1860,
16,
16517,
288,
202,
202,
430,
261,
8001,
67,
7868,
5069,
67,... |
public void mMISC() throws RecognitionException { int MISC_StartIndex = input.index(); try { int type = MISC; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 44) ) { return ; } // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:17: ( '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '|' | ',' | '{' | '}' | '[' | ']' | '=' | '/' | '(' | ')' | '\'' | '\\' | '||' | '&&' | '<<<' | '++' | '--' | '>>>' | '==' | '+=' | '=+' | '-=' | '=-' | '*=' | '=*' | '/=' | '=/' ) int alt1=37; switch ( input.LA(1) ) { case '!': alt1=1; break; case '@': alt1=2; break; case '$': alt1=3; break; case '%': alt1=4; break; case '^': alt1=5; break; case '&': int LA1_6 = input.LA(2); if ( LA1_6=='&' ) { alt1=24; } else { alt1=6;} break; case '*': int LA1_7 = input.LA(2); if ( LA1_7=='=' ) { alt1=34; } else { alt1=7;} break; case '_': alt1=8; break; case '-': switch ( input.LA(2) ) { case '=': alt1=32; break; case '-': alt1=27; break; default: alt1=9;} break; case '+': switch ( input.LA(2) ) { case '=': alt1=30; break; case '+': alt1=26; break; default: alt1=10;} break; case '|': int LA1_11 = input.LA(2); if ( LA1_11=='|' ) { alt1=23; } else { alt1=11;} break; case ',': alt1=12; break; case '{': alt1=13; break; case '}': alt1=14; break; case '[': alt1=15; break; case ']': alt1=16; break; case '=': switch ( input.LA(2) ) { case '/': alt1=37; break; case '=': alt1=29; break; case '+': alt1=31; break; case '-': alt1=33; break; case '*': alt1=35; break; default: alt1=17;} break; case '/': int LA1_18 = input.LA(2); if ( LA1_18=='=' ) { alt1=36; } else { alt1=18;} break; case '(': alt1=19; break; case ')': alt1=20; break; case '\'': alt1=21; break; case '\\': alt1=22; break; case '<': alt1=25; break; case '>': alt1=28; break; default: if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("974:1: MISC : ( \'!\' | \'@\' | \'$\' | \'%\' | \'^\' | \'&\' | \'*\' | \'_\' | \'-\' | \'+\' | \'|\' | \',\' | \'{\' | \'}\' | \'[\' | \']\' | \'=\' | \'/\' | \'(\' | \')\' | \'\\\'\' | \'\\\\\' | \'||\' | \'&&\' | \'<<<\' | \'++\' | \'--\' | \'>>>\' | \'==\' | \'+=\' | \'=+\' | \'-=\' | \'=-\' | \'*=\' | \'=*\' | \'/=\' | \'=/\' );", 1, 0, input); throw nvae; } switch (alt1) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:17: '!' { match('!'); if (failed) return ; } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:23: '@' { match('@'); if (failed) return ; } break; case 3 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:29: '$' { match('$'); if (failed) return ; } break; case 4 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:35: '%' { match('%'); if (failed) return ; } break; case 5 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:41: '^' { match('^'); if (failed) return ; } break; case 6 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:47: '&' { match('&'); if (failed) return ; } break; case 7 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:53: '*' { match('*'); if (failed) return ; } break; case 8 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:59: '_' { match('_'); if (failed) return ; } break; case 9 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:65: '-' { match('-'); if (failed) return ; } break; case 10 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:975:71: '+' { match('+'); if (failed) return ; } break; case 11 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:19: '|' { match('|'); if (failed) return ; } break; case 12 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:25: ',' { match(','); if (failed) return ; } break; case 13 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:31: '{' { match('{'); if (failed) return ; } break; case 14 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:37: '}' { match('}'); if (failed) return ; } break; case 15 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:43: '[' { match('['); if (failed) return ; } break; case 16 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:49: ']' { match(']'); if (failed) return ; } break; case 17 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:55: '=' { match('='); if (failed) return ; } break; case 18 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:61: '/' { match('/'); if (failed) return ; } break; case 19 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:67: '(' { match('('); if (failed) return ; } break; case 20 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:73: ')' { match(')'); if (failed) return ; } break; case 21 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:79: '\'' { match('\''); if (failed) return ; } break; case 22 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:976:86: '\\' { match('\\'); if (failed) return ; } break; case 23 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:19: '||' { match("||"); if (failed) return ; } break; case 24 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:26: '&&' { match("&&"); if (failed) return ; } break; case 25 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:33: '<<<' { match("<<<"); if (failed) return ; } break; case 26 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:41: '++' { match("++"); if (failed) return ; } break; case 27 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:48: '--' { match("--"); if (failed) return ; } break; case 28 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:55: '>>>' { match(">>>"); if (failed) return ; } break; case 29 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:63: '==' { match("=="); if (failed) return ; } break; case 30 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:70: '+=' { match("+="); if (failed) return ; } break; case 31 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:77: '=+' { match("=+"); if (failed) return ; } break; case 32 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:84: '-=' { match("-="); if (failed) return ; } break; case 33 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:91: '=-' { match("=-"); if (failed) return ; } break; case 34 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:97: '*=' { match("*="); if (failed) return ; } break; case 35 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:977:104: '=*' { match("=*"); if (failed) return ; } break; case 36 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:978:19: '/=' { match("/="); if (failed) return ; } break; case 37 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:978:26: '=/' { match("=/"); if (failed) return ; } break; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 44, MISC_StartIndex); } } } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/cdf6cb875caeaced53629d36cdc1a31cdc22d9ca/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
7492,
2312,
1435,
1216,
9539,
288,
3639,
509,
20806,
2312,
67,
16792,
273,
810,
18,
1615,
5621,
3639,
775,
288,
5411,
509,
618,
273,
20806,
2312,
31,
5411,
509,
787,
273,
... | ||
cmd.createArg().setValue(jarSource); | cmd.createArg().setValue( jarSource.toString() ); | private void doOneJar(String jarSource, String jarTarget) throws BuildException { if (project.getJavaVersion().equals(Project.JAVA_1_1)) { throw new BuildException("The signjar task is only available on JDK versions 1.2 or greater"); } if (null == alias) { throw new BuildException("alias attribute must be set"); } if (null == storepass) { throw new BuildException("storepass attribute must be set"); } if(isUpToDate(jarSource, jarTarget)) return; final StringBuffer sb = new StringBuffer(); final ExecTask cmd = (ExecTask) project.createTask("exec"); cmd.setExecutable("jarsigner"); if (null != keystore) { cmd.createArg().setValue("-keystore"); cmd.createArg().setValue(keystore); } if (null != storepass) { cmd.createArg().setValue("-storepass"); cmd.createArg().setValue(storepass); } if (null != storetype) { cmd.createArg().setValue("-storetype"); cmd.createArg().setValue(storetype); } if (null != keypass) { cmd.createArg().setValue("-keypass"); cmd.createArg().setValue(keypass); } if (null != sigfile) { cmd.createArg().setValue("-sigfile"); cmd.createArg().setValue(sigfile); } if (null != jarTarget) { cmd.createArg().setValue("-signedjar"); cmd.createArg().setValue(jarTarget); } if (verbose) { cmd.createArg().setValue("-verbose"); } if (internalsf) { cmd.createArg().setValue("-internalsf"); } if (sectionsonly) { cmd.createArg().setValue("-sectionsonly"); } cmd.createArg().setValue(jarSource); cmd.createArg().setValue(alias); log("Signing Jar : " + (new File(jarSource)).getAbsolutePath()); cmd.setFailonerror(true); cmd.setTaskName( getTaskName() ); cmd.execute(); } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/d33d5f77d38d48e5728316c0515aaa85f8905990/SignJar.java/buggy/src/main/org/apache/tools/ant/taskdefs/SignJar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
3335,
10813,
12,
780,
7334,
1830,
16,
514,
7334,
2326,
13,
1216,
18463,
288,
3639,
309,
261,
4406,
18,
588,
5852,
1444,
7675,
14963,
12,
4109,
18,
27264,
67,
21,
67,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
3335,
10813,
12,
780,
7334,
1830,
16,
514,
7334,
2326,
13,
1216,
18463,
288,
3639,
309,
261,
4406,
18,
588,
5852,
1444,
7675,
14963,
12,
4109,
18,
27264,
67,
21,
67,
21,... |
ContextManager.getScalingFactors().setInteresting(scaleDoiSelection(doiScale.getSelection())); | MylarContextManager.getScalingFactors().setInteresting(scaleDoiSelection(doiScale.getSelection())); | public MylarControlPanel(ViewPart part, Composite parent, int style) { super(parent, style); final GridLayout gridLayout_3 = new GridLayout(); gridLayout_3.verticalSpacing = 2; gridLayout_3.marginWidth = 0; gridLayout_3.marginHeight = 0; gridLayout_3.horizontalSpacing = 1; setLayout(gridLayout_3); final Label activeLabel = new Label(this, SWT.NONE); activeLabel.setText("Active tasks "); activeLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING)); // tableViewer = new TableViewer(this, SWT.BORDER);// final GridData gridData = new GridData();// gridData.widthHint = 141;// tableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));// tableViewer.setContentProvider(new ItemContentProvider());// tableViewer.setInput(part.getViewSite());// tableViewer.setLabelProvider(new TaskListLabelProvider()); final Composite group = new Composite(this, SWT.NONE); final GridLayout gridLayout_2 = new GridLayout(); gridLayout_2.verticalSpacing = 0; gridLayout_2.horizontalSpacing = 0; gridLayout_2.marginWidth = 0; gridLayout_2.marginHeight = 0; group.setLayout(gridLayout_2); final GridData gridData_1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL); gridData_1.heightHint = 45; group.setLayoutData(gridData_1); final Composite doiComposite = new Composite(group, SWT.NONE); final GridData gridData_2 = new GridData(GridData.FILL_BOTH); gridData_2.heightHint = 20; gridData_2.widthHint = 191; doiComposite.setLayoutData(gridData_2); final GridLayout gridLayout = new GridLayout(); gridLayout.horizontalSpacing = 1; gridLayout.verticalSpacing = 1; gridLayout.marginWidth = 1; gridLayout.marginHeight = 1; gridLayout.numColumns = 2; doiComposite.setLayout(gridLayout); final Label doiLabel = new Label(doiComposite, SWT.NONE); final GridData gridData_4 = new GridData(); gridData_4.widthHint = 105; doiLabel.setLayoutData(gridData_4); doiLabel.setText(" Degree of interest"); doiScale = new Scale(doiComposite, SWT.NONE); final GridData gridData_3 = new GridData(GridData.FILL_HORIZONTAL); gridData_3.heightHint = 17; doiScale.setLayoutData(gridData_3); doiScale.setPageIncrement(1); doiScale.setSelection(6); doiScale.setMinimum(0); doiScale.setMaximum(12); doiScale.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { ContextManager.getScalingFactors().setInteresting(scaleDoiSelection(doiScale.getSelection())); MylarPlugin.getContextManager().notifyActivePresentationSettingsChange(IMylarContextListener.UpdateKind.SCALING); } public void widgetDefaultSelected(SelectionEvent e) { // don't care about default selection } }); doiScale.addMouseListener(new MouseListener() { public void mouseDoubleClick(MouseEvent e) { // don't care about double click } public void mouseDown(MouseEvent e) { // don't care about mouse down } public void mouseUp(MouseEvent e) { ContextManager.getScalingFactors().setInteresting(scaleDoiSelection(doiScale.getSelection())); MylarPlugin.getContextManager().notifyPostPresentationSettingsChange(IMylarContextListener.UpdateKind.SCALING); } }); final Composite dosComposite = new Composite(group, SWT.NONE); final GridData gridData_2_1 = new GridData(GridData.FILL_BOTH); gridData_2_1.heightHint = 20; gridData_2_1.widthHint = 191; dosComposite.setLayoutData(gridData_2_1); final GridLayout gridLayout_1 = new GridLayout(); gridLayout_1.verticalSpacing = 1; gridLayout_1.horizontalSpacing = 1; gridLayout_1.marginWidth = 1; gridLayout_1.marginHeight = 1; gridLayout_1.numColumns = 2; dosComposite.setLayout(gridLayout_1); final Label dosLabel = new Label(dosComposite, SWT.NONE); final GridData gridData_5 = new GridData(); gridData_5.widthHint = 105; dosLabel.setLayoutData(gridData_5); dosLabel.setBounds(0, 0, 120, 30); dosLabel.setText(" Degree of separation"); dosScale = new Scale(dosComposite, SWT.NONE); final GridData gridData_3_1 = new GridData(GridData.FILL_HORIZONTAL); gridData_3_1.heightHint = 17; dosScale.setIncrement(1); dosScale.setLayoutData(gridData_3_1); dosScale.setMinimum(1); dosScale.setMaximum(5); dosScale.setSelection(2); dosScale.setPageIncrement(1); dosScale.setBounds(0, 0, 120, 30); dosScale.setToolTipText("landmarks | interesting | projects | dependent projects | workspace"); dosScale.addMouseListener(new MouseListener() { public void mouseDoubleClick(MouseEvent e) { // don't care about double click } public void mouseDown(MouseEvent e) { // don't care about mouse down } public void mouseUp(MouseEvent e) { ContextManager.getScalingFactors().setDegreeOfSeparation( dosScale.getSelection()); MylarPlugin.getContextManager().refreshRelatedElements(); } }); // initDragAndDrop(tableViewer);// tableViewer.refresh(); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/5580c363c05d4cd90dae04ce7d09ff123911c303/MylarControlPanel.java/buggy/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/ui/views/MylarControlPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8005,
7901,
3367,
5537,
12,
1767,
1988,
1087,
16,
14728,
982,
16,
509,
2154,
13,
288,
3639,
2240,
12,
2938,
16,
2154,
1769,
3639,
727,
7145,
3744,
3068,
3744,
67,
23,
273,
394,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8005,
7901,
3367,
5537,
12,
1767,
1988,
1087,
16,
14728,
982,
16,
509,
2154,
13,
288,
3639,
2240,
12,
2938,
16,
2154,
1769,
3639,
727,
7145,
3744,
3068,
3744,
67,
23,
273,
394,
71... |
rsp_list=_req.getResults(); if(rsp_list.size() == 0) { if(log.isWarnEnabled()) log.warn(" response list is empty"); return null; | rsp_list = _req.getResults(); if (rsp_list.size() == 0) { if (log.isWarnEnabled()) { log.warn(" response list is empty"); } return null; | public Object sendMessage(Message msg, int mode, long timeout) throws TimeoutException, SuspectedException { Vector mbrs=new Vector(); RspList rsp_list=null; Object dest=msg.getDest(); Rsp rsp; GroupRequest _req=null; if(dest == null) { if(log.isErrorEnabled()) log.error("the message's destination is null, " + "cannot send message"); return null; } mbrs.addElement(dest); // dummy membership (of destination address) _req=new GroupRequest(msg, corr, mbrs, mode, timeout, 0); _req.execute(); if(mode == GroupRequest.GET_NONE) return null; rsp_list=_req.getResults(); if(rsp_list.size() == 0) { if(log.isWarnEnabled()) log.warn(" response list is empty"); return null; } if(rsp_list.size() > 1) if(log.isWarnEnabled()) log.warn("response list contains " + "more that 1 response; returning first response !"); rsp=(Rsp)rsp_list.elementAt(0); if(rsp.wasSuspected()) throw new SuspectedException(dest); if(!rsp.wasReceived()) throw new TimeoutException(); return rsp.getValue(); } | 47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/146a9f744cbe901c4fe56f6ceb2100ee15e7e898/MessageDispatcher.java/clean/src/org/jgroups/blocks/MessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
15399,
12,
1079,
1234,
16,
509,
1965,
16,
1525,
2021,
13,
1216,
23334,
16,
348,
407,
1789,
503,
288,
3639,
5589,
3639,
312,
2848,
87,
33,
2704,
5589,
5621,
3639,
534,
1752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
15399,
12,
1079,
1234,
16,
509,
1965,
16,
1525,
2021,
13,
1216,
23334,
16,
348,
407,
1789,
503,
288,
3639,
5589,
3639,
312,
2848,
87,
33,
2704,
5589,
5621,
3639,
534,
1752,
... |
if (args.length == 0 || args[0].equals("write")) { | if ((args.length == 0) || args[0].equals("write")) { | public static void main(String[] args) throws Exception { if (args.length == 0 || args[0].equals("write")) { writeMPI(new BigInteger("9"), System.out); writeMPI(new BigInteger("1234567890123456789"), System.out); writeMPI(new BigInteger("100200300400500600700800900"), System.out); } else if (args[0].equals("read")) { System.out.println("9"); System.out.println(readMPI(System.in)); System.out.println("1234567890123456789"); System.out.println(readMPI(System.in)); System.out.println("100200300400500600700800900"); System.out.println(readMPI(System.in)); } else if (args[0].equals("write-mpi")) { writeMPI(new BigInteger(args[1]), System.out); } else if (args[0].equals("read-mpi")) { System.err.println(readMPI(System.in)); } else if (args[0].equals("keygen")) { byte[] entropy = readMPI(System.in).toByteArray(); byte[] key = new byte[(args.length > 1 ? Integer.parseInt(args[1]) : 16)]; makeKey(entropy, key, 0, key.length); System.err.println(HexUtil.bytesToHex(key, 0, key.length)); } else if (args[0].equals("shatest")) { synchronized (ctx) { ctx.digest(); ctx.update((byte) 'a'); ctx.update((byte) 'b'); ctx.update((byte) 'c'); System.err.println(HexUtil.bytesToHex(ctx.digest())); } } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/Util.java/buggy/src/freenet/crypt/Util.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
430,
261,
1968,
18,
2469,
422,
374,
747,
833,
63,
20,
8009,
14963,
2932,
2626,
6,
3719,
288,
1082,
202,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1185,
288,
202,
202,
430,
261,
1968,
18,
2469,
422,
374,
747,
833,
63,
20,
8009,
14963,
2932,
2626,
6,
3719,
288,
1082,
202,
26... |
String message = request.getPartAsString("message", 2000); | String message = request.getPartAsString("message", 5*1024); | public void handlePost(URI uri, Bucket data, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { if(data.size() > 1024*1024) { this.writeReply(ctx, 400, "text/plain", "Too big", "Too much data, N2NTM toadlet limited to 1MB"); return; } HTTPRequest request = new HTTPRequest(uri, data, ctx); String pass = request.getPartAsString("formPassword", 32); if((pass == null) || !pass.equals(core.formPassword)) { MultiValueTable headers = new MultiValueTable(); headers.put("Location", "/send_n2ntm/"); ctx.sendReplyHeaders(302, "Found", headers, null, 0); return; } if (request.isPartSet("send")) { String message = request.getPartAsString("message", 2000); message = message.trim(); HTMLNode pageNode = ctx.getPageMaker().getPageNode("Send Node to Node Text Message Processing"); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTable = peerTableInfobox.addChild("table", "class", "n2ntm-send-statuses"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th", "Peer Name"); peerTableHeaderRow.addChild("th", "N2NTM Send Status"); PeerNode[] peerNodes = node.getDarknetConnections(); for(int i = 0; i < peerNodes.length; i++) { if (request.isPartSet("node_"+peerNodes[i].hashCode())) { PeerNode pn = peerNodes[i]; String sendStatusShort; String sendStatusLong; String sendStatusClass; try { Message n2ntm = DMT.createNodeToNodeTextMessage(Node.N2N_TEXT_MESSAGE_TYPE_USERALERT, node.getMyName(), pn.getName(), message); if(!pn.isConnected()) { sendStatusShort = "Queued"; sendStatusLong = "Queued: Peer not connected, so message queued for when it connects"; sendStatusClass = "n2ntm-send-queued"; SimpleFieldSet fs = new SimpleFieldSet(); fs.put("type", Integer.toString(Node.N2N_TEXT_MESSAGE_TYPE_USERALERT)); fs.put("source_nodename", Base64.encode(node.getMyName().getBytes())); fs.put("target_nodename", Base64.encode(pn.getName().getBytes())); fs.put("text", Base64.encode(message.getBytes())); pn.queueN2NTM(fs); Logger.normal(this, "Queued N2NTM to '"+pn.getName()+"': "+message); } else if(pn.getPeerNodeStatus() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF) { sendStatusShort = "Delayed"; sendStatusLong = "Backed off: Sending of message possibly delayed to peer"; sendStatusClass = "n2ntm-send-delayed"; usm.send(pn, n2ntm, null); Logger.normal(this, "Sent N2NTM to '"+pn.getName()+"': "+message); } else { sendStatusShort = "Sent"; sendStatusLong = "Message sent to peer"; sendStatusClass = "n2ntm-send-sent"; usm.send(pn, n2ntm, null); Logger.normal(this, "Sent N2NTM to '"+pn.getName()+"': "+message); } } catch (NotConnectedException e) { sendStatusShort = "Failed"; sendStatusLong = "Message not sent to peer: peer not connected"; sendStatusClass = "n2ntm-send-failed"; } HTMLNode peerRow = peerTable.addChild("tr"); peerRow.addChild("td", "class", "peer-name").addChild("#", pn.getName()); peerRow.addChild("td", "class", sendStatusClass).addChild("span", new String[] { "title", "style" }, new String[] { sendStatusLong, "border-bottom: 1px dotted; cursor: help;" }, sendStatusShort); } } HTMLNode infoboxContent = peerTableInfobox.addChild("div", "class", "n2ntm-message-text"); infoboxContent.addChild("#", message); HTMLNode list = peerTableInfobox.addChild("ul"); list.addChild("li").addChild("a", new String[] { "href", "title" }, new String[] { "/", "Back to node homepage" }, "Homepage"); list.addChild("li").addChild("a", new String[] { "href", "title" }, new String[] { "/darknet/", "Back to darknet connections" }, "Darknet connections"); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); return; } MultiValueTable headers = new MultiValueTable(); headers.put("Location", "/darknet/"); ctx.sendReplyHeaders(302, "Found", headers, null, 0); } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/73ddfd0db1daa02b0880536dcbb3e653a614d21d/N2NTMToadlet.java/buggy/src/freenet/clients/http/N2NTMToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
225,
309,
12,
892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1640,
3349,
12,
3098,
2003,
16,
7408,
501,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
202,
225,
309,
12,
892,
... |
return UNCHANGED; | return DefUseEffect.UNCHANGED; | private static byte longCondMove(OPT_Instruction s) { { OPT_Operand val1 = CondMove.getVal1(s); OPT_Operand val2 = CondMove.getVal2(s); int cond = CondMove.getCond(s).evaluate(val1, val2); if (cond != OPT_ConditionOperand.UNKNOWN) { // BOTH CONSTANTS OR SIMILAR: FOLD OPT_Operand val = (cond == OPT_ConditionOperand.TRUE) ? CondMove.getClearTrueValue(s) : CondMove.getClearFalseValue(s); Move.mutate(s, LONG_MOVE, CondMove.getClearResult(s), val); return val.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } if (val1.isConstant() && !val2.isConstant()) { // Canonicalize by switching operands and fliping code. OPT_Operand tmp = CondMove.getClearVal1(s); CondMove.setVal1(s, CondMove.getClearVal2(s)); CondMove.setVal2(s, tmp); CondMove.getCond(s).flipOperands(); } OPT_Operand tv = CondMove.getTrueValue(s); OPT_Operand fv = CondMove.getFalseValue(s); if (tv.similar(fv)) { Move.mutate(s, LONG_MOVE, CondMove.getClearResult(s), tv); return tv.isConstant() ? MOVE_FOLDED : MOVE_REDUCED; } if (tv.isLongConstant() && fv.isLongConstant() && !CondMove.getCond(s).isFLOATINGPOINT()) { long itv = tv.asLongConstant().value; long ifv = fv.asLongConstant().value; OPT_Operator op = null; if(val1.isLong()) { op = BOOLEAN_CMP_LONG; } else if(val1.isFloat()) { op = BOOLEAN_CMP_FLOAT; } else if(val1.isDouble()) { op = BOOLEAN_CMP_DOUBLE; } else { op = BOOLEAN_CMP_INT; } if (itv == 1 && ifv == 0) { BooleanCmp.mutate(s, op, CondMove.getClearResult(s), CondMove.getClearVal1(s), CondMove.getClearVal2(s), CondMove.getClearCond(s), new OPT_BranchProfileOperand()); return REDUCED; } if (itv == 0 && ifv == 1) { BooleanCmp.mutate(s, op, CondMove.getClearResult(s), CondMove.getClearVal1(s), CondMove.getClearVal2(s), CondMove.getClearCond(s).flipCode(), new OPT_BranchProfileOperand()); return REDUCED; } } } return UNCHANGED; } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/4f52a59569c48e68010a63e605ee6691083a9e97/OPT_Simplifier.java/buggy/rvm/src/com/ibm/jikesrvm/opt/OPT_Simplifier.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
1525,
12441,
7607,
12,
15620,
67,
11983,
272,
13,
288,
282,
288,
1377,
16456,
67,
10265,
1244,
21,
273,
735,
72,
7607,
18,
588,
3053,
21,
12,
87,
1769,
1377,
16456,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
1160,
1525,
12441,
7607,
12,
15620,
67,
11983,
272,
13,
288,
282,
288,
1377,
16456,
67,
10265,
1244,
21,
273,
735,
72,
7607,
18,
588,
3053,
21,
12,
87,
1769,
1377,
16456,
67,... |
System.out.println( | log.warn( | public String nextKeyStroke() { String s = ""; boolean gotOne = false; int start = index; if(length > index) { sb.setLength(0); char c = keyStrokes.charAt(index); switch(c) { case '[': sb.append(c); index++; // we need to throw an error here if(index >= length) { System.out.println(" mnemonic key was incomplete :1 " + "at position " + index + " len " + length ); } else { c = keyStrokes.charAt(index); if(c == '[') index++; else { while(!gotOne) { if(c == ']') { // did we find an ending sb.append(c); index++; gotOne = true; } else { sb.append(c); index++; // we need to throw an error here because we did not // find an ending for the potential mnemonic if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :2 " + "at position " + index); } c = keyStrokes.charAt(index); } } } } break; case ']': index++; if(index >= length) { System.out.println( " mnemonic key was incomplete ending not found :3 " + "at position " + index); sb.append(c); index++; } else { c = keyStrokes.charAt(index); if(c == ']') { sb.append(c); index++; } else { System.out.println( " mnemonic key was incomplete beginning not found :4 " + "at position " + index); } } break; default: sb.append(c); index++; break; } if(sb != null) { s = new String(sb); } }// System.out.println("next "+ keyStrokes); return s; } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/KeyStrokenizer.java/buggy/tn5250j/src/org/tn5250j/KeyStrokenizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1024,
653,
14602,
1435,
288,
1377,
514,
272,
273,
1408,
31,
1377,
1250,
2363,
3335,
273,
629,
31,
1377,
509,
787,
273,
770,
31,
1377,
309,
12,
2469,
405,
770,
13,
288,
540,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1024,
653,
14602,
1435,
288,
1377,
514,
272,
273,
1408,
31,
1377,
1250,
2363,
3335,
273,
629,
31,
1377,
509,
787,
273,
770,
31,
1377,
309,
12,
2469,
405,
770,
13,
288,
540,
... |
Vector xpaths = parse(reference); | Vector xpaths = new Vector(); Vector namespaces = new Vector(); parse(reference, xpaths, namespaces); | public Vector select(Node node, String reference) throws Exception { Vector xpaths = parse(reference); Vector nodes = new Vector(); for (int i = 0; i < xpaths.size(); i++) { Vector n = xpointer.select(node, (String) xpaths.elementAt(i)); for (int j = 0; j < n.size(); j++) { nodes.addElement(n.elementAt(j)); } } return nodes; } | 45951 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45951/285613cd01981da9ba84bfce21fd52077cc60d79/XPointerFactory.java/buggy/src/java/org/apache/lenya/xml/XPointerFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5589,
2027,
12,
907,
756,
16,
514,
2114,
13,
1216,
1185,
288,
3639,
5589,
619,
4481,
273,
394,
5589,
5621,
5589,
7728,
273,
394,
5589,
5621,
1109,
12,
6180,
16,
619,
4481,
16,
772... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5589,
2027,
12,
907,
756,
16,
514,
2114,
13,
1216,
1185,
288,
3639,
5589,
619,
4481,
273,
394,
5589,
5621,
5589,
7728,
273,
394,
5589,
5621,
1109,
12,
6180,
16,
619,
4481,
16,
772... |
public void begin(InterpretationContext ec, String name, Attributes attributes) throws ActionException { inError = false; try { ec.pushObject(context); } catch (Exception oops) { inError = true; addError( "Could not push context", oops); throw new ActionException(ActionException.SKIP_CHILDREN, oops); } } | 53733 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53733/cd5686d976f1993d6cc606a0b2d7b9f8ae6f1a31/FruitContextAction.java/clean/logback-core/src/test/java/ch/qos/logback/core/joran/ia/FruitContextAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
10086,
12,
2465,
15089,
367,
1042,
557,
16,
780,
529,
16,
2498,
4350,
13,
15069,
1803,
503,
95,
267,
668,
33,
5743,
31,
698,
95,
557,
18,
6206,
921,
12,
2472,
1769,
97,
14683,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
10086,
12,
2465,
15089,
367,
1042,
557,
16,
780,
529,
16,
2498,
4350,
13,
15069,
1803,
503,
95,
267,
668,
33,
5743,
31,
698,
95,
557,
18,
6206,
921,
12,
2472,
1769,
97,
14683,
... | ||
EncryptionKey signKey = net.suberic.pooka.gui.crypto.CryptoKeySelector.selectPrivateKey(); | java.security.Key signKey = net.suberic.pooka.gui.crypto.CryptoKeySelector.selectPrivateKey(); | public void actionPerformed(ActionEvent e) { getNewMessageInfo().setSignMessage(NewMessageInfo.CRYPTO_YES); if (getNewMessageInfo().getSignatureKey() == null && (getDefaultProfile() == null || getDefaultProfile().getEncryptionKey() == null)) { try { EncryptionKey signKey = net.suberic.pooka.gui.crypto.CryptoKeySelector.selectPrivateKey(); getNewMessageInfo().setSignatureKey(signKey); } catch (Exception ex) { getMessageUI().showError(ex.getMessage(), ex); } } } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/28d383fe52e093c1e6630b8de08c3e36e0dc36ac/NewMessageProxy.java/clean/net/suberic/pooka/gui/NewMessageProxy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1377,
12654,
1079,
966,
7675,
542,
2766,
1079,
12,
1908,
1079,
966,
18,
14306,
51,
67,
29081,
1769,
1377,
309,
261,
588,
1908,
1079,
966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
1377,
12654,
1079,
966,
7675,
542,
2766,
1079,
12,
1908,
1079,
966,
18,
14306,
51,
67,
29081,
1769,
1377,
309,
261,
588,
1908,
1079,
966,
... |
if (props != null) ctx = new InitialContext(props); else ctx = new InitialContext(); | ctx = (props != null) ? new InitialContext(props) : new InitialContext(); | private void init() { if (!isAlwaysLookup()) { Context ctx = null; try { if (props != null) ctx = new InitialContext(props); else ctx = new InitialContext(); datasource = (DataSource) ctx.lookup(url); } catch (Exception e) { getLog().error( "Error looking up datasource: " + e.getMessage(), e); } finally { if(ctx != null) try { ctx.close(); } catch(Exception ignore) {} } } } | 55677 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55677/cf7f5f77ce5bb6364145230d302b86f1cdadea88/JNDIConnectionProvider.java/buggy/src/java/org/quartz/utils/JNDIConnectionProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
288,
3639,
309,
16051,
291,
18806,
6609,
10756,
288,
5411,
1772,
1103,
273,
446,
31,
5411,
775,
288,
7734,
309,
261,
9693,
480,
446,
13,
1103,
273,
394,
10188,
1042... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1208,
1435,
288,
3639,
309,
16051,
291,
18806,
6609,
10756,
288,
5411,
1772,
1103,
273,
446,
31,
5411,
775,
288,
7734,
309,
261,
9693,
480,
446,
13,
1103,
273,
394,
10188,
1042... |
if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} | finally { } | public void mBXOR_ASSIGN() throws RecognitionException { int type = BXOR_ASSIGN; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:134:15: ( '^=' ) // /Users/bob/Documents/workspace/jbossrules/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParser.lexer.g:134:15: '^=' { match("^="); } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/7e425814ce563fcc662b266adb2a4dc8e1a95d19/JavaParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/semantics/java/parser/JavaParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
38,
60,
916,
67,
23289,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
605,
60,
916,
67,
23289,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
312,
38,
60,
916,
67,
23289,
1435,
1216,
9539,
288,
3639,
509,
618,
273,
605,
60,
916,
67,
23289,
31,
3639,
509,
787,
273,
23577,
1016,
5621,
3639,
509,
980,
273,
9851,
5621,... |
if (rs.getInt(2) != 0){ | if (rs.getInt(2) != 0) { | public static void main (String [] args) throws Exception{ String USAGE = "Usage: java JobFlagReport [options] <date (YYYY-MM-DD)> Enter -help for a list of options\n"; String HELP = "Where [options] are:\n"+ " -help Displays help\n"+ " -step <day|month> Specifies size of step (day by default)\n"+ " -n <steps> Specifies number of steps to do\n"; if (args.length == 0){ System.err.println(USAGE); System.exit(1); } else if (args.length == 1 && args[0].equalsIgnoreCase("-help")){ System.err.println(USAGE); System.err.println(HELP); System.exit(1); } int n = 1; String stepStr = "day"; for (int i=0;i<args.length-1;i++){ if (args[i].equals("-n")) { n = Integer.parseInt(args[++i]); } else if (args[i].equals("-step")) { stepStr = args[++i]; } else if (args[i].equalsIgnoreCase("-help")) { System.err.println(USAGE); System.err.println(HELP); System.exit(1); } else { System.err.println("Unknown argument: " + args[i]); System.exit(1); } } String inputDate = args[args.length-1]; DecimalFormat f = (DecimalFormat) NumberFormat.getInstance(Locale.US); f.setMaximumFractionDigits(3); String [] faultNames = {"FAULT_CLASS_UNKNOWN","FAULT_CLASS_CREDENTIAL_SERIALIZATION","FAULT_CLASS_EXECUTION_FAILED","FAULT_CLASS_FAULT","FAULT_CLASS_FILE_PERMISSIONS","FAULT_CLASS_INSUFFICIENT_CREDENTIALS","FAULT_CLASS_INTERNAL","FAULT_CLASS_INVALID_CREDENTIALS","FAULT_CLASS_INVALID_PATH","FAULT_CLASS_SERVICE_LEVEL_AGREEMENT","FAULT_CLASS_STAGING","FAULT_CLASS_UNSUPPORTED_FEATURE"}; TimeStep ts = new TimeStep (stepStr, n, inputDate); System.out.println("<report>"); DatabaseRetriever dbr = new DatabaseRetriever(); HistogramParser gt2hist = new HistogramParser("Breakdown of GT2 Codes", "gt2histogram", "Jobs with Each Error code", n); HistogramParser faulthist = new HistogramParser("Breakdown of Fault Classes", "faulthistogram", "Number of Jobs with Fault Class", n); while(ts.next()){ Date startTime = ts.getTime(); String startDate = ts.getFormattedTime(); ts.stepTime(); gt2hist.nextEntry(startDate, ts.getFormattedTime()); faulthist.nextEntry(startDate, ts.getFormattedTime()); int totalJobs = 0; int gt2Jobs = 0; int faultJobs = 0; ResultSet rs = dbr.retrieve(new String ("gram_packets"), new String [] {"gt2_error_code","fault_class"}, startTime, ts.getTime()); while (rs.next()){ totalJobs++; if (rs.getInt(1) != 0){ gt2Jobs++; gt2hist.addData(rs.getString(1), 1); } if (rs.getInt(2) != 0){ faultJobs++; faulthist.addData(faultNames[rs.getInt(2)], 1); } } rs.close(); System.out.println(" <entry>"); System.out.println("\t<start-date>" + startDate + "</start-date>"); System.out.println("\t<end-date>" + ts.getFormattedTime() + "</end-date>"); System.out.println("\t<total-jobs>"+totalJobs+"</total-jobs>"); System.out.println("\t<jobs-with-error-code>"+f.format(100.0*gt2Jobs/totalJobs)+"</jobs-with-error-code>"); System.out.println("\t<jobs-with-fault>"+f.format(100.0*faultJobs/totalJobs)+"</jobs-with-fault>"); System.out.println(" </entry>"); } dbr.close(); gt2hist.output(System.out); faulthist.output(System.out); System.out.println("</report>"); } | 8754 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8754/efb83d08bf3214ba362adb9486345c128a00bae7/ErrorReport.java/clean/usage/java/reports/source/src/org/globus/usage/report/gram/ErrorReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
261,
780,
5378,
833,
13,
1216,
1185,
95,
3639,
514,
11836,
2833,
273,
315,
5357,
30,
2252,
3956,
4678,
4820,
306,
2116,
65,
411,
712,
261,
26287,
17,
8206,
17,
569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
261,
780,
5378,
833,
13,
1216,
1185,
95,
3639,
514,
11836,
2833,
273,
315,
5357,
30,
2252,
3956,
4678,
4820,
306,
2116,
65,
411,
712,
261,
26287,
17,
8206,
17,
569... |
boolean virtual = VIRTUAL; | public void run(String arg) { OpenDialog od = new OpenDialog("Open Sequence of Image Stacks:", ""); String directory = od.getDirectory(); String name = od.getFileName(); if (name == null) return; // find all the files having similar names (using FilePattern class) String pattern = FilePattern.findPattern(name, directory); FilePattern fp = new FilePattern(pattern); String[] filenames = fp.getFiles(); // all the image files int numFiles = filenames.length; // trim directory prefix from filename list int dirLen = directory.length(); for (int i=0; i<filenames.length; i++) { int q = dirLen; while (filenames[i].charAt(q) == File.separatorChar) q++; filenames[i] = filenames[i].substring(q); } if (DEBUG) { log("directory", directory); log("name", name); log("pattern", pattern); log("filenames", filenames); } boolean virtual = VIRTUAL; // read images int depth = 0, width = 0, height = 0, type = 0; ImageStack stack = null; VirtualStack vstack = null; FileInfo fi = null; try { for (int i=0; i<filenames.length; i++) { // open image ImagePlus imp = new Opener().openImage(directory, filenames[i]); if (imp == null) { // invalid image log(filenames[i] + ": unable to open"); continue; } if (stack == null) { // first image in the stack depth = imp.getStackSize(); width = imp.getWidth(); height = imp.getHeight(); type = imp.getType(); ColorModel cm = imp.getProcessor().getColorModel(); if (virtual) stack = new VirtualStack(width, height, cm, directory); else stack = new ImageStack(width, height, cm); // save original file info fi = imp.getOriginalFileInfo(); } // verify image is sane int w = imp.getWidth(), h = imp.getHeight(), t = imp.getType(); if (w != width || h != height) { // current image dimension different than those in the stack log(filenames[i] + ": wrong dimensions (" + w + " x " + h + " instead of " + width + " x " + height + ")"); continue; } if (t != type) { // current image file type different than those in the stack log(filenames[i] + ": wrong type (" + t + " instead of " + type + ")"); continue; } // process every slice in each stack for (int j=1; j<=depth; j++) { imp.setSlice(j); stack.addSlice(imp.getTitle(), imp.getProcessor()); } } if (stack == null || stack.getSize() == 0) { // all image files were invalid msg("No valid files found."); return; } } catch (OutOfMemoryError e) { IJ.outOfMemory("LociDataBrowser"); if (stack != null) stack.trim(); } if (DEBUG) { log("depth", depth); log("width", width); log("height", height); log("type", type); log("description", fi == null ? null : fi.description); } // populate names list names = new String[numFiles * depth]; for (int i=0; i<filenames.length; i++) { Arrays.fill(names, depth * i, depth * (i + 1), filenames[i]); } if (DEBUG) log("names", names); // gather more pattern information BigInteger[] first = fp.getFirst(); BigInteger[] last = fp.getLast(); BigInteger[] step = fp.getStep(); int[] count = fp.getCount(); String[] pre = fp.getPrefixes(); if (DEBUG) { log("first", first); log("last", last); log("step", step); log("count", count); log("pre", pre); } // compile axis lengths lengths = new int[count.length + 1]; lengths[0] = depth; System.arraycopy(count, 0, lengths, 1, count.length); // skip singleton axes boolean[] match = new boolean[lengths.length]; int remain = lengths.length; for (int i=0; i<match.length; i++) { if (lengths[i] == 1) { match[i] = true; remain--; } } // determine which axes are which zIndex = tIndex = cIndex = -1; for (int i=1; i<=pre.length; i++) { if (match[i]) continue; // remove trailing digits and capitalize String p = pre[i - 1].replaceAll("\\d+$", ""); if (i == 1) name = p; p = p.toUpperCase(); // check for Z endings if (zIndex < 0) { for (int j=0; j<PRE_Z.length; j++) { if (p.endsWith(PRE_Z[j])) { zIndex = i; match[i] = true; remain--; break; } } if (match[i]) continue; } // check for T endings if (tIndex < 0) { for (int j=0; j<PRE_T.length; j++) { if (p.endsWith(PRE_T[j])) { tIndex = i; match[i] = true; remain--; break; } } if (match[i]) continue; } // check for C endings if (cIndex < 0) { for (int j=0; j<PRE_C.length; j++) { if (p.endsWith(PRE_C[j])) { cIndex = i; match[i] = true; remain--; break; } } if (match[i]) continue; // check for 2-3 numbering (C) if (first[i - 1].intValue() == 2 && last[i - 1].intValue() == 3 && step[i - 1].intValue() == 1) { cIndex = i; match[i] = true; remain--; break; } } } // assign as many remaining axes as possible for (int i=0; i<match.length; i++) { if (match[i]) continue; if (remain == 1) { // TZC // e.g., tubhiswt_C<1-2>.tiff, mri-stack.tif if (tIndex < 0) tIndex = i; else if (zIndex < 0) zIndex = i; else if (cIndex < 0) cIndex = i; } else { // ZTC // e.g., sdub<1-12>.pic, TAABA<1-45>.pic if (zIndex < 0) zIndex = i; else if (tIndex < 0) tIndex = i; else if (cIndex < 0) cIndex = i; } } hasZ = zIndex >= 0; hasT = tIndex >= 0; hasC = cIndex >= 0; numZ = hasZ ? lengths[zIndex] : 1; numT = hasT ? lengths[tIndex] : 1; numC = hasC ? lengths[cIndex] : 1; if (DEBUG) { log("lengths", lengths); log("zIndex = " + zIndex); log("tIndex = " + tIndex); log("cIndex = " + cIndex); log("hasZ = " + hasZ); log("hasT = " + hasT); log("hasC = " + hasC); log("numZ = " + numZ); log("numT = " + numT); log("numC = " + numC); } // strip off endings, if any, from name int zLen = PRE_Z.length, tLen = PRE_T.length, cLen = PRE_C.length; String[] endings = new String[zLen + tLen + cLen]; System.arraycopy(PRE_Z, 0, endings, 0, zLen); System.arraycopy(PRE_T, 0, endings, zLen, tLen); System.arraycopy(PRE_C, 0, endings, zLen + tLen, cLen); name = strip(name, endings); // display image onscreen ImagePlus imp = new ImagePlus(name, stack); if (fi != null) imp.setFileInfo(fi); show(imp); } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/ea45cb2276f32a54ab285c305c9b15d667479193/LociDataBrowser.java/buggy/loci/browser/LociDataBrowser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
12,
780,
1501,
13,
288,
565,
3502,
6353,
28541,
273,
394,
3502,
6353,
2932,
3678,
8370,
434,
3421,
7283,
87,
2773,
16,
1408,
1769,
565,
514,
1867,
273,
28541,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1086,
12,
780,
1501,
13,
288,
565,
3502,
6353,
28541,
273,
394,
3502,
6353,
2932,
3678,
8370,
434,
3421,
7283,
87,
2773,
16,
1408,
1769,
565,
514,
1867,
273,
28541,
18,
588,
... | |
sendElementEvent("references"); | sendIndentedElement("attribute"); sendElementEvent("namespaceName", DOMUtil.getNamespaceURI(att)); sendElementEvent("localName", DOMUtil.getLocalName(att)); sendElementEvent("prefix", att.getPrefix()); sendElementEvent("normalizedValue", att.getValue()); sendElementEvent( "specified", String.valueOf(att.getSpecified())); sendElementEvent("attributeType"); | private void processDOMAttributes(Element elem, String tagName) { Attr[] atts = elem == null ? null : DOMUtil.getAttrs(elem); if (atts == null || atts.length == 0) { sendEmptyElementEvent(tagName); } else { sendIndentedElement(tagName); for (int i = 0; i < atts.length; i++) { Attr att = (Attr)atts[i]; sendIndentedElement("attribute"); sendElementEvent("namespaceName", DOMUtil.getNamespaceURI(att)); sendElementEvent("localName", DOMUtil.getLocalName(att)); sendElementEvent("prefix", att.getPrefix()); sendElementEvent("normalizedValue", att.getValue()); sendElementEvent("specified", String.valueOf(att.getSpecified())); sendElementEvent("attributeType"); // this property isn't relevent to PSVI sendElementEvent("references"); sendUnIndentedElement("attribute"); } sendUnIndentedElement(tagName); } } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/41ad82c91d65cd350427ad97bcf1253b29ac4227/PSVIWriter.java/buggy/samples/xni/PSVIWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
8168,
2498,
12,
1046,
3659,
16,
514,
7196,
13,
288,
3639,
11289,
8526,
15687,
273,
3659,
422,
446,
692,
446,
294,
4703,
1304,
18,
588,
8262,
12,
10037,
1769,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1207,
8168,
2498,
12,
1046,
3659,
16,
514,
7196,
13,
288,
3639,
11289,
8526,
15687,
273,
3659,
422,
446,
692,
446,
294,
4703,
1304,
18,
588,
8262,
12,
10037,
1769,
3639,
309,
... |
setupBufferedIO(); | public void putc(int c) throws IOException, BadDescriptorException { checkWritable(); setupBufferedIO(); if (!outBuffer.hasRemaining()) { outBuffer.flip(); flushOutBuffer(); } outBuffer.put((byte) (c & 0xff)); } | 48300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48300/a6049d13f9eab0fce512fac5890ac20bf9ba9a27/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
71,
12,
474,
276,
13,
1216,
1860,
16,
6107,
3187,
503,
288,
3639,
866,
12061,
5621,
9079,
309,
16051,
659,
1892,
18,
5332,
11429,
10756,
288,
5411,
596,
1892,
18,
12357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1378,
71,
12,
474,
276,
13,
1216,
1860,
16,
6107,
3187,
503,
288,
3639,
866,
12061,
5621,
9079,
309,
16051,
659,
1892,
18,
5332,
11429,
10756,
288,
5411,
596,
1892,
18,
12357,
... | |
AST __t805 = _t; AST tmp59_AST_in = (AST)_t; | AST __t312 = _t; AST tmp61_AST_in = (AST)_t; | public final Expression primaryExpr(AST _t, PathExpr path ) throws RecognitionException, PermissionDeniedException,EXistException,XPathException { Expression step; AST primaryExpr_AST_in = (AST)_t; AST v = null; step = null; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ELEMENT: case TEXT: case LCURLY: case XML_COMMENT: case XML_PI: { step=constructor(_t,path); _t = _retTree; step=predicates(_t,step); _t = _retTree; path.add(step); break; } case PARENTHESIZED: { AST __t805 = _t; AST tmp59_AST_in = (AST)_t; match(_t,PARENTHESIZED); _t = _t.getFirstChild(); PathExpr pathExpr= new PathExpr(context); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case QNAME: case PARENTHESIZED: case ABSOLUTE_SLASH: case ABSOLUTE_DSLASH: case WILDCARD: case PREFIX_WILDCARD: case FUNCTION: case UNARY_MINUS: case UNARY_PLUS: case VARIABLE_REF: case ELEMENT: case TEXT: case NCNAME: case STRING_LITERAL: case EQ: case LCURLY: case COMMA: case STAR: case PLUS: case LITERAL_if: case LITERAL_return: case LITERAL_or: case LITERAL_and: case LITERAL_cast: case LITERAL_eq: case LITERAL_ne: case LITERAL_lt: case LITERAL_le: case LITERAL_gt: case LITERAL_ge: case NEQ: case GT: case GTEQ: case LT: case LTEQ: case ANDEQ: case OREQ: case LITERAL_to: case MINUS: case LITERAL_div: case LITERAL_idiv: case LITERAL_mod: case UNION: case LITERAL_intersect: case LITERAL_except: case SLASH: case DSLASH: case LITERAL_text: case LITERAL_node: case SELF: case XML_COMMENT: case AT: case PARENT: case LITERAL_child: case LITERAL_self: case LITERAL_attribute: case LITERAL_descendant: case 113: case 114: case LITERAL_parent: case LITERAL_ancestor: case 117: case 118: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: case XML_PI: { step=expr(_t,pathExpr); _t = _retTree; break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t805; _t = _t.getNextSibling(); step=predicates(_t,pathExpr); _t = _retTree; path.add(step); break; } case STRING_LITERAL: case DOUBLE_LITERAL: case DECIMAL_LITERAL: case INTEGER_LITERAL: { step=literalExpr(_t,path); _t = _retTree; step=predicates(_t,step); _t = _retTree; path.add(step); break; } case VARIABLE_REF: { v = (AST)_t; match(_t,VARIABLE_REF); _t = _t.getNextSibling(); step= new VariableReference(context, v.getText()); step=predicates(_t,step); _t = _retTree; path.add(step); break; } case FUNCTION: { step=functionCall(_t,path); _t = _retTree; step=predicates(_t,step); _t = _retTree; path.add(step); break; } default: { throw new NoViableAltException(_t); } } _retTree = _t; return step; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/722cca774247887cf67fef993c71f848a05e075f/XPathTreeParser2.java/clean/src/org/exist/parser/XPathTreeParser2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3354,
4742,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
5371,
225,
3354,
4742,
12,
9053,
389,
88,
16,
202,
202,
743,
4742,
589,
202,
13,
1216,
9539,
16,
8509,
15877,
16,
2294,
376,
503,
16,
14124,
503,
288,
202,
202,
2300,
2... |
if (tostdout) { System.out.print("DEBUG: "); System.out.println(s); } else { ((org.apache.log4j.Category)logger).debug(s); | if (debug) { if (tostdout) { System.out.print("DEBUG: "); System.out.println(s); } else { ((org.apache.log4j.Category)logger).debug(s); } | public void debug(String s) { if (tostdout) { System.out.print("DEBUG: "); System.out.println(s); } else { ((org.apache.log4j.Category)logger).debug(s); } } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/342447ed2924bc955b0db9bbbd7e9fab61f13432/LoggingTool.java/buggy/org/openscience/cdk/tools/LoggingTool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1198,
12,
780,
272,
13,
288,
3639,
309,
261,
88,
669,
72,
659,
13,
288,
5411,
2332,
18,
659,
18,
1188,
2932,
9394,
30,
315,
1769,
5411,
2332,
18,
659,
18,
8222,
12,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1198,
12,
780,
272,
13,
288,
3639,
309,
261,
88,
669,
72,
659,
13,
288,
5411,
2332,
18,
659,
18,
1188,
2932,
9394,
30,
315,
1769,
5411,
2332,
18,
659,
18,
8222,
12,
87,
1... |
if (lhsType.equals(PsiType.BOOLEAN) || lhsType.equalsToText("java.lang.Boolean")) { | if(lhsType.equals(PsiType.BOOLEAN) || lhsType.equalsToText("java.lang.Boolean")){ | public void visitBinaryExpression(@NotNull PsiBinaryExpression expression) { super.visitBinaryExpression(expression); final PsiJavaToken sign = expression.getOperationSign(); final IElementType tokenType = sign.getTokenType(); if(!bitwiseTokens.contains(tokenType)) { return; } final PsiType expressionType = expression.getType(); if (expressionType == null) { return; } final PsiExpression rhs = expression.getROperand(); if (rhs == null) { return; } final PsiType rhsType = rhs.getType(); if (rhsType == null) { return; } if (rhsType.equals(PsiType.BOOLEAN) || rhsType.equalsToText("java.lang.Boolean")) { return; } final PsiExpression lhs = expression.getLOperand(); final PsiType lhsType = lhs.getType(); if (lhsType == null) { return; } if (lhsType.equals(PsiType.BOOLEAN) || lhsType.equalsToText("java.lang.Boolean")) { return; } final boolean isPointless; if (tokenType.equals(JavaTokenType.AND)) { isPointless = andExpressionIsPointless(lhs, rhs, expressionType); } else if (tokenType.equals(JavaTokenType.OR)) { isPointless = orExpressionIsPointless(lhs, rhs, expressionType); } else if (tokenType.equals(JavaTokenType.XOR)) { isPointless = xorExpressionIsPointless(lhs, rhs, expressionType); } else if (tokenType.equals(JavaTokenType.LTLT) || tokenType.equals(JavaTokenType.GTGT) || tokenType.equals(JavaTokenType.GTGTGT)) { isPointless = shiftExpressionIsPointless(rhs, expressionType); } else { isPointless = false; } if (!isPointless) { return; } registerError(expression); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/e4dba42c27333ff3aa3a021da7c8754469f669b6/PointlessBitwiseExpressionInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/bitwise/PointlessBitwiseExpressionInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
26964,
5962,
453,
7722,
5905,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
727,
453,
7722,
5852,
1345,
1573,
273,
2652,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
5905,
2300,
26964,
5962,
453,
7722,
5905,
2300,
2652,
13,
288,
5411,
2240,
18,
11658,
5905,
2300,
12,
8692,
1769,
5411,
727,
453,
7722,
5852,
1345,
1573,
273,
2652,
18,
5... |
try { | try { | public GaussiansCalculationTest(String inFile) { try { ChemObjectReader reader; System.out.println("Loading: " + inFile); if (inFile.endsWith(".xyz")) { reader = new XYZReader(new FileReader(inFile)); System.out.println("Expecting XYZ format..."); } else if (inFile.endsWith(".cml")) { reader = new CMLReader(new FileReader(inFile)); System.out.println("Expecting CML format..."); } else { reader = new MDLReader(new FileInputStream(inFile)); System.out.println("Expecting MDL MolFile format..."); } ChemFile chemFile = (ChemFile)reader.read((ChemObject)new ChemFile()); ChemSequence[] chemSequence = chemFile.getChemSequences(); ChemModel[] chemModels = chemSequence[0].getChemModels(); AtomContainer atomContainer = chemModels[0].getAllInOneContainer(); Atom[] atoms = atomContainer.getAtoms(); GaussiansBasis basis = new SimpleBasisSet(atoms); Orbitals orbitals = new Orbitals(basis); int count_electrons = 0; for(int i=0; i<atoms.length; i++) count_electrons += atoms[i].getAtomicNumber(); orbitals.setCountElectrons(count_electrons); ClosedShellJob job = new ClosedShellJob(orbitals); orbitals = job.calculate(); } catch(Exception exc) { exc.printStackTrace(); } } | 45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/74df8d45578e9c9645db883b90d7f0ef6b883f08/GaussiansCalculationTest.java/clean/src/org/openscience/cdk/test/math/qm/GaussiansCalculationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
611,
10325,
19657,
13989,
4709,
12,
780,
316,
812,
13,
225,
288,
377,
775,
1850,
288,
2868,
26542,
921,
2514,
2949,
31,
1377,
2332,
18,
659,
18,
8222,
2932,
10515,
30,
315,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
611,
10325,
19657,
13989,
4709,
12,
780,
316,
812,
13,
225,
288,
377,
775,
1850,
288,
2868,
26542,
921,
2514,
2949,
31,
1377,
2332,
18,
659,
18,
8222,
2932,
10515,
30,
315,
39... |
int x=toReturn.length(); return toReturn.delete(x-3, x).append("]").toString(); | return toReturn.append("]").toString(); | public String toString() { StringBuffer toReturn=new StringBuffer("["); for (int i=0; i < elementCount; i++) { toReturn.append(elementData[i].toString()).append(", "); } int x=toReturn.length(); return toReturn.delete(x-3, x).append("]").toString(); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/1df96197c4c8fb26050c36349c9fc20bf46740a8/Vector.java/buggy/java/util/Vector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1762,
1435,
288,
565,
6674,
24029,
33,
2704,
6674,
2932,
63,
8863,
565,
364,
261,
474,
277,
33,
20,
31,
277,
411,
930,
1380,
31,
277,
27245,
288,
1377,
24029,
18,
6923,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
514,
1762,
1435,
288,
565,
6674,
24029,
33,
2704,
6674,
2932,
63,
8863,
565,
364,
261,
474,
277,
33,
20,
31,
277,
411,
930,
1380,
31,
277,
27245,
288,
1377,
24029,
18,
6923,
12,
... |
if (optionArray[i].indexOf('"') != -1) { | if (optionArray[i].indexOf(' ') != -1) { | public static String joinOptions(String [] optionArray) { String optionString = ""; for (int i = 0; i < optionArray.length; i++) { if (optionArray[i].equals("")) { continue; } if (optionArray[i].indexOf('"') != -1) { optionString += '"' + optionArray[i] + '"'; } else { optionString += optionArray[i]; } optionString += " "; } return optionString.trim(); } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/90002065f6b173c0ae6b7aca3333e9369b76b5ae/Utils.java/buggy/weka/core/Utils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
1233,
1320,
12,
780,
5378,
1456,
1076,
13,
288,
565,
514,
1456,
780,
273,
1408,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1456,
1076,
18,
2469,
31,
277,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
1233,
1320,
12,
780,
5378,
1456,
1076,
13,
288,
565,
514,
1456,
780,
273,
1408,
31,
565,
364,
261,
474,
277,
273,
374,
31,
277,
411,
1456,
1076,
18,
2469,
31,
277,
272... |
_t = __t2090; | _t = __t2094; | public final void systemhelpstate(AST _t) throws RecognitionException { AST systemhelpstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2078 = _t; AST tmp1301_AST_in = (AST)_t; match(_t,SYSTEMHELP); _t = _t.getFirstChild(); expression(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WINDOWNAME: { AST __t2080 = _t; AST tmp1302_AST_in = (AST)_t; match(_t,WINDOWNAME); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2080; _t = _t.getNextSibling(); break; } case ALTERNATEKEY: case COMMAND: case CONTENTS: case CONTEXT: case CONTEXTPOPUP: case FINDER: case FORCEFILE: case HELP: case HELPTOPIC: case KEY: case MULTIPLEKEY: case PARTIALKEY: case POSITION: case QUIT: case SETCONTENTS: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ALTERNATEKEY: { AST __t2082 = _t; AST tmp1303_AST_in = (AST)_t; match(_t,ALTERNATEKEY); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2082; _t = _t.getNextSibling(); break; } case CONTEXT: { AST __t2083 = _t; AST tmp1304_AST_in = (AST)_t; match(_t,CONTEXT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2083; _t = _t.getNextSibling(); break; } case CONTENTS: { AST tmp1305_AST_in = (AST)_t; match(_t,CONTENTS); _t = _t.getNextSibling(); break; } case SETCONTENTS: { AST __t2084 = _t; AST tmp1306_AST_in = (AST)_t; match(_t,SETCONTENTS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2084; _t = _t.getNextSibling(); break; } case FINDER: { AST tmp1307_AST_in = (AST)_t; match(_t,FINDER); _t = _t.getNextSibling(); break; } case CONTEXTPOPUP: { AST __t2085 = _t; AST tmp1308_AST_in = (AST)_t; match(_t,CONTEXTPOPUP); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2085; _t = _t.getNextSibling(); break; } case HELPTOPIC: { AST __t2086 = _t; AST tmp1309_AST_in = (AST)_t; match(_t,HELPTOPIC); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2086; _t = _t.getNextSibling(); break; } case KEY: { AST __t2087 = _t; AST tmp1310_AST_in = (AST)_t; match(_t,KEY); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2087; _t = _t.getNextSibling(); break; } case PARTIALKEY: { AST __t2088 = _t; AST tmp1311_AST_in = (AST)_t; match(_t,PARTIALKEY); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_4.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t2088; _t = _t.getNextSibling(); break; } case MULTIPLEKEY: { AST __t2090 = _t; AST tmp1312_AST_in = (AST)_t; match(_t,MULTIPLEKEY); _t = _t.getFirstChild(); expression(_t); _t = _retTree; AST tmp1313_AST_in = (AST)_t; match(_t,TEXT); _t = _t.getNextSibling(); expression(_t); _t = _retTree; _t = __t2090; _t = _t.getNextSibling(); break; } case COMMAND: { AST __t2091 = _t; AST tmp1314_AST_in = (AST)_t; match(_t,COMMAND); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2091; _t = _t.getNextSibling(); break; } case POSITION: { AST __t2092 = _t; AST tmp1315_AST_in = (AST)_t; match(_t,POSITION); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case MAXIMIZE: { AST tmp1316_AST_in = (AST)_t; match(_t,MAXIMIZE); _t = _t.getNextSibling(); break; } case X: { AST tmp1317_AST_in = (AST)_t; match(_t,X); _t = _t.getNextSibling(); expression(_t); _t = _retTree; AST tmp1318_AST_in = (AST)_t; match(_t,Y); _t = _t.getNextSibling(); expression(_t); _t = _retTree; AST tmp1319_AST_in = (AST)_t; match(_t,WIDTH); _t = _t.getNextSibling(); expression(_t); _t = _retTree; AST tmp1320_AST_in = (AST)_t; match(_t,HEIGHT); _t = _t.getNextSibling(); expression(_t); _t = _retTree; break; } default: { throw new NoViableAltException(_t); } } } _t = __t2092; _t = _t.getNextSibling(); break; } case FORCEFILE: { AST tmp1321_AST_in = (AST)_t; match(_t,FORCEFILE); _t = _t.getNextSibling(); break; } case HELP: { AST tmp1322_AST_in = (AST)_t; match(_t,HELP); _t = _t.getNextSibling(); break; } case QUIT: { AST tmp1323_AST_in = (AST)_t; match(_t,QUIT); _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t2078; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/JPTreeParser.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparserbase/JPTreeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2619,
5201,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
5201,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
2619,
5201,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
2619,
5201,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... |
String[] replyId = (req.getParameterValues("REPLY_DEL_BOX")) ; /* for(int j=i; j<i+nbrOfCols ; j++) { dataV.add(DBArr[j]) ; } */return replyId ; } | String[] replyId = (req.getParameterValues("REPLY_DEL_BOX")) ; return replyId ; } | public String[] getDelReplyParameters( HttpServletRequest req ) throws ServletException, IOException { // Lets get the standard discussion_id to delete String[] replyId = (req.getParameterValues("REPLY_DEL_BOX")) ;//REPLY_DEL_BOX /* for(int j=i; j<i+nbrOfCols ; j++) { dataV.add(DBArr[j]) ; //log("VRDE: " + j + " : " + DBArr[j]) ; } */return replyId ; } | 8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/a270627916b37a677a391dd9f45c54d3d6f12503/BillBoardAdmin.java/buggy/servlets/billBoard/BillBoardAdmin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8526,
18531,
7817,
2402,
12,
9984,
1111,
262,
202,
15069,
16517,
16,
1860,
288,
202,
202,
759,
511,
2413,
336,
326,
4529,
14716,
67,
350,
358,
1430,
202,
202,
780,
8526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
8526,
18531,
7817,
2402,
12,
9984,
1111,
262,
202,
15069,
16517,
16,
1860,
288,
202,
202,
759,
511,
2413,
336,
326,
4529,
14716,
67,
350,
358,
1430,
202,
202,
780,
8526,
... |
if (roleClassName != null) { | Method method = getMethod(system.personJAASPrincipleClass, personMethodFirstName, "person first name", name, id); if (method != null) { system.personMethodAttributes.put(Person.AttrName.FirstName, method); } method = getMethod(system.personJAASPrincipleClass, personMethodLastName, "person last name", name, id); if (method != null) { system.personMethodAttributes.put(Person.AttrName.LastName, method); } method = getMethod(system.personJAASPrincipleClass, personMethodEmail, "person email", name, id); if (method != null) { system.personMethodAttributes.put(Person.AttrName.Email, method); } if ((roleClassName != null) && (roleClassName.trim().length() > 0)) { | public static void initialise(final Context _context) throws Exception { ConnectionResource con = null; try { con = _context.getConnectionResource(); Statement stmt = null; try { stmt = con.getConnection().createStatement(); ResultSet rs = stmt.executeQuery(SQL_SELECT); while (rs.next()) { long id = rs.getLong(1); String name = rs.getString(2).trim(); String personClassName = rs.getString(3); String personMethodKey = rs.getString(4); String personMethodName = rs.getString(5); String roleClassName = rs.getString(6); String roleMethodKey = rs.getString(7); String groupClassName = rs.getString(8); String groupMethodKey = rs.getString(9); LOG.debug("read JAAS System '" + name + "' (id = " + id + ")"); try { JAASSystem system = new JAASSystem(id, name); system.personJAASPrincipleClass = Class.forName(personClassName.trim()); system.personMethodKey = getMethod(system.personJAASPrincipleClass, personMethodKey, "person key", name, id); system.personMethodName = getMethod(system.personJAASPrincipleClass, personMethodName, "person name", name, id); if (roleClassName != null) { system.roleJAASPrincipleClass = Class.forName(roleClassName.trim()); system.roleMethodKey = getMethod(system.roleJAASPrincipleClass, roleMethodKey, "role key", name, id); } if (groupClassName != null) { system.groupJAASPrincipleClass = Class.forName(groupClassName.trim()); system.groupMethodKey = getMethod(system.groupJAASPrincipleClass, groupMethodKey, "group key", name, id); } if ( (system.personMethodKey != null) && (system.personMethodName != null) && ((system.roleJAASPrincipleClass == null) || ( (system.roleJAASPrincipleClass != null) && (system.roleMethodKey != null))) && ((system.groupJAASPrincipleClass == null) || ( (system.groupJAASPrincipleClass != null) && (system.groupMethodKey != null)))) { cache.add(system); } } catch (ClassNotFoundException e) { LOG.error("could not get a class for JAAS System '" + name + "' " + "(id = " + id + ")", e); } } rs.close(); } finally { if (stmt != null) { stmt.close(); } } con.commit(); } finally { if ((con != null) && con.isOpened()) { con.abort(); } } } | 55506 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55506/96977fc9ae5e623fdd2932609194ee26c2038250/JAASSystem.java/buggy/trunk/kernel/src/main/java/org/efaps/admin/user/JAASSystem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
21301,
12,
6385,
1772,
389,
2472,
13,
1216,
1185,
225,
288,
565,
4050,
1420,
356,
273,
446,
31,
565,
775,
225,
288,
1377,
356,
273,
389,
2472,
18,
588,
1952,
1420,
5621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
21301,
12,
6385,
1772,
389,
2472,
13,
1216,
1185,
225,
288,
565,
4050,
1420,
356,
273,
446,
31,
565,
775,
225,
288,
1377,
356,
273,
389,
2472,
18,
588,
1952,
1420,
5621,... |
String lat = "5123.1569"; String lon = "00645.0726"; | int sats = random.nextInt(6); int fix = sats > 0 ? 1 : 0; float lat = basepos.getLatitudeAsFloat(); float lon = basepos.getLongitudeAsFloat(); if (fix > 0) { lon += random.nextFloat()*2*DEVIATION-DEVIATION; lat += random.nextFloat()*2*DEVIATION-DEVIATION; } basepos = new Position(lat, lon); String slat = formatLatitude(Math.abs(lat*100)); String slon = formatLongitude(Math.abs(lon*100)); String dlon = basepos.getLongitudeAsFloat() > 0 ? LongitudeDirection.WEST.toString() : LongitudeDirection.EAST.toString(); String dlat = basepos.getLatitudeAsFloat() > 0 ? LatitudeDirection.NORTH.toString() : LatitudeDirection.SOUTH.toString(); | public void run() { while (simulating) { // $GPGGA,125532.146,5123.1569,N,00645.0726,E,1,04,09.5,29.0,M,45.7,M,,*52 // TODO extract coordinates from Position object // TODO vary the position randomly String lat = "5123.1569"; String lon = "00645.0726"; // TODO insert the correct time String time = "161805.154"; // Date date = new Date(System.currentTimeMillis()); int sats = random.nextInt(6); int fix = sats > 0 ? 1 : 0; // TODO calculate a correct checksum String checksum = "*52"; String sentence = "$GPGGA,"+time+","+lat+",N,"+lon+",E,"+fix+","+sats+",09.5,29.0,M,45.7,M,,"+checksum; informListeners(sentence); try { // If this thread has been canceled, we do not have to wait if (simulating) Thread.sleep(INTERVAL); } catch (InterruptedException e) {} } } | 56438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56438/b860160be5c05cd56b2a482deaf4b6b73677d78b/NMEASimulator.java/buggy/MoVadis/gps/NMEASimulator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
17523,
261,
9812,
27967,
13,
288,
1082,
202,
759,
271,
9681,
19491,
37,
16,
2138,
2539,
1578,
18,
27879,
16,
25,
12936,
18,
3600,
8148,
16,
50,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
17523,
261,
9812,
27967,
13,
288,
1082,
202,
759,
271,
9681,
19491,
37,
16,
2138,
2539,
1578,
18,
27879,
16,
25,
12936,
18,
3600,
8148,
16,
50,... |
public void testIsAdmin() { Message message = new Message(); message.getHeader().setString(MsgType.FIELD, MsgType.HEARTBEAT); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.LOGON); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.LOGOUT); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.SEQUENCE_RESET); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.RESEND_REQUEST); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.TEST_REQUEST); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.REJECT); assertTrue(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.ORDER_SINGLE); assertFalse(message.isAdmin()); message.getHeader().setString(MsgType.FIELD, MsgType.QUOTE_RESPONSE); assertFalse(message.isAdmin()); } | 52526 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52526/586397aa1fd3345ca33694c092ffcd7b16ba0607/MessageTest.java/buggy/core/src/test/java/quickfix/MessageTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
4446,
1435,
288,
3639,
2350,
883,
273,
394,
2350,
5621,
3639,
883,
18,
588,
1864,
7675,
542,
780,
12,
3332,
559,
18,
6776,
16,
8671,
559,
18,
3900,
4928,
5948,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
4446,
1435,
288,
3639,
2350,
883,
273,
394,
2350,
5621,
3639,
883,
18,
588,
1864,
7675,
542,
780,
12,
3332,
559,
18,
6776,
16,
8671,
559,
18,
3900,
4928,
5948,
78... | ||
this.tid = tid; | public NatSettings( Tid tid ) { this.tid = tid; } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/1152554dbc4fa7e994c68368b90bf238d9757ee4/NatSettings.java/buggy/tran/nat/main/com/metavize/tran/nat/NatSettings.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
423,
270,
2628,
12,
399,
350,
11594,
262,
565,
288,
6647,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
423,
270,
2628,
12,
399,
350,
11594,
262,
565,
288,
6647,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
if ((evt.getID() == MouseEvent.MOUSE_ENTERED) || (evt.getID() == MouseEvent.MOUSE_RELEASED)){ | if (/*(evt.getID() == MouseEvent.MOUSE_ENTERED) || */ (evt.getID() == MouseEvent.MOUSE_RELEASED)){ | protected void processMouseEvent(MouseEvent evt){ updateClickCount(evt); // We want to handle events where clickCount >= 2 ourselves if (evt.getClickCount() < 2) super.processMouseEvent(evt); int pressedLoc = viewToModel(evt.getPoint()); int selectionStart = getSelectionStart(); int selectionEnd = getSelectionEnd(); if (pressedLoc != -1){ try{ if ((getClickCount(evt) >= 2) && (evt.getID() == MouseEvent.MOUSE_PRESSED) && SwingUtilities.isLeftMouseButton(evt)){ if ((getClickCount(evt) % 2) == 0){ int start = getWordStart(pressedLoc); int end = getWordEnd(pressedLoc); select(start, end); } else{ Document document = getDocument(); Element paragraphElement = Utilities.getParagraphElement(this, pressedLoc); int start = paragraphElement.getStartOffset(); int end = Math.min(paragraphElement.getEndOffset(), document.getLength()); select(start, end); } } } catch (BadLocationException e){} } if (evt.isPopupTrigger()){ JPopupMenu popup = getPopupMenu(evt); if (popup != null){ Component rootPane = SwingUtilities.getRootPane(this); Dimension rootPaneSize = rootPane.getSize(); Point clickPointOnRootPane = SwingUtilities.convertPoint(this, evt.getPoint(), rootPane); int x = evt.getX(); int y = evt.getY(); int width = popup.getWidth(); int height = popup.getHeight(); if (clickPointOnRootPane.x + width > rootPaneSize.width) x = x - width; if (clickPointOnRootPane.y + height > rootPaneSize.height) y = y - height; popup.setSelected(null); popup.show(this,x,y); } } if (evt.getID() == MouseEvent.MOUSE_EXITED){ curLink = null; setCursor(regCursor); } if ((evt.getID() == MouseEvent.MOUSE_ENTERED) || (evt.getID() == MouseEvent.MOUSE_RELEASED)){ processPossibleLinkUpdate(evt); } if ((evt.getID() == MouseEvent.MOUSE_CLICKED) && SwingUtilities.isLeftMouseButton(evt)){ if (curLink != null) console.issueCommand(curLink.getCommand()); } } | 1161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1161/07ecf58dd1f1ca6636c798113285c80dff5aa49f/ConsoleTextPane.java/buggy/src/free/jin/console/ConsoleTextPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1207,
9186,
1133,
12,
9186,
1133,
6324,
15329,
565,
1089,
6563,
1380,
12,
73,
11734,
1769,
565,
368,
1660,
2545,
358,
1640,
2641,
1625,
4682,
1380,
1545,
576,
19801,
565,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1207,
9186,
1133,
12,
9186,
1133,
6324,
15329,
565,
1089,
6563,
1380,
12,
73,
11734,
1769,
565,
368,
1660,
2545,
358,
1640,
2641,
1625,
4682,
1380,
1545,
576,
19801,
565,
309,
... |
name = adapter.getCategorySorter().getCategoryField().getValue( markerAdapter.lastMarkers.toArray()[startIndex]); | name = categoryName; | MarkerCategory(MarkerAdapter adapter, int startIndex, int endIndex) { markerAdapter = adapter; start = startIndex; end = endIndex; name = adapter.getCategorySorter().getCategoryField().getValue( markerAdapter.lastMarkers.toArray()[startIndex]); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/463fb046537cc5974ca1c2e10d796b2225e725a8/MarkerAdapter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
7078,
4457,
12,
7078,
4216,
4516,
16,
509,
10588,
16,
509,
13818,
13,
288,
1082,
202,
11145,
4216,
273,
4516,
31,
1082,
202,
1937,
273,
10588,
31,
1082,
202,
409,
273,
13818,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
7078,
4457,
12,
7078,
4216,
4516,
16,
509,
10588,
16,
509,
13818,
13,
288,
1082,
202,
11145,
4216,
273,
4516,
31,
1082,
202,
1937,
273,
10588,
31,
1082,
202,
409,
273,
13818,
31,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.