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 |
|---|---|---|---|---|---|---|
sql += "AND c.relname='" + escapeQuotes(primaryTable) + "' "; | sql += "AND c1.relname='" + escapeQuotes(primaryTable) + "' "; | protected java.sql.ResultSet getImportedExportedKeys(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException { Field f[] = new Field[14]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, getMaxNameLength()); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, getMaxNameLength()); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, getMaxNameLength()); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, getMaxNameLength()); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, getMaxNameLength()); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, getMaxNameLength()); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, getMaxNameLength()); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, getMaxNameLength()); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, getMaxNameLength()); f[12] = new Field(connection, "PK_NAME", iVarcharOid, getMaxNameLength()); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); String select; String from; String where = ""; /* * The addition of the pg_constraint in 7.3 table should have really * helped us out here, but it comes up just a bit short. * - The conkey, confkey columns aren't really useful without * contrib/array unless we want to issues separate queries. * - Unique indexes that can support foreign keys are not necessarily * added to pg_constraint. Also multiple unique indexes covering * the same keys can be created which make it difficult to determine * the PK_NAME field. */ if (connection.haveMinimumServerVersion("7.3")) { select = "SELECT DISTINCT n.nspname as pnspname,n2.nspname as fnspname, "; from = " FROM pg_catalog.pg_namespace n, pg_catalog.pg_namespace n2, pg_catalog.pg_trigger t, pg_catalog.pg_trigger t1, pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_class ic, pg_catalog.pg_proc p1, pg_catalog.pg_proc p2, pg_catalog.pg_index i, pg_catalog.pg_attribute a "; where = " AND c.relnamespace = n.oid AND c2.relnamespace=n2.oid "; if (primarySchema != null && !"".equals(primarySchema)) { where += " AND n.nspname = '"+escapeQuotes(primarySchema)+"' "; } if (foreignSchema != null && !"".equals(foreignSchema)) { where += " AND n2.nspname = '"+escapeQuotes(foreignSchema)+"' "; } } else { select = "SELECT DISTINCT NULL::text as pnspname, NULL::text as fnspname, "; from = " FROM pg_trigger t, pg_trigger t1, pg_class c, pg_class c2, pg_class ic, pg_proc p1, pg_proc p2, pg_index i, pg_attribute a "; } String sql = select + "c.relname as prelname, " + "c2.relname as frelname, " + "t.tgconstrname, " + "a.attnum as keyseq, " + "ic.relname as fkeyname, " + "t.tgdeferrable, " + "t.tginitdeferred, " + "t.tgnargs,t.tgargs, " + "p1.proname as updaterule, " + "p2.proname as deleterule " + from + "WHERE " // isolate the update rule + "(t.tgrelid=c.oid " + "AND t.tgisconstraint " + "AND t.tgconstrrelid=c2.oid " + "AND t.tgfoid=p1.oid " + "and p1.proname like 'RI\\\\_FKey\\\\_%\\\\_upd') " + "and " // isolate the delete rule + "(t1.tgrelid=c.oid " + "and t1.tgisconstraint " + "and t1.tgconstrrelid=c2.oid " + "AND t1.tgfoid=p2.oid " + "and p2.proname like 'RI\\\\_FKey\\\\_%\\\\_del') " + "AND i.indrelid=c.oid " + "AND i.indexrelid=ic.oid " + "AND ic.oid=a.attrelid " + "AND i.indisprimary " + where; if (primaryTable != null) { sql += "AND c.relname='" + escapeQuotes(primaryTable) + "' "; } if (foreignTable != null) { sql += "AND c2.relname='" + escapeQuotes(foreignTable) + "' "; } sql += "ORDER BY "; // orderby is as follows getExported, orders by FKTABLE, // getImported orders by PKTABLE // getCrossReference orders by FKTABLE, so this should work for both, // since when getting crossreference, primaryTable will be defined if (primaryTable != null) { sql += "frelname"; } else { sql += "prelname"; } sql += ",keyseq"; ResultSet rs = connection.createStatement().executeQuery(sql); // returns the following columns // and some example data with a table defined as follows // create table people ( id int primary key); // create table policy ( id int primary key); // create table users ( id int primary key, people_id int references people(id), policy_id int references policy(id)) // prelname | frelname | tgconstrname | keyseq | fkeyName | tgdeferrable | tginitdeferred // 1 | 2 | 3 | 4 | 5 | 6 | 7 // people | users | <unnamed> | 1 | people_pkey | f | f // | tgnargs | tgargs | updaterule | deleterule // | 8 | 9 | 10 | 11 // | 6 | <unnamed>\000users\000people\000UNSPECIFIED\000people_id\000id\000 | RI_FKey_noaction_upd | RI_FKey_noaction_del Vector tuples = new Vector(); while ( rs.next() ) { byte tuple[][] = new byte[14][]; tuple[1] = rs.getBytes(1); //PKTABLE_SCHEM tuple[5] = rs.getBytes(2); //FKTABLE_SCHEM tuple[2] = rs.getBytes(3); //PKTABLE_NAME tuple[6] = rs.getBytes(4); //FKTABLE_NAME String fKeyName = rs.getString(5); String updateRule = rs.getString(12); if (updateRule != null ) { // Rules look like this RI_FKey_noaction_del so we want to pull out the part between the 'Key_' and the last '_' s String rule = updateRule.substring(8, updateRule.length() - 4); int action = java.sql.DatabaseMetaData.importedKeyNoAction; if ( rule == null || "noaction".equals(rule) ) action = java.sql.DatabaseMetaData.importedKeyNoAction; if ("cascade".equals(rule)) action = java.sql.DatabaseMetaData.importedKeyCascade; else if ("setnull".equals(rule)) action = java.sql.DatabaseMetaData.importedKeySetNull; else if ("setdefault".equals(rule)) action = java.sql.DatabaseMetaData.importedKeySetDefault; else if ("restrict".equals(rule)) action = java.sql.DatabaseMetaData.importedKeyRestrict; tuple[9] = Integer.toString(action).getBytes(); } String deleteRule = rs.getString(13); if ( deleteRule != null ) { String rule = updateRule.substring(8, updateRule.length() - 4); int action = java.sql.DatabaseMetaData.importedKeyNoAction; if ("cascade".equals(rule)) action = java.sql.DatabaseMetaData.importedKeyCascade; else if ("setnull".equals(rule)) action = java.sql.DatabaseMetaData.importedKeySetNull; else if ("setdefault".equals(rule)) action = java.sql.DatabaseMetaData.importedKeySetDefault; tuple[10] = Integer.toString(action).getBytes(); } int keySequence = rs.getInt(6); //KEY_SEQ // Parse the tgargs data String fkeyColumn = ""; String pkeyColumn = ""; // Note, I am guessing at most of this, but it should be close // if not, please correct // the keys are in pairs and start after the first four arguments // the arguments are seperated by \000 String targs = rs.getString(11); // args look like this //<unnamed>\000ww\000vv\000UNSPECIFIED\000m\000a\000n\000b\000 // we are primarily interested in the column names which are the last items in the string StringTokenizer st = new StringTokenizer(targs, "\\000"); int advance = 4 + (keySequence - 1) * 2; for ( int i = 0; st.hasMoreTokens() && i < advance ; i++ ) st.nextToken(); // advance to the key column of interest if ( st.hasMoreTokens() ) { fkeyColumn = st.nextToken(); } if ( st.hasMoreTokens() ) { pkeyColumn = st.nextToken(); } tuple[3] = pkeyColumn.getBytes(); //PKCOLUMN_NAME tuple[7] = fkeyColumn.getBytes(); //FKCOLUMN_NAME tuple[8] = rs.getBytes(6); //KEY_SEQ tuple[11] = targs.getBytes(); //FK_NAME this will give us a unique name for the foreign key tuple[12] = rs.getBytes(7); //PK_NAME // DEFERRABILITY int deferrability = java.sql.DatabaseMetaData.importedKeyNotDeferrable; boolean deferrable = rs.getBoolean(8); boolean initiallyDeferred = rs.getBoolean(9); if (deferrable) { if (initiallyDeferred) deferrability = java.sql.DatabaseMetaData.importedKeyInitiallyDeferred; else deferrability = java.sql.DatabaseMetaData.importedKeyInitiallyImmediate; } tuple[13] = Integer.toString(deferrability).getBytes(); tuples.addElement(tuple); } return connection.getResultSet(null, f, tuples, "OK", 1); } | 45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/88e524063ab68a0bb287c5c0545e11a8164cd613/AbstractJdbc1DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
3354,
9769,
16,
514,
3354,
3078,
16,
514,
3354,
1388,
16,
514,
5523,
9769,
16,
514,
5523,
3078,
16,
514,
5523,
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,
1117,
2252,
18,
4669,
18,
13198,
336,
24934,
31140,
2396,
12,
780,
3354,
9769,
16,
514,
3354,
3078,
16,
514,
3354,
1388,
16,
514,
5523,
9769,
16,
514,
5523,
3078,
16,
514,
5523,
13... |
.narrow(receiverTie._this(testCase_.getORB()))); | .narrow(receiverTie._this(orb_))); | public void connect(EventChannel channel, boolean useOrSemantic) throws AdminLimitExceeded, AlreadyConnected, TypeError { StructuredPushConsumerPOATie receiverTie = new StructuredPushConsumerPOATie(this); ConsumerAdmin _consumerAdmin = channel.default_consumer_admin(); IntHolder _proxyIdHolder = new IntHolder(); pushSupplier_ = StructuredProxyPushSupplierHelper.narrow(_consumerAdmin .obtain_notification_push_supplier(ClientType.STRUCTURED_EVENT, _proxyIdHolder)); Assert.assertNotNull(pushSupplier_); Assert.assertNotNull(pushSupplier_.MyType()); Assert.assertEquals(pushSupplier_.MyType(), ProxyType.PUSH_STRUCTURED); Assert.assertEquals(_consumerAdmin, pushSupplier_.MyAdmin()); pushSupplier_.connect_structured_push_consumer(StructuredPushConsumerHelper .narrow(receiverTie._this(testCase_.getORB()))); connected_ = true; } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/b2aa91a672be3f8bd14c3402b93d9a1d919f304c/StructuredPushReceiver.java/buggy/test/regression/src/org/jacorb/test/notification/StructuredPushReceiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3077,
12,
1133,
2909,
1904,
16,
1250,
999,
1162,
13185,
9941,
13,
1216,
7807,
3039,
10069,
16,
5411,
17009,
8932,
16,
3580,
565,
288,
3639,
7362,
2862,
7621,
5869,
2419,
789,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3077,
12,
1133,
2909,
1904,
16,
1250,
999,
1162,
13185,
9941,
13,
1216,
7807,
3039,
10069,
16,
5411,
17009,
8932,
16,
3580,
565,
288,
3639,
7362,
2862,
7621,
5869,
2419,
789,
1... |
nakable = null; | public synchronized void setupMove() { nakable = null; this.phase = Constants.MOVE; clearUndoStack(); if (board != null) { board.setupMoveMenu(); } if (isMyTurn()) { defaultCursor(); } updateStatusScreen(); } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/13fd7e55524ae607efd57c2dd1bbc8ece72c6451/Client.java/buggy/Colossus/net/sf/colossus/client/Client.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
3875,
7607,
1435,
565,
288,
9079,
333,
18,
13961,
273,
5245,
18,
16537,
31,
3639,
2424,
31224,
2624,
5621,
3639,
309,
261,
3752,
480,
446,
13,
3639,
288,
5411,
11094,
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,
377,
1071,
3852,
918,
3875,
7607,
1435,
565,
288,
9079,
333,
18,
13961,
273,
5245,
18,
16537,
31,
3639,
2424,
31224,
2624,
5621,
3639,
309,
261,
3752,
480,
446,
13,
3639,
288,
5411,
11094,
18,... | |
public static void executeCommand(List commandLine) { | public void executeCommand(List commandLine) { | public static void executeCommand(List commandLine) { try { String[] command = new String[commandLine.size()]; for (int i = 0 ; i < commandLine.size() ; i++) { command[i] = (String) commandLine.get(i); } nbCertificates++; Runtime rt = Runtime.getRuntime(); Process process = rt.exec(command); BufferedReader in = new BufferedReader( new InputStreamReader(process.getInputStream())); BufferedReader err = new BufferedReader( new InputStreamReader(process.getErrorStream())); boolean isError = false; String line = null; while ((line = err.readLine()) != null) { System.out.println("keytool stderr:" + line); isError = true; } while ((line = in.readLine()) != null) { System.out.println("keytool stdout:" + line); isError = true; } process.waitFor(); if ((process.exitValue() == 0) && (isError == false)) { nbCertificatesSucceed++; } } catch(java.io.IOException e) { e.printStackTrace(); } catch(java.lang.InterruptedException e) { e.printStackTrace(); } } | 12869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12869/8e5ab4106a38968de2c28e9761a1d5161240f55f/KeyGenerator.java/clean/securityservices/src/com/nai/security/tools/KeyGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
21120,
12,
682,
20894,
13,
288,
565,
775,
288,
1377,
514,
8526,
1296,
273,
394,
514,
63,
3076,
1670,
18,
1467,
1435,
15533,
1377,
364,
261,
474,
277,
273,
374,
274,
277,
411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21120,
12,
682,
20894,
13,
288,
565,
775,
288,
1377,
514,
8526,
1296,
273,
394,
514,
63,
3076,
1670,
18,
1467,
1435,
15533,
1377,
364,
261,
474,
277,
273,
374,
274,
277,
411,... |
format.getHeader().createEntry( PROVIDENAME, provides); | if ( provides != null) format.getHeader().createEntry( PROVIDENAME, provides); | public void setProvides( final CharSequence provides) { format.getHeader().createEntry( PROVIDENAME, provides); } | 48840 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48840/00c18a7a0433d66c0432891382365270ba83a143/Builder.java/buggy/source/main/org/freecompany/redline/Builder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
17727,
12,
727,
9710,
8121,
13,
288,
202,
202,
2139,
18,
588,
1864,
7675,
2640,
1622,
12,
4629,
15472,
21150,
16,
8121,
1769,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
17727,
12,
727,
9710,
8121,
13,
288,
202,
202,
2139,
18,
588,
1864,
7675,
2640,
1622,
12,
4629,
15472,
21150,
16,
8121,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-10... |
if(selected_node<0) { | if(selected_node<0) { | public void mousePressed(MouseEvent e){ project proj_class=(project)project.oClass; if(e.getButton() == MouseEvent.BUTTON3) { //System.out.println("Mouse 3 Was Clicked with in stage area at "+e.getX()+" "+e.getY()); PopUpMenu menu = new PopUpMenu(this,proj_class.selected_type); menu.show((Component)this, e.getX(), e.getY()); } else { //System.out.println("Mouse Was Clicked with in stage area at "+e.getX()+" "+e.getY()); if(proj_class.draw_mouse_state==0) { Vector allList = new Vector(); int num_in_list=0; //THE NORMAL STATE //try to find out which object was selected int curx=e.getX(); int cury=e.getY(); int search_area=10; boolean found_item=false; Random ran_obj= new Random(); //check if the house was selected Object_Drawer items=proj_class.houses.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { allList.add(items.get_object(0)); num_in_list++; } //check if the stage was selected items=proj_class.stages.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { allList.add(items.get_object(0)); num_in_list++; } //check if any bars were selected items=proj_class.bars.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { int iter; for(iter=0;iter<items.get_num_objects();iter++) { allList.add(items.get_object(iter)); num_in_list++; } } //check if any instruments were selected items=proj_class.instruments.get_objects_in_area(curx-search_area, cury-search_area, curx+search_area,cury+search_area); if(items.get_num_objects()>0) { int iter; for(iter=0;iter<items.get_num_objects();iter++) { allList.add(items.get_object(iter)); num_in_list++; } } //select a random number from the created list of objects int ran_index=ran_obj.nextInt()%num_in_list; ran_index=Math.abs(ran_index); Object temp_obj=allList.get(ran_index); if(temp_obj instanceof house) { proj_class.selected_type=0; } else if(temp_obj instanceof stage) { proj_class.selected_type=1; } else if(temp_obj instanceof bar) { proj_class.selected_type=2; } else if(temp_obj instanceof instrument) { proj_class.selected_type=3; } else if(temp_obj instanceof setobject) { proj_class.selected_type=4; } proj_class.selected_index=((General_Object)temp_obj).index; ItemBrowser.displayInfo(temp_obj); repaint(); } else if(proj_class.draw_mouse_state==1) { //creation of a bar //System.out.println("Mouse state was 1 adding "+temp_bar.num_nodes+" node"); //drawing a bar if(temp_bar.num_nodes==0) { //begin chaplin edit if(proj_class.zoom_factor == 1) { temp_bar.worldx=e.getX(); temp_bar.worldy=e.getY(); } else { temp_bar.worldx=(e.getX()/proj_class.zoom_factor); temp_bar.worldy=(e.getY()/proj_class.zoom_factor); } //end chaplin edit temp_bar.add_node(0,0); } else { //begin chaplin edit if(proj_class.zoom_factor == 1) temp_bar.add_node(e.getX()-temp_bar.worldx,e.getY()-temp_bar.worldy); else temp_bar.add_node((e.getX()/proj_class.zoom_factor)-temp_bar.worldx,(e.getY()/proj_class.zoom_factor)-temp_bar.worldy); //end chaplin edit if(temp_bar.num_nodes>=2) { proj_class.addBar(temp_bar); proj_class.draw_mouse_state=0; temp_bar=null; } } } else if(proj_class.draw_mouse_state==2) { //adding an instrument to the selected bar //since the instrument has to be on the bar that was selected //use the x value of the mouse to find out the y value for the //edit here for instrument on bar problem. //placement on the bar int pot_x; int pot_y=-1; int barx1=proj_class.bars.get_object(temp_instrument.Associated_barID).x[0]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldx; int barx2=proj_class.bars.get_object(temp_instrument.Associated_barID).x[1]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldx; int bary1=proj_class.bars.get_object(temp_instrument.Associated_barID).y[0]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldy; int bary2=proj_class.bars.get_object(temp_instrument.Associated_barID).y[1]+proj_class.bars.get_object(temp_instrument.Associated_barID).worldy; //swap the points to make the math easier because assume point 1 is to the right //begin chaplin edit if (proj_class.zoom_factor == 1) pot_x = e.getX(); else pot_x = (e.getX()/proj_class.zoom_factor); //end chaplin edit if(barx1>barx2) { int temp_int; temp_int=barx1; barx1=barx2; barx2=temp_int; temp_int=bary1; bary1=bary2; bary2=temp_int; } if((pot_x>barx1)&&(pot_x<barx2)) { //the x is valid find the y value for it //fix here. what if slope undefined or 0? i.e. vertical/horizontal line if(barx1-barx2!=0) { //to find slope y - y1 = m (x - x1) or m=(y-y1)/(x-x1) //double slope = (bary1-bary2)/(barx1-barx2); //to find y with an x use equation y=m(x-x1)+y1 //pot_y=(int)(slope*(double)(barx1-barx2)+bary2); double slope = (double)(bary1-bary2)/ (double)(barx1-barx2); pot_y=(int)(slope*((double)pot_x-(double)barx1)+(double)bary1); } } if(pot_y>=0) { //found a y so place it temp_instrument.worldx=pot_x; temp_instrument.worldy=pot_y; proj_class.instruments.add_object(temp_instrument); proj_class.draw_mouse_state=0; proj_class.selected_type=3; proj_class.selected_index=temp_instrument.index; temp_instrument=null; } } else if(proj_class.draw_mouse_state==6) { //moving a bar bar selected_bar=(bar)proj_class.bars.get_object(proj_class.selected_index); int old_bar_x; old_bar_x=selected_bar.worldx; int old_bar_y; old_bar_y=selected_bar.worldy; //move all the instrumetns attached to the bar //need to compensate for zoom factor just to tired to do it tonight int xdiff; int ydiff; //chaplin edit if(proj_class.zoom_factor == 1) { xdiff = old_bar_x-e.getX(); ydiff = old_bar_y-e.getY(); } else { xdiff = old_bar_x-(e.getX()/proj_class.zoom_factor); ydiff = old_bar_y-(e.getY()/proj_class.zoom_factor); } for(int iter=0;iter<proj_class.instruments.get_num_objects();iter++) { if(((instrument)proj_class.instruments.get_object(iter)).getBarID()==proj_class.selected_index) { proj_class.instruments.get_object(iter).worldx-=xdiff; proj_class.instruments.get_object(iter).worldy-=ydiff; } } //actually move the bar if(proj_class.zoom_factor == 1) { proj_class.bars.get_object(proj_class.selected_index).worldx=e.getX(); proj_class.bars.get_object(proj_class.selected_index).worldy=e.getY(); } else { proj_class.bars.get_object(proj_class.selected_index).worldx=(e.getX()/proj_class.zoom_factor); proj_class.bars.get_object(proj_class.selected_index).worldy=(e.getY()/proj_class.zoom_factor); } proj_class.draw_mouse_state=0; } else if(proj_class.draw_mouse_state==8) { //adding a stage object if(temp_stage.num_nodes==0) { if(proj_class.zoom_factor == 1) { temp_stage.worldx=e.getX(); temp_stage.worldy=e.getY(); } else { temp_stage.worldx=(e.getX()/proj_class.zoom_factor); temp_stage.worldy=(e.getY()/proj_class.zoom_factor); } temp_stage.add_node(0,0); } else { if(proj_class.zoom_factor == 1) { temp_stage.add_node(e.getX()-temp_stage.worldx,e.getY()-temp_stage.worldy); } else { temp_stage.add_node((e.getX()/proj_class.zoom_factor)-temp_stage.worldx,(e.getY()/proj_class.zoom_factor)-temp_stage.worldy); } if(temp_stage.num_nodes>=15) { proj_class.addStage(temp_stage); proj_class.draw_mouse_state=0; temp_stage=null; } } } else if(proj_class.draw_mouse_state==9) { //adding a stage object if(temp_set.num_nodes==0) { if(proj_class.zoom_factor == 1) { temp_set.worldx=e.getX(); temp_set.worldy=e.getY(); } else { temp_set.worldx=e.getX()/proj_class.zoom_factor; temp_set.worldy=e.getY()/proj_class.zoom_factor; } temp_set.add_node(0,0); } else { if(proj_class.zoom_factor == 1) { temp_set.add_node(e.getX()-temp_set.worldx,e.getY()-temp_set.worldy); } else { temp_set.add_node((e.getX()/proj_class.zoom_factor)-temp_set.worldx,(e.getY()/proj_class.zoom_factor)-temp_set.worldy); } if(temp_set.num_nodes>=15) { proj_class.addSet(temp_set); proj_class.draw_mouse_state=0; temp_set=null; } } } else if(proj_class.draw_mouse_state==4) { //edit nodes of house //change this?? if(selected_node<0) { //find a node to select selected_node=temp_house.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_house.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } else if(proj_class.draw_mouse_state==5) { //edit node of stage //change this?? if(selected_node<0) { //find a node to select selected_node=temp_stage.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_stage.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } else if(proj_class.draw_mouse_state==3) { //edit nodes of bar //change this?? if(selected_node<0) { //find a node to select selected_node=temp_bar.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_bar.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } //proj_class.draw_mouse_state=0; } else if(proj_class.draw_mouse_state==10) { //edit nodes of set object //change this?? if(selected_node<0) { //find a node to select selected_node=temp_set.closest_node(e.getX(),e.getY()); } else { //set the node to the new position temp_set.move_node(selected_node, e.getX(), e.getY()); selected_node=-1; } } repaint(); } } | 11744 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11744/2c94ce45eff274c86765397beaf012337a7074d2/TransPanel.java/buggy/src/drawing_prog/TransPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7644,
24624,
12,
9186,
1133,
425,
15329,
3639,
1984,
10296,
67,
1106,
28657,
4406,
13,
4406,
18,
83,
797,
31,
3639,
309,
12,
73,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7644,
24624,
12,
9186,
1133,
425,
15329,
3639,
1984,
10296,
67,
1106,
28657,
4406,
13,
4406,
18,
83,
797,
31,
3639,
309,
12,
73,
18,
588,
3616,
1435,
422,
17013,
1133,
18,
20... |
channelName, levelIdx); | channel.getId(), levelIdx); | private void addDownloadJob(TvDataUpdateManager dataBase, Mirror mirror, Date date, String level, String channelName, String country, DayProgramReceiveDH receiveDH, DayProgramUpdateDH updateDH, SummaryFile summary) throws TvBrowserException { // NOTE: summary is null when getting failed String completeFileName = DayProgramFile.getProgramFileName(date, country, channelName, level); File completeFile = new File(mDataDir, completeFileName); int levelIdx = DayProgramFile.getLevelIndexForId(level); // Check whether we already have data for this day if (completeFile.exists()) { // We have data -> Check whether the mirror has an update // Get the version of the file int localVersion; try { localVersion = DayProgramFile.readVersionFromFile(completeFile); } catch (Exception exc) { // TODO: dont' throw an exception; try to download the file again throw new TvBrowserException(getClass(), "error.5", "Reading version of TV data file failed: {0}", completeFile.getAbsolutePath(), exc); } // Check whether the mirror has a newer version boolean needsUpdate = true; if (summary != null) { int mirrorVersion = summary.getDayProgramVersion(date, country, channelName, levelIdx); needsUpdate = (mirrorVersion > localVersion); } if (needsUpdate) { // We need an update -> Add an update job String updateFileName = DayProgramFile.getProgramFileName(date, country, channelName, level, localVersion); mDownloadManager.addDownloadJob(mirror.getUrl(),updateFileName, updateDH); } } else { // We have no data -> Check whether the mirror has boolean needsUpdate = true; if (summary != null) { int mirrorVersion = summary.getDayProgramVersion(date, country, channelName, levelIdx); needsUpdate = (mirrorVersion != -1); } if (needsUpdate) { // We need an receive -> Add a download job mDownloadManager.addDownloadJob(mirror.getUrl(),completeFileName, receiveDH); } } } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/9e0a45d3d9557982434dd9d58ce8bdc4178df19d/TvBrowserDataService.java/buggy/tvbrowser/src/tvbrowserdataservice/TvBrowserDataService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
527,
7109,
2278,
12,
56,
90,
751,
1891,
1318,
501,
2171,
16,
490,
8299,
15593,
16,
2167,
1509,
16,
1850,
514,
1801,
16,
514,
24610,
16,
514,
5251,
16,
1850,
13735,
9459,
1132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
527,
7109,
2278,
12,
56,
90,
751,
1891,
1318,
501,
2171,
16,
490,
8299,
15593,
16,
2167,
1509,
16,
1850,
514,
1801,
16,
514,
24610,
16,
514,
5251,
16,
1850,
13735,
9459,
1132... |
BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS, BugzillaReportElement.CC}; | BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS, BugzillaReportElement.CC }; | public static void setupExistingBugAttributes(String serverUrl, RepositoryTaskData existingReport) { // ordered list of elements as they appear in UI // and additional elements that may not appear in the incoming xml // stream but need to be present for bug submission BugzillaReportElement[] reportElements = { BugzillaReportElement.BUG_STATUS, BugzillaReportElement.RESOLUTION, BugzillaReportElement.BUG_ID, BugzillaReportElement.REP_PLATFORM, BugzillaReportElement.PRODUCT, BugzillaReportElement.OP_SYS, BugzillaReportElement.COMPONENT, BugzillaReportElement.VERSION, BugzillaReportElement.PRIORITY, BugzillaReportElement.BUG_SEVERITY, BugzillaReportElement.ASSIGNED_TO, BugzillaReportElement.TARGET_MILESTONE, BugzillaReportElement.REPORTER, BugzillaReportElement.DEPENDSON, BugzillaReportElement.BLOCKED, BugzillaReportElement.BUG_FILE_LOC, BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS, BugzillaReportElement.CC}; // BugzillaReportElement.VOTES, for (BugzillaReportElement element : reportElements) { RepositoryTaskAttribute reportAttribute = BugzillaClient.makeNewAttribute(element); existingReport.addAttribute(element.getKeyString(), reportAttribute); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/0b252e00f1ba9b57eae2511cd4f1838adf4dc6bf/BugzillaClient.java/buggy/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
3875,
9895,
19865,
2498,
12,
780,
1438,
1489,
16,
6281,
2174,
751,
2062,
4820,
13,
288,
202,
202,
759,
5901,
666,
434,
2186,
487,
2898,
9788,
316,
6484,
202,
202,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
9895,
19865,
2498,
12,
780,
1438,
1489,
16,
6281,
2174,
751,
2062,
4820,
13,
288,
202,
202,
759,
5901,
666,
434,
2186,
487,
2898,
9788,
316,
6484,
202,
202,
75... |
krd.setMarkedAsRecoverable(false); } | krd.setMarkedAsRecoverable(false); } | public KeyRecoveryData keyRecovery(Admin admin, String username) { debug(">keyRecovery(user: " + username + ")"); KeyRecoveryData returnval = null; KeyRecoveryDataLocal krd = null; X509Certificate certificate = null; try { Collection result = keyrecoverydatahome.findByUserMark(username); Iterator i = result.iterator(); try { while (i.hasNext()) { krd = (KeyRecoveryDataLocal) i.next(); if (returnval == null) { int caid = krd.getIssuerDN().hashCode(); KeyRecoveryCAServiceResponse response = (KeyRecoveryCAServiceResponse) getSignSession().extendedService(admin,caid, new KeyRecoveryCAServiceRequest(KeyRecoveryCAServiceRequest.COMMAND_DECRYPTKEYS,krd.getKeyDataAsByteArray())); KeyPair keys = response.getKeyPair(); returnval = new KeyRecoveryData(krd.getCertificateSN(), krd.getIssuerDN(), krd.getUsername(), krd.getMarkedAsRecoverable(), keys); certificate = (X509Certificate) getCertificateStoreSession() .findCertificateByIssuerAndSerno(admin, krd.getIssuerDN(), krd.getCertificateSN()); } krd.setMarkedAsRecoverable(false); } getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_KEYRECOVERY, new java.util.Date(), username, certificate, LogEntry.EVENT_INFO_KEYRECOVERY, "Keydata for user: " + username + " have been sent for key recovery."); } catch (Exception e) { log.error("-keyRecovery: ", e); getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_KEYRECOVERY, new java.util.Date(), username, null, LogEntry.EVENT_ERROR_KEYRECOVERY, "Error when trying to revover key data."); } } catch (FinderException e) { } debug("<keyRecovery()"); return returnval; } // keyRecovery | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/eacf4dd5b0993e24e9a5988e58f9a0cbb200450b/LocalKeyRecoverySessionBean.java/clean/src/java/se/anatom/ejbca/keyrecovery/LocalKeyRecoverySessionBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1929,
11548,
751,
498,
11548,
12,
4446,
3981,
16,
514,
2718,
13,
288,
202,
202,
4148,
2932,
34,
856,
11548,
12,
1355,
30,
315,
397,
2718,
397,
7310,
1769,
202,
202,
653,
11548... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1929,
11548,
751,
498,
11548,
12,
4446,
3981,
16,
514,
2718,
13,
288,
202,
202,
4148,
2932,
34,
856,
11548,
12,
1355,
30,
315,
397,
2718,
397,
7310,
1769,
202,
202,
653,
11548... |
addByteCode(ByteCode.ALOAD_0); addByteCode(ALOAD_CONTEXT); addByteCode(ALOAD_SCOPE); addByteCode(ByteCode.DUP); addByteCode(ByteCode.ACONST_NULL); | cfw.add(ByteCode.ALOAD_0); cfw.add(ALOAD_CONTEXT); cfw.add(ALOAD_SCOPE); cfw.add(ByteCode.DUP); cfw.add(ByteCode.ACONST_NULL); | private void generateExecute(Context cx) { classFile.startMethod("exec", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;", (short)(ClassFileWriter.ACC_PUBLIC | ClassFileWriter.ACC_FINAL)); final byte ALOAD_CONTEXT = ByteCode.ALOAD_1; final byte ALOAD_SCOPE = ByteCode.ALOAD_2; String slashName = generatedClassName.replace('.', '/'); // to begin a script, call the initScript method addByteCode(ByteCode.ALOAD_0); // load 'this' addByteCode(ALOAD_SCOPE); addByteCode(ALOAD_CONTEXT); addVirtualInvoke(slashName, "initScript", "(Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Context;" +")V"); addByteCode(ByteCode.ALOAD_0); // load 'this' addByteCode(ALOAD_CONTEXT); addByteCode(ALOAD_SCOPE); addByteCode(ByteCode.DUP); addByteCode(ByteCode.ACONST_NULL); addVirtualInvoke(slashName, "call", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;" +"[Ljava/lang/Object;" +")Ljava/lang/Object;"); addByteCode(ByteCode.ARETURN); // 3 = this + context + scope classFile.stopMethod((short)3, null); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2103,
5289,
12,
1042,
9494,
13,
565,
288,
3639,
29728,
18,
1937,
1305,
2932,
4177,
3113,
17311,
7751,
48,
3341,
19,
8683,
15990,
19,
11242,
19,
1042,
4868,
17311,
397,
6,
48,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5289,
12,
1042,
9494,
13,
565,
288,
3639,
29728,
18,
1937,
1305,
2932,
4177,
3113,
17311,
7751,
48,
3341,
19,
8683,
15990,
19,
11242,
19,
1042,
4868,
17311,
397,
6,
48,
... |
break _loop982; | break _loop983; | public final void defineimagestate(AST _t) throws RecognitionException { AST defineimagestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t974 = _t; AST tmp663_AST_in = (AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case IMAGE: case PRIVATE: case PUBLIC: case PROTECTED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: case PUBLIC: case PROTECTED: { def_visib(_t); _t = _retTree; break; } case IMAGE: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp664_AST_in = (AST)_t; match(_t,IMAGE); _t = _t.getNextSibling(); AST tmp665_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop982: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LIKE: { AST __t978 = _t; AST tmp666_AST_in = (AST)_t; match(_t,LIKE); _t = _t.getFirstChild(); field(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALIDATE: { AST tmp667_AST_in = (AST)_t; match(_t,VALIDATE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t978; _t = _t.getNextSibling(); break; } case FILE: case FROM: case IMAGESIZE: case IMAGESIZECHARS: case IMAGESIZEPIXELS: { imagephrase_opt(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } case BGCOLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { color_expr(_t); _t = _retTree; break; } case CONVERT3DCOLORS: { AST tmp668_AST_in = (AST)_t; match(_t,CONVERT3DCOLORS); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case STRETCHTOFIT: { AST __t980 = _t; AST tmp669_AST_in = (AST)_t; match(_t,STRETCHTOFIT); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case RETAINSHAPE: { AST tmp670_AST_in = (AST)_t; match(_t,RETAINSHAPE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t980; _t = _t.getNextSibling(); break; } case TRANSPARENT: { AST tmp671_AST_in = (AST)_t; match(_t,TRANSPARENT); _t = _t.getNextSibling(); break; } default: { break _loop982; } } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TRIGGERS: { triggerphrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t974; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/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,
4426,
15374,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
15374,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4426,
15374,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4426,
15374,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
69... |
results.append(" />"); | results.append(">"); | public int doEndTag() throws JspException { // Acquire the label value we will be generating String label = value; if ((label == null) && (text != null)) label = text; if ((label == null) || (label.trim().length() < 1)) label = "Click"; // Generate an HTML element StringBuffer results = new StringBuffer(); results.append("<input type=\"button\""); if (property != null) { results.append(" name=\""); results.append(property); // * @since Struts 1.1 if( indexed ) prepareIndex( results, null ); results.append("\""); } if (accesskey != null) { results.append(" accesskey=\""); results.append(accesskey); results.append("\""); } if (tabindex != null) { results.append(" tabindex=\""); results.append(tabindex); results.append("\""); } results.append(" value=\""); results.append(label); results.append("\""); results.append(prepareEventHandlers()); results.append(prepareStyles()); results.append(" />"); // Render this element to our writer ResponseUtils.write(pageContext, results.toString()); // Evaluate the remainder of this page return (EVAL_PAGE); } | 2722 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2722/fb3fbdb8a18e2e3fcc1ee9d9e3d0a87b10f123d9/ButtonTag.java/buggy/src/share/org/apache/struts/taglib/html/ButtonTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
741,
25633,
1435,
1216,
27485,
288,
3639,
368,
28822,
326,
1433,
460,
732,
903,
506,
12516,
3639,
514,
1433,
273,
460,
31,
3639,
309,
14015,
1925,
422,
446,
13,
597,
261,
955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
741,
25633,
1435,
1216,
27485,
288,
3639,
368,
28822,
326,
1433,
460,
732,
903,
506,
12516,
3639,
514,
1433,
273,
460,
31,
3639,
309,
14015,
1925,
422,
446,
13,
597,
261,
955,
... |
for (int i = size - 1; i >= 0 ; i--) { | for (int i = size - 1; i >= 0; --i) { | public String getExpandedSystemId() { // search for the first external entity on the stack int size = fEntityStack.size(); for (int i = size - 1; i >= 0 ; i--) { ScannedEntity externalEntity = (ScannedEntity)fEntityStack.elementAt(i); if (externalEntity.entityLocation != null && externalEntity.entityLocation.getExpandedSystemId() != null) { return externalEntity.entityLocation.getExpandedSystemId(); } } return null; } | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/c570cf804a9a70a94c315030dc2493d8a3d7590a/XMLEntityManager.java/clean/src/org/apache/xerces/impl/XMLEntityManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
336,
17957,
3163,
548,
1435,
288,
5411,
368,
1623,
364,
326,
1122,
3903,
1522,
603,
326,
2110,
5411,
509,
963,
273,
284,
1943,
2624,
18,
1467,
5621,
5411,
364,
261,
474,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
336,
17957,
3163,
548,
1435,
288,
5411,
368,
1623,
364,
326,
1122,
3903,
1522,
603,
326,
2110,
5411,
509,
963,
273,
284,
1943,
2624,
18,
1467,
5621,
5411,
364,
261,
474,
277,
... |
for (Iterator<RefMethod> iterator = method.getDerivedMethods().iterator(); iterator.hasNext();) { RefMethod refSub = iterator.next(); | for (RefMethod refSub : method.getDerivedMethods()) { | public void visitMethod(RefMethod method) { if (!myProcessedMethods.contains(method)) { // Process class's static intitializers if (method.isStatic() || method.isConstructor()) { if (method.isConstructor()) { addInstantiatedClass(method.getOwnerClass()); } else { method.getOwnerClass().setReachable(true); } myProcessedMethods.add(method); makeContentReachable(method); makeClassInitializersReachable(method.getOwnerClass()); } else { if (isClassInstantiated(method.getOwnerClass())) { myProcessedMethods.add(method); makeContentReachable(method); } else { addDelayedMethod(method); } for (Iterator<RefMethod> iterator = method.getDerivedMethods().iterator(); iterator.hasNext();) { RefMethod refSub = iterator.next(); visitMethod(refSub); } } } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/44b1444ef611a7223c4ad1fa4fc69f6017017008/DeadCodeInspection.java/clean/source/com/intellij/codeInspection/deadCode/DeadCodeInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
25138,
12,
1957,
1305,
707,
13,
288,
1377,
309,
16051,
4811,
13533,
4712,
18,
12298,
12,
2039,
3719,
288,
3639,
368,
4389,
667,
1807,
760,
509,
305,
649,
8426,
3639,
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,
918,
25138,
12,
1957,
1305,
707,
13,
288,
1377,
309,
16051,
4811,
13533,
4712,
18,
12298,
12,
2039,
3719,
288,
3639,
368,
4389,
667,
1807,
760,
509,
305,
649,
8426,
3639,
309,
261,
... |
isHighlight = false; | this.layout = layout; this.asBar = asBar; | public InsertCaret(Composite parent, Point pos, int areaId, IWindowTrim insertBefore) { this.clientControl = parent; caretControl = new Canvas (parent, SWT.NONE); caretControl.setSize(size, size); caretControl.setVisible(false); // Remember the trim item that this insert is associated with this.areaId = areaId; this.insertBefore = insertBefore; // set up the painting vars isHighlight = false; // Use the SWT 'title' colors since they should always have a proper contrast // and are 'related' (i.e. should look good together) baseColor = caretControl.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); RGB background = caretControl.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB(); RGB blended = ColorUtil.blend(baseColor.getRGB(), background); hilightColor = new Color(caretControl.getDisplay(), blended); caretControl.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { if (isHighlight) { e.gc.setBackground(hilightColor); } else { e.gc.setBackground(baseColor); } switch (getAreaId()) { case SWT.LEFT: { int[] points = { 0, size/2, size, 0, size, size }; e.gc.fillPolygon(points); } break; case SWT.RIGHT: { int[] points = { size, size/2, 0, size, 0, 0 }; e.gc.fillPolygon(points); } break; case SWT.TOP: { int[] points = { size/2, 0, 0, size-1, size, size-1 }; e.gc.fillPolygon(points); } break; case SWT.BOTTOM: { int[] points = { size/2, size, 0, 0, size, 0 }; e.gc.fillPolygon(points); } break; } } }); showCaret(pos, areaId); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/57587c0601ebfba91c008feeec5539d6718cd5a6/InsertCaret.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dnd/InsertCaret.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8040,
39,
20731,
12,
9400,
982,
16,
4686,
949,
16,
509,
5091,
548,
16,
467,
3829,
14795,
18004,
13,
288,
202,
202,
2211,
18,
2625,
3367,
273,
982,
31,
202,
202,
71,
20731,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8040,
39,
20731,
12,
9400,
982,
16,
4686,
949,
16,
509,
5091,
548,
16,
467,
3829,
14795,
18004,
13,
288,
202,
202,
2211,
18,
2625,
3367,
273,
982,
31,
202,
202,
71,
20731,
3... |
propertyDialogAction.selectionChanged(selection); actionFactory.updateGlobalActions(selection); MenuManager newMenu = new MenuManager(ResourceNavigatorMessages.getString("ResourceNavigator.new")); menu.add(newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false); actionFactory.fillPopUpMenu(menu,selection); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS + "-end")); menu.add(new Separator()); if (propertyDialogAction.isApplicableForSelection()) menu.add(propertyDialogAction); | actionGroup.setContext(new ActionContext(selection)); actionGroup.fillContextMenu(menu); | void fillContextMenu(IMenuManager menu) { IStructuredSelection selection = (IStructuredSelection) getResourceViewer().getSelection(); propertyDialogAction.selectionChanged(selection); actionFactory.updateGlobalActions(selection); MenuManager newMenu = new MenuManager(ResourceNavigatorMessages.getString("ResourceNavigator.new")); //$NON-NLS-1$ menu.add(newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false); actionFactory.fillPopUpMenu(menu,selection); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS + "-end")); //$NON-NLS-1$ menu.add(new Separator()); if (propertyDialogAction.isApplicableForSelection()) menu.add(propertyDialogAction); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ae9406ca544b856fdac3df1b4951b06410fdcf52/ResourceNavigator.java/clean/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/ResourceNavigator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
3636,
27315,
12,
3445,
2104,
1318,
3824,
13,
288,
202,
202,
45,
30733,
6233,
4421,
273,
1082,
202,
12,
45,
30733,
6233,
13,
5070,
18415,
7675,
588,
6233,
5621,
202,
202,
4468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
3636,
27315,
12,
3445,
2104,
1318,
3824,
13,
288,
202,
202,
45,
30733,
6233,
4421,
273,
1082,
202,
12,
45,
30733,
6233,
13,
5070,
18415,
7675,
588,
6233,
5621,
202,
202,
4468,
... |
private void repareDataFromDBAndJTable() { checkForDiffWithOutSaveInDB(); | private void repareDataFromDBAndJTable() { checkForDiffWithOutSaveInDB(); | private void repareDataFromDBAndJTable() { checkForDiffWithOutSaveInDB(); int rowCount = jTable1.getRowCount(); boolean withRow = false; boolean restDocLine =false; if(isNew) { for(int i=0; i< rowCount; i++) { deleteDocLine(i,withRow,true); } deleteDocFacade(myParent.getDocFacadeType(),Integer.parseInt(myParent.getNumberDocFacade()),myParent.getDocFacadeLevel(),NON_DEFINE); } else { if(!isDocFacadeCreate) if(rows.size()>0) { int id_dl; docLineArray d=null; for(int i=0; i< rowCount; i++) { restDocLine= false; for(int j=0; j < rows.size();j++) { // ako sa ravni vry6tame starite // ako ne iztrivame docLine id_dl = (Integer) jTable1.getValueAt(i,12); d = (docLineArray) rows.get(j); if(id_dl==d.getID_DocLine()) { restDocLine = true; // vry6tane na starite stoinosti myParent.getCountriesT().updateDocLine(d.getID_DocLine(),myParent.getID_DocFacade(),d.getID_PC(), d.getStorageOut(),d.getPricePiece(),d.getRateReduction(), d.getNumberOfProduct(),d.getDDS(),d.getPriceTotal(), d.getPriceList()); deleteDocLine(i,withRow,false); break; } } if(!restDocLine) { deleteDocLine(i,withRow,true); } } } if(sales_main.isMakeDocByInputData) { int rCount = jTable1.getRowCount(); for(int i=0; i< rCount;i++) { int id_dl_ =(Integer) jTable1.getValueAt(i,12); myParent.getCountriesT().deleteDocLine(id_dl_); } myParent.getCountriesT().deleteRow(myParent.getID_DocFacade()); sales_main.isMakeDocByInputData=false; sales_main.dataIn=null; sales_main.dataOut=null; myParent.refreshTable(); } } } | 12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/819e12d5887ee005a6db30d46fcc791a090c703a/aeDocumentFacade.java/clean/src/imakante/sales/aeDocumentFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
3238,
918,
283,
1848,
751,
1265,
2290,
1876,
46,
1388,
1435,
288,
1377,
13855,
5938,
1190,
1182,
4755,
382,
2290,
5621,
7734,
509,
14888,
273,
525,
1388,
21,
18,
588,
26359,
5621,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
3238,
918,
283,
1848,
751,
1265,
2290,
1876,
46,
1388,
1435,
288,
1377,
13855,
5938,
1190,
1182,
4755,
382,
2290,
5621,
7734,
509,
14888,
273,
525,
1388,
21,
18,
588,
26359,
5621,
3639,
1... |
return funcall(mid, new RubyPointer(args)); } | return funcall(mid, new RubyPointer(args)); } | public RubyObject funcall(RubyId mid, RubyObject[] args) { return funcall(mid, new RubyPointer(args)); } | 45298 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45298/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObject.java/clean/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
1326,
454,
12,
54,
10340,
548,
7501,
16,
19817,
921,
8526,
833,
13,
288,
202,
202,
2463,
1326,
454,
12,
13138,
16,
394,
19817,
4926,
12,
1968,
10019,
202,
97,
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,
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,
19817,
921,
1326,
454,
12,
54,
10340,
548,
7501,
16,
19817,
921,
8526,
833,
13,
288,
202,
202,
2463,
1326,
454,
12,
13138,
16,
394,
19817,
4926,
12,
1968,
10019,
202,
97,
2,
... |
propertyOnDelete = propertyName; | properties.assignPropertyOnDeleteName(propertyName); | public void setPropertyOnDelete(String propertyName) { propertyOnDelete = propertyName; } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/c879b70b24afa19e65b4d2d550b27f6e981821f1/Vss.java/clean/main/src/net/sourceforge/cruisecontrol/sourcecontrols/Vss.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7486,
1398,
2613,
12,
780,
5470,
13,
288,
3639,
1790,
18,
6145,
1396,
1398,
2613,
461,
12,
4468,
461,
1769,
565,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
7486,
1398,
2613,
12,
780,
5470,
13,
288,
3639,
1790,
18,
6145,
1396,
1398,
2613,
461,
12,
4468,
461,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
throw new JspException(e); | throw new JspTagException(e); | public void doTag() throws JspException, IOException { try { getMailbox().emptyFolder(mId); } catch (ServiceException e) { throw new JspException(e); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/61d296a3da50419ef5117dee2011f8298042f554/EmptyFolderTag.java/clean/ZimbraTagLib/src/java/com/zimbra/cs/taglib/tag/folder/EmptyFolderTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
1435,
1216,
27485,
16,
1860,
288,
3639,
775,
288,
5411,
31991,
2147,
7675,
5531,
3899,
12,
81,
548,
1769,
3639,
289,
1044,
261,
15133,
425,
13,
288,
5411,
604,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1805,
1435,
1216,
27485,
16,
1860,
288,
3639,
775,
288,
5411,
31991,
2147,
7675,
5531,
3899,
12,
81,
548,
1769,
3639,
289,
1044,
261,
15133,
425,
13,
288,
5411,
604,
394,
... |
public BufferedImage openImage(String id, int no) throws FormatException, IOException { if (!id.equals(currentId)) initFile(id); if (no < 0 || no >= getImageCount(id)) { throw new FormatException("Invalid image number: " + no); } if (DEBUG) System.out.println("Reading image #" + no + "..."); ZVIBlock zviBlock = (ZVIBlock) blockList.elementAt(no); if (!isRGB(id) || !separated) { return zviBlock.readImage(in); } else { return ImageTools.splitChannels(zviBlock.readImage(in))[no % 3]; } } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/f8fea5aec2de454fd84e68759019ac47d99be52a/LegacyZVIReader.java/buggy/loci/formats/LegacyZVIReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
12362,
1696,
2040,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12362,
1696,
2040,
12,
780,
612,
16,
509,
1158,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
16051,
350,
18,
14963,
12,
2972,
548,
3719,
1208,
812,
12,
350,
1769,
565,
... | ||
IReportProvider provider = EditorUtil.getReportProvider( this, getEditorInput( ) ); | IReportProvider provider = getProvider( ); | protected ModuleHandle getReportModel( ) { if ( model == null ) { IReportProvider provider = EditorUtil.getReportProvider( this, getEditorInput( ) ); if ( provider != null ) { model = provider.getReportModuleHandle( getEditorInput( ) ); } } return model; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/604ce5391dbc451664ffe72c0eb2da50e51bc4ed/ReportScriptFormPage.java/clean/UI/org.eclipse.birt.report.designer.ui.editors.schematic/src/org/eclipse/birt/report/designer/ui/editors/pages/ReportScriptFormPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
5924,
3259,
22452,
1488,
12,
262,
202,
95,
202,
202,
430,
261,
938,
422,
446,
262,
202,
202,
95,
1082,
202,
45,
4820,
2249,
2893,
273,
18451,
1304,
18,
588,
4820,
2249,
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,
225,
202,
1117,
5924,
3259,
22452,
1488,
12,
262,
202,
95,
202,
202,
430,
261,
938,
422,
446,
262,
202,
202,
95,
1082,
202,
45,
4820,
2249,
2893,
273,
18451,
1304,
18,
588,
4820,
2249,
12,
... |
public static boolean isJustified(Context c, Element containing_block) { String text_align = c.css.getStyle(containing_block).getStringProperty(CSSName.TEXT_ALIGN); | public static boolean isJustified(CalculatedStyle style) { String text_align = style.getStringProperty(CSSName.TEXT_ALIGN); | public static boolean isJustified(Context c, Element containing_block) { String text_align = c.css.getStyle(containing_block).getStringProperty(CSSName.TEXT_ALIGN); if (text_align != null && text_align.equals("justify")) { return true; } return false; } | 53937 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53937/bbe26e114cd1f823901a5ca3d63b5fccfdfedf81/TextAlignJustify.java/buggy/src/java/org/xhtmlrenderer/layout/inline/TextAlignJustify.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1250,
353,
19642,
939,
12,
1042,
276,
16,
3010,
4191,
67,
2629,
13,
288,
3639,
514,
977,
67,
7989,
273,
276,
18,
5212,
18,
588,
2885,
12,
1213,
3280,
67,
2629,
2934,
588,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
19642,
939,
12,
1042,
276,
16,
3010,
4191,
67,
2629,
13,
288,
3639,
514,
977,
67,
7989,
273,
276,
18,
5212,
18,
588,
2885,
12,
1213,
3280,
67,
2629,
2934,
588,
7... |
if (jj_scan_token(MINUS)) return true; | if (jj_scan_token(COMMA)) return true; if (jj_3R_89()) return true; | final private boolean jj_3R_322() { if (jj_scan_token(MINUS)) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/67e36956371c94d98bb371923fcf416ddb50fd0f/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
1578,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
4208,
5535,
3719,
327,
638,
31,
309,
261,
78,
78,
67,
23,
54,
67,
6675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
1578,
22,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
4208,
5535,
3719,
327,
638,
31,
309,
261,
78,
78,
67,
23,
54,
67,
6675,
... |
public org.quickfix.field.PartyIDSource getPartyIDSource() throws FieldNotFound { org.quickfix.field.PartyIDSource value = new org.quickfix.field.PartyIDSource(); | public quickfix.field.PartyIDSource getPartyIDSource() throws FieldNotFound { quickfix.field.PartyIDSource value = new quickfix.field.PartyIDSource(); | public org.quickfix.field.PartyIDSource getPartyIDSource() throws FieldNotFound { org.quickfix.field.PartyIDSource value = new org.quickfix.field.PartyIDSource(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteStatusRequest.java/clean/src/java/src/quickfix/fix44/QuoteStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17619,
734,
1830,
1689,
7325,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17619,
734,
1830,
460,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
17619,
734,
1830,
1689,
7325,
734,
1830,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
17619,
734,
1830,
460,
273,
394,
... |
charCounts[C40_ENCODATION] += 4.0 / 3.0; | charCounts[C40_ENCODATION] += 4f / 3f; | private static int lookAheadTest(String msg, int startpos, int currentMode) { double[] charCounts; //step J if (currentMode == ASCII_ENCODATION) { charCounts = new double[] {0, 1, 1, 1, 1, 1.25f}; } else { charCounts = new double[] {1, 2, 2, 2, 2, 2.25f}; charCounts[currentMode] = 0; } int charsProcessed = 0; while (true) { //step K if ((startpos + charsProcessed) == msg.length() - 1) { int min = Integer.MAX_VALUE; byte[] mins = new byte[6]; int[] intCharCounts = new int[6]; min = findMinimums(charCounts, intCharCounts, min, mins); int minCount = getMinimumCount(mins); if (intCharCounts[ASCII_ENCODATION] == min) { return ASCII_ENCODATION; } else if (minCount == 1 && mins[BASE256_ENCODATION] > 0) { return BASE256_ENCODATION; } else if (minCount == 1 && mins[EDIFACT_ENCODATION] > 0) { return EDIFACT_ENCODATION; } else if (minCount == 1 && mins[TEXT_ENCODATION] > 0) { return TEXT_ENCODATION; } else if (minCount == 1 && mins[X12_ENCODATION] > 0) { return X12_ENCODATION; } else { return C40_ENCODATION; } } char c = msg.charAt(startpos + charsProcessed); charsProcessed++; //step L if (isDigit(c)) { charCounts[ASCII_ENCODATION] += 0.5; } else if (isExtendedASCII(c)) { charCounts[ASCII_ENCODATION] = (int)Math.ceil(charCounts[ASCII_ENCODATION]); charCounts[ASCII_ENCODATION] += 2; } else { charCounts[ASCII_ENCODATION] = (int)Math.ceil(charCounts[ASCII_ENCODATION]); charCounts[ASCII_ENCODATION] += 1; } //step M if (isNativeC40(c)) { charCounts[C40_ENCODATION] += 2.0 / 3.0; } else if (isExtendedASCII(c)) { charCounts[C40_ENCODATION] += 8.0 / 3.0; } else { charCounts[C40_ENCODATION] += 4.0 / 3.0; } //step N if (isNativeText(c)) { charCounts[TEXT_ENCODATION] += 2.0 / 3.0; } else if (isExtendedASCII(c)) { charCounts[TEXT_ENCODATION] += 8.0 / 3.0; } else { charCounts[TEXT_ENCODATION] += 4.0 / 3.0; } //step O if (isNativeX12(c)) { charCounts[X12_ENCODATION] += 2.0 / 3.0; } else if (isExtendedASCII(c)) { charCounts[X12_ENCODATION] += 13.0 / 3.0; } else { charCounts[X12_ENCODATION] += 10.0 / 3.0; } //step P if (isNativeEDIFACT(c)) { charCounts[EDIFACT_ENCODATION] += 3.0 / 4.0; } else if (isExtendedASCII(c)) { charCounts[EDIFACT_ENCODATION] += 17.0 / 4.0; } else { charCounts[EDIFACT_ENCODATION] += 13.0 / 4.0; } // step Q if (isSpecialB256(c)) { charCounts[BASE256_ENCODATION] += 4; } else { charCounts[BASE256_ENCODATION] += 1; } //step R if (charsProcessed >= 4) { /* for (int a = 0; a < charCounts.length; a++) { System.out.println(a + " " + ENCODATION_NAMES[a] + " " + charCounts[a]); }*/ int min = Integer.MAX_VALUE; int[] intCharCounts = new int[6]; byte[] mins = new byte[6]; min = findMinimums(charCounts, intCharCounts, min, mins); int minCount = getMinimumCount(mins); if (intCharCounts[ASCII_ENCODATION] + 1 <= intCharCounts[BASE256_ENCODATION] && intCharCounts[ASCII_ENCODATION] + 1 <= intCharCounts[C40_ENCODATION] && intCharCounts[ASCII_ENCODATION] + 1 <= intCharCounts[TEXT_ENCODATION] && intCharCounts[ASCII_ENCODATION] + 1 <= intCharCounts[X12_ENCODATION] && intCharCounts[ASCII_ENCODATION] + 1 <= intCharCounts[EDIFACT_ENCODATION]) { return ASCII_ENCODATION; } else if (intCharCounts[BASE256_ENCODATION] + 1 <= intCharCounts[ASCII_ENCODATION] || (mins[C40_ENCODATION] + mins[TEXT_ENCODATION] + mins[X12_ENCODATION] + mins[EDIFACT_ENCODATION]) == 0) { return BASE256_ENCODATION; } else if (minCount == 1 && mins[EDIFACT_ENCODATION] > 0) { return EDIFACT_ENCODATION; } else if (minCount == 1 && mins[TEXT_ENCODATION] > 0) { return TEXT_ENCODATION; } else if (minCount == 1 && mins[X12_ENCODATION] > 0) { return X12_ENCODATION; } else if (intCharCounts[C40_ENCODATION] + 1 < intCharCounts[ASCII_ENCODATION] && intCharCounts[C40_ENCODATION] + 1 < intCharCounts[BASE256_ENCODATION] && intCharCounts[C40_ENCODATION] + 1 < intCharCounts[EDIFACT_ENCODATION] && intCharCounts[C40_ENCODATION] + 1 < intCharCounts[TEXT_ENCODATION]) { if (mins[C40_ENCODATION] < mins[X12_ENCODATION]) { return C40_ENCODATION; } else if (mins[C40_ENCODATION] == mins[X12_ENCODATION]) { int p = startpos + charsProcessed + 1; while (p < msg.length()) { char tc = msg.charAt(p); if (isX12TermSep(tc)) { return X12_ENCODATION; } else if (!isNativeX12(tc)) { break; } } return C40_ENCODATION; } } } } } | 53991 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53991/55c485ac1cf5e8431f7eef62c8c559c448188878/DataMatrixHighLevelEncoder.java/buggy/src/java/org/krysalis/barcode4j/impl/datamatrix/DataMatrixHighLevelEncoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
509,
2324,
24250,
4709,
12,
780,
1234,
16,
509,
787,
917,
16,
509,
783,
2309,
13,
288,
3639,
1645,
8526,
1149,
9211,
31,
3639,
368,
4119,
804,
3639,
309,
261,
2972,
2309,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
509,
2324,
24250,
4709,
12,
780,
1234,
16,
509,
787,
917,
16,
509,
783,
2309,
13,
288,
3639,
1645,
8526,
1149,
9211,
31,
3639,
368,
4119,
804,
3639,
309,
261,
2972,
2309,
422... |
myCurrentMergedFile = myCvsFileSystem.getLocalFileSystem().getFile(removeModuleNameFrom(relativeRepositoryPath)); ensureFileIsInMap(myCurrentMergedFile); | final File file = myCvsFileSystem.getLocalFileSystem().getFile(removeModuleNameFrom(relativeRepositoryPath)); ensureFileIsInMap(file); myCurrentMergedFile = myMergedFiles.get(file); | public void messageSent(String message, boolean error, boolean tagged) { if (message.startsWith(MERGED_FILE_MESSAGE_PREFIX)) { String pathInRepository = message.substring(MERGED_FILE_MESSAGE_PREFIX.length(), message.length() - MERGED_FILE_MESSAGE_POSTFIX.length()); String relativeRepositoryPath = myCvsFileSystem.getRelativeRepositoryPath(pathInRepository); myCurrentMergedFile = myCvsFileSystem.getLocalFileSystem().getFile(removeModuleNameFrom(relativeRepositoryPath)); ensureFileIsInMap(myCurrentMergedFile); } else if (message.startsWith(CREATED_BY_SECOND_PARTY_PREFIX) && message.endsWith(CREATED_BY_SECOND_PARTY_POSTFIX)) { String pathInRepository = message.substring(CREATED_BY_SECOND_PARTY_PREFIX.length(), message.length() - CREATED_BY_SECOND_PARTY_POSTFIX.length()); File ioFile = myCvsFileSystem.getLocalFileSystem().getFile(pathInRepository); String relativeRepositoryPath = myCvsFileSystem.getRelativeRepositoryPath(ioFile.getPath()); File file = myCvsFileSystem.getLocalFileSystem().getFile(removeModuleNameFrom(relativeRepositoryPath)); myCreatedBySecondParty.add(file); } else if (MERGE_PATTERN.matcher(message).matches()) { Matcher matcher = MERGE_PATTERN.matcher(message); if (matcher.matches()) { String relativeFileName = matcher.group(4); File file = myCvsFileSystem.getLocalFileSystem().getFile(relativeFileName); ensureFileIsInMap(file); } } else if (MERGING_DIFFERENCES_PATTERN.matcher(message).matches()) { Matcher matcher = MERGING_DIFFERENCES_PATTERN.matcher(message); if (matcher.matches()) { String firstRevision = matcher.group(2); String secondRevision = matcher.group(4); ensureFileIsInMap(myCurrentMergedFile); Collection<String> revisions = myMergedFiles.get(myCurrentMergedFile); revisions.add(firstRevision); revisions.add(secondRevision); } } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/b47707bbc41ca215e5fabeacfd750a48714eab26/UpdatedFilesManager.java/buggy/plugins/cvs2/source/com/intellij/cvsSupport2/cvsoperations/common/UpdatedFilesManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
883,
7828,
12,
780,
883,
16,
1250,
555,
16,
1250,
12503,
13,
288,
565,
309,
261,
2150,
18,
17514,
1190,
12,
20969,
31602,
67,
3776,
67,
8723,
67,
6307,
3719,
288,
1377,
514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
883,
7828,
12,
780,
883,
16,
1250,
555,
16,
1250,
12503,
13,
288,
565,
309,
261,
2150,
18,
17514,
1190,
12,
20969,
31602,
67,
3776,
67,
8723,
67,
6307,
3719,
288,
1377,
514,
... |
if(Double.isNaN(inSlope)){ | if(inSlope == null){ | private double computeRotation(double[] prev, int prevSegType, double[] cur, int curSegType, double[] next, int nextSegType, double[] moveTo){ // Compute in slope, i.e., the slope of the segment // going into the current point double inSlope = computeInSlope(prev, prevSegType, cur, curSegType, moveTo); // Compute out slope, i.e., the slope of the segment // going out of the current point double outSlope = computeOutSlope(cur, curSegType, next, nextSegType, moveTo); if(Double.isNaN(inSlope)){ inSlope = outSlope; } if(Double.isNaN(outSlope)){ outSlope = inSlope; } if(Double.isNaN(inSlope)){ return 0; } double rotationIn = Math.atan(inSlope)*180./Math.PI; double rotationOut = Math.atan(outSlope)*180./Math.PI; double rotation = (rotationIn + rotationOut)/2; return rotation; } | 46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/c1f723953e861c744fcb51e31674cc5beb2298aa/DecoratedShapeNode.java/clean/sources/org/apache/batik/gvt/DecoratedShapeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1645,
3671,
14032,
12,
9056,
8526,
2807,
16,
4766,
282,
509,
2807,
3289,
559,
16,
4766,
282,
1645,
8526,
662,
16,
4766,
282,
509,
662,
3289,
559,
16,
4766,
282,
1645,
8526,
1024,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1645,
3671,
14032,
12,
9056,
8526,
2807,
16,
4766,
282,
509,
2807,
3289,
559,
16,
4766,
282,
1645,
8526,
662,
16,
4766,
282,
509,
662,
3289,
559,
16,
4766,
282,
1645,
8526,
1024,
... |
public void delStepAttributes(long id_transformation) throws KettleDatabaseException | public synchronized void delStepAttributes(long id_transformation) throws KettleDatabaseException | public void delStepAttributes(long id_transformation) throws KettleDatabaseException { String sql = "DELETE FROM R_STEP_ATTRIBUTE WHERE ID_TRANSFORMATION = " + id_transformation; database.execStatement(sql); } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/9a23bf7234591fe690816bbf6320414c2ad3eaae/Repository.java/clean/src/be/ibridge/kettle/repository/Repository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1464,
4160,
2498,
12,
5748,
612,
67,
2338,
1471,
13,
1216,
1475,
278,
5929,
4254,
503,
202,
95,
202,
202,
780,
1847,
273,
315,
6460,
4571,
534,
67,
26951,
67,
11616,
4852... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1464,
4160,
2498,
12,
5748,
612,
67,
2338,
1471,
13,
1216,
1475,
278,
5929,
4254,
503,
202,
95,
202,
202,
780,
1847,
273,
315,
6460,
4571,
534,
67,
26951,
67,
11616,
4852... |
partition.add( configs[ ii ].getSuffix(), normSuffix, configs[ ii ].getAttributes() ); | partition.add( configs[ii].getSuffix(), normSuffix, configs[ii].getAttributes() ); | private void startUpAppPartitions( String eveWkdir ) throws NamingException { OidRegistry oidRegistry = globalRegistries.getOidRegistry(); AttributeTypeRegistry attributeTypeRegistry; attributeTypeRegistry = globalRegistries.getAttributeTypeRegistry(); MatchingRuleRegistry reg = globalRegistries.getMatchingRuleRegistry(); // start getting all the parameters from the initial environment ContextPartitionConfig[] configs = null; configs = PartitionConfigBuilder .getContextPartitionConfigs( initialEnv ); for( int ii = 0; ii < configs.length; ii ++ ) { // ---------------------------------------------------------------- // create working directory under eve directory for app partition // ---------------------------------------------------------------- String wkdir = eveWkdir + File.separator + configs[ ii ].getId(); mkdirs( eveWkdir, configs[ ii ].getId() ); // ---------------------------------------------------------------- // create the database/store // ---------------------------------------------------------------- Name upSuffix = new LdapName( configs[ ii ].getSuffix() ); Normalizer dnNorm = reg.lookup( "distinguishedNameMatch" ) .getNormalizer(); Name normSuffix = new LdapName( ( String ) dnNorm .normalize( configs[ ii ].getSuffix() ) ); Database db = new JdbmDatabase( upSuffix, wkdir ); // ---------------------------------------------------------------- // create the search engine using db, enumerators and evaluators // ---------------------------------------------------------------- ExpressionEvaluator evaluator; evaluator = new ExpressionEvaluator( db, oidRegistry, attributeTypeRegistry ); ExpressionEnumerator enumerator; enumerator = new ExpressionEnumerator( db, attributeTypeRegistry, evaluator ); SearchEngine eng = new DefaultSearchEngine( db, evaluator, enumerator ); // ---------------------------------------------------------------- // fill up a list with the AttributeTypes for the system indices // ---------------------------------------------------------------- ArrayList attributeTypeList = new ArrayList(); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.ALIAS_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.EXISTANCE_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.HIERARCHY_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.NDN_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.ONEALIAS_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.SUBALIAS_OID ) ); attributeTypeList.add( attributeTypeRegistry .lookup( SystemPartition.UPDN_OID ) ); // ---------------------------------------------------------------- // if user indices are specified add those attribute types as well // ---------------------------------------------------------------- for( int jj = 0; jj < configs[ ii ].getIndices().length; jj ++ ) { attributeTypeList.add( attributeTypeRegistry .lookup( configs[ ii ].getIndices()[ jj ] ) ); } // ---------------------------------------------------------------- // fire up the appPartition & register it with the nexus // ---------------------------------------------------------------- AttributeType[] indexTypes = ( AttributeType[] ) attributeTypeList .toArray( new AttributeType[ attributeTypeList.size() ] ); ApplicationPartition partition = new ApplicationPartition( upSuffix, normSuffix, db, eng, indexTypes ); nexus.register( partition ); // ---------------------------------------------------------------- // add the nexus context entry // ---------------------------------------------------------------- partition.add( configs[ ii ].getSuffix(), normSuffix, configs[ ii ].getAttributes() ); } } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/57ae9424abbd202980bfc1a7f2c0ed019121fe89/ServerContextFactory.java/clean/core/src/main/java/org/apache/ldap/server/jndi/ServerContextFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
787,
1211,
3371,
13738,
12,
514,
425,
537,
59,
12979,
262,
5411,
1216,
26890,
565,
288,
3639,
28706,
4243,
7764,
4243,
273,
2552,
1617,
22796,
18,
588,
19105,
4243,
5621,
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,
787,
1211,
3371,
13738,
12,
514,
425,
537,
59,
12979,
262,
5411,
1216,
26890,
565,
288,
3639,
28706,
4243,
7764,
4243,
273,
2552,
1617,
22796,
18,
588,
19105,
4243,
5621,
3639,
... |
public String getDisabledExpr() { return (disabledExpr); } | public String getDisabledExpr() { return (disabledExpr); } | public String getDisabledExpr() { return (disabledExpr); } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/db064e19656421b94aaf753550935d95f44bd5f9/ELTextareaTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELTextareaTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
514,
282,
336,
8853,
4742,
1435,
288,
327,
261,
9278,
4742,
1769,
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... | [
1,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
225,
514,
282,
336,
8853,
4742,
1435,
288,
327,
261,
9278,
4742,
1769,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
logln("==test_07: CertStoreException=="); | public void testCertStoreException07() { logln("==test_07: CertStoreException=="); CertStoreException tE; for (int i = 0; i < msgs.length; i++) { tE = new CertStoreException(msgs[i], null); assertTrue(errNotExc.concat(" (msg: ").concat(msgs[i]).concat(")"), tE instanceof CertStoreException); assertEquals("getMessage() must return: ".concat(msgs[i]), tE .getMessage(), msgs[i]); assertNull("getCause() must return null", tE.getCause()); try { throw tE; } catch (Exception e) { assertTrue(createErr(tE, e), tE.equals(e)); } } } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/a9fd98c8fca0593ca0da8ba774c48808f903f221/CertStoreExceptionTest.java/buggy/modules/security2/test/common/unit/java/security/cert/CertStoreExceptionTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
5461,
21151,
8642,
1435,
288,
2868,
11921,
21151,
268,
41,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
8733,
18,
2469,
31,
277,
27245,
288,
5411,
268,
41,
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,
1842,
5461,
21151,
8642,
1435,
288,
2868,
11921,
21151,
268,
41,
31,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
8733,
18,
2469,
31,
277,
27245,
288,
5411,
268,
41,
273... | |
throw new SelectionNodeFound(binding); | throw new SelectionNodeFound(this, binding); | public void resolve(BlockScope scope) { super.resolve(scope); throw new SelectionNodeFound(binding); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/8d68e00ba785472efc36cd0f68660beb95ca71eb/SelectionOnLocalName.java/buggy/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnLocalName.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2245,
12,
1768,
3876,
2146,
13,
288,
202,
202,
9565,
18,
10828,
12,
4887,
1769,
202,
202,
12849,
394,
12977,
907,
2043,
12,
7374,
1769,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2245,
12,
1768,
3876,
2146,
13,
288,
202,
202,
9565,
18,
10828,
12,
4887,
1769,
202,
202,
12849,
394,
12977,
907,
2043,
12,
7374,
1769,
202,
97,
2,
-100,
-100,
-100,
-100... |
SVGAnimatedLength result; if (xReference == null || (result = (SVGAnimatedLength)xReference.get()) == null) { result = new SVGOMAnimatedLength(this, null, SVG_X_ATTRIBUTE, null); xReference = new WeakReference(result); } return result; | throw new RuntimeException(" !!! TODO: getX()"); | public SVGAnimatedLength getX() { SVGAnimatedLength result; if (xReference == null || (result = (SVGAnimatedLength)xReference.get()) == null) { result = new SVGOMAnimatedLength(this, null, SVG_X_ATTRIBUTE, null); xReference = new WeakReference(result); } return result; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/c894adcdabbe67baf55a0333571ad839739df615/SVGOMUseElement.java/clean/sources/org/apache/batik/dom/svg/SVGOMUseElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11281,
979,
17275,
1782,
6538,
1435,
288,
202,
26531,
979,
17275,
1782,
563,
31,
202,
430,
261,
92,
2404,
422,
446,
747,
202,
565,
261,
2088,
273,
261,
26531,
979,
17275,
1782,
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,
377,
1071,
11281,
979,
17275,
1782,
6538,
1435,
288,
202,
26531,
979,
17275,
1782,
563,
31,
202,
430,
261,
92,
2404,
422,
446,
747,
202,
565,
261,
2088,
273,
261,
26531,
979,
17275,
1782,
13,
... |
if (Os.isFamily("dos")) { compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"}, new String[] {}); } else { compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"}, new String[] {}); } | compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"}, new String[] {}); | public void testFullPathMatchesCaseInsensitive() { DirectoryScanner ds = new DirectoryScanner(); ds.setCaseSensitive(false); ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); ds.scan(); if (Os.isFamily("dos")) { compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"}, new String[] {}); } else { compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"}, new String[] {}); } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/ca002d2e45d2f38ef3a8be427fbbe523c809d0c7/DirectoryScannerTest.java/buggy/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
24173,
6869,
2449,
21931,
1435,
288,
3639,
8930,
11338,
3780,
273,
394,
8930,
11338,
5621,
3639,
3780,
18,
542,
2449,
14220,
12,
5743,
1769,
3639,
3780,
18,
542,
2171,
1214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24173,
6869,
2449,
21931,
1435,
288,
3639,
8930,
11338,
3780,
273,
394,
8930,
11338,
5621,
3639,
3780,
18,
542,
2449,
14220,
12,
5743,
1769,
3639,
3780,
18,
542,
2171,
1214... |
contentValue = (String) ExpressionEvaluatorManager.evaluate("text", text, String.class, this, pageContext); | contentValue = text; | public int doEndTag() throws JspException { BodyContent content = null; if (localVar == null) { content = pageContext.pushBody(); } int returnVal = super.doEndTag(); if (localVar != null) { String varValue = (String) pageContext.getAttribute(localVar, localScope); if (varValue.startsWith(MessageSupport.UNDEFINED_KEY) && varValue.endsWith(MessageSupport.UNDEFINED_KEY) && text != null) { varValue = (String) ExpressionEvaluatorManager.evaluate("text", text, String.class, this, pageContext); pageContext.setAttribute(localVar, varValue, localScope); } } else { String contentValue = content.getString(); contentValue = content.getString(); if (contentValue.startsWith(MessageSupport.UNDEFINED_KEY) && contentValue.endsWith(MessageSupport.UNDEFINED_KEY) && text != null) { contentValue = (String) ExpressionEvaluatorManager.evaluate("text", text, String.class, this, pageContext); } pageContext.popBody(); try { pageContext.getOut().print(contentValue); } catch (IOException ex) { throw new OspException("", ex); } } return returnVal; } | 48935 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48935/c5d2232cac2ec980aa9518b6ab82472cf0ba6c13/Message.java/clean/metaobj/tool-lib/src/java/org/sakaiproject/metaobj/shared/control/tag/Message.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
509,
741,
25633,
1435,
1216,
27485,
288,
1377,
5652,
1350,
913,
273,
446,
31,
1377,
309,
261,
3729,
1537,
422,
446,
13,
288,
540,
913,
273,
21442,
18,
6206,
2250,
5621,
1377,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
741,
25633,
1435,
1216,
27485,
288,
1377,
5652,
1350,
913,
273,
446,
31,
1377,
309,
261,
3729,
1537,
422,
446,
13,
288,
540,
913,
273,
21442,
18,
6206,
2250,
5621,
1377,
289,
... |
setLine (lineno, 0); | position = (lineno << 12) + colno; | public final void setLine (int lineno) { setLine (lineno, 0); } | 36870 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/36870/067bdd8647cf30bb0ae9248b671c782f85441a21/Expression.java/buggy/gnu/expr/Expression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
26482,
261,
474,
7586,
13,
225,
288,
565,
1754,
273,
261,
17782,
2296,
2593,
13,
397,
645,
2135,
31,
225,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
26482,
261,
474,
7586,
13,
225,
288,
565,
1754,
273,
261,
17782,
2296,
2593,
13,
397,
645,
2135,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
vCard.setField(element.getNodeName(), getTextContent(element)); | vCard.setField(field, getTextContent(element)); | private void setupSimpleFields() { NodeList childNodes = document.getDocumentElement().getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); if (node instanceof Element) { Element element = (Element) node; if ("FN".equals(element.getNodeName())) continue; if (element.getChildNodes().getLength() == 0) { vCard.setField(element.getNodeName(), ""); } else if (element.getChildNodes().getLength() == 1 && element.getChildNodes().item(0) instanceof Text) { vCard.setField(element.getNodeName(), getTextContent(element)); } } } } | 1538 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1538/f8bbe118b474ac928f5235210ce8d75dd4d6d09a/VCardProvider.java/buggy/source/org/jivesoftware/smackx/provider/VCardProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
3238,
918,
3875,
5784,
2314,
1435,
288,
5411,
16781,
10582,
273,
1668,
18,
588,
2519,
1046,
7675,
588,
22460,
5621,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
10582,
18,
588,
1782,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
918,
3875,
5784,
2314,
1435,
288,
5411,
16781,
10582,
273,
1668,
18,
588,
2519,
1046,
7675,
588,
22460,
5621,
5411,
364,
261,
474,
277,
273,
374,
31,
277,
411,
10582,
18,
588,
1782,... |
return; | public void setAttributes(String name, Scriptable start, int attributes) throws PropertyException { Object[] data = idMapData; if (data != null) { int id = getId(name, data); if (id != 0) { synchronized (this) { if (data[id * ID_MULT + VALUE_SHIFT] != NOT_FOUND) { setAttributes(id, attributes); return; } } // For ids with deleted values super will throw exceptions } } super.setAttributes(name, start, attributes); } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/8961afa95f58c2380a8167427d0d8841e91900c1/IdScriptable.java/clean/js/rhino/src/org/mozilla/javascript/IdScriptable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21175,
12,
780,
508,
16,
22780,
787,
16,
17311,
509,
1677,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
1033,
8526,
501,
273,
612,
863,
751,
31,
3639,
309,
261,
892,
480,
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,
377,
1071,
918,
21175,
12,
780,
508,
16,
22780,
787,
16,
17311,
509,
1677,
13,
3639,
1216,
4276,
503,
565,
288,
3639,
1033,
8526,
501,
273,
612,
863,
751,
31,
3639,
309,
261,
892,
480,
446,
... | |
size=PatchEdit.MidiIn.readMessage (prefsDialog.masterController,buffer,128); | size=PatchEdit.MidiIn.readMessage (appConfig.getMasterController(),buffer,128); | public void actionPerformed (ActionEvent evt) { try { //FIXME there is a bug in the javaMIDI classes so this routine gets the inputmessages from the faderbox as well as the // master controller. I cant figure out a way to fix it so let's just handle them here. if ((prefsDialog.faderEnable) &(PatchEdit.MidiIn.messagesWaiting (prefsDialog.masterController)>0)) for (int i=0;i<33;i++) newFaderValue[i]=255; while (PatchEdit.MidiIn.messagesWaiting (prefsDialog.masterController)>0) { int size; int port; size=PatchEdit.MidiIn.readMessage (prefsDialog.masterController,buffer,128); p=PatchEdit.Clipboard; if ((desktop.getSelectedFrame () instanceof PatchBasket)&&(!(desktop.getSelectedFrame () instanceof PatchEditorFrame))) { if ((desktop.getSelectedFrame () instanceof LibraryFrame ) & ((LibraryFrame)((desktop.getSelectedFrame ()))).table.getSelectedRowCount ()==0) break; ((PatchBasket)desktop.getSelectedFrame ()).CopySelectedPatch (); } else Clipboard=((PatchEditorFrame)desktop.getSelectedFrame ()).p; // port=(PatchEdit.deviceList.get (Clipboard.deviceNum)). port=((Device) (PatchEdit.deviceList.get (Clipboard.deviceNum))).getPort(); if ((prefsDialog.faderEnable)&(desktop.getSelectedFrame () instanceof PatchEditorFrame) && (buffer[0]&0xF0) == 0xB0) sendFaderMessage (buffer[0],buffer[1],buffer[2]); else { if (((buffer[0] & 0xF0) > 0x70) && ((buffer[0] & 0xF0) <0xF0 )) buffer[0]=(byte)((buffer[0] & 0xF0) +((Device) (PatchEdit.deviceList.get (Clipboard.deviceNum))).getChannel()-1); PatchEdit.MidiOut.writeLongMessage (port,buffer,size); } PatchEdit.Clipboard=p; } } catch (Exception ex) {ErrorMsg.reportStatus (ex);}; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/ef2f8c35d6ec786be7521d894b88ee90554fb83c/PatchEdit.java/clean/JSynthLib/core/PatchEdit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
26100,
261,
1803,
1133,
6324,
13,
5411,
288,
27573,
775,
7734,
288,
10792,
368,
25810,
1915,
353,
279,
7934,
316,
326,
2252,
49,
30218,
3318,
1427,
333,
12245,
5571,
326,
810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
26100,
261,
1803,
1133,
6324,
13,
5411,
288,
27573,
775,
7734,
288,
10792,
368,
25810,
1915,
353,
279,
7934,
316,
326,
2252,
49,
30218,
3318,
1427,
333,
12245,
5571,
326,
810,
... |
panel.add(findNext); panel.add(replaceBtn); | panel.add(findBtn); | public SearchAndReplace(View view) { super(view,jEdit.getProperty("search.title"),false); this.view = view; find = new JTextField(jEdit.getProperty("search.find" + ".value"),30); replace = new JTextField(jEdit .getProperty("search.replace.value"),30); ignoreCase = new JCheckBox(jEdit.getProperty( "search.ignoreCase"), "on".equals(jEdit.getProperty("search." + "ignoreCase.toggle"))); regexpSyntax = new JComboBox(jEdit.SYNTAX_LIST); regexpSyntax.setSelectedItem(jEdit.getProperty("search" + ".regexp.value")); findNext = new JButton(jEdit.getProperty("search.next")); replaceBtn = new JButton(jEdit.getProperty("search.replaceBtn")); replaceAll = new JButton(jEdit.getProperty("search.replaceAll")); close = new JButton(jEdit.getProperty("search.close")); getContentPane().setLayout(new BorderLayout()); JPanel panel = new JPanel(); GridBagLayout layout = new GridBagLayout(); panel.setLayout(layout); GridBagConstraints constraints = new GridBagConstraints(); constraints.gridwidth = constraints.gridheight = 1; constraints.fill = constraints.BOTH; constraints.weightx = 1.0f; JLabel label = new JLabel(jEdit.getProperty("search.find"), SwingConstants.RIGHT); layout.setConstraints(label,constraints); panel.add(label); constraints.gridx = 1; constraints.gridwidth = 2; layout.setConstraints(find,constraints); panel.add(find); constraints.gridx = 0; constraints.gridwidth = 1; constraints.gridy = 2; label = new JLabel(jEdit.getProperty("search.replace"), SwingConstants.RIGHT); layout.setConstraints(label,constraints); panel.add(label); constraints.gridx = 1; constraints.gridwidth = 2; layout.setConstraints(replace,constraints); panel.add(replace); getContentPane().add("North",panel); panel = new JPanel(); panel.add(ignoreCase); panel.add(new JLabel(jEdit.getProperty("search.regexp"))); panel.add(regexpSyntax); getContentPane().add("Center",panel); panel = new JPanel(); panel.add(findNext); panel.add(replaceBtn); panel.add(replaceAll); panel.add(close); getContentPane().add("South",panel); Dimension screen = getToolkit().getScreenSize(); pack(); setLocation((screen.width - getSize().width) / 2, (screen.height - getSize().height) / 2); setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(this); findNext.addActionListener(this); replaceBtn.addActionListener(this); replaceAll.addActionListener(this); close.addActionListener(this); show(); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/412ad66cd89f34c0de10579745d8fb8e093c6b5b/SearchAndReplace.java/buggy/org/gjt/sp/jedit/gui/SearchAndReplace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
5167,
1876,
5729,
12,
1767,
1476,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
78,
4666,
18,
588,
1396,
2932,
3072,
18,
2649,
6,
3631,
5743,
1769,
202,
202,
2211,
18,
1945,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5167,
1876,
5729,
12,
1767,
1476,
13,
202,
95,
202,
202,
9565,
12,
1945,
16,
78,
4666,
18,
588,
1396,
2932,
3072,
18,
2649,
6,
3631,
5743,
1769,
202,
202,
2211,
18,
1945,
27... |
{ Connection cx = getConnection(); | { Connection cx = getConnection(); | public void testPreparedStatement0007() throws Exception { Connection cx = getConnection(); dropTable("#t0007"); Statement stmt = cx.createStatement(); stmt.executeUpdate("create table #t0007 " + " (i integer not null, " + " s char(10) not null) "); final int rowsToAdd = 20; int count = 0; for (int i = 1; i <= rowsToAdd; i++) { String sql = "insert into #t0007 values (" + i + ", 'row" + i + "')"; count += stmt.executeUpdate(sql); } assertTrue(count == rowsToAdd); PreparedStatement pStmt = cx.prepareStatement("select s from #t0007 where i = ?"); pStmt.setInt(1, 7); ResultSet rs = pStmt.executeQuery(); assertNotNull(rs); assertTrue("Expected a result set", rs.next()); assertEquals(rs.getString(1).trim(), "row7"); // assertTrue("Expected no result set", !rs.next()); pStmt.setInt(1, 8); rs = pStmt.executeQuery(); assertNotNull(rs); assertTrue("Expected a result set", rs.next()); assertEquals(rs.getString(1).trim(), "row8"); assertTrue("Expected no result set", !rs.next()); } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/d456535dc5bca0bbf54c0b9c6730e782aa275787/TimestampTest.java/clean/src.old/test/freetds/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
29325,
3784,
27,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
7285,
1388,
2932,
7,
88,
3784,
27,
8863,
202,
202,
3406,
3480,
273,
949... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29325,
3784,
27,
1435,
1216,
1185,
202,
95,
202,
202,
1952,
9494,
273,
6742,
5621,
202,
202,
7285,
1388,
2932,
7,
88,
3784,
27,
8863,
202,
202,
3406,
3480,
273,
949... |
+ " SUM(pass)" | + " SUM(subnet_access)" | protected JFreeChart doChart(Connection con) throws JRScriptletException, SQLException { //TimeSeries datasetA = new TimeSeries(seriesATitle, Minute.class); TimeSeries datasetB = new TimeSeries(seriesBTitle, Minute.class); TimeSeries datasetC = new TimeSeries(seriesCTitle, Minute.class); final int BUCKETS = 1440 / MINUTES_PER_BUCKET; // TRUNCATE TIME TO MINUTES, COMPUTE NUMBER OF QUERIES long startMinuteInMillis = (startDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long endMinuteInMillis = (endDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long periodMillis = endMinuteInMillis - startMinuteInMillis; int periodMinutes = (int)(periodMillis / MINUTE_INTERVAL); int queries = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); int periodBuckets = periodMinutes/(MINUTES_PER_BUCKET) + (periodMinutes%(MINUTES_PER_BUCKET)>0?1:0); System.out.println("====== START ======"); System.out.println("start: " + (new Timestamp(startMinuteInMillis)).toString() ); System.out.println("end: " + (new Timestamp(endMinuteInMillis)).toString() ); System.out.println("mins: " + periodMinutes); System.out.println("days: " + queries); System.out.println("==================="); // ALLOCATE COUNTS int size; if( periodMinutes >= BUCKETS*MINUTES_PER_BUCKET ) size = BUCKETS; else size = periodMinutes/(BUCKETS*MINUTES_PER_BUCKET) + (periodMinutes%(BUCKETS*MINUTES_PER_BUCKET)>0?1:0); //double countsA[] = new double[ size ]; double countsB[] = new double[ size ]; double countsC[] = new double[ size ]; // SETUP TIMESTAMPS Timestamp startTimestamp = new Timestamp(startMinuteInMillis); Timestamp endTimestamp = new Timestamp(endMinuteInMillis); totalQueryTime = System.currentTimeMillis(); String sql; int bindIdx; PreparedStatement stmt; ResultSet rs; sql = "SELECT date_trunc('minute', time_stamp)," + " SUM(cookie)," + " SUM(activeX)," + " SUM(url)," + " SUM(pass)" + " FROM tr_spyware_statistic_evt" + " WHERE time_stamp <= ? AND time_stamp > ?" + " GROUP BY time_stamp" + " ORDER BY time_stamp"; bindIdx = 1; stmt = con.prepareStatement(sql); stmt.setTimestamp(bindIdx++, endTimestamp); stmt.setTimestamp(bindIdx++, startTimestamp); rs = stmt.executeQuery(); totalQueryTime = System.currentTimeMillis() - totalQueryTime; totalProcessTime = System.currentTimeMillis(); // PROCESS EACH ROW while (rs.next()) { // GET RESULTS Timestamp eventDate = rs.getTimestamp(1); long countB = rs.getLong(2) + rs.getLong(3) + rs.getLong(4); long countC = rs.getLong(5); //long countA = countB + countC; // ALLOCATE COUNT TO EACH MINUTE WE WERE ALIVE EQUALLY long eventStart = (eventDate.getTime() / MINUTE_INTERVAL) * MINUTE_INTERVAL; long realStart = eventStart < startMinuteInMillis ? (long) 0 : eventStart - startMinuteInMillis; int startInterval = (int)(realStart / MINUTE_INTERVAL)/MINUTES_PER_BUCKET; // COMPUTE COUNTS IN INTERVALS //countsA[startInterval%BUCKETS] += countA; countsB[startInterval%BUCKETS] += countB; countsC[startInterval%BUCKETS] += countC; } try { stmt.close(); } catch (SQLException x) { } // POST PROCESS: PRODUCE UNITS OF email/min, AVERAGED PER DAY, FROM emails PER BUCKET //double averageACount; double averageBCount; double averageCCount; for(int i = 0; i < size; i++) { // MOVING AVERAGE //averageACount = 0; averageBCount = 0; averageCCount = 0; int newIndex = 0; int denom = 0; for(int j=0; j<MOVING_AVERAGE_MINUTES; j++){ newIndex = i-j; if( newIndex >= 0 ) denom++; else continue; //averageACount += countsA[newIndex] / (double)queries; averageBCount += countsB[newIndex] / (double)queries; averageCCount += countsC[newIndex] / (double)queries; } //averageACount /= denom; averageBCount /= denom; averageCCount /= denom; java.util.Date date = new java.util.Date(startMinuteInMillis + i * MINUTE_INTERVAL * MINUTES_PER_BUCKET); //datasetA.addOrUpdate(new Minute(date), averageACount); datasetB.addOrUpdate(new Minute(date), averageBCount); datasetC.addOrUpdate(new Minute(date), averageCCount); } totalProcessTime = System.currentTimeMillis() - totalProcessTime; System.out.println("====== RESULTS ======"); System.out.println("TOTAL query time: " + totalQueryTime/1000 + "s" + " (" + ((float)totalQueryTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("TOTAL process time: " + totalProcessTime/1000 + "s" + " (" + ((float)totalProcessTime/(float)(totalQueryTime+totalProcessTime)) + ")"); System.out.println("====================="); TimeSeriesCollection tsc = new TimeSeriesCollection(); //tsc.addSeries(datasetA); tsc.addSeries(datasetB); tsc.addSeries(datasetC); return ChartFactory.createTimeSeriesChart(chartTitle, timeAxisLabel, valueAxisLabel, tsc, true, true, false); } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/f866626688791236de2965e196be9d8fd067f158/SummaryGraph.java/buggy/tran/spyware/main/com/metavize/tran/spyware/reports/SummaryGraph.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
368,
28486,
3709,
37,
273,
394,
26084,
12,
10222,
789,
1280,
16,
20734,
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,
377,
4750,
804,
9194,
7984,
741,
7984,
12,
1952,
356,
13,
1216,
27974,
3651,
1810,
503,
16,
6483,
565,
288,
3639,
368,
28486,
3709,
37,
273,
394,
26084,
12,
10222,
789,
1280,
16,
20734,
18,
... |
} catch(IncorrectOperationException ignore){ | } catch(Throwable ignore){ | private static PsiBinaryExpression getSubexpression(PsiBinaryExpression expression){ final PsiBinaryExpression binaryExpression = (PsiBinaryExpression) expression.copy(); final PsiExpression rhs = binaryExpression.getROperand(); if(rhs == null){ return null; } final PsiExpression lhs = binaryExpression.getLOperand(); if(!(lhs instanceof PsiBinaryExpression)){ return expression; } final PsiBinaryExpression lhsBinaryExpression = (PsiBinaryExpression) lhs; final PsiExpression leftSide = lhsBinaryExpression.getROperand(); if(leftSide == null) { return null; } try{ lhs.replace(leftSide); } catch(IncorrectOperationException ignore){ return null; } return binaryExpression; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/b3ff83a4d03d01b2b0c2f93ed819e9bbfc681ad4/ConstantSubexpressionPredicate.java/buggy/plugins/IntentionPowerPak/src/com/siyeh/ipp/constant/ConstantSubexpressionPredicate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
453,
7722,
5905,
2300,
7040,
8692,
12,
52,
7722,
5905,
2300,
2652,
15329,
3639,
727,
453,
7722,
5905,
2300,
3112,
2300,
273,
261,
52,
7722,
5905,
2300,
13,
2652,
18,
3530,
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,
3238,
760,
453,
7722,
5905,
2300,
7040,
8692,
12,
52,
7722,
5905,
2300,
2652,
15329,
3639,
727,
453,
7722,
5905,
2300,
3112,
2300,
273,
261,
52,
7722,
5905,
2300,
13,
2652,
18,
3530,
5621... |
for (List result_row : result_set) | for (CategoryGroup cg: result_set) | public Set findCGCPaths(@NotNull @Validate(Long.class) Set imgIds, String algorithm, Map options) { if (imgIds.size()==0){ return new HashSet(); } if (! IPojos.ALGORITHMS.contains(algorithm)) { throw new IllegalArgumentException( "No such algorithm known:"+algorithm); } PojoOptions po = new PojoOptions(options); Query q = queryFactory.lookup( PojosCGCPathsQueryDefinition.class.getName(), PojosQP.ids(imgIds), PojosQP.String("algorithm",algorithm), PojosQP.options(po.map())); List<List> result_set = (List) iQuery.execute(q); Map<CategoryGroup,Set<Category>> map = new HashMap<CategoryGroup,Set<Category>>(); Set<CategoryGroup> returnValues = new HashSet<CategoryGroup>(); // Parse for (List result_row : result_set) { CategoryGroup cg = (CategoryGroup) result_row.get(0); Category c = (Category) result_row.get(1); if (!map.containsKey(cg)) map.put(cg,new HashSet<Category>()); map.get(cg).add(c); } // // Destructive changes below this point. // for (CategoryGroup cg : map.keySet()) { for (Category c : map.get(cg)) { iQuery.evict(cg); // FIXME does this suffice? cg.linkCategory(c); } returnValues.add(cg); } collectCounts(returnValues,po); return returnValues; } | 13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/149c7633fd9b60929f706ce4783c5e19a9f34bd2/PojosImpl.java/clean/components/server/src/ome/logic/PojosImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1000,
1104,
39,
15396,
4466,
26964,
5962,
632,
4270,
12,
3708,
18,
1106,
13,
1000,
3774,
2673,
16,
2398,
514,
4886,
16,
1635,
702,
13,
288,
202,
202,
430,
261,
6081,
2673,
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,
225,
202,
482,
1000,
1104,
39,
15396,
4466,
26964,
5962,
632,
4270,
12,
3708,
18,
1106,
13,
1000,
3774,
2673,
16,
2398,
514,
4886,
16,
1635,
702,
13,
288,
202,
202,
430,
261,
6081,
2673,
18,... |
System.out.println("stereo: " + bounds); | protected void updateStereotypeText() { // Can't do anything if we haven't got an owner to have a stereotype! MModelElement me = (MModelElement) getOwner(); if (me == null) { return; } // Record the old bounds and get the stereotype Rectangle bounds = getBounds(); MStereotype stereo = me.getStereotype(); // Where we now have no stereotype, mark as not displayed. Were we do // have a stereotype, set the text and mark as displayed. If we remove // or add/change a stereotype we adjust the vertical bounds // appropriately. Otherwise we need not work out the bounds here. That // will be done in setBounds(). if ((stereo == null) || (stereo.getName() == null) || (stereo.getName().length() == 0)) { if (_stereo.isDisplayed()) { bounds.height -= _stereo.getBounds().height; _stereo.setDisplayed(false); } } else { int oldHeight = _stereo.getBounds().height; // If we weren't currently displayed the effective height was // zero. Mark the stereotype as displayed if (!(_stereo.isDisplayed())) { oldHeight = 0; _stereo.setDisplayed(true); } // Set the text and recalculate its bounds _stereo.setText(Notation.generateStereotype(this, stereo)); _stereo.calcBounds(); bounds.height += _stereo.getBounds().height - oldHeight; } // Set the bounds to our old bounds (reduced if we have taken the // stereotype away). If the bounds aren't big enough when we've added a // stereotype, they'll get increased as needed. System.out.println("stereo: " + bounds); setBounds(bounds.x, bounds.y, bounds.width, bounds.height); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/df41f12781a2df4b68cdd6ecf9416d5aa7fbd9b5/FigClassifierRole.java/clean/src_new/org/argouml/uml/diagram/collaboration/ui/FigClassifierRole.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1089,
55,
387,
73,
10570,
1528,
1435,
288,
3639,
368,
4480,
1404,
741,
6967,
309,
732,
15032,
1404,
2363,
392,
3410,
358,
1240,
279,
22890,
10570,
5,
3639,
490,
1488,
1046,
179... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
55,
387,
73,
10570,
1528,
1435,
288,
3639,
368,
4480,
1404,
741,
6967,
309,
732,
15032,
1404,
2363,
392,
3410,
358,
1240,
279,
22890,
10570,
5,
3639,
490,
1488,
1046,
179... | |
VALUE rb_hash_aref(VALUE hash, VALUE key) {throw missing();} | RubyObject rb_hash_aref(VALUE hash, VALUE key) {throw missing();} | VALUE rb_hash_aref(VALUE hash, VALUE key) {throw missing();} | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/a2024bddc1b8e83f4e8075d2080935c221a833fe/parse.java/buggy/org/jruby/parser/parse.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5848,
7138,
67,
2816,
67,
834,
74,
12,
4051,
1651,
16,
5848,
498,
13,
288,
12849,
3315,
5621,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
5848,
7138,
67,
2816,
67,
834,
74,
12,
4051,
1651,
16,
5848,
498,
13,
288,
12849,
3315,
5621,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
control = new OvalComposite(parent, side.get()); | control = new Composite(parent, SWT.NONE); | public void createControl(Composite parent) { control = new OvalComposite(parent, side.get()); side.addChangeListener(new IChangeListener() { public void update(boolean changed) { if (changed) { disposeChildControls(); createChildControls(); } } }); control.addListener(SWT.MenuDetect, menuListener); PresentationUtil.addDragListener(control, dragListener); createChildControls(); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/0b87a853764ea2b0fc23898be8407b44149c988a/FastViewBar.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewBar.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
3639,
3325,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
3639,
4889,
18,
1289,
15744,
12,
2704,
467,
15744,
1435,
288,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
752,
3367,
12,
9400,
982,
13,
288,
3639,
3325,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
3639,
4889,
18,
1289,
15744,
12,
2704,
467,
15744,
1435,
288,
5411,
1... |
splitPane.setBorder(BorderFactory.createEmptyBorder()); splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); add(splitPane, BorderLayout.CENTER); | private void setupUI() { this.setLayout(new BorderLayout()); //splitpane for the selection and preview panel splitPane.setBorder(BorderFactory.createEmptyBorder()); splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); add(splitPane, BorderLayout.CENTER); CPanel selectionPanel = new CPanel(); CPanel previewPart = new CPanel(); splitPane.setTopComponent(selectionPanel); splitPane.setBottomComponent(previewPart); splitPane.setDividerLocation(0.50); splitPane.setDividerSize(0); //disable divider SplitPaneUI splitPaneUI = splitPane.getUI(); if (splitPaneUI instanceof BasicSplitPaneUI) { ((BasicSplitPaneUI)splitPaneUI).getDivider().setEnabled(false); } //setup look and theme selection component selectionPanel.setLayout(new GridBagLayout()); CLabel label = new CLabel(s_res.getString("LookAndFeel")); label.setForeground(AdempierePLAF.getPrimary1()); label.setFont(label.getFont().deriveFont(Font.BOLD)); selectionPanel.add(label, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); label = new CLabel(s_res.getString("Theme")); label.setForeground(AdempierePLAF.getPrimary1()); label.setFont(label.getFont().deriveFont(Font.BOLD)); selectionPanel.add(label, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 0, 0), 0, 0)); lookList.setVisibleRowCount(12); JScrollPane scrollPane = new JScrollPane(lookList); scrollPane.setBorder(BorderFactory.createLineBorder(AdempierePLAF.getSecondary1(), 1)); selectionPanel.add(scrollPane, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.VERTICAL, new Insets(0, 5, 2, 2), 100, 0)); themeList.setVisibleRowCount(12); scrollPane = new JScrollPane(themeList); scrollPane.setBorder(BorderFactory.createLineBorder(AdempierePLAF.getSecondary1(), 1)); selectionPanel.add(scrollPane, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 2, 2, 5), 0, 0)); previewPart.setBorder(BorderFactory.createEmptyBorder()); previewPart.setLayout(new GridBagLayout()); label = new CLabel(s_res.getString("Preview")); label.setForeground(AdempierePLAF.getPrimary1()); label.setFont(label.getFont().deriveFont(Font.BOLD)); previewPart.add(label, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 0), 0, 0)); previewPart.add(previewPanel, new GridBagConstraints(0, 1, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0)); lookList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { lookAndFeelSelectionChanged(e); } }); themeList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { themeSelectionChanged(e); } }); } | 25591 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25591/d5dc4908e6849ba42f6581187ca10b6f9ab3895b/PLAFEditorPanel.java/buggy/looks/src/org/adempiere/plaf/PLAFEditorPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3875,
5370,
1435,
288,
202,
202,
2211,
18,
542,
3744,
12,
2704,
30814,
10663,
9506,
202,
759,
4939,
29009,
364,
326,
4421,
471,
10143,
6594,
202,
202,
4939,
8485,
18,
542,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3875,
5370,
1435,
288,
202,
202,
2211,
18,
542,
3744,
12,
2704,
30814,
10663,
9506,
202,
759,
4939,
29009,
364,
326,
4421,
471,
10143,
6594,
202,
202,
4939,
8485,
18,
542,... | |
public void ruleAction(int ruleNumber) { switch (ruleNumber) { // // Rule 1: TypeName ::= TypeName . ErrorId // case 1: { //#line 6 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name TypeName = (Name) getRhsSym(1); //#line 8 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageName = (Name) getRhsSym(1); //#line 18 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 28 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 38 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 48 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 58 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 68 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(), Primary, "*")); break; } // // Rule 8: FieldAccess ::= super . ErrorId // case 8: { //#line 73 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 76 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 78 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodPrimaryPrefix = (Object) getRhsSym(1); //#line 82 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 84 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier MethodSuperPrefix = (polyglot.lex.Identifier) getRhsSym(1); //#line 89 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 91 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodClassNameSuperPrefix = (Object) getRhsSym(1); //#line 95 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 97 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 106 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 114 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(5); //#line 119 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken ident = (IToken) getRhsIToken(1); //#line 96 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 20: IntegralType ::= char // case 20: { //#line 126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 21: IntegralType ::= short // case 21: { //#line 131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 22: IntegralType ::= int // case 22: { //#line 136 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 23: IntegralType ::= long // case 23: { //#line 141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 24: FloatingPointType ::= float // case 24: { //#line 147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 25: FloatingPointType ::= double // case 25: { //#line 152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 28: TypeName ::= identifier // case 28: { //#line 175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 177 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(1); //#line 180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 182 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 196 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.array(Type, pos(), 1)); break; } // // Rule 32: PackageName ::= identifier // case 32: { //#line 241 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 243 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageName = (Name) getRhsSym(1); //#line 246 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 248 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 264 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 269 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 279 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 282 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 284 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 294 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 297 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 299 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 309 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 314 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" PackageNode PackageDeclarationopt = (PackageNode) getRhsSym(1); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarationsopt = (List) getRhsSym(2); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarationsopt = (List) getRhsSym(3); //#line 326 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(1); //#line 344 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarations = (List) getRhsSym(1); //#line 349 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(2); //#line 351 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(1); //#line 359 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarations = (List) getRhsSym(1); //#line 365 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(2); //#line 367 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(2); //#line 382 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(2); //#line 388 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(null); break; } // // Rule 56: ClassModifiers ::= ClassModifiers ClassModifier // case 56: { //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifiers = (Flags) getRhsSym(1); //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifier = (Flags) getRhsSym(2); //#line 416 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassModifiers.set(ClassModifier)); break; } // // Rule 57: ClassModifier ::= public // case 57: { //#line 424 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 58: ClassModifier ::= protected // case 58: { //#line 429 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 59: ClassModifier ::= private // case 59: { //#line 434 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 60: ClassModifier ::= abstract // case 60: { //#line 439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 61: ClassModifier ::= static // case 61: { //#line 444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 62: ClassModifier ::= final // case 62: { //#line 449 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 63: ClassModifier ::= strictfp // case 63: { //#line 454 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 64: Super ::= extends ClassType // case 64: { //#line 466 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ClassType = (TypeNode) getRhsSym(2); //#line 468 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassType); break; } // // Rule 65: Interfaces ::= implements InterfaceTypeList // case 65: { //#line 477 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(2); //#line 479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceTypeList); break; } // // Rule 66: InterfaceTypeList ::= InterfaceType // case 66: { //#line 483 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(1); //#line 485 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(1); //#line 490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 492 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceTypeList.add(InterfaceType); setResult(InterfaceTypeList); break; } // // Rule 68: ClassBody ::= { ClassBodyDeclarationsopt } // case 68: { //#line 502 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarationsopt = (List) getRhsSym(2); //#line 504 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarations = (List) getRhsSym(1); //#line 509 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclaration = (List) getRhsSym(2); //#line 511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassBodyDeclarations.addAll(ClassBodyDeclaration); // setResult(a); break; } // // Rule 72: ClassBodyDeclaration ::= InstanceInitializer // case 72: { //#line 517 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block InstanceInitializer = (Block) getRhsSym(1); //#line 519 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block StaticInitializer = (Block) getRhsSym(1); //#line 526 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ConstructorDecl ConstructorDeclaration = (ConstructorDecl) getRhsSym(1); //#line 533 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodDeclaration = (MethodDecl) getRhsSym(1); //#line 542 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 549 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 556 "C:/eclipse/ws6/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:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(1); //#line 573 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(1); //#line 578 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(3); //#line 580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclarators.add(VariableDeclarator); // setResult(VariableDeclarators); break; } // // Rule 83: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 83: { //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 588 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 596 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier())); break; } // // Rule 85: TraditionalVariableDeclaratorId ::= TraditionalVariableDeclaratorId [ ] // case 85: { //#line 599 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator TraditionalVariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 601 "C:/eclipse/ws6/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:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 608 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(3); //#line 610 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier(), IdentifierList)); break; } // // Rule 88: VariableDeclaratorId ::= [ IdentifierList ] // case 88: { //#line 613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(2); //#line 615 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), IdentifierList)); break; } // // Rule 92: FieldModifiers ::= FieldModifiers FieldModifier // case 92: { //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifiers = (Flags) getRhsSym(1); //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifier = (Flags) getRhsSym(2); //#line 625 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(FieldModifiers.set(FieldModifier)); break; } // // Rule 93: FieldModifier ::= public // case 93: { //#line 633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 94: FieldModifier ::= protected // case 94: { //#line 638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 95: FieldModifier ::= private // case 95: { //#line 643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 96: FieldModifier ::= static // case 96: { //#line 648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 97: FieldModifier ::= final // case 97: { //#line 653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 98: FieldModifier ::= transient // case 98: { //#line 658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.TRANSIENT); break; } // // Rule 99: MethodDeclaration ::= MethodHeader MethodBody // case 99: { //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodHeader = (MethodDecl) getRhsSym(1); //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block MethodBody = (Block) getRhsSym(2); //#line 669 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" JPGPosition old_pos = (JPGPosition) MethodHeader.position(); setResult(MethodHeader.body(MethodBody) .position(pos(old_pos.getLeftIToken().getTokenIndex(), getRightSpan()))); break; } // // Rule 101: ResultType ::= void // case 101: { //#line 680 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 102: FormalParameterList ::= LastFormalParameter // case 102: { //#line 700 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(1); //#line 702 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(LastFormalParameter); setResult(l); break; } // // Rule 103: FormalParameterList ::= FormalParameters , LastFormalParameter // case 103: { //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(3); //#line 709 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(LastFormalParameter); // setResult(FormalParameters); break; } // // Rule 104: FormalParameters ::= FormalParameter // case 104: { //#line 714 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(1); //#line 716 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(FormalParameter); setResult(l); break; } // // Rule 105: FormalParameters ::= FormalParameters , FormalParameter // case 105: { //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 723 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(FormalParameter); // setResult(FormalParameters); break; } // // Rule 106: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 106: { //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(3); //#line 730 "C:/eclipse/ws6/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 108: VariableModifiers ::= VariableModifiers VariableModifier // case 108: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiers = (Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifier = (Flags) getRhsSym(2); //#line 740 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(VariableModifiers.set(VariableModifier)); break; } // // Rule 109: VariableModifier ::= final // case 109: { //#line 746 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 110: LastFormalParameter ::= VariableModifiersopt Type ...opt$opt VariableDeclaratorId // case 110: { //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(4); //#line 754 "C:/eclipse/ws6/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 112: MethodModifiers ::= MethodModifiers MethodModifier // case 112: { //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifiers = (Flags) getRhsSym(1); //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifier = (Flags) getRhsSym(2); //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(MethodModifiers.set(MethodModifier)); break; } // // Rule 113: MethodModifier ::= public // case 113: { //#line 776 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 114: MethodModifier ::= protected // case 114: { //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 115: MethodModifier ::= private // case 115: { //#line 786 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 116: MethodModifier ::= abstract // case 116: { //#line 791 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 117: MethodModifier ::= static // case 117: { //#line 796 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 118: MethodModifier ::= final // case 118: { //#line 801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 119: MethodModifier ::= native // case 119: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NATIVE); break; } // // Rule 120: MethodModifier ::= strictfp // case 120: { //#line 816 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 121: Throws ::= throws ExceptionTypeList // case 121: { //#line 820 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(2); //#line 822 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExceptionTypeList); break; } // // Rule 122: ExceptionTypeList ::= ExceptionType // case 122: { //#line 826 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(1); //#line 828 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(ExceptionType); setResult(l); break; } // // Rule 123: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 123: { //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(1); //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(3); //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExceptionTypeList.add(ExceptionType); // setResult(ExceptionTypeList); break; } // // Rule 126: MethodBody ::= ; // case 126: setResult(null); break; // // Rule 128: StaticInitializer ::= static Block // case 128: { //#line 855 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 857 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 129: SimpleTypeName ::= identifier // case 129: { //#line 872 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 131: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 131: { //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifiers = (Flags) getRhsSym(1); //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifier = (Flags) getRhsSym(2); //#line 881 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstructorModifiers.set(ConstructorModifier)); break; } // // Rule 132: ConstructorModifier ::= public // case 132: { //#line 889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 133: ConstructorModifier ::= protected // case 133: { //#line 894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 134: ConstructorModifier ::= private // case 134: { //#line 899 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 135: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 135: { //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt ExplicitConstructorInvocationopt = (Stmt) getRhsSym(2); //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(3); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l; if (ExplicitConstructorInvocationopt == null) l = BlockStatementsopt; else { l = new TypedList(new LinkedList(), Stmt.class, false); l.add(ExplicitConstructorInvocationopt); l.addAll(BlockStatementsopt); } setResult(nf.Block(pos(), l)); break; } // // Rule 136: Arguments ::= ( ArgumentListopt ) // case 136: { //#line 936 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(2); //#line 938 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ArgumentListopt); break; } // // Rule 139: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 139: { //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifiers = (Flags) getRhsSym(1); //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifier = (Flags) getRhsSym(2); //#line 956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceModifiers.set(InterfaceModifier)); break; } // // Rule 140: InterfaceModifier ::= public // case 140: { //#line 964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 141: InterfaceModifier ::= protected // case 141: { //#line 969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 142: InterfaceModifier ::= private // case 142: { //#line 974 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 143: InterfaceModifier ::= abstract // case 143: { //#line 979 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 144: InterfaceModifier ::= static // case 144: { //#line 984 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 145: InterfaceModifier ::= strictfp // case 145: { //#line 989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 146: ExtendsInterfaces ::= extends InterfaceType // case 146: { //#line 993 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(2); //#line 995 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 147: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 147: { //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExtendsInterfaces = (List) getRhsSym(1); //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExtendsInterfaces.add(InterfaceType); // setResult(ExtendsInterfaces); break; } // // Rule 148: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 148: { //#line 1012 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarationsopt = (List) getRhsSym(2); //#line 1014 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(), InterfaceMemberDeclarationsopt)); break; } // // Rule 150: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 150: { //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarations = (List) getRhsSym(1); //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclaration = (List) getRhsSym(2); //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceMemberDeclarations.addAll(InterfaceMemberDeclaration); // setResult(l); break; } // // Rule 152: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 152: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl AbstractMethodDeclaration = (MethodDecl) getRhsSym(1); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(AbstractMethodDeclaration); setResult(l); break; } // // Rule 153: InterfaceMemberDeclaration ::= ClassDeclaration // case 153: { //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1036 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 154: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 154: { //#line 1041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 1043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 155: InterfaceMemberDeclaration ::= ; // case 155: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Collections.EMPTY_LIST); break; } // // Rule 156: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 156: { //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiersopt = (Flags) getRhsSym(1); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1056 "C:/eclipse/ws6/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 158: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 158: { //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiers = (Flags) getRhsSym(1); //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifier = (Flags) getRhsSym(2); //#line 1076 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstantModifiers.set(ConstantModifier)); break; } // // Rule 159: ConstantModifier ::= public // case 159: { //#line 1084 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 160: ConstantModifier ::= static // case 160: { //#line 1089 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 161: ConstantModifier ::= final // case 161: { //#line 1094 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 163: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 163: { //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifiers = (Flags) getRhsSym(1); //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifier = (Flags) getRhsSym(2); //#line 1103 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(AbstractMethodModifiers.set(AbstractMethodModifier)); break; } // // Rule 164: AbstractMethodModifier ::= public // case 164: { //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 165: AbstractMethodModifier ::= abstract // case 165: { //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 166: SimpleName ::= identifier // case 166: { //#line 1172 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 167: ArrayInitializer ::= { VariableInitializersopt ,opt$opt } // case 167: { //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializersopt = (List) getRhsSym(2); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 1203 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableInitializersopt == null) setResult(nf.ArrayInit(pos())); else setResult(nf.ArrayInit(pos(), VariableInitializersopt)); break; } // // Rule 168: VariableInitializers ::= VariableInitializer // case 168: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(1); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(VariableInitializer); setResult(l); break; } // // Rule 169: VariableInitializers ::= VariableInitializers , VariableInitializer // case 169: { //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializers = (List) getRhsSym(1); //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 1218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableInitializers.add(VariableInitializer); //setResult(VariableInitializers); break; } // // Rule 170: Block ::= { BlockStatementsopt } // case 170: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(2); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Block(pos(), BlockStatementsopt)); break; } // // Rule 171: BlockStatements ::= BlockStatement // case 171: { //#line 1243 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(1); //#line 1245 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.addAll(BlockStatement); setResult(l); break; } // // Rule 172: BlockStatements ::= BlockStatements BlockStatement // case 172: { //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(2); //#line 1252 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" BlockStatements.addAll(BlockStatement); //setResult(l); break; } // // Rule 174: BlockStatement ::= ClassDeclaration // case 174: { //#line 1258 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/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 175: BlockStatement ::= Statement // case 175: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(1); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(Statement); setResult(l); break; } // // Rule 177: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 177: { //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1277 "C:/eclipse/ws6/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 201: IfThenStatement ::= if ( Expression ) Statement // case 201: { //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, Statement)); break; } // // Rule 202: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 202: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(7); //#line 1346 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, StatementNoShortIf, Statement)); break; } // // Rule 203: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf$true_stmt else StatementNoShortIf$false_stmt // case 203: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt true_stmt = (Stmt) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt false_stmt = (Stmt) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, true_stmt, false_stmt)); break; } // // Rule 204: EmptyStatement ::= ; // case 204: { //#line 1358 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Empty(pos())); break; } // // Rule 205: LabeledStatement ::= identifier : Statement // case 205: { //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(3); //#line 1364 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), Statement)); break; } // // Rule 206: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 206: { //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(3); //#line 1370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), StatementNoShortIf)); break; } // // Rule 207: ExpressionStatement ::= StatementExpression ; // case 207: { //#line 1373 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1375 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Eval(pos(), StatementExpression)); break; } // // Rule 215: AssertStatement ::= assert Expression ; // case 215: { //#line 1396 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1398 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), Expression)); break; } // // Rule 216: AssertStatement ::= assert Expression$expr1 : Expression$expr2 ; // case 216: { //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr1 = (Expr) getRhsSym(2); //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr2 = (Expr) getRhsSym(4); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), expr1, expr2)); break; } // // Rule 217: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 217: { //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlock = (List) getRhsSym(5); //#line 1409 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Switch(pos(), Expression, SwitchBlock)); break; } // // Rule 218: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 218: { //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroupsopt = (List) getRhsSym(2); //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabelsopt = (List) getRhsSym(3); //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroupsopt.addAll(SwitchLabelsopt); setResult(SwitchBlockStatementGroupsopt); break; } // // Rule 220: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 220: { //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroups = (List) getRhsSym(1); //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroup = (List) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroups.addAll(SwitchBlockStatementGroup); // setResult(SwitchBlockStatementGroups); break; } // // Rule 221: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 221: { //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(2); //#line 1430 "C:/eclipse/ws6/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 222: SwitchLabels ::= SwitchLabel // case 222: { //#line 1437 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(1); //#line 1439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Case.class, false); l.add(SwitchLabel); setResult(l); break; } // // Rule 223: SwitchLabels ::= SwitchLabels SwitchLabel // case 223: { //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(2); //#line 1446 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchLabels.add(SwitchLabel); //setResult(SwitchLabels); break; } // // Rule 224: SwitchLabel ::= case ConstantExpression : // case 224: { //#line 1451 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConstantExpression = (Expr) getRhsSym(2); //#line 1453 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Case(pos(), ConstantExpression)); break; } // // Rule 225: SwitchLabel ::= default : // case 225: { //#line 1460 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Default(pos())); break; } // // Rule 226: WhileStatement ::= while ( Expression ) Statement // case 226: { //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1469 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, Statement)); break; } // // Rule 227: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 227: { //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1475 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, StatementNoShortIf)); break; } // // Rule 228: DoStatement ::= do Statement while ( Expression ) ; // case 228: { //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(2); //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(5); //#line 1481 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Do(pos(), Statement, Expression)); break; } // // Rule 231: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 231: { //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, Statement)); break; } // // Rule 232: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 232: { //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(9); //#line 1496 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, StatementNoShortIf)); break; } // // Rule 234: ForInit ::= LocalVariableDeclaration // case 234: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List LocalVariableDeclaration = (List) getRhsSym(1); //#line 1503 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ForInit.class, false); l.addAll(LocalVariableDeclaration); //setResult(l); break; } // // Rule 236: StatementExpressionList ::= StatementExpression // case 236: { //#line 1511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1513 "C:/eclipse/ws6/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 237: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 237: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List StatementExpressionList = (List) getRhsSym(1); //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(3); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" StatementExpressionList.add(nf.Eval(pos(), StatementExpression)); //setResult(StatementExpressionList); break; } // // Rule 238: BreakStatement ::= break identifieropt ; // case 238: { //#line 1528 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1530 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Break(pos())); else setResult(nf.Break(pos(), identifieropt.toString())); break; } // // Rule 239: ContinueStatement ::= continue identifieropt ; // case 239: { //#line 1536 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1538 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Continue(pos())); else setResult(nf.Continue(pos(), identifieropt.toString())); break; } // // Rule 240: ReturnStatement ::= return Expressionopt ; // case 240: { //#line 1544 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(2); //#line 1546 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Return(pos(), Expressionopt)); break; } // // Rule 241: ThrowStatement ::= throw Expression ; // case 241: { //#line 1550 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1552 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Throw(pos(), Expression)); break; } // // Rule 242: TryStatement ::= try Block Catches // case 242: { //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(3); //#line 1564 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catches)); break; } // // Rule 243: TryStatement ::= try Block Catchesopt Finally // case 243: { //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catchesopt = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Finally = (Block) getRhsSym(4); //#line 1569 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catchesopt, Finally)); break; } // // Rule 244: Catches ::= CatchClause // case 244: { //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(1); //#line 1575 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Catch.class, false); l.add(CatchClause); setResult(l); break; } // // Rule 245: Catches ::= Catches CatchClause // case 245: { //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(1); //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(2); //#line 1582 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catches.add(CatchClause); //setResult(Catches); break; } // // Rule 246: CatchClause ::= catch ( FormalParameter ) Block // case 246: { //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(5); //#line 1589 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Catch(pos(), FormalParameter, Block)); break; } // // Rule 247: Finally ::= finally Block // case 247: { //#line 1593 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 251: PrimaryNoNewArray ::= Type . class // case 251: { //#line 1613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1615 "C:/eclipse/ws6/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 252: PrimaryNoNewArray ::= void . class // case 252: { //#line 1634 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 253: PrimaryNoNewArray ::= this // case 253: { //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos())); break; } // // Rule 254: PrimaryNoNewArray ::= ClassName . this // case 254: { //#line 1643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1645 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 255: PrimaryNoNewArray ::= ( Expression ) // case 255: { //#line 1648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1650 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ParExpr(pos(), Expression)); break; } // // Rule 260: Literal ::= IntegerLiteral$IntegerLiteral // case 260: { //#line 1658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken IntegerLiteral = (IToken) getRhsIToken(1); //#line 1660 "C:/eclipse/ws6/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 261: Literal ::= LongLiteral$LongLiteral // case 261: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken LongLiteral = (IToken) getRhsIToken(1); //#line 1666 "C:/eclipse/ws6/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 262: Literal ::= FloatingPointLiteral$FloatLiteral // case 262: { //#line 1670 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken FloatLiteral = (IToken) getRhsIToken(1); //#line 1672 "C:/eclipse/ws6/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 263: Literal ::= DoubleLiteral$DoubleLiteral // case 263: { //#line 1676 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken DoubleLiteral = (IToken) getRhsIToken(1); //#line 1678 "C:/eclipse/ws6/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 264: Literal ::= BooleanLiteral // case 264: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.BooleanLiteral BooleanLiteral = (polyglot.lex.BooleanLiteral) getRhsSym(1); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.BooleanLit(pos(), BooleanLiteral.getValue().booleanValue())); break; } // // Rule 265: Literal ::= CharacterLiteral$CharacterLiteral // case 265: { //#line 1687 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken CharacterLiteral = (IToken) getRhsIToken(1); //#line 1689 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.CharacterLiteral a = char_lit(getRhsFirstTokenIndex(1)); setResult(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 266: Literal ::= StringLiteral$str // case 266: { //#line 1693 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken str = (IToken) getRhsIToken(1); //#line 1695 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.StringLiteral a = string_lit(getRhsFirstTokenIndex(1)); setResult(nf.StringLit(pos(), a.getValue())); break; } // // Rule 267: Literal ::= null // case 267: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.NullLit(pos())); break; } // // Rule 268: BooleanLiteral ::= true$trueLiteral // case 268: { //#line 1705 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken trueLiteral = (IToken) getRhsIToken(1); //#line 1707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 269: BooleanLiteral ::= false$falseLiteral // case 269: { //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken falseLiteral = (IToken) getRhsIToken(1); //#line 1712 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 270: ArgumentList ::= Expression // case 270: { //#line 1725 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(1); //#line 1727 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Expression); setResult(l); break; } // // Rule 271: ArgumentList ::= ArgumentList , Expression // case 271: { //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentList = (List) getRhsSym(1); //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ArgumentList.add(Expression); //setResult(ArgumentList); break; } // // Rule 272: DimExprs ::= DimExpr // case 272: { //#line 1768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(1); //#line 1770 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); setResult(l); break; } // // Rule 273: DimExprs ::= DimExprs DimExpr // case 273: { //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List DimExprs = (List) getRhsSym(1); //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(2); //#line 1777 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" DimExprs.add(DimExpr); //setResult(DimExprs); break; } // // Rule 274: DimExpr ::= [ Expression ] // case 274: { //#line 1782 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1784 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Expression.position(pos())); break; } // // Rule 275: Dims ::= [ ] // case 275: { //#line 1790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(1)); break; } // // Rule 276: Dims ::= Dims [ ] // case 276: { //#line 1793 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Integer Dims = (Integer) getRhsSym(1); //#line 1795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(Dims.intValue() + 1)); break; } // // Rule 277: FieldAccess ::= Primary . identifier // case 277: { //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Primary = (Expr) getRhsSym(1); //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(), Primary, identifier.getIdentifier())); break; } // // Rule 278: FieldAccess ::= super . identifier // case 278: { //#line 1804 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1806 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 279: FieldAccess ::= ClassName . super$sup . identifier // case 279: { //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken sup = (IToken) getRhsIToken(3); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 280: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 280: { //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name MethodName = (Name) getRhsSym(1); //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 1817 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Call(pos(), MethodName.prefix == null ? null : MethodName.prefix.toReceiver(), MethodName.name, ArgumentListopt)); break; } // // Rule 282: PostfixExpression ::= ExpressionName // case 282: { //#line 1840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 1842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 285: PostIncrementExpression ::= PostfixExpression ++ // case 285: { //#line 1848 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_INC)); break; } // // Rule 286: PostDecrementExpression ::= PostfixExpression -- // case 286: { //#line 1854 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_DEC)); break; } // // Rule 289: UnaryExpression ::= + UnaryExpression // case 289: { //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1864 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.POS, UnaryExpression)); break; } // // Rule 290: UnaryExpression ::= - UnaryExpression // case 290: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NEG, UnaryExpression)); break; } // // Rule 292: PreIncrementExpression ::= ++ UnaryExpression // case 292: { //#line 1874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1876 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_INC, UnaryExpression)); break; } // // Rule 293: PreDecrementExpression ::= -- UnaryExpression // case 293: { //#line 1880 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_DEC, UnaryExpression)); break; } // // Rule 295: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 295: { //#line 1887 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.BIT_NOT, UnaryExpression)); break; } // // Rule 296: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 296: { //#line 1892 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NOT, UnaryExpression)); break; } // // Rule 299: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 299: { //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1908 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MUL, UnaryExpression)); break; } // // Rule 300: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 300: { //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.DIV, UnaryExpression)); break; } // // Rule 301: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 301: { //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1918 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MOD, UnaryExpression)); break; } // // Rule 303: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 303: { //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1925 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.ADD, MultiplicativeExpression)); break; } // // Rule 304: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 304: { //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1930 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.SUB, MultiplicativeExpression)); break; } // // Rule 306: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 306: { //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(3); //#line 1937 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ShiftExpression, Binary.SHL, AdditiveExpression)); break; } // // Rule 307: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 307: { //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(4); //#line 1942 "C:/eclipse/ws6/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 308: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 308: { //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(5); //#line 1948 "C:/eclipse/ws6/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 310: RelationalExpression ::= RelationalExpression < ShiftExpression // case 310: { //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LT, ShiftExpression)); break; } // // Rule 311: RelationalExpression ::= RelationalExpression > ShiftExpression // case 311: { //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1961 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.GT, ShiftExpression)); break; } // // Rule 312: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 312: { //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1966 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LE, ShiftExpression)); break; } // // Rule 313: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 313: { //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(4); //#line 1971 "C:/eclipse/ws6/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 315: EqualityExpression ::= EqualityExpression == RelationalExpression // case 315: { //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1987 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.EQ, RelationalExpression)); break; } // // Rule 316: EqualityExpression ::= EqualityExpression != RelationalExpression // case 316: { //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1992 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.NE, RelationalExpression)); break; } // // Rule 318: AndExpression ::= AndExpression & EqualityExpression // case 318: { //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(1); //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(3); //#line 1999 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AndExpression, Binary.BIT_AND, EqualityExpression)); break; } // // Rule 320: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 320: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(1); //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(3); //#line 2006 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ExclusiveOrExpression, Binary.BIT_XOR, AndExpression)); break; } // // Rule 322: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 322: { //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(1); //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(3); //#line 2013 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), InclusiveOrExpression, Binary.BIT_OR, ExclusiveOrExpression)); break; } // // Rule 324: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 324: { //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(1); //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(3); //#line 2020 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalAndExpression, Binary.COND_AND, InclusiveOrExpression)); break; } // // Rule 326: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 326: { //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(3); //#line 2027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalOrExpression, Binary.COND_OR, ConditionalAndExpression)); break; } // // Rule 328: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 328: { //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalExpression = (Expr) getRhsSym(5); //#line 2034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Conditional(pos(), ConditionalOrExpression, Expression, ConditionalExpression)); break; } // // Rule 331: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 331: { //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr LeftHandSide = (Expr) getRhsSym(1); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Assign.Operator AssignmentOperator = (Assign.Operator) getRhsSym(2); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AssignmentExpression = (Expr) getRhsSym(3); //#line 2043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assign(pos(), LeftHandSide, AssignmentOperator, AssignmentExpression)); break; } // // Rule 332: LeftHandSide ::= ExpressionName // case 332: { //#line 2047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 2049 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 335: AssignmentOperator ::= = // case 335: { //#line 2057 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ASSIGN); break; } // // Rule 336: AssignmentOperator ::= *= // case 336: { //#line 2062 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MUL_ASSIGN); break; } // // Rule 337: AssignmentOperator ::= /= // case 337: { //#line 2067 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.DIV_ASSIGN); break; } // // Rule 338: AssignmentOperator ::= %= // case 338: { //#line 2072 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MOD_ASSIGN); break; } // // Rule 339: AssignmentOperator ::= += // case 339: { //#line 2077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ADD_ASSIGN); break; } // // Rule 340: AssignmentOperator ::= -= // case 340: { //#line 2082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SUB_ASSIGN); break; } // // Rule 341: AssignmentOperator ::= <<= // case 341: { //#line 2087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SHL_ASSIGN); break; } // // Rule 342: AssignmentOperator ::= > > = // case 342: { //#line 2092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.SHR_ASSIGN); break; } // // Rule 343: AssignmentOperator ::= > > > = // case 343: { //#line 2098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.USHR_ASSIGN); break; } // // Rule 344: AssignmentOperator ::= &= // case 344: { //#line 2104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_AND_ASSIGN); break; } // // Rule 345: AssignmentOperator ::= ^= // case 345: { //#line 2109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_XOR_ASSIGN); break; } // // Rule 346: AssignmentOperator ::= |= // case 346: { //#line 2114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_OR_ASSIGN); break; } // // Rule 349: Dimsopt ::= $Empty // case 349: { //#line 2127 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(0)); break; } // // Rule 351: Catchesopt ::= $Empty // case 351: { //#line 2134 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 353: identifieropt ::= $Empty // case 353: setResult(null); break; // // Rule 354: identifieropt ::= identifier // case 354: { //#line 2141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2143 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 355: ForUpdateopt ::= $Empty // case 355: { //#line 2149 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 357: Expressionopt ::= $Empty // case 357: setResult(null); break; // // Rule 359: ForInitopt ::= $Empty // case 359: { //#line 2160 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 361: SwitchLabelsopt ::= $Empty // case 361: { //#line 2167 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 363: SwitchBlockStatementGroupsopt ::= $Empty // case 363: { //#line 2174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 365: VariableModifiersopt ::= $Empty // case 365: { //#line 2181 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 367: VariableInitializersopt ::= $Empty // case 367: setResult(null); break; // // Rule 369: AbstractMethodModifiersopt ::= $Empty // case 369: { //#line 2211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 371: ConstantModifiersopt ::= $Empty // case 371: { //#line 2218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 373: InterfaceMemberDeclarationsopt ::= $Empty // case 373: { //#line 2225 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 375: ExtendsInterfacesopt ::= $Empty // case 375: { //#line 2232 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 377: InterfaceModifiersopt ::= $Empty // case 377: { //#line 2239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 379: ClassBodyopt ::= $Empty // case 379: setResult(null); break; // // Rule 381: Argumentsopt ::= $Empty // case 381: setResult(null); break; // // Rule 382: Argumentsopt ::= Arguments // case 382: throw new Error("No action specified for rule " + 382); // // Rule 383: ,opt ::= $Empty // case 383: setResult(null); break; // // Rule 385: ArgumentListopt ::= $Empty // case 385: { //#line 2269 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 387: BlockStatementsopt ::= $Empty // case 387: { //#line 2276 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 389: ExplicitConstructorInvocationopt ::= $Empty // case 389: setResult(null); break; // // Rule 391: ConstructorModifiersopt ::= $Empty // case 391: { //#line 2287 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 393: ...opt ::= $Empty // case 393: setResult(null); break; // // Rule 395: FormalParameterListopt ::= $Empty // case 395: { //#line 2298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 397: Throwsopt ::= $Empty // case 397: { //#line 2305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 399: MethodModifiersopt ::= $Empty // case 399: { //#line 2312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 401: FieldModifiersopt ::= $Empty // case 401: { //#line 2319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 403: ClassBodyDeclarationsopt ::= $Empty // case 403: { //#line 2326 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 405: Interfacesopt ::= $Empty // case 405: { //#line 2333 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 407: Superopt ::= $Empty // case 407: { //#line 2340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), "x10.lang.Object").toType()); break; } // // Rule 409: ClassModifiersopt ::= $Empty // case 409: { //#line 2351 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 411: TypeDeclarationsopt ::= $Empty // case 411: { //#line 2363 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 413: ImportDeclarationsopt ::= $Empty // case 413: { //#line 2370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 415: PackageDeclarationopt ::= $Empty // case 415: setResult(null); break; // // Rule 417: ClassType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 417: { //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 717 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 418: InterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 418: { //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 726 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 419: PackageDeclaration ::= package PackageName ; // case 419: { //#line 732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name PackageName = (Name) getRhsSym(2); //#line 734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PackageName.toPackage()); break; } // // Rule 420: NormalClassDeclaration ::= X10ClassModifiersopt class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 420: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 740 "C:/eclipse/ws6/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 422: X10ClassModifiers ::= X10ClassModifiers X10ClassModifier // case 422: { //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiers = (X10Flags) getRhsSym(1); //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifier = (X10Flags) getRhsSym(2); //#line 755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags result = X10ClassModifiers.setX(X10ClassModifier); setResult(result); break; } // // Rule 423: X10ClassModifier ::= ClassModifier // case 423: { //#line 761 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ClassModifier = (Flags) getRhsSym(1); //#line 763 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(ClassModifier)); break; } // // Rule 424: X10ClassModifier ::= safe // case 424: { //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 425: PropertyList ::= ( Properties WhereClauseopt ) // case 425: { //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(2); //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(3); //#line 774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = Properties; result[1] = WhereClauseopt; setResult(result); break; } // // Rule 426: PropertyList ::= ( WhereClause ) // case 426: { //#line 779 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(2); //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = null; result[1] = WhereClause; setResult(result); break; } // // Rule 427: Properties ::= Property // case 427: { //#line 788 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(1); //#line 790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), PropertyDecl.class, false); l.add(Property); setResult(l); break; } // // Rule 428: Properties ::= Properties , Property // case 428: { //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(1); //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(3); //#line 797 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Properties.add(Property); // setResult(FormalParameters); break; } // // Rule 429: Property ::= Type identifier // case 429: { //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(2); //#line 805 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PropertyDecl(pos(), Flags.PUBLIC.Final(), Type, identifier.getIdentifier())); break; } // // Rule 430: MethodHeader ::= ThisClauseopt MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 430: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags MethodModifiersopt = (Flags) getRhsSym(2); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 813 "C:/eclipse/ws6/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, null)); break; } // // Rule 431: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 431: { //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), ArgumentListopt)); break; } // // Rule 432: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 432: { //#line 840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), ArgumentListopt)); break; } // // Rule 433: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 433: { //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 847 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 434: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 434: { //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 852 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 435: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier PropertyListopt ExtendsInterfacesopt InterfaceBody // case 435: { //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags InterfaceModifiersopt = (Flags) getRhsSym(1); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ExtendsInterfacesopt = (List) getRhsSym(5); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody InterfaceBody = (ClassBody) getRhsSym(6); //#line 858 "C:/eclipse/ws6/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 436: AbstractMethodDeclaration ::= ThisClauseopt AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 436: { //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags AbstractMethodModifiersopt = (Flags) getRhsSym(2); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 875 "C:/eclipse/ws6/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 437: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 437: { //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ClassOrInterfaceType = (TypeNode) getRhsSym(2); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(4); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(6); //#line 900 "C:/eclipse/ws6/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 438: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 438: { //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 907 "C:/eclipse/ws6/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 439: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 439: { //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name AmbiguousName = (Name) getRhsSym(1); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 915 "C:/eclipse/ws6/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 440: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 440: { //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 924 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 441: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 441: { //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 442: MethodInvocation ::= ClassName . super$sup . identifier ( ArgumentListopt ) // case 442: { //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(7); //#line 934 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 444: AssignPropertyCall ::= property ( ArgumentList ) // case 444: { //#line 939 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 941 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AssignPropertyCall(pos(), ArgumentList)); break; } // // Rule 445: Type ::= DataType // case 445: { //#line 950 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(1); //#line 952 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 446: Type ::= nullable < Type > DepParametersopt // case 446: { //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(5); //#line 957 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode t = nf.Nullable(pos(), Type); setResult(DepParametersopt == null ? t : t.dep(null, DepParametersopt)); break; } // // Rule 447: Type ::= future < Type > // case 447: { //#line 963 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 965 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 451: PrimitiveType ::= NumericType DepParametersopt // case 451: { //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode NumericType = (TypeNode) getRhsSym(1); //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 982 "C:/eclipse/ws6/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 452: PrimitiveType ::= boolean DepParametersopt // case 452: { //#line 988 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 990 "C:/eclipse/ws6/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 457: ClassOrInterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 457: { //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 1004 "C:/eclipse/ws6/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 458: DepParameters ::= ( DepParameterExpr ) // case 458: { //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(2); //#line 1023 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameterExpr); break; } // // Rule 459: DepParameterExpr ::= ArgumentList WhereClauseopt // case 459: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(1); //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(2); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), ArgumentList, WhereClauseopt)); break; } // // Rule 460: DepParameterExpr ::= WhereClause // case 460: { //#line 1032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(1); //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), Collections.EMPTY_LIST, WhereClause)); break; } // // Rule 461: WhereClause ::= : ConstExpression // case 461: { //#line 1038 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1040 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 462: ConstPrimary ::= Literal // case 462: { //#line 1045 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.ast.Lit Literal = (polyglot.ast.Lit) getRhsSym(1); //#line 1047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Literal); break; } // // Rule 463: ConstPrimary ::= Type . class // case 463: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1052 "C:/eclipse/ws6/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 464: ConstPrimary ::= void . class // case 464: { //#line 1071 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 465: ConstPrimary ::= this // case 465: { //#line 1077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos())); break; } // // Rule 466: ConstPrimary ::= here // case 466: { //#line 1082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Here(pos())); break; } // // Rule 467: ConstPrimary ::= ClassName . this // case 467: { //#line 1085 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 468: ConstPrimary ::= ( ConstExpression ) // case 468: { //#line 1090 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 470: ConstPrimary ::= self // case 470: { //#line 1098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Self(pos())); break; } // // Rule 471: ConstPostfixExpression ::= ConstPrimary // case 471: { //#line 1104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1106 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPrimary); break; } // // Rule 472: ConstPostfixExpression ::= ExpressionName // case 472: { //#line 1109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ExpressionName.toExpr()); break; } // // Rule 473: ConstUnaryExpression ::= ConstPostfixExpression // case 473: { //#line 1114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPostfixExpression = (Expr) getRhsSym(1); //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPostfixExpression); break; } // // Rule 474: ConstUnaryExpression ::= + ConstUnaryExpression // case 474: { //#line 1119 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1121 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.POS, ConstUnaryExpression)); break; } // // Rule 475: ConstUnaryExpression ::= - ConstUnaryExpression // case 475: { //#line 1124 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NEG, ConstUnaryExpression)); break; } // // Rule 476: ConstUnaryExpression ::= ! ConstUnaryExpression // case 476: { //#line 1129 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NOT, ConstUnaryExpression)); break; } // // Rule 477: ConstMultiplicativeExpression ::= ConstUnaryExpression // case 477: { //#line 1135 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(1); //#line 1137 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstUnaryExpression); break; } // // Rule 478: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression * ConstUnaryExpression // case 478: { //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1142 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MUL, ConstUnaryExpression)); break; } // // Rule 479: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression / ConstUnaryExpression // case 479: { //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.DIV, ConstUnaryExpression)); break; } // // Rule 480: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression % ConstUnaryExpression // case 480: { //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MOD, ConstUnaryExpression)); break; } // // Rule 481: ConstAdditiveExpression ::= ConstMultiplicativeExpression // case 481: { //#line 1156 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1158 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstMultiplicativeExpression); break; } // // Rule 482: ConstAdditiveExpression ::= ConstAdditiveExpression + ConstMultiplicativeExpression // case 482: { //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1163 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.ADD, ConstMultiplicativeExpression)); break; } // // Rule 483: ConstAdditiveExpression ::= ConstAdditiveExpression - ConstMultiplicativeExpression // case 483: { //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1168 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.SUB, ConstMultiplicativeExpression)); break; } // // Rule 484: ConstRelationalExpression ::= ConstAdditiveExpression // case 484: { //#line 1173 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAdditiveExpression); break; } // // Rule 485: ConstRelationalExpression ::= ConstRelationalExpression < ConstAdditiveExpression // case 485: { //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LT, ConstAdditiveExpression)); break; } // // Rule 486: ConstRelationalExpression ::= ConstRelationalExpression > ConstAdditiveExpression // case 486: { //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1185 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GT, ConstAdditiveExpression)); break; } // // Rule 487: ConstRelationalExpression ::= ConstRelationalExpression <= ConstAdditiveExpression // case 487: { //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1190 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LE, ConstAdditiveExpression)); break; } // // Rule 488: ConstRelationalExpression ::= ConstRelationalExpression > = ConstAdditiveExpression // case 488: { //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(4); //#line 1195 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GE, ConstAdditiveExpression)); break; } // // Rule 489: ConstEqualityExpression ::= ConstRelationalExpression // case 489: { //#line 1199 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstRelationalExpression); break; } // // Rule 490: ConstEqualityExpression ::= ConstEqualityExpression == ConstRelationalExpression // case 490: { //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1206 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.EQ, ConstRelationalExpression)); break; } // // Rule 491: ConstEqualityExpression ::= ConstEqualityExpression != ConstRelationalExpression // case 491: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.NE, ConstRelationalExpression)); break; } // // Rule 492: ConstAndExpression ::= ConstEqualityExpression // case 492: { //#line 1215 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1217 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstEqualityExpression); break; } // // Rule 493: ConstAndExpression ::= ConstAndExpression && ConstEqualityExpression // case 493: { //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(3); //#line 1222 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAndExpression, Binary.COND_AND, ConstEqualityExpression)); break; } // // Rule 494: ConstExclusiveOrExpression ::= ConstAndExpression // case 494: { //#line 1226 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1228 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAndExpression); break; } // // Rule 495: ConstExclusiveOrExpression ::= ConstExclusiveOrExpression ^ ConstAndExpression // case 495: { //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(3); //#line 1233 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstExclusiveOrExpression, Binary.BIT_XOR, ConstAndExpression)); break; } // // Rule 496: ConstInclusiveOrExpression ::= ConstExclusiveOrExpression // case 496: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExclusiveOrExpression); break; } // // Rule 497: ConstInclusiveOrExpression ::= ConstInclusiveOrExpression || ConstExclusiveOrExpression // case 497: { //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(3); //#line 1244 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstInclusiveOrExpression, Binary.COND_OR, ConstExclusiveOrExpression)); break; } // // Rule 498: ConstExpression ::= ConstInclusiveOrExpression // case 498: { //#line 1248 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstInclusiveOrExpression); break; } // // Rule 499: ConstExpression ::= ConstInclusiveOrExpression ? ConstExpression$first : ConstExpression // case 499: { //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr first = (Expr) getRhsSym(3); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(5); //#line 1255 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Conditional(pos(), ConstInclusiveOrExpression, first, ConstExpression)); break; } // // Rule 500: ConstFieldAccess ::= ConstPrimary . identifier // case 500: { //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1262 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(), ConstPrimary, identifier.getIdentifier())); break; } // // Rule 501: ConstFieldAccess ::= super . identifier // case 501: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 502: ConstFieldAccess ::= ClassName . super$sup . identifier // case 502: { //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1272 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 504: X10ArrayType ::= Type [ . ] // case 504: { //#line 1288 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1290 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, null)); break; } // // Rule 505: X10ArrayType ::= Type value [ . ] // case 505: { //#line 1293 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1295 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, null)); break; } // // Rule 506: X10ArrayType ::= Type [ DepParameterExpr ] // case 506: { //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(3); //#line 1300 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, DepParameterExpr)); break; } // // Rule 507: X10ArrayType ::= Type value [ DepParameterExpr ] // case 507: { //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(4); //#line 1305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, DepParameterExpr)); break; } // // Rule 508: ObjectKind ::= value // case 508: throw new Error("No action specified for rule " + 508); // // Rule 509: ObjectKind ::= reference // case 509: throw new Error("No action specified for rule " + 509); // // Rule 510: MethodModifier ::= atomic // case 510: { //#line 1319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.ATOMIC); break; } // // Rule 511: MethodModifier ::= extern // case 511: { //#line 1324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.NATIVE); break; } // // Rule 512: MethodModifier ::= safe // case 512: { //#line 1329 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 513: MethodModifier ::= sequential // case 513: { //#line 1334 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SEQUENTIAL); break; } // // Rule 514: MethodModifier ::= local // case 514: { //#line 1339 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.LOCAL); break; } // // Rule 515: MethodModifier ::= nonblocking // case 515: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.NON_BLOCKING); break; } // // Rule 517: ValueClassDeclaration ::= X10ClassModifiersopt value identifier PropertyListopt Superopt Interfacesopt ClassBody // case 517: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/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: ValueClassDeclaration ::= X10ClassModifiersopt value class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 518: { //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(5); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(6); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(7); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(8); //#line 1362 "C:/eclipse/ws6/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 519: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 519: { //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ConstructorModifiersopt = (Flags) getRhsSym(1); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] ConstructorDeclarator = (Object[]) getRhsSym(2); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(3); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block ConstructorBody = (Block) getRhsSym(4); //#line 1373 "C:/eclipse/ws6/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 520: ConstructorDeclarator ::= SimpleTypeName DepParametersopt ( FormalParameterListopt WhereClauseopt ) // case 520: { //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name SimpleTypeName = (Name) getRhsSym(1); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(4); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(5); //#line 1383 "C:/eclipse/ws6/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 521: ThisClause ::= this DepParameters // case 521: { //#line 1391 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameters = (DepParameterExpr) getRhsSym(2); //#line 1393 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameters); break; } // // Rule 522: Super ::= extends DataType // case 522: { //#line 1397 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(2); //#line 1399 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 523: MethodDeclarator ::= identifier ( FormalParameterListopt WhereClauseopt ) // case 523: { //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(3); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(4); //#line 1405 "C:/eclipse/ws6/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 524: MethodDeclarator ::= MethodDeclarator [ ] // case 524: { //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(1); //#line 1417 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" MethodDeclarator[2] = new Integer(((Integer) MethodDeclarator[2]).intValue() + 1); // setResult(MethodDeclarator); break; } // // Rule 525: FieldDeclaration ::= ThisClauseopt FieldModifiersopt Type VariableDeclarators ; // case 525: { //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags FieldModifiersopt = (Flags) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List VariableDeclarators = (List) getRhsSym(4); //#line 1425 "C:/eclipse/ws6/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 526: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt Dims ArrayInitializer // case 526: { //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(4); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ArrayInit ArrayInitializer = (ArrayInit) getRhsSym(5); //#line 1461 "C:/eclipse/ws6/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 527: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr Dims // case 527: { //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(5); //#line 1467 "C:/eclipse/ws6/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 528: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr DimExprs Dimsopt // case 528: { //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List DimExprs = (List) getRhsSym(5); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dimsopt = (Integer) getRhsSym(6); //#line 1473 "C:/eclipse/ws6/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 529: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] // case 529: { //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1482 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, null)); break; } // // Rule 530: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression$distr ] Expression$initializer // case 530: { //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr distr = (Expr) getRhsSym(6); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr initializer = (Expr) getRhsSym(8); //#line 1487 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, distr, initializer)); break; } // // Rule 531: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] ($lparen FormalParameter ) MethodBody // case 531: { //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken lparen = (IToken) getRhsIToken(8); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(11); //#line 1492 "C:/eclipse/ws6/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 532: Valueopt ::= $Empty // case 532: setResult(null); break; // // Rule 533: Valueopt ::= value // case 533: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 536: ArrayBaseType ::= nullable < Type > // case 536: { //#line 1508 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1510 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Nullable(pos(), Type)); break; } // // Rule 537: ArrayBaseType ::= future < Type > // case 537: { //#line 1513 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1515 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 538: ArrayBaseType ::= ( Type ) // case 538: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Type); break; } // // Rule 539: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 539: { //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1526 "C:/eclipse/ws6/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 540: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 540: { //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PrimaryNoNewArray = (Expr) getRhsSym(1); //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1533 "C:/eclipse/ws6/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 557: NowStatement ::= now ( Clock ) Statement // case 557: { //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1561 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, Statement)); break; } // // Rule 558: ClockedClause ::= clocked ( ClockList ) // case 558: { //#line 1565 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ClockList); break; } // // Rule 559: AsyncStatement ::= async PlaceExpressionSingleListopt ClockedClauseopt Statement // case 559: { //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(4); //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, Statement)); break; } // // Rule 560: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 560: { //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(3); //#line 1583 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Statement)); break; } // // Rule 561: WhenStatement ::= when ( Expression ) Statement // case 561: { //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1592 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, Statement)); break; } // // Rule 562: WhenStatement ::= WhenStatement or$or ( Expression ) Statement // case 562: { //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(6); //#line 1597 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, Statement); setResult(WhenStatement); break; } // // Rule 563: ForEachStatement ::= foreach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 563: { //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1604 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 564: AtEachStatement ::= ateach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 564: { //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1614 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 565: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 565: { //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(7); //#line 1624 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, Statement)); break; } // // Rule 566: FinishStatement ::= finish Statement // case 566: { //#line 1631 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(2); //#line 1633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), Statement)); break; } // // Rule 567: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 567: { //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, StatementNoShortIf)); break; } // // Rule 568: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt ClockedClauseopt StatementNoShortIf // case 568: { //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(4); //#line 1646 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 569: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 569: { //#line 1653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1655 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), nf.Here(pos(getLeftSpan())), StatementNoShortIf)); break; } // // Rule 570: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 570: { //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1661 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, StatementNoShortIf)); break; } // // Rule 571: WhenStatementNoShortIf ::= WhenStatement or$or ( Expression ) StatementNoShortIf // case 571: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(6); //#line 1666 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, StatementNoShortIf); setResult(WhenStatement); break; } // // Rule 572: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 572: { //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1673 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 573: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 573: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 574: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 574: { //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(7); //#line 1694 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, StatementNoShortIf)); break; } // // Rule 575: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 575: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1703 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), StatementNoShortIf)); break; } // // Rule 576: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 576: { //#line 1708 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpression = (Expr) getRhsSym(2); //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PlaceExpression); break; } // // Rule 578: NextStatement ::= next ; // case 578: { //#line 1718 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Next(pos())); break; } // // Rule 579: AwaitStatement ::= await Expression ; // case 579: { //#line 1722 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(2); //#line 1724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Await(pos(), Expression)); break; } // // Rule 580: ClockList ::= Clock // case 580: { //#line 1728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(1); //#line 1730 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Clock); setResult(l); break; } // // Rule 581: ClockList ::= ClockList , Clock // case 581: { //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(1); //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1737 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClockList.add(Clock); setResult(ClockList); break; } // // Rule 582: Clock ::= Expression // case 582: { //#line 1743 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(1); //#line 1745 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Expression); break; } // // Rule 583: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 583: { //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(4); //#line 1757 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Cast(pos(), Type, UnaryExpressionNotPlusMinus)); break; } // // Rule 584: CastExpression ::= ( @ Expression ) UnaryExpressionNotPlusMinus // case 584: { //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(5); //#line 1762 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PlaceCast(pos(), Expression, UnaryExpressionNotPlusMinus)); break; } // // Rule 585: RelationalExpression ::= RelationalExpression instanceof Type // case 585: { //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Instanceof(pos(), RelationalExpression, Type)); break; } // // Rule 586: IdentifierList ::= identifier // case 586: { //#line 1780 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1782 "C:/eclipse/ws6/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 587: IdentifierList ::= IdentifierList , identifier // case 587: { //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List IdentifierList = (List) getRhsSym(1); //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1789 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IdentifierList.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(IdentifierList); break; } // // Rule 588: Primary ::= here // case 588: { //#line 1796 "C:/eclipse/ws6/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 591: RegionExpression ::= Expression$expr1 : Expression$expr2 // case 591: { //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1814 "C:/eclipse/ws6/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 592: RegionExpressionList ::= RegionExpression // case 592: { //#line 1830 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(1); //#line 1832 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(RegionExpression); setResult(l); break; } // // Rule 593: RegionExpressionList ::= RegionExpressionList , RegionExpression // case 593: { //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(1); //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(3); //#line 1839 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" RegionExpressionList.add(RegionExpression); //setResult(RegionExpressionList); break; } // // Rule 594: Primary ::= [ RegionExpressionList ] // case 594: { //#line 1844 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(2); //#line 1846 "C:/eclipse/ws6/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 595: AssignmentExpression ::= Expression$expr1 -> Expression$expr2 // case 595: { //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ConstantDistMaker call = nf.ConstantDistMaker(pos(), expr1, expr2); setResult(call); break; } // // Rule 596: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 596: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Expression)); break; } // // Rule 597: FieldModifier ::= mutable // case 597: { //#line 1877 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.MUTABLE); break; } // // Rule 598: FieldModifier ::= const // case 598: { //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 599: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 599: throw new Error("No action specified for rule " + 599); // // Rule 600: MethodInvocation ::= MethodName ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 600: throw new Error("No action specified for rule " + 600); // // Rule 601: MethodInvocation ::= Primary . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 601: throw new Error("No action specified for rule " + 601); // // Rule 602: MethodInvocation ::= super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 602: throw new Error("No action specified for rule " + 602); // // Rule 603: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 603: throw new Error("No action specified for rule " + 603); // // Rule 604: MethodInvocation ::= TypeName . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 604: throw new Error("No action specified for rule " + 604); // // Rule 605: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 605: throw new Error("No action specified for rule " + 605); // // Rule 606: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 606: throw new Error("No action specified for rule " + 606); // // Rule 607: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 607: throw new Error("No action specified for rule " + 607); // // Rule 608: MethodModifier ::= synchronized // case 608: { //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"synchronized\" is an invalid X10 Method Modifier"); setResult(Flags.SYNCHRONIZED); break; } // // Rule 609: FieldModifier ::= volatile // case 609: { //#line 1922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"volatile\" is an invalid X10 Field Modifier"); setResult(Flags.VOLATILE); break; } // // Rule 610: SynchronizedStatement ::= synchronized ( Expression ) Block // case 610: { //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block Block = (Block) getRhsSym(5); //#line 1931 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "Synchronized Statement is invalid in X10"); setResult(nf.Synchronized(pos(), Expression, Block)); break; } // // Rule 611: ThisClauseopt ::= $Empty // case 611: setResult(null); break; // // Rule 613: PlaceTypeSpecifieropt ::= $Empty // case 613: setResult(null); break; // // Rule 615: DepParametersopt ::= $Empty // case 615: setResult(null); break; // // Rule 617: PropertyListopt ::= $Empty // case 617: setResult(null); break; // // Rule 619: WhereClauseopt ::= $Empty // case 619: setResult(null); break; // // Rule 621: ObjectKindopt ::= $Empty // case 621: setResult(null); break; // // Rule 623: ArrayInitializeropt ::= $Empty // case 623: setResult(null); break; // // Rule 625: PlaceExpressionSingleListopt ::= $Empty // case 625: setResult(null); break; // // Rule 627: ArgumentListopt ::= $Empty // case 627: setResult(null); break; // // Rule 629: X10ClassModifiersopt ::= $Empty // case 629: { //#line 1977 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(Flags.NONE)); break; } // // Rule 631: DepParametersopt ::= $Empty // case 631: setResult(null); break; // // Rule 633: Unsafeopt ::= $Empty // case 633: setResult(null); break; // // Rule 634: Unsafeopt ::= unsafe // case 634: { //#line 1989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 635: ParamIdopt ::= $Empty // case 635: setResult(null); break; // // Rule 636: ParamIdopt ::= identifier // case 636: { //#line 1996 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1998 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 637: ClockedClauseopt ::= $Empty // case 637: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new TypedList(new LinkedList(), Expr.class, false)); break; } default: break; } return; } | 1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/13a8963410bb8c85885791a761267a089892a2fc/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... | ||
register(); | private TextAttributesKey(String externalName) { myExternalName = externalName; register(); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/26848579d0fa3b130dbfe8ef9c824a2ffec58ff3/TextAttributesKey.java/buggy/openapi/src/com/intellij/openapi/editor/colors/TextAttributesKey.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3867,
2498,
653,
12,
780,
3903,
461,
13,
288,
565,
3399,
6841,
461,
273,
3903,
461,
31,
377,
289,
2,
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,
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,
282,
3238,
3867,
2498,
653,
12,
780,
3903,
461,
13,
288,
565,
3399,
6841,
461,
273,
3903,
461,
31,
377,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if (targetFile != null && !targetFile.isWritable()) { | if (targetFile != null && !targetFile.getManager().isInProject(targetFile)) { | protected boolean isAvailableImpl(int offset) { final PsiElement nameElement = getNameElement(myNewExpression); final PsiFile targetFile = getTargetFile(myNewExpression); if (targetFile != null && !targetFile.isWritable()) { return false; } if (shouldShowTag(offset, nameElement, myNewExpression)) { setText("Create Class '" + nameElement.getText() + "'"); return true; } return false; } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/e8125ddb902aab8141b7a42421209f89e2a2c38d/CreateClassFromNewAction.java/clean/source/com/intellij/codeInsight/daemon/impl/quickfix/CreateClassFromNewAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
1250,
28293,
2828,
12,
474,
1384,
13,
288,
565,
727,
453,
7722,
1046,
508,
1046,
273,
1723,
1046,
12,
4811,
1908,
2300,
1769,
565,
727,
453,
7722,
812,
21254,
273,
8571,
812,
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,
4750,
1250,
28293,
2828,
12,
474,
1384,
13,
288,
565,
727,
453,
7722,
1046,
508,
1046,
273,
1723,
1046,
12,
4811,
1908,
2300,
1769,
565,
727,
453,
7722,
812,
21254,
273,
8571,
812,
12,
... |
paramString() { return ("selectedIndex=" + selectedIndex + "," + super.paramString()); } | protected String paramString() { return "selectedIndex=" + selectedIndex + "," + super.paramString(); } | paramString(){ return ("selectedIndex=" + selectedIndex + "," + super.paramString());} | 1023 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1023/de1def922d61f2c8775ff796242c973408a67856/Choice.java/clean/libjava/classpath/java/awt/Choice.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
579,
780,
1435,
95,
225,
327,
7566,
8109,
1016,
1546,
397,
29244,
397,
5753,
397,
2240,
18,
891,
780,
10663,
97,
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,
579,
780,
1435,
95,
225,
327,
7566,
8109,
1016,
1546,
397,
29244,
397,
5753,
397,
2240,
18,
891,
780,
10663,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
final String[] components = Strings.split(requestString, Component.PATH_SEPARATOR); if (components.length != 2) { throw new WicketRuntimeException("Invalid bookmarkablePage parameter: " + requestString + ", expected: 'pageMapName:pageClassName'"); } final String pageMapName = components[0]; parameters.setPageMapName(pageMapName.length() == 0 ? PageMap.DEFAULT_NAME : pageMapName); final String pageClassName = components[1]; parameters.setBookmarkablePageClass(pageClassName); | parameters.setBookmarkablePageClass(requestString); | protected void addBookmarkablePageParameters(final Request request, final RequestParameters parameters) { final String requestString = request .getParameter(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME); if (requestString != null) { final String[] components = Strings.split(requestString, Component.PATH_SEPARATOR); if (components.length != 2) { throw new WicketRuntimeException("Invalid bookmarkablePage parameter: " + requestString + ", expected: 'pageMapName:pageClassName'"); } // Extract any pagemap name final String pageMapName = components[0]; parameters.setPageMapName(pageMapName.length() == 0 ? PageMap.DEFAULT_NAME : pageMapName); // Extract bookmarkable page class name final String pageClassName = components[1]; parameters.setBookmarkablePageClass(pageClassName); } } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/334033e5a32ab51848bcba8721c6287575f63292/PortletRequestCodingStrategy.java/clean/wicket/src/java/wicket/protocol/http/portlet/PortletRequestCodingStrategy.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
22966,
429,
1964,
2402,
12,
6385,
1567,
590,
16,
1082,
202,
6385,
1567,
2402,
1472,
13,
202,
95,
202,
202,
6385,
514,
590,
780,
273,
590,
202,
202,
18,
588,
1662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
527,
22966,
429,
1964,
2402,
12,
6385,
1567,
590,
16,
1082,
202,
6385,
1567,
2402,
1472,
13,
202,
95,
202,
202,
6385,
514,
590,
780,
273,
590,
202,
202,
18,
588,
1662,
... |
public void append( int tabIndex, Item item ) { Container tabContainer = this.tabContainers[ tabIndex ]; tabContainer.add(item); | public int append( int tabIndex, Item item ) { return append( tabIndex, item, null ); | public void append( int tabIndex, Item item ) { Container tabContainer = this.tabContainers[ tabIndex ]; tabContainer.add(item); } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/a1a7bc399164060c69b70d0823e30633e71144eb/TabbedForm.java/buggy/enough-polish-j2me/source/src/de/enough/polish/ui/TabbedForm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
714,
12,
509,
3246,
1016,
16,
4342,
761,
262,
288,
202,
202,
2170,
3246,
2170,
273,
333,
18,
7032,
11177,
63,
3246,
1016,
308,
31,
202,
202,
7032,
2170,
18,
1289,
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,
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,
714,
12,
509,
3246,
1016,
16,
4342,
761,
262,
288,
202,
202,
2170,
3246,
2170,
273,
333,
18,
7032,
11177,
63,
3246,
1016,
308,
31,
202,
202,
7032,
2170,
18,
1289,
12,
1... |
Object[] destinationPaths = dialog.getResult(); if (destinationPaths == null) { | Object[] destinationPaths = dialog.getResult(); if (destinationPaths == null) { | public void copyProject(IProject project) { errorStatus = null; //Get the project name and location in a two element list ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog( parentShell, project); dialog.setTitle(IDEWorkbenchMessages.CopyProjectOperation_copyProject); if (dialog.open() != Window.OK) { return; } Object[] destinationPaths = dialog.getResult(); if (destinationPaths == null) { return; } String newName = (String) destinationPaths[0]; IPath newLocation = new Path((String) destinationPaths[1]); if (!validateCopy(parentShell, project, newName, getModelProviderIds())) { return; } boolean completed = performProjectCopy(project, newName, newLocation); if (!completed) { return; // not appropriate to show errors } // If errors occurred, open an Error dialog if (errorStatus != null) { ErrorDialog.openError(parentShell, IDEWorkbenchMessages.CopyProjectOperation_copyFailedTitle, null, errorStatus); errorStatus = null; } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/53cada7d6d0463cdcb3aed320ea380f4aae64087/CopyProjectOperation.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyProjectOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1610,
4109,
12,
45,
4109,
1984,
13,
288,
3639,
555,
1482,
273,
446,
31,
3639,
368,
967,
326,
1984,
508,
471,
2117,
316,
279,
2795,
930,
666,
3639,
5420,
2735,
6233,
6353,
617... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1610,
4109,
12,
45,
4109,
1984,
13,
288,
3639,
555,
1482,
273,
446,
31,
3639,
368,
967,
326,
1984,
508,
471,
2117,
316,
279,
2795,
930,
666,
3639,
5420,
2735,
6233,
6353,
617... |
protected String makeSQLInsert(UsageMonitorPacket pack) { | protected PreparedStatement makeSQLInsert(UsageMonitorPacket pack) throws SQLException{ | protected String makeSQLInsert(UsageMonitorPacket pack) { if (!(pack instanceof GFTPMonitorPacket)) { log.error("Something is seriously wrong: GridFTPPacketHandler got a packet which was not a GFTPMonitorPacket."); return ""; } GFTPMonitorPacket gmp = (GFTPMonitorPacket)pack; return gmp.toSQL(); } | 8719 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8719/0cf8afb463a23155b7b8c389685c15849174eeea/GridFTPPacketHandler.java/buggy/usage/java/receiver/source/src/org/globus/usage/receiver/handlers/GridFTPPacketHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
16913,
1221,
3997,
4600,
12,
5357,
7187,
6667,
2298,
13,
1216,
6483,
95,
3639,
309,
16051,
12,
2920,
1276,
611,
17104,
7187,
6667,
3719,
288,
5411,
613,
18,
1636,
2932,
24332,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16913,
1221,
3997,
4600,
12,
5357,
7187,
6667,
2298,
13,
1216,
6483,
95,
3639,
309,
16051,
12,
2920,
1276,
611,
17104,
7187,
6667,
3719,
288,
5411,
613,
18,
1636,
2932,
24332,
353,
... |
public String getFileListFunction() { boolean isInsideCurrentProject = false; // if mode is "listonly", only the list will be shown boolean listonly = "listonly".equals(getSettings().getExplorerMode()); // if mode is "projectview", all changed files in that project will be shown boolean projectView = "projectview".equals(getSettings().getExplorerMode()); // if mode is "vfslinks", the vfs links to a target file will be shown boolean vfslinkView = "vfslink".equals(getSettings().getExplorerMode()); CmsResource currentResource = null; String currentFolder = getSettings().getExplorerResource(); boolean found = true; try { currentResource = getCms().readFileHeader(currentFolder); } catch (CmsException e) { // file was not readable found = false; } if (found) { if (vfslinkView) { // file / folder exists and is readable currentFolder = "vfslink:" + currentFolder; } } else { // show the root folder in case of an error and reset the state currentFolder = "/"; vfslinkView = false; try { currentResource = getCms().readFileHeader(currentFolder); } catch (CmsException e) { // should not happen } } long check = getCms().getFileSystemFolderChanges(); boolean newTreePlease = getSettings().getExplorerChecksum() != check; // get the currentFolder Id CmsUUID currentFolderId; if (currentResource.isFile()) { currentFolderId = currentResource.getParentId(); } else { currentFolderId = currentResource.getId(); } // start creating content StringBuffer content = new StringBuffer(2048); content.append("function initialize() {\n"); if (listonly) { content.append("top.openfolderMethod='openthisfolderflat';\n"); } else { content.append("top.openfolderMethod='openthisfolder';\n"); } // if (projectView || vfslinkView) {// content.append("top.projectView=true;\n");// } else {// content.append("top.projectView=false;\n");// } content.append("top.mode=\""); content.append(getSettings().getExplorerMode()); content.append("\";\n"); // the flaturl if (getSettings().getExplorerFlaturl() != null) { content.append("top.flaturl='"); content.append(getSettings().getExplorerFlaturl()); content.append("';\n"); } else if (!listonly) { content.append("top.flaturl='';\n"); } // the help_url content.append("top.head.helpUrl='explorer/index.html';\n"); // the project content.append("top.setProject("); content.append(getSettings().getProject()); content.append(");\n"); // the onlineProject content.append("top.setOnlineProject("); content.append(I_CmsConstants.C_PROJECT_ONLINE_ID); content.append(");\n"); // set the checksum for the tree content.append("top.setChecksum("); content.append(check); content.append(");\n"); // set the writeAccess for the current Folder boolean writeAccess = true; if (! vfslinkView) { try { CmsFolder test = getCms().readFolder(currentFolder); //writeAccess = test.getProjectId() == getSettings().getProject(); writeAccess = getCms().isInsideCurrentProject(test); } catch (CmsException e) { writeAccess = false; } } content.append("top.enableNewButton("); content.append(writeAccess); content.append(");\n"); // the folder content.append("top.setDirectory(\""); content.append(currentFolderId.hashCode()); content.append("\",\""); content.append(CmsResource.getPath(getSettings().getExplorerResource())); content.append("\");\n"); if (vfslinkView) { content.append("top.addHist('"); content.append(CmsResource.getPath(getSettings().getExplorerResource())); content.append("')\n"); } content.append("top.rD();\n\n"); // now check which filelist colums we want to show int preferences = getDefaultPreferences(); boolean showTitle = (preferences & I_CmsWpConstants.C_FILELIST_TITLE) > 0; boolean showPermissions = (preferences & I_CmsWpConstants.C_FILELIST_PERMISSIONS) > 0; boolean showSize = (preferences & I_CmsWpConstants.C_FILELIST_SIZE) > 0; boolean showDateLastModified = (preferences & I_CmsWpConstants.C_FILELIST_DATE_LASTMODIFIED) > 0; boolean showUserWhoLastModified = (preferences & I_CmsWpConstants.C_FILELIST_USER_LASTMODIFIED) > 0; boolean showDateCreated = (preferences & I_CmsWpConstants.C_FILELIST_DATE_CREATED) > 0; boolean showUserWhoCreated = (preferences & I_CmsWpConstants.C_FILELIST_USER_CREATED) > 0; // now get the entries for the filelist Vector resources = getRessources(getSettings().getExplorerMode(), getSettings().getExplorerResource()); // if a folder contains to much entrys we split them to pages of C_ENTRYS_PER_PAGE length int startat = 0; int stopat = resources.size(); int selectedPage = 1; int numberOfPages = 0; int maxEntrys = C_ENTRYS_PER_PAGE; if (!(listonly || projectView || vfslinkView)) { selectedPage = getSettings().getExplorerPage(); if (stopat > maxEntrys) { // we have to splitt numberOfPages = (stopat / maxEntrys) + 1; if (selectedPage > numberOfPages) { // the user has changed the folder and then selected a page for the old folder selectedPage = 1; } startat = (selectedPage - 1) * maxEntrys; if ((startat + maxEntrys) < stopat) { stopat = startat + maxEntrys; } } } for (int i = startat; i < stopat; i++) { CmsResource res = (CmsResource)resources.elementAt(i); CmsLock lock = null; String path = getCms().readAbsolutePath(res); try { lock = getCms().getLock(res); } catch (CmsException e) { lock = CmsLock.getNullLock(); if (I_CmsLogChannels.C_LOGGING && A_OpenCms.isLogging(I_CmsLogChannels.C_OPENCMS_CRITICAL)) { A_OpenCms.log(I_CmsLogChannels.C_OPENCMS_CRITICAL, this.getClass().getName() + " error getting lock state for resource " + res + " " + e.getMessage()); } } isInsideCurrentProject = getCms().isInsideCurrentProject(res); content.append("top.aF("); // position 1: name content.append("\""); content.append(res.getResourceName()); content.append("\","); // position 2: path if (projectView || vfslinkView) { content.append("\""); // TODO: Check this (won't work with new repository) content.append(path); content.append("\","); } else { //is taken from top.setDirectory content.append("\"\","); } // position 3: title if (showTitle) { String title = ""; try { title = getCms().readProperty(getCms().readAbsolutePath(res), I_CmsConstants.C_PROPERTY_TITLE); } catch (CmsException e) { } if (title == null) { title = ""; } content.append("\""); if (title != null) content.append(Encoder.escapeHtml(title)); content.append("\","); } else { content.append("\"\","); } // position 4: type content.append(res.getType()); content.append(","); // position 5: link count content.append(res.getLinkCount() > 1 ? 1 : 0); content.append(","); // position 6: size if (res.isFolder() || (!showSize)) { content.append("\"\","); } else { content.append(res.getLength()); content.append(","); } // position 7: state content.append(res.getState()); content.append(","); // position 8: project int projectId = lock.isNullLock() ? res.getProjectId() : lock.getProjectId(); //int projectId = lock.isNullLock() ? getCms().getRequestContext().currentProject().getId() : lock.getProjectId(); content.append(projectId); content.append(","); // position 9: date of last modification if (showDateLastModified) { content.append("\""); content.append(getSettings().getMessages().getDateTime(res.getDateLastModified())); content.append("\","); } else { content.append("\"\","); } // position 10: user who last modified the resource if (showUserWhoLastModified) { content.append("\""); try { content.append(getCms().readUser(res.getUserLastModified()).getName()); } catch (CmsException e) { content.append(e.getMessage()); } content.append("\","); } else { content.append("\"\","); } // position 11: date of creation if (showDateCreated) { content.append("\""); content.append(getSettings().getMessages().getDateTime(res.getDateCreated())); content.append("\","); } else { content.append("\"\","); } // position 12 : user who created the resource if (showUserWhoCreated) { content.append("\""); try { content.append(getCms().readUser(res.getUserCreated()).getName()); } catch (CmsException e) { content.append(e.getMessage()); } content.append("\","); } else { content.append("\"\","); } // position 13: permissions if (showPermissions) { content.append("\""); try { content.append(getCms().getPermissions(getCms().readAbsolutePath(res)).getPermissionString()); } catch (CmsException e) { content.append(e.getMessage()); } content.append("\","); } else { content.append("\"\","); } // position 14: locked by if (lock.isNullLock()) { content.append("\"\","); } else { content.append("\""); try { //content.append(getCms().lockedBy(res).getName()); content.append(getCms().readUser(lock.getUserId()).getName()); } catch (CmsException e) { content.append(e.getMessage()); } content.append("\","); } // position 15: type of lock content.append(lock.getType()); content.append(","); // position 16: name of project where resource belongs to int lockedInProject = lock.isNullLock() ? getCms().getRequestContext().currentProject().getId() : lock.getProjectId(); String lockedInProjectName = ""; try { lockedInProjectName = getCms().readProject(lockedInProject).getName(); } catch (CmsException exc) { // ignore the exception - this is an old project so ignore it } content.append("\""); content.append(lockedInProjectName); content.append("\","); // position 17: id of project where resource belongs to content.append(lockedInProject); content.append(",\""); // position 18: project state, I=resource is inside current project, O=resource is outside current project if (isInsideCurrentProject) { content.append("I"); } else { content.append("O"); } content.append("\""); content.append(");\n"); } // now the tree, only if changed if (newTreePlease && (!(listonly || vfslinkView))) { content.append("\ntop.rT();\n"); List tree = null; try { tree = getCms().getFolderTree(); } catch (CmsException e) { tree = new Vector(); } int startAt = 1; CmsUUID parentId = CmsUUID.getNullUUID(); boolean grey = false; if (CmsProject.isOnlineProject(getSettings().getProject())) { // all easy: we are in the onlineProject CmsFolder rootFolder = (CmsFolder)tree.get(0); content.append("top.aC(\""); content.append(rootFolder.getId().hashCode()); content.append("\", "); content.append("\""); content.append(getSettings().getMessages().key("title.rootfolder")); content.append("\", \""); content.append(rootFolder.getParentId().hashCode()); content.append("\", false);\n"); for (int i = startAt; i < tree.size(); i++) { CmsFolder folder = (CmsFolder)tree.get(i); content.append("top.aC(\""); // id content.append(folder.getId().hashCode()); content.append("\", "); // name content.append("\""); content.append(folder.getResourceName()); content.append("\", \""); // parentId content.append(folder.getParentId().hashCode()); content.append("\", false);\n"); } } else { // offline Project Hashtable idMixer = new Hashtable(); CmsFolder rootFolder = (CmsFolder)tree.get(0); String folderToIgnore = null; /* if (! CmsProject.isOnlineProject(rootFolder.getProjectId())) { //startAt = 2; grey = false;// CmsFolder folder = (CmsFolder)tree.get(1);// CmsUUID id = rootFolder.getId();// idMixer.put(folder, id); } else { grey = true; } */ if (getCms().isInsideCurrentProject(rootFolder)) { grey = false; } else { grey = true; } content.append("top.aC(\""); content.append(rootFolder.getId().hashCode()); content.append("\", "); content.append("\""); content.append(getSettings().getMessages().key("title.rootfolder")); content.append("\", \""); content.append(rootFolder.getParentId().hashCode()); content.append("\", "); content.append(grey); content.append(");\n"); for (int i = startAt; i < tree.size(); i++) { CmsFolder folder = (CmsFolder)tree.get(i); if ((folder.getState() == I_CmsConstants.C_STATE_DELETED) || (getCms().readAbsolutePath(folder).equals(folderToIgnore))) { // if the folder is deleted - ignore it and the following online res folderToIgnore = getCms().readAbsolutePath(folder); } else { if (! CmsProject.isOnlineProject(folder.getProjectId())) { //grey = false; parentId = folder.getParentId(); try { // the next res is the same res in the online-project: ignore it! if (getCms().readAbsolutePath(folder).equals(getCms().readAbsolutePath((CmsFolder)tree.get(i + 1)))) { i++; idMixer.put(tree.get(i), folder.getId()); } } catch (IndexOutOfBoundsException exc) { // ignore the exception, this was the last resource } } else { //grey = true; parentId = folder.getParentId(); if (idMixer.containsKey(parentId)) { parentId = (CmsUUID) idMixer.get(parentId); } } if (getCms().isInsideCurrentProject(folder)) { grey = false; } else { grey = true; } content.append("top.aC(\""); // id content.append(folder.getId().hashCode()); content.append("\", "); // name content.append("\""); content.append(folder.getResourceName()); content.append("\", \""); // parentId content.append(parentId.hashCode()); content.append("\", "); content.append(grey); content.append(");\n"); } } } } // if (listonly || projectView) {// // only show the filelist// content.append("top.dUL(document);\n");// } else {// // update all frames content.append("top.dU(document,"); content.append(numberOfPages); content.append(","); content.append(selectedPage); content.append("); \n");// } content.append("}\n"); return content.toString(); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/459fca02ed49f6ed26d2c454d76fc4481fc986e8/CmsExplorer.java/clean/src/org/opencms/workplace/CmsExplorer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
6034,
682,
2083,
1435,
288,
540,
1250,
353,
18619,
3935,
4109,
273,
629,
31,
9079,
368,
309,
1965,
353,
315,
1098,
3700,
3113,
1338,
326,
666,
903,
506,
12188,
3639,
1250,
666,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
6034,
682,
2083,
1435,
288,
540,
1250,
353,
18619,
3935,
4109,
273,
629,
31,
9079,
368,
309,
1965,
353,
315,
1098,
3700,
3113,
1338,
326,
666,
903,
506,
12188,
3639,
1250,
666,... | ||
IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives(); for (int i = 0; i < includes.length; ++i) { IASTPreprocessorIncludeStatement include = includes[i]; IASTFileLocation sourceLoc = include.getFileLocation(); String path= sourceLoc != null ? sourceLoc.getFileName() : ast.getFilePath(); addToMap(symbolMap, 0, path, include); path= include.getPath(); if (path != null) { prepareInMap(symbolMap, include.getPath()); } } IASTPreprocessorMacroDefinition[] macros = ast.getMacroDefinitions(); for (int i = 0; i < macros.length; ++i) { IASTPreprocessorMacroDefinition macro = macros[i]; IASTFileLocation sourceLoc = macro.getFileLocation(); if (sourceLoc != null) { String path = sourceLoc.getFileName(); addToMap(symbolMap, 1, path, macro); } } ast.accept(new ASTVisitor() { { shouldVisitNames = true; shouldVisitDeclarations = true; } public int visit(IASTName name) { try { IASTFileLocation nameLoc = name.getFileLocation(); if (nameLoc != null) { addToMap(symbolMap, 2, nameLoc.getFileName(), name); } return PROCESS_CONTINUE; } catch (Throwable e) { CCorePlugin.log(e); return ++fErrorCount > MAX_ERRORS ? PROCESS_ABORT : PROCESS_CONTINUE; } } }); for (Iterator iter = symbolMap.values().iterator(); iter.hasNext();) { | for (int i=0; i<orderedPaths.length; i++) { | protected void addSymbols(IASTTranslationUnit ast, IProgressMonitor pm) throws InterruptedException, CoreException { // Add in the includes final LinkedHashMap symbolMap= new LinkedHashMap(); // makes bugs reproducible prepareInMap(symbolMap, ast.getFilePath()); // includes IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives(); for (int i = 0; i < includes.length; ++i) { IASTPreprocessorIncludeStatement include = includes[i]; IASTFileLocation sourceLoc = include.getFileLocation(); String path= sourceLoc != null ? sourceLoc.getFileName() : ast.getFilePath(); // command-line includes addToMap(symbolMap, 0, path, include); path= include.getPath(); if (path != null) { prepareInMap(symbolMap, include.getPath()); } } // macros IASTPreprocessorMacroDefinition[] macros = ast.getMacroDefinitions(); for (int i = 0; i < macros.length; ++i) { IASTPreprocessorMacroDefinition macro = macros[i]; IASTFileLocation sourceLoc = macro.getFileLocation(); if (sourceLoc != null) { // skip built-ins and command line macros String path = sourceLoc.getFileName(); addToMap(symbolMap, 1, path, macro); } } // names ast.accept(new ASTVisitor() { { shouldVisitNames = true; shouldVisitDeclarations = true; } public int visit(IASTName name) { try { IASTFileLocation nameLoc = name.getFileLocation(); if (nameLoc != null) { addToMap(symbolMap, 2, nameLoc.getFileName(), name); } return PROCESS_CONTINUE; } catch (Throwable e) { CCorePlugin.log(e); return ++fErrorCount > MAX_ERRORS ? PROCESS_ABORT : PROCESS_CONTINUE; } } }); for (Iterator iter = symbolMap.values().iterator(); iter.hasNext();) { if (pm.isCanceled()) { return; } // resolve the names ArrayList names= ((ArrayList[]) iter.next())[2]; for (int i=0; i<names.size(); i++) { ((IASTName) names.get(i)).resolveBinding(); } } boolean isFirstRequest= true; boolean isFirstAddition= true; index.acquireWriteLock(0); try { for (Iterator iter = symbolMap.entrySet().iterator(); iter.hasNext();) { if (pm.isCanceled()) return; Map.Entry entry = (Map.Entry) iter.next(); String path= (String) entry.getKey(); Boolean required= (Boolean) filePathsToParse.remove(path); if (required != null) { if (required.booleanValue()) { if (isFirstRequest) isFirstRequest= false; else fTotalSourcesEstimate--; } if (fTrace) System.out.println("Indexer: adding " + path); //$NON-NLS-1$ addToIndex(index, path, (ArrayList[]) entry.getValue()); if (isFirstAddition) isFirstAddition= false; else fCompletedHeaders++; } } } finally { index.releaseWriteLock(0); } fCompletedSources++; } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/f0f63b48ed82c8e9af14ff4283ea122bc3916f5e/PDOMFullIndexerJob.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
14821,
12,
45,
9053,
6717,
2802,
3364,
16,
467,
5491,
7187,
7430,
13,
1216,
7558,
16,
30015,
288,
202,
202,
759,
1436,
316,
326,
6104,
202,
202,
6385,
13589,
3273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
527,
14821,
12,
45,
9053,
6717,
2802,
3364,
16,
467,
5491,
7187,
7430,
13,
1216,
7558,
16,
30015,
288,
202,
202,
759,
1436,
316,
326,
6104,
202,
202,
6385,
13589,
3273,
... |
mPrVoices = new String[mVoicesNames.length+1][128]; | mPrVoices = new VoiceName[mVoicesNames.length+1][128]; | private void initVoicesNames() { if (mPrVoices == null) { try { mPrVoices = new String[mVoicesNames.length+1][128]; for (int f = 0; f < (mVoicesNames.length+1); f++) { if (f == 0) { for(int i = 0; i < 128; i++) { mPrVoices[f][i] = Integer.toString(i+1); } } else { InputStream oIS = getClass().getResourceAsStream(mVoicesNames[f-1]); InputStreamReader oISR = new InputStreamReader(oIS); BufferedReader oBR = new BufferedReader(oISR); String oLine = oBR.readLine(); int i = 0; while(oLine != null && i < 128) { mPrVoices[f][i++] = oLine; oLine = oBR.readLine(); } } } } catch(IOException ioe) { ioe.printStackTrace(); } } } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/092d39e12efded0d1c7ef0d26c0aca1f6add273f/YamahaFS1RPerformanceEditor.java/buggy/JSynthLib/synthdrivers/YamahaFS1R/YamahaFS1RPerformanceEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
58,
17725,
1557,
1435,
288,
202,
202,
430,
261,
81,
2050,
58,
17725,
422,
446,
13,
288,
1082,
202,
698,
288,
9506,
202,
81,
2050,
58,
17725,
273,
394,
514,
63,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1208,
58,
17725,
1557,
1435,
288,
202,
202,
430,
261,
81,
2050,
58,
17725,
422,
446,
13,
288,
1082,
202,
698,
288,
9506,
202,
81,
2050,
58,
17725,
273,
394,
514,
63,
8... |
throws XOMException { Vector vec = new Vector(); String augName = "DM" + elemName; while(currentChild != null && augName.equalsIgnoreCase(currentChild.getTagName())) { vec.addElement(currentChild); getNextElement(); } | throws XOMException { Vector vec = new Vector(); String augName = "DM" + elemName; while(currentChild != null && augName.equalsIgnoreCase(currentChild.getTagName())) { vec.addElement(currentChild); getNextElement(); } | public DOMWrapper[] optionalArray(String elemName, int min, int max) throws XOMException { // First, read the appropriate elements into a vector. Vector vec = new Vector(); String augName = "DM" + elemName; while(currentChild != null && augName.equalsIgnoreCase(currentChild.getTagName())) { vec.addElement(currentChild); getNextElement(); } // Now, check for size violations if(min > 0 && vec.size() < min) throw new XOMException("Expecting at least " + min + " <" + elemName + "> but found " + vec.size()); if(max > 0 && vec.size() > max) throw new XOMException("Expecting at most " + max + " <" + elemName + "> but found " + vec.size()); // Finally, convert to an array and return. DOMWrapper[] retval = new DOMWrapper[vec.size()]; for(int i=0; i<retval.length; i++) retval[i] = (DOMWrapper)(vec.elementAt(i)); return retval; } | 37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/DOMElementParser.java/buggy/src/main/mondrian/xom/DOMElementParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4703,
3611,
8526,
3129,
1076,
12,
780,
3659,
461,
16,
509,
1131,
16,
509,
943,
13,
202,
202,
15069,
1139,
1872,
503,
202,
95,
202,
202,
759,
5783,
16,
855,
326,
5505,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4703,
3611,
8526,
3129,
1076,
12,
780,
3659,
461,
16,
509,
1131,
16,
509,
943,
13,
202,
202,
15069,
1139,
1872,
503,
202,
95,
202,
202,
759,
5783,
16,
855,
326,
5505,
2186,
... |
private void readState(long expectedTimeStamp) { if (!stateLocation.isFile()) return; if (DEBUG_READER) readStartupTime = System.currentTimeMillis(); FileInputStream fileInput; try { fileInput = new FileInputStream(stateLocation); } catch (FileNotFoundException e) { // TODO: log before bailing e.printStackTrace(); return; } DataInputStream input = null; try { input = new DataInputStream(new BufferedInputStream(fileInput, 65536)); systemState = factory.readSystemState(input, expectedTimeStamp); // problems in the cache (corrupted/stale), don't create a state object if (systemState == null) return; initializeSystemState(); } catch (IOException ioe) { // TODO: how do we log this? ioe.printStackTrace(); } finally { if (DEBUG_READER) System.out.println("Time to read state: " + (System.currentTimeMillis() - readStartupTime)); } } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/a50cb5323f078719f32aaedf636cf8477de8ebce/StateManager.java/buggy/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6459,
896,
1119,
12,
5748,
3825,
21536,
15329,
202,
202,
430,
12,
5,
2019,
2735,
18,
291,
812,
10756,
1082,
202,
2463,
31,
202,
202,
430,
12,
9394,
67,
862,
5483,
13,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
896,
1119,
12,
5748,
3825,
21536,
15329,
202,
202,
430,
12,
5,
2019,
2735,
18,
291,
812,
10756,
1082,
202,
2463,
31,
202,
202,
430,
12,
9394,
67,
862,
5483,
13,
1082,
... | ||
throw new Error ("not implemented - IntNum.doubleValue for bignum"); | int il = MPN.intLength (words, ival) + 1; long l = MPN.rshift_long (words, ival, il - 64); boolean neg = l < 0; if (neg) l = -l; if ((l & (1l << 10)) != 0) l += (1l << 11); if (l < 0) { l >>>= 1; il += 1; } l = (l >> 10) & 0xfffffffffffffL; double d; if (il >= 1025) d = Double.POSITIVE_INFINITY; else { l += (long)(il + 1021) << 52; d = Double.longBitsToDouble (l); } if (neg) d = -d; return d; | public double doubleValue () { if (words == null) return (double) ival; if (ival < 2) return (double) longValue (); throw new Error ("not implemented - IntNum.doubleValue for bignum"); } | 37648 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37648/7acadb672b61196e62c8342f649887d92b6e82b1/IntNum.java/buggy/gnu/math/IntNum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1645,
11868,
1832,
225,
288,
565,
309,
261,
3753,
422,
446,
13,
1377,
327,
261,
9056,
13,
277,
1125,
31,
565,
309,
261,
5162,
411,
576,
13,
1377,
327,
261,
9056,
13,
15904,
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,
282,
1071,
1645,
11868,
1832,
225,
288,
565,
309,
261,
3753,
422,
446,
13,
1377,
327,
261,
9056,
13,
277,
1125,
31,
565,
309,
261,
5162,
411,
576,
13,
1377,
327,
261,
9056,
13,
15904,
261,
... |
synchronized (_pendingPeers) { _pendingPeers.remove(peer); } synchronized (_failedPeers) { _failedPeers.add(peer); } } | synchronized (_pendingPeers) { _pendingPeers.remove(peer); } synchronized (_failedPeers) { _failedPeers.add(peer); } } | public void replyTimeout(Hash peer) { synchronized (_pendingPeers) { _pendingPeers.remove(peer); } synchronized (_failedPeers) { _failedPeers.add(peer); } } | 27493 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27493/86759d2f9c63d203488c7e8b34e64be162a16ce9/StoreJob.java/clean/router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4332,
2694,
12,
2310,
4261,
13,
288,
202,
565,
3852,
261,
67,
9561,
14858,
13,
288,
202,
202,
67,
9561,
14858,
18,
4479,
12,
12210,
1769,
202,
565,
289,
202,
565,
3852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4332,
2694,
12,
2310,
4261,
13,
288,
202,
565,
3852,
261,
67,
9561,
14858,
13,
288,
202,
202,
67,
9561,
14858,
18,
4479,
12,
12210,
1769,
202,
565,
289,
202,
565,
3852,
... |
protected abstract void createDescriptionLayout(); | protected abstract void createDescriptionLayout(FormToolkit toolkit, final ScrolledForm form); | protected abstract void createDescriptionLayout(); | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/4cbe71c9202ae1ca8f504acd4898ed2b6879bc2d/AbstractBugEditor.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AbstractBugEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
918,
752,
3291,
3744,
5621,
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,... | [
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8770,
918,
752,
3291,
3744,
5621,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
int status= OS.GetIndexedSubControl(handle, (short)(index+1), t); | int status= OS.GetIndexedSubControl(controlHandle, (short)(index+1), tmp); | static int getChild(int handle, int[] t, int n, int i) { int index= (n-1 - i); int status= OS.GetIndexedSubControl(handle, (short)(index+1), t); if (status != OS.noErr) System.out.println("MacUtil.getChild: error"); return status; } | 12413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12413/a6f8889277cd443686e67206e267bcf957f018b2/MacUtil.java/buggy/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MacUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
3845,
509,
8154,
12,
474,
1640,
16,
509,
8526,
268,
16,
509,
290,
16,
509,
277,
13,
288,
202,
202,
474,
770,
33,
261,
82,
17,
21,
300,
277,
1769,
202,
202,
474,
1267,
33,
5932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3845,
509,
8154,
12,
474,
1640,
16,
509,
8526,
268,
16,
509,
290,
16,
509,
277,
13,
288,
202,
202,
474,
770,
33,
261,
82,
17,
21,
300,
277,
1769,
202,
202,
474,
1267,
33,
5932,... |
setFileList(l); setLinkList(l); | this.setFileList(l); this.setLinkList(l); | public void setList(FileAndLinkList l) { setFileList(l); setLinkList(l); } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/Tables.java/clean/src/thaw/plugins/index/Tables.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
682,
12,
812,
1876,
2098,
682,
328,
13,
288,
202,
202,
542,
26098,
12,
80,
1769,
202,
202,
542,
2098,
682,
12,
80,
1769,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
682,
12,
812,
1876,
2098,
682,
328,
13,
288,
202,
202,
542,
26098,
12,
80,
1769,
202,
202,
542,
2098,
682,
12,
80,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
... |
fs.put("ark.privURI", this.myARK.getInsertURI().toString(false)); | fs.put("ark.privURI", this.myARK.getInsertURI().toString(false, false)); | public SimpleFieldSet exportPrivateFieldSet() { SimpleFieldSet fs = exportPublicFieldSet(false); fs.put("dsaPrivKey", myPrivKey.asFieldSet()); fs.put("ark.privURI", this.myARK.getInsertURI().toString(false)); return fs; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/1c876261ab73159d57a26624667ec7bf7acd15b8/Node.java/buggy/src/freenet/node/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4477,
974,
694,
3359,
6014,
974,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
3359,
4782,
974,
694,
12,
5743,
1769,
202,
202,
2556,
18,
458,
2932,
19603,
15475,
653,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4477,
974,
694,
3359,
6014,
974,
694,
1435,
288,
202,
202,
5784,
974,
694,
2662,
273,
3359,
4782,
974,
694,
12,
5743,
1769,
202,
202,
2556,
18,
458,
2932,
19603,
15475,
653,
3... |
clearPreview( ); | private void switchTo( int type ) { if ( type == selectedType ) { return; } selectedType = type; Control[] controls = inputArea.getChildren( ); for ( int i = 0; i < controls.length; i++ ) { controls[i].dispose( ); } clearPreview( ); switch ( type ) { case URI_TYPE : swtichToExprType( ); break; case LIST_TYPE : swtichToListType( ); break; } inputArea.layout( ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/08f26fa5570453d836515b53d65281f78cb6f9bf/MarkerIconDialog.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/MarkerIconDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1620,
774,
12,
509,
618,
262,
202,
95,
202,
202,
430,
261,
618,
422,
3170,
559,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8109,
559,
273,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1620,
774,
12,
509,
618,
262,
202,
95,
202,
202,
430,
261,
618,
422,
3170,
559,
262,
202,
202,
95,
1082,
202,
2463,
31,
202,
202,
97,
202,
202,
8109,
559,
273,
618,
... | |
for (; index < tokenLength; index++) { if (isTextSplitable(tokenVal, index)) { break; } } String aaa = tokenVal.substring(0, index+1); String bbb = tokenVal.substring(index+1, tokenLength); if (matches(drStPattern, aaa)) { /* St Andrew's St, Dr King Dr */ drStToWords(tokenVal); } else { if (aaa.equals("Mr")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("mister"); } else { if (aaa.equals("Mrs")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("missus"); } else { if (aaa.equals("Ms")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("miss"); } else { FeatureSet featureSet = tokenItem.getFeatures(); featureSet.setString("nsw", "nide"); tokenToWords(aaa); tokenToWords(bbb); } } } } | for (; index < tokenLength; index++) { if (isTextSplitable(tokenVal, index)) { break; } } String aaa = tokenVal.substring(0, index + 1); String bbb = tokenVal.substring(index + 1, tokenLength); if (matches(drStPattern, aaa)) { /* St Andrew's St, Dr King Dr */ drStToWords(tokenVal); } else { if (aaa.equals("Mr")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("mister"); } else { if (aaa.equals("Mrs")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("missus"); } else { if (aaa.equals("Ms")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("miss"); } else { FeatureSet featureSet = tokenItem.getFeatures(); featureSet.setString("nsw", "nide"); tokenToWords(aaa); tokenToWords(bbb); } } } } | private void notJustAlphasToWords(String tokenVal) { /* its not just alphas */ int index = 0; int tokenLength = tokenVal.length(); for (; index < tokenLength; index++) { if (isTextSplitable(tokenVal, index)) { break; } } String aaa = tokenVal.substring(0, index+1); String bbb = tokenVal.substring(index+1, tokenLength); if (matches(drStPattern, aaa)) { /* St Andrew's St, Dr King Dr */ drStToWords(tokenVal); } else { if (aaa.equals("Mr")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("mister"); } else { if (aaa.equals("Mrs")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("missus"); } else { if (aaa.equals("Ms")) { tokenItem.getFeatures().setString("punc", ""); wordRelation.addWord("miss"); } else { FeatureSet featureSet = tokenItem.getFeatures(); featureSet.setString("nsw", "nide"); tokenToWords(aaa); tokenToWords(bbb); } } } } } | 49846 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49846/6a55df45b5e749262e5610405145a505d38c6c9e/TokenToWords.java/clean/java/de/dfki/lt/mary/modules/en/TokenToWords.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
486,
19642,
1067,
26377,
774,
7363,
12,
780,
1147,
3053,
13,
288,
202,
20308,
2097,
486,
2537,
524,
26377,
1195,
202,
474,
770,
273,
374,
31,
202,
474,
1147,
1782,
273,
1147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
486,
19642,
1067,
26377,
774,
7363,
12,
780,
1147,
3053,
13,
288,
202,
20308,
2097,
486,
2537,
524,
26377,
1195,
202,
474,
770,
273,
374,
31,
202,
474,
1147,
1782,
273,
1147,
... |
case EOL: return s2; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case EOL: return s2; case 21: case 22: case 37: case 39: case 40: case 41: case 42: case 43: case 44: case 45: return s4; case 29: return s3; default: NoViableAltException nvae = new NoViableAltException("", 43, 2, input); throw nvae; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/afa2dad261bf082d1acd2655e8290f80c6bffb15/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
19995,
30,
10792,
327,
272,
22,
31,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
19995,
30,
10792,
327,
272,
22,
31,
7734,
... | |
public org.quickfix.field.QuoteRequestRejectReason getQuoteRequestRejectReason() throws FieldNotFound { org.quickfix.field.QuoteRequestRejectReason value = new org.quickfix.field.QuoteRequestRejectReason(); | public quickfix.field.QuoteRequestRejectReason getQuoteRequestRejectReason() throws FieldNotFound { quickfix.field.QuoteRequestRejectReason value = new quickfix.field.QuoteRequestRejectReason(); | public org.quickfix.field.QuoteRequestRejectReason getQuoteRequestRejectReason() throws FieldNotFound { org.quickfix.field.QuoteRequestRejectReason value = new org.quickfix.field.QuoteRequestRejectReason(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteRequestReject.java/buggy/src/java/src/quickfix/fix43/QuoteRequestReject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
10257,
691,
21705,
8385,
336,
10257,
691,
21705,
8385,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10257,
691,
21705,
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,
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,
10257,
691,
21705,
8385,
336,
10257,
691,
21705,
8385,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
10257,
691,
21705,
8... |
emitFieldError( event, "Abstract type: " + elementType + " cannot be used in an instance" ); | emitFieldError( event, "Abstract type: " + elementType + " cannot be used in an instance", event.getName(), elementType, null, XmlValidationError.ELEMENT_TYPE_INVALID, state._type); | private void beginEvent ( Event event ) { _localElement = null; _wildcardElement = null; String message = null; State state = topState(); SchemaType elementType = null; SchemaField elementField = null; if (state == null) { elementType = _rootType; elementField = _rootField; } else { QName name = event.getName(); assert name != null; state._isEmpty = false; if (state._isNil) { emitFieldError(event, "Nil element cannot have element content"); _eatContent = 1; return; } if (!state.visit( name )) { message = findDetailedErrorBegin(state , name); if (message != null) { emitFieldError(event, message); message = null; } else { emitFieldError(event, "Element not allowed:", name); } _eatContent = 1; return; } SchemaParticle currentParticle = state.currentParticle(); _wildcardElement = currentParticle; if (currentParticle.getParticleType() == SchemaParticle.WILDCARD) { //_wildcardElement = currentParticle; QNameSet elemWildcardSet = currentParticle.getWildcardSet(); if (!elemWildcardSet.contains( name )) { // Additional processing may be needed to generate more // descriptive messages emitFieldError( event, "Element not allowed:", name ); _eatContent = 1; return; } int wildcardProcess = currentParticle.getWildcardProcess(); if (wildcardProcess == SchemaParticle.SKIP) { _eatContent = 1; return; } _localElement = _globalTypes.findElement( name ); elementField = _localElement; if (elementField == null) { if (wildcardProcess == SchemaParticle.STRICT) { emitFieldError( event, "Element not allowed (strict wildcard, and no definition found):", name ); } _eatContent = 1; return; } } else { assert currentParticle.getParticleType() == SchemaParticle.ELEMENT; // If the current element particle name does not match the name // of the event, then the current element is a substitute for // the current particle. Replace the field with the global // element for the replacement if (! currentParticle.getName().equals(name)) { if (((SchemaLocalElement)currentParticle).blockSubstitution()) { emitFieldError(event, "Element substitution not allowed when group head has block='substitution'", name); _eatContent = 1; return; } SchemaGlobalElement newField = _globalTypes.findElement(name); assert newField != null; if (newField != null) { elementField = newField; _localElement = newField; } } else { elementField = (SchemaField) currentParticle; } } elementType = elementField.getType(); } assert elementType != null; // // the no-type is always invalid (even if there is an xsi:type) // if (elementType.isNoType()) { emitFieldError(event, "Invalid type."); _eatContent = 1; } // // See if the element has an xsi:type on it // SchemaType xsiType = null; if (event.getXsiType( _chars )) { String value = _chars.asString(); // Turn off the listener so a public error message // does not get generated, but I can see if there was // an error through the error state int originalErrorState = _errorState; _suspendErrors++; try { _vc._event = null; xsiType = _globalTypes.findType( XmlQNameImpl.validateLexical( value, _vc, event ) ); } catch ( Throwable t ) { _errorState++; } finally { _suspendErrors--; } if (originalErrorState != _errorState) { emitFieldError( event, "Invalid xsi:type qname: '" + value + "'" ); _eatContent = 1; return; } else if (xsiType == null) { emitError(event, "Could not find xsi:type: '" + value + "'"); _eatContent = 1; return; } } if (xsiType != null && !xsiType.equals(elementType)) { if (!elementType.isAssignableFrom(xsiType)) { emitFieldError( event, "Type '" + xsiType + "' is not derived from '" + elementType + "'" ); _eatContent = 1; return; } if (elementType.blockExtension()) { for ( SchemaType t = xsiType ; ! t.equals( elementType ) ; t = t.getBaseType() ) { if (t.getDerivationType() == SchemaType.DT_EXTENSION) { emitFieldError( event, "Extension type: '" + xsiType + "' may not be substituted for: '" + elementType + "'" ); _eatContent = 1; return; } } } if (elementType.blockRestriction()) { for ( SchemaType t = xsiType ; ! t.equals( elementType ) ; t = t.getBaseType() ) { if (t.getDerivationType() == SchemaType.DT_RESTRICTION) { emitFieldError( event, "Restriction type: '" + xsiType + "' may not be substituted for: '" + elementType + "'" ); _eatContent = 1; return; } } } if (elementField instanceof SchemaLocalElement) { SchemaLocalElement sle = (SchemaLocalElement)elementField; _localElement = sle; if (sle.blockExtension() || sle.blockRestriction()) { for ( SchemaType t = xsiType ; ! t.equals( elementType ) ; t = t.getBaseType() ) { if ((t.getDerivationType() == SchemaType.DT_RESTRICTION && sle.blockRestriction()) || (t.getDerivationType() == SchemaType.DT_EXTENSION && sle.blockExtension())) { emitError( event, "Derived type: '" + xsiType + "' may not be substituted for element '" + QNameHelper.pretty(sle.getName()) + "'" ); _eatContent = 1; return; } } } } elementType = xsiType; } if (elementField instanceof SchemaLocalElement) { SchemaLocalElement sle = (SchemaLocalElement)elementField; _localElement = sle; if (sle.isAbstract()) { emitError(event, "Element '" + QNameHelper.pretty(sle.getName()) + "' is abstract and cannot be used in an instance."); _eatContent = 1; return; } } if (elementType != null && elementType.isAbstract()) { emitFieldError( event, "Abstract type: " + elementType + " cannot be used in an instance" ); _eatContent = 1; return; } boolean isNil = false; boolean hasNil = false; if (event.getXsiNil(_chars)) { _vc._event = event; isNil = JavaBooleanHolder.validateLexical(_chars.asString(), _vc); hasNil = true; } // note in schema spec 3.3.4, you're not even allowed to say xsi:nil="false" if you're not nillable! if (hasNil && !elementField.isNillable()) { emitFieldError(event, "Element has xsi:nil attribute but is not nillable"); _eatContent = 1; return; } newState( elementType, elementField, isNil ); // Dispatch this element event to any identity constraints // As well as adding any new identity constraints that exist _constraintEngine.element( event, elementType, elementField instanceof SchemaLocalElement ? ((SchemaLocalElement) elementField).getIdentityConstraints() : null ); } | 3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/8568ce90c7155a69e5ca74b06e01a75578b0a7f7/Validator.java/clean/v2/src/typeimpl/org/apache/xmlbeans/impl/validator/Validator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2376,
1133,
261,
2587,
871,
262,
565,
288,
3639,
389,
3729,
1046,
273,
446,
31,
3639,
389,
22887,
1046,
273,
446,
31,
3639,
514,
883,
273,
446,
31,
3639,
3287,
919,
273,
1760... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2376,
1133,
261,
2587,
871,
262,
565,
288,
3639,
389,
3729,
1046,
273,
446,
31,
3639,
389,
22887,
1046,
273,
446,
31,
3639,
514,
883,
273,
446,
31,
3639,
3287,
919,
273,
1760... |
protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + rowHeight) return descent; | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; | protected int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + rowHeight) return descent; int halfHeight = rowHeight / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += rowHeight; } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += rowHeight; y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(hashColor); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth+1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(hashColor); g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/363fe84fd732aa8ca3562fb0734fe48ee20c2c65/BasicTreeUI.java/clean/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
509,
12574,
10483,
12,
17558,
314,
16,
27573,
509,
12018,
16,
1171,
9079,
509,
3044,
319,
16,
1171,
9079,
509,
1151,
1854,
16,
1171,
9079,
509,
3598,
16,
1171,
9079,
804,
2471,
2151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
12574,
10483,
12,
17558,
314,
16,
27573,
509,
12018,
16,
1171,
9079,
509,
3044,
319,
16,
1171,
9079,
509,
1151,
1854,
16,
1171,
9079,
509,
3598,
16,
1171,
9079,
804,
2471,
2151... |
if (changeListeners == listener) { changeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (changeListeners instanceof Collection) { Collection listenerList = (Collection) changeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { changeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } } | changeSupport.removeChangeListener(listener); | public synchronized void removeChangeListener(IChangeListener listener) { if (changeListeners == listener) { changeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } return; } if (changeListeners instanceof Collection) { Collection listenerList = (Collection) changeListeners; listenerList.remove(listener); if (listenerList.isEmpty()) { changeListeners = null; if (!hasListeners()) { lastListenerRemoved(); } } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6aecdb31231a8602dbf72944625703c440949c78/AbstractObservableList.java/clean/bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/list/AbstractObservableList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1206,
15744,
12,
45,
15744,
2991,
13,
288,
202,
202,
430,
261,
3427,
5583,
422,
2991,
13,
288,
1082,
202,
3427,
5583,
273,
446,
31,
1082,
202,
430,
16051,
5332,
558... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
1206,
15744,
12,
45,
15744,
2991,
13,
288,
202,
202,
430,
261,
3427,
5583,
422,
2991,
13,
288,
1082,
202,
3427,
5583,
273,
446,
31,
1082,
202,
430,
16051,
5332,
558... |
int LA15_461 = input.LA(1); if ( LA15_461=='s' ) {return s470;} | int LA15_90 = input.LA(1); if ( LA15_90=='t' ) {return s199;} | public DFA.State transition(IntStream input) throws RecognitionException { int LA15_461 = input.LA(1); if ( LA15_461=='s' ) {return s470;} return s51; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
509,
2928,
3600,
67,
8749,
21,
273,
810,
18,
2534,
12,
21,
1769,
7734,
309,
261,
2928,
3600,
67,
8749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
509,
2928,
3600,
67,
8749,
21,
273,
810,
18,
2534,
12,
21,
1769,
7734,
309,
261,
2928,
3600,
67,
8749,
... |
public static void fillDataset(Dataset dataset, DatasetData empty) { //Fill in the data coming from Project. empty.setID(dataset.getID()); empty.setName(dataset.getName()); empty.setDescription(dataset.getDescription()); //Fill in the data coming from Experimenter. Experimenter owner = dataset.getOwner(); empty.setOwnerID(owner.getID()); empty.setOwnerFirstName(owner.getFirstName()); empty.setOwnerLastName(owner.getLastName()); empty.setOwnerEmail(owner.getEmail()); empty.setOwnerInstitution(owner.getInstitution()); //Fill in the data coming from Group. Group group = owner.getGroup(); empty.setOwnerGroupID(group.getID()); empty.setOwnerGroupName(group.getName()); //Create the image summary list. List images = new ArrayList(); Iterator i = dataset.getImages().iterator(); Image img; while (i.hasNext()) { img = (Image) i.next(); images.add(new ImageSummary(img.getID(), img.getName(), fillListPixelsID(img), fillDefaultPixels(img.getDefaultPixels()))); } empty.setImages(images); } | 55636 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55636/a43ad78503af4e7f39a04cb20cfba13e1c78b806/DatasetMapper.java/clean/SRC/org/openmicroscopy/shoola/env/data/map/DatasetMapper.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
3636,
10656,
12,
10656,
3709,
16,
10778,
751,
1008,
13,
202,
95,
9506,
202,
759,
8026,
316,
326,
501,
19283,
628,
5420,
18,
202,
202,
5531,
18,
542,
734,
12,
8682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3636,
10656,
12,
10656,
3709,
16,
10778,
751,
1008,
13,
202,
95,
9506,
202,
759,
8026,
316,
326,
501,
19283,
628,
5420,
18,
202,
202,
5531,
18,
542,
734,
12,
8682,
... | ||
if (child instanceof org.ensembl.mart.lib.config.FilterDescription) { FilterCollection fc = (FilterCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fc.insertFilterDescription(index,(FilterDescription) obj); } | if (child instanceof org.ensembl.mart.lib.config.FilterDescription) { FilterCollection fc = (FilterCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fc.insertFilterDescription(index, (FilterDescription) obj); } | public void setValueAt(Object aValue, int rowIndex, int columnIndex) { //Sets the value in the cell at columnIndex and rowIndex to aValue. Object child = node.getUserObject(); Object parent = ((DatasetViewTreeNode) node.getParent()).getUserObject(); int index = node.getParent().getIndex(node); if (columnIndex == 1) { if (parent instanceof org.ensembl.mart.lib.config.DatasetView) { if (child instanceof org.ensembl.mart.lib.config.FilterPage) { DatasetView view = (DatasetView)((DatasetViewTreeNode) node.getParent()).getUserObject(); view.removeFilterPage((FilterPage) node.getUserObject()); } else if (child instanceof org.ensembl.mart.lib.config.AttributePage) { DatasetView view =(DatasetView)((DatasetViewTreeNode) node.getParent()).getUserObject(); view.removeAttributePage((AttributePage) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterPage) { if (child instanceof org.ensembl.mart.lib.config.FilterGroup) { FilterPage fp = (FilterPage) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fp.removeFilterGroup((FilterGroup) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterGroup) { if (child instanceof org.ensembl.mart.lib.config.FilterCollection) { FilterGroup fg = (FilterGroup) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fg.removeFilterCollection((FilterCollection) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterCollection) { if (child instanceof org.ensembl.mart.lib.config.FilterDescription) { FilterCollection fc = (FilterCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fc.removeFilterDescription((FilterDescription) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributePage) { if (child instanceof org.ensembl.mart.lib.config.AttributeGroup) { AttributePage ap = (AttributePage) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ap.removeAttributeGroup((AttributeGroup) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributeGroup) { if (child instanceof org.ensembl.mart.lib.config.AttributeCollection) { AttributeGroup ag = (AttributeGroup) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ag.removeAttributeCollection((AttributeCollection) node.getUserObject()); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributeCollection) { if (child instanceof org.ensembl.mart.lib.config.AttributeDescription) { AttributeCollection ac = (AttributeCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ac.removeAttributeDescription((AttributeDescription) node.getUserObject()); } } switch (rowIndex) { case 0: { obj.setDescription((String) aValue); break; } case 1: { obj.setDisplayName((String) aValue); break; } case 2: { obj.setInternalName((String) aValue); break; } case 3: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setType((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setField((String) aValue); break; } case 4: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setField((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setTableConstraint((String) aValue); break; } case 5: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setQualifier((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setMaxLength((new Integer((String) aValue)).intValue()); break; } case 6: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setLegalQualifiers((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setSource((String) aValue); break; } case 7: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setTableConstraint((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setHomepageURL((String) aValue); break; } case 8: { if (objClass.equals("org.ensembl.mart.lib.config.FilterDescription")) ((FilterDescription) obj).setHandler((String) aValue); else if (objClass.equals("org.ensembl.mart.lib.config.AttributeDescription")) ((AttributeDescription) obj).setLinkoutURL((String) aValue); break; } } if (parent instanceof org.ensembl.mart.lib.config.DatasetView) { if (child instanceof org.ensembl.mart.lib.config.FilterPage) { DatasetView view = (DatasetView)((DatasetViewTreeNode) node.getParent()).getUserObject(); view.insertFilterPage(index,(FilterPage) obj); } else if (child instanceof org.ensembl.mart.lib.config.AttributePage) { DatasetView view =(DatasetView)((DatasetViewTreeNode) node.getParent()).getUserObject(); view.insertAttributePage(index-view.getFilterPages().length,(AttributePage) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterPage) { if (child instanceof org.ensembl.mart.lib.config.FilterGroup) { FilterPage fp = (FilterPage) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fp.insertFilterGroup(index,(FilterGroup) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterGroup) { if (child instanceof org.ensembl.mart.lib.config.FilterCollection) { FilterGroup fg = (FilterGroup) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fg.insertFilterCollection(index,(FilterCollection) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.FilterCollection) { if (child instanceof org.ensembl.mart.lib.config.FilterDescription) { FilterCollection fc = (FilterCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); fc.insertFilterDescription(index,(FilterDescription) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributePage) { if (child instanceof org.ensembl.mart.lib.config.AttributeGroup) { AttributePage ap = (AttributePage) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ap.insertAttributeGroup(index,(AttributeGroup) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributeGroup) { if (child instanceof org.ensembl.mart.lib.config.AttributeCollection) { AttributeGroup ag = (AttributeGroup) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ag.insertAttributeCollection(index,(AttributeCollection) obj); } } else if (parent instanceof org.ensembl.mart.lib.config.AttributeCollection) { if (child instanceof org.ensembl.mart.lib.config.AttributeDescription) { AttributeCollection ac = (AttributeCollection) ((DatasetViewTreeNode) node.getParent()).getUserObject(); ac.insertAttributeDescription(index,(AttributeDescription) obj); } } node.setUserObject(obj); TableModelEvent tme = new TableModelEvent(this, rowIndex); fireEvent(tme); } } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/2cc2e1067518b9d5159038844f74db28f8baadf2/DatasetViewAttributeTableModel.java/clean/src/java/org/ensembl/mart/vieweditor/DatasetViewAttributeTableModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5524,
861,
12,
921,
24406,
16,
509,
15361,
16,
509,
14882,
13,
288,
3639,
368,
2785,
326,
460,
316,
326,
2484,
622,
14882,
471,
15361,
358,
24406,
18,
3639,
1033,
1151,
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,
5524,
861,
12,
921,
24406,
16,
509,
15361,
16,
509,
14882,
13,
288,
3639,
368,
2785,
326,
460,
316,
326,
2484,
622,
14882,
471,
15361,
358,
24406,
18,
3639,
1033,
1151,
273,
... |
} final XFormsInstance currentInstance = xformsControls.getInstanceForNode((Node) currentNodeset.get(0)); | public void runAction(final PipelineContext pipelineContext, String targetId, XFormsEventHandlerContainer eventHandlerContainer, Element actionElement, ActionContext actionContext) { // Check that we understand the action element final String actionNamespaceURI = actionElement.getNamespaceURI(); if (!XFormsConstants.XFORMS_NAMESPACE_URI.equals(actionNamespaceURI)) { throw new OXFException("Invalid action namespace: " + actionNamespaceURI); } // Set binding context setBindingContext(pipelineContext, containingDocument, eventHandlerContainer.getId(), actionElement); final String actionEventName = actionElement.getName(); // Handle conditional action final String ifAttribute = actionElement.attributeValue("if"); if (ifAttribute != null) { final List conditionResult = xformsControls.getCurrentInstance().evaluateXPath(pipelineContext, xformsControls.getCurrentSingleNode(), "boolean(" + ifAttribute + ")", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); if (!((Boolean) conditionResult.get(0)).booleanValue()) { // Don't execute action if (XFormsServer.logger.isDebugEnabled()) XFormsServer.logger.debug("XForms - not executing conditional action: " + actionEventName); return; } } // We are executing the action if (XFormsServer.logger.isDebugEnabled()) XFormsServer.logger.debug("XForms - executing action: " + actionEventName); if (XFormsActions.XFORMS_SETVALUE_ACTION.equals(actionEventName)) { // 10.1.9 The setvalue Element // xforms:setvalue final String value = actionElement.attributeValue("value"); final String content = actionElement.getStringValue(); final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final String valueToSet; if (value != null) { // Value to set is computed with an XPath expression final Map namespaceContext = Dom4jUtils.getNamespaceContextNoDefault(actionElement); final List currentNodeset = (xformsControls.getCurrentNodeset() != null && xformsControls.getCurrentNodeset().size() > 0) ? xformsControls.getCurrentNodeset() : Collections.singletonList(currentInstance.getInstanceDocument()); // NOTE: The above is actually not correct: the context should not become null or empty. This is // therefore just a workaround for a bug we hit: // o Do 2 setvalue in sequence // o The first one changes the context around the control containing the actions // o When the second one runs, context is empty, and setvalue either crashes or does nothing // // The correct solution is probably to NOT reevaluate the context of actions unless a rebuild is done. // This would require an update to the way we impelement the processing model. valueToSet = currentInstance.evaluateXPathAsString(pipelineContext, currentNodeset, xformsControls.getCurrentPosition(), value, namespaceContext, null, xformsControls.getFunctionLibrary(), null); } else { // Value to set is static content valueToSet = content; } // Set value on current node final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode != null) { // Node exists, we can set the value XFormsInstance.setValueForNode(pipelineContext, currentNode, valueToSet, null); if (actionContext != null) { // "XForms Actions that change only the value of an instance node results in setting // the flags for recalculate, revalidate, and refresh to true and making no change to // the flag for rebuild". actionContext.recalculate = true; actionContext.revalidate = true; actionContext.refresh = true; } else { // Send events directly final XFormsModel model = xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } else { // Node doesn't exist, don't do anything // NOP } } else if (XFormsActions.XFORMS_RESET_ACTION.equals(actionEventName)) { // 10.1.11 The reset Element final String modelId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("model")); final Object modelObject = containingDocument.getObjectById(pipelineContext, modelId); if (modelObject instanceof XFormsModel) { final XFormsModel model = (XFormsModel) modelObject; containingDocument.dispatchEvent(pipelineContext, new XFormsResetEvent(model)); } else { throw new OXFException("xforms:reset model attribute must point to an xforms:model element."); } // "the reset action takes effect immediately and clears all of the flags." if (actionContext != null) actionContext.setAll(false); } else if (XFormsActions.XFORMS_ACTION_ACTION.equals(actionEventName)) { // 10.1.1 The action Element final ActionContext newActionContext = (actionContext == null) ? new ActionContext() : null; for (Iterator i = actionElement.elementIterator(); i.hasNext();) { final Element embeddedActionElement = (Element) i.next(); runAction(pipelineContext, targetId, eventHandlerContainer, embeddedActionElement, (newActionContext == null) ? actionContext : newActionContext ); } if (newActionContext != null) { // Binding context has to be reset as it may have been modified by sub-actions setBindingContext(pipelineContext, containingDocument, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Process deferred behavior if (newActionContext.rebuild) containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); if (newActionContext.recalculate) containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); if (newActionContext.revalidate) containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); if (newActionContext.refresh) containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } else if (XFormsActions.XFORMS_REBUILD_ACTION.equals(actionEventName)) { // 10.1.3 The rebuild Element final String modelId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("model")); final XFormsModel model = (modelId != null) ? containingDocument.getModel(modelId) : xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.rebuild = false; } else if (XFormsActions.XFORMS_RECALCULATE_ACTION.equals(actionEventName)) { // 10.1.4 The recalculate Element final String modelId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("model")); final XFormsModel model = (modelId != null) ? containingDocument.getModel(modelId) : xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.recalculate = false; } else if (XFormsActions.XFORMS_REVALIDATE_ACTION.equals(actionEventName)) { // 10.1.5 The revalidate Element final String modelId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("model")); final XFormsModel model = (modelId != null) ? containingDocument.getModel(modelId) : xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.revalidate = false; } else if (XFormsActions.XFORMS_REFRESH_ACTION.equals(actionEventName)) { // 10.1.6 The refresh Element final String modelId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("model")); final XFormsModel model = (modelId != null) ? containingDocument.getModel(modelId) : xformsControls.getCurrentModel(); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); // "Actions that directly invoke rebuild, recalculate, revalidate, or refresh always // have an immediate effect, and clear the corresponding flag." if (actionContext != null) actionContext.refresh = false; } else if (XFormsActions.XFORMS_TOGGLE_ACTION.equals(actionEventName)) { // 9.2.3 The toggle Element final String caseId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("case")); final String effectiveCaseId = xformsControls.findEffectiveCaseId(caseId); // Update xforms:switch info and dispatch events xformsControls.updateSwitchInfo(pipelineContext, effectiveCaseId); } else if (XFormsActions.XFORMS_INSERT_ACTION.equals(actionEventName)) { // 9.3.5 The insert Element final String atAttribute = actionElement.attributeValue("at"); final String positionAttribute = actionElement.attributeValue("position"); final String originAttribute = actionElement.attributeValue("origin"); final String contextAttribute = actionElement.attributeValue("context"); final List collectionToBeUpdated = xformsControls.getCurrentNodeset(); final boolean isEmptyNodesetBinding = collectionToBeUpdated == null || collectionToBeUpdated.size() == 0; // "The insert action is terminated with no effect if [...] the context attribute is not given and the Node // Set Binding node-set is empty." if (contextAttribute == null && isEmptyNodesetBinding) return; // Now that we have evaluated the nodeset, restore context to in-scope evaluation context xformsControls.popBinding(); // Handle @context attribute if (contextAttribute != null) { xformsControls.pushBinding(pipelineContext, null, null, contextAttribute, null, null, null, Dom4jUtils.getNamespaceContextNoDefault(actionElement)); } // We are now in the insert context // "The insert action is terminated with no effect if the insert context is the empty node-set [...]." if (xformsControls.getCurrentSingleNode() == null) return; { final Node sourceNode; final Node clonedNode; { if (originAttribute == null) { // "If the attribute is not given and the Node Set Binding node-set is empty, then the insert // action is terminated with no effect." if (isEmptyNodesetBinding) return; // "if this attribute is not given, then the last node of the Node Set Binding node-set is // cloned" sourceNode = (Node) collectionToBeUpdated.get(collectionToBeUpdated.size() - 1); clonedNode = (sourceNode instanceof Element) ? ((Node) ((Element) sourceNode).createCopy()) : (Node) sourceNode.clone(); } else { // "If the attribute is given, it is evaluated in the insert context using the first node rule. // If the result is a node, then it is cloned, and otherwise the insert action is terminated // with no effect." xformsControls.pushBinding(pipelineContext, null, null, originAttribute, null, null, null, Dom4jUtils.getNamespaceContextNoDefault(actionElement)); final Object originObject = xformsControls.getCurrentSingleNode(); if (!(originObject instanceof Node)) return; sourceNode = (Node) originObject; clonedNode = (sourceNode instanceof Element) ? ((Node) ((Element) sourceNode).createCopy()) : (Node) sourceNode.clone(); xformsControls.popBinding(); } if (clonedNode instanceof Element) XFormsUtils.setInitialDecoration((Element) clonedNode); else if (clonedNode instanceof Attribute) XFormsUtils.setInitialDecoration((Attribute) clonedNode); // TODO: we incorrectly don't handle instance data on text nodes and other nodes } // "Finally, this newly created node is inserted into the instance data at the location // specified by attributes position and at." final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); int insertionIndex; { if (isEmptyNodesetBinding) { // "If the Node Set Binding node-set empty, then this attribute is ignored" insertionIndex = 0; } else if (atAttribute == null) { // "If the attribute is not given, then the default is the size of the Node Set Binding node-set" insertionIndex = collectionToBeUpdated.size(); } else { // "1. The evaluation context node is the first node in document order from the Node Set Binding // node-set, the context size is the size of the Node Set Binding node-set, and the context // position is 1." // "2. The return value is processed according to the rules of the XPath function round()" final String insertionIndexString = currentInstance.evaluateXPathAsString(pipelineContext, collectionToBeUpdated, 1, "round(" + atAttribute + ")", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); // "3. If the result is in the range 1 to the Node Set Binding node-set size, then the insert // location is equal to the result. If the result is non-positive, then the insert location is // 1. Otherwise, the result is NaN or exceeds the Node Set Binding node-set size, so the insert // location is the Node Set Binding node-set size." // Don't think we will get NaN with XPath 2.0... insertionIndex = "NaN".equals(insertionIndexString) ? collectionToBeUpdated.size() : Integer.parseInt(insertionIndexString) ; // Adjust index to be in range if (insertionIndex > collectionToBeUpdated.size()) insertionIndex = collectionToBeUpdated.size(); if (insertionIndex < 1) insertionIndex = 1; } } // Prepare switches XFormsSwitchUtils.prepareSwitches(pipelineContext, xformsControls, sourceNode, clonedNode); // Find actual insertion point and insert if (isEmptyNodesetBinding) { // "1. If the Node Set Binding node-set is empty, then the target location is before the first // child or attribute of the insert context node, based on the node type of the cloned node." final Node insertContextNode = xformsControls.getCurrentSingleNode(); doInsert(insertContextNode, clonedNode); } else { final Node insertLocationNode = (Node) collectionToBeUpdated.get(insertionIndex - 1); if (insertLocationNode.getClass() != clonedNode.getClass()) { // "2. If the node type of the cloned node does not match the node type of the insert location // node, then the target location is before the first child or attribute of the insert location // node, based on the node type of the cloned node." doInsert(insertLocationNode, clonedNode); } else { if (insertLocationNode.getDocument().getRootElement() == insertLocationNode) { // "3. If the Node Set Binding node-set and insert location indicate the root element of an // instance, then that instance root element location is the target location." doInsert(insertLocationNode.getDocument(), clonedNode); } else { // "4. Otherwise, the target location is immediately before or after the insert location // node, based on the position attribute setting or its default." final Element parentNode = insertLocationNode.getParent(); final List siblingElements = parentNode.content(); final int actualIndex = siblingElements.indexOf(insertLocationNode); // Prepare insertion of new element final int actualInsertionIndex; if (positionAttribute == null || "after".equals(positionAttribute)) { // "after" is the default actualInsertionIndex = actualIndex + 1; } else if ("before".equals(positionAttribute)) { actualInsertionIndex = actualIndex; } else { throw new OXFException("Invalid 'position' attribute: " + positionAttribute + ". Must be either 'before' or 'after'."); } // "3. The index for any repeating sequence that is bound to the homogeneous // collection where the node was added is updated to point to the newly added node. // The indexes for inner nested repeat collections are re-initialized to // startindex." // Perform the insertion siblingElements.add(actualInsertionIndex, clonedNode); } } } // Rebuild ControlsState xformsControls.rebuildCurrentControlsState(pipelineContext); final XFormsControls.ControlsState currentControlsState = xformsControls.getCurrentControlsState(); // Update repeat indexes XFormsIndexUtils.ajustIndexesAfterInsert(pipelineContext, xformsControls, currentControlsState, clonedNode); // Update switches XFormsSwitchUtils.updateSwitches(pipelineContext, xformsControls); // "4. If the insert is successful, the event xforms-insert is dispatched." containingDocument.dispatchEvent(pipelineContext, new XFormsInsertEvent(currentInstance, atAttribute)); if (actionContext != null) { // "XForms Actions that change the tree structure of instance data result in setting all four flags to true" actionContext.setAll(true); } else { // Binding context has to be reset as the controls have been updated setBindingContext(pipelineContext, containingDocument, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Send events directly containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } } else if (XFormsActions.XFORMS_DELETE_ACTION.equals(actionEventName)) { // 9.3.6 The delete Element final String atAttribute = actionElement.attributeValue("at"); final String contextAttribute = actionElement.attributeValue("context"); final List collectionToUpdate = xformsControls.getCurrentNodeset(); final boolean isEmptyNodesetBinding = collectionToUpdate == null || collectionToUpdate.size() == 0; // "The delete action is terminated with no effect if [...] the context attribute is not given and the Node // Set Binding node-set is empty." if (contextAttribute == null && isEmptyNodesetBinding) return; // Now that we have evaluated the nodeset, restore context to in-scope evaluation context xformsControls.popBinding(); // Handle @context attribute if (contextAttribute != null) { xformsControls.pushBinding(pipelineContext, null, null, contextAttribute, null, null, null, Dom4jUtils.getNamespaceContextNoDefault(actionElement)); } // We are now in the insert context // "The delete action is terminated with no effect if the insert context is the empty node-set [...]." if (xformsControls.getCurrentSingleNode() == null) return; { final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final Node nodeToRemove; final List parentContent; final int actualIndexInParentContentCollection; { int deleteIndex; { if (isEmptyNodesetBinding) { // "If the Node Set Binding node-set empty, then this attribute is ignored" deleteIndex = 0; } else if (atAttribute == null) { // "If the attribute is not given, then the default is the size of the Node Set Binding node-set" deleteIndex = collectionToUpdate.size(); } else { // "1. The evaluation context node is the first node in document order from the Node Set Binding // node-set, the context size is the size of the Node Set Binding node-set, and the context // position is 1." // "2. The return value is processed according to the rules of the XPath function round()" final String insertionIndexString = currentInstance.evaluateXPathAsString(pipelineContext, collectionToUpdate, 1, "round(" + atAttribute + ")", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); // "3. If the result is in the range 1 to the Node Set Binding node-set size, then the insert // location is equal to the result. If the result is non-positive, then the insert location is // 1. Otherwise, the result is NaN or exceeds the Node Set Binding node-set size, so the insert // location is the Node Set Binding node-set size." // Don't think we will get NaN with XPath 2.0... deleteIndex = "NaN".equals(insertionIndexString) ? collectionToUpdate.size() : Integer.parseInt(insertionIndexString) ; // Adjust index to be in range if (deleteIndex > collectionToUpdate.size()) deleteIndex = collectionToUpdate.size(); if (deleteIndex < 1) deleteIndex = 1; } } if (isEmptyNodesetBinding) { // TODO: not specified by spec return; } else { // Find actual deletion point nodeToRemove = (Node) collectionToUpdate.get(deleteIndex - 1); final Element parentElement = nodeToRemove.getParent(); if (parentElement != null) { // Regular case if (nodeToRemove instanceof Attribute) { parentContent = parentElement.attributes(); } else { parentContent = parentElement.content(); } actualIndexInParentContentCollection = parentContent.indexOf(nodeToRemove); } else if (nodeToRemove == nodeToRemove.getDocument().getRootElement()) { // Case of root element where parent is Document parentContent = nodeToRemove.getDocument().content(); actualIndexInParentContentCollection = parentContent.indexOf(nodeToRemove); } else if (nodeToRemove instanceof Document) { // Case where node to remove is Document // "except if the node is the root document element of an instance then the delete action // is terminated with no effect." return; } else { throw new OXFException("Node to delete doesn't have a parent."); } } } // Get current repeat indexes final Map previousRepeatIdToIndex = xformsControls.getCurrentControlsState().getRepeatIdToIndex(); // Find updates to repeat indexes final Map repeatIndexUpdates = new HashMap(); final Map nestedRepeatIndexUpdates = new HashMap(); XFormsIndexUtils.adjustIndexesForDelete(pipelineContext, xformsControls, previousRepeatIdToIndex, repeatIndexUpdates, nestedRepeatIndexUpdates, nodeToRemove); // Prepare switches XFormsSwitchUtils.prepareSwitches(pipelineContext, xformsControls); // Then only perform the deletion // "The node at the delete location in the Node Set Binding node-set is deleted" parentContent.remove(actualIndexInParentContentCollection); // Rebuild ControlsState xformsControls.rebuildCurrentControlsState(pipelineContext); // Update switches XFormsSwitchUtils.updateSwitches(pipelineContext, xformsControls); // Update affected repeat index information if (repeatIndexUpdates.size() > 0) { for (Iterator i = repeatIndexUpdates.entrySet().iterator(); i.hasNext();) { final Map.Entry currentEntry = (Map.Entry) i.next(); xformsControls.getCurrentControlsState().updateRepeatIndex((String) currentEntry.getKey(), ((Integer) currentEntry.getValue()).intValue()); } } // Adjust indexes that could have gone out of bounds adjustRepeatIndexes(pipelineContext, xformsControls, nestedRepeatIndexUpdates); // "4. If the delete is successful, the event xforms-delete is dispatched." containingDocument.dispatchEvent(pipelineContext, new XFormsDeleteEvent(currentInstance, atAttribute)); if (actionContext != null) { // "XForms Actions that change the tree structure of instance data result in setting all four flags to true" actionContext.setAll(true); } else { // Binding context has to be reset as the controls have been updated setBindingContext(pipelineContext, containingDocument, eventHandlerContainer.getId(), actionElement); final XFormsModel model = xformsControls.getCurrentModel(); // Send events directly containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(model)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(model, true)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(model)); } } } else if (XFormsActions.XFORMS_SETINDEX_ACTION.equals(actionEventName)) { // 9.3.7 The setindex Element final String repeatId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("repeat")); final String indexXPath = actionElement.attributeValue("index"); final XFormsInstance currentInstance = xformsControls.getCurrentInstance(); final String indexString = currentInstance.evaluateXPathAsString(pipelineContext, xformsControls.getCurrentNodeset(), xformsControls.getCurrentPosition(), "string(number(" + indexXPath + "))", Dom4jUtils.getNamespaceContextNoDefault(actionElement), null, xformsControls.getFunctionLibrary(), null); executeSetindexAction(pipelineContext, containingDocument, repeatId, indexString); } else if (XFormsActions.XFORMS_SEND_ACTION.equals(actionEventName)) { // 10.1.10 The send Element // Find submission object final String submissionId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("submission")); if (submissionId == null) throw new OXFException("Missing mandatory submission attribute on xforms:send element."); final Object submission = containingDocument.getObjectById(pipelineContext, submissionId); if (submission == null || !(submission instanceof XFormsModelSubmission)) throw new OXFException("Submission attribute on xforms:send element does not refer to existing xforms:submission element: " + submissionId); // Dispatch event to submission object containingDocument.dispatchEvent(pipelineContext, new XFormsSubmitEvent((XFormsEventTarget) submission)); } else if (XFormsActions.XFORMS_DISPATCH_ACTION.equals(actionEventName)) { // 10.1.2 The dispatch Element // Mandatory attributes final String newEventName = actionElement.attributeValue("name"); if (newEventName == null) throw new OXFException("Missing mandatory name attribute on xforms:dispatch element."); final String newEventTargetId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("target")); if (newEventTargetId == null) throw new OXFException("Missing mandatory target attribute on xforms:dispatch element."); // Optional attributes final boolean newEventBubbles; { final String newEventBubblesString = actionElement.attributeValue("bubbles"); // "The default value depends on the definition of a custom event. For predefined events, this attribute has no effect." // The event factory makes sure that those values are ignored for predefined events newEventBubbles = Boolean.valueOf((newEventBubblesString == null) ? "true" : newEventBubblesString).booleanValue(); } final boolean newEventCancelable; { // "The default value depends on the definition of a custom event. For predefined events, this attribute has no effect." // The event factory makes sure that those values are ignored for predefined events final String newEventCancelableString = actionElement.attributeValue("cancelable"); newEventCancelable = Boolean.valueOf((newEventCancelableString == null) ? "true" : newEventCancelableString).booleanValue(); } // Find actual target final Object xformsEventTarget; { final Object tempXFormsEventTarget = (XFormsEventTarget) containingDocument.getObjectById(pipelineContext, newEventTargetId); if (tempXFormsEventTarget != null) { // Object with this id exists xformsEventTarget = tempXFormsEventTarget; } else { // Otherwise, try effective id final String newEventTargetEffectiveId = xformsControls.getCurrentControlsState().findEffectiveControlId(newEventTargetId); xformsEventTarget = (XFormsEventTarget) containingDocument.getObjectById(pipelineContext, newEventTargetEffectiveId); } } if (xformsEventTarget == null) throw new OXFException("Could not find actual event target on xforms:dispatch element for id: " + newEventTargetId); if (xformsEventTarget instanceof XFormsEventTarget) { // This can be anything containingDocument.dispatchEvent(pipelineContext, XFormsEventFactory.createEvent(newEventName, (XFormsEventTarget) xformsEventTarget, newEventBubbles, newEventCancelable)); } else { throw new OXFException("Invalid event target for id: " + newEventTargetId); } } else if (XFormsActions.XFORMS_MESSAGE_ACTION.equals(actionEventName)) { // 10.1.12 The message Element final String level; { final String levelAttribute = actionElement.attributeValue("level");; if (levelAttribute == null) throw new OXFException("xforms:message element is missing mandatory 'level' attribute."); final QName levelQName = Dom4jUtils.extractAttributeValueQName(actionElement, "level"); if (levelQName.getNamespacePrefix().equals("")) { if (!("ephemeral".equals(levelAttribute) || "modeless".equals(levelAttribute) || "modal".equals(levelAttribute))) { throw new OXFException("xforms:message element's 'level' attribute must have value: 'ephemeral'|'modeless'|'modal'|QName-but-not-NCName."); } level = levelAttribute; } else { level = "{" + levelQName.getNamespaceURI() + "}" + levelQName.getName(); } } final String src = actionElement.attributeValue("src"); final String ref = actionElement.attributeValue("ref"); String message = null; // Try to get message from single-node binding if any if (ref != null) { final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode != null) message = XFormsInstance.getValueForNode(currentNode); } // Try to get message from linking attribute boolean linkException = false; if (message == null && src != null) { try { message = XFormsUtils.retrieveSrcValue(src); } catch (IOException e) { containingDocument.dispatchEvent(pipelineContext, new XFormsLinkErrorEvent(xformsControls.getCurrentModel(), src, null, e)); linkException = true; } } if (!linkException) { // Try to get inline message if (message == null) { message = actionElement.getStringValue(); } if (message != null) { // Store message for sending to client containingDocument.addClientMessage(message, level); // NOTE: In the future, we *may* want to save and resume the event state before and // after displaying a message, in order to possibly provide a behavior which is more // consistent with what users may expect regarding actions executed after // xforms:message. } } } else if (XFormsActions.XFORMS_SETFOCUS_ACTION.equals(actionEventName)) { // 10.1.7 The setfocus Element final String controlId = XFormsUtils.namespaceId(containingDocument, actionElement.attributeValue("control")); if (controlId == null) throw new OXFException("Missing mandatory 'control' attribute on xforms:control element."); final String effectiveControlId = xformsControls.getCurrentControlsState().findEffectiveControlId(controlId); if (effectiveControlId == null) throw new OXFException("Could not find actual control on xforms:setfocus element for control: " + controlId); final Object controlObject = containingDocument.getObjectById(pipelineContext, effectiveControlId); if (!(controlObject instanceof ControlInfo)) throw new OXFException("xforms:setfocus attribute 'control' must refer to a control: " + controlId); containingDocument.dispatchEvent(pipelineContext, new XFormsFocusEvent((XFormsEventTarget) controlObject)); } else if (XFormsActions.XFORMS_LOAD_ACTION.equals(actionEventName)) { // 10.1.8 The load Element final String ref = actionElement.attributeValue("ref"); final String resource = actionElement.attributeValue("resource"); final String showAttribute; { final String rawShowAttribute = actionElement.attributeValue("show"); showAttribute = (rawShowAttribute == null) ? "replace" : rawShowAttribute; if (!("replace".equals(showAttribute) || "new".equals(showAttribute))) throw new OXFException("Invalid value for 'show' attribute on xforms:load element: " + showAttribute); } final boolean doReplace = "replace".equals(showAttribute); final String target = actionElement.attributeValue(XFormsConstants.XXFORMS_TARGET_QNAME); final String urlType = actionElement.attributeValue(new QName("url-type", new Namespace("f", XMLConstants.OPS_FORMATTING_URI))); // "If both are present, the action has no effect." if (ref != null && resource != null) return; if (ref != null) { // Use single-node binding final Node currentNode = xformsControls.getCurrentSingleNode(); if (currentNode != null) { final String value = XFormsInstance.getValueForNode(currentNode); resolveLoadValue(containingDocument, pipelineContext, actionElement, doReplace, value, target, urlType); } else { // The action is a NOP if it's not bound to a node return; } // NOTE: We are supposed to throw an xforms-link-error in case of failure. Can we do it? } else if (resource != null) { // Use linking attribute resolveLoadValue(containingDocument, pipelineContext, actionElement, doReplace, resource, target, urlType); // NOTE: We are supposed to throw an xforms-link-error in case of failure. Can we do it? } else { // "Either the single node binding attributes, pointing to a URI in the instance // data, or the linking attributes are required." throw new OXFException("Missing 'resource' or 'ref' attribute on xforms:load element."); } } else { throw new OXFException("Invalid action requested: " + actionEventName); } } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/9cb4fcbce0dc6372f999ceeb6c88da178046f63a/XFormsActionInterpreter.java/buggy/src/java/org/orbeon/oxf/xforms/action/XFormsActionInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
514,
27729,
16,
1139,
18529,
16402,
2170,
30441,
2170,
16,
3010,
1301,
1046,
16,
4382,
1042,
1301,
1042,
13,
288,
3639,
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,
1086,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
514,
27729,
16,
1139,
18529,
16402,
2170,
30441,
2170,
16,
3010,
1301,
1046,
16,
4382,
1042,
1301,
1042,
13,
288,
3639,
368,
... | |
private static boolean isInWhileStatementBody(PsiElement element) { | private static boolean isInWhileStatementBody(PsiElement element){ | private static boolean isInWhileStatementBody(PsiElement element) { final PsiWhileStatement whileStatement = (PsiWhileStatement) PsiTreeUtil.getParentOfType(element, PsiWhileStatement.class); if (whileStatement == null) { return false; } final PsiStatement body = whileStatement.getBody(); return PsiTreeUtil.isAncestor(body, element, true); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ControlFlowUtils.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/ControlFlowUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
8048,
15151,
3406,
2250,
12,
52,
7722,
1046,
930,
15329,
3639,
727,
453,
7722,
15151,
3406,
1323,
3406,
273,
7734,
261,
52,
7722,
15151,
3406,
13,
453,
7722,
2471,
1304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
760,
1250,
8048,
15151,
3406,
2250,
12,
52,
7722,
1046,
930,
15329,
3639,
727,
453,
7722,
15151,
3406,
1323,
3406,
273,
7734,
261,
52,
7722,
15151,
3406,
13,
453,
7722,
2471,
1304,
... |
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) | protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) | protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR) { return SwingUtilities.layoutCompoundLabel(label, fontMetrics, text, icon, label.getVerticalAlignment(), label.getHorizontalAlignment(), label.getVerticalTextPosition(), label.getHorizontalTextPosition(), viewR, iconR, textR, label.getIconTextGap()); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/9edd3bd19d218779c5ed8c8c7658d27ae3e0889b/BasicLabelUI.java/clean/javax/swing/plaf/basic/BasicLabelUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
3511,
5017,
12,
46,
2224,
1433,
16,
10063,
5653,
3512,
5653,
16,
18701,
514,
977,
16,
16011,
4126,
16,
13264,
1476,
54,
16,
18701,
13264,
4126,
54,
16,
13264,
977,
54,
13,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
3511,
5017,
12,
46,
2224,
1433,
16,
10063,
5653,
3512,
5653,
16,
18701,
514,
977,
16,
16011,
4126,
16,
13264,
1476,
54,
16,
18701,
13264,
4126,
54,
16,
13264,
977,
54,
13,
22... |
result.append(":</td>\n"); result.append(" <td ><b>"); result.append(" <a name=\"ok\" target=\"_self\" class=\"dialogerror\" href=\""); result.append(getJsp().link("/system/workplace/admin/workplace/logfileview/downloadTrigger.jsp?filePath=")).append( m_downloadFile.getAbsolutePath().replace('\\', '/')).append("\">"); | result.append(":</td>\r\n"); result.append(" <td >"); | public String buildDownloadFileView() { StringBuffer result = new StringBuffer(512); result.append(dialogBlock(HTML_START, Messages.get().key( getLocale(), Messages.GUI_WORKPLACE_LOGVIEW_DOWNLOAD_START_MSG_0, null), false)); result.append("\r\n"); result.append("<!-- start buildDownloadFileView -->\r\n"); result.append("<table border=\"0\" style=\"padding:10px;\"}>\r\n"); result.append(" <tr>\r\n"); result.append(" <td>"); result.append(Messages.get().key(Messages.GUI_WORKPLACE_LOGVIEW_DOWNLOAD_START_FNAME_0)); result.append(":</td>\n"); result.append(" <td ><b>"); result.append(" <a name=\"ok\" target=\"_self\" class=\"dialogerror\" href=\""); result.append(getJsp().link("/system/workplace/admin/workplace/logfileview/downloadTrigger.jsp?filePath=")).append( m_downloadFile.getAbsolutePath().replace('\\', '/')).append("\">"); result.append(" ").append(m_downloadFile.getName()); result.append(" </a>\r\n"); result.append("</b></td>\r\n"); result.append(" </tr>\r\n"); result.append(" <tr>\r\n"); result.append(" <td>"); result.append(Messages.get().key(Messages.GUI_WORKPLACE_LOGVIEW_DOWNLOAD_START_FSIZE_0)); result.append(":</td>\n"); result.append(" <td>"); result.append(CmsFileUtil.formatFilesize(m_downloadFile.length(), getLocale())); result.append("</td>\r\n"); result.append(" </tr>\r\n"); result.append(" <tr>\r\n"); result.append(" <td>"); result.append(Messages.get().key(Messages.GUI_WORKPLACE_LOGVIEW_DOWNLOAD_START_FPATH_0)); result.append(":</td>\n"); result.append(" <td>"); result.append(m_downloadFile.getAbsolutePath()); result.append("</td>\r\n"); result.append(" </tr>\r\n"); result.append(" <tr>\r\n"); result.append(" <td>"); result.append(Messages.get().key(Messages.GUI_WORKPLACE_LOGVIEW_DOWNLOAD_START_FLMOD_0)); result.append(":</td>\n"); result.append(" <td>"); result.append(CmsDateUtil.getDateTime(new Date(m_downloadFile.lastModified()), DateFormat.MEDIUM, getLocale())); result.append("</td>\r\n"); result.append(" </tr>\r\n"); result.append("</table>\r\n"); result.append("<!-- end buildDownloadFileView -->\r\n"); result.append("\r\n"); result.append(dialogBlock(HTML_END, m_downloadFile.getName(), true)); return result.toString(); } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/911d339015ae5a073c687ea1e44b6b4371c6920e/CmsRfsFileDownloadDialog.java/buggy/src-modules/org/opencms/workplace/tools/workplace/rfsfile/CmsRfsFileDownloadDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1361,
7109,
812,
1767,
1435,
288,
3639,
6674,
563,
273,
394,
6674,
12,
13757,
1769,
3639,
563,
18,
6923,
12,
12730,
1768,
12,
4870,
67,
7570,
16,
4838,
18,
588,
7675,
856,
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,
377,
1071,
514,
1361,
7109,
812,
1767,
1435,
288,
3639,
6674,
563,
273,
394,
6674,
12,
13757,
1769,
3639,
563,
18,
6923,
12,
12730,
1768,
12,
4870,
67,
7570,
16,
4838,
18,
588,
7675,
856,
12... |
String dirName) | ASN1Sequence seq) | public X509Name( String dirName) { this(DefaultReverse, DefaultLookUp, dirName); } | 53000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53000/0b0064e263b09aa77c5059f3a9dc1d4a4f0c99cc/X509Name.java/buggy/crypto/src/org/bouncycastle/asn1/x509/X509Name.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1139,
5995,
461,
12,
3639,
18598,
21,
4021,
225,
3833,
13,
565,
288,
3639,
333,
12,
1868,
12650,
16,
2989,
9794,
1211,
16,
20878,
1769,
565,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1139,
5995,
461,
12,
3639,
18598,
21,
4021,
225,
3833,
13,
565,
288,
3639,
333,
12,
1868,
12650,
16,
2989,
9794,
1211,
16,
20878,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
... |
public void actionPerformed(ActionEvent e) { | public void actionPerformed(ActionEvent ee) { | private void addPopup() { addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { } else { JPopupMenu gcMenu = new JPopupMenu(); JMenuItem availMem = new JMenuItem("Available memory"); availMem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Runtime currR = Runtime.getRuntime(); long freeM = currR.freeMemory(); logMessage("Available memory : "+freeM+" bytes"); } }); gcMenu.add(availMem); JMenuItem runGC = new JMenuItem("Run garabage collector"); runGC.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { statusMessage("Running garbage collector"); System.gc(); statusMessage("OK"); } }); gcMenu.add(runGC); gcMenu.show(LogPanel.this, e.getX(), e.getY()); } } }); } | 4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/53e2fd9874d1448d5efe711047b8ff5879625e91/LogPanel.java/clean/trunk/weka/gui/LogPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
527,
13770,
1435,
288,
565,
527,
9186,
2223,
12,
2704,
17013,
4216,
1435,
288,
202,
482,
918,
7644,
27633,
12,
9186,
1133,
425,
13,
288,
202,
225,
309,
14015,
73,
18,
588,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
527,
13770,
1435,
288,
565,
527,
9186,
2223,
12,
2704,
17013,
4216,
1435,
288,
202,
482,
918,
7644,
27633,
12,
9186,
1133,
425,
13,
288,
202,
225,
309,
14015,
73,
18,
588,
11... |
if(treePath.getSegmentCount()==0) { | if (treePath.getSegmentCount() == 0) { | protected Widget internalGetWidgetToSelect(Object elementOrTreePath) { if(elementOrTreePath instanceof TreePath) { TreePath treePath = (TreePath) elementOrTreePath; if(treePath.getSegmentCount()==0) { return null; } Widget[] candidates = findItems(treePath.getLastSegment()); for (int i = 0; i < candidates.length; i++) { Widget candidate = candidates[i]; if(!(candidate instanceof Item)) { continue; } if(treePath.equals(getTreePathFromItem((Item) candidate), getComparer())) { return candidate; } } return null; } return findItem(elementOrTreePath); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/7dea322b00f8363f209617dc36ba0b47497db00d/AbstractTreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
11103,
2713,
967,
4609,
774,
3391,
12,
921,
930,
1162,
2471,
743,
13,
288,
202,
202,
430,
12,
2956,
1162,
2471,
743,
1276,
4902,
743,
13,
288,
1082,
202,
2471,
743,
2151,
743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11103,
2713,
967,
4609,
774,
3391,
12,
921,
930,
1162,
2471,
743,
13,
288,
202,
202,
430,
12,
2956,
1162,
2471,
743,
1276,
4902,
743,
13,
288,
1082,
202,
2471,
743,
2151,
743... |
exemplarCity.val = type.val.replaceAll(".*?/(.*)", "$1").replaceAll("_","\\s"); | exemplarCity.val = type.val.replaceAll(".*?/(.*)", "$1").replaceAll("_","\\3s"); | private ICUResourceWriter.Resource parseZone(Node root, StringBuffer xpath){ ICUResourceWriter.ResourceArray array = new ICUResourceWriter.ResourceArray(); //ICUResourceWriter.Resource current = null; if(isDraft(root, xpath)&& !writeDraft){ return null; } if(isAlternate(root)){ return null; } int savedLength = xpath.length(); getXPath(root, xpath); int oldLength = xpath.length(); ICUResourceWriter.ResourceString type = new ICUResourceWriter.ResourceString(); ICUResourceWriter.ResourceString ss = new ICUResourceWriter.ResourceString(); ICUResourceWriter.ResourceString sd = new ICUResourceWriter.ResourceString(); ICUResourceWriter.ResourceString ls = new ICUResourceWriter.ResourceString(); ICUResourceWriter.ResourceString ld = new ICUResourceWriter.ResourceString(); ICUResourceWriter.ResourceString exemplarCity = new ICUResourceWriter.ResourceString(); for(Node node=root.getFirstChild(); node!=null; node=node.getNextSibling()){ if(node.getNodeType()!=Node.ELEMENT_NODE){ continue; } String name = node.getNodeName(); ICUResourceWriter.Resource res = null; getXPath(node, xpath); if(name.equals(LDMLConstants.ALIAS)){ res = parseAliasResource(node, xpath); return res; }else if(name.equals(LDMLConstants.DEFAULT)){ ICUResourceWriter.ResourceString str = new ICUResourceWriter.ResourceString(); str.name = name; str.val = LDMLUtilities.getAttributeValue(node,LDMLConstants.TYPE); res = str; }else if(name.equals(LDMLConstants.SHORT)){ /* get information about long */ Node ssn = getVettedNode(node, LDMLConstants.STANDARD, xpath); Node sdn = getVettedNode(node, LDMLConstants.DAYLIGHT, xpath); if((ssn==null||sdn==null) && !writeDraft){ System.err.println("ERROR: Could not get timeZone string for " + xpath.toString()); System.exit(-1); } ss.val = LDMLUtilities.getNodeValue(ssn); sd.val = LDMLUtilities.getNodeValue(sdn); // ok the nodes are availble but // the values are null .. so just set the values to empty strings if(ss.val==null){ ss.val = ""; } if(sd.val==null){ sd.val = ""; } }else if(name.equals(LDMLConstants.LONG)){ /* get information about long */ Node lsn = getVettedNode(node, LDMLConstants.STANDARD, xpath); Node ldn = getVettedNode(node, LDMLConstants.DAYLIGHT, xpath); if((lsn == null && ldn != null) || (lsn != null && ldn ==null)){ System.err.println("ERROR: Could not get timeZone string for " + xpath.toString()); System.exit(-1); } if(lsn != null && ldn !=null){ ls.val = LDMLUtilities.getNodeValue(lsn); ld.val = LDMLUtilities.getNodeValue(ldn); // ok the nodes are availble but // the values are null .. so just set the values to empty strings if(ls.val==null){ ls.val = ""; } if(ld.val==null){ ld.val = ""; } } }else if(name.equals(LDMLConstants.EXEMPLAR_CITY)){ if(isDraft(node, xpath)&& !writeDraft){ return null; } if(isAlternate(node)){ return null; } exemplarCity.val = LDMLUtilities.getNodeValue(node); if(exemplarCity.val==null){ exemplarCity.val = ""; } }else{ System.err.println("Encountered unknown <"+root.getNodeName()+"> subelement: "+name); System.exit(-1); } xpath.delete(oldLength, xpath.length()); } type.val = LDMLUtilities.getAttributeValue(root, LDMLConstants.TYPE); if(type.val==null){ type.val=""; } if(exemplarCity.val==null){ Node ecn = LDMLUtilities.getNode(root, LDMLConstants.EXEMPLAR_CITY, fullyResolvedDoc, xpath.toString()); //TODO: Fix this when zoneStrings format c if(ecn!=null){ exemplarCity.val = LDMLUtilities.getNodeValue(ecn); }else{ exemplarCity.val = type.val.replaceAll(".*?/(.*)", "$1").replaceAll("_","\\s"); } } /* assemble the array */ if(type.val!=null && ls.val!=null && ss.val!=null && ld.val!=null && sd.val!=null){ array.first = type; /* [0] == type */ type.next = ls; /* [1] == long name for Standard */ ls.next = ss; /* [2] == short name for standard */ ss.next = ld; /* [3] == long name for daylight */ ld.next = sd; /* [4] == short name for standard */ if(exemplarCity.val!=null){ sd.next = exemplarCity; /* [5] == exemplarCity */ } } xpath.delete(savedLength, xpath.length()); if(array.first!=null){ return array; } return null; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/29e96572109fee89b3259f1c8972ca27075f6f0d/LDML2ICUConverter.java/clean/tools/java/org/unicode/cldr/icu/LDML2ICUConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
28009,
1420,
2289,
18,
1420,
1109,
4226,
12,
907,
1365,
16,
6674,
6748,
15329,
3639,
28009,
1420,
2289,
18,
1420,
1076,
526,
273,
394,
28009,
1420,
2289,
18,
1420,
1076,
5621,
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,
28009,
1420,
2289,
18,
1420,
1109,
4226,
12,
907,
1365,
16,
6674,
6748,
15329,
3639,
28009,
1420,
2289,
18,
1420,
1076,
526,
273,
394,
28009,
1420,
2289,
18,
1420,
1076,
5621,
3639,
... |
isNewTrick = true; | public void alert_newhand() { invokeAndWait(new Runnable() { public void run() { // Remove any existing sprites in case the hand was passed in. // The sprites would be removed on display_hand but this looks // nicer. for (int player_num = 0; player_num < cardClient .get_num_players(); player_num++) { if (sprites[player_num] != null) { for (int i = 0; i < sprites[player_num].length; i++) { if (sprites[player_num][i] != null) { table.remove(sprites[player_num][i]); sprites[player_num][i] = null; } } } } validate(); repaint(); } }); isNewTrick = true; } | 45800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45800/ced1c2b8e8d4e5b5c8a391d71c540da1520338fc/CardGamePanel.java/buggy/java/src/ggz/cards/CardGamePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
6881,
67,
2704,
2349,
1435,
288,
3639,
4356,
1876,
5480,
12,
2704,
10254,
1435,
288,
5411,
1071,
918,
1086,
1435,
288,
7734,
368,
3581,
1281,
2062,
1694,
24047,
316,
648,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6881,
67,
2704,
2349,
1435,
288,
3639,
4356,
1876,
5480,
12,
2704,
10254,
1435,
288,
5411,
1071,
918,
1086,
1435,
288,
7734,
368,
3581,
1281,
2062,
1694,
24047,
316,
648,
326,
... | |
vSubTypes.add(new ChartSubTypeImpl("Stacked", imgStackedWithDepth)); vSubTypes.add(new ChartSubTypeImpl("Percent Stacked", imgPercentStackedWithDepth)); vSubTypes.add(new ChartSubTypeImpl("Overlay", imgSideBySideWithDepth)); | vSubTypes.add(new DefaultChartSubTypeImpl("Stacked", imgStackedWithDepth, sStackedDescription)); vSubTypes.add(new DefaultChartSubTypeImpl("Percent Stacked", imgPercentStackedWithDepth, sPercentStackedDescription)); vSubTypes.add(new DefaultChartSubTypeImpl("Overlay", imgSideBySideWithDepth, sOverlayDescription)); | public Collection getChartSubtypes(String sDimension, Orientation orientation) { Vector vSubTypes = new Vector(); if (sDimension.equals("2D")) { if (orientation.equals(Orientation.VERTICAL_LITERAL)) { imgStacked = UIHelper.getImage("images/StackedLineChartImage.gif"); imgPercentStacked = UIHelper.getImage("images/PercentStackedLineChartImage.gif"); imgSideBySide = UIHelper.getImage("images/SideBySideLineChartImage.gif"); } else { imgStacked = UIHelper.getImage("images/HorizontalStackedLineChartImage.gif"); imgPercentStacked = UIHelper.getImage("images/HorizontalPercentStackedLineChartImage.gif"); imgSideBySide = UIHelper.getImage("images/HorizontalSideBySideLineChartImage.gif"); } vSubTypes.add(new ChartSubTypeImpl("Stacked", imgStacked)); vSubTypes.add(new ChartSubTypeImpl("Percent Stacked", imgPercentStacked)); vSubTypes.add(new ChartSubTypeImpl("Overlay", imgSideBySide)); } else if (sDimension.equals("2D With Depth")) { if (orientation.equals(Orientation.VERTICAL_LITERAL)) { imgStackedWithDepth = UIHelper.getImage("images/StackedLineChartWithDepthImage.gif"); imgPercentStackedWithDepth = UIHelper.getImage("images/PercentStackedLineChartWithDepthImage.gif"); imgSideBySideWithDepth = UIHelper.getImage("images/SideBySideLineChartWithDepthImage.gif"); } else { imgStackedWithDepth = UIHelper.getImage("images/HorizontalStackedLineChartWithDepthImage.gif"); imgPercentStackedWithDepth = UIHelper .getImage("images/HorizontalPercentStackedLineChartWithDepthImage.gif"); imgSideBySideWithDepth = UIHelper.getImage("images/HorizontalSideBySideLineChartWithDepthImage.gif"); } vSubTypes.add(new ChartSubTypeImpl("Stacked", imgStackedWithDepth)); vSubTypes.add(new ChartSubTypeImpl("Percent Stacked", imgPercentStackedWithDepth)); vSubTypes.add(new ChartSubTypeImpl("Overlay", imgSideBySideWithDepth)); } else if (sDimension.equals("3D")) { imgSideBySide3D = UIHelper.getImage("images/SideBySideLineChart3DImage.gif"); vSubTypes.add(new ChartSubTypeImpl("Side-by-side", imgSideBySide3D)); } return vSubTypes; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/3312cd0d7d4efb945ae26dd43efddc7cb433aa3c/LineChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/LineChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2200,
336,
7984,
1676,
2352,
12,
780,
272,
8611,
16,
531,
12556,
9820,
13,
565,
288,
3639,
5589,
331,
1676,
2016,
273,
394,
5589,
5621,
3639,
309,
261,
87,
8611,
18,
14963,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2200,
336,
7984,
1676,
2352,
12,
780,
272,
8611,
16,
531,
12556,
9820,
13,
565,
288,
3639,
5589,
331,
1676,
2016,
273,
394,
5589,
5621,
3639,
309,
261,
87,
8611,
18,
14963,
2932,
... |
if (idx == unknownIndex) { continue; } | if (idx == unknownIndex) { continue; } | public int countIndexes() { if (collection.isEmpty()) { return 0; } int count = 0; int unknownIndex = getUnknownIndex(); for (Iterator it = collection.iterator(); it.hasNext();) { int idx = getIndex(it.next()); if (idx == unknownIndex) { continue; } count++; } return count; } | 6232 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6232/1f1850be471d4b8bfd2f3c50aa61bc39bf91259a/CollectionIndexesModel.java/clean/org.rcfaces.core/src/org/rcfaces/core/model/CollectionIndexesModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1056,
8639,
1435,
288,
202,
202,
430,
261,
5548,
18,
291,
1921,
10756,
288,
1082,
202,
2463,
374,
31,
202,
202,
97,
202,
202,
474,
1056,
273,
374,
31,
202,
202,
474,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
1056,
8639,
1435,
288,
202,
202,
430,
261,
5548,
18,
291,
1921,
10756,
288,
1082,
202,
2463,
374,
31,
202,
202,
97,
202,
202,
474,
1056,
273,
374,
31,
202,
202,
474,
59... |
StructuredViewer viewer = fSection.getStructuredViewerPart().getViewer(); if(viewer instanceof TreeViewer) ((TreeViewer) viewer).collapseAll(); | fViewer.collapseAll(); | public void run() { StructuredViewer viewer = fSection.getStructuredViewerPart().getViewer(); if(viewer instanceof TreeViewer) ((TreeViewer) viewer).collapseAll(); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/6dd5da746e62481e7a61da5b64874667fb7274e6/CollapseAction.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/actions/CollapseAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
30733,
18415,
14157,
273,
284,
5285,
18,
588,
30733,
18415,
1988,
7675,
588,
18415,
5621,
202,
202,
430,
12,
25256,
1276,
4902,
18415,
13,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
202,
202,
30733,
18415,
14157,
273,
284,
5285,
18,
588,
30733,
18415,
1988,
7675,
588,
18415,
5621,
202,
202,
430,
12,
25256,
1276,
4902,
18415,
13,
1082,
... |
final IPath containerName = newReportFileWizardPage .getContainerFullPath( ); | final IPath containerName = newReportFileWizardPage.getContainerFullPath( ); | public boolean performFinish( ) { final IPath containerName = newReportFileWizardPage .getContainerFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( getFileExtension( ) ) ) //$NON-NLS-1$ { fileName = fn + getFileExtension( ); //$NON-NLS-1$ } else { fileName = fn; } InputStream streamFromPage = null; URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( "/templates/blank_report.rptdesign" ) );//$NON-NLS-1$ if ( url != null ) { try { streamFromPage = url.openStream( ); } catch ( IOException e1 ) { // ignore. } } final InputStream stream = streamFromPage; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) throws InvocationTargetException { try { doFinish( containerName, fileName, stream, monitor ); } catch ( CoreException e ) { throw new InvocationTargetException( e ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/c2f71090207d1bcbb531f96e601e6521105dee00/NewTemplateWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.ide/src/org/eclipse/birt/report/designer/ui/ide/wizards/NewTemplateWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
20408,
273,
394,
4820,
812,
27130,
1964,
9506,
202,
18,
588,
2170,
24173,
12,
11272,
202,
202,
780,
2295,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
20408,
273,
394,
4820,
812,
27130,
1964,
9506,
202,
18,
588,
2170,
24173,
12,
11272,
202,
202,
780,
2295,
273,
3... |
String[] basenames = FileUtils.listBasenames(phonelabelDir, ".lab"); System.out.println("Computing unit labels for "+basenames.length+" files"); for (int i=0; i<basenames.length; i++) { BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(phonelabelDir, basenames[i]+".lab")), "UTF-8")); PrintWriter out = new PrintWriter(new File(unitlabelDir, basenames[i]+".unitlab"), "UTF-8"); String pauseLine = null; String line; while ((line = in.readLine())!= null) { String unit = getUnit(line); if (pauseSymbol.equals(unit)) { pauseLine = line; } else { if (pauseLine != null) { out.println(pauseLine); pauseLine = null; | System.out.println( "Computing unit labels for " + bnl.getLength() + " files." ); System.out.println( "From phonetic label files: " + db.labDirName() + "*" + db.labExt() ); System.out.println( "To unit label files: " + db.unitLabDirName() + "*" + db.unitLabExt() ); for (int i=0; i<bnl.getLength(); i++) { File labFile = new File( db.labDirName() + bnl.getName(i) + db.labExt() ); if ( !labFile.exists() ) { System.out.println( "Utterance [" + bnl.getName(i) + "] does not have a phonetic label file." ); System.out.println( "Removing this utterance from the base utterance list." ); bnl.remove( bnl.getName(i) ); } else { BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream( labFile ), "UTF-8")); PrintWriter out = new PrintWriter(new File( db.unitLabDirName() + bnl.getName(i) + db.unitLabExt() ), "UTF-8"); String pauseLine = null; String line; while ((line = in.readLine())!= null) { String unit = getUnit(line); if (pauseSymbol.equals(unit)) { pauseLine = line; } else { if (pauseLine != null) { out.println(pauseLine); pauseLine = null; } out.println(line); | public boolean compute() throws IOException { String[] basenames = FileUtils.listBasenames(phonelabelDir, ".lab"); System.out.println("Computing unit labels for "+basenames.length+" files"); for (int i=0; i<basenames.length; i++) { BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(phonelabelDir, basenames[i]+".lab")), "UTF-8")); PrintWriter out = new PrintWriter(new File(unitlabelDir, basenames[i]+".unitlab"), "UTF-8"); // Merge adjacent pauses into one: In a sequence of pauses, // only remember the last one. String pauseLine = null; String line; while ((line = in.readLine())!= null) { // Verify if this is a pause unit String unit = getUnit(line); if (pauseSymbol.equals(unit)) { pauseLine = line; // remember only the latest pause line } else { // a non-pause symbol if (pauseLine != null) { out.println(pauseLine); pauseLine = null; } out.println(line); } } if (pauseLine != null) { out.println(pauseLine); } out.flush(); out.close(); System.out.println(" "+basenames[i]); } System.out.println("Finished computing unit labels"); return true; } | 24259 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/24259/863a435e1e81a31023f567a49dc521436d84df27/UnitLabelComputer.java/clean/java/de/dfki/lt/mary/unitselection/voiceimport_reorganized/UnitLabelComputer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
3671,
1435,
1216,
1860,
565,
288,
3639,
514,
8526,
2580,
6809,
273,
13779,
18,
1098,
11494,
6809,
12,
844,
265,
292,
873,
1621,
16,
3552,
7411,
8863,
3639,
2332,
18,
659,
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,
377,
1071,
1250,
3671,
1435,
1216,
1860,
565,
288,
3639,
514,
8526,
2580,
6809,
273,
13779,
18,
1098,
11494,
6809,
12,
844,
265,
292,
873,
1621,
16,
3552,
7411,
8863,
3639,
2332,
18,
659,
18,
... |
return bigNorm(getRuntime(), getValue().remainder(bigIntValue(other))); | return callCoerced("remainder", other); | public RubyNumeric remainder(RubyNumeric other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).remainder(other); } return bigNorm(getRuntime(), getValue().remainder(bigIntValue(other))); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyBignum.java/buggy/src/org/jruby/RubyBignum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
9902,
10022,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
16097,
620,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
9902,
10022,
12,
54,
10340,
9902,
1308,
13,
288,
3639,
309,
261,
3011,
1276,
19817,
4723,
13,
288,
5411,
327,
19817,
4723,
18,
2704,
4723,
12,
588,
5576,
9334,
16097,
620,
14... |
exportPointDriver.removeResource(currentPublishedResource.getRootPath(), currentExportPoint); | exportPointDriver.deleteResource(currentPublishedResource.getRootPath(), currentExportPoint); | public void writeExportPoints(CmsDbContext dbc, int projectId, I_CmsReport report, CmsUUID publishHistoryId) { boolean printReportHeaders = false; try { // read the "published resources" for the specified publish history ID List publishedResources = m_projectDriver.readPublishedResources(dbc, projectId, publishHistoryId); if (publishedResources.size() == 0) { if (LOG.isWarnEnabled()) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_EMPTY_PUBLISH_HISTORY_1, publishHistoryId)); } return; } // read the export points and return immediately if there are no export points at all Set exportPoints = new HashSet(); exportPoints.addAll(OpenCms.getExportPoints()); exportPoints.addAll(OpenCms.getModuleManager().getExportPoints()); if (exportPoints.size() == 0) { if (LOG.isWarnEnabled()) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_NO_EXPORT_POINTS_CONFIGURED_0)); } return; } // create the driver to write the export points CmsExportPointDriver exportPointDriver = new CmsExportPointDriver(exportPoints); // the report may be null if the export point write was started by an event if (report == null) { if (dbc.getRequestContext() != null) { report = new CmsLogReport(dbc.getRequestContext().getLocale(), getClass()); } else { report = new CmsLogReport(CmsLocaleManager.getDefaultLocale(), getClass()); } } // iterate over all published resources to export them eventually Iterator i = publishedResources.iterator(); while (i.hasNext()) { CmsPublishedResource currentPublishedResource = (CmsPublishedResource)i.next(); String currentExportPoint = exportPointDriver.getExportPoint(currentPublishedResource.getRootPath()); if (currentExportPoint != null) { if (!printReportHeaders) { report.println( Messages.get().container(Messages.RPT_EXPORT_POINTS_WRITE_BEGIN_0), I_CmsReport.FORMAT_HEADLINE); printReportHeaders = true; } if (currentPublishedResource.isFolder()) { // export the folder if (currentPublishedResource.getState() == CmsResource.STATE_DELETED) { exportPointDriver.removeResource(currentPublishedResource.getRootPath(), currentExportPoint); } else { exportPointDriver.createFolder(currentPublishedResource.getRootPath(), currentExportPoint); } } else { // export the file if (currentPublishedResource.getState() == CmsResource.STATE_DELETED) { exportPointDriver.removeResource(currentPublishedResource.getRootPath(), currentExportPoint); } else { // read the file content online CmsFile file = getVfsDriver().readFile( dbc, CmsProject.ONLINE_PROJECT_ID, false, currentPublishedResource.getStructureId()); exportPointDriver.writeFile(file.getRootPath(), currentExportPoint, file.getContents()); } } // print some report messages if (currentPublishedResource.getState() == CmsResource.STATE_DELETED) { report.print( Messages.get().container(Messages.RPT_EXPORT_POINTS_DELETE_0), I_CmsReport.FORMAT_NOTE); report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, currentPublishedResource.getRootPath())); report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0)); report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); } else { report.print( Messages.get().container(Messages.RPT_EXPORT_POINTS_WRITE_0), I_CmsReport.FORMAT_NOTE); report.print(org.opencms.report.Messages.get().container( org.opencms.report.Messages.RPT_ARGUMENT_1, currentPublishedResource.getRootPath())); report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0)); report.println( org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0), I_CmsReport.FORMAT_OK); } } } } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_WRITE_EXPORT_POINTS_ERROR_0), e); } } finally { if (printReportHeaders) { report.println( Messages.get().container(Messages.RPT_EXPORT_POINTS_WRITE_END_0), I_CmsReport.FORMAT_HEADLINE); } } } | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/3554fb635015228471b8cc6bdd043d5e67152b1a/CmsDriverManager.java/buggy/src/org/opencms/db/CmsDriverManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1045,
6144,
5636,
12,
4747,
4331,
1042,
9881,
16,
509,
9882,
16,
467,
67,
25702,
2605,
16,
15792,
3808,
5623,
548,
13,
288,
3639,
1250,
1172,
4820,
3121,
273,
629,
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,
1071,
918,
1045,
6144,
5636,
12,
4747,
4331,
1042,
9881,
16,
509,
9882,
16,
467,
67,
25702,
2605,
16,
15792,
3808,
5623,
548,
13,
288,
3639,
1250,
1172,
4820,
3121,
273,
629,
31,
3639,
... |
getRuntime().yield(RubyString.newString(getRuntime(), contents[i])); | getRuntime().yield(getRuntime().newString(contents[i])); | public IRubyObject each() { String[] contents = snapshot; for (int i=0; i<contents.length; i++) { getRuntime().yield(RubyString.newString(getRuntime(), contents[i])); } return this; } | 49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyDir.java/buggy/src/org/jruby/RubyDir.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
1517,
1435,
288,
3639,
514,
8526,
2939,
273,
4439,
31,
3639,
364,
261,
474,
277,
33,
20,
31,
277,
32,
3980,
18,
2469,
31,
277,
27245,
288,
5411,
18814,
7675,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15908,
10340,
921,
1517,
1435,
288,
3639,
514,
8526,
2939,
273,
4439,
31,
3639,
364,
261,
474,
277,
33,
20,
31,
277,
32,
3980,
18,
2469,
31,
277,
27245,
288,
5411,
18814,
7675,
23... |
if (!enabledAllowed) | if (!isEnabledAllowed()) | public void setVisible(boolean visible, boolean forceVisibility) { if (visible) { // Make the items visible if (!enabledAllowed) setEnabledAllowed(true); if (!isVisible()) setVisible(true); } else { if (forceVisibility) // Remove the editor menu items setVisible(false); else // Disable the editor menu items. setEnabledAllowed(false); }} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/5e8d7b3d156422e4cf43d05737397e03db3c09a5/EditorMenuManager.java/buggy/bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
16697,
12,
6494,
6021,
16,
1250,
2944,
10135,
13,
288,
202,
430,
261,
8613,
13,
288,
202,
202,
759,
4344,
326,
1516,
6021,
3196,
202,
430,
16051,
291,
1526,
5042,
10756,
1875,
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,
1071,
918,
16697,
12,
6494,
6021,
16,
1250,
2944,
10135,
13,
288,
202,
430,
261,
8613,
13,
288,
202,
202,
759,
4344,
326,
1516,
6021,
3196,
202,
430,
16051,
291,
1526,
5042,
10756,
1875,
202,
... |
KoLmafia.getLogStream().println( "<WHILE>" ); | KoLmafia.getDebugStream().println( "<WHILE>" ); | private void printLoop( ScriptLoop loop, int indent ) { indentLine( indent ); if ( loop.repeats() ) KoLmafia.getLogStream().println( "<WHILE>" ); else KoLmafia.getLogStream().println( "<IF>" ); printExpression( loop.getCondition(), indent + 1 ); printScope( loop.getScope(), indent + 1 ); for ( ScriptLoop currentElse = loop.getFirstElseLoop(); currentElse != null; currentElse = loop.getNextElseLoop( currentElse ) ) printLoop( currentElse, indent + 1 ); } | 50364 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50364/ad3cbbe12c74ee11a9847612f606f3a2b6a2df81/KoLmafiaASH.java/clean/src/net/sourceforge/kolmafia/KoLmafiaASH.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1172,
6452,
12,
7739,
6452,
2798,
16,
509,
3504,
262,
202,
95,
202,
202,
9355,
1670,
12,
3504,
11272,
202,
202,
430,
261,
2798,
18,
28956,
2323,
1435,
262,
1082,
202,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1172,
6452,
12,
7739,
6452,
2798,
16,
509,
3504,
262,
202,
95,
202,
202,
9355,
1670,
12,
3504,
11272,
202,
202,
430,
261,
2798,
18,
28956,
2323,
1435,
262,
1082,
202,
47... |
manifest.getMdContentAsStream(rmds[i], this), | manifest.getMdContentAsStream(rmds[i], callback), | public void addLicense(Context context, Collection collection, String license) throws PackageValidationException, CrosswalkException, AuthorizeException, SQLException, IOException { PackageUtils.addDepositLicense(context, license, item, collection); // If package includes a Creative Commons license, add that: Element rmds[] = manifest.getItemRightsMD(); for (int i = 0; i < rmds.length; ++i) { String type = manifest.getMdType(rmds[i]); if (type != null && type.equals("Creative Commons")) { log.debug("Got Creative Commons license in rightsMD"); CreativeCommons.setLicense(context, item, manifest.getMdContentAsStream(rmds[i], this), manifest.getMdContentMimeType(rmds[i])); // if there was a bitstream, get rid of it, since // it's just an artifact now that the CC license is installed. Element mdRef = rmds[i].getChild("mdRef", MetsManifest.metsNS); if (mdRef != null) { Bitstream bs = getBitstreamForMdRef(mdRef); if (bs != null) { Bundle parent[] = bs.getBundles(); if (parent.length > 0) { parent[0].removeBitstream(bs); parent[0].update(); } } } } } } | 1868 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1868/748804adc26317566de95cc497aca1def22e5f87/DSpaceMetsSipImport.java/clean/dspace/src/org/dspace/content/packager/DSpaceMetsSipImport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
13211,
12,
1042,
819,
16,
2200,
1849,
16,
514,
8630,
13,
3639,
1216,
7508,
18146,
16,
19742,
11348,
503,
16,
9079,
23859,
503,
16,
6483,
16,
1860,
565,
288,
3639,
7508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13211,
12,
1042,
819,
16,
2200,
1849,
16,
514,
8630,
13,
3639,
1216,
7508,
18146,
16,
19742,
11348,
503,
16,
9079,
23859,
503,
16,
6483,
16,
1860,
565,
288,
3639,
7508,
... |
jj_la1[87] = jj_gen; | jj_la1[88] = jj_gen; | final public void Literal() throws ParseException { /*@bgen(jjtree) Literal */ ASTLiteral jjtn000 = new ASTLiteral(this, JJTLITERAL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_LITERAL: Token t; t = jj_consume_token(INTEGER_LITERAL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage(t.image); break; case FLOATING_POINT_LITERAL: t = jj_consume_token(FLOATING_POINT_LITERAL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage(t.image); break; case CHARACTER_LITERAL: t = jj_consume_token(CHARACTER_LITERAL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage(t.image); break; case STRING_LITERAL: t = jj_consume_token(STRING_LITERAL); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setImage(t.image); break; case FALSE: case TRUE: BooleanLiteral(); break; case NULL: NullLiteral(); break; default: jj_la1[87] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } catch (Throwable jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } if (jjte000 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte000;} } if (jjte000 instanceof ParseException) { {if (true) throw (ParseException)jjte000;} } {if (true) throw (RuntimeException)jjte000;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/c02806442559ca74c050ba0d574007ed840a210a/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
14392,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
14392,
1195,
225,
9183,
6177,
10684,
5088,
3784,
273,
394,
9183,
6177,
12,
2211,
16,
804,
46,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1071,
918,
14392,
1435,
1216,
10616,
288,
1748,
36,
70,
4507,
12,
78,
78,
3413,
13,
14392,
1195,
225,
9183,
6177,
10684,
5088,
3784,
273,
394,
9183,
6177,
12,
2211,
16,
804,
46,
59... |
.startTrans( "Select all borders" ); | .startTrans( Messages.getString( "BordersPage.Trans.SelectAllborders" ) ); | public Control createControl( Composite parent ) { content = new Composite( parent, SWT.NONE ); GridLayout layout = UIUtil.createGridLayoutWithoutMargin( 2, false ); layout.marginHeight = 1; layout.marginWidth = 1; layout.horizontalSpacing = 10; content.setLayout( layout ); content.setLayoutData( new GridData( GridData.FILL_BOTH ) ); Composite choices = new Composite( content, SWT.NONE ); GridData data = new GridData( GridData.FILL_BOTH ); choices.setLayoutData( data ); layout = WidgetUtil.createGridLayout( 2 ); layout.marginHeight = 1; layout.marginWidth = 2; choices.setLayout( layout ); Label styleLabel = FormWidgetFactory.getInstance( ) .createLabel( choices, SWT.LEFT, isFormStyle ); styleLabel.setText( styleProvider.getDisplayName( ) ); styleLabel.setLayoutData( new GridData( ) ); if ( isFormStyle ) { styleCombo = FormWidgetFactory.getInstance( ) .createStyleCombo( choices, (IComboProvider) styleProvider ); } else { styleCombo = new StyleCombo( choices, style, (IComboProvider) styleProvider ); } data = new GridData( ); data.widthHint = 200; styleCombo.setLayoutData( data ); styleCombo.setItems( ( (IComboProvider) styleProvider ).getItems( ) ); Label colorLabel = FormWidgetFactory.getInstance( ) .createLabel( choices, SWT.LEFT, isFormStyle ); colorLabel.setText( colorProvider.getDisplayName( ) ); colorLabel.setLayoutData( new GridData( ) ); builder = new ColorBuilder( choices, SWT.NONE, isFormStyle ); builder.setChoiceSet( colorProvider.getElementChoiceSet( ) ); colorProvider.setIndex( IColorConstants.BLACK ); data = new GridData( ); data.widthHint = 200; data.heightHint = builder.computeSize( SWT.DEFAULT, SWT.DEFAULT ).y; builder.setLayoutData( data ); Label widthLabel = FormWidgetFactory.getInstance( ) .createLabel( choices, SWT.LEFT, isFormStyle ); widthLabel.setText( widthProvider.getDisplayName( ) ); widthLabel.setLayoutData( new GridData( ) ); if ( isFormStyle ) { widthCombo = FormWidgetFactory.getInstance( ) .createStyleCombo( choices, (IComboProvider) widthProvider ); } else { widthCombo = new StyleCombo( choices, style, (IComboProvider) widthProvider ); } widthProvider.setIndex( widthProvider.getItems( )[1].toString( ) ); data = new GridData( ); data.widthHint = 200; widthCombo.setLayoutData( data ); widthCombo.setItems( ( (IComboProvider) widthProvider ).getItems( ) ); Composite composite = new Composite( choices, SWT.NONE ); layout = new GridLayout( ); layout.horizontalSpacing = 7; layout.numColumns = toggleProviders.length + 1; composite.setLayout( layout ); data = new GridData( ); data.horizontalSpan = 2; composite.setLayoutData( data ); toggles = new Button[toggleProviders.length]; for ( int i = 0; i < toggleProviders.length; i++ ) { Button button = new Button( composite, SWT.TOGGLE ); toggles[i] = button; button.setLayoutData( new GridData( ) ); button.setToolTipText( toggleProviders[i].getTooltipText( ) ); button.setImage( ReportPlatformUIImages.getImage( toggleProviders[i].getImageName( ) ) ); final BorderToggleDescriptorProvider provider = toggleProviders[i]; button.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { SessionHandleAdapter.getInstance( ) .getCommandStack( ) .startTrans( "Select border" ); if ( ( (Button) e.widget ).getSelection( ) ) { BorderInfomation information = new BorderInfomation( ); information.setPosition( provider.getPosition( ) ); information.setColor( builder.getRGB( ) ); information.setStyle( (String) styleCombo.getSelectedItem( ) ); information.setWidth( (String) widthCombo.getSelectedItem( ) ); previewCanvas.setBorderInfomation( information ); restoreInfo = information; try { provider.save( information ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } checkToggleButtons( ); } else { BorderInfomation oldInfo = (BorderInfomation) provider.load( ); if ( !( oldInfo.getStyle( ).equals( (String) styleCombo.getSelectedItem( ) ) ) || !( oldInfo.getColor( ).equals( builder.getRGB( ) ) ) || !( oldInfo.getWidth( ).equals( (String) widthCombo.getSelectedItem( ) ) ) ) { BorderInfomation information = new BorderInfomation( ); information.setPosition( provider.getPosition( ) ); information.setColor( builder.getRGB( ) ); information.setStyle( (String) styleCombo.getSelectedItem( ) ); information.setWidth( (String) widthCombo.getSelectedItem( ) ); previewCanvas.setBorderInfomation( information ); restoreInfo = information; try { provider.save( information ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } ( (Button) e.widget ).setSelection( true ); } else { previewCanvas.removeBorderInfomation( provider.getPosition( ) ); if ( allButton.getSelection( ) ) allButton.setSelection( false ); try { provider.reset( ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } } } previewCanvas.redraw( ); SessionHandleAdapter.getInstance( ) .getCommandStack( ) .commit( ); } } ); } allButton = new Button( composite, SWT.TOGGLE ); allButton.setImage( ReportPlatformUIImages.getImage( IReportGraphicConstants.ICON_ATTRIBUTE_BORDER_FRAME ) ); allButton.setToolTipText( Messages.getString( "BordersPage.Tooltip.All" ) ); allButton.setLayoutData( new GridData( ) ); allButton.addSelectionListener( new SelectionAdapter( ) { public void widgetSelected( SelectionEvent e ) { SessionHandleAdapter.getInstance( ) .getCommandStack( ) .startTrans( "Select all borders" ); if ( ( (Button) e.widget ).getSelection( ) ) { for ( int i = 0; i < toggleProviders.length; i++ ) { BorderInfomation information = new BorderInfomation( ); information.setPosition( toggleProviders[i].getPosition( ) ); information.setColor( builder.getRGB( ) ); information.setStyle( (String) styleCombo.getSelectedItem( ) ); information.setWidth( (String) widthCombo.getSelectedItem( ) ); toggles[i].setSelection( true ); previewCanvas.setBorderInfomation( information ); try { toggleProviders[i].save( information ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } } restoreInfo = (BorderInfomation) toggleProviders[toggleProviders.length - 1].load( ); } else { boolean reset = true; for ( int i = 0; i < toggleProviders.length; i++ ) { BorderInfomation info = (BorderInfomation) toggleProviders[i].load( ); if ( !( info.getStyle( ).equals( (String) styleCombo.getSelectedItem( ) ) ) || !( info.getColor( ).equals( builder.getRGB( ) ) ) || !( info.getWidth( ).equals( (String) widthCombo.getSelectedItem( ) ) ) ) { reset = false; break; } } if ( reset ) { for ( int i = 0; i < toggleProviders.length; i++ ) { previewCanvas.removeBorderInfomation( toggleProviders[i].getPosition( ) ); toggles[i].setSelection( false ); try { toggleProviders[i].reset( ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } } } else { for ( int i = 0; i < toggleProviders.length; i++ ) { BorderInfomation information = new BorderInfomation( ); information.setPosition( toggleProviders[i].getPosition( ) ); information.setColor( builder.getRGB( ) ); information.setStyle( (String) styleCombo.getSelectedItem( ) ); information.setWidth( (String) widthCombo.getSelectedItem( ) ); previewCanvas.setBorderInfomation( information ); restoreInfo = information; try { toggleProviders[i].save( information ); } catch ( Exception e1 ) { ExceptionHandler.handle( e1 ); } } ( (Button) e.widget ).setSelection( true ); } } previewCanvas.redraw( ); SessionHandleAdapter.getInstance( ).getCommandStack( ).commit( ); } } ); Composite previewContainer = new Composite( content, SWT.NONE ); data = new GridData( GridData.FILL_BOTH ); previewContainer.setLayoutData( data ); layout = new GridLayout( ); layout.numColumns = 2; layout.marginHeight = 1; layout.marginWidth = 10; previewContainer.setLayout( layout ); Label previewLabel = FormWidgetFactory.getInstance( ) .createLabel( previewContainer, SWT.LEFT, isFormStyle ); data = new GridData( GridData.VERTICAL_ALIGN_BEGINNING ); previewLabel.setLayoutData( data ); previewLabel.setText( Messages.getString( "BordersPage.text.Preview" ) ); previewCanvas = new BorderCanvas( previewContainer, SWT.NONE ); data = new GridData( ); data.widthHint = 130; data.heightHint = 130; previewCanvas.setLayoutData( data ); return content; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/8687961948cc8d0708a4fe00a6baadf6a0f3af6d/BorderPropertyDescriptor.java/clean/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/widget/BorderPropertyDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8888,
752,
3367,
12,
14728,
982,
262,
202,
95,
202,
202,
1745,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
6313,
3744,
3511,
273,
6484,
1304,
18,
2640,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
3367,
12,
14728,
982,
262,
202,
95,
202,
202,
1745,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
202,
202,
6313,
3744,
3511,
273,
6484,
1304,
18,
2640,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.