rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if (msprite.isAnimating()) { | if (msprite.removed()) { | protected PieceSprite removePieceSprite (int pieceId, String why) { PieceSprite sprite = _pieces.get(pieceId); if (sprite instanceof MobileSprite) { MobileSprite msprite = (MobileSprite)sprite; // if this mobile sprite is animating it will have to wait // until it's finished before being removed if (msprite.isAnimating()) { _pieces.remove(pieceId); msprite.addObserver(_deadRemover); msprite.queueAction(MobileSprite.REMOVED); return sprite; } else { log.info("Removing dead unit sprite immediately " + msprite.getPiece() + "."); } } if (sprite instanceof BonusSprite) { // if this was a bonus, note that it was activated _ctrl.postEvent(TutorialCodes.BONUS_ACTIVATED); } return super.removePieceSprite(pieceId, why); } | 8059 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8059/5d9954d678737890df71ec235c6cec6189e15f4b/BangBoardView.java/clean/src/java/com/threerings/bang/game/client/BangBoardView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
453,
8414,
3389,
796,
1206,
22607,
3389,
796,
261,
474,
11151,
548,
16,
514,
11598,
13,
565,
288,
3639,
453,
8414,
3389,
796,
16839,
273,
389,
31016,
18,
588,
12,
30100,
548,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
453,
8414,
3389,
796,
1206,
22607,
3389,
796,
261,
474,
11151,
548,
16,
514,
11598,
13,
565,
288,
3639,
453,
8414,
3389,
796,
16839,
273,
389,
31016,
18,
588,
12,
30100,
548,
1769,
... |
StringBuffer sb = new StringBuffer(Token.name(type)); if (this instanceof StringNode) { sb.append(' '); sb.append(getString()); } else if (this instanceof ScriptOrFnNode) { ScriptOrFnNode sof = (ScriptOrFnNode)this; if (this instanceof FunctionNode) { FunctionNode fn = (FunctionNode)this; sb.append(' '); sb.append(fn.getFunctionName()); } sb.append(" [source name: "); sb.append(sof.getSourceName()); sb.append("] [encoded source length: "); sb.append(sof.getEncodedSourceEnd() - sof.getEncodedSourceStart()); sb.append("] [base line: "); sb.append(sof.getBaseLineno()); sb.append("] [end line: "); sb.append(sof.getEndLineno()); sb.append(']'); } else if (this instanceof Jump) { Jump jump = (Jump)this; if (type == Token.BREAK || type == Token.CONTINUE) { sb.append(" [label: "); sb.append(jump.getJumpStatement()); sb.append(']'); } else if (type == Token.TRY) { Node catchNode = jump.target; Node finallyTarget = jump.getFinally(); if (catchNode != null) { sb.append(" [catch: "); sb.append(catchNode); sb.append(']'); } if (finallyTarget != null) { sb.append(" [finally: "); sb.append(finallyTarget); sb.append(']'); } } else if (type == Token.LABEL || type == Token.LOOP || type == Token.SWITCH) { sb.append(" [break: "); sb.append(jump.target); sb.append(']'); if (type == Token.LOOP) { sb.append(" [continue: "); sb.append(jump.getContinue()); sb.append(']'); } } else { sb.append(" [target: "); sb.append(jump.target); sb.append(']'); } } else if (type == Token.NUMBER) { sb.append(' '); sb.append(getDouble()); } if (lineno != -1) { sb.append(' '); sb.append(lineno); } for (PropListItem x = propListHead; x != null; x = x.next) { int type = x.type; sb.append(" ["); sb.append(propToString(type)); sb.append(": "); String value; switch (type) { case TARGETBLOCK_PROP : value = "target block property"; break; case LOCAL_BLOCK_PROP : value = "last local block"; break; case ISNUMBER_PROP: switch (x.intValue) { case BOTH: value = "both"; break; case RIGHT: value = "right"; break; case LEFT: value = "left"; break; default: throw Kit.codeBug(); } break; case SPECIALCALL_PROP: switch (x.intValue) { case SPECIALCALL_EVAL: value = "eval"; break; case SPECIALCALL_WITH: value = "with"; break; default: throw Kit.codeBug(); } break; default : Object obj = x.objectValue; if (obj != null) { value = obj.toString(); } else { value = String.valueOf(x.intValue); } break; } sb.append(value); sb.append(']'); } | StringBuffer sb = new StringBuffer(); toString(new ObjToIntMap(), sb); | public String toString() { if (Token.printTrees) { StringBuffer sb = new StringBuffer(Token.name(type)); if (this instanceof StringNode) { sb.append(' '); sb.append(getString()); } else if (this instanceof ScriptOrFnNode) { ScriptOrFnNode sof = (ScriptOrFnNode)this; if (this instanceof FunctionNode) { FunctionNode fn = (FunctionNode)this; sb.append(' '); sb.append(fn.getFunctionName()); } sb.append(" [source name: "); sb.append(sof.getSourceName()); sb.append("] [encoded source length: "); sb.append(sof.getEncodedSourceEnd() - sof.getEncodedSourceStart()); sb.append("] [base line: "); sb.append(sof.getBaseLineno()); sb.append("] [end line: "); sb.append(sof.getEndLineno()); sb.append(']'); } else if (this instanceof Jump) { Jump jump = (Jump)this; if (type == Token.BREAK || type == Token.CONTINUE) { sb.append(" [label: "); sb.append(jump.getJumpStatement()); sb.append(']'); } else if (type == Token.TRY) { Node catchNode = jump.target; Node finallyTarget = jump.getFinally(); if (catchNode != null) { sb.append(" [catch: "); sb.append(catchNode); sb.append(']'); } if (finallyTarget != null) { sb.append(" [finally: "); sb.append(finallyTarget); sb.append(']'); } } else if (type == Token.LABEL || type == Token.LOOP || type == Token.SWITCH) { sb.append(" [break: "); sb.append(jump.target); sb.append(']'); if (type == Token.LOOP) { sb.append(" [continue: "); sb.append(jump.getContinue()); sb.append(']'); } } else { sb.append(" [target: "); sb.append(jump.target); sb.append(']'); } } else if (type == Token.NUMBER) { sb.append(' '); sb.append(getDouble()); } if (lineno != -1) { sb.append(' '); sb.append(lineno); } for (PropListItem x = propListHead; x != null; x = x.next) { int type = x.type; sb.append(" ["); sb.append(propToString(type)); sb.append(": "); String value; switch (type) { case TARGETBLOCK_PROP : // can't add this as it recurses value = "target block property"; break; case LOCAL_BLOCK_PROP : // can't add this as it is dull value = "last local block"; break; case ISNUMBER_PROP: switch (x.intValue) { case BOTH: value = "both"; break; case RIGHT: value = "right"; break; case LEFT: value = "left"; break; default: throw Kit.codeBug(); } break; case SPECIALCALL_PROP: switch (x.intValue) { case SPECIALCALL_EVAL: value = "eval"; break; case SPECIALCALL_WITH: value = "with"; break; default: // NON_SPECIALCALL should not be stored throw Kit.codeBug(); } break; default : Object obj = x.objectValue; if (obj != null) { value = obj.toString(); } else { value = String.valueOf(x.intValue); } break; } sb.append(value); sb.append(']'); } return sb.toString(); } return String.valueOf(type); } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/bdb00e047ccc216bf4a36c4ecfe316b047f06fb9/Node.java/clean/js/rhino/src/org/mozilla/javascript/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
3639,
309,
261,
1345,
18,
1188,
26590,
13,
288,
5411,
6674,
2393,
273,
394,
6674,
12,
1345,
18,
529,
12,
723,
10019,
5411,
309,
261,
2211,
1276,
514,
907,
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,
514,
1762,
1435,
288,
3639,
309,
261,
1345,
18,
1188,
26590,
13,
288,
5411,
6674,
2393,
273,
394,
6674,
12,
1345,
18,
529,
12,
723,
10019,
5411,
309,
261,
2211,
1276,
514,
907,
13... |
String[] lines = decompile( className, classPath ); | String[] lines = decompile( className, classPath, environmentProperties ); | private BinaryStackTrace translateStackTrace( String message, String classPath, String preprocessedSourcePath, File[] sourceDirs, String className, String methodName, String offset ) throws DecompilerNotInstalledException { // decompile the class-code: String[] lines = decompile( className, classPath ); // try to find the method-call which is in the error-message: String[] methodLines = parseMethod( lines, methodName, offset ); if (methodLines.length == 0) { //System.out.println("Unable to find decompiled method-call."); return null; } // now try to find the original source-code-line: String sourceMessage = getSourceFilePosition( className, methodName, this.sourceCodeLine, preprocessedSourcePath, sourceDirs ); return new BinaryStackTrace( message, sourceMessage, methodLines, this.decompiledCodeSnippet ); } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/35b1e09420f5573e4e79dcb88d34c4f718f5c304/StackTraceUtil.java/buggy/build/source/src/de/enough/polish/stacktrace/StackTraceUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
7896,
6332,
4204,
6332,
12,
514,
883,
16,
514,
22503,
16,
514,
675,
11005,
1830,
743,
16,
1387,
8526,
1084,
9872,
16,
514,
2658,
16,
514,
4918,
16,
514,
1384,
262,
202,
15069... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7896,
6332,
4204,
6332,
12,
514,
883,
16,
514,
22503,
16,
514,
675,
11005,
1830,
743,
16,
1387,
8526,
1084,
9872,
16,
514,
2658,
16,
514,
4918,
16,
514,
1384,
262,
202,
15069... |
protected FBWrappingDataSource createFBWrappingDataSource() throws SQLException { | protected FBWrappingDataSource createFBWrappingDataSource() throws SQLException { | protected FBWrappingDataSource createFBWrappingDataSource() throws SQLException { final FBWrappingDataSource returnValue = new FBWrappingDataSource(); returnValue.setType(getGdsType().toString()); return returnValue; } | 6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/42c47c2ef4bdc7f9117f5646b1942c11e394c123/FBTestBase.java/buggy/src/test/org/firebirdsql/common/FBTestBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
478,
38,
30888,
8597,
752,
22201,
30888,
8597,
1435,
1216,
6483,
3639,
288,
3639,
727,
478,
38,
30888,
8597,
7750,
273,
394,
478,
38,
30888,
8597,
5621,
3639,
7750,
18,
542,
559,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
478,
38,
30888,
8597,
752,
22201,
30888,
8597,
1435,
1216,
6483,
3639,
288,
3639,
727,
478,
38,
30888,
8597,
7750,
273,
394,
478,
38,
30888,
8597,
5621,
3639,
7750,
18,
542,
559,
12... |
fBtnImport.setText("Import..."); | fBtnImport.setText(LaunchUIPlugin.getResourceString("CEnvironmentTab.Import...")); | private void createButtons(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); composite.setLayout(new GridLayout(1, true)); fBtnNew = new Button(composite, SWT.NONE); fBtnNew.setText("New..."); fBtnNew.setLayoutData(new GridData(GridData.FILL_BOTH)); fBtnNew.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { newEntry(); } }); fBtnImport = new Button(composite, SWT.NONE); fBtnImport.setText("Import..."); fBtnImport.setLayoutData(new GridData(GridData.FILL_BOTH)); fBtnImport.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { importEntries(); } }); fBtnEdit = new Button(composite, SWT.NONE); fBtnEdit.setText("Edit..."); fBtnEdit.setLayoutData(new GridData(GridData.FILL_BOTH)); fBtnEdit.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { edit(); } }); fBtnRemove = new Button(composite, SWT.NONE); fBtnRemove.setText("Remove"); fBtnRemove.setLayoutData(new GridData(GridData.FILL_BOTH)); fBtnRemove.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { remove(); } }); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/e18d7494d05c2df37d92c9fd60d82ec6edb98ab2/CEnvironmentTab.java/clean/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
14388,
12,
9400,
982,
13,
288,
202,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
27676,
18,
542,
3744,
751,
12,
2704,
7145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
14388,
12,
9400,
982,
13,
288,
202,
202,
9400,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
1769,
202,
202,
27676,
18,
542,
3744,
751,
12,
2704,
7145,
... |
return (EReference)viewEClass.getEStructuralFeatures().get(9); } | return (EReference)viewEClass.getEStructuralFeatures().get(9); } | public EReference getView_TransientChildren() { return (EReference)viewEClass.getEStructuralFeatures().get(9); } | 1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/1d1e28c0f7853dd16bd3fe819770773ed4e61d20/NotationPackageImpl.java/buggy/org.eclipse.gmf.notation/plugins/org.eclipse.gmf.runtime.notation/src/org/eclipse/gmf/runtime/notation/impl/NotationPackageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
512,
2404,
8893,
67,
19638,
4212,
1435,
288,
202,
202,
2463,
261,
41,
2404,
13,
1945,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
29,
1769,
202,
97,
2,
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,
1,
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,
512,
2404,
8893,
67,
19638,
4212,
1435,
288,
202,
202,
2463,
261,
41,
2404,
13,
1945,
5720,
18,
588,
41,
14372,
8696,
7675,
588,
12,
29,
1769,
202,
97,
2,
-100,
-100,
-100,
... |
newPeers[newPeers.length-1] = new Peer(node.localhostAddress, detectedPeer.getPort()); | newPeers[p.length] = extra; | public Peer[] getHandshakeIPs(){ Peer[] p=null; if(detectedPeer == null && nominalPeer.size() == 0) return new Peer[0]; InetAddress peerIP = detectedPeer.getHandshakeAddress(); if(peerIP == null && nominalPeer.size() == 0) return new Peer[0]; if( peerIP != null && ! nominalPeer.contains(detectedPeer)){ p= new Peer[1+nominalPeer.size()]; p[0]=detectedPeer; for(int i=1;i<nominalPeer.size()+1;i++) p[i]=(Peer) nominalPeer.get(i-1); }else{ p = (Peer[]) nominalPeer.toArray(new Peer[nominalPeer.size()]); } // Hack for two nodes on the same IP that can't talk over inet for routing reasons InetAddress localhost = node.localhostAddress; FreenetInetAddress nodeAddr = node.getPrimaryIPAddress(); InetAddress nodeIP = nodeAddr == null ? null : nodeAddr.getAddress(); if(nodeIP != null && nodeIP.equals(localhost)) return p; if(peerIP != null && peerIP.equals(localhost)) return p; if(nodeIP != null && nodeIP.equals(peerIP)) { Peer[] newPeers = new Peer[p.length+1]; System.arraycopy(p, 0, newPeers, 0, p.length); newPeers[newPeers.length-1] = new Peer(node.localhostAddress, detectedPeer.getPort()); p = newPeers; } return p; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/d239b187b02c606263d968ad007368304b084720/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10669,
8526,
336,
14545,
18246,
1435,
95,
377,
202,
6813,
8526,
293,
33,
2011,
31,
377,
202,
377,
202,
430,
12,
8238,
828,
6813,
422,
446,
597,
12457,
1490,
6813,
18,
1467,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10669,
8526,
336,
14545,
18246,
1435,
95,
377,
202,
6813,
8526,
293,
33,
2011,
31,
377,
202,
377,
202,
430,
12,
8238,
828,
6813,
422,
446,
597,
12457,
1490,
6813,
18,
1467,
1435,
... |
byte[][] tuple = new byte[1][0]; | public java.sql.ResultSet getTableTypes() throws SQLException { Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; f[0] = new Field(connection,new String("TABLE_TYPE"),iVarcharOid,32); for(int i=0;i<getTableTypes.length;i++) { tuple[0] = getTableTypes[i][0].getBytes(); v.addElement(tuple); } return new ResultSet(connection,f,v,"OK",1); } | 45454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45454/9eddc7519d5ef21ff5f57f76470074adf5a421f6/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
5638,
2016,
1435,
1216,
6483,
225,
288,
565,
2286,
284,
8526,
273,
394,
2286,
63,
21,
15533,
565,
5589,
331,
273,
394,
5589,
5621,
4202,
284,
63,
20,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
18,
4669,
18,
13198,
5638,
2016,
1435,
1216,
6483,
225,
288,
565,
2286,
284,
8526,
273,
394,
2286,
63,
21,
15533,
565,
5589,
331,
273,
394,
5589,
5621,
4202,
284,
63,
20,
65... | |
if (((IViewReference) fastViews.get(i)).getId().equals(partId)) return true; | IViewReference ref = (IViewReference) fastViews.get(i); String secondaryId = ref.getSecondaryId(); String refId = (secondaryId == null ? ref.getId() : ref.getId() + ":" + secondaryId); if (refId.equals(partId)) { return true; } | private boolean isFastViewId(String partId) { for (int i = 0; i < fastViews.size(); i++) { if (((IViewReference) fastViews.get(i)).getId().equals(partId)) return true; } return false; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/84a865a2c834d89a94c4cb3f6b737847b7173ca9/PageLayout.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PageLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
353,
12305,
1767,
548,
12,
780,
1087,
548,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4797,
9959,
18,
1467,
5621,
277,
27245,
288,
5411,
309,
261,
12443,
45,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
12305,
1767,
548,
12,
780,
1087,
548,
13,
288,
3639,
364,
261,
474,
277,
273,
374,
31,
277,
411,
4797,
9959,
18,
1467,
5621,
277,
27245,
288,
5411,
309,
261,
12443,
45,... |
Marker marker = AttributeFactory.eINSTANCE.createMarker(); marker.setSize(5); marker.setType(MarkerType.BOX_LITERAL); marker.setVisible(true); scatterseries.setMarker(marker); | Marker marker = AttributeFactory.eINSTANCE.createMarker(); marker.setSize(5); marker.setType(MarkerType.BOX_LITERAL); marker.setVisible(true); scatterseries.setMarker(marker); | private Series getConvertedSeries(Series series) { // Do not convert base series if(series.getClass().getName().equals("org.eclipse.birt.chart.model.component.impl.SeriesImpl")) { return series; } ScatterSeries scatterseries = (ScatterSeries) ScatterSeriesImpl.create(); scatterseries.getLineAttributes().setVisible(false); if(!(series instanceof LineSeries)) { Marker marker = AttributeFactory.eINSTANCE.createMarker(); marker.setSize(5); marker.setType(MarkerType.BOX_LITERAL); marker.setVisible(true); scatterseries.setMarker(marker); } else { scatterseries.setMarker(((LineSeries) series).getMarker()); } // Copy generic series properties scatterseries.setLabel(series.getLabel()); if(series.getLabelPosition().equals(Position.INSIDE_LITERAL) || series.getLabelPosition().equals(Position.OUTSIDE_LITERAL)) { scatterseries.setLabelPosition(Position.ABOVE_LITERAL); } else { scatterseries.setLabelPosition(series.getLabelPosition()); } scatterseries.setVisible(series.isVisible()); if(series.eIsSet(ComponentPackage.eINSTANCE.getSeries_Triggers())) { scatterseries.getTriggers().addAll(series.getTriggers()); } if(series.eIsSet(ComponentPackage.eINSTANCE.getSeries_DataPoint())) { scatterseries.setDataPoint(series.getDataPoint()); } if(series.eIsSet(ComponentPackage.eINSTANCE.getSeries_DataDefinition())) { scatterseries.getDataDefinition().addAll(series.getDataDefinition()); } // Copy series specific properties if(series instanceof BarSeries) { scatterseries.getLineAttributes().setColor(((BarSeries) series).getRiserOutline()); } else if(series instanceof PieSeries) { scatterseries.getLineAttributes().setColor(((PieSeries) series).getSliceOutline()); } else if(series instanceof StockSeries) { scatterseries.getLineAttributes().setColor(((StockSeries) series).getLineAttributes().getColor()); } return scatterseries; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/588e7d9d61e91804070df10605592e7dbd22ac16/ScatterChart.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/ScatterChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
9225,
336,
22063,
6485,
12,
6485,
4166,
13,
565,
288,
3639,
368,
2256,
486,
1765,
1026,
4166,
3639,
309,
12,
10222,
18,
588,
797,
7675,
17994,
7675,
14963,
2932,
3341,
18,
20416,
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,
3238,
9225,
336,
22063,
6485,
12,
6485,
4166,
13,
565,
288,
3639,
368,
2256,
486,
1765,
1026,
4166,
3639,
309,
12,
10222,
18,
588,
797,
7675,
17994,
7675,
14963,
2932,
3341,
18,
20416,
18... |
out=new PrintWriter(new FileWriter(new File(outdir,"emailable-report.html"))); | out= new PrintWriter( new FileWriter(new File(outdir,"emailable-report.html"))); | public void generateReport( List<XmlSuite> xml, List<ISuite> suites, String outdir) { try { out=new PrintWriter(new FileWriter(new File(outdir,"emailable-report.html"))); } catch(IOException e) { logger.error("output file",e); return; } startHtml(out); summarize(suites); for(ISuite suite : suites) { out.println("<a id=summary></a>"); Map<String,ISuiteResult> r=suite.getResults(); startResultSummaryTable("passed"); for(ISuiteResult r2 : r.values()) { if(r.values().size()>1) { titleRow( r2.getTestContext().getName(), 4); } resultSummary( r2.getTestContext().getFailedTests(), "failed"); resultSummary( r2.getTestContext().getPassedTests(), "passed"); resultSummary( r2.getTestContext().getSkippedTests(), "skipped"); } out.println("</table>"); for(ISuiteResult r2 : r.values()) { if(r.values().size()>0) { out.println("<h1>"+r2.getTestContext().getName()+"</h1>"); } resultDetail( r2.getTestContext().getFailedTests(), "failed"); resultDetail( r2.getTestContext().getPassedTests(), "passed"); } } endHtml(out); out.close(); } | 47060 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47060/2c30372d5bda4ec1fa4ac94eaa43d64f3e1d0a1a/EmailableReporter.java/clean/src/main/org/testng/reporters/EmailableReporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2103,
4820,
12,
565,
987,
32,
4432,
13587,
34,
2025,
16,
565,
987,
32,
5127,
9519,
34,
27208,
16,
565,
514,
15398,
13,
225,
288,
565,
775,
288,
1377,
596,
33,
394,
14071,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
4820,
12,
565,
987,
32,
4432,
13587,
34,
2025,
16,
565,
987,
32,
5127,
9519,
34,
27208,
16,
565,
514,
15398,
13,
225,
288,
565,
775,
288,
1377,
596,
33,
394,
14071,
1... |
public static Bucket filter(Bucket data, BucketFactory bf, String typeName) throws UnsafeContentTypeException, IOException { | public static Bucket filter(Bucket data, BucketFactory bf, String typeName, URI baseURI) throws UnsafeContentTypeException, IOException { | public static Bucket filter(Bucket data, BucketFactory bf, String typeName) throws UnsafeContentTypeException, IOException { String type = typeName; String options = ""; String charset = null; HashMap otherParams = null; // First parse the MIME type int idx = type.indexOf(';'); if(idx != -1) { options = type.substring(idx+1); type = type.substring(0, idx); // Parse options // Format: <type>/<subtype>[ optional white space ];[ optional white space ]<param>=<value>; <param2>=<value2>; ... String[] rawOpts = options.split(";"); for(int i=0;i<rawOpts.length;i++) { String raw = rawOpts[i]; idx = raw.indexOf('='); if(idx == -1) { Logger.error(ContentFilter.class, "idx = -1 for '=' on option: "+raw+" from "+typeName); continue; } String before = raw.substring(0, idx).trim(); String after = raw.substring(idx+1).trim(); if(before.equals("charset")) { charset = after; } else { if(otherParams == null) otherParams = new HashMap(); otherParams.put(before, after); } } } // Now look for a MIMEType handler MIMEType handler = getMIMEType(type); if(handler == null) throw new UnknownContentTypeException(typeName); else { if(handler.safeToRead) { return data; } if(handler.readFilter != null) { if(handler.takesACharset && (charset == null || charset.length() == 0)) { charset = detectCharset(data, handler); } return handler.readFilter.readFilter(data, bf, charset, otherParams, new GenericReadFilterCallback()); } handler.throwUnsafeContentTypeException(); return null; } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/fed5a513af06f8d2ce8e1af88eb3fb217ee029e5/ContentFilter.java/buggy/src/freenet/clients/http/filter/ContentFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
7408,
1034,
12,
4103,
501,
16,
7408,
1733,
16222,
16,
514,
8173,
13,
1216,
27476,
8046,
503,
16,
1860,
288,
202,
202,
780,
618,
273,
8173,
31,
202,
202,
780,
702,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
7408,
1034,
12,
4103,
501,
16,
7408,
1733,
16222,
16,
514,
8173,
13,
1216,
27476,
8046,
503,
16,
1860,
288,
202,
202,
780,
618,
273,
8173,
31,
202,
202,
780,
702,
273,
... |
System.out.println( "An error occured when running the mail listner." + e.getMessage()); | e.printStackTrace(); | public void run() { // log.info(Message.getMessage("start00", "SimpleMailListner", host + ":" + // port)); TODO Issue #1 CT 07-Feb-2005. // Accept and process requests from the socket if (!stopped) { String logMessage = "Mail listner is being setup to listen to the address " + user + "@" + host + " On port " + port; System.out.println(logMessage); log.info(logMessage); } while (!stopped) { try { final PasswordAuthentication authentication = new PasswordAuthentication(user, password); Properties props = new Properties(); props.put("mail.user", user); props.put("mail.host", host); props.put("mail.store.protocol", "pop3"); props.put("mail.transport.protocol", "smtp"); Session session = Session.getInstance(props,new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return authentication; } }); Store store = session.getStore(); store.connect(); Folder root = store.getDefaultFolder(); Folder inbox = root.getFolder("inbox"); inbox.open(Folder.READ_WRITE); Message[] msgs = inbox.getMessages(); int numMessages = msgs.length; if (msgs.length == 0) { System.out.println("No messages in inbox"); } for (int i = 0; i < msgs.length; i++) { MimeMessage msg = (MimeMessage) msgs[i]; if (msg != null) { MailWorker worker = new MailWorker(msg, configurationContext); if (doThreads) { Thread thread = new Thread(worker); thread.setDaemon(true); thread.start(); } else { worker.run(); } } msg.setFlag(Flags.Flag.DELETED, true); } inbox.close(true); store.close(); } catch (Exception e) { //log.debug(Messages.getMessage("exception00"), e); TODO Issue // #1 CT 07-Feb-2005. log.debug("An error occured when running the mail listner." + e.getMessage(), e); System.out.println( "An error occured when running the mail listner." + e.getMessage()); break; } try { pop3.logout(); pop3.disconnect(); Thread.sleep(3000); } catch (Exception e) { //log.error(Messages.getMessage("exception00"), e); TODO Issue // #1 CT 07-Feb-2005. log.debug( "An error occured when trying to disconnect from the Server." + e.getMessage(), e); System.out.println( "An error occured when trying to disconnect from the Server." + e.getMessage()); } } log.info("Mail listner has been stoped."); System.out.println("Mail listner has been stoped."); //log.info(Messages.getMessage("quit00", "SimpleMailListner")); TODO Issue #1 // CT 07-Feb-2005. } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/2bf823130436a525b529260e41b15d0c370fe5d5/SimpleMailListener.java/clean/modules/core/src/org/apache/axis/transport/mail/SimpleMailListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
368,
613,
18,
1376,
12,
1079,
18,
24906,
2932,
1937,
713,
3113,
315,
5784,
6759,
682,
1224,
3113,
1479,
397,
6153,
397,
3639,
368,
1756,
10019,
2660,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1435,
288,
3639,
368,
613,
18,
1376,
12,
1079,
18,
24906,
2932,
1937,
713,
3113,
315,
5784,
6759,
682,
1224,
3113,
1479,
397,
6153,
397,
3639,
368,
1756,
10019,
2660,
118... |
public boolean get_useIBk() { | public boolean get_useIBk() { | public boolean get_useIBk() { return m_useIBk; } | 4773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4773/9e72041e2204a61830b9cccfa8173a6ed2c39eb5/DecisionTable.java/clean/weka/classifiers/rules/DecisionTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
336,
67,
1202,
13450,
79,
1435,
225,
288,
565,
327,
312,
67,
1202,
13450,
79,
31,
225,
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,
1071,
1250,
336,
67,
1202,
13450,
79,
1435,
225,
288,
565,
327,
312,
67,
1202,
13450,
79,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
{System.err.println("align: " + child); | { | protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { int count = getViewCount(); for (int i = 0; i < count; i++) { View child = getView(i); int max = (int) child.getMaximumSpan(axis); if (max < targetSpan) {System.err.println("align: " + child); // Align child when it can't be made as wide as the target span. float align = child.getAlignment(axis); offsets[i] = (int) ((targetSpan - max) * align); spans[i] = max; } else { // Expand child to target width if possible. int min = (int) child.getMinimumSpan(axis); offsets[i] = 0; spans[i] = Math.max(min, targetSpan); } } } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/1a4369ac28c9132cdc6463e6129892e4f02730ff/BoxView.java/buggy/javax/swing/text/BoxView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
3511,
19549,
6558,
12,
474,
1018,
6952,
16,
509,
2654,
16,
509,
8526,
8738,
16,
4766,
509,
8526,
12791,
13,
225,
288,
565,
509,
1056,
273,
8893,
1380,
5621,
565,
364,
261,
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,
282,
4750,
918,
3511,
19549,
6558,
12,
474,
1018,
6952,
16,
509,
2654,
16,
509,
8526,
8738,
16,
4766,
509,
8526,
12791,
13,
225,
288,
565,
509,
1056,
273,
8893,
1380,
5621,
565,
364,
261,
47... |
if(srcFile!=null) { if(!srcFile.exists() ) { | if (srcFile != null) { if (!srcFile.exists()) { | protected void validate() throws BuildException { if(destFile==null) { throw new BuildException("destination file must be specified"); } if(destFile.isDirectory() ) { throw new BuildException( "destination file is a directory"); } if(url!=null && srcFile!=null) { throw new BuildException( "you can not specify both a source file and a URL"); } if(url==null && srcFile==null) { throw new BuildException( "you must specify either a source file or a URL"); } if(srcFile!=null) { if(!srcFile.exists() ) { throw new BuildException( "source file does not exist"); } if(srcFile.isDirectory() ) { throw new BuildException( "source file is a directory"); } } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/c6c232893c39257745a8f7a618bcdb5c59791cae/WsdlToDotnet.java/buggy/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1954,
1435,
2398,
1216,
18463,
288,
3639,
309,
12,
10488,
812,
631,
2011,
13,
288,
5411,
604,
394,
18463,
2932,
10590,
585,
1297,
506,
1269,
8863,
3639,
289,
3639,
309,
12,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1954,
1435,
2398,
1216,
18463,
288,
3639,
309,
12,
10488,
812,
631,
2011,
13,
288,
5411,
604,
394,
18463,
2932,
10590,
585,
1297,
506,
1269,
8863,
3639,
289,
3639,
309,
12,
104... |
return new SwingMenuItemPeer(this, target); } | return new SwingMenuItemPeer(this, target); } | protected MenuItemPeer createMenuItem(MenuItem target) { return new SwingMenuItemPeer(this, target); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/84758a7d3b99e8187ce85341fd9b3ce57352674b/SwingToolkit.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingToolkit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
25085,
6813,
752,
12958,
12,
12958,
1018,
13,
288,
202,
202,
2463,
394,
26145,
12958,
6813,
12,
2211,
16,
1018,
1769,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
25085,
6813,
752,
12958,
12,
12958,
1018,
13,
288,
202,
202,
2463,
394,
26145,
12958,
6813,
12,
2211,
16,
1018,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } | if ((string = EvalHelper.evalString("scrolling", getScrollingExpr(), this, pageContext)) != null) setScrolling(string); | private void evaluateExpressions() throws JspException { try { setAnchor((String) evalAttr("anchor", getAnchorExpr(), String.class)); } catch (NullAttributeException ex) { } try { setForward((String) evalAttr("forward", getForwardExpr(), String.class)); } catch (NullAttributeException ex) { } try { setFrameborder((String) evalAttr("frameborder", getFrameborderExpr(), String.class)); } catch (NullAttributeException ex) { } try { setFrameName((String) evalAttr("frameName", getFrameNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setHref((String) evalAttr("href", getHrefExpr(), String.class)); } catch (NullAttributeException ex) { } try { setLongdesc((String) evalAttr("longdesc", getLongdescExpr(), String.class)); } catch (NullAttributeException ex) { } try { setMarginheight(((Integer) evalAttr("marginheight", getMarginheightExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { } try { setMarginwidth(((Integer) evalAttr("marginwidth", getMarginwidthExpr(), Integer.class)). intValue()); } catch (NullAttributeException ex) { } try { setName((String) evalAttr("name", getNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setNoresize(((Boolean) evalAttr("noresize", getNoresizeExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } try { setPage((String) evalAttr("page", getPageExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamId((String) evalAttr("paramId", getParamIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamName((String) evalAttr("paramName", getParamNameExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamProperty((String) evalAttr("paramProperty", getParamPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setParamScope((String) evalAttr("paramScope", getParamScopeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setProperty((String) evalAttr("property", getPropertyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setScope((String) evalAttr("scope", getScopeExpr(), String.class)); } catch (NullAttributeException ex) { } try { setScrolling((String) evalAttr("scrolling", getScrollingExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyle((String) evalAttr("style", getStyleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleClass((String) evalAttr("styleClass", getStyleClassExpr(), String.class)); } catch (NullAttributeException ex) { } try { setStyleId((String) evalAttr("styleId", getStyleIdExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitle((String) evalAttr("title", getTitleExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTitleKey((String) evalAttr("titleKey", getTitleKeyExpr(), String.class)); } catch (NullAttributeException ex) { } try { setTransaction(((Boolean) evalAttr("transaction", getTransactionExpr(), Boolean.class)). booleanValue()); } catch (NullAttributeException ex) { } } | 48068 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48068/022bd23c954cf673e53731849d562b3c295473f1/ELFrameTag.java/clean/contrib/struts-el/src/share/org/apache/strutsel/taglib/html/ELFrameTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
4742,
9334,
514,
18,
1106,
10019,
3639,
289,
1044... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5956,
8927,
1435,
1216,
27485,
288,
3639,
775,
288,
5411,
444,
11605,
12443,
780,
13,
5302,
3843,
2932,
16215,
3113,
336,
11605,
4742,
9334,
514,
18,
1106,
10019,
3639,
289,
1044... |
sb.append(m.getBody()).append("\n"); | String mBody = m.getBody(); mBody = mBody.replaceAll("\\s+"," "); mBody = mBody.replaceAll("<!--.*?-->",""); mBody = mBody.replaceAll("&.*?;",""); mBody = mBody.replaceAll("<.*?>",""); sb.append(mBody).append("\n"); | public String getContent(Entity cr) { Reference ref = entityManager.newReference(cr.getReference()); EntityProducer ep = ref.getEntityProducer(); if (ep instanceof MessageService) { try { MessageService ms = (MessageService) ep; Message m = ms.getMessage(ref); MessageHeader mh = m.getHeader(); StringBuffer sb = new StringBuffer(); Class c = mh.getClass(); try { Method getSubject = c.getMethod("getSubject",new Class[] {} ); Object o = getSubject.invoke(mh,new Object[]{}); sb.append("Subject: ").append(o.toString()).append("\n"); } catch ( Exception ex ) { // no subject, and I dont mind log.debug("Didnt get Subject from "+mh,ex); } sb.append("Message Headers\n"); sb.append("From ").append(mh.getFrom().getDisplayName()) .append("\n"); sb.append("Message Body\n"); sb.append(m.getBody()).append("\n"); log.debug("Message Content for " + cr.getReference() + " is " + sb.toString()); // resolve attachments List attachments = mh.getAttachments(); for ( Iterator atti = attachments.iterator(); atti.hasNext(); ) { try { Reference attr = (Reference) atti.next(); EntityContentProducer ecp = searchIndexBuilder.newEntityContentProducer(attr); String attachementDigest = ecp.getContent(attr.getEntity()); sb.append("Attachement: \n").append(attachementDigest).append("\n"); } catch ( Exception ex ) { log.info(" Failed to digest attachement "+ex.getMessage()); } } return sb.toString(); } catch (IdUnusedException e) { throw new RuntimeException(" Failed to get message content ", e); } catch (PermissionException e) { throw new RuntimeException(" Failed to get message content ", e); } } throw new RuntimeException(" Not a Message Entity " + cr); } | 51480 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51480/21f19c8f7ffc5e6d887bb2f2f306f65a77186178/MessageContentProducer.java/buggy/search-impl/impl/src/java/org/sakaiproject/search/component/adapter/message/MessageContentProducer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
5154,
12,
1943,
4422,
13,
202,
95,
202,
202,
2404,
1278,
273,
11813,
18,
2704,
2404,
12,
3353,
18,
588,
2404,
10663,
202,
202,
1943,
12140,
5529,
273,
1278,
18,
588,
1943... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
5154,
12,
1943,
4422,
13,
202,
95,
202,
202,
2404,
1278,
273,
11813,
18,
2704,
2404,
12,
3353,
18,
588,
2404,
10663,
202,
202,
1943,
12140,
5529,
273,
1278,
18,
588,
1943... |
return (int) this.dominantFactHandle.getId(); | if (this.dominantFactHandle != null) { return (int) this.dominantFactHandle.getId(); } else { return 0; } | public int hashCode() { return (int) this.dominantFactHandle.getId(); } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/ec62b9539fdeee3a0294b46327b83da16d97c228/Token.java/buggy/drools-core/src/main/java/org/drools/leaps/Token.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13374,
1435,
288,
202,
202,
2463,
261,
474,
13,
333,
18,
9859,
20030,
9766,
3259,
18,
26321,
5621,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
13374,
1435,
288,
202,
202,
2463,
261,
474,
13,
333,
18,
9859,
20030,
9766,
3259,
18,
26321,
5621,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
byte[] xmlChunk = new byte[chunkLength]; in.read(xmlChunk); if (xmlChunk[0] != 0x2a) { | if (in.read() != 0x2a) { | protected void initFile(String id) throws FormatException, IOException { super.initFile(id); offsets = new Vector(); in = new RandomAccessFile(id, "r"); littleEndian = true; // read the header byte[] header = new byte[8]; in.read(header); if ((header[0] != 0x70) && (header[3] != 0x70)) { throw new FormatException(id + " is not a valid Leica LIF file"); } int chunkLength = DataTools.bytesToInt(header, 4, 4, littleEndian); // read and parse the XML description byte[] xmlChunk = new byte[chunkLength]; in.read(xmlChunk); if (xmlChunk[0] != 0x2a) { throw new FormatException("Invalid XML description"); } // number of Unicode characters in the XML block int nc = DataTools.bytesToInt(xmlChunk, 1, 4, littleEndian); String xml = new String(xmlChunk, 5, nc*2); xml = DataTools.stripString(xml); while (in.getFilePointer() < in.length()) { byte[] four = new byte[4]; in.read(four); int check = DataTools.bytesToInt(four, littleEndian); if (check != 0x70) { throw new FormatException("Invalid Memory Block"); } in.read(four); int memLength = DataTools.bytesToInt(four, littleEndian); if (in.read() != 0x2a) { throw new FormatException("Invalid Memory Description"); } in.read(four); int blockLength = DataTools.bytesToInt(four, littleEndian); if (in.read() != 0x2a) { throw new FormatException("Invalid Memory Description"); } in.read(four); int descrLength = DataTools.bytesToInt(four, littleEndian); byte[] memDescr = new byte[2*descrLength]; in.read(memDescr); String descr = new String(memDescr); descr = DataTools.stripString(descr); if (blockLength > 0) { offsets.add(new Long(in.getFilePointer())); } in.skipBytes(blockLength); } numImages = offsets.size(); initMetadata(xml); } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/2df09d33bfdc966378aae0cc09cb503afb983bc2/LIFReader.java/buggy/loci/formats/in/LIFReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
8738,
273,
394,
5589,
5621,
565,
316,
273,
394,
8072,
26933,
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,
918,
1208,
812,
12,
780,
612,
13,
1216,
4077,
503,
16,
1860,
288,
565,
2240,
18,
2738,
812,
12,
350,
1769,
565,
8738,
273,
394,
5589,
5621,
565,
316,
273,
394,
8072,
26933,
12,
... |
if (index >= 0) new MenuItem(menu, SWT.SEPARATOR, index); else new MenuItem(menu, SWT.SEPARATOR); | if (index >= 0) { new MenuItem(menu, SWT.SEPARATOR, index); } else { new MenuItem(menu, SWT.SEPARATOR); } | public void fill(Menu menu, int index) { if (index >= 0) new MenuItem(menu, SWT.SEPARATOR, index); else new MenuItem(menu, SWT.SEPARATOR); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/391f2606b4ea2c1fb5052d938ca90877ee7631f6/Separator.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/action/Separator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3636,
12,
4599,
3824,
16,
509,
770,
13,
288,
3639,
309,
261,
1615,
1545,
374,
13,
5411,
394,
25085,
12,
5414,
16,
348,
8588,
18,
4550,
16,
770,
1769,
3639,
469,
5411,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3636,
12,
4599,
3824,
16,
509,
770,
13,
288,
3639,
309,
261,
1615,
1545,
374,
13,
5411,
394,
25085,
12,
5414,
16,
348,
8588,
18,
4550,
16,
770,
1769,
3639,
469,
5411,
394,
... |
util.dprintln(5, "Role Authorized"); | logger.debug("Role Authorized"); | public boolean isRoleAuthorized(List roles, HttpServletRequest request) { ListIterator r = roles.listIterator(); String s = ""; while (r.hasNext()) { s = (String)r.next(); util.dprintln(5, "Testing role: "+s); if (request.isUserInRole(s)) { util.dprintln(5, "Role Authorized"); return true; } } return false; } | 53488 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53488/a15bccbb1f38458138bc2da842bfc1f95800141c/AuthOpsImpl.java/buggy/servlet/src/digilib/auth/AuthOpsImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
2996,
15341,
12,
682,
4900,
16,
9984,
590,
13,
288,
565,
987,
3198,
436,
273,
4900,
18,
1098,
3198,
5621,
565,
514,
272,
273,
1408,
31,
565,
1323,
261,
86,
18,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
353,
2996,
15341,
12,
682,
4900,
16,
9984,
590,
13,
288,
565,
987,
3198,
436,
273,
4900,
18,
1098,
3198,
5621,
565,
514,
272,
273,
1408,
31,
565,
1323,
261,
86,
18,
5332,
... |
public void readFully(byte b[]) throws IOException { throw new IOException("not required"); } | public void readFully(byte b[]) throws IOException { throw new IOException("not required"); } | public void readFully(byte b[]) throws IOException { throw new IOException("not required");} | 25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/84d120cc49d42a79bfbc68fe36429395bdef90fd/UnicastRemoteCall.java/clean/libjava/gnu/java/rmi/server/UnicastRemoteCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
31803,
12,
7229,
324,
63,
5717,
1216,
1860,
288,
202,
12849,
394,
1860,
2932,
902,
1931,
8863,
97,
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,
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,
1071,
918,
31803,
12,
7229,
324,
63,
5717,
1216,
1860,
288,
202,
12849,
394,
1860,
2932,
902,
1931,
8863,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if(advancedMode) { belowPanel.add(priorityPanel); | if(this.advancedMode) { this.belowPanel.add(this.priorityPanel); | public FetchPanel(Core core, FetchPlugin fetchPlugin) { this.core = core; this.fetchPlugin = fetchPlugin; advancedMode = Boolean.valueOf(core.getConfig().getValue("advancedMode")).booleanValue(); mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout(20, 20)); centeredPart = new JPanel(); centeredPart.setLayout(new BorderLayout(10, 10)); validationButton = new JButton(I18n.getMessage("thaw.common.fetch")); validationButton.setPreferredSize(new Dimension(300, 40)); validationButton.addActionListener(this); filePanel = new JPanel(); filePanel.setLayout(new BorderLayout()); /* FILE LIST */ fileList = new JTextArea(); fileLabel = new JLabel(I18n.getMessage("thaw.plugin.fetch.keyList")); loadListButton = new JButton(I18n.getMessage("thaw.plugin.fetch.loadKeyListFromFile")); loadListButton.addActionListener(this); pasteButton = new JButton(I18n.getMessage("thaw.plugin.fetch.pasteFromClipboard")); pasteButton.addActionListener(this); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridLayout(1,2)); buttonPanel.add(pasteButton); buttonPanel.add(loadListButton); filePanel.add(fileLabel, BorderLayout.NORTH); filePanel.add(new JScrollPane(fileList), BorderLayout.CENTER); filePanel.add(buttonPanel, BorderLayout.SOUTH); /* below panel */ belowPanel = new JPanel(); if(advancedMode) belowPanel.setLayout(new GridLayout(2, 2, 10, 10)); else belowPanel.setLayout(new GridLayout(1, 2, 10, 10)); /* PRIORITY */ priorityPanel = new JPanel(); priorityPanel.setLayout(new GridLayout(2, 1, 5, 5)); priorityLabel = new JLabel(I18n.getMessage("thaw.common.priority")); priorities = new String[] { I18n.getMessage("thaw.plugin.priority.p0"), I18n.getMessage("thaw.plugin.priority.p1"), I18n.getMessage("thaw.plugin.priority.p2"), I18n.getMessage("thaw.plugin.priority.p3"), I18n.getMessage("thaw.plugin.priority.p4"), I18n.getMessage("thaw.plugin.priority.p5"), I18n.getMessage("thaw.plugin.priority.p6") }; prioritySelecter = new JComboBox(priorities); prioritySelecter.setSelectedItem(I18n.getMessage("thaw.plugin.priority.p4")); priorityPanel.add(priorityLabel); priorityPanel.add(prioritySelecter); /* QUEUE */ queuePanel = new JPanel(); queuePanel.setLayout(new GridLayout(2, 1, 5, 5)); queueLabel = new JLabel(I18n.getMessage("thaw.common.globalQueue")); queues = new String [] { I18n.getMessage("thaw.common.true"), I18n.getMessage("thaw.common.false"), }; queueSelecter = new JComboBox(queues); queuePanel.add(queueLabel); queuePanel.add(queueSelecter); /* DESTINATION */ destinationLabel = new JLabel(I18n.getMessage("thaw.plugin.fetch.destinationDirectory")); dstChoosePanel = new JPanel(); dstChoosePanel.setLayout(new GridLayout(3,1, 5, 5)); destinationField = new JTextField(""); if(core.getConfig().getValue("lastDestinationDirectory") != null) destinationField.setText(core.getConfig().getValue("lastDestinationDirectory")); destinationField.setEditable(true); destinationButton = new JButton(I18n.getMessage("thaw.plugin.fetch.chooseDestination")); destinationButton.addActionListener(this); dstChoosePanel.add(destinationLabel); dstChoosePanel.add(destinationField); dstChoosePanel.add(destinationButton); if(advancedMode) { belowPanel.add(priorityPanel); //belowPanel.add(persistencePanel); belowPanel.add(queuePanel); } belowPanel.add(dstChoosePanel); if(!advancedMode) { belowPanel.add(new JPanel()); } centeredPart.add(filePanel, BorderLayout.CENTER); centeredPart.add(belowPanel, BorderLayout.SOUTH); mainPanel.add(centeredPart, BorderLayout.CENTER); mainPanel.add(validationButton, BorderLayout.SOUTH); } | 47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/88402a3bc59123261d50a7cfed0ac20de2b772f6/FetchPanel.java/clean/src/thaw/plugins/fetchPlugin/FetchPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8065,
5537,
12,
4670,
2922,
16,
8065,
3773,
2158,
3773,
13,
288,
202,
202,
2211,
18,
3644,
273,
2922,
31,
202,
202,
2211,
18,
5754,
3773,
273,
2158,
3773,
31,
202,
202,
27080,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8065,
5537,
12,
4670,
2922,
16,
8065,
3773,
2158,
3773,
13,
288,
202,
202,
2211,
18,
3644,
273,
2922,
31,
202,
202,
2211,
18,
5754,
3773,
273,
2158,
3773,
31,
202,
202,
27080,... |
} | } | public boolean hasStateName(int ic, int s) { return (stateNames!= null && ic>=0 && ic<numChars && stateNames[ic]!=null && s< stateNames[ic].length && stateNames[ic][s]!=null); } | 56479 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56479/f13d81739af31354f83b14c9490772258666d61b/CategoricalData.java/clean/Source/mesquite/categ/lib/CategoricalData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
202,
482,
1250,
711,
1119,
461,
12,
474,
13579,
16,
509,
272,
13,
288,
202,
202,
2463,
261,
2019,
1557,
5,
33,
446,
597,
13579,
34,
33,
20,
597,
13579,
32,
2107,
7803,
597,
919,
1557,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
202,
482,
1250,
711,
1119,
461,
12,
474,
13579,
16,
509,
272,
13,
288,
202,
202,
2463,
261,
2019,
1557,
5,
33,
446,
597,
13579,
34,
33,
20,
597,
13579,
32,
2107,
7803,
597,
919,
1557,... |
public int sizeOfNotSeenList() {return not_seen == null? 0 : not_seen.size();} | public int sizeOfNotSeenList() { return not_seen == null ? 0 : not_seen.size(); } | public int sizeOfNotSeenList() {return not_seen == null? 0 : not_seen.size();} | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/462c7e2ed6980678c603a434a8eb5bc2e6749ac2/Gossip.java/buggy/src/org/jgroups/protocols/pbcast/Gossip.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
29970,
1248,
15160,
682,
1435,
288,
2463,
486,
67,
15156,
422,
446,
35,
374,
294,
486,
67,
15156,
18,
1467,
5621,
97,
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,
509,
29970,
1248,
15160,
682,
1435,
288,
2463,
486,
67,
15156,
422,
446,
35,
374,
294,
486,
67,
15156,
18,
1467,
5621,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (jj_scan_token(FINAL)) return true; | if (jj_3R_410()) return true; | final private boolean jj_3R_393() { if (jj_scan_token(FINAL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/83d81b076b32acdf3f82077c7f4c2a2e160aa32f/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,
5520,
23,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
24,
2163,
10756,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
1250,
10684,
67,
23,
54,
67,
5520,
23,
1435,
288,
565,
309,
261,
78,
78,
67,
23,
54,
67,
24,
2163,
10756,
327,
638,
31,
565,
309,
261,
78,
78,
67,
11821,
422,
374,
597,
... |
ISelection selection = this.view.getViewer().getSelection(); Object obj = ((IStructuredSelection)selection).getFirstElement(); if (obj instanceof ITask) { if (obj instanceof BugzillaTask) { BugzillaTask t = (BugzillaTask) obj; MylarTasksPlugin.Report_Open_Mode mode = MylarTasksPlugin.getDefault().getReportMode(); if (mode == MylarTasksPlugin.Report_Open_Mode.EDITOR) { t.openTaskInEditor(); } else if (mode == MylarTasksPlugin.Report_Open_Mode.INTERNAL_BROWSER) { openUrl(t.getBugUrl()); } else { } } else { ((ITask)obj).openTaskInEditor(); } } else if (obj instanceof BugzillaQueryCategory){ BugzillaQueryDialog sqd = new BugzillaQueryDialog(Display.getCurrent().getActiveShell()); if(sqd.open() == Dialog.OK){ BugzillaQueryCategory queryCategory = (BugzillaQueryCategory)obj; queryCategory.setDescription(sqd.getName()); queryCategory.setUrl(sqd.getUrl()); queryCategory.refreshBugs(); this.view.getViewer().refresh(); } } else if(obj instanceof BugzillaHit){ BugzillaHit hit = (BugzillaHit)obj; MylarTasksPlugin.Report_Open_Mode mode = MylarTasksPlugin.getDefault().getReportMode(); if (mode == MylarTasksPlugin.Report_Open_Mode.EDITOR) { if(hit.isTask()){ hit.getAssociatedTask().openTaskInEditor(); } else { BugzillaOpenStructure open = new BugzillaOpenStructure(((BugzillaHit)obj).getServerName(), ((BugzillaHit)obj).getID(),-1); List<BugzillaOpenStructure> selectedBugs = new ArrayList<BugzillaOpenStructure>(); selectedBugs.add(open); ViewBugzillaAction viewBugs = new ViewBugzillaAction("Display bugs in editor", selectedBugs); viewBugs.schedule(); } } else if (mode == MylarTasksPlugin.Report_Open_Mode.INTERNAL_BROWSER) { openUrl(hit.getBugUrl()); } else { } } this.view.getViewer().refresh(obj); | throw new RuntimeException("unimplemented"); | public void run() {// MylarPlugin.getDefault().actionObserved(this); ISelection selection = this.view.getViewer().getSelection(); Object obj = ((IStructuredSelection)selection).getFirstElement(); if (obj instanceof ITask) { if (obj instanceof BugzillaTask) { BugzillaTask t = (BugzillaTask) obj; MylarTasksPlugin.Report_Open_Mode mode = MylarTasksPlugin.getDefault().getReportMode(); if (mode == MylarTasksPlugin.Report_Open_Mode.EDITOR) { t.openTaskInEditor(); } else if (mode == MylarTasksPlugin.Report_Open_Mode.INTERNAL_BROWSER) { openUrl(t.getBugUrl()); } else { // not supported } } else { ((ITask)obj).openTaskInEditor(); } } else if (obj instanceof BugzillaQueryCategory){ BugzillaQueryDialog sqd = new BugzillaQueryDialog(Display.getCurrent().getActiveShell()); if(sqd.open() == Dialog.OK){ BugzillaQueryCategory queryCategory = (BugzillaQueryCategory)obj; queryCategory.setDescription(sqd.getName()); queryCategory.setUrl(sqd.getUrl()); queryCategory.refreshBugs(); this.view.getViewer().refresh(); } } else if(obj instanceof BugzillaHit){ BugzillaHit hit = (BugzillaHit)obj; MylarTasksPlugin.Report_Open_Mode mode = MylarTasksPlugin.getDefault().getReportMode(); if (mode == MylarTasksPlugin.Report_Open_Mode.EDITOR) { if(hit.isTask()){ hit.getAssociatedTask().openTaskInEditor(); } else { BugzillaOpenStructure open = new BugzillaOpenStructure(((BugzillaHit)obj).getServerName(), ((BugzillaHit)obj).getID(),-1); List<BugzillaOpenStructure> selectedBugs = new ArrayList<BugzillaOpenStructure>(); selectedBugs.add(open); ViewBugzillaAction viewBugs = new ViewBugzillaAction("Display bugs in editor", selectedBugs); viewBugs.schedule(); } } else if (mode == MylarTasksPlugin.Report_Open_Mode.INTERNAL_BROWSER) { openUrl(hit.getBugUrl()); } else { // not supported } } this.view.getViewer().refresh(obj); } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/23c8cbf0c6d069ce144d0844eb6071420662b796/OpenTaskEditorAction.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/OpenTaskEditorAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
759,
3639,
8005,
7901,
3773,
18,
588,
1868,
7675,
1128,
9013,
2155,
12,
2211,
1769,
202,
565,
467,
6233,
4421,
273,
333,
18,
1945,
18,
588,
18415,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1086,
1435,
288,
759,
3639,
8005,
7901,
3773,
18,
588,
1868,
7675,
1128,
9013,
2155,
12,
2211,
1769,
202,
565,
467,
6233,
4421,
273,
333,
18,
1945,
18,
588,
18415,
7675,
... |
RuntimeCastChecker.checkCast(cTab, exprMustBeNotNull, toTypeIsNullable, obj, toClassType); | RuntimeCastChecker.checkDepType(cTab, obj, toClassType); | public static boolean isInstanceOf(RuntimeConstraint [] cTab, boolean exprMustBeNotNull, boolean toTypeIsNullable, java.lang.Object obj, Class toClassType) { // otherwise we have to check obj respect target type and its constraints. try { RuntimeCastChecker.checkCast(cTab, exprMustBeNotNull, toTypeIsNullable, obj, toClassType); } catch(ClassCastException t) { return false; } catch(NullPointerException t) { return false; } return true; } | 1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/82e0491baa67288a894796776016ca7b40f9ffbd/RuntimeCastChecker.java/clean/x10.runtime/src/x10/lang/RuntimeCastChecker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
28349,
12,
5576,
5806,
5378,
276,
5661,
16,
1250,
3065,
10136,
1919,
5962,
16,
1250,
28234,
2520,
13349,
16,
1082,
202,
6290,
18,
4936,
18,
921,
1081,
16,
1659,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
28349,
12,
5576,
5806,
5378,
276,
5661,
16,
1250,
3065,
10136,
1919,
5962,
16,
1250,
28234,
2520,
13349,
16,
1082,
202,
6290,
18,
4936,
18,
921,
1081,
16,
1659,
358,
... |
if (doTextDecorations) paintTextDecoration(style, c, line, start, width); | private void paint(RenderingContext c, LineBox line, InlineBox inline, int start, int width, int sides, boolean doTextDecorations) { Style style; if (line.isFirstLine || endStyle == null) {//endStyle can be null if layout is not complete style = startStyle; } else { style = endStyle; } CalculatedStyle cs = style.getCalculatedStyle(); //recurse for TOP and BOTTOM only! if (parent != null) { //these will all do the relevant translates parent.paint(c, line, inline, start, width, BorderPainter.BOTTOM + BorderPainter.TOP, doTextDecorations); } Relative.translateRelative(c, cs, true); Color background_color = cs.getBackgroundColor(); int parent_width = line.getParent().getWidth(); RectPropertySet margin = cs.getMarginRect(parent_width, parent_width, c); BorderPropertySet border = cs.getBorder(c); RectPropertySet padding = cs.getPaddingRect(parent_width, parent_width, c); LineMetrics lm = FontUtil.getLineMetrics(inline.getStyle().getFont(c), inline, c.getTextRenderer(), c.getGraphics()); int ty = line.getBaseline() - inline.y - inline.height - (int) margin.top() - (int) border.top() - (int) padding.top() + line.y; ty += (int) lm.getDescent(); c.translate(0, ty); c.getGraphics().translate(0, ty); // CLEAN: cast to int Rectangle bounds = new Rectangle(start, inline.y + (int) margin.top(), width, inline.height + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom()); //first the background if (background_color != null) { // skip transparent background if (!background_color.equals(BackgroundPainter.transparent)) { //TODO. make conf controlled Uu.p("filling a background"); c.getGraphics().setColor(background_color); c.getGraphics().fillRect(bounds.x, bounds.y, bounds.width, bounds.height); } } //then the border BorderPainter.paint(bounds, sides, cs, c.getGraphics(), c, xOffset); //and text decorations if (doTextDecorations) paintTextDecoration(style, c, line, start, width); c.getGraphics().translate(0, -ty); c.translate(0, -ty); xOffset += inline.contentWidth; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/8d5f54a52802a3a5ff9fecdf5ab49f78872302ef/InlineElement.java/buggy/src/java/org/xhtmlrenderer/render/InlineElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12574,
12,
14261,
1042,
276,
16,
15604,
5377,
3514,
980,
16,
15604,
16355,
3514,
6370,
16,
15604,
509,
787,
16,
15604,
509,
1835,
16,
15604,
509,
22423,
16,
1250,
741,
1528,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
12574,
12,
14261,
1042,
276,
16,
15604,
5377,
3514,
980,
16,
15604,
16355,
3514,
6370,
16,
15604,
509,
787,
16,
15604,
509,
1835,
16,
15604,
509,
22423,
16,
1250,
741,
1528,
78... | |
dialog = new AboutDialog(getWorkbench().getActiveWorkbenchWindow(), IDEApplication.getPrimaryInfo(), IDEApplication.getFeatureInfos()); | IDEWorkbenchPlugin plugin = IDEWorkbenchPlugin.getDefault(); dialog = new AboutDialog(getWorkbench().getActiveWorkbenchWindow(), plugin.getPrimaryInfo(), plugin.getFeatureInfos()); | public void testAbout() { Dialog dialog = null; dialog = new AboutDialog(getWorkbench().getActiveWorkbenchWindow(), IDEApplication.getPrimaryInfo(), IDEApplication.getFeatureInfos()); DialogCheck.assertDialogTexts(dialog, this); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/5da3910700fa7ca5b4c5ebcd4950aa503a472809/UIDialogsAuto.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs/UIDialogsAuto.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
24813,
1435,
288,
202,
202,
6353,
6176,
273,
446,
31,
202,
202,
12730,
273,
394,
9771,
659,
6353,
12,
588,
2421,
22144,
7675,
588,
3896,
2421,
22144,
3829,
9334,
1599... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24813,
1435,
288,
202,
202,
6353,
6176,
273,
446,
31,
202,
202,
12730,
273,
394,
9771,
659,
6353,
12,
588,
2421,
22144,
7675,
588,
3896,
2421,
22144,
3829,
9334,
1599... |
public org.quickfix.field.RefMsgType getRefMsgType() throws FieldNotFound { org.quickfix.field.RefMsgType value = new org.quickfix.field.RefMsgType(); | public quickfix.field.RefMsgType getRefMsgType() throws FieldNotFound { quickfix.field.RefMsgType value = new quickfix.field.RefMsgType(); | public org.quickfix.field.RefMsgType getRefMsgType() throws FieldNotFound { org.quickfix.field.RefMsgType value = new org.quickfix.field.RefMsgType(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/Reject.java/clean/src/java/src/quickfix/fix44/Reject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1957,
3332,
559,
17404,
3332,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1957,
3332,
559,
460,
273,
394,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
1957,
3332,
559,
17404,
3332,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
1957,
3332,
559,
460,
273,
394,
2358,
... |
Log.warn("Error verifying server version", sqle2); | Log.debug("Error verifying server version", sqle2); | private boolean checkSchema(Connection con, String schemaKey, int requiredVersion, ResourceLoader resourceLoader) throws Exception { int currentVersion = -1; PreparedStatement pstmt = null; try { pstmt = con.prepareStatement(CHECK_VERSION); pstmt.setString(1, schemaKey); ResultSet rs = pstmt.executeQuery(); if (rs.next()) { currentVersion = rs.getInt(1); } rs.close(); } catch (SQLException sqle) { // Releases of Wildfire before 2.6.0 stored a major and minor version // number so the normal check for version can fail. Check for the // version using the old format in that case. if (schemaKey.equals("wildfire")) { try { if (pstmt != null) { pstmt.close(); } pstmt = con.prepareStatement(CHECK_VERSION_OLD); ResultSet rs = pstmt.executeQuery(); if (rs.next()) { currentVersion = rs.getInt(1); } rs.close(); } catch (SQLException sqle2) { // The database schema must not be installed. Log.warn("Error verifying server version", sqle2); } } } finally { try { if (pstmt != null) { pstmt.close(); } } catch (Exception e) { Log.error(e); } } // If already up to date, return. if (currentVersion == requiredVersion) { return true; } // If the database schema isn't installed at all, we need to install it. else if (currentVersion == -1) { Log.info(LocaleUtils.getLocalizedString("upgrade.database.missing_schema", Arrays.asList(schemaKey))); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.missing_schema", Arrays.asList(schemaKey))); // Resource will be like "/database/wildfire_hsqldb.sql" String resourceName = schemaKey + "_" + DbConnectionManager.getDatabaseType() + ".sql"; InputStream resource = resourceLoader.loadResource(resourceName); if (resource == null) { return false; } try { executeSQLScript(con, resource); } catch (Exception e) { Log.error(e); return false; } finally { try { resource.close(); } catch (Exception e) { // Ignore. } } Log.info(LocaleUtils.getLocalizedString("upgrade.database.success")); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.success")); return true; } // Must have a version of the schema that needs to be upgraded. else { // The database is an old version that needs to be upgraded. Log.info(LocaleUtils.getLocalizedString("upgrade.database.old_schema", Arrays.asList(currentVersion, schemaKey, requiredVersion))); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.old_schema", Arrays.asList(currentVersion, schemaKey, requiredVersion))); // If the database type is unknown, we don't know how to upgrade it. if (DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.unknown) { Log.info(LocaleUtils.getLocalizedString("upgrade.database.unknown_db")); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.unknown_db")); return false; } // Upgrade scripts for interbase are not maintained. else if (DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.interbase) { Log.info(LocaleUtils.getLocalizedString("upgrade.database.interbase_db")); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.interbase_db")); return false; } // Run all upgrade scripts until we're up to the latest schema. for (int i=currentVersion+1; i <= DATABASE_VERSION; i++) { // Resource will be like "/database/upgrade/6/wildfire_hsqldb.sql" String resourceName = "upgrade/" + i + "/" + schemaKey + "_" + DbConnectionManager.getDatabaseType() + ".sql"; InputStream resource = resourceLoader.loadResource(resourceName); if (resource == null) { // If the resource is null, the specific upgrade number is not available. continue; } try { executeSQLScript(con, resource); } catch (Exception e) { Log.error(e); return false; } finally { try { resource.close(); } catch (Exception e) { // Ignore. } } } Log.info(LocaleUtils.getLocalizedString("upgrade.database.success")); System.out.println(LocaleUtils.getLocalizedString("upgrade.database.success")); return true; } } | 6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/d64d93ee43b338104e3c3ac882d27312004a1c0e/SchemaManager.java/buggy/src/java/org/jivesoftware/database/SchemaManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
866,
3078,
12,
1952,
356,
16,
514,
1963,
653,
16,
509,
1931,
1444,
16,
5411,
2591,
2886,
1058,
2886,
13,
1216,
1185,
565,
288,
3639,
509,
23344,
273,
300,
21,
31,
3639,
1691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
866,
3078,
12,
1952,
356,
16,
514,
1963,
653,
16,
509,
1931,
1444,
16,
5411,
2591,
2886,
1058,
2886,
13,
1216,
1185,
565,
288,
3639,
509,
23344,
273,
300,
21,
31,
3639,
1691... |
final Fill flBackground = are.getBackground( ); | final Fill flBackground = validateMultipleFill( are.getBackground( ) ); | public void fillArea( AreaRenderEvent are ) throws ChartException { final Fill flBackground = are.getBackground( ); if ( isFullTransparent( flBackground ) ) { return; } // SETUP SWING DATA STRUCTURES final GeneralPath gp = new GeneralPath( ); PrimitiveRenderEvent pre; for ( int i = 0; i < are.getElementCount( ); i++ ) { pre = are.getElement( i ); if ( pre instanceof ArcRenderEvent ) { final ArcRenderEvent acre = (ArcRenderEvent) pre; final Arc2D.Double a2d = new Arc2D.Double( acre.getTopLeft( ) .getX( ), acre.getTopLeft( ).getY( ), acre.getWidth( ), acre.getHeight( ), acre.getStartAngle( ), acre.getAngleExtent( ), toSwingArcType( acre.getStyle( ) ) ); gp.append( a2d, true ); } else if ( pre instanceof LineRenderEvent ) { final LineRenderEvent lre = (LineRenderEvent) pre; final Line2D.Double l2d = new Line2D.Double( lre.getStart( ) .getX( ), lre.getStart( ).getY( ), lre.getEnd( ).getX( ), lre.getEnd( ).getY( ) ); gp.append( l2d, true ); } } // BEGIN FILLING if ( flBackground instanceof ColorDefinition ) { _g2d.setColor( (Color) _ids.getColor( (ColorDefinition) flBackground ) ); } else if ( flBackground instanceof Gradient ) { final Gradient g = (Gradient) flBackground; final ColorDefinition cdStart = g.getStartColor( ); final ColorDefinition cdEnd = g.getEndColor( ); // boolean bCyclic = g.isCyclic(); double dAngleInDegrees = g.getDirection( ); final double dAngleInRadians = ( ( -dAngleInDegrees * Math.PI ) / 180.0 ); // int iAlpha = g.getTransparency(); Bounds bo = are.getBounds( ); /* * if (bCyclic) { } */ if ( dAngleInDegrees < -90 || dAngleInDegrees > 90 ) { throw new ChartException( ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, "SwingRendererImpl.exception.gradient.angle",//$NON-NLS-1$ new Object[]{ new Double( dAngleInDegrees ) }, Messages.getResourceBundle( getULocale( ) ) ); } Point2D.Double p2dStart, p2dEnd; if ( dAngleInDegrees == 90 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); } else if ( dAngleInDegrees == -90 ) { p2dEnd = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); } else if ( dAngleInDegrees > 0 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) + bo.getHeight( ) - bo.getWidth( ) * Math.abs( Math.tan( dAngleInRadians ) ) ); } else if ( dAngleInDegrees < 0 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) + bo.getWidth( ) * Math.abs( Math.tan( dAngleInRadians ) ) ); } else { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) ); } _g2d.setPaint( new GradientPaint( p2dStart, (Color) _ids.getColor( cdStart ), p2dEnd, (Color) _ids.getColor( cdEnd ) ) ); } else if ( flBackground instanceof org.eclipse.birt.chart.model.attribute.Image ) { // TBD } _g2d.fill( gp ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/20bb7679d106e8105100c095c900612d5a37a46d/SwingRendererImpl.java/clean/chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingRendererImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3636,
5484,
12,
16668,
3420,
1133,
854,
262,
1216,
14804,
503,
202,
95,
202,
202,
6385,
14192,
1183,
8199,
273,
854,
18,
588,
8199,
12,
11272,
202,
202,
430,
261,
29232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3636,
5484,
12,
16668,
3420,
1133,
854,
262,
1216,
14804,
503,
202,
95,
202,
202,
6385,
14192,
1183,
8199,
273,
854,
18,
588,
8199,
12,
11272,
202,
202,
430,
261,
29232,
... |
TreeNode[] childNodes = doFilter(node.getChildrenNodes()); | TreeNode[] childNodes = doFilter(node.getChildrenNodes(), data); | public synchronized void expand(RuntimeData data) throws Exception { if (expanded) { return; } TreeNode[] childNodes = doFilter(node.getChildrenNodes()); for (int i = 0; i < childNodes.length; i++) { TreeNode node = childNodes[i]; RuntimeTreeNode n = new RuntimeTreeNode(this, node); children.put(n.getNodeId(), n); } expanded = true; } | 50416 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50416/b39ce190eeba7fb5cdb1d82b1442138f79143008/RuntimeTreeNode.java/clean/trunk/waterview/src/main/java/com/cyclopsgroup/waterview/web/RuntimeTreeNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
4542,
12,
5576,
751,
501,
13,
1216,
1185,
565,
288,
3639,
309,
261,
17336,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
20270,
8526,
10582,
273,
741,
1586,
12,
2159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4542,
12,
5576,
751,
501,
13,
1216,
1185,
565,
288,
3639,
309,
261,
17336,
13,
3639,
288,
5411,
327,
31,
3639,
289,
3639,
20270,
8526,
10582,
273,
741,
1586,
12,
2159,
... |
ejbLocalRefs[i].setDescriptions(getDescriptions(ejbLocalRefE)); ejbLocalRefs[i].setEjbRefName(XML.getChildElementText(ejbLocalRefE, "ejb-ref-name")); ejbLocalRefs[i].setEjbRefType(XML.getChildElementText(ejbLocalRefE, "ejb-ref-type")); ejbLocalRefs[i].setLocalHome(XML.getChildElementText(ejbLocalRefE, "local-home")); ejbLocalRefs[i].setLocal(XML.getChildElementText(ejbLocalRefE, "local")); ejbLocalRefs[i].setEjbLink(XML.getChildElementText(ejbLocalRefE, "ejb-link")); | EjbLocalRefImpl ejbLocalRef = new EjbLocalRefImpl(); ejbLocalRef.setDescriptions(getDescriptions(ejbLocalRefE)); ejbLocalRef.setEjbRefName(XML.getChildElementText(ejbLocalRefE, "ejb-ref-name")); ejbLocalRef.setEjbRefType(XML.getChildElementText(ejbLocalRefE, "ejb-ref-type")); ejbLocalRef.setLocalHome(XML.getChildElementText(ejbLocalRefE, "local-home")); ejbLocalRef.setLocal(XML.getChildElementText(ejbLocalRefE, "local")); ejbLocalRef.setEjbLink(XML.getChildElementText(ejbLocalRefE, "ejb-link")); ejbLocalRefs[i] = ejbLocalRef; | private EjbLocalRefImpl[] getEjbLocalRefs(Element e) { NodeList ejbRefNL = e.getElementsByTagName("ejb-local-ref"); EjbLocalRefImpl[] ejbLocalRefs = new EjbLocalRefImpl[ejbRefNL.getLength()]; for (int i = 0; i < ejbRefNL.getLength(); i++) { Element ejbLocalRefE = (Element)ejbRefNL.item(i); ejbLocalRefs[i].setDescriptions(getDescriptions(ejbLocalRefE)); ejbLocalRefs[i].setEjbRefName(XML.getChildElementText(ejbLocalRefE, "ejb-ref-name")); ejbLocalRefs[i].setEjbRefType(XML.getChildElementText(ejbLocalRefE, "ejb-ref-type")); ejbLocalRefs[i].setLocalHome(XML.getChildElementText(ejbLocalRefE, "local-home")); ejbLocalRefs[i].setLocal(XML.getChildElementText(ejbLocalRefE, "local")); ejbLocalRefs[i].setEjbLink(XML.getChildElementText(ejbLocalRefE, "ejb-link")); } return ejbLocalRefs; } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/1c8ad6f9ded4016b50b48e1e533aa15aa26c1ce2/WebApplicationUnmarshaller.java/clean/source/org/jasig/portal/container/binding/WebApplicationUnmarshaller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
512,
10649,
2042,
1957,
2828,
8526,
4774,
10649,
2042,
9837,
12,
1046,
425,
13,
288,
3639,
16781,
18024,
1957,
24924,
273,
425,
18,
588,
3471,
10401,
2932,
73,
10649,
17,
3729,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
512,
10649,
2042,
1957,
2828,
8526,
4774,
10649,
2042,
9837,
12,
1046,
425,
13,
288,
3639,
16781,
18024,
1957,
24924,
273,
425,
18,
588,
3471,
10401,
2932,
73,
10649,
17,
3729,
17,
... |
if ( fd <= 0 ) return; | if ( fd <= 0 ) { System.out.println( "RXTXPort:close detected bad File Descriptor" ); return; } | public synchronized void close() { if (debug) System.out.println("RXTXPort:close(" + this.name + " )"); if ( fd <= 0 ) return; setDTR(false); setDSR(false); nativeClose( this.name ); super.close(); removeEventListener(); fd = 0; Runtime.getRuntime().gc(); } | 5329 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5329/4faf8928b518a6f99303e3892ac4657a2ed17860/RXTXPort.java/buggy/src/gnu/io/RXTXPort.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
1746,
1435,
202,
95,
202,
202,
430,
261,
4148,
13,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
54,
3983,
60,
2617,
30,
4412,
2932,
397,
333,
18,
529,
397,
315,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1746,
1435,
202,
95,
202,
202,
430,
261,
4148,
13,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
54,
3983,
60,
2617,
30,
4412,
2932,
397,
333,
18,
529,
397,
315,
262,... |
stack[stackTop] = DBL_MRK; | stack[stackTop] = UniqueTag.DOUBLE_MARK; | private static void do_add(Object[] stack, double[] sDbl, int stackTop, Context cx) { Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; double d; boolean leftRightOrder; if (rhs == DBL_MRK) { d = sDbl[stackTop + 1]; if (lhs == DBL_MRK) { sDbl[stackTop] += d; return; } leftRightOrder = true; // fallthrough to object + number code } else if (lhs == DBL_MRK) { d = sDbl[stackTop]; lhs = rhs; leftRightOrder = false; // fallthrough to object + number code } else { if (lhs instanceof Scriptable || rhs instanceof Scriptable) { stack[stackTop] = ScriptRuntime.add(lhs, rhs, cx); } else if (lhs instanceof String) { String lstr = (String)lhs; String rstr = ScriptRuntime.toString(rhs); stack[stackTop] = lstr.concat(rstr); } else if (rhs instanceof String) { String lstr = ScriptRuntime.toString(lhs); String rstr = (String)rhs; stack[stackTop] = lstr.concat(rstr); } else { double lDbl = (lhs instanceof Number) ? ((Number)lhs).doubleValue() : ScriptRuntime.toNumber(lhs); double rDbl = (rhs instanceof Number) ? ((Number)rhs).doubleValue() : ScriptRuntime.toNumber(rhs); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl + rDbl; } return; } // handle object(lhs) + number(d) code if (lhs instanceof Scriptable) { rhs = ScriptRuntime.wrapNumber(d); if (!leftRightOrder) { Object tmp = lhs; lhs = rhs; rhs = tmp; } stack[stackTop] = ScriptRuntime.add(lhs, rhs, cx); } else if (lhs instanceof String) { String lstr = (String)lhs; String rstr = ScriptRuntime.toString(d); if (leftRightOrder) { stack[stackTop] = lstr.concat(rstr); } else { stack[stackTop] = rstr.concat(lstr); } } else { double lDbl = (lhs instanceof Number) ? ((Number)lhs).doubleValue() : ScriptRuntime.toNumber(lhs); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl + d; } } | 13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/bef182034b96d54a2938fe141217e83b8644cf25/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
741,
67,
1289,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
17311,
1772,
9494,
13,
565,
288,
3639,
1033,
7711,
273,
2110,
63,
3772,
3401,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
918,
741,
67,
1289,
12,
921,
8526,
2110,
16,
1645,
8526,
272,
40,
3083,
16,
509,
2110,
3401,
16,
17311,
1772,
9494,
13,
565,
288,
3639,
1033,
7711,
273,
2110,
63,
3772,
3401,... |
if(!canCommit) return; if(!prb.allReceived()) return; | private void finish() { Message toSend = null; synchronized(this) { // REDFLAG do not use synch(this) for any other purpose! if(!canCommit) return; if(!prb.allReceived()) return; try { CHKBlock block = new CHKBlock(prb.getBlock(), headers, key); node.store(block); } catch (CHKVerifyException e) { Logger.error(this, "Verify failed in InsertHandler: "+e+" - headers: "+HexUtil.bytesToHex(headers), e); toSend = DMT.createFNPDataInsertRejected(uid, DMT.DATA_INSERT_REJECTED_VERIFY_FAILED); } } if(toSend != null) { try { source.sendAsync(toSend, null); } catch (NotConnectedException e) { // :( Logger.minor(this, "Lost connection in "+this+" when sending FNPDataInsertRejected"); } } else if(sender.getStatus() == InsertSender.SUCCESS) { // Succeeded! Yay! Message msg = DMT.createFNPInsertReply(uid); try { source.send(msg); } catch (NotConnectedException e) { // Ugh Logger.normal(this, "Finished InsertHandler but can't tell original node!: "+e); } } } | 50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/b4ecaa4055b5835413830d4125c72de27d68e306/InsertHandler.java/clean/src/freenet/node/InsertHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4076,
1435,
288,
3639,
2350,
358,
3826,
273,
446,
31,
3639,
3852,
12,
2211,
13,
288,
368,
14411,
9651,
741,
486,
999,
272,
2515,
12,
2211,
13,
364,
1281,
1308,
13115,
5,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4076,
1435,
288,
3639,
2350,
358,
3826,
273,
446,
31,
3639,
3852,
12,
2211,
13,
288,
368,
14411,
9651,
741,
486,
999,
272,
2515,
12,
2211,
13,
364,
1281,
1308,
13115,
5,
5411... | |
} else if(x < newSize) { if(block < newSize) { wantedKeep.add(blockNum); | } else { if(x < newSize) { if(block < newSize) { wantedKeep.add(blockNum); } else { wantedMove.add(blockNum); } | private void maybeSlowShrink(boolean dontCheck, boolean inStartUp) throws DatabaseException, IOException { Vector wantedKeep = new Vector(); // keep; content is wanted, and is in the right place Vector unwantedIgnore = new Vector(); // ignore; content is not wanted, and is not in the right place Vector wantedMove = new Vector(); // content is wanted, but is in the wrong part of the store Vector unwantedMove = new Vector(); // content is not wanted, but is in the part of the store we will keep Vector alreadyDropped = new Vector(); // any blocks past the end which have already been truncated, but which there are still database blocks pointing to Cursor c = null; Transaction t = null; long newSize = maxChkBlocks; if(chkBlocksInStore < maxChkBlocks) return; chkBlocksInStore = checkForHoles(maxChkBlocks, true); WrapperManager.signalStarting(24*60*60*1000); long realSize = countCHKBlocksFromFile(); System.err.println("Shrinking from "+chkBlocksInStore+" to "+maxChkBlocks+" (from db "+countCHKBlocksFromDatabase()+" from file "+countCHKBlocksFromFile()+")"); try { c = chkDB_accessTime.openCursor(null,null); DatabaseEntry keyDBE = new DatabaseEntry(); DatabaseEntry blockDBE = new DatabaseEntry(); OperationStatus opStat; opStat = c.getLast(keyDBE, blockDBE, LockMode.RMW); if(opStat == OperationStatus.NOTFOUND) { System.err.println("Database is empty (shrinking)."); c.close(); c = null; return; } //Logger.minor(this, "Found first key"); int x = 0; while(true) { StoreBlock storeBlock = (StoreBlock) storeBlockTupleBinding.entryToObject(blockDBE); //Logger.minor(this, "Found another key ("+(x++)+") ("+storeBlock.offset+")"); long block = storeBlock.offset; if(storeBlock.offset > Integer.MAX_VALUE) { // 2^31 * blockSize; ~ 70TB for CHKs, 2TB for the others System.err.println("Store too big, doing quick shrink"); // memory usage would be insane c.close(); c = null; maybeQuickShrink(false, false); return; } Integer blockNum = new Integer((int)storeBlock.offset); //Long seqNum = new Long(storeBlock.recentlyUsed); //System.out.println("#"+x+" seq "+seqNum+": block "+blockNum); if(blockNum.longValue() >= chkBlocksInStore) { // Truncated already? Logger.minor(this, "Truncated already? "+blockNum.longValue()); alreadyDropped.add(blockNum); } else if(x < newSize) { // Wanted if(block < newSize) { //System.out.println("Keep where it is: block "+blockNum+" seq # "+x+" / "+newSize); wantedKeep.add(blockNum); } else { //System.out.println("Move to where it should go: "+blockNum+" seq # "+x+" / "+newSize); wantedMove.add(blockNum); } } else { // Unwanted if(block < newSize) { //System.out.println("Overwrite: "+blockNum+" seq # "+x+" / "+newSize); unwantedMove.add(blockNum); } else { //System.out.println("Ignore, will be wiped: block "+blockNum+" seq # "+x+" / "+newSize); unwantedIgnore.add(blockNum); } } opStat = c.getPrev(keyDBE, blockDBE, LockMode.RMW); if(opStat == OperationStatus.NOTFOUND) { System.out.println("Read store: "+x+" keys."); break; } x++; if(x % 1024 == 0) { System.out.println("Reading store prior to shrink: "+(x*100/chkBlocksInStore)+ "% ( "+x+"/"+chkBlocksInStore+")"); } if(x == Integer.MAX_VALUE) { System.err.println("Key number "+x+" - ignoring store after "+(x*(dataBlockSize+headerBlockSize)+" bytes")); break; } } } finally { if(c != null) c.close(); } Integer[] wantedKeepNums = (Integer[]) wantedKeep.toArray(new Integer[wantedKeep.size()]); Integer[] unwantedIgnoreNums = (Integer[]) unwantedIgnore.toArray(new Integer[unwantedIgnore.size()]); Integer[] wantedMoveNums = (Integer[]) wantedMove.toArray(new Integer[wantedMove.size()]); Integer[] unwantedMoveNums = (Integer[]) unwantedMove.toArray(new Integer[unwantedMove.size()]); long[] freeEarlySlots = freeBlocks.toArray(); Arrays.sort(wantedKeepNums); Arrays.sort(unwantedIgnoreNums); Arrays.sort(wantedMoveNums); Arrays.sort(unwantedMoveNums); for(int i=0;i<realSize;i++) { Integer ii = new Integer(i); if(Arrays.binarySearch(wantedKeepNums, ii) >= 0) continue; if(Arrays.binarySearch(unwantedIgnoreNums, ii) >= 0) continue; if(Arrays.binarySearch(wantedMoveNums, ii) >= 0) continue; if(Arrays.binarySearch(unwantedMoveNums, ii) >= 0) continue; unwantedMove.add(ii); } unwantedMoveNums = (Integer[]) unwantedMove.toArray(new Integer[unwantedMove.size()]); System.err.println("Keys to keep where they are: "+wantedKeepNums.length); System.err.println("Keys which will be wiped anyway: "+unwantedIgnoreNums.length); System.err.println("Keys to move: "+wantedMoveNums.length); System.err.println("Keys to be moved over: "+unwantedMoveNums.length); System.err.println("Free slots to be moved over: "+freeEarlySlots.length); // Now move all the wantedMove blocks onto the corresponding unwantedMove's. byte[] buf = new byte[headerBlockSize + dataBlockSize]; t = null; try { t = environment.beginTransaction(null,null); if(alreadyDropped.size() > 0) { System.err.println("Deleting "+alreadyDropped.size()+" blocks beyond the length of the file"); for(int i=0;i<alreadyDropped.size();i++) { Integer unwantedBlock = (Integer) alreadyDropped.get(i); DatabaseEntry unwantedBlockEntry = new DatabaseEntry(); longTupleBinding.objectToEntry(unwantedBlock, unwantedBlockEntry); chkDB_blockNum.delete(t, unwantedBlockEntry); if(i % 1024 == 0) { t.commit(); t = environment.beginTransaction(null,null); } } if(alreadyDropped.size() % 1024 != 0) { t.commit(); t = environment.beginTransaction(null,null); } } for(int i=0;i<wantedMove.size();i++) { Integer wantedBlock = wantedMoveNums[i]; Integer unwantedBlock; // Can we move over an empty slot? if(i < freeEarlySlots.length) { // Don't need to delete old block unwantedBlock = new Integer((int) freeEarlySlots[i]); // will fit in an int } else if(unwantedMoveNums.length + freeEarlySlots.length > i) { unwantedBlock = unwantedMoveNums[i-freeEarlySlots.length]; // Delete unwantedBlock from the store DatabaseEntry unwantedBlockEntry = new DatabaseEntry(); longTupleBinding.objectToEntry(unwantedBlock, unwantedBlockEntry); // Delete the old block from the database. chkDB_blockNum.delete(t, unwantedBlockEntry); } else { System.err.println("Keys to move but no keys to move over! Moved "+i); t.commit(); t = null; return; } // Move old data to new location DatabaseEntry wantedBlockEntry = new DatabaseEntry(); longTupleBinding.objectToEntry(wantedBlock, wantedBlockEntry); long seekTo = wantedBlock.longValue() * (headerBlockSize + dataBlockSize); try { chkStore.seek(seekTo); chkStore.readFully(buf); } catch (EOFException e) { System.err.println("Was reading "+wantedBlock+" to write to "+unwantedBlock); System.err.println(e); e.printStackTrace(); throw e; } seekTo = unwantedBlock.longValue() * (headerBlockSize + dataBlockSize); chkStore.seek(seekTo); chkStore.write(buf); // Update the database w.r.t. the old block. DatabaseEntry routingKeyDBE = new DatabaseEntry(); DatabaseEntry blockDBE = new DatabaseEntry(); chkDB_blockNum.get(t, wantedBlockEntry, routingKeyDBE, blockDBE, LockMode.RMW); StoreBlock block = (StoreBlock) storeBlockTupleBinding.entryToObject(blockDBE); block.offset = unwantedBlock.longValue(); storeBlockTupleBinding.objectToEntry(block, blockDBE); chkDB.put(t, routingKeyDBE, blockDBE); // Think about committing the transaction. if((i+1) % 2048 == 0) { t.commit(); t = environment.beginTransaction(null,null); System.out.println("Moving blocks: "+(i*100/wantedMove.size())+ "% ( "+i+"/"+wantedMove.size()+")"); } //System.err.println("Moved "+wantedBlock+" to "+unwantedBlock); } System.out.println("Moved all "+wantedMove.size()+" blocks"); if(t != null) { t.commit(); t = null; } } finally { if(t != null) t.abort(); } // If there are any slots left over, they must be free. freeBlocks.clear(); for(long i=wantedMoveNums.length;i<unwantedMoveNums.length;i++) { freeBlocks.add(i); } maybeQuickShrink(false, true); } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/c7d89e185f8060750493b680a989e7dc864babcd/BerkeleyDBFreenetStore.java/clean/src/freenet/store/BerkeleyDBFreenetStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6944,
28733,
28747,
12,
6494,
14046,
1564,
16,
1250,
316,
1685,
1211,
13,
1216,
27215,
16,
1860,
288,
202,
202,
5018,
15504,
11523,
273,
394,
5589,
5621,
368,
3455,
31,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6944,
28733,
28747,
12,
6494,
14046,
1564,
16,
1250,
316,
1685,
1211,
13,
1216,
27215,
16,
1860,
288,
202,
202,
5018,
15504,
11523,
273,
394,
5589,
5621,
368,
3455,
31,
91... |
public void testCodeDuplicates() throws Exception { doDuplicatesTest(); } | public void testCodeDuplicates() throws Exception { doDuplicatesTest(); } | public void testCodeDuplicates() throws Exception { doDuplicatesTest(); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/6646dd9633fcb68a3c300eac3681179bd2eb2d9d/ExtractMethodTest.java/clean/refactoring/tests/com/intellij/refactoring/ExtractMethodTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1085,
23897,
1435,
1216,
1185,
288,
741,
23897,
4709,
5621,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1842,
1085,
23897,
1435,
1216,
1185,
288,
741,
23897,
4709,
5621,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
public UserAttributeLdapAuthoritiesPopulator(InitialDirContextFactory initialDirContextFactory, String userAttribute) { Assert.notNull(initialDirContextFactory, "InitialDirContextFactory can not be null"); | public UserAttributeLdapAuthoritiesPopulator(String userAttribute) { | public UserAttributeLdapAuthoritiesPopulator(InitialDirContextFactory initialDirContextFactory, String userAttribute) { Assert.notNull(initialDirContextFactory, "InitialDirContextFactory can not be null"); Assert.notNull(userAttribute, "UserAttribute can not be null"); m_initialDirContextFactory = initialDirContextFactory; m_userAttribute = userAttribute; } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/d135aec46308847be11fb8e8a85bca606a4d3461/UserAttributeLdapAuthoritiesPopulator.java/buggy/opennms-webapp/src/main/java/org/opennms/web/acegisecurity/UserAttributeLdapAuthoritiesPopulator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2177,
1499,
18437,
3594,
1961,
7049,
11775,
12,
4435,
1621,
29871,
2172,
1621,
29871,
16,
514,
729,
1499,
13,
288,
3639,
5452,
18,
902,
2041,
12,
6769,
1621,
29871,
16,
315,
4435,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2177,
1499,
18437,
3594,
1961,
7049,
11775,
12,
4435,
1621,
29871,
2172,
1621,
29871,
16,
514,
729,
1499,
13,
288,
3639,
5452,
18,
902,
2041,
12,
6769,
1621,
29871,
16,
315,
4435,
1... |
pp.require( pp.START_TAG, TEST_NS, "next"); | pp.require( XmlPullParser.START_TAG, TEST_NS, "next"); | public void testTypical() throws Exception { XmlPullParser pp = factory.newPullParser(); pp.setInput( new StringReader( TYPICAL_TEST_XML ) ); pp.next(); pp.require( pp.START_TAG, TEST_NS, "tests"); pp.next(); pp.require( pp.TEXT, null, null); String text = pp.getText(); assertEquals("\n ", text); pp.next(); pp.require( pp.START_TAG, TEST_NS, "test-parser"); // check name pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "create-parser"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "create-parser"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "input-inline"); text = ""; if(pp.next() == pp.TEXT) { text = pp.getText(); pp.next(); } assertEquals("<foo att=\"t\" att2='a' > bar&baz &</foo>", text); pp.require( pp.END_TAG, TEST_NS, "input-inline"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "set-feature"); text = pp.nextText(); assertEquals("http://xmlpull.org/v1/doc/features.html#process-namespaces", text); pp.require( pp.END_TAG, TEST_NS, "set-feature"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "next"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "next"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "next-text"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "next-text"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "next"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "next"); pp.nextTag(); pp.require( pp.START_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "expect"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "test-parser"); pp.nextTag(); pp.require( pp.END_TAG, TEST_NS, "tests"); pp.next(); pp.require( pp.END_DOCUMENT, null, null); } | 3949 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3949/25be6df80154469aacea3441a8e7758596d46574/TestBootstrapXmlTests.java/clean/src/java/tests/org/xmlpull/v1/tests/TestBootstrapXmlTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
18488,
1706,
1435,
1216,
1185,
288,
3639,
5714,
9629,
2678,
8228,
273,
3272,
18,
2704,
9629,
2678,
5621,
3639,
8228,
18,
542,
1210,
12,
394,
26227,
12,
22153,
1102,
7913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18488,
1706,
1435,
1216,
1185,
288,
3639,
5714,
9629,
2678,
8228,
273,
3272,
18,
2704,
9629,
2678,
5621,
3639,
8228,
18,
542,
1210,
12,
394,
26227,
12,
22153,
1102,
7913,
... |
IRubyObject variable = getInstanceVariable(varName); | IRubyObject variable = getInstanceVariable(varName); | public IRubyObject instance_variable_get(IRubyObject var) { String varName = var.asSymbol(); if (!varName.startsWith("@")) { throw getRuntime().newNameError("`" + varName + "' is not allowable as an instance variable name"); } IRubyObject variable = getInstanceVariable(varName); // Pickaxe v2 says no var should show NameError, but ruby only sends back nil.. return variable == null ? getRuntime().getNil() : variable; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c8b66db475de1dc66f347884891dd70d9943689b/RubyObject.java/buggy/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
15908,
10340,
921,
791,
67,
6105,
67,
588,
12,
7937,
10340,
921,
569,
13,
288,
377,
202,
780,
13722,
273,
569,
18,
345,
5335,
5621,
377,
202,
377,
202,
430,
16051,
1401,
461,
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,
15908,
10340,
921,
791,
67,
6105,
67,
588,
12,
7937,
10340,
921,
569,
13,
288,
377,
202,
780,
13722,
273,
569,
18,
345,
5335,
5621,
377,
202,
377,
202,
430,
16051,
1401,
461,
18,
... |
response.setContentLength(out0.toString().getBytes(response.getCharacterEncoding()).length); | response.setContentLength( totalLength += getContentLength(out0.toString()) ); | public void close() { if (!response.isCommitted()) { try { response.setContentLength(out0.toString().getBytes(response.getCharacterEncoding()).length); } catch (UnsupportedEncodingException e) { LOG.error("Encoding error setting content length: " + e.getMessage(),e ); } } flush(); super.close(); } // close() | 52953 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52953/689ddb3a9c7caa919bf562e125e8017895bbce7c/GSPResonseWriter.java/clean/src/web/org/codehaus/groovy/grails/web/pages/GSPResonseWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1746,
1435,
288,
202,
202,
430,
16051,
2740,
18,
291,
27813,
10756,
288,
1082,
202,
698,
288,
9506,
202,
2740,
18,
542,
1350,
1782,
12,
659,
20,
18,
10492,
7675,
588,
216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1746,
1435,
288,
202,
202,
430,
16051,
2740,
18,
291,
27813,
10756,
288,
1082,
202,
698,
288,
9506,
202,
2740,
18,
542,
1350,
1782,
12,
659,
20,
18,
10492,
7675,
588,
216... |
public basic(String args[]) throws ClassNotFoundException, FileNotFoundException, IOException, SQLException { String url = args[0]; String usr = args[1]; String pwd = args[2]; // Load the driver Class.forName("org.postgresql.Driver"); // Connect to database System.out.println("Connecting to Database URL = " + url); db = DriverManager.getConnection(url, usr, pwd); System.out.println("Connected...Now creating a statement"); st = db.createStatement(); // Clean up the database (in case we failed earlier) then initialise cleanup(); // Now run tests using JDBC methods doexample(); // Clean up the database cleanup(); // Finally close the database System.out.println("Now closing the connection"); st.close(); db.close(); //throw postgresql.Driver.notImplemented(); } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/8439a83d84fb159a790ed2b6d14d4151b9890857/basic.java/buggy/src/interfaces/jdbc/example/basic.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5337,
12,
780,
833,
63,
5717,
1216,
10403,
16,
13707,
16,
1860,
16,
6483,
225,
288,
565,
514,
880,
273,
833,
63,
20,
15533,
565,
514,
16575,
273,
833,
63,
21,
15533,
565,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5337,
12,
780,
833,
63,
5717,
1216,
10403,
16,
13707,
16,
1860,
16,
6483,
225,
288,
565,
514,
880,
273,
833,
63,
20,
15533,
565,
514,
16575,
273,
833,
63,
21,
15533,
565,
514,
1... | ||
obj.scopeSlaveFlag = true; | public static void init(Context cx, Scriptable scope, boolean sealed) { NativeGlobal obj = new NativeGlobal(); obj.scopeSlaveFlag = true; for (int id = 1; id <= LAST_SCOPE_FUNCTION_ID; ++id) { String name; switch (id) { case Id_decodeURI: name = "decodeURI"; break; case Id_decodeURIComponent: name = "decodeURIComponent"; break; case Id_encodeURI: name = "encodeURI"; break; case Id_encodeURIComponent: name = "encodeURIComponent"; break; case Id_escape: name = "escape"; break; case Id_eval: name = "eval"; break; case Id_isFinite: name = "isFinite"; break; case Id_isNaN: name = "isNaN"; break; case Id_parseFloat: name = "parseFloat"; break; case Id_parseInt: name = "parseInt"; break; case Id_unescape: name = "unescape"; break; case Id_uneval: name = "uneval"; break; default: Kit.codeBug(); name = null; } IdFunction.define(scope, name, obj, id, ScriptableObject.DONTENUM, sealed); } ScriptableObject.defineProperty(scope, "NaN", ScriptRuntime.NaNobj, ScriptableObject.DONTENUM); ScriptableObject.defineProperty(scope, "Infinity", new Double(Double.POSITIVE_INFINITY), ScriptableObject.DONTENUM); ScriptableObject.defineProperty(scope, "undefined", Undefined.instance, ScriptableObject.DONTENUM); String[] errorMethods = Kit.semicolonSplit("" +"ConversionError;" +"EvalError;" +"RangeError;" +"ReferenceError;" +"SyntaxError;" +"TypeError;" +"URIError;" +"InternalError;" +"JavaException;" ); /* Each error constructor gets its own Error object as a prototype, with the 'name' property set to the name of the error. */ for (int i = 0; i < errorMethods.length; i++) { String name = errorMethods[i]; Scriptable errorProto = ScriptRuntime. newObject(cx, scope, "Error", ScriptRuntime.emptyArgs); errorProto.put("name", errorProto, name); IdFunction ctor = new IdFunction(obj, name, Id_new_CommonError); ctor.initAsConstructor(scope, errorProto); if (sealed) { ctor.sealObject(); if (errorProto instanceof ScriptableObject) { ((ScriptableObject)errorProto).sealObject(); } } ScriptableObject.defineProperty(scope, name, ctor, ScriptableObject.DONTENUM); } } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/8f28fc868ac3f30ea37494abfddb6358154786c3/NativeGlobal.java/buggy/js/rhino/src/org/mozilla/javascript/NativeGlobal.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
5160,
1081,
273,
394,
16717,
5160,
5621,
9079,
364,
261,
474,
612,
273,
404,
31,
612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1208,
12,
1042,
9494,
16,
22780,
2146,
16,
1250,
695,
18931,
13,
288,
3639,
16717,
5160,
1081,
273,
394,
16717,
5160,
5621,
9079,
364,
261,
474,
612,
273,
404,
31,
612,
... | |
JavaClass signatureClass | JavaClass signatureClass | public void sawOpcode(int seen) { if (DEBUG) { System.out.println(stack); TestingGround.printOpCode(this,seen); } if (stack.getStackDepth() > 0) { if (seen == CHECKCAST || seen == INSTANCEOF) { if (DEBUG) System.out.println(" ... checking ... "); OpcodeStack.Item it = stack.getStackItem(0); String signature = it.getSignature(); if (signature.length() > 0 && signature.charAt(0) == 'L') signature = signature.substring(1,signature.length()-1); String signatureDot = signature.replace('/','.'); String to = getClassConstantOperand(); if (to.length() > 0 && to.charAt(0) == 'L') to = to.substring(1,to.length()-1); String toDot = to.replace('/','.'); if (signature.length() > 0 && !signature.equals("java/lang/Object") && !signature.equals(to)) { try { JavaClass toClass = Repository.lookupClass(toDot); JavaClass signatureClass = Repository.lookupClass(signatureDot); if (DEBUG) System.out.println(" ... checking ...... "); if ( !castTo.contains(to) && !Repository.instanceOf( signatureClass, toClass)) { if ( !Repository.instanceOf( toClass, signatureClass) && ( (!toClass.isInterface() && !signatureClass.isInterface()) || signatureClass.isFinal() || toClass.isFinal() )) bugReporter.reportBug(new BugInstance(this, seen == CHECKCAST ? "BC_IMPOSSIBLE_CAST" : "BC_IMPOSSIBLE_INSTANCEOF", seen == CHECKCAST ? HIGH_PRIORITY : NORMAL_PRIORITY) .addClassAndMethod(this) .addSourceLine(this) .addClass(signatureDot) .addClass(toDot)); else if (seen == CHECKCAST){ int priority = NORMAL_PRIORITY; if (DEBUG) { System.out.println("Checking BC in " + getFullyQualifiedMethodName()); System.out.println("to class: " + toClass); System.out.println("from class: " + signatureClass); System.out.println("instanceof : " + Repository.instanceOf( toClass, signatureClass)) ; } if (Repository.instanceOf( toClass, signatureClass)) priority+=2; if (getThisClass().equals(toClass) || getThisClass().equals(signatureClass)) priority+=1; if (DEBUG) System.out.println(" priority: " + priority); if (toClass.isInterface()) priority++; if (DEBUG) System.out.println(" priority: " + priority); if (priority <= LOW_PRIORITY && (signatureClass.isInterface() || signatureClass.isAbstract())) priority++; if (DEBUG) System.out.println(" priority: " + priority); if (concreteCollectionClasses.contains(signature) || abstractCollectionClasses.contains(signature)) priority--; if (concreteCollectionClasses.contains(to) || abstractCollectionClasses.contains(to)) priority--; if (DEBUG) System.out.println(" priority: " + priority); int reg = it.getRegisterNumber(); if (reg >= 0 && reg < parameters && it.isInitialParameter() && getMethod().isPublic()) { priority--; if (getPC() < 4 && priority > LOW_PRIORITY) priority--; } if (DEBUG) System.out.println(" priority: " + priority); if (getMethodName().equals("compareTo")) priority++; if (DEBUG) System.out.println(" priority: " + priority); if (priority < HIGH_PRIORITY) priority = HIGH_PRIORITY; if (priority <= LOW_PRIORITY) { String bug = "BC_UNCONFIRMED_CAST"; if (concreteCollectionClasses.contains(to)) bug = "BC_BAD_CAST_TO_CONCRETE_COLLECTION"; else if (abstractCollectionClasses.contains(to) && (signature.equals("java/util/Collection") || signature.equals("java/lang/Iterable") )) bug = "BC_BAD_CAST_TO_ABSTRACT_COLLECTION"; bugReporter.reportBug(new BugInstance(this, bug, priority) .addClassAndMethod(this) .addSourceLine(this) .addClass(signatureDot) .addClass(toDot)); } } } } catch (Exception e) { } } } if (seen == INSTANCEOF) { String to = getClassConstantOperand(); castTo.add(to); } } stack.sawOpcode(this,seen); } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/6283ec82a0713e109b5a169c0a420974b6bad830/FindBadCast.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindBadCast.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
430,
261,
9394,
13,
225,
288,
1082,
202,
3163,
18,
659,
18,
8222,
12,
3772,
1769,
1082,
202,
22218,
43,
2260,
18,
1188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19821,
22808,
12,
474,
5881,
13,
288,
202,
202,
430,
261,
9394,
13,
225,
288,
1082,
202,
3163,
18,
659,
18,
8222,
12,
3772,
1769,
1082,
202,
22218,
43,
2260,
18,
1188,
... |
throw new UnsupportedOperationException("Dimensions of a Cell can't be calculated. See the FAQ."); | throw new UnsupportedOperationException("Dimensions of a Cell can't be calculated. See the FAQ."); | public float right() { throw new UnsupportedOperationException("Dimensions of a Cell can't be calculated. See the FAQ."); } | 3011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3011/ed86dfb474e6fa22e1797452482e751a297a7e1f/Cell.java/buggy/itext/src/com/lowagie/text/Cell.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
2145,
1435,
288,
3639,
604,
394,
13172,
2932,
10796,
434,
279,
8614,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1431,
2145,
1435,
288,
3639,
604,
394,
13172,
2932,
10796,
434,
279,
8614,
848,
1404,
506,
8894,
18,
2164,
326,
15064,
53,
1199,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
public void ruleAction(int ruleNumber) { switch (ruleNumber) { // // Rule 1: TypeName ::= TypeName . ErrorId // case 1: { //#line 6 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name TypeName = (Name) getRhsSym(1); //#line 8 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, "*")); break; } // // Rule 2: PackageName ::= PackageName . ErrorId // case 2: { //#line 16 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name PackageName = (Name) getRhsSym(1); //#line 18 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, "*")); break; } // // Rule 3: ExpressionName ::= AmbiguousName . ErrorId // case 3: { //#line 26 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 28 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 4: MethodName ::= AmbiguousName . ErrorId // case 4: { //#line 36 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 38 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 5: PackageOrTypeName ::= PackageOrTypeName . ErrorId // case 5: { //#line 46 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 48 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, "*")); break; } // // Rule 6: AmbiguousName ::= AmbiguousName . ErrorId // case 6: { //#line 56 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 58 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 7: FieldAccess ::= Primary . ErrorId // case 7: { //#line 66 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 68 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(), Primary, "*")); break; } // // Rule 8: FieldAccess ::= super . ErrorId // case 8: { //#line 73 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), "*")); break; } // // Rule 9: FieldAccess ::= ClassName . super$sup . ErrorId // case 9: { //#line 76 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 76 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 78 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), "*")); break; } // // Rule 10: MethodInvocation ::= MethodPrimaryPrefix ( ArgumentListopt ) // case 10: { //#line 82 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object MethodPrimaryPrefix = (Object) getRhsSym(1); //#line 82 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 84 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) ((Object[]) MethodPrimaryPrefix)[0]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodPrimaryPrefix)[1]; setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 11: MethodInvocation ::= MethodSuperPrefix ( ArgumentListopt ) // case 11: { //#line 89 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier MethodSuperPrefix = (polyglot.lex.Identifier) getRhsSym(1); //#line 89 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 91 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier identifier = MethodSuperPrefix; setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 12: MethodInvocation ::= MethodClassNameSuperPrefix ( ArgumentListopt ) // case 12: { //#line 95 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object MethodClassNameSuperPrefix = (Object) getRhsSym(1); //#line 95 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 97 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) ((Object[]) MethodClassNameSuperPrefix)[0]; JPGPosition super_pos = (JPGPosition) ((Object[]) MethodClassNameSuperPrefix)[1]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodClassNameSuperPrefix)[2]; setResult(nf.Call(pos(), nf.Super(super_pos, ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 13: MethodPrimaryPrefix ::= Primary . ErrorId$ErrorId // case 13: { //#line 104 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 104 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 106 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[2]; a[0] = Primary; a[1] = id(getRhsFirstTokenIndex(3)); setResult(a); break; } // // Rule 14: MethodSuperPrefix ::= super . ErrorId$ErrorId // case 14: { //#line 112 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 114 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" setResult(id(getRhsFirstTokenIndex(3))); break; } // // Rule 15: MethodClassNameSuperPrefix ::= ClassName . super$sup . ErrorId$ErrorId // case 15: { //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 117 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(5); //#line 119 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[3]; a[0] = ClassName; a[1] = pos(getRhsFirstTokenIndex(3)); a[2] = id(getRhsFirstTokenIndex(5)); setResult(a); break; } // // Rule 16: identifier ::= IDENTIFIER$ident // case 16: { //#line 94 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken ident = (IToken) getRhsIToken(1); //#line 96 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ident.setKind(X10Parsersym.TK_IDENTIFIER); setResult(id(getRhsFirstTokenIndex(1))); break; } // // Rule 19: IntegralType ::= byte // case 19: { //#line 121 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 20: IntegralType ::= char // case 20: { //#line 126 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 21: IntegralType ::= short // case 21: { //#line 131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 22: IntegralType ::= int // case 22: { //#line 136 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 23: IntegralType ::= long // case 23: { //#line 141 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 24: FloatingPointType ::= float // case 24: { //#line 147 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 25: FloatingPointType ::= double // case 25: { //#line 152 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 28: TypeName ::= identifier // case 28: { //#line 175 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 177 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 29: TypeName ::= TypeName . identifier // case 29: { //#line 180 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(1); //#line 180 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 182 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, identifier.getIdentifier())); break; } // // Rule 31: ArrayType ::= Type [ ] // case 31: { //#line 194 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 196 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.array(Type, pos(), 1)); break; } // // Rule 32: PackageName ::= identifier // case 32: { //#line 241 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 243 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 33: PackageName ::= PackageName . identifier // case 33: { //#line 246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageName = (Name) getRhsSym(1); //#line 246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 248 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, identifier.getIdentifier())); break; } // // Rule 34: ExpressionName ::= identifier // case 34: { //#line 262 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 264 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 35: ExpressionName ::= AmbiguousName . identifier // case 35: { //#line 267 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 267 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 269 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 36: MethodName ::= identifier // case 36: { //#line 277 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 279 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 37: MethodName ::= AmbiguousName . identifier // case 37: { //#line 282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 284 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 38: PackageOrTypeName ::= identifier // case 38: { //#line 292 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 294 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= PackageOrTypeName . identifier // case 39: { //#line 297 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 297 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 299 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, identifier.getIdentifier())); break; } // // Rule 40: AmbiguousName ::= identifier // case 40: { //#line 307 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 309 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= AmbiguousName . identifier // case 41: { //#line 312 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 312 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 314 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 42: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 42: { //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" PackageNode PackageDeclarationopt = (PackageNode) getRhsSym(1); //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarationsopt = (List) getRhsSym(2); //#line 324 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarationsopt = (List) getRhsSym(3); //#line 326 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); int token_pos = (ImportDeclarationsopt.size() == 0 ? TypeDeclarationsopt.size() == 0 ? super.getSize() - 1 : getPrevious(getRhsFirstTokenIndex(3)) : getRhsLastTokenIndex(2) ); Import x10LangImport = nf.Import(pos(token_pos), Import.PACKAGE, x10Lang.toString()); ImportDeclarationsopt.add(x10LangImport); setResult(nf.SourceFile(pos(getLeftSpan(), getRightSpan()), PackageDeclarationopt, ImportDeclarationsopt, TypeDeclarationsopt)); break; } // // Rule 43: ImportDeclarations ::= ImportDeclaration // case 43: { //#line 342 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(1); //#line 344 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Import.class, false); l.add(ImportDeclaration); setResult(l); break; } // // Rule 44: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 44: { //#line 349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarations = (List) getRhsSym(1); //#line 349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(2); //#line 351 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (ImportDeclaration != null) ImportDeclarations.add(ImportDeclaration); //setResult(l); break; } // // Rule 45: TypeDeclarations ::= TypeDeclaration // case 45: { //#line 357 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(1); //#line 359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); if (TypeDeclaration != null) l.add(TypeDeclaration); setResult(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 46: { //#line 365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarations = (List) getRhsSym(1); //#line 365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(2); //#line 367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (TypeDeclaration != null) TypeDeclarations.add(TypeDeclaration); //setResult(l); break; } // // Rule 49: SingleTypeImportDeclaration ::= import TypeName ; // case 49: { //#line 380 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(2); //#line 382 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.CLASS, TypeName.toString())); break; } // // Rule 50: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 50: { //#line 386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(2); //#line 388 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.PACKAGE, PackageOrTypeName.toString())); break; } // // Rule 53: TypeDeclaration ::= ; // case 53: { //#line 402 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(null); break; } // // Rule 56: ClassModifiers ::= ClassModifiers ClassModifier // case 56: { //#line 414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifiers = (Flags) getRhsSym(1); //#line 414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifier = (Flags) getRhsSym(2); //#line 416 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassModifiers.set(ClassModifier)); break; } // // Rule 57: ClassModifier ::= public // case 57: { //#line 424 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 58: ClassModifier ::= protected // case 58: { //#line 429 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 59: ClassModifier ::= private // case 59: { //#line 434 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 60: ClassModifier ::= abstract // case 60: { //#line 439 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 61: ClassModifier ::= static // case 61: { //#line 444 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 62: ClassModifier ::= final // case 62: { //#line 449 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 63: ClassModifier ::= strictfp // case 63: { //#line 454 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 64: Super ::= extends ClassType // case 64: { //#line 466 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ClassType = (TypeNode) getRhsSym(2); //#line 468 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassType); break; } // // Rule 65: Interfaces ::= implements InterfaceTypeList // case 65: { //#line 477 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(2); //#line 479 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceTypeList); break; } // // Rule 66: InterfaceTypeList ::= InterfaceType // case 66: { //#line 483 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(1); //#line 485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 67: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 67: { //#line 490 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(1); //#line 490 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 492 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceTypeList.add(InterfaceType); setResult(InterfaceTypeList); break; } // // Rule 68: ClassBody ::= { ClassBodyDeclarationsopt } // case 68: { //#line 502 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarationsopt = (List) getRhsSym(2); //#line 504 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(getLeftSpan(), getRightSpan()), ClassBodyDeclarationsopt)); break; } // // Rule 70: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 70: { //#line 509 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarations = (List) getRhsSym(1); //#line 509 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclaration = (List) getRhsSym(2); //#line 511 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassBodyDeclarations.addAll(ClassBodyDeclaration); // setResult(a); break; } // // Rule 72: ClassBodyDeclaration ::= InstanceInitializer // case 72: { //#line 517 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block InstanceInitializer = (Block) getRhsSym(1); //#line 519 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.NONE, InstanceInitializer)); setResult(l); break; } // // Rule 73: ClassBodyDeclaration ::= StaticInitializer // case 73: { //#line 524 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block StaticInitializer = (Block) getRhsSym(1); //#line 526 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.STATIC, StaticInitializer)); setResult(l); break; } // // Rule 74: ClassBodyDeclaration ::= ConstructorDeclaration // case 74: { //#line 531 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ConstructorDecl ConstructorDeclaration = (ConstructorDecl) getRhsSym(1); //#line 533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ConstructorDeclaration); setResult(l); break; } // // Rule 76: ClassMemberDeclaration ::= MethodDeclaration // case 76: { //#line 540 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodDeclaration = (MethodDecl) getRhsSym(1); //#line 542 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(MethodDeclaration); setResult(l); break; } // // Rule 77: ClassMemberDeclaration ::= ClassDeclaration // case 77: { //#line 547 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 549 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 78: ClassMemberDeclaration ::= InterfaceDeclaration // case 78: { //#line 554 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 556 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 79: ClassMemberDeclaration ::= ; // case 79: { //#line 563 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); setResult(l); break; } // // Rule 80: VariableDeclarators ::= VariableDeclarator // case 80: { //#line 571 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(1); //#line 573 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(VariableDeclarator); setResult(l); break; } // // Rule 81: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 81: { //#line 578 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(1); //#line 578 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(3); //#line 580 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclarators.add(VariableDeclarator); // setResult(VariableDeclarators); break; } // // Rule 83: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 83: { //#line 586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 588 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclaratorId.init = VariableInitializer; VariableDeclaratorId.position(pos()); // setResult(VariableDeclaratorId); break; } // // Rule 84: TraditionalVariableDeclaratorId ::= identifier // case 84: { //#line 594 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier())); break; } // // Rule 85: TraditionalVariableDeclaratorId ::= TraditionalVariableDeclaratorId [ ] // case 85: { //#line 599 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator TraditionalVariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 601 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TraditionalVariableDeclaratorId.dims++; TraditionalVariableDeclaratorId.position(pos()); // setResult(a); break; } // // Rule 87: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 87: { //#line 608 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 608 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(3); //#line 610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier(), IdentifierList)); break; } // // Rule 88: VariableDeclaratorId ::= [ IdentifierList ] // case 88: { //#line 613 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(2); //#line 615 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), IdentifierList)); break; } // // Rule 92: FieldModifiers ::= FieldModifiers FieldModifier // case 92: { //#line 623 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifiers = (Flags) getRhsSym(1); //#line 623 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifier = (Flags) getRhsSym(2); //#line 625 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(FieldModifiers.set(FieldModifier)); break; } // // Rule 93: FieldModifier ::= public // case 93: { //#line 633 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 94: FieldModifier ::= protected // case 94: { //#line 638 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 95: FieldModifier ::= private // case 95: { //#line 643 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 96: FieldModifier ::= static // case 96: { //#line 648 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 97: FieldModifier ::= final // case 97: { //#line 653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 98: FieldModifier ::= transient // case 98: { //#line 658 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.TRANSIENT); break; } // // Rule 100: ResultType ::= void // case 100: { //#line 675 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 101: FormalParameterList ::= LastFormalParameter // case 101: { //#line 695 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(1); //#line 697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(LastFormalParameter); setResult(l); break; } // // Rule 102: FormalParameterList ::= FormalParameters , LastFormalParameter // case 102: { //#line 702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(3); //#line 704 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(LastFormalParameter); // setResult(FormalParameters); break; } // // Rule 103: FormalParameters ::= FormalParameter // case 103: { //#line 709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(1); //#line 711 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(FormalParameter); setResult(l); break; } // // Rule 104: FormalParameters ::= FormalParameters , FormalParameter // case 104: { //#line 716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 718 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(FormalParameter); // setResult(FormalParameters); break; } // // Rule 105: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 105: { //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(3); //#line 725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableDeclaratorId != null) setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); else setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), 1), "", new AmbExpr[0])); break; } // // Rule 107: VariableModifiers ::= VariableModifiers VariableModifier // case 107: { //#line 733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiers = (Flags) getRhsSym(1); //#line 733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifier = (Flags) getRhsSym(2); //#line 735 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(VariableModifiers.set(VariableModifier)); break; } // // Rule 108: VariableModifier ::= final // case 108: { //#line 741 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 109: LastFormalParameter ::= VariableModifiersopt Type ...opt$opt VariableDeclaratorId // case 109: { //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 747 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(4); //#line 749 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" assert(opt == null); setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); break; } // // Rule 111: MethodModifiers ::= MethodModifiers MethodModifier // case 111: { //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifiers = (Flags) getRhsSym(1); //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifier = (Flags) getRhsSym(2); //#line 763 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(MethodModifiers.set(MethodModifier)); break; } // // Rule 112: MethodModifier ::= public // case 112: { //#line 771 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 113: MethodModifier ::= protected // case 113: { //#line 776 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 114: MethodModifier ::= private // case 114: { //#line 781 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 115: MethodModifier ::= abstract // case 115: { //#line 786 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 116: MethodModifier ::= static // case 116: { //#line 791 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 117: MethodModifier ::= final // case 117: { //#line 796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 118: MethodModifier ::= native // case 118: { //#line 806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NATIVE); break; } // // Rule 119: MethodModifier ::= strictfp // case 119: { //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 120: Throws ::= throws ExceptionTypeList // case 120: { //#line 815 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(2); //#line 817 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExceptionTypeList); break; } // // Rule 121: ExceptionTypeList ::= ExceptionType // case 121: { //#line 821 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(1); //#line 823 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(ExceptionType); setResult(l); break; } // // Rule 122: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 122: { //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(1); //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(3); //#line 830 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExceptionTypeList.add(ExceptionType); // setResult(ExceptionTypeList); break; } // // Rule 125: MethodBody ::= ; // case 125: setResult(null); break; // // Rule 127: StaticInitializer ::= static Block // case 127: { //#line 850 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 128: SimpleTypeName ::= identifier // case 128: { //#line 867 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 869 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 130: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 130: { //#line 874 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifiers = (Flags) getRhsSym(1); //#line 874 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifier = (Flags) getRhsSym(2); //#line 876 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstructorModifiers.set(ConstructorModifier)); break; } // // Rule 131: ConstructorModifier ::= public // case 131: { //#line 884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 132: ConstructorModifier ::= protected // case 132: { //#line 889 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 133: ConstructorModifier ::= private // case 133: { //#line 894 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 134: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 134: { //#line 898 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt ExplicitConstructorInvocationopt = (Stmt) getRhsSym(2); //#line 898 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(3); //#line 900 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l; l = new TypedList(new LinkedList(), Stmt.class, false); if (ExplicitConstructorInvocationopt == null) { l.add(nf.SuperCall(pos(), Collections.EMPTY_LIST)); } else { l.add(ExplicitConstructorInvocationopt); } l.addAll(BlockStatementsopt); setResult(nf.Block(pos(), l)); break; } // // Rule 135: Arguments ::= ( ArgumentListopt ) // case 135: { //#line 933 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(2); //#line 935 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ArgumentListopt); break; } // // Rule 138: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 138: { //#line 951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifiers = (Flags) getRhsSym(1); //#line 951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifier = (Flags) getRhsSym(2); //#line 953 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceModifiers.set(InterfaceModifier)); break; } // // Rule 139: InterfaceModifier ::= public // case 139: { //#line 961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 140: InterfaceModifier ::= protected // case 140: { //#line 966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 141: InterfaceModifier ::= private // case 141: { //#line 971 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 142: InterfaceModifier ::= abstract // case 142: { //#line 976 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 143: InterfaceModifier ::= static // case 143: { //#line 981 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 144: InterfaceModifier ::= strictfp // case 144: { //#line 986 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 145: ExtendsInterfaces ::= extends InterfaceType // case 145: { //#line 990 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(2); //#line 992 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 146: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 146: { //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExtendsInterfaces = (List) getRhsSym(1); //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 999 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExtendsInterfaces.add(InterfaceType); // setResult(ExtendsInterfaces); break; } // // Rule 147: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 147: { //#line 1009 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarationsopt = (List) getRhsSym(2); //#line 1011 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(), InterfaceMemberDeclarationsopt)); break; } // // Rule 149: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 149: { //#line 1016 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarations = (List) getRhsSym(1); //#line 1016 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclaration = (List) getRhsSym(2); //#line 1018 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceMemberDeclarations.addAll(InterfaceMemberDeclaration); // setResult(l); break; } // // Rule 151: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 151: { //#line 1024 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl AbstractMethodDeclaration = (MethodDecl) getRhsSym(1); //#line 1026 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(AbstractMethodDeclaration); setResult(l); break; } // // Rule 152: InterfaceMemberDeclaration ::= ClassDeclaration // case 152: { //#line 1031 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1033 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 153: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 153: { //#line 1038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 1040 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 154: InterfaceMemberDeclaration ::= ; // case 154: { //#line 1047 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Collections.EMPTY_LIST); break; } // // Rule 155: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 155: { //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiersopt = (Flags) getRhsSym(1); //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1051 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1053 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(getRhsFirstTokenIndex(2), getRightSpan()), ConstantModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), d.dims), d.name, d.init)); } setResult(l); break; } // // Rule 157: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 157: { //#line 1071 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiers = (Flags) getRhsSym(1); //#line 1071 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifier = (Flags) getRhsSym(2); //#line 1073 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstantModifiers.set(ConstantModifier)); break; } // // Rule 158: ConstantModifier ::= public // case 158: { //#line 1081 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 159: ConstantModifier ::= static // case 159: { //#line 1086 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 160: ConstantModifier ::= final // case 160: { //#line 1091 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 162: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 162: { //#line 1098 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifiers = (Flags) getRhsSym(1); //#line 1098 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifier = (Flags) getRhsSym(2); //#line 1100 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(AbstractMethodModifiers.set(AbstractMethodModifier)); break; } // // Rule 163: AbstractMethodModifier ::= public // case 163: { //#line 1108 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 164: AbstractMethodModifier ::= abstract // case 164: { //#line 1113 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 165: SimpleName ::= identifier // case 165: { //#line 1169 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 166: ArrayInitializer ::= { VariableInitializersopt ,opt$opt } // case 166: { //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializersopt = (List) getRhsSym(2); //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 1200 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableInitializersopt == null) setResult(nf.ArrayInit(pos())); else setResult(nf.ArrayInit(pos(), VariableInitializersopt)); break; } // // Rule 167: VariableInitializers ::= VariableInitializer // case 167: { //#line 1206 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(1); //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(VariableInitializer); setResult(l); break; } // // Rule 168: VariableInitializers ::= VariableInitializers , VariableInitializer // case 168: { //#line 1213 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializers = (List) getRhsSym(1); //#line 1213 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 1215 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableInitializers.add(VariableInitializer); //setResult(VariableInitializers); break; } // // Rule 169: Block ::= { BlockStatementsopt } // case 169: { //#line 1234 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(2); //#line 1236 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Block(pos(), BlockStatementsopt)); break; } // // Rule 170: BlockStatements ::= BlockStatement // case 170: { //#line 1240 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(1); //#line 1242 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.addAll(BlockStatement); setResult(l); break; } // // Rule 171: BlockStatements ::= BlockStatements BlockStatement // case 171: { //#line 1247 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(1); //#line 1247 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(2); //#line 1249 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" BlockStatements.addAll(BlockStatement); //setResult(l); break; } // // Rule 173: BlockStatement ::= ClassDeclaration // case 173: { //#line 1255 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), ClassDeclaration)); setResult(l); break; } // // Rule 174: BlockStatement ::= Statement // case 174: { //#line 1262 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(1); //#line 1264 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(Statement); setResult(l); break; } // // Rule 176: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 176: { //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1272 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1274 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); if (VariableDeclarators != null) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag(VariableModifiersopt); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(Type, pos(d), d.dims), d.name, d.init)); // [IP] TODO: Add X10Local with exploded variables if (d.hasExplodedVars()) s.addAll(X10Formal_c.explode(nf, ts, d.name, pos(d), d.flags, d.names())); } } l.addAll(s); setResult(l); break; } // // Rule 200: IfThenStatement ::= if ( Expression ) Statement // case 200: { //#line 1335 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1335 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1337 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, Statement)); break; } // // Rule 201: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 201: { //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1341 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(7); //#line 1343 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, StatementNoShortIf, Statement)); break; } // // Rule 202: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf$true_stmt else StatementNoShortIf$false_stmt // case 202: { //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt true_stmt = (Stmt) getRhsSym(5); //#line 1347 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt false_stmt = (Stmt) getRhsSym(7); //#line 1349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, true_stmt, false_stmt)); break; } // // Rule 203: EmptyStatement ::= ; // case 203: { //#line 1355 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Empty(pos())); break; } // // Rule 204: LabeledStatement ::= identifier : Statement // case 204: { //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(3); //#line 1361 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), Statement)); break; } // // Rule 205: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 205: { //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(3); //#line 1367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), StatementNoShortIf)); break; } // // Rule 206: ExpressionStatement ::= StatementExpression ; // case 206: { //#line 1370 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1372 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Eval(pos(), StatementExpression)); break; } // // Rule 214: AssertStatement ::= assert Expression ; // case 214: { //#line 1393 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1395 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), Expression)); break; } // // Rule 215: AssertStatement ::= assert Expression$expr1 : Expression$expr2 ; // case 215: { //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr1 = (Expr) getRhsSym(2); //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr2 = (Expr) getRhsSym(4); //#line 1400 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), expr1, expr2)); break; } // // Rule 216: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 216: { //#line 1404 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1404 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlock = (List) getRhsSym(5); //#line 1406 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Switch(pos(), Expression, SwitchBlock)); break; } // // Rule 217: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 217: { //#line 1410 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroupsopt = (List) getRhsSym(2); //#line 1410 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabelsopt = (List) getRhsSym(3); //#line 1412 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroupsopt.addAll(SwitchLabelsopt); setResult(SwitchBlockStatementGroupsopt); break; } // // Rule 219: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 219: { //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroups = (List) getRhsSym(1); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroup = (List) getRhsSym(2); //#line 1420 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroups.addAll(SwitchBlockStatementGroup); // setResult(SwitchBlockStatementGroups); break; } // // Rule 220: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 220: { //#line 1425 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1425 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(2); //#line 1427 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), SwitchElement.class, false); l.addAll(SwitchLabels); l.add(nf.SwitchBlock(pos(), BlockStatements)); setResult(l); break; } // // Rule 221: SwitchLabels ::= SwitchLabel // case 221: { //#line 1434 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(1); //#line 1436 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Case.class, false); l.add(SwitchLabel); setResult(l); break; } // // Rule 222: SwitchLabels ::= SwitchLabels SwitchLabel // case 222: { //#line 1441 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1441 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(2); //#line 1443 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchLabels.add(SwitchLabel); //setResult(SwitchLabels); break; } // // Rule 223: SwitchLabel ::= case ConstantExpression : // case 223: { //#line 1448 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConstantExpression = (Expr) getRhsSym(2); //#line 1450 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Case(pos(), ConstantExpression)); break; } // // Rule 224: SwitchLabel ::= default : // case 224: { //#line 1457 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Default(pos())); break; } // // Rule 225: WhileStatement ::= while ( Expression ) Statement // case 225: { //#line 1464 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1464 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1466 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, Statement)); break; } // // Rule 226: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 226: { //#line 1470 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1470 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1472 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, StatementNoShortIf)); break; } // // Rule 227: DoStatement ::= do Statement while ( Expression ) ; // case 227: { //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(2); //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(5); //#line 1478 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Do(pos(), Statement, Expression)); break; } // // Rule 230: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 230: { //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1485 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(9); //#line 1487 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, Statement)); break; } // // Rule 231: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 231: { //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1491 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(9); //#line 1493 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, StatementNoShortIf)); break; } // // Rule 233: ForInit ::= LocalVariableDeclaration // case 233: { //#line 1498 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List LocalVariableDeclaration = (List) getRhsSym(1); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ForInit.class, false); l.addAll(LocalVariableDeclaration); //setResult(l); break; } // // Rule 235: StatementExpressionList ::= StatementExpression // case 235: { //#line 1508 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1510 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Eval.class, false); l.add(nf.Eval(pos(), StatementExpression)); setResult(l); break; } // // Rule 236: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 236: { //#line 1515 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List StatementExpressionList = (List) getRhsSym(1); //#line 1515 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(3); //#line 1517 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" StatementExpressionList.add(nf.Eval(pos(), StatementExpression)); //setResult(StatementExpressionList); break; } // // Rule 237: BreakStatement ::= break identifieropt ; // case 237: { //#line 1525 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1527 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Break(pos())); else setResult(nf.Break(pos(), identifieropt.toString())); break; } // // Rule 238: ContinueStatement ::= continue identifieropt ; // case 238: { //#line 1533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1535 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Continue(pos())); else setResult(nf.Continue(pos(), identifieropt.toString())); break; } // // Rule 239: ReturnStatement ::= return Expressionopt ; // case 239: { //#line 1541 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(2); //#line 1543 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Return(pos(), Expressionopt)); break; } // // Rule 240: ThrowStatement ::= throw Expression ; // case 240: { //#line 1547 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1549 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Throw(pos(), Expression)); break; } // // Rule 241: TryStatement ::= try Block Catches // case 241: { //#line 1559 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1559 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(3); //#line 1561 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catches)); break; } // // Rule 242: TryStatement ::= try Block Catchesopt Finally // case 242: { //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catchesopt = (List) getRhsSym(3); //#line 1564 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Finally = (Block) getRhsSym(4); //#line 1566 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catchesopt, Finally)); break; } // // Rule 243: Catches ::= CatchClause // case 243: { //#line 1570 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(1); //#line 1572 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Catch.class, false); l.add(CatchClause); setResult(l); break; } // // Rule 244: Catches ::= Catches CatchClause // case 244: { //#line 1577 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(1); //#line 1577 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(2); //#line 1579 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catches.add(CatchClause); //setResult(Catches); break; } // // Rule 245: CatchClause ::= catch ( FormalParameter ) Block // case 245: { //#line 1584 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1584 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(5); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Catch(pos(), FormalParameter, Block)); break; } // // Rule 246: Finally ::= finally Block // case 246: { //#line 1590 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1592 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 250: PrimaryNoNewArray ::= Type . class // case 250: { //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1612 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 251: PrimaryNoNewArray ::= void . class // case 251: { //#line 1631 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 252: PrimaryNoNewArray ::= this // case 252: { //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos())); break; } // // Rule 253: PrimaryNoNewArray ::= ClassName . this // case 253: { //#line 1640 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1642 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 254: PrimaryNoNewArray ::= ( Expression ) // case 254: { //#line 1645 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1647 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ParExpr(pos(), Expression)); break; } // // Rule 259: Literal ::= IntegerLiteral$IntegerLiteral // case 259: { //#line 1655 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken IntegerLiteral = (IToken) getRhsIToken(1); //#line 1657 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.IntegerLiteral a = int_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 260: Literal ::= LongLiteral$LongLiteral // case 260: { //#line 1661 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken LongLiteral = (IToken) getRhsIToken(1); //#line 1663 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.LongLiteral a = long_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 261: Literal ::= FloatingPointLiteral$FloatLiteral // case 261: { //#line 1667 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken FloatLiteral = (IToken) getRhsIToken(1); //#line 1669 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.FloatLiteral a = float_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 262: Literal ::= DoubleLiteral$DoubleLiteral // case 262: { //#line 1673 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken DoubleLiteral = (IToken) getRhsIToken(1); //#line 1675 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.DoubleLiteral a = double_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 263: Literal ::= BooleanLiteral // case 263: { //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.BooleanLiteral BooleanLiteral = (polyglot.lex.BooleanLiteral) getRhsSym(1); //#line 1681 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.BooleanLit(pos(), BooleanLiteral.getValue().booleanValue())); break; } // // Rule 264: Literal ::= CharacterLiteral$CharacterLiteral // case 264: { //#line 1684 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken CharacterLiteral = (IToken) getRhsIToken(1); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.CharacterLiteral a = char_lit(getRhsFirstTokenIndex(1)); setResult(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 265: Literal ::= StringLiteral$str // case 265: { //#line 1690 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken str = (IToken) getRhsIToken(1); //#line 1692 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.StringLiteral a = string_lit(getRhsFirstTokenIndex(1)); setResult(nf.StringLit(pos(), a.getValue())); break; } // // Rule 266: Literal ::= null // case 266: { //#line 1698 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.NullLit(pos())); break; } // // Rule 267: BooleanLiteral ::= true$trueLiteral // case 267: { //#line 1702 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken trueLiteral = (IToken) getRhsIToken(1); //#line 1704 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 268: BooleanLiteral ::= false$falseLiteral // case 268: { //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken falseLiteral = (IToken) getRhsIToken(1); //#line 1709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 269: ArgumentList ::= Expression // case 269: { //#line 1722 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(1); //#line 1724 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Expression); setResult(l); break; } // // Rule 270: ArgumentList ::= ArgumentList , Expression // case 270: { //#line 1729 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentList = (List) getRhsSym(1); //#line 1729 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1731 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ArgumentList.add(Expression); //setResult(ArgumentList); break; } // // Rule 271: DimExprs ::= DimExpr // case 271: { //#line 1765 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(1); //#line 1767 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); setResult(l); break; } // // Rule 272: DimExprs ::= DimExprs DimExpr // case 272: { //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List DimExprs = (List) getRhsSym(1); //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(2); //#line 1774 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" DimExprs.add(DimExpr); //setResult(DimExprs); break; } // // Rule 273: DimExpr ::= [ Expression ] // case 273: { //#line 1779 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1781 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Expression.position(pos())); break; } // // Rule 274: Dims ::= [ ] // case 274: { //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(1)); break; } // // Rule 275: Dims ::= Dims [ ] // case 275: { //#line 1790 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Integer Dims = (Integer) getRhsSym(1); //#line 1792 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(Dims.intValue() + 1)); break; } // // Rule 276: FieldAccess ::= Primary . identifier // case 276: { //#line 1796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Primary = (Expr) getRhsSym(1); //#line 1796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1798 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(), Primary, identifier.getIdentifier())); break; } // // Rule 277: FieldAccess ::= super . identifier // case 277: { //#line 1801 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 278: FieldAccess ::= ClassName . super$sup . identifier // case 278: { //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken sup = (IToken) getRhsIToken(3); //#line 1806 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1808 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 279: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 279: { //#line 1812 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name MethodName = (Name) getRhsSym(1); //#line 1812 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 1814 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Call(pos(), MethodName.prefix == null ? null : MethodName.prefix.toReceiver(), MethodName.name, ArgumentListopt)); break; } // // Rule 281: PostfixExpression ::= ExpressionName // case 281: { //#line 1837 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 1839 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 284: PostIncrementExpression ::= PostfixExpression ++ // case 284: { //#line 1845 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1847 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_INC)); break; } // // Rule 285: PostDecrementExpression ::= PostfixExpression -- // case 285: { //#line 1851 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1853 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_DEC)); break; } // // Rule 288: UnaryExpression ::= + UnaryExpression // case 288: { //#line 1859 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1861 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.POS, UnaryExpression)); break; } // // Rule 289: UnaryExpression ::= - UnaryExpression // case 289: { //#line 1864 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1866 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NEG, UnaryExpression)); break; } // // Rule 291: PreIncrementExpression ::= ++ UnaryExpression // case 291: { //#line 1871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1873 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_INC, UnaryExpression)); break; } // // Rule 292: PreDecrementExpression ::= -- UnaryExpression // case 292: { //#line 1877 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1879 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_DEC, UnaryExpression)); break; } // // Rule 294: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 294: { //#line 1884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1886 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.BIT_NOT, UnaryExpression)); break; } // // Rule 295: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 295: { //#line 1889 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1891 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NOT, UnaryExpression)); break; } // // Rule 298: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 298: { //#line 1903 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1903 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1905 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MUL, UnaryExpression)); break; } // // Rule 299: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 299: { //#line 1908 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1908 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1910 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.DIV, UnaryExpression)); break; } // // Rule 300: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 300: { //#line 1913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1915 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MOD, UnaryExpression)); break; } // // Rule 302: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 302: { //#line 1920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1922 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.ADD, MultiplicativeExpression)); break; } // // Rule 303: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 303: { //#line 1925 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1925 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1927 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.SUB, MultiplicativeExpression)); break; } // // Rule 305: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 305: { //#line 1932 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1932 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(3); //#line 1934 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ShiftExpression, Binary.SHL, AdditiveExpression)); break; } // // Rule 306: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 306: { //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(4); //#line 1939 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.SHR, AdditiveExpression)); break; } // // Rule 307: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 307: { //#line 1943 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1943 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(5); //#line 1945 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.USHR, AdditiveExpression)); break; } // // Rule 309: RelationalExpression ::= RelationalExpression < ShiftExpression // case 309: { //#line 1951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1951 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1953 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LT, ShiftExpression)); break; } // // Rule 310: RelationalExpression ::= RelationalExpression > ShiftExpression // case 310: { //#line 1956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1958 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.GT, ShiftExpression)); break; } // // Rule 311: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 311: { //#line 1961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1961 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1963 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LE, ShiftExpression)); break; } // // Rule 312: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 312: { //#line 1966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1966 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(4); //#line 1968 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), RelationalExpression, Binary.GE, ShiftExpression)); break; } // // Rule 314: EqualityExpression ::= EqualityExpression == RelationalExpression // case 314: { //#line 1982 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1982 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1984 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.EQ, RelationalExpression)); break; } // // Rule 315: EqualityExpression ::= EqualityExpression != RelationalExpression // case 315: { //#line 1987 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1987 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1989 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.NE, RelationalExpression)); break; } // // Rule 317: AndExpression ::= AndExpression & EqualityExpression // case 317: { //#line 1994 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(1); //#line 1994 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(3); //#line 1996 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AndExpression, Binary.BIT_AND, EqualityExpression)); break; } // // Rule 319: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 319: { //#line 2001 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(1); //#line 2001 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(3); //#line 2003 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ExclusiveOrExpression, Binary.BIT_XOR, AndExpression)); break; } // // Rule 321: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 321: { //#line 2008 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(1); //#line 2008 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(3); //#line 2010 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), InclusiveOrExpression, Binary.BIT_OR, ExclusiveOrExpression)); break; } // // Rule 323: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 323: { //#line 2015 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(1); //#line 2015 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(3); //#line 2017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalAndExpression, Binary.COND_AND, InclusiveOrExpression)); break; } // // Rule 325: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 325: { //#line 2022 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2022 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(3); //#line 2024 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalOrExpression, Binary.COND_OR, ConditionalAndExpression)); break; } // // Rule 327: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 327: { //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 2029 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalExpression = (Expr) getRhsSym(5); //#line 2031 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Conditional(pos(), ConditionalOrExpression, Expression, ConditionalExpression)); break; } // // Rule 330: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 330: { //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr LeftHandSide = (Expr) getRhsSym(1); //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Assign.Operator AssignmentOperator = (Assign.Operator) getRhsSym(2); //#line 2038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AssignmentExpression = (Expr) getRhsSym(3); //#line 2040 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assign(pos(), LeftHandSide, AssignmentOperator, AssignmentExpression)); break; } // // Rule 331: LeftHandSide ::= ExpressionName // case 331: { //#line 2044 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 2046 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 334: AssignmentOperator ::= = // case 334: { //#line 2054 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ASSIGN); break; } // // Rule 335: AssignmentOperator ::= *= // case 335: { //#line 2059 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MUL_ASSIGN); break; } // // Rule 336: AssignmentOperator ::= /= // case 336: { //#line 2064 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.DIV_ASSIGN); break; } // // Rule 337: AssignmentOperator ::= %= // case 337: { //#line 2069 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MOD_ASSIGN); break; } // // Rule 338: AssignmentOperator ::= += // case 338: { //#line 2074 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ADD_ASSIGN); break; } // // Rule 339: AssignmentOperator ::= -= // case 339: { //#line 2079 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SUB_ASSIGN); break; } // // Rule 340: AssignmentOperator ::= <<= // case 340: { //#line 2084 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SHL_ASSIGN); break; } // // Rule 341: AssignmentOperator ::= > > = // case 341: { //#line 2089 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.SHR_ASSIGN); break; } // // Rule 342: AssignmentOperator ::= > > > = // case 342: { //#line 2095 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.USHR_ASSIGN); break; } // // Rule 343: AssignmentOperator ::= &= // case 343: { //#line 2101 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_AND_ASSIGN); break; } // // Rule 344: AssignmentOperator ::= ^= // case 344: { //#line 2106 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_XOR_ASSIGN); break; } // // Rule 345: AssignmentOperator ::= |= // case 345: { //#line 2111 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_OR_ASSIGN); break; } // // Rule 348: Dimsopt ::= $Empty // case 348: { //#line 2124 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(0)); break; } // // Rule 350: Catchesopt ::= $Empty // case 350: { //#line 2131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 352: identifieropt ::= $Empty // case 352: setResult(null); break; // // Rule 353: identifieropt ::= identifier // case 353: { //#line 2138 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2140 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 354: ForUpdateopt ::= $Empty // case 354: { //#line 2146 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 356: Expressionopt ::= $Empty // case 356: setResult(null); break; // // Rule 358: ForInitopt ::= $Empty // case 358: { //#line 2157 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 360: SwitchLabelsopt ::= $Empty // case 360: { //#line 2164 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 362: SwitchBlockStatementGroupsopt ::= $Empty // case 362: { //#line 2171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 364: VariableModifiersopt ::= $Empty // case 364: { //#line 2178 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 366: VariableInitializersopt ::= $Empty // case 366: setResult(null); break; // // Rule 368: AbstractMethodModifiersopt ::= $Empty // case 368: { //#line 2208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 370: ConstantModifiersopt ::= $Empty // case 370: { //#line 2215 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 372: InterfaceMemberDeclarationsopt ::= $Empty // case 372: { //#line 2222 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 374: ExtendsInterfacesopt ::= $Empty // case 374: { //#line 2229 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 376: InterfaceModifiersopt ::= $Empty // case 376: { //#line 2236 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 378: ClassBodyopt ::= $Empty // case 378: setResult(null); break; // // Rule 380: Argumentsopt ::= $Empty // case 380: setResult(null); break; // // Rule 381: Argumentsopt ::= Arguments // case 381: throw new Error("No action specified for rule " + 381); // // Rule 382: ,opt ::= $Empty // case 382: setResult(null); break; // // Rule 384: ArgumentListopt ::= $Empty // case 384: { //#line 2266 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 386: BlockStatementsopt ::= $Empty // case 386: { //#line 2273 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 388: ExplicitConstructorInvocationopt ::= $Empty // case 388: setResult(null); break; // // Rule 390: ConstructorModifiersopt ::= $Empty // case 390: { //#line 2284 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 392: ...opt ::= $Empty // case 392: setResult(null); break; // // Rule 394: FormalParameterListopt ::= $Empty // case 394: { //#line 2295 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 396: Throwsopt ::= $Empty // case 396: { //#line 2302 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 398: MethodModifiersopt ::= $Empty // case 398: { //#line 2309 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 400: FieldModifiersopt ::= $Empty // case 400: { //#line 2316 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 402: ClassBodyDeclarationsopt ::= $Empty // case 402: { //#line 2323 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 404: Interfacesopt ::= $Empty // case 404: { //#line 2330 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 406: Superopt ::= $Empty // case 406: { //#line 2337 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), "x10.lang.Object").toType()); break; } // // Rule 408: ClassModifiersopt ::= $Empty // case 408: { //#line 2348 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 410: TypeDeclarationsopt ::= $Empty // case 410: { //#line 2360 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 412: ImportDeclarationsopt ::= $Empty // case 412: { //#line 2367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 414: PackageDeclarationopt ::= $Empty // case 414: setResult(null); break; // // Rule 416: ClassType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 416: { //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 417: InterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 417: { //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 732 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 734 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 418: PackageDeclaration ::= package PackageName ; // case 418: { //#line 740 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name PackageName = (Name) getRhsSym(2); //#line 742 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(PackageName.toPackage()); break; } // // Rule 419: NormalClassDeclaration ::= X10ClassModifiersopt class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 419: { //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 746 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 748 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(X10Flags.isValue(X10ClassModifiersopt) ? nf.ValueClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody) : nf.ClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 421: X10ClassModifiers ::= X10ClassModifiers X10ClassModifier // case 421: { //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiers = (X10Flags) getRhsSym(1); //#line 761 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifier = (X10Flags) getRhsSym(2); //#line 763 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags result = X10ClassModifiers.setX(X10ClassModifier); setResult(result); break; } // // Rule 422: X10ClassModifier ::= ClassModifier // case 422: { //#line 769 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags ClassModifier = (Flags) getRhsSym(1); //#line 771 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(ClassModifier)); break; } // // Rule 423: X10ClassModifier ::= safe // case 423: { //#line 776 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 424: PropertyList ::= ( Properties WhereClauseopt ) // case 424: { //#line 780 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(2); //#line 780 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(3); //#line 782 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = Properties; result[1] = WhereClauseopt; setResult(result); break; } // // Rule 425: PropertyList ::= ( WhereClause ) // case 425: { //#line 787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(2); //#line 789 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = null; result[1] = WhereClause; setResult(result); break; } // // Rule 426: Properties ::= Property // case 426: { //#line 796 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(1); //#line 798 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), PropertyDecl.class, false); l.add(Property); setResult(l); break; } // // Rule 427: Properties ::= Properties , Property // case 427: { //#line 803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(1); //#line 803 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(3); //#line 805 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Properties.add(Property); // setResult(FormalParameters); break; } // // Rule 428: Property ::= Type identifier // case 428: { //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(2); //#line 813 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.PropertyDecl(pos(), Flags.PUBLIC.Final(), Type, identifier.getIdentifier())); break; } // // Rule 429: MethodDeclaration ::= ThisClauseopt MethodModifiersopt ResultType MethodDeclarator Throwsopt MethodBody // case 429: { //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags MethodModifiersopt = (Flags) getRhsSym(2); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 826 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(6); //#line 828 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name c = (MethodDeclarator != null) ? (Name) MethodDeclarator[0] : null; List d = (MethodDeclarator != null) ? (List) MethodDeclarator[1] : null; Integer e = (MethodDeclarator != null) ? (Integer) MethodDeclarator[2] : null; Expr where = (MethodDeclarator != null) ? (Expr) MethodDeclarator[3] : null; if (ResultType.type() == ts.Void() && e != null && e.intValue() > 0) { // TODO: error!!! System.err.println("Fix me - encountered method returning void but with non-zero rank?"); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, MethodModifiersopt, nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e != null ? e.intValue() : 1), c != null ? c.toString() : "", d, where, Throwsopt, MethodBody)); break; } // // Rule 430: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 430: { //#line 850 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), ArgumentListopt)); break; } // // Rule 431: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 431: { //#line 855 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 857 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), ArgumentListopt)); break; } // // Rule 432: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 432: { //#line 860 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 860 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 862 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 433: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 433: { //#line 865 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 865 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 867 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 434: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier PropertyListopt ExtendsInterfacesopt InterfaceBody // case 434: { //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags InterfaceModifiersopt = (Flags) getRhsSym(1); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ExtendsInterfacesopt = (List) getRhsSym(5); //#line 871 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody InterfaceBody = (ClassBody) getRhsSym(6); //#line 873 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(nf.ClassDecl(pos(), InterfaceModifiersopt.Interface(), identifier.getIdentifier(), props, ci, null, ExtendsInterfacesopt, InterfaceBody)); break; } // // Rule 435: AbstractMethodDeclaration ::= ThisClauseopt AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 435: { //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags AbstractMethodModifiersopt = (Flags) getRhsSym(2); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 888 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 890 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name c = (Name) MethodDeclarator[0]; List d = (List) MethodDeclarator[1]; Integer e = (Integer) MethodDeclarator[2]; Expr where = (Expr) MethodDeclarator[3]; if (ResultType.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, AbstractMethodModifiersopt , nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e.intValue()), c.toString(), d, where, Throwsopt, null)); break; } // // Rule 436: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 436: { //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ClassOrInterfaceType = (TypeNode) getRhsSym(2); //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(4); //#line 913 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(6); //#line 915 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ClassBodyopt == null) setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt)); else setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt, ClassBodyopt)); break; } // // Rule 437: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 437: { //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 920 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 922 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 438: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 438: { //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name AmbiguousName = (Name) getRhsSym(1); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 930 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 439: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 439: { //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 939 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 440: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 440: { //#line 942 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 942 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 441: MethodInvocation ::= ClassName . super$sup . identifier ( ArgumentListopt ) // case 441: { //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 947 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(7); //#line 949 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 443: AssignPropertyCall ::= property ( ArgumentList ) // case 443: { //#line 954 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 956 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AssignPropertyCall(pos(), ArgumentList)); break; } // // Rule 444: Type ::= DataType // case 444: { //#line 965 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(1); //#line 967 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 445: Type ::= nullable < Type > DepParametersopt // case 445: { //#line 970 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 970 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(5); //#line 972 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode t = nf.Nullable(pos(), Type); setResult(DepParametersopt == null ? t : t.dep(null, DepParametersopt)); break; } // // Rule 446: Type ::= future < Type > // case 446: { //#line 978 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 980 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 450: PrimitiveType ::= NumericType DepParametersopt // case 450: { //#line 995 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode NumericType = (TypeNode) getRhsSym(1); //#line 995 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 997 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parser: parsed PrimitiveType |" + NumericType + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? NumericType : ((X10TypeNode) NumericType).dep(null, DepParametersopt)); break; } // // Rule 451: PrimitiveType ::= boolean DepParametersopt // case 451: { //#line 1003 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1005 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode res = (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.Boolean()); setResult(DepParametersopt==null ? res : res.dep(null, DepParametersopt)); break; } // // Rule 456: ClassOrInterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 456: { //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1017 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 1019 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10TypeNode type; if (ts.isPrimitiveTypeName(TypeName.name)) { try { type= (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.primitiveForName(TypeName.name)); } catch (SemanticException e) { throw new InternalCompilerError("Unable to create primitive type for '" + TypeName.name + "'!"); } } else type= (X10TypeNode) TypeName.toType(); // System.out.println("Parser: parsed ClassOrInterfaceType |" + TypeName + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? type : type.dep(null, DepParametersopt)); break; } // // Rule 457: DepParameters ::= ( DepParameterExpr ) // case 457: { //#line 1036 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(2); //#line 1038 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParameterExpr); break; } // // Rule 458: DepParameterExpr ::= ArgumentList WhereClauseopt // case 458: { //#line 1042 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(1); //#line 1042 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(2); //#line 1044 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), ArgumentList, WhereClauseopt)); break; } // // Rule 459: DepParameterExpr ::= WhereClause // case 459: { //#line 1047 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(1); //#line 1049 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), Collections.EMPTY_LIST, WhereClause)); break; } // // Rule 460: WhereClause ::= : ConstExpression // case 460: { //#line 1053 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1055 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 461: ConstPrimary ::= Literal // case 461: { //#line 1060 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.ast.Lit Literal = (polyglot.ast.Lit) getRhsSym(1); //#line 1062 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Literal); break; } // // Rule 462: ConstPrimary ::= Type . class // case 462: { //#line 1065 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1067 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 463: ConstPrimary ::= void . class // case 463: { //#line 1086 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 464: ConstPrimary ::= this // case 464: { //#line 1092 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos())); break; } // // Rule 465: ConstPrimary ::= here // case 465: { //#line 1097 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Here(pos())); break; } // // Rule 466: ConstPrimary ::= ClassName . this // case 466: { //#line 1100 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1102 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 467: ConstPrimary ::= ( ConstExpression ) // case 467: { //#line 1105 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1107 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 469: ConstPrimary ::= self // case 469: { //#line 1113 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Self(pos())); break; } // // Rule 470: ConstPostfixExpression ::= ConstPrimary // case 470: { //#line 1119 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1121 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstPrimary); break; } // // Rule 471: ConstPostfixExpression ::= ExpressionName // case 471: { //#line 1124 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1126 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ExpressionName.toExpr()); break; } // // Rule 472: ConstUnaryExpression ::= ConstPostfixExpression // case 472: { //#line 1129 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPostfixExpression = (Expr) getRhsSym(1); //#line 1131 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstPostfixExpression); break; } // // Rule 473: ConstUnaryExpression ::= + ConstUnaryExpression // case 473: { //#line 1134 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1136 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.POS, ConstUnaryExpression)); break; } // // Rule 474: ConstUnaryExpression ::= - ConstUnaryExpression // case 474: { //#line 1139 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1141 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NEG, ConstUnaryExpression)); break; } // // Rule 475: ConstUnaryExpression ::= ! ConstUnaryExpression // case 475: { //#line 1144 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1146 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NOT, ConstUnaryExpression)); break; } // // Rule 476: ConstMultiplicativeExpression ::= ConstUnaryExpression // case 476: { //#line 1150 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(1); //#line 1152 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstUnaryExpression); break; } // // Rule 477: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression * ConstUnaryExpression // case 477: { //#line 1155 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1155 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1157 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MUL, ConstUnaryExpression)); break; } // // Rule 478: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression / ConstUnaryExpression // case 478: { //#line 1160 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1160 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1162 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.DIV, ConstUnaryExpression)); break; } // // Rule 479: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression % ConstUnaryExpression // case 479: { //#line 1165 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1165 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1167 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MOD, ConstUnaryExpression)); break; } // // Rule 480: ConstAdditiveExpression ::= ConstMultiplicativeExpression // case 480: { //#line 1171 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1173 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstMultiplicativeExpression); break; } // // Rule 481: ConstAdditiveExpression ::= ConstAdditiveExpression + ConstMultiplicativeExpression // case 481: { //#line 1176 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1176 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1178 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.ADD, ConstMultiplicativeExpression)); break; } // // Rule 482: ConstAdditiveExpression ::= ConstAdditiveExpression - ConstMultiplicativeExpression // case 482: { //#line 1181 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1181 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1183 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.SUB, ConstMultiplicativeExpression)); break; } // // Rule 483: ConstRelationalExpression ::= ConstAdditiveExpression // case 483: { //#line 1188 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1190 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstAdditiveExpression); break; } // // Rule 484: ConstRelationalExpression ::= ConstRelationalExpression < ConstAdditiveExpression // case 484: { //#line 1193 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1193 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1195 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LT, ConstAdditiveExpression)); break; } // // Rule 485: ConstRelationalExpression ::= ConstRelationalExpression > ConstAdditiveExpression // case 485: { //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1198 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1200 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GT, ConstAdditiveExpression)); break; } // // Rule 486: ConstRelationalExpression ::= ConstRelationalExpression <= ConstAdditiveExpression // case 486: { //#line 1203 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1203 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1205 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LE, ConstAdditiveExpression)); break; } // // Rule 487: ConstRelationalExpression ::= ConstRelationalExpression > = ConstAdditiveExpression // case 487: { //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1208 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(4); //#line 1210 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GE, ConstAdditiveExpression)); break; } // // Rule 488: ConstEqualityExpression ::= ConstRelationalExpression // case 488: { //#line 1214 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1216 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstRelationalExpression); break; } // // Rule 489: ConstEqualityExpression ::= ConstEqualityExpression == ConstRelationalExpression // case 489: { //#line 1219 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1219 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1221 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.EQ, ConstRelationalExpression)); break; } // // Rule 490: ConstEqualityExpression ::= ConstEqualityExpression != ConstRelationalExpression // case 490: { //#line 1224 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1224 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1226 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.NE, ConstRelationalExpression)); break; } // // Rule 491: ConstAndExpression ::= ConstEqualityExpression // case 491: { //#line 1230 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1232 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstEqualityExpression); break; } // // Rule 492: ConstAndExpression ::= ConstAndExpression && ConstEqualityExpression // case 492: { //#line 1235 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1235 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(3); //#line 1237 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAndExpression, Binary.COND_AND, ConstEqualityExpression)); break; } // // Rule 493: ConstExclusiveOrExpression ::= ConstAndExpression // case 493: { //#line 1241 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1243 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstAndExpression); break; } // // Rule 494: ConstExclusiveOrExpression ::= ConstExclusiveOrExpression ^ ConstAndExpression // case 494: { //#line 1246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1246 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(3); //#line 1248 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstExclusiveOrExpression, Binary.BIT_XOR, ConstAndExpression)); break; } // // Rule 495: ConstInclusiveOrExpression ::= ConstExclusiveOrExpression // case 495: { //#line 1252 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1254 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstExclusiveOrExpression); break; } // // Rule 496: ConstInclusiveOrExpression ::= ConstInclusiveOrExpression || ConstExclusiveOrExpression // case 496: { //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1257 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(3); //#line 1259 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstInclusiveOrExpression, Binary.COND_OR, ConstExclusiveOrExpression)); break; } // // Rule 497: ConstExpression ::= ConstInclusiveOrExpression // case 497: { //#line 1263 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1265 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ConstInclusiveOrExpression); break; } // // Rule 498: ConstExpression ::= ConstInclusiveOrExpression ? ConstExpression$first : ConstExpression // case 498: { //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr first = (Expr) getRhsSym(3); //#line 1268 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(5); //#line 1270 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Conditional(pos(), ConstInclusiveOrExpression, first, ConstExpression)); break; } // // Rule 499: ConstFieldAccess ::= ConstPrimary . identifier // case 499: { //#line 1275 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1275 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1277 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(), ConstPrimary, identifier.getIdentifier())); break; } // // Rule 500: ConstFieldAccess ::= super . identifier // case 500: { //#line 1280 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1282 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 501: ConstFieldAccess ::= ClassName . super$sup . identifier // case 501: { //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 1285 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1287 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 503: X10ArrayType ::= Type [ . ] // case 503: { //#line 1303 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1305 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, null)); break; } // // Rule 504: X10ArrayType ::= Type value [ . ] // case 504: { //#line 1308 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1310 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, null)); break; } // // Rule 505: X10ArrayType ::= Type [ DepParameterExpr ] // case 505: { //#line 1313 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1313 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(3); //#line 1315 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, DepParameterExpr)); break; } // // Rule 506: X10ArrayType ::= Type value [ DepParameterExpr ] // case 506: { //#line 1318 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1318 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(4); //#line 1320 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, DepParameterExpr)); break; } // // Rule 507: ObjectKind ::= value // case 507: throw new Error("No action specified for rule " + 507); // // Rule 508: ObjectKind ::= reference // case 508: throw new Error("No action specified for rule " + 508); // // Rule 509: MethodModifier ::= atomic // case 509: { //#line 1334 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.ATOMIC); break; } // // Rule 510: MethodModifier ::= extern // case 510: { //#line 1339 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Flags.NATIVE); break; } // // Rule 511: MethodModifier ::= safe // case 511: { //#line 1344 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 512: MethodModifier ::= sequential // case 512: { //#line 1349 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SEQUENTIAL); break; } // // Rule 513: MethodModifier ::= local // case 513: { //#line 1354 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.LOCAL); break; } // // Rule 514: MethodModifier ::= nonblocking // case 514: { //#line 1359 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.NON_BLOCKING); break; } // // Rule 516: ValueClassDeclaration ::= X10ClassModifiersopt value identifier PropertyListopt Superopt Interfacesopt ClassBody // case 516: { //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 1365 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 1367 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 517: ValueClassDeclaration ::= X10ClassModifiersopt value class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 517: { //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(5); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(6); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(7); //#line 1375 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(8); //#line 1377 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 518: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 518: { //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags ConstructorModifiersopt = (Flags) getRhsSym(1); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] ConstructorDeclarator = (Object[]) getRhsSym(2); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(3); //#line 1386 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block ConstructorBody = (Block) getRhsSym(4); //#line 1388 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name a = (Name) ConstructorDeclarator[1]; DepParameterExpr c = (DepParameterExpr) ConstructorDeclarator[2]; List b = (List) ConstructorDeclarator[3]; Expr e = (Expr) ConstructorDeclarator[4]; setResult(nf.ConstructorDecl(pos(), ConstructorModifiersopt, a.toString(), c, b, e, Throwsopt, ConstructorBody)); break; } // // Rule 519: ConstructorDeclarator ::= SimpleTypeName DepParametersopt ( FormalParameterListopt WhereClauseopt ) // case 519: { //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name SimpleTypeName = (Name) getRhsSym(1); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(4); //#line 1396 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(5); //#line 1398 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] a = new Object[5]; a[1] = SimpleTypeName; a[2] = DepParametersopt; a[3] = FormalParameterListopt; a[4] = WhereClauseopt; setResult(a); break; } // // Rule 520: ThisClause ::= this DepParameters // case 520: { //#line 1406 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameters = (DepParameterExpr) getRhsSym(2); //#line 1408 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DepParameters); break; } // // Rule 521: Super ::= extends DataType // case 521: { //#line 1412 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(2); //#line 1414 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 522: MethodDeclarator ::= identifier ( FormalParameterListopt WhereClauseopt ) // case 522: { //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(3); //#line 1418 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(4); //#line 1420 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parsing methoddeclarator..."); Object[] a = new Object[5]; a[0] = new Name(nf, ts, pos(), identifier.getIdentifier()); a[1] = FormalParameterListopt; a[2] = new Integer(0); a[3] = WhereClauseopt; setResult(a); break; } // // Rule 523: MethodDeclarator ::= MethodDeclarator [ ] // case 523: { //#line 1430 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(1); //#line 1432 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" MethodDeclarator[2] = new Integer(((Integer) MethodDeclarator[2]).intValue() + 1); // setResult(MethodDeclarator); break; } // // Rule 524: FieldDeclaration ::= ThisClauseopt FieldModifiersopt Type VariableDeclarators ; // case 524: { //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Flags FieldModifiersopt = (Flags) getRhsSym(2); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1438 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List VariableDeclarators = (List) getRhsSym(4); //#line 1440 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), ClassMember.class, false); if (VariableDeclarators != null && VariableDeclarators.size() > 0) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(FieldModifiersopt); l.add(nf.FieldDecl(d.position(), ThisClauseopt, d.flags, nf.array(Type, Type.position(), d.dims), d.name, d.init)); } } setResult(l); break; } // // Rule 525: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt Dims ArrayInitializer // case 525: { //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(4); //#line 1474 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ArrayInit ArrayInitializer = (ArrayInit) getRhsSym(5); //#line 1476 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Dims.intValue(), ArrayInitializer)); break; } // // Rule 526: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr Dims // case 526: { //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1480 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(5); //#line 1482 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Collections.singletonList(DimExpr), Dims.intValue())); break; } // // Rule 527: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr DimExprs Dimsopt // case 527: { //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List DimExprs = (List) getRhsSym(5); //#line 1486 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Integer Dimsopt = (Integer) getRhsSym(6); //#line 1488 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); l.addAll(DimExprs); setResult(nf.NewArray(pos(), ArrayBaseType, l, Dimsopt.intValue())); break; } // // Rule 528: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] // case 528: { //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1495 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1497 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, null)); break; } // // Rule 529: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression$distr ] Expression$initializer // case 529: { //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr distr = (Expr) getRhsSym(6); //#line 1500 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr initializer = (Expr) getRhsSym(8); //#line 1502 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, distr, initializer)); break; } // // Rule 530: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] ($lparen FormalParameter ) MethodBody // case 530: { //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken lparen = (IToken) getRhsIToken(8); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(9); //#line 1505 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(11); //#line 1507 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr initializer = makeInitializer( pos(getRhsFirstTokenIndex(8), getRightSpan()), ArrayBaseType, FormalParameter, MethodBody ); setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, initializer)); break; } // // Rule 531: Valueopt ::= $Empty // case 531: setResult(null); break; // // Rule 532: Valueopt ::= value // case 532: { //#line 1516 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 535: ArrayBaseType ::= nullable < Type > // case 535: { //#line 1523 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1525 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Nullable(pos(), Type)); break; } // // Rule 536: ArrayBaseType ::= future < Type > // case 536: { //#line 1528 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1530 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 537: ArrayBaseType ::= ( Type ) // case 537: { //#line 1533 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1535 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Type); break; } // // Rule 538: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 538: { //#line 1539 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1539 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1541 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), ExpressionName.toExpr(), (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), ExpressionName.toExpr(), ArgumentList)); break; } // // Rule 539: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 539: { //#line 1546 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PrimaryNoNewArray = (Expr) getRhsSym(1); //#line 1546 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1548 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), PrimaryNoNewArray, (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), PrimaryNoNewArray, ArgumentList)); break; } // // Rule 556: NowStatement ::= now ( Clock ) Statement // case 556: { //#line 1574 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1574 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1576 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, Statement)); break; } // // Rule 557: ClockedClause ::= clocked ( ClockList ) // case 557: { //#line 1580 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(3); //#line 1582 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(ClockList); break; } // // Rule 558: AsyncStatement ::= async PlaceExpressionSingleListopt ClockedClauseopt Statement // case 558: { //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1586 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(4); //#line 1588 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, Statement)); break; } // // Rule 559: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 559: { //#line 1596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1596 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(3); //#line 1598 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Statement)); break; } // // Rule 560: WhenStatement ::= when ( Expression ) Statement // case 560: { //#line 1605 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1605 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1607 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, Statement)); break; } // // Rule 561: WhenStatement ::= WhenStatement or$or ( Expression ) Statement // case 561: { //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1610 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(6); //#line 1612 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, Statement); setResult(WhenStatement); break; } // // Rule 562: ForEachStatement ::= foreach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 562: { //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1617 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1619 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 563: AtEachStatement ::= ateach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 563: { //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1627 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1629 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 564: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 564: { //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1637 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(7); //#line 1639 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, Statement)); break; } // // Rule 565: FinishStatement ::= finish Statement // case 565: { //#line 1646 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(2); //#line 1648 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), Statement)); break; } // // Rule 566: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 566: { //#line 1653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1653 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1655 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, StatementNoShortIf)); break; } // // Rule 567: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt ClockedClauseopt StatementNoShortIf // case 567: { //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1659 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(4); //#line 1661 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 568: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 568: { //#line 1668 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1670 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), nf.Here(pos(getLeftSpan())), StatementNoShortIf)); break; } // // Rule 569: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 569: { //#line 1674 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1674 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1676 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, StatementNoShortIf)); break; } // // Rule 570: WhenStatementNoShortIf ::= WhenStatement or$or ( Expression ) StatementNoShortIf // case 570: { //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1679 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(6); //#line 1681 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, StatementNoShortIf); setResult(WhenStatement); break; } // // Rule 571: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 571: { //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1686 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1688 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 572: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 572: { //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1697 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1699 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 573: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 573: { //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1707 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(7); //#line 1709 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, StatementNoShortIf)); break; } // // Rule 574: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 574: { //#line 1716 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1718 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), StatementNoShortIf)); break; } // // Rule 575: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 575: { //#line 1723 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpression = (Expr) getRhsSym(2); //#line 1725 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(PlaceExpression); break; } // // Rule 577: NextStatement ::= next ; // case 577: { //#line 1733 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Next(pos())); break; } // // Rule 578: AwaitStatement ::= await Expression ; // case 578: { //#line 1737 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(2); //#line 1739 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Await(pos(), Expression)); break; } // // Rule 579: ClockList ::= Clock // case 579: { //#line 1743 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(1); //#line 1745 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Clock); setResult(l); break; } // // Rule 580: ClockList ::= ClockList , Clock // case 580: { //#line 1750 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(1); //#line 1750 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1752 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ClockList.add(Clock); setResult(ClockList); break; } // // Rule 581: Clock ::= Expression // case 581: { //#line 1758 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(1); //#line 1760 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Expression); break; } // // Rule 582: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 582: { //#line 1770 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1770 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(4); //#line 1772 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Cast(pos(), Type, UnaryExpressionNotPlusMinus)); break; } // // Rule 583: CastExpression ::= ( @ Expression ) UnaryExpressionNotPlusMinus // case 583: { //#line 1775 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1775 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(5); //#line 1777 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.PlaceCast(pos(), Expression, UnaryExpressionNotPlusMinus)); break; } // // Rule 584: RelationalExpression ::= RelationalExpression instanceof Type // case 584: { //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1787 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1789 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Instanceof(pos(), RelationalExpression, Type)); break; } // // Rule 585: IdentifierList ::= identifier // case 585: { //#line 1795 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1797 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(l); break; } // // Rule 586: IdentifierList ::= IdentifierList , identifier // case 586: { //#line 1802 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List IdentifierList = (List) getRhsSym(1); //#line 1802 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1804 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" IdentifierList.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(IdentifierList); break; } // // Rule 587: Primary ::= here // case 587: { //#line 1811 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(((X10NodeFactory) nf).Here(pos()));//// A "here" expression used to be treated as an ExpressionName instead// of as a primary.//// setResult(new Name(nf, ts, pos(), "here"){// public Expr toExpr() {// return ((X10NodeFactory) nf).Here(pos);// }// }); break; } // // Rule 590: RegionExpression ::= Expression$expr1 : Expression$expr2 // case 590: { //#line 1827 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1827 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1829 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" /*Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(expr1); l.add(expr2); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); */ Call regionCall = nf.RegionMaker(pos(), expr1, expr2); setResult(regionCall); break; } // // Rule 591: RegionExpressionList ::= RegionExpression // case 591: { //#line 1845 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(1); //#line 1847 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(RegionExpression); setResult(l); break; } // // Rule 592: RegionExpressionList ::= RegionExpressionList , RegionExpression // case 592: { //#line 1852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(1); //#line 1852 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(3); //#line 1854 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" RegionExpressionList.add(RegionExpression); //setResult(RegionExpressionList); break; } // // Rule 593: Primary ::= [ RegionExpressionList ] // case 593: { //#line 1859 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(2); //#line 1861 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, RegionExpressionList); setResult(tuple); break; } // // Rule 594: AssignmentExpression ::= Expression$expr1 -> Expression$expr2 // case 594: { //#line 1875 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1875 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1877 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" ConstantDistMaker call = nf.ConstantDistMaker(pos(), expr1, expr2); setResult(call); break; } // // Rule 595: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 595: { //#line 1882 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1882 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1884 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Expression)); break; } // // Rule 596: FieldModifier ::= mutable // case 596: { //#line 1892 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.MUTABLE); break; } // // Rule 597: FieldModifier ::= const // case 597: { //#line 1897 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 598: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 598: throw new Error("No action specified for rule " + 598); // // Rule 599: MethodInvocation ::= MethodName ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 599: throw new Error("No action specified for rule " + 599); // // Rule 600: MethodInvocation ::= Primary . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 600: throw new Error("No action specified for rule " + 600); // // Rule 601: MethodInvocation ::= super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 601: throw new Error("No action specified for rule " + 601); // // Rule 602: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 602: throw new Error("No action specified for rule " + 602); // // Rule 603: MethodInvocation ::= TypeName . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 603: throw new Error("No action specified for rule " + 603); // // Rule 604: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 604: throw new Error("No action specified for rule " + 604); // // Rule 605: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 605: throw new Error("No action specified for rule " + 605); // // Rule 606: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 606: throw new Error("No action specified for rule " + 606); // // Rule 607: MethodModifier ::= synchronized // case 607: { //#line 1928 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "\"synchronized\" is an invalid X10 Method Modifier", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(Flags.SYNCHRONIZED); break; } // // Rule 608: FieldModifier ::= volatile // case 608: { //#line 1937 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "\"volatile\" is an invalid X10 Field Modifier", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(Flags.VOLATILE); break; } // // Rule 609: SynchronizedStatement ::= synchronized ( Expression ) Block // case 609: { //#line 1944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1944 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" Block Block = (Block) getRhsSym(5); //#line 1946 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, "Synchronized Statement is invalid in X10", getErrorPosition(getLeftSpan(), getRightSpan())); setResult(nf.Synchronized(pos(), Expression, Block)); break; } // // Rule 610: ThisClauseopt ::= $Empty // case 610: setResult(null); break; // // Rule 612: PlaceTypeSpecifieropt ::= $Empty // case 612: setResult(null); break; // // Rule 614: DepParametersopt ::= $Empty // case 614: setResult(null); break; // // Rule 616: PropertyListopt ::= $Empty // case 616: setResult(null); break; // // Rule 618: WhereClauseopt ::= $Empty // case 618: setResult(null); break; // // Rule 620: ObjectKindopt ::= $Empty // case 620: setResult(null); break; // // Rule 622: ArrayInitializeropt ::= $Empty // case 622: setResult(null); break; // // Rule 624: PlaceExpressionSingleListopt ::= $Empty // case 624: setResult(null); break; // // Rule 626: ArgumentListopt ::= $Empty // case 626: setResult(null); break; // // Rule 628: X10ClassModifiersopt ::= $Empty // case 628: { //#line 1992 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(Flags.NONE)); break; } // // Rule 630: DepParametersopt ::= $Empty // case 630: setResult(null); break; // // Rule 632: Unsafeopt ::= $Empty // case 632: setResult(null); break; // // Rule 633: Unsafeopt ::= unsafe // case 633: { //#line 2004 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 634: ParamIdopt ::= $Empty // case 634: setResult(null); break; // // Rule 635: ParamIdopt ::= identifier // case 635: { //#line 2011 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2013 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 636: ClockedClauseopt ::= $Empty // case 636: { //#line 2019 "C:/Docume~1/Administrator/MyDocu~1/work/x10/cvs/x10.compiler/src/x10/parser/x10.g" setResult(new TypedList(new LinkedList(), Expr.class, false)); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/f8e1720cd66996a6339b992bf154aa0d019240a3/X10Parser.java/clean/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
6781,
404,
30,
225,
21036,
493,
33,
21036,
263,
1068,
548,
54... | ||
Long messageCount = (Long) peerNode.getLocalNodeSentMessagesToStatistic().get(messageName); | Long messageCount = (Long) peerNodeStatus.getLocalMessagesSent().get(messageName); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { String path = uri.getPath(); if(path.endsWith("myref.txt")) { SimpleFieldSet fs = node.exportPublicFieldSet(); StringWriter sw = new StringWriter(); fs.writeTo(sw); this.writeReply(ctx, 200, "text/plain", "OK", sw.toString()); return; } final boolean advancedEnabled = node.getToadletContainer().isAdvancedDarknetEnabled(); /* gather connection statistics */ PeerNode[] peerNodes = node.getDarknetConnections(); Arrays.sort(peerNodes, new Comparator() { public int compare(Object first, Object second) { PeerNode firstNode = (PeerNode) first; PeerNode secondNode = (PeerNode) second; int statusDifference = firstNode.getPeerNodeStatus() - secondNode.getPeerNodeStatus(); if (statusDifference != 0) { return statusDifference; } return firstNode.getName().compareTo(secondNode.getName()); } }); /* copy peer node statuses for consistent display. */ int[] peerNodeStatuses = new int[peerNodes.length]; for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { peerNodeStatuses[peerIndex] = peerNodes[peerIndex].getPeerNodeStatus(); } int numberOfConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_CONNECTED); int numberOfRoutingBackedOff = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF); int numberOfTooNew = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_NEW); int numberOfTooOld = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_TOO_OLD); int numberOfDisconnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISCONNECTED); int numberOfNeverConnected = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_NEVER_CONNECTED); int numberOfDisabled = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_DISABLED); int numberOfBursting = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_BURSTING); int numberOfListening = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTENING); int numberOfListenOnly = getPeerStatusCount(peerNodeStatuses, Node.PEER_NODE_STATUS_LISTEN_ONLY); int numberOfSimpleConnected = numberOfConnected + numberOfRoutingBackedOff; int numberOfNotConnected = numberOfTooNew + numberOfTooOld + numberOfDisconnected + numberOfNeverConnected + numberOfDisabled + numberOfBursting + numberOfListening + numberOfListenOnly; String titleCountString = null; if(advancedEnabled) { titleCountString = "(" + numberOfConnected + "/" + numberOfRoutingBackedOff + "/" + numberOfTooNew + "/" + numberOfTooOld + "/" + numberOfNotConnected + ")"; } else { titleCountString = String.valueOf(numberOfSimpleConnected); } HTMLNode pageNode = ctx.getPageMaker().getPageNode(titleCountString + " Darknet Peers of " + node.getMyName()); HTMLNode contentNode = ctx.getPageMaker().getContentNode(pageNode); // FIXME! We need some nice images long now = System.currentTimeMillis(); contentNode.addChild(node.alerts.createSummary()); /* node status values */ int bwlimitDelayTime = (int) node.getBwlimitDelayTime(); int nodeAveragePingTime = (int) node.getNodeAveragePingTime(); int networkSizeEstimate = node.getNetworkSizeEstimate(0); DecimalFormat fix4 = new DecimalFormat("0.0000"); double missRoutingDistance = node.missRoutingDistance.currentValue(); DecimalFormat fix1 = new DecimalFormat("##0.0%"); double backedoffPercent = node.backedoffPercent.currentValue(); String nodeUptimeString = timeIntervalToString(( now - node.startupTime ) / 1000); // BEGIN OVERVIEW TABLE HTMLNode overviewTable = contentNode.addChild("table", "class", "column"); HTMLNode overviewTableRow = overviewTable.addChild("tr"); HTMLNode nextTableCell = overviewTableRow.addChild("td", "class", "first"); /* node status overview box */ if(advancedEnabled) { HTMLNode overviewInfobox = nextTableCell.addChild("div", "class", "infobox"); overviewInfobox.addChild("div", "class", "infobox-header", "Node status overview"); HTMLNode overviewInfoboxContent = overviewInfobox.addChild("div", "class", "infobox-content"); HTMLNode overviewList = overviewInfoboxContent.addChild("ul"); overviewList.addChild("li", "bwlimitDelayTime:\u00a0" + bwlimitDelayTime + "ms"); overviewList.addChild("li", "nodeAveragePingTime:\u00a0" + nodeAveragePingTime + "ms"); overviewList.addChild("li", "networkSizeEstimate:\u00a0" + networkSizeEstimate + "\u00a0nodes"); overviewList.addChild("li", "nodeUptime:\u00a0" + nodeUptimeString); overviewList.addChild("li", "missRoutingDistance:\u00a0" + fix4.format(missRoutingDistance)); overviewList.addChild("li", "backedoffPercent:\u00a0" + fix1.format(backedoffPercent)); nextTableCell = overviewTableRow.addChild("td"); } // Activity box int numInserts = node.getNumInserts(); int numRequests = node.getNumRequests(); int numTransferringRequests = node.getNumTransferringRequests(); int numARKFetchers = node.getNumARKFetchers(); HTMLNode activityInfobox = nextTableCell.addChild("div", "class", "infobox"); activityInfobox.addChild("div", "class", "infobox-header", "Current activity"); HTMLNode activityInfoboxContent = activityInfobox.addChild("div", "class", "infobox-content"); if ((numInserts == 0) && (numRequests == 0) && (numTransferringRequests == 0) && (numARKFetchers == 0)) { activityInfoboxContent.addChild("#", "Your node is not processing any requests right now."); } else { HTMLNode activityList = activityInfoboxContent.addChild("ul", "id", "activity"); if (numInserts > 0) { activityList.addChild("li", "Inserts:\u00a0" + numInserts); } if (numRequests > 0) { activityList.addChild("li", "Requests:\u00a0" + numRequests); } if (numTransferringRequests > 0) { activityList.addChild("li", "Transferring\u00a0Requests:\u00a0" + numTransferringRequests); } if (advancedEnabled) { if (numARKFetchers > 0) { activityList.addChild("li", "ARK\u00a0Fetch\u00a0Requests:\u00a0" + numARKFetchers); } } } nextTableCell = advancedEnabled ? overviewTableRow.addChild("td") : overviewTableRow.addChild("td", "class", "last"); // Peer statistics box HTMLNode peerStatsInfobox = nextTableCell.addChild("div", "class", "infobox"); peerStatsInfobox.addChild("div", "class", "infobox-header", "Peer statistics"); HTMLNode peerStatsContent = peerStatsInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerStatsList = peerStatsContent.addChild("ul"); if (numberOfConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_connected", "Connected:\u00a0" + numberOfConnected); } if (numberOfRoutingBackedOff > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_backedoff", (advancedEnabled ? "Backed off" : "Busy") + ":\u00a0" + numberOfRoutingBackedOff); } if (numberOfTooNew > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_new", "Too new:\u00a0" + numberOfTooNew); } if (numberOfTooOld > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_too_old", "Too old:\u00a0" + numberOfTooOld); } if (numberOfDisconnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_disconnected", "Disconnected:\u00a0" + numberOfDisconnected); } if (numberOfNeverConnected > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Never Connected:\u00a0" + numberOfNeverConnected); } if (numberOfDisabled > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Disabled:\u00a0" + numberOfDisabled); /* TODO */ } if (numberOfBursting > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Bursting:\u00a0" + numberOfBursting); /* TODO */ } if (numberOfListening > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listening:\u00a0" + numberOfListening); /* TODO */ } if (numberOfListenOnly > 0) { peerStatsList.addChild("li").addChild("span", "class", "peer_never_connected", "Listen Only:\u00a0" + numberOfListenOnly); /* TODO */ } // Peer routing backoff reason box if(advancedEnabled) { nextTableCell = overviewTableRow.addChild("td", "class", "last"); HTMLNode backoffReasonInfobox = nextTableCell.addChild("div", "class", "infobox"); backoffReasonInfobox.addChild("div", "class", "infobox-header", "Peer backoff reasons"); HTMLNode backoffReasonContent = backoffReasonInfobox.addChild("div", "class", "infobox-content"); String [] routingBackoffReasons = node.getPeerNodeRoutingBackoffReasons(); if(routingBackoffReasons.length == 0) { backoffReasonContent.addChild("#", "Good, your node is not backed off from any peers!"); } else { HTMLNode reasonList = backoffReasonContent.addChild("ul"); for(int i=0;i<routingBackoffReasons.length;i++) { int reasonCount = node.getPeerNodeRoutingBackoffReasonSize(routingBackoffReasons[i]); if(reasonCount > 0) { reasonList.addChild("li", routingBackoffReasons[i] + '\u00a0' + reasonCount); } } } } // END OVERVIEW TABLE // BEGIN PEER TABLE HTMLNode peerTableInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); HTMLNode peerTableInfoboxHeader = peerTableInfobox.addChild("div", "class", "infobox-header"); peerTableInfoboxHeader.addChild("#", "My peers"); if (advancedEnabled) { if (!path.endsWith("displaymessagetypes.html")) { peerTableInfoboxHeader.addChild("#", " "); peerTableInfoboxHeader.addChild("a", "href", "displaymessagetypes.html", "(more detailed)"); } } HTMLNode peerTableInfoboxContent = peerTableInfobox.addChild("div", "class", "infobox-content"); if (peerNodes.length == 0) { peerTableInfoboxContent.addChild("#", "Freenet can not work as you have not added any peers so far. Please go to the "); peerTableInfoboxContent.addChild("a", "href", "/", "node homepage"); peerTableInfoboxContent.addChild("#", " and read the top infobox to see how it is done."); } else { HTMLNode peerForm = peerTableInfoboxContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); HTMLNode peerTable = peerForm.addChild("table", "class", "darknet_connections"); HTMLNode peerTableHeaderRow = peerTable.addChild("tr"); peerTableHeaderRow.addChild("th"); peerTableHeaderRow.addChild("th", "Status"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Click on the nodename link to send N2NTM", "border-bottom: 1px dotted; cursor: help;" }, "Name"); if (advancedEnabled) { peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Address:Port", "border-bottom: 1px dotted; cursor: help;" }, "Address"); } peerTableHeaderRow.addChild("th", "Version"); if (advancedEnabled) { peerTableHeaderRow.addChild("th", "Location"); peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "Temporarily disconnected. Other node busy? Wait time(s) remaining/total", "border-bottom: 1px dotted; cursor: help;" }, "Backoff"); } peerTableHeaderRow.addChild("th").addChild("span", new String[] { "title", "style" }, new String[] { "How long since the node connected or was last seen", "border-bottom: 1px dotted; cursor: help;" }, "Connected\u00a0/\u00a0Idle"); for (int peerIndex = 0, peerCount = peerNodes.length; peerIndex < peerCount; peerIndex++) { PeerNode peerNode = peerNodes[peerIndex]; HTMLNode peerRow = peerTable.addChild("tr"); // check box column peerRow.addChild("td", "class", "peer-marker").addChild("input", new String[] { "type", "name" }, new String[] { "checkbox", "node_" + peerNode.hashCode() }); // status column String statusString = peerNode.getPeerNodeStatusString(); if (!advancedEnabled && (peerNode.getPeerNodeStatus() == Node.PEER_NODE_STATUS_ROUTING_BACKED_OFF)) { statusString = "BUSY"; } peerRow.addChild("td", "class", "peer-status").addChild("span", "class", peerNode.getPeerNodeStatusCSSClassName(), statusString + (peerNode.isFetchingARK() ? "*" : "")); // name column if (peerNode.isConnected() && (Integer.parseInt(peerNode.getSimpleVersion()) > 476)) { peerRow.addChild("td", "class", "peer-name").addChild("a", "href", "/send_n2ntm/?peernode_hashcode=" + peerNode.hashCode(), peerNode.getName()); } else { peerRow.addChild("td", "class", "peer-name").addChild("#", peerNode.getName()); } // address column if (advancedEnabled) { String pingTime = ""; if (peerNode.isConnected()) { pingTime = " (" + String.valueOf((int) peerNode.averagePingTime()) + "ms)"; } peerRow.addChild("td", "class", "peer-address").addChild("#", ((peerNode.getDetectedPeer() != null) ? (peerNode.getDetectedPeer().toString()) : ("(unknown address)")) + pingTime); } // version column if (peerNode.publicReverseInvalidVersion()) { peerRow.addChild("td", "class", "peer-version").addChild("span", "class", "peer_too_new", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } else { peerRow.addChild("td", "class", "peer-version").addChild("#", advancedEnabled ? peerNode.getVersion() : peerNode.getSimpleVersion()); } // location column if (advancedEnabled) { peerRow.addChild("td", "class", "peer-location", String.valueOf(peerNode.getLocation().getValue())); } // backoff column if (advancedEnabled) { HTMLNode backoffCell = peerRow.addChild("td", "class", "peer-backoff"); backoffCell.addChild("#", fix1.format(peerNode.backedOffPercent.currentValue())); int backoff = (int) (Math.max(peerNode.getRoutingBackedOffUntil() - now, 0)); // Don't list the backoff as zero before it's actually zero if ((backoff > 0) && (backoff < 1000)) { backoff = 1000; } backoffCell.addChild("#", " " + String.valueOf(backoff / 1000) + "/" + String.valueOf(peerNode.getRoutingBackoffLength() / 1000)); backoffCell.addChild("#", (peerNode.getLastBackoffReason() == null) ? "" : ("/" + (peerNode.getLastBackoffReason()))); } // idle column long idle = peerNode.timeLastRoutable(); if(peerNode.isRoutable()) { idle = peerNode.timeLastConnectionCompleted(); } else if(peerNodeStatuses[peerIndex] == Node.PEER_NODE_STATUS_NEVER_CONNECTED) { idle = peerNode.getPeerAddedTime(); } peerRow.addChild("td", "class", "peer-idle", idleToString(now, idle)); if (path.endsWith("displaymessagetypes.html")) { HTMLNode messageCountRow = peerTable.addChild("tr", "class", "message-status"); messageCountRow.addChild("td", "colspan", "2"); HTMLNode messageCountCell = messageCountRow.addChild("td", "colspan", String.valueOf(advancedEnabled ? 6 : 3)); HTMLNode messageCountTable = messageCountCell.addChild("table", "class", "message-count"); HTMLNode countHeaderRow = messageCountTable.addChild("tr"); countHeaderRow.addChild("th", "Message"); countHeaderRow.addChild("th", "Incoming"); countHeaderRow.addChild("th", "Outgoing"); List messageNames = new ArrayList(); Map messageCounts = new HashMap(); for (Iterator incomingMessages = peerNode.getLocalNodeReceivedMessagesFromStatistic().keySet().iterator(); incomingMessages.hasNext(); ) { String messageName = (String) incomingMessages.next(); messageNames.add(messageName); Long messageCount = (Long) peerNode.getLocalNodeReceivedMessagesFromStatistic().get(messageName); messageCounts.put(messageName, new Long[] { messageCount, new Long(0) }); } for (Iterator outgoingMessages = peerNode.getLocalNodeSentMessagesToStatistic().keySet().iterator(); outgoingMessages.hasNext(); ) { String messageName = (String) outgoingMessages.next(); if (!messageNames.contains(messageName)) { messageNames.add(messageName); } Long messageCount = (Long) peerNode.getLocalNodeSentMessagesToStatistic().get(messageName); Long[] existingCounts = (Long[]) messageCounts.get(messageName); if (existingCounts == null) { messageCounts.put(messageName, new Long[] { new Long(0), messageCount }); } else { existingCounts[1] = messageCount; } } Collections.sort(messageNames, new Comparator() { public int compare(Object first, Object second) { return ((String) first).compareToIgnoreCase((String) second); } }); for (Iterator messageNamesIterator = messageNames.iterator(); messageNamesIterator.hasNext(); ) { String messageName = (String) messageNamesIterator.next(); Long[] messageCount = (Long[]) messageCounts.get(messageName); HTMLNode messageRow = messageCountTable.addChild("tr"); messageRow.addChild("td", messageName); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[0])); messageRow.addChild("td", "class", "right-align", String.valueOf(messageCount[1])); } } } if(!advancedEnabled) { peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "remove", "Remove selected peers" }); } else { HTMLNode actionSelect = peerForm.addChild("select", "name", "action"); actionSelect.addChild("option", "value", "", "-- Select action --"); actionSelect.addChild("option", "value", "enable", "Enable selected peers"); actionSelect.addChild("option", "value", "disable", "Disable selected peers"); actionSelect.addChild("option", "value", "set_burst_only", "On selected peers, set BurstOnly"); actionSelect.addChild("option", "value", "clear_burst_only", "On selected peers, clear BurstOnly"); actionSelect.addChild("option", "value", "set_listen_only", "On selected peers, set ListenOnly"); actionSelect.addChild("option", "value", "clear_listen_only", "On selected peers, clear ListenOnly"); actionSelect.addChild("option", "value", "", "-- -- --"); actionSelect.addChild("option", "value", "remove", "Remove selected peers"); peerForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "submit", "Go" }); } } // END PEER TABLE // BEGIN PEER ADDITION BOX HTMLNode peerAdditionInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); peerAdditionInfobox.addChild("div", "class", "infobox-header", "Add another peer"); HTMLNode peerAdditionContent = peerAdditionInfobox.addChild("div", "class", "infobox-content"); HTMLNode peerAdditionForm = peerAdditionContent.addChild("form", new String[] { "action", "method", "enctype" }, new String[] { ".", "post", "multipart/form-data" }); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "formPassword", node.formPassword }); peerAdditionForm.addChild("#", "Paste the reference here:"); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("textarea", new String[] { "id", "name", "rows", "cols" }, new String[] { "reftext", "ref", "8", "74" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Enter the URL of the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "refurl", "text", "url" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("#", "Choose the file containing the reference here: "); peerAdditionForm.addChild("input", new String[] { "id", "type", "name" }, new String[] { "reffile", "file", "reffile" }); peerAdditionForm.addChild("br"); peerAdditionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", "add", "Add" }); // our reference HTMLNode referenceInfobox = contentNode.addChild("div", "class", "infobox infobox-normal"); referenceInfobox.addChild("div", "class", "infobox-header").addChild("a", "href", "myref.txt", "My reference"); referenceInfobox.addChild("div", "class", "infobox-content").addChild("pre", "id", "reference", node.exportPublicFieldSet().toString()); StringBuffer pageBuffer = new StringBuffer(); pageNode.generate(pageBuffer); this.writeReply(ctx, 200, "text/html", "OK", pageBuffer.toString()); } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/8894de616e17a43e740747a9eb17956bab9b3b3d/DarknetConnectionsToadlet.java/buggy/src/freenet/clients/http/DarknetConnectionsToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
589,
273,
2003,
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,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
1216,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
589,
273,
2003,
18,
... |
RubyArray result = RubyArray.newArray(getRuntime()); | RubyArray result = getRuntime().newArray(); | public RubyArray singleton_methods() { RubyArray result = RubyArray.newArray(getRuntime()); RubyClass type = getMetaClass(); while (type != null && type instanceof MetaClass) { Iterator iter = type.getMethods().entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String key = (String) entry.getKey(); ICallable value = (ICallable) entry.getValue(); RubyString name = RubyString.newString(getRuntime(), key); if (value.getVisibility().isPublic()) { if (! result.includes(name)) { if (value == null) { result.append(getRuntime().getNil()); } result.append(name); } } else if ( value instanceof EvaluateMethod && ((EvaluateMethod) value).getNode() instanceof ZSuperNode) { result.append(getRuntime().getNil()); result.append(name); } } type = type.getSuperClass(); } result.compact_bang(); return result; } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/clean/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
6396,
67,
5163,
1435,
288,
3639,
19817,
1076,
563,
273,
18814,
7675,
2704,
1076,
5621,
3639,
19817,
797,
618,
273,
11312,
797,
5621,
3639,
1323,
261,
723,
480,
446,
597,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1076,
6396,
67,
5163,
1435,
288,
3639,
19817,
1076,
563,
273,
18814,
7675,
2704,
1076,
5621,
3639,
19817,
797,
618,
273,
11312,
797,
5621,
3639,
1323,
261,
723,
480,
446,
597,
... |
public ValenceConnectivityOrderOneDescriptor() { } | public ValenceConnectivityOrderOneDescriptor() { logger = new LoggingTool(this); } | public ValenceConnectivityOrderOneDescriptor() { } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0a7f0ac7459a9f9ba3f69e907ae5192937b6f0bd/ValenceConnectivityOrderOneDescriptor.java/buggy/src/org/openscience/cdk/qsar/ValenceConnectivityOrderOneDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12747,
802,
5215,
2818,
2448,
3335,
3187,
1435,
288,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12747,
802,
5215,
2818,
2448,
3335,
3187,
1435,
288,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
private void walkCompareMap(PrintWriter writer, String locale, String platforms) { SummaryData summData = new SummaryData (); // walk down the compare map and print the data Iterator iter = compareMap.keySet().iterator(); while(iter.hasNext()) { Object obj = iter.next(); CompareElement element; if(obj != null) { Object value = compareMap.get(obj); if(value instanceof CompareElement) { element = (CompareElement)value; }else { throw new RuntimeException("The object stored in the compare map is not an instance of CompareElement"); } boolean bIsEqual = true; if ((m_iOptions & OPT_DIFF) !=0) { bIsEqual = printDifferentValues(element,writer); AddToAccumulatedResultsMap((String)obj, element, localeStr, bIsEqual); } else if((m_iOptions & OPT_DIFF_REF_COMMON)!=0) { bIsEqual = printDifferentValuesWithRef(element,writer); AddToAccumulatedResultsMap((String)obj, element, localeStr, bIsEqual); } else { printValue(element,writer); } if (bIsEqual == false) summData.m_iNumConflictingElements++; }else { throw new RuntimeException("No objects stored in the compare map!"); } } summData.m_szPlatforms = platforms; m_LocaleSummaryDataMap.put(locale, summData); } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/90d357a7612a0fee1860528005a32007392efc2a/LDMLComparator.java/clean/tools/java/org/unicode/cldr/icu/LDMLComparator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5442,
8583,
863,
12,
5108,
2289,
2633,
16,
514,
2573,
16,
514,
17422,
13,
565,
288,
3639,
17967,
751,
2142,
81,
751,
273,
394,
17967,
751,
261,
1769,
7734,
368,
5442,
2588,
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,
377,
3238,
918,
5442,
8583,
863,
12,
5108,
2289,
2633,
16,
514,
2573,
16,
514,
17422,
13,
565,
288,
3639,
17967,
751,
2142,
81,
751,
273,
394,
17967,
751,
261,
1769,
7734,
368,
5442,
2588,
3... | ||
context.create("clone", CLONE, 0); | context.create("clone", RBCLONE, 0); | protected void defineMethods(MethodContext context) { context.create("==", EQUAL, 1); context.createAlias("===", "=="); context.create("=~", MATCH, 1); context.create("class", TYPE, 0); context.create("clone", CLONE, 0); context.create("dup", DUP, 0); context.create("eql?", EQUAL, 1); context.createAlias("equal?", "=="); context.createOptional("extend", EXTEND, 1); context.create("freeze", FREEZE, 0); context.create("frozen?", FROZEN, 0); context.create("hash", HASH, 0); context.create("id", ID, 0); context.create("__id__", ID, 0); context.create("inspect", INSPECT, 0); context.createOptional("instance_eval", INSTANCE_EVAL); context.create("instance_of?", INSTANCE_OF, 1); context.create("instance_variables", INSTANCE_VARIABLES, 0); context.create("is_a?", KIND_OF, 1); context.create("kind_of?", KIND_OF, 1); context.create("method", METHOD, 1); context.create("methods", METHODS, 0); context.createOptional("method_missing", METHOD_MISSING); context.create("nil?", NIL, 0); context.create("private_methods", PRIVATE_METHODS, 0); context.create("protected_methods", PROTECTED_METHODS, 0); context.create("public_methods", METHODS, 0); context.createOptional("respond_to?", RESPOND_TO, 1); context.createOptional("send", SEND, 1); context.createOptional("__send__", SEND, 1); context.create("singleton_methods", SINGLETON_METHODS, 0); context.create("taint", TAINT, 0); context.create("tainted?", TAINTED, 0); context.create("to_a", TO_A, 0); context.create("to_s", TO_S, 0); context.create("type", TYPE, 0); context.create("untaint", UNTAINT, 0); } | 46258 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46258/dcea3e9f2f6ecba04f862dbfb01b220d7890a706/ObjectDefinition.java/buggy/src/org/jruby/internal/runtime/builtin/definitions/ObjectDefinition.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4426,
4712,
12,
1305,
1042,
819,
13,
288,
3639,
819,
18,
2640,
2932,
631,
3113,
18231,
16,
404,
1769,
3639,
819,
18,
2640,
2936,
2932,
631,
1546,
16,
315,
631,
8863,
3639,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4426,
4712,
12,
1305,
1042,
819,
13,
288,
3639,
819,
18,
2640,
2932,
631,
3113,
18231,
16,
404,
1769,
3639,
819,
18,
2640,
2936,
2932,
631,
1546,
16,
315,
631,
8863,
3639,
81... |
DiscreteSpaceCurve torus1 = DiscreteSpaceCurve.discreteTorusKnot(1,.25, 2, 9, 250); | DiscreteSpaceCurve torus1 = DiscreteSpaceCurve.discreteTorusKnot(1,.25, 2, 9, 60); | public SceneGraphComponent makeWorld() { SceneGraphComponent root = new SceneGraphComponent(); root.setTransformation(new Transformation()); root.setAppearance(new Appearance()); root.getAppearance().setAttribute(CommonAttributes.VERTEX_DRAW, false); double[][] square = {{1,1,0},{-1,1,0},{-1,-1,0},{1,-1,0}}; double[][] profile = {{0,0,0}, {0,.1,0},{1,.1,0},{1,.2,0},{1.4,0,0}}; double[][] profile2 = {{1,.2,0}, {.2, .2,0}, {0,.4,0}, {-.2, .2, 0},{-1,.2,0}, {-1,-.2,0},{-.2, -.2,0}, {0,-.4,0}, {.2, -.2, 0},{1,-.2,0}}; DiscreteSpaceCurve torus1 = DiscreteSpaceCurve.discreteTorusKnot(1,.25, 2, 9, 250); double[][] tpts = torus1.getVertexAttributes(Attribute.COORDINATES).toDoubleArrayArray(null); //torus1.addGeometryListener(torus1); //pts = square; double[][] pts = form; double[][][] tubePoints = TubeUtility.makeTubeAsBezierPatchMesh(pts, .2, circle, TubeUtility.PARALLEL,true, Pn.EUCLIDEAN); BezierPatchMesh bpm = new BezierPatchMesh(2, 3, tubePoints); for (int i = 0; i<3; ++i) { bpm.refine();} QuadMeshShape qmpatch = GeometryUtility.representBezierPatchMeshAsQuadMesh(bpm); QuadMeshShape qms = TubeUtility.makeTubeAsIFS(pts, .2, null, TubeUtility.PARALLEL, true, Pn.EUCLIDEAN); //QuadMeshShape torust = TubeUtility.makeTubeAsIFS(tpts, .2, null, TubeUtility.PARALLEL, false); //GeometryUtility.calculateAndSetNormals(torust); SceneGraphComponent torussgc = SceneGraphUtilities.createFullSceneGraphComponent("torus knot"); torussgc.getAppearance().setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.POLYGON_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, new Color(120,0, 120)); torussgc.getAppearance().setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.TUBE_RADIUS, .03); torussgc.setGeometry(torus1); torussgc.getTransformation().setStretch(.9); root.addChild(torussgc); IndexedFaceSet arrow = GeometryUtility.surfaceOfRevolutionAsIFS(profile, 24, Math.PI * 2); SceneGraphComponent globeNode= SceneGraphUtilities.createFullSceneGraphComponent("container"); SceneGraphComponent globeNode2= SceneGraphUtilities.createFullSceneGraphComponent("curve"); Appearance ap1 = globeNode2.getAppearance(); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, DefaultVertexShader.BLUE); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.TUBES_DRAW, true); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.LINE_WIDTH,2.0); ap1.setAttribute(CommonAttributes.FACE_DRAW,false); ap1.setAttribute(CommonAttributes.EDGE_DRAW,true); ap1.setAttribute(CommonAttributes.VERTEX_DRAW,true); ap1.setAttribute(CommonAttributes.POINT_SHADER+"."+CommonAttributes.SPHERES_DRAW,true); ap1.setAttribute(CommonAttributes.POINT_SHADER+"."+CommonAttributes.POINT_RADIUS,.03); ap1.setAttribute(CommonAttributes.POINT_SHADER+"."+CommonAttributes.POINT_SIZE, 3.0); ap1.setAttribute(CommonAttributes.POINT_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, DefaultVertexShader.RED); IndexedLineSet croxl = GeometryUtility.createCurveFromPoints(form, true); //globeNode2.addChild(TubeUtility.ballAndStick(croxl, .05, .03, java.awt.Color.RED, java.awt.Color.BLUE, Pn.EUCLIDEAN)); globeNode2.setGeometry(croxl); SceneGraphComponent globeNode4= SceneGraphUtilities.createFullSceneGraphComponent("patch"); double[] p1 = {0,1,0}; double[] p2 = {0,-1,0}; SceneGraphComponent tubie = TubeUtility.ballAndStick(Primitives.sharedIcosahedron, .10, .05, java.awt.Color.YELLOW, java.awt.Color.GREEN); //TubeUtility.createTubesOnEdges(Primitives.sharedIcosahedron, .05); //TubeUtility.makeTubeAsIFS(p1, p2, .3, null); tubie.setTransformation(new Transformation()); tubie.getTransformation().setStretch(.5); tubie.setAppearance(new Appearance()); globeNode4.setGeometry(qmpatch); globeNode4.addChild(tubie); ap1 = new Appearance(); ap1.setAttribute(CommonAttributes.POLYGON_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, Color.BLUE); ap1.setAttribute(CommonAttributes.SPECULAR_EXPONENT, 100.0); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, Color.BLACK); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.DIFFUSE_COLOR, Color.BLACK); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.TUBES_DRAW, false); ap1.setAttribute(CommonAttributes.LINE_SHADER+"."+CommonAttributes.LINE_WIDTH,1.0); ap1.setAttribute(CommonAttributes.POINT_RADIUS,3.0); globeNode4.setAppearance(ap1); root.addChild(globeNode); globeNode.addChild(globeNode2); globeNode.addChild(globeNode4); return root; } | 25476 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25476/c9b4a992eb3d248bc17c0fcf96bb5b9567ef369b/TestTubes.java/buggy/test/de/jreality/worlds/TestTubes.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
29347,
4137,
1841,
1221,
18071,
1435,
288,
202,
202,
14370,
4137,
1841,
1365,
273,
394,
29347,
4137,
1841,
5621,
202,
202,
3085,
18,
542,
15292,
12,
2704,
21274,
10663,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
29347,
4137,
1841,
1221,
18071,
1435,
288,
202,
202,
14370,
4137,
1841,
1365,
273,
394,
29347,
4137,
1841,
5621,
202,
202,
3085,
18,
542,
15292,
12,
2704,
21274,
10663,
202,
202,
... |
protected void castExpression( Object expression ) throws Exception { | protected void castExpression( Object expression ) throws Backtrack { | protected void castExpression( Object expression ) throws Exception { // TO DO: we need proper symbol checkint to ensure type name if (false && LT(1) == Token.tLPAREN) { Token mark = mark(); consume(); // If this isn't a type name, then we shouldn't be here try { typeId(); consume(Token.tRPAREN); castExpression( expression ); return; } catch (Backtrack b) { backup(mark); } } unaryExpression(expression); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/21e625463ac72cd0c38a44efef717152428f5f14/Parser.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
4812,
2300,
12,
1033,
2652,
262,
1216,
1185,
288,
202,
202,
759,
8493,
5467,
30,
732,
1608,
5338,
3273,
866,
474,
358,
3387,
618,
508,
202,
202,
430,
261,
5743,
597,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4812,
2300,
12,
1033,
2652,
262,
1216,
1185,
288,
202,
202,
759,
8493,
5467,
30,
732,
1608,
5338,
3273,
866,
474,
358,
3387,
618,
508,
202,
202,
430,
261,
5743,
597,
118... |
BugzillaTask bt = (BugzillaTask) task; | BugzillaTask bugzillaTask = (BugzillaTask) task; | public Element createTaskElement(ITask task, Document doc, Element parent) { Element node = super.createTaskElement(task, doc, parent); BugzillaTask bt = (BugzillaTask) task; node.setAttribute(BUGZILLA, TRUE); if (bt.getLastRefresh() != null) { node.setAttribute(LAST_DATE, new Long(bt.getLastRefresh().getTime()).toString()); } else { node.setAttribute(LAST_DATE, new Long(new Date().getTime()).toString()); } node.setAttribute(SYNC_STATE, bt.getSyncState().toString()); if (bt.isDirty()) { node.setAttribute(DIRTY, TRUE); } else { node.setAttribute(DIRTY, FALSE); } // bt.saveBugReport(false); // XXX don't think that this needs to be // done, should be handled already return node; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/6e4c36ce82823e91011a538b1e18917054cfdf11/BugzillaTaskExternalizer.java/clean/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3010,
752,
2174,
1046,
12,
1285,
835,
1562,
16,
4319,
997,
16,
3010,
982,
13,
288,
202,
202,
1046,
756,
273,
2240,
18,
2640,
2174,
1046,
12,
4146,
16,
997,
16,
982,
1769,
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,
225,
202,
482,
3010,
752,
2174,
1046,
12,
1285,
835,
1562,
16,
4319,
997,
16,
3010,
982,
13,
288,
202,
202,
1046,
756,
273,
2240,
18,
2640,
2174,
1046,
12,
4146,
16,
997,
16,
982,
1769,
20... |
new Label( composite, SWT.SEPARATOR | SWT.HORIZONTAL ).setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); | new Label( composite, SWT.SEPARATOR | SWT.HORIZONTAL ) .setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); | protected Control createDialogArea( Composite parent ) { Composite composite = (Composite) super.createDialogArea( parent ); createSelectionArea( composite ); new Label( composite, SWT.SEPARATOR | SWT.HORIZONTAL ).setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); displayArea = new Composite( composite, SWT.NONE ); displayArea.setLayoutData( new GridData( 450, 250 ) ); displayArea.setLayout( new GridLayout( 3, false ) ); new Label( composite, SWT.SEPARATOR | SWT.HORIZONTAL ).setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); return composite; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/f5e62342ed517a2b257e427a5f18c7dee2b63f6d/HyperlinkBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/HyperlinkBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
8888,
752,
6353,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
982,
11272,
202,
202,
2640,
6233,
5484,
12,
963... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8888,
752,
6353,
5484,
12,
14728,
982,
262,
202,
95,
202,
202,
9400,
9635,
273,
261,
9400,
13,
2240,
18,
2640,
6353,
5484,
12,
982,
11272,
202,
202,
2640,
6233,
5484,
12,
963... |
private Object statementHelper(TokenStream ts, Source source) | private Object statementHelper(TokenStream ts) | private Object statementHelper(TokenStream ts, Source source) throws IOException, JavaScriptException { Object pn = null; // If skipsemi == true, don't add SEMI + EOL to source at the // end of this statment. For compound statements, IF/FOR etc. boolean skipsemi = false; int tt; int lastExprType = 0; // For wellTerminated. 0 to avoid warning. tt = ts.getToken(); switch(tt) { case TokenStream.IF: { skipsemi = true; source.append((char)ts.IF); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object ifTrue = statement(ts, source); Object ifFalse = null; if (ts.matchToken(ts.ELSE)) { source.append((char)ts.RC); source.append((char)ts.ELSE); source.append((char)ts.LC); source.append((char)ts.EOL); ifFalse = statement(ts, source); } source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createIf(cond, ifTrue, ifFalse, lineno); break; } case TokenStream.SWITCH: { skipsemi = true; source.append((char)ts.SWITCH); pn = nf.createSwitch(ts.getLineno()); Object cur_case = null; // to kill warning Object case_statements; mustMatchToken(ts, ts.LP, "msg.no.paren.switch"); source.append((char)ts.LP); nf.addChildToBack(pn, expr(ts, source, false)); mustMatchToken(ts, ts.RP, "msg.no.paren.after.switch"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.switch"); source.append((char)ts.LC); source.append((char)ts.EOL); while ((tt = ts.getToken()) != ts.RC && tt != ts.EOF) { switch(tt) { case TokenStream.CASE: source.append((char)ts.CASE); cur_case = nf.createUnary(ts.CASE, expr(ts, source, false)); source.append((char)ts.COLON); source.append((char)ts.EOL); break; case TokenStream.DEFAULT: cur_case = nf.createLeaf(ts.DEFAULT); source.append((char)ts.DEFAULT); source.append((char)ts.COLON); source.append((char)ts.EOL); // XXX check that there isn't more than one default break; default: reportError(ts, "msg.bad.switch"); break; } mustMatchToken(ts, ts.COLON, "msg.no.colon.case"); case_statements = nf.createLeaf(TokenStream.BLOCK); while ((tt = ts.peekToken()) != ts.RC && tt != ts.CASE && tt != ts.DEFAULT && tt != ts.EOF) { nf.addChildToBack(case_statements, statement(ts, source)); } // assert cur_case nf.addChildToBack(cur_case, case_statements); nf.addChildToBack(pn, cur_case); } source.append((char)ts.RC); source.append((char)ts.EOL); break; } case TokenStream.WHILE: { skipsemi = true; source.append((char)ts.WHILE); int lineno = ts.getLineno(); Object cond = condition(ts, source); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWhile(cond, body, lineno); break; } case TokenStream.DO: { source.append((char)ts.DO); source.append((char)ts.LC); source.append((char)ts.EOL); int lineno = ts.getLineno(); Object body = statement(ts, source); source.append((char)ts.RC); mustMatchToken(ts, ts.WHILE, "msg.no.while.do"); source.append((char)ts.WHILE); Object cond = condition(ts, source); pn = nf.createDoWhile(body, cond, lineno); break; } case TokenStream.FOR: { skipsemi = true; source.append((char)ts.FOR); int lineno = ts.getLineno(); Object init; // Node init is also foo in 'foo in Object' Object cond; // Node cond is also object in 'foo in Object' Object incr = null; // to kill warning Object body; mustMatchToken(ts, ts.LP, "msg.no.paren.for"); source.append((char)ts.LP); tt = ts.peekToken(); if (tt == ts.SEMI) { init = nf.createLeaf(ts.VOID); } else { if (tt == ts.VAR) { // set init to a var list or initial ts.getToken(); // throw away the 'var' token init = variables(ts, source, true); } else { init = expr(ts, source, true); } } tt = ts.peekToken(); if (tt == ts.RELOP && ts.getOp() == ts.IN) { ts.matchToken(ts.RELOP); source.append((char)ts.IN); // 'cond' is the object over which we're iterating cond = expr(ts, source, false); } else { // ordinary for loop mustMatchToken(ts, ts.SEMI, "msg.no.semi.for"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.SEMI) { // no loop condition cond = nf.createLeaf(ts.VOID); } else { cond = expr(ts, source, false); } mustMatchToken(ts, ts.SEMI, "msg.no.semi.for.cond"); source.append((char)ts.SEMI); if (ts.peekToken() == ts.RP) { incr = nf.createLeaf(ts.VOID); } else { incr = expr(ts, source, false); } } mustMatchToken(ts, ts.RP, "msg.no.paren.for.ctrl"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); if (incr == null) { // cond could be null if 'in obj' got eaten by the init node. pn = nf.createForIn(init, cond, body, lineno); } else { pn = nf.createFor(init, cond, incr, body, lineno); } break; } case TokenStream.TRY: { int lineno = ts.getLineno(); Object tryblock; Object catchblocks = null; Object finallyblock = null; skipsemi = true; source.append((char)ts.TRY); source.append((char)ts.LC); source.append((char)ts.EOL); tryblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); catchblocks = nf.createLeaf(TokenStream.BLOCK); boolean sawDefaultCatch = false; int peek = ts.peekToken(); if (peek == ts.CATCH) { while (ts.matchToken(ts.CATCH)) { if (sawDefaultCatch) { reportError(ts, "msg.catch.unreachable"); } source.append((char)ts.CATCH); mustMatchToken(ts, ts.LP, "msg.no.paren.catch"); source.append((char)ts.LP); mustMatchToken(ts, ts.NAME, "msg.bad.catchcond"); String varName = ts.getString(); source.addString(ts.NAME, varName); Object catchCond = null; if (ts.matchToken(ts.IF)) { source.append((char)ts.IF); catchCond = expr(ts, source, false); } else { sawDefaultCatch = true; } mustMatchToken(ts, ts.RP, "msg.bad.catchcond"); source.append((char)ts.RP); mustMatchToken(ts, ts.LC, "msg.no.brace.catchblock"); source.append((char)ts.LC); source.append((char)ts.EOL); nf.addChildToBack(catchblocks, nf.createCatch(varName, catchCond, statements(ts, source), ts.getLineno())); mustMatchToken(ts, ts.RC, "msg.no.brace.after.body"); source.append((char)ts.RC); source.append((char)ts.EOL); } } else if (peek != ts.FINALLY) { mustMatchToken(ts, ts.FINALLY, "msg.try.no.catchfinally"); } if (ts.matchToken(ts.FINALLY)) { source.append((char)ts.FINALLY); source.append((char)ts.LC); source.append((char)ts.EOL); finallyblock = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); } pn = nf.createTryCatchFinally(tryblock, catchblocks, finallyblock, lineno); break; } case TokenStream.THROW: { int lineno = ts.getLineno(); source.append((char)ts.THROW); pn = nf.createThrow(expr(ts, source, false), lineno); if (lineno == ts.getLineno()) wellTerminated(ts, ts.ERROR); break; } case TokenStream.BREAK: { int lineno = ts.getLineno(); source.append((char)ts.BREAK); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createBreak(label, lineno); break; } case TokenStream.CONTINUE: { int lineno = ts.getLineno(); source.append((char)ts.CONTINUE); // matchLabel only matches if there is one String label = matchLabel(ts); if (label != null) { source.addString(ts.NAME, label); } pn = nf.createContinue(label, lineno); break; } case TokenStream.WITH: { skipsemi = true; source.append((char)ts.WITH); int lineno = ts.getLineno(); mustMatchToken(ts, ts.LP, "msg.no.paren.with"); source.append((char)ts.LP); Object obj = expr(ts, source, false); mustMatchToken(ts, ts.RP, "msg.no.paren.after.with"); source.append((char)ts.RP); source.append((char)ts.LC); source.append((char)ts.EOL); Object body = statement(ts, source); source.append((char)ts.RC); source.append((char)ts.EOL); pn = nf.createWith(obj, body, lineno); break; } case TokenStream.VAR: { int lineno = ts.getLineno(); pn = variables(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); break; } case TokenStream.RETURN: { Object retExpr = null; int lineno = 0; source.append((char)ts.RETURN); // bail if we're not in a (toplevel) function if ((ts.flags & ts.TSF_FUNCTION) == 0) reportError(ts, "msg.bad.return"); /* This is ugly, but we don't want to require a semicolon. */ ts.flags |= ts.TSF_REGEXP; tt = ts.peekTokenSameLine(); ts.flags &= ~ts.TSF_REGEXP; if (tt != ts.EOF && tt != ts.EOL && tt != ts.SEMI && tt != ts.RC) { lineno = ts.getLineno(); retExpr = expr(ts, source, false); if (ts.getLineno() == lineno) wellTerminated(ts, ts.ERROR); ts.flags |= ts.TSF_RETURN_EXPR; } else { ts.flags |= ts.TSF_RETURN_VOID; } // XXX ASSERT pn pn = nf.createReturn(retExpr, lineno); break; } case TokenStream.LC: skipsemi = true; pn = statements(ts, source); mustMatchToken(ts, ts.RC, "msg.no.brace.block"); break; case TokenStream.ERROR: // Fall thru, to have a node for error recovery to work on case TokenStream.EOL: case TokenStream.SEMI: pn = nf.createLeaf(ts.VOID); skipsemi = true; break; default: { lastExprType = tt; int tokenno = ts.getTokenno(); ts.ungetToken(tt); int lineno = ts.getLineno(); pn = expr(ts, source, false); if (ts.peekToken() == ts.COLON) { /* check that the last thing the tokenizer returned was a * NAME and that only one token was consumed. */ if (lastExprType != ts.NAME || (ts.getTokenno() != tokenno)) reportError(ts, "msg.bad.label"); ts.getToken(); // eat the COLON /* in the C source, the label is associated with the * statement that follows: * nf.addChildToBack(pn, statement(ts)); */ String name = ts.getString(); pn = nf.createLabel(name, lineno); // depend on decompiling lookahead to guess that that // last name was a label. source.append((char)ts.COLON); source.append((char)ts.EOL); return pn; } if (lastExprType == ts.FUNCTION) nf.setFunctionExpressionStatement(pn); pn = nf.createExprStatement(pn, lineno); /* * Check explicitly against (multi-line) function * statement. * lastExprEndLine is a hack to fix an * automatic semicolon insertion problem with function * expressions; the ts.getLineno() == lineno check was * firing after a function definition even though the * next statement was on a new line, because * speculative getToken calls advanced the line number * even when they didn't succeed. */ if (ts.getLineno() == lineno || (lastExprType == ts.FUNCTION && ts.getLineno() == lastExprEndLine)) { wellTerminated(ts, lastExprType); } break; } } ts.matchToken(ts.SEMI); if (!skipsemi) { source.append((char)ts.SEMI); source.append((char)ts.EOL); } return pn; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/3d2e81a014b22cf4d1eb8921bd4229c2ca7ff017/Parser.java/buggy/js/rhino/src/org/mozilla/javascript/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1033,
3021,
2276,
12,
1345,
1228,
3742,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
16,
2727,
1404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1033,
3021,
2276,
12,
1345,
1228,
3742,
13,
3639,
1216,
1860,
16,
11905,
503,
565,
288,
3639,
1033,
11059,
273,
446,
31,
3639,
368,
971,
2488,
307,
9197,
422,
638,
16,
2727,
1404,
... |
if (output != null) output.close(); if (contentStream != null) contentStream.close(); | if (output != null) { output.close(); } if (contentStream != null) { contentStream.close(); } | protected void writeFile(IFile file, IPath destinationPath) throws IOException, CoreException { FileOutputStream output = null; InputStream contentStream = null; try { contentStream = file.getContents(false); output = new FileOutputStream(destinationPath.toOSString()); int chunkSize = contentStream.available(); byte[] readBuffer = new byte[chunkSize]; int n = contentStream.read(readBuffer); while (n > 0) { output.write(readBuffer); n = contentStream.read(readBuffer); } } finally { if (output != null) output.close(); if (contentStream != null) contentStream.close(); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/FileSystemExporter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/FileSystemExporter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
13286,
12,
45,
812,
585,
16,
467,
743,
30617,
13,
5411,
1216,
1860,
16,
30015,
288,
3639,
12942,
876,
273,
446,
31,
3639,
5037,
913,
1228,
273,
446,
31,
3639,
775,
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,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
13286,
12,
45,
812,
585,
16,
467,
743,
30617,
13,
5411,
1216,
1860,
16,
30015,
288,
3639,
12942,
876,
273,
446,
31,
3639,
5037,
913,
1228,
273,
446,
31,
3639,
775,
288,
5411,... |
if (c == '.') { | if (c == '.') { | public int next() { int end = iter.getEndIndex(); if (iter.getIndex() == end) return DONE; while (iter.getIndex() < end) { char c = iter.current(); if (c == CharacterIterator.DONE) break; int type = Character.getType(c); char n = iter.next(); if (n == CharacterIterator.DONE) break; // Always break after paragraph separator. if (type == Character.PARAGRAPH_SEPARATOR) break; if (c == '!' || c == '?') { // Skip close punctuation. while (n != CharacterIterator.DONE && Character.getType(n) == Character.END_PUNCTUATION) n = iter.next(); // Skip (java) space, line and paragraph separators. while (n != CharacterIterator.DONE && Character.isWhitespace(n)) n = iter.next(); // There's always a break somewhere after `!' or `?'. break; } if (c == '.') { int save = iter.getIndex(); // Skip close punctuation. while (n != CharacterIterator.DONE && Character.getType(n) == Character.END_PUNCTUATION) n = iter.next(); // Skip (java) space, line and paragraph separators. // We keep count because we need at least one for this period to // represent a terminator. int spcount = 0; while (n != CharacterIterator.DONE && Character.isWhitespace(n)) { n = iter.next(); ++spcount; } if (spcount > 0) { int save2 = iter.getIndex(); // Skip over open puncutation. while (n != CharacterIterator.DONE && Character.getType(n) == Character.START_PUNCTUATION) n = iter.next(); // Next character must not be lower case. if (n == CharacterIterator.DONE || !Character.isLowerCase(n)) { iter.setIndex(save2); break; } } iter.setIndex(save); } } return iter.getIndex(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/b5af1a0dd02ba16d1f4f4556ab34fa51c2db060d/SentenceBreakIterator.java/buggy/core/src/classpath/gnu/gnu/java/text/SentenceBreakIterator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
474,
679,
273,
1400,
18,
588,
24152,
5621,
202,
202,
430,
261,
2165,
18,
588,
1016,
1435,
422,
679,
13,
1082,
202,
2463,
26346,
31,
202,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
509,
1024,
1435,
288,
202,
202,
474,
679,
273,
1400,
18,
588,
24152,
5621,
202,
202,
430,
261,
2165,
18,
588,
1016,
1435,
422,
679,
13,
1082,
202,
2463,
26346,
31,
202,
202,
... |
StringTokenizer commandTokenizer = new StringTokenizer((String) commands.elementAt(i), Code.DELIM); | StringTokenizer commandTokenizer = new StringTokenizer( (String) commands.elementAt(i), Code.DELIM); | protected void handleCodeSFA(long expressionCounter, String declaringClass, String variableName, String value, String type, Highlight highlight) { ListIterator li = classesWithStaticVariables.listIterator(); jeliot.lang.Class ca = null; while (li.hasNext()) { jeliot.lang.Class c = (jeliot.lang.Class) li.next(); if (c.getName().equals(declaringClass)) { ca = c; } } if (ca == null) { ca = new jeliot.lang.Class(declaringClass); classesWithStaticVariables.addLast(ca); director.showClassCreation(ca); } Variable var = ca.getVariable(variableName); if (var == null) { var = new Variable(variableName, type); ca.declareVariable(var); Value val = new Value(value, type); director.declareClassVariable(ca, var, val); } //command that waits for this expression int command = -1; int oper = -1; int size = commands.size(); //We find the command for (int i = size - 1; i >= 0; i--) { StringTokenizer commandTokenizer = new StringTokenizer((String) commands.elementAt(i), Code.DELIM); int comm = Integer.parseInt(commandTokenizer.nextToken()); long cid = Long.parseLong(commandTokenizer.nextToken()); if (expressionCounter == cid) { command = comm; commands.removeElementAt(i); break; } } /* * Look from the expression stack what expression should be shown next */ long expressionReference = 0; //We do not show just the qualified name highlighted but the whole // expression that it is connected. highlight = null; if (!exprs.empty()) { StringTokenizer expressionTokenizer = new StringTokenizer((String) exprs.peek(), Code.DELIM); oper = Integer.parseInt(expressionTokenizer.nextToken()); expressionReference = Long.parseLong(expressionTokenizer.nextToken()); //Make the location information for the location token highlight = MCodeUtilities.makeHighlight(expressionTokenizer.nextToken()); } Value val = null; if (MCodeUtilities.isPrimitive(type)) { val = new Value(value, type); ValueActor va = var.getActor().getValue(); val.setActor(va); } else { if (value.equals("null")) { val = new Reference(); } else { Instance inst = (Instance) instances.get(MCodeUtilities.getHashCode(value)); if (inst != null) { val = new Reference(inst); } else { val = new Reference(); } } val.setActor(var.getActor().getValue()); variables.put(new Long(expressionCounter), var); } /* * Do different kinds of things depending on in what expression the * variable is used. */ //If operator is assignment we just store the value if (oper == Code.A) { if (command == Code.TO) { variables.put(new Long(expressionCounter), var); } else { values.put(new Long(expressionCounter), val); } //If oper is other binary operator we will show it //on the screen with operator } else if (MCodeUtilities.isBinary(oper)) { int operator = MCodeUtilities.resolveBinOperator(oper); if (command == Code.LEFT) { director.beginBinaryExpression(val, operator, expressionReference, highlight); } else if (command == Code.RIGHT) { ExpressionActor ea = director.getCurrentScratch().findActor(expressionReference); if (ea != null) { director.rightBinaryExpression(val, ea, highlight); } else { values.put(new Long(expressionCounter), val); } } else { values.put(new Long(expressionCounter), val); } //If oper is a unary operator we will show it //on the screen with operator } else if (MCodeUtilities.isUnary(oper)) { if (oper == Code.PRIE || oper == Code.PRDE) { variables.put(new Long(expressionCounter), var); values.put(new Long(expressionCounter), val); } else if (oper == Code.PIE || oper == Code.PDE) { variables.put(new Long(expressionCounter), var); values.put(new Long(expressionReference), val); values.put(new Long(expressionCounter), val); } else { values.put(new Long(expressionCounter), val); int operator = MCodeUtilities.resolveUnOperator(oper); if (command == Code.RIGHT) { director.beginUnaryExpression(operator, val, expressionReference, highlight); } } //If it is something else we will store it for // later use. } else { values.put(new Long(expressionCounter), val); variables.put(new Long(expressionCounter), var); } } | 49293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49293/4f8e3bd480c250109c4e88a15fb468e8d6463729/TheaterMCodeInterpreter.java/buggy/src/jeliot/mcode/TheaterMCodeInterpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1640,
1085,
55,
2046,
12,
5748,
2652,
4789,
16,
514,
3496,
14682,
16,
5411,
514,
17834,
16,
514,
460,
16,
514,
618,
16,
31386,
8839,
13,
288,
3639,
987,
3198,
4501,
273,
3318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
1085,
55,
2046,
12,
5748,
2652,
4789,
16,
514,
3496,
14682,
16,
5411,
514,
17834,
16,
514,
460,
16,
514,
618,
16,
31386,
8839,
13,
288,
3639,
987,
3198,
4501,
273,
3318... |
public String getInputCenterFile() { | public File getInputCenterFile() { | public String getInputCenterFile() { return m_InputCenterFile; } | 4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/a69b2abf668082a9b5ae27956ab7bf1bbac7a793/XMeans.java/buggy/trunk/weka/clusterers/XMeans.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
12353,
8449,
812,
1435,
288,
565,
327,
312,
67,
1210,
8449,
812,
31,
225,
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,
... | [
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1387,
12353,
8449,
812,
1435,
288,
565,
327,
312,
67,
1210,
8449,
812,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
} | } | public void updateSourceObject(Object anEO) { String masterKey = _localRelationshipKey(); Object aSourceObject = _localSourceObject(); boolean isDictionary = (aSourceObject instanceof NSMutableDictionary); NSMutableDictionary _dictionary = (isDictionary) ? (NSMutableDictionary)aSourceObject : null; EOEnterpriseObject _eo = !(isDictionary) ? (EOEnterpriseObject)aSourceObject : null; EOEnterpriseObject localEO = !isDictionary && anEO != null ? ERXEOControlUtilities.localInstanceOfObject(_eo.editingContext(), (EOEnterpriseObject)anEO) : null; // Need to handle the keyPath situation. if (_eo != null && masterKey.indexOf(".") != -1) { String partialKeyPath=ERXStringUtilities.keyPathWithoutLastProperty(masterKey); _eo = (EOEnterpriseObject)_eo.valueForKeyPath(partialKeyPath); masterKey = ERXStringUtilities.lastPropertyKeyInKeyPath(masterKey); } if (anEO!=null) { if (isDictionary) { _dictionary.setObjectForKey(anEO, masterKey); } else if (_eo.valueForKeyPath(masterKey) != localEO) { _eo.addObjectToBothSidesOfRelationshipWithKey((EOEnterpriseObject)anEO, masterKey); } } else { // setting to "nil" if (isDictionary) { _dictionary.removeObjectForKey(masterKey); } else if (_eo.valueForKey(masterKey) != null) { // WO5FIXME //|| _eo.valueForKey(masterKey) != EONullValue.nullValue()) { _eo.removeObjectFromBothSidesOfRelationshipWithKey((EOEnterpriseObject )_eo.valueForKey(masterKey), masterKey); } } } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/3ab2a1a23bf4665f03ee4a6cf2beb969fb1d9e63/ERXToOneRelationship.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXToOneRelationship.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
1830,
921,
12,
921,
392,
41,
51,
13,
288,
3639,
514,
4171,
653,
273,
389,
3729,
8180,
653,
5621,
3639,
1033,
29563,
921,
273,
389,
3729,
1830,
921,
5621,
3639,
1250,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1830,
921,
12,
921,
392,
41,
51,
13,
288,
3639,
514,
4171,
653,
273,
389,
3729,
8180,
653,
5621,
3639,
1033,
29563,
921,
273,
389,
3729,
1830,
921,
5621,
3639,
1250,
35... |
oEGPane.add(new KnobWidget("Attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1A, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1A, aPart))); oEGPane.add(new KnobWidget("Decay time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1B, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1B, aPart))); oEGPane.add(new KnobWidget("Release time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1C, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1C, aPart))); oEGPane.add(new KnobWidget("PEG init level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x20, aPart), new YamahaFS1RPerformanceDriver.Sender(0x20, aPart))); oEGPane.add(new KnobWidget("PEG attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x21, aPart), new YamahaFS1RPerformanceDriver.Sender(0x21, aPart))); oEGPane.add(new KnobWidget("PEG rel level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x22, aPart), new YamahaFS1RPerformanceDriver.Sender(0x22, aPart))); oEGPane.add(new KnobWidget("PEG rel time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x23, aPart), new YamahaFS1RPerformanceDriver.Sender(0x23, aPart))); | oEGPane.add(new KnobWidget("Attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x1A, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1A, aPart))); oEGPane.add(new KnobWidget("Decay time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x1B, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1B, aPart))); oEGPane.add(new KnobWidget("Release time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x1C, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1C, aPart))); oEGPane.add(new KnobWidget("PEG init level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x20, aPart), new YamahaFS1RPerformanceDriver.Sender(0x20, aPart))); oEGPane.add(new KnobWidget("PEG attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x21, aPart), new YamahaFS1RPerformanceDriver.Sender(0x21, aPart))); oEGPane.add(new KnobWidget("PEG rel level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x22, aPart), new YamahaFS1RPerformanceDriver.Sender(0x22, aPart))); oEGPane.add(new KnobWidget("PEG rel time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model((Patch)p, 0x23, aPart), new YamahaFS1RPerformanceDriver.Sender(0x23, aPart))); | PartDetailsWindow(Patch aPatch, int aPart) { //super("FS1R Part "+aPart+" details",true,true,true,true); p = aPatch; //setSize(600, 400); //Box oPanel = Box.createVerticalBox(); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); JPanel oPanel = this; JPanel oPartPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oPartPane.add(new ComboBoxWidget("", p, new YamahaFS1RPerformanceDriver.Model(p, 0x05, aPart), new YamahaFS1RPerformanceDriver.Sender(0x05, aPart), new String[] {"Mono", "Poly"})); oPartPane.add(new ComboBoxWidget("Priority", p, new YamahaFS1RPerformanceDriver.Model(p, 0x06, aPart), new YamahaFS1RPerformanceDriver.Sender(0x06, aPart), new String[] {"Last", "Top", "Bottom", "First"})); oPartPane.add(new SpinnerWidget("Note res", p, 0, 32, 0, new YamahaFS1RPerformanceDriver.Model(p, 0, aPart), new YamahaFS1RPerformanceDriver.Sender(0, aPart))); oPartPane.add(new ComboBoxWidget("Note limit low", p, new YamahaFS1RPerformanceDriver.Model(p, 0x0F, aPart), new YamahaFS1RPerformanceDriver.Sender(0x0F, aPart), mNotes)); oPartPane.add(new ComboBoxWidget("Note limit high", p, new YamahaFS1RPerformanceDriver.Model(p, 0x10, aPart), new YamahaFS1RPerformanceDriver.Sender(0x10, aPart), mNotes)); oPanel.add(oPartPane); JPanel oEffectsPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oEffectsPane.add(new KnobWidget("Pan scaling", p, 0, 100, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x28, aPart), new YamahaFS1RPerformanceDriver.Sender(0x28, aPart))); oEffectsPane.add(new KnobWidget("Pan LFO depth", p, 0, 99, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x29, aPart), new YamahaFS1RPerformanceDriver.Sender(0x29, aPart))); oEffectsPane.add(new KnobWidget("Formant", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1D, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1D, aPart))); oEffectsPane.add(new KnobWidget("FM", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1E, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1E, aPart))); oEffectsPane.add(new KnobWidget("V/N balance", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x0A, aPart), new YamahaFS1RPerformanceDriver.Sender(0x0A, aPart))); oPanel.add(oEffectsPane); JPanel oFreqPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oFreqPane.add(new CheckBoxWidget("Portamento", p, new YamahaFS1RPerformanceDriver.BitModel(p, 0x24, aPart, 1, 0), new YamahaFS1RPerformanceDriver.BitSender(p, 0x24, aPart))); oFreqPane.add(new ComboBoxWidget("Porta mode", p, new YamahaFS1RPerformanceDriver.BitModel(p, 0x24, aPart, 2, 1), new YamahaFS1RPerformanceDriver.BitSender(p, 0x24, aPart), new String[] {"Fingered", "Fulltime"})); oFreqPane.add(new KnobWidget("Porta time", p, 0, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x25, aPart), new YamahaFS1RPerformanceDriver.Sender(0x25, aPart))); oFreqPane.add(new SpinnerWidget("Pitch Bend low", p, 0x10, 0x58, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x27, aPart), new YamahaFS1RPerformanceDriver.Sender(0x27, aPart))); oFreqPane.add(new SpinnerWidget("Pitch Bend high", p, 0x10, 0x58, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x26, aPart), new YamahaFS1RPerformanceDriver.Sender(0x26, aPart))); oPanel.add(oFreqPane); JPanel oTonePane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oTonePane.add(new KnobWidget("LFO1 speed", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x15, aPart), new YamahaFS1RPerformanceDriver.Sender(0x15, aPart))); oTonePane.add(new KnobWidget("LFO1 pitch mod", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x16, aPart), new YamahaFS1RPerformanceDriver.Sender(0x16, aPart))); oTonePane.add(new KnobWidget("LFO1 delay", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x17, aPart), new YamahaFS1RPerformanceDriver.Sender(0x17, aPart))); oTonePane.add(new KnobWidget("LFO2 speed", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x2E, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2E, aPart))); oTonePane.add(new KnobWidget("LFO2 Filter mod", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x2F, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2F, aPart))); oPanel.add(oTonePane); JPanel oEGPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oEGPane.add(new KnobWidget("Attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1A, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1A, aPart))); oEGPane.add(new KnobWidget("Decay time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1B, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1B, aPart))); oEGPane.add(new KnobWidget("Release time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x1C, aPart), new YamahaFS1RPerformanceDriver.Sender(0x1C, aPart))); oEGPane.add(new KnobWidget("PEG init level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x20, aPart), new YamahaFS1RPerformanceDriver.Sender(0x20, aPart))); oEGPane.add(new KnobWidget("PEG attack time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x21, aPart), new YamahaFS1RPerformanceDriver.Sender(0x21, aPart))); oEGPane.add(new KnobWidget("PEG rel level", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x22, aPart), new YamahaFS1RPerformanceDriver.Sender(0x22, aPart))); oEGPane.add(new KnobWidget("PEG rel time", p, 0, 127, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x23, aPart), new YamahaFS1RPerformanceDriver.Sender(0x23, aPart))); oPanel.add(oEGPane); JPanel oOthersPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); oOthersPane.add(new KnobWidget("Vel Sens depth", p, 0, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x0C, aPart), new YamahaFS1RPerformanceDriver.Sender(0x0C, aPart))); oOthersPane.add(new KnobWidget("Vel Sens offset", p, 0, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x0D, aPart), new YamahaFS1RPerformanceDriver.Sender(0x0D, aPart))); oOthersPane.add(new KnobWidget("Vel limit low", p, 1, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x2A, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2A, aPart))); oOthersPane.add(new KnobWidget("Vel limit high", p, 1, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x2B, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2B, aPart))); oOthersPane.add(new KnobWidget("Expr low limit", p, 0, 127, 0, new YamahaFS1RPerformanceDriver.Model(p, 0x2C, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2C, aPart))); oOthersPane.add(new CheckBoxWidget("Sustain", p, new YamahaFS1RPerformanceDriver.Model(p, 0x2D, aPart), new YamahaFS1RPerformanceDriver.Sender(0x2D, aPart))); oPanel.add(oOthersPane); //getContentPane().add(oPanel); //pack(); } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/b6e99a36d447b749f8ec1622f6d2477fcd586fcb/YamahaFS1RPerformanceEditor.java/buggy/JSynthLib/synthdrivers/YamahaFS1R/YamahaFS1RPerformanceEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1988,
3790,
3829,
12,
7332,
279,
7332,
16,
509,
279,
1988,
13,
288,
1082,
202,
759,
9565,
2932,
4931,
21,
54,
6393,
13773,
69,
1988,
9078,
3189,
3113,
3767,
16,
3767,
16,
3767,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
1988,
3790,
3829,
12,
7332,
279,
7332,
16,
509,
279,
1988,
13,
288,
1082,
202,
759,
9565,
2932,
4931,
21,
54,
6393,
13773,
69,
1988,
9078,
3189,
3113,
3767,
16,
3767,
16,
3767,
16... |
DOMAccessor.initialize(); | public CurrentPageImpl(WrapperFactory yourFactory, BrowserControl yourBrowserControl){ super(yourFactory, yourBrowserControl); // force the class to be loaded, thus loading the JNI library if (!domInitialized) { DOMAccessor.initialize(); }} | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/c4a354c5aaa4d58b0fce83802059e28c0b5e694e/CurrentPageImpl.java/clean/java/webclient/classes_spec/org/mozilla/webclient/wrapper_native/CurrentPageImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6562,
1964,
2828,
12,
3611,
1733,
3433,
1733,
16,
13491,
15408,
3367,
3433,
9132,
3367,
15329,
565,
2240,
12,
93,
477,
1733,
16,
3433,
9132,
3367,
1769,
565,
368,
2944,
326,
667,
358,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6562,
1964,
2828,
12,
3611,
1733,
3433,
1733,
16,
13491,
15408,
3367,
3433,
9132,
3367,
15329,
565,
2240,
12,
93,
477,
1733,
16,
3433,
9132,
3367,
1769,
565,
368,
2944,
326,
667,
358,
50... | |
int c = boxen.getItemCount(); | int c = boxen.getItemCount(); | private String getToTokens(String to, JComboBox boxen) { StringBuffer sb = new StringBuffer(); String selected = (String)boxen.getSelectedItem(); sb.append(selected + '|'); int c = boxen.getItemCount(); for (int x = 0; x < c; x++) { if (!selected.equals((String)boxen.getItemAt(x))) sb.append((String)boxen.getItemAt(x) + '|'); } return sb.toString(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/587af9e9ad98a6fc095602838327da784630b619/SendEMailDialog.java/clean/tn5250j/src/org/tn5250j/mailtools/SendEMailDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
514,
19478,
5157,
12,
780,
358,
16,
804,
22199,
3919,
275,
13,
288,
1377,
6674,
2393,
273,
394,
6674,
5621,
1377,
514,
3170,
273,
261,
780,
13,
2147,
275,
18,
588,
7416,
1180,
562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3238,
514,
19478,
5157,
12,
780,
358,
16,
804,
22199,
3919,
275,
13,
288,
1377,
6674,
2393,
273,
394,
6674,
5621,
1377,
514,
3170,
273,
261,
780,
13,
2147,
275,
18,
588,
7416,
1180,
562... |
assertTrue("Returned incorrect int value", l.intValue() == 100000); assertTrue("Returned incorrect int value", new Long(Long.MAX_VALUE) .intValue() == -1); | assertEquals("Returned incorrect int value", 100000, l.intValue()); assertEquals("Returned incorrect int value", -1, new Long(Long.MAX_VALUE) .intValue()); | public void test_intValue() { // Test for method int java.lang.Long.intValue() Long l = new Long(100000); assertTrue("Returned incorrect int value", l.intValue() == 100000); assertTrue("Returned incorrect int value", new Long(Long.MAX_VALUE) .intValue() == -1); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/181e940cd92dfff67639d98e991206d375a987ea/LongTest.java/buggy/modules/luni/src/test/java/tests/api/java/lang/LongTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
67,
474,
620,
1435,
288,
202,
202,
759,
7766,
364,
707,
509,
2252,
18,
4936,
18,
3708,
18,
474,
620,
1435,
202,
202,
3708,
328,
273,
394,
3407,
12,
21,
11706,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
474,
620,
1435,
288,
202,
202,
759,
7766,
364,
707,
509,
2252,
18,
4936,
18,
3708,
18,
474,
620,
1435,
202,
202,
3708,
328,
273,
394,
3407,
12,
21,
11706,
176... |
Collections.sort(guides, new ReverseComparator(new BeanComparator("version"))); | Collections.sort(guides, new BeanComparator("version")); | public static List<Guide> readByNumberAndYear(Integer number, Integer year) { List<Guide> guides = new ArrayList(); for (Guide guide : RootDomainObject.getInstance().getGuides()) { if (guide.getYear().equals(year) && guide.getNumber().equals(number)) { guides.add(guide); } } Collections.sort(guides, new ReverseComparator(new BeanComparator("version"))); return guides; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/2a245e1d90e40efae193dcfc0bbda2f75ccf91de/Guide.java/clean/src/net/sourceforge/fenixedu/domain/Guide.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
987,
32,
17424,
34,
855,
858,
1854,
1876,
5593,
12,
4522,
1300,
16,
2144,
3286,
13,
288,
3639,
987,
32,
17424,
34,
9875,
281,
273,
394,
2407,
5621,
3639,
364,
261,
17424,
734... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
32,
17424,
34,
855,
858,
1854,
1876,
5593,
12,
4522,
1300,
16,
2144,
3286,
13,
288,
3639,
987,
32,
17424,
34,
9875,
281,
273,
394,
2407,
5621,
3639,
364,
261,
17424,
734... |
choUnitNum.add( "-- Do Not Swap Units --" ); | choUnitNum.add( Messages.getString("CustomMechDialog.doNotSwapUnits") ); | private void refreshUnitNum( Enumeration others ) { // Clear the list of old values choUnitNum.removeAll(); entityUnitNum.removeAllElements(); // Make an entry for "no change". choUnitNum.add( "-- Do Not Swap Units --" ); entityUnitNum.addElement( this.entity ); // Walk through the other entities. while ( others.hasMoreElements() ) { // Track the position of the next other entity. final Entity other = (Entity) others.nextElement(); entityUnitNum.addElement( other ); // Show the other entity's name and callsign. StringBuffer callsign = new StringBuffer( other.getDisplayName() ); callsign.append( " (" ) .append( (char) (other.getUnitNumber() + Settings.unitStartChar) ) .append( '-' ) .append( other.getId() ) .append( ')' ); choUnitNum.add( callsign.toString() ); } choUnitNum.select(0); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/18ec0036f3c5df3d8fbef60e9dd53cc153fc889e/CustomMechDialog.java/clean/megamek/src/megamek/client/ui/AWT/CustomMechDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4460,
2802,
2578,
12,
13864,
10654,
262,
288,
3639,
368,
10121,
326,
666,
434,
1592,
924,
3639,
5011,
2802,
2578,
18,
4479,
1595,
5621,
3639,
1522,
2802,
2578,
18,
4479,
1595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4460,
2802,
2578,
12,
13864,
10654,
262,
288,
3639,
368,
10121,
326,
666,
434,
1592,
924,
3639,
5011,
2802,
2578,
18,
4479,
1595,
5621,
3639,
1522,
2802,
2578,
18,
4479,
1595,
... |
if( (stringVal = properties.getProperty("net.slp.multicastMaximumWait")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_MC_MAX = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.randomWaitBound")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_START_WAIT = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.initialTimeout")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_RETRY = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.unicastMaximumWait")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_RETRY_MAX = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.DAActiveDiscoveryInterval")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_DA_FIND = intValue; if(intValue == 0) CONFIG_DA_DISCOVERY = false; else CONFIG_DA_DISCOVERY = true; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.useScopes")) != null && stringVal.length() != 0 ) { supportedScopes = new Vector(); String[] scopes = stringVal.split(","); for(int i=0; i<scopes.length; i++) { supportedScopes.add(scopes[i]); } } if( (stringVal = properties.getProperty("net.slp.passiveDADetection")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_PASSIVE_DA = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_PASSIVE_DA = false; } if( (stringVal = properties.getProperty("net.slp.mtu")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_SLP_MTU = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.port")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_SLP_PORT = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.locale")) != null && stringVal.length() != 0) { locale = new Locale(stringVal); } if( (stringVal = properties.getProperty("net.slp.multicastAddress")) != null ) { if(stringVal.length() != 0) CONFIG_SLP_MC_ADDR = stringVal; } if( (stringVal = properties.getProperty("net.slp.debug")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_DEBUG = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_DEBUG = false; } if( (stringVal = properties.getProperty("net.slp.logErrors")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_ERRORS = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_ERRORS = false; } if( (stringVal = properties.getProperty("net.slp.logMsg")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_MSG = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_MSG = false; } if( (stringVal = properties.getProperty("net.slp.logfile")) != null ) { CONFIG_LOGFILE = stringVal; } | SLPAgent(Properties properties) throws ServiceLocationException { this.properties = properties; int intValue = 0; String stringVal = null; try { if( (stringVal = properties.getProperty("net.slp.interface")) != null ) { address = InetAddress.getByName(stringVal); } else { address = InetAddress.getLocalHost(); } }catch(Exception e) { throw new ServiceLocationException(ServiceLocationException.NETWORK_ERROR, "SLP: Could not resolve inet address"); } if( (stringVal = properties.getProperty("net.slp.multicastMaximumWait")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_MC_MAX = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.randomWaitBound")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_START_WAIT = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.initialTimeout")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_RETRY = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.unicastMaximumWait")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_RETRY_MAX = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.DAActiveDiscoveryInterval")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_DA_FIND = intValue; if(intValue == 0) CONFIG_DA_DISCOVERY = false; else CONFIG_DA_DISCOVERY = true; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.useScopes")) != null && stringVal.length() != 0 ) { supportedScopes = new Vector(); String[] scopes = stringVal.split(","); for(int i=0; i<scopes.length; i++) { supportedScopes.add(scopes[i]); } } if( (stringVal = properties.getProperty("net.slp.passiveDADetection")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_PASSIVE_DA = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_PASSIVE_DA = false; } if( (stringVal = properties.getProperty("net.slp.mtu")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_SLP_MTU = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.port")) != null ) { try { intValue = Integer.parseInt(stringVal); CONFIG_SLP_PORT = intValue; }catch(NumberFormatException nfe) { } } if( (stringVal = properties.getProperty("net.slp.locale")) != null && stringVal.length() != 0) { locale = new Locale(stringVal); } if( (stringVal = properties.getProperty("net.slp.multicastAddress")) != null ) { if(stringVal.length() != 0) CONFIG_SLP_MC_ADDR = stringVal; } if( (stringVal = properties.getProperty("net.slp.debug")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_DEBUG = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_DEBUG = false; } if( (stringVal = properties.getProperty("net.slp.logErrors")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_ERRORS = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_ERRORS = false; } if( (stringVal = properties.getProperty("net.slp.logMsg")) != null ) { if(stringVal.equalsIgnoreCase("true")) CONFIG_LOG_MSG = true; else if(stringVal.equalsIgnoreCase("false")) CONFIG_LOG_MSG = false; } if( (stringVal = properties.getProperty("net.slp.logfile")) != null ) { CONFIG_LOGFILE = stringVal; } } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/053dfaf6fbe34657fbd4d39bd0992a8564d2ef86/SLPAgent.java/buggy/core/components/slp/src/org/smartfrog/services/comm/slp/agents/SLPAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
348,
14461,
3630,
12,
2297,
1790,
13,
1216,
1956,
2735,
503,
288,
3639,
333,
18,
4738,
273,
1790,
31,
3639,
509,
9307,
273,
374,
31,
3639,
514,
533,
3053,
273,
446,
31,
3639,
775,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
348,
14461,
3630,
12,
2297,
1790,
13,
1216,
1956,
2735,
503,
288,
3639,
333,
18,
4738,
273,
1790,
31,
3639,
509,
9307,
273,
374,
31,
3639,
514,
533,
3053,
273,
446,
31,
3639,
775,
288,
... | |
return e; | return postExtArrayAccess(e); | public final Ext extArrayAccess() { Ext e = extArrayAccessImpl(); if (nextExtFactory != null) { Ext e2 = nextExtFactory.extArrayAccess(); e = composeExts(e, e2); } return e; } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/27cff504b65da534a6e4e4ad3ce65fac3c7dbb26/AbstractExtFactory_c.java/clean/src/polyglot/ast/AbstractExtFactory_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
727,
6419,
1110,
1076,
1862,
1435,
288,
3639,
6419,
425,
273,
1110,
1076,
1862,
2828,
5621,
3639,
309,
261,
4285,
2482,
1733,
480,
446,
13,
288,
5411,
6419,
425,
22,
273,
1024,
2482... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
6419,
1110,
1076,
1862,
1435,
288,
3639,
6419,
425,
273,
1110,
1076,
1862,
2828,
5621,
3639,
309,
261,
4285,
2482,
1733,
480,
446,
13,
288,
5411,
6419,
425,
22,
273,
1024,
2482... |
RubyObject[] args = {value}; | RubyObject[] args = { value }; | public RubyObject yield0(RubyObject value, RubyObject self, RubyModule klass, boolean acheck) { if (!isBlockGiven()) { throw new RaiseException(this, getExceptions().getLocalJumpError(), "yield called out of block"); } RubyVarmap.push(this); Block actBlock = block.getAct(); getFrameStack().push(actBlock.getFrame()); Namespace oldNamespace = getNamespace(); setNamespace(getActFrame().getNamespace()); Scope oldScope = (Scope) getScope().getTop(); getScope().setTop(actBlock.getScope()); // getScope().push(tmpBlock.scope); // block.pop(); // XXX block.pop(); // setAct((Block)actBlock.getNext()); setDynamicVars(actBlock.getDynamicVars()); pushClass((klass != null) ? klass : actBlock.getKlass()); if (klass == null) { self = actBlock.getSelf(); } IMethod method = actBlock.getMethod(); // actBlock.body; if (actBlock.getVar() != null) { // try { if (actBlock.getVar() instanceof ZeroArgNode) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() != 0) { throw new ArgumentError(this, "wrong # of arguments (" + ((RubyArray) value).getLength() + " for 0)"); } } else { if (!(actBlock.getVar() instanceof MultipleAsgnNode)) { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } new AssignmentVisitor(this, self).assign(actBlock.getVar(), value, acheck); } // } catch () { // goto pop_state; // } } else { if (acheck && value != null && value instanceof RubyArray && ((RubyArray) value).getLength() == 1) { value = ((RubyArray) value).entry(0); } } getIterStack().push(actBlock.getIter()); try { while (true) { try { if (method == null) { return getNil(); } else { if (value == null) { value = RubyArray.newArray(this, 0); } RubyObject[] args = {value}; // XXX if (value instanceof RubyArray) { args = ((RubyArray)value).toJavaArray(); } // XXX return method.execute(this, self, null, args, false); /*if (method instanceof ExecutableNode) { if (value == null) { value = RubyArray.newArray(this, 0); } // FIXME/* return ((ExecutableNode) node).execute(value, new RubyObject[] { node.getTValue(), self }, this); } else { return node.eval(this, self);*/ } } catch (RedoJump rExcptn) { } } //break; } catch (NextJump nExcptn) { return getNil(); /* } catch (BreakException bExcptn) { throw bExcptn;*/ } catch (ReturnException rExcptn) { // break; return rExcptn.getReturnValue(); /* catch (BreakException bExcptn) { // +++ throw new ReturnException(getNil()); // ---*/ } finally { getIterStack().pop(); popClass(); RubyVarmap.pop(this); block.setAct(actBlock); getFrameStack().pop(); setNamespace(oldNamespace); // if (ruby_scope->flag & SCOPE_DONT_RECYCLE) // scope_dup(old_scope); getScope().setTop(oldScope); } } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/c79adccbaa071501b1c42e97ed6c3284712f57e4/Ruby.java/buggy/org/jruby/Ruby.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
309,
16051,
291,
1768,
6083,
10756,
288,
5411,
604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
921,
2824,
20,
12,
54,
10340,
921,
460,
16,
19817,
921,
365,
16,
19817,
3120,
7352,
16,
1250,
279,
1893,
13,
288,
3639,
309,
16051,
291,
1768,
6083,
10756,
288,
5411,
604,
... |
if (e.getOldLength() > e.getNewLength() && startDocLine != endDocLine) { | if (countLineFeeds(e.getOldFragment()) != countLineFeeds(e.getNewFragment())) { | private void changedUpdate(DocumentEvent e) { if (myScrollPane == null) return; stopOptimizedScrolling(); mySelectionModel.removeBlockSelection(); mySizeContainer.changedUpdate(e); validateSize(); int startLine = offsetToLogicalPosition(e.getOffset()).line; int endLine = offsetToLogicalPosition(e.getOffset() + e.getNewLength()).line; boolean painted = false; if (myDocument.getTextLength() > 0) { int startDocLine = myDocument.getLineNumber(e.getOffset()); int endDocLine = myDocument.getLineNumber(e.getOffset() + e.getNewLength()); if (e.getOldLength() > e.getNewLength() || startDocLine != endDocLine) { updateGutterSize(); } if (e.getOldLength() > e.getNewLength() && startDocLine != endDocLine) { // Lines removed. Need to repaint till the end of the screen repaintToScreenBotton(startLine); painted = true; } } updateCaretCursor(); if (!painted) { repaintLines(startLine, endLine); } Point caretLocation = visualPositionToXY(getCaretModel().getVisualPosition()); int scrollOffset = caretLocation.y - myCaretUpdateVShift; getScrollingModel().scrollVertically(scrollOffset); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/114dbac0b0f0fc43bfe6eea00f7fc07699620d21/EditorImpl.java/buggy/source/com/intellij/openapi/editor/impl/EditorImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
3550,
1891,
12,
2519,
1133,
425,
13,
288,
565,
309,
261,
4811,
26360,
422,
446,
13,
327,
31,
565,
2132,
13930,
1235,
1541,
15742,
5621,
565,
3399,
6233,
1488,
18,
4479,
1768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3550,
1891,
12,
2519,
1133,
425,
13,
288,
565,
309,
261,
4811,
26360,
422,
446,
13,
327,
31,
565,
2132,
13930,
1235,
1541,
15742,
5621,
565,
3399,
6233,
1488,
18,
4479,
1768,
... |
int cx = _content.getX(), cy = _content.getY(); int cw = _content.getWidth(), ch = _content.getHeight(); int newX = cx, newY = cy, newW = cw, newH = ch; Dimension minSize = _content.getMinimumSize(); int minWidth = minSize.width, minHeight = minSize.height; | int cx = getContent().getX(), cy = getContent().getY(); int cw = getContent().getWidth(), ch = getContent().getHeight(); | public void dragHandle(int mX, int mY, int anX, int anY, Handle hand) { if (hand.index < 10) { setPaintButtons(false); super.dragHandle(mX, mY, anX, anY, hand); return; } int cx = _content.getX(), cy = _content.getY(); int cw = _content.getWidth(), ch = _content.getHeight(); int newX = cx, newY = cy, newW = cw, newH = ch; Dimension minSize = _content.getMinimumSize(); int minWidth = minSize.width, minHeight = minSize.height; Object edgeType = CommentEdge.class; Object nodeType = Model.getMetaTypes().getComment(); int bx = mX, by = mY; boolean reverse = false; switch (hand.index) { case 10: //add commentlink by = cy; bx = cx + cw / 2; break; case 11: //add commentlink by = cy + ch; bx = cx + cw / 2; break; case 12: //add commentlink by = cy + ch / 2; bx = cx + cw; break; case 13: // add commentlink by = cy + ch / 2; bx = cx; break; default: LOG.warn("invalid handle number"); break; } if (edgeType != null && nodeType != null) { Editor ce = Globals.curEditor(); ModeCreateEdgeAndNode m = new ModeCreateEdgeAndNode(ce, edgeType, nodeType, false); m.setup((FigNode) _content, _content.getOwner(), bx, by, reverse); ce.pushMode(m); } } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/55b1a2bf9e5a1ff91e4f97c63ed8d76eb2a68f27/SelectionComment.java/clean/src_new/org/argouml/uml/diagram/static_structure/ui/SelectionComment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
8823,
3259,
12,
474,
312,
60,
16,
509,
312,
61,
16,
509,
392,
60,
16,
509,
392,
61,
16,
5004,
948,
13,
288,
3639,
309,
261,
2349,
18,
1615,
411,
1728,
13,
288,
5411,
444,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8823,
3259,
12,
474,
312,
60,
16,
509,
312,
61,
16,
509,
392,
60,
16,
509,
392,
61,
16,
5004,
948,
13,
288,
3639,
309,
261,
2349,
18,
1615,
411,
1728,
13,
288,
5411,
444,... |
{ return getPropertyAsString(FILE_NAME); } | { return getPropertyAsString(FILE_NAME); } | public String getFilename() { return getPropertyAsString(FILE_NAME); } | 50179 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50179/bfc7b8ce231693a055b6af369f484c88e0a9b483/HTTPSampler.java/clean/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
14632,
1435,
202,
95,
202,
202,
2463,
3911,
8092,
12,
3776,
67,
1985,
1769,
202,
97,
2,
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,
225,
202,
482,
514,
14632,
1435,
202,
95,
202,
202,
2463,
3911,
8092,
12,
3776,
67,
1985,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if (file.indexOf('.') >= 0) { | if (file.lastIndexOf('.') > file.lastIndexOf('/')) { | public void smartLoad(String file) { Library library = null; String loadName = file; String[] extensionsToSearch = null; // if an extension is specified, try more targetted searches if (file.indexOf('.') >= 0) { Matcher matcher = null; if ((matcher = sourcePattern.matcher(file)).matches()) { // source extensions extensionsToSearch = sourceSuffixes; // trim extension to try other options file = matcher.group(1); } else if ((matcher = extensionPattern.matcher(file)).matches()) { // extension extensions extensionsToSearch = extensionSuffixes; // trim extension to try other options file = matcher.group(1); } else { // unknown extension throw runtime.newLoadError("no such file to load -- " + file); } } else { // try all extensions extensionsToSearch = allSuffixes; } // First try suffixes with normal loading for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibrary(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } // Then try suffixes with classloader loading if (library == null) { for (int i = 0; i < extensionsToSearch.length; i++) { library = findLibraryWithClassloaders(file + extensionsToSearch[i]); if (library != null) { loadName = file + extensionsToSearch[i]; break; } } } library = tryLoadExtension(library,file); // no library or extension found, bail out if (library == null) { throw runtime.newLoadError("no such file to load -- " + file); } // attempt to load the found library synchronized (this) { try { loadedFeaturesInternal.add(file); loadedFeatures.add(runtime.newString(loadName)); library.load(runtime); } catch (IOException e) { loadedFeaturesInternal.remove(file); loadedFeatures.remove(runtime.newString(loadName)); throw runtime.newLoadError("IO error -- " + file); } } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/df365ec2c2e8b2c1348f22f8102d3515fbe4217c/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13706,
2563,
12,
780,
585,
13,
288,
3639,
18694,
5313,
273,
446,
31,
3639,
514,
1262,
461,
273,
585,
31,
3639,
514,
8526,
4418,
774,
2979,
273,
446,
31,
7734,
368,
309,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13706,
2563,
12,
780,
585,
13,
288,
3639,
18694,
5313,
273,
446,
31,
3639,
514,
1262,
461,
273,
585,
31,
3639,
514,
8526,
4418,
774,
2979,
273,
446,
31,
7734,
368,
309,
392,
... |
public void addEntry(String srcText) | public synchronized void addEntry(String srcText) | public void addEntry(String srcText) { // if the source string is empty, don't add it to TM if( srcText.length()==0 || srcText.trim().length()==0 ) return; StringEntry strEntry = (StringEntry) m_strEntryHash.get(srcText); if (strEntry == null) { // entry doesn't exist yet - create and store it strEntry = new StringEntry(srcText); m_strEntryList.add(strEntry); m_strEntryHash.put(srcText, strEntry); } SourceTextEntry srcTextEntry = new SourceTextEntry(strEntry, m_curFile, numEntries()); m_srcTextEntryArray.add(srcTextEntry); } | 8797 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8797/1ce4009ab424d7ed38ee2e15dc4ebd59cacf0a75/CommandThread.java/clean/src/org/omegat/core/threads/CommandThread.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
527,
1622,
12,
780,
1705,
1528,
13,
565,
288,
3639,
368,
309,
326,
1084,
533,
353,
1008,
16,
2727,
1404,
527,
518,
358,
27435,
3639,
309,
12,
1705,
1528,
18,
2469,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
527,
1622,
12,
780,
1705,
1528,
13,
565,
288,
3639,
368,
309,
326,
1084,
533,
353,
1008,
16,
2727,
1404,
527,
518,
358,
27435,
3639,
309,
12,
1705,
1528,
18,
2469,
1435... |
final String queryString = urlCrypt.decrypt(secureParam); | final String queryString = urlCrypt.decryptUrlSafe(secureParam); | public WebRequestWithCryptedUrl(final HttpServletRequest request) { super(request); // Encoded query string have only a single parameter named "x" final String secureParam = request.getParameter("x"); if ((secureParam != null) && (secureParam.length() > 0)) { // Get the crypt implementation from the application ICrypt urlCrypt = Application.get().getSecuritySettings().getCryptFactory().newCrypt(); // Decrypt the query string final String queryString = urlCrypt.decrypt(secureParam); // The querystring might have been shortened (length reduced). // In that case, lengthen the query string again. this.queryString = rebuildUrl(queryString); // extract parameter key/value pairs from the query string this.parameters = analyzeQueryString(this.queryString); } else { // If "x" parameter does not exist, we assume the query string // is not encoded. // Note: You might want to throw an exception, if you don't want // the automatic fallback. this.queryString = null; this.parameters = new ValueMap(); } // If available, add POST parameters as well. They are not encrypted. // The parameters from HttpRequest final Enumeration paramNames = request.getParameterNames(); // For all parameters (POST + URL query string) while (paramNames.hasMoreElements()) { String paramName = (String)paramNames.nextElement(); // Ignore the "x" parameter if (!"x".equalsIgnoreCase(paramName)) { String[] values = request.getParameterValues(paramName); // add key/value to our parameter map this.parameters.put(paramName, values); } } } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/ee052ea8f6a4edb66cb091c612df3686df9de90f/WebRequestWithCryptedUrl.java/clean/wicket/src/java/wicket/protocol/http/WebRequestWithCryptedUrl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2999,
691,
1190,
39,
4567,
1489,
12,
6385,
9984,
590,
13,
202,
95,
202,
202,
9565,
12,
2293,
1769,
202,
202,
759,
23306,
843,
533,
1240,
1338,
279,
2202,
1569,
4141,
315,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2999,
691,
1190,
39,
4567,
1489,
12,
6385,
9984,
590,
13,
202,
95,
202,
202,
9565,
12,
2293,
1769,
202,
202,
759,
23306,
843,
533,
1240,
1338,
279,
2202,
1569,
4141,
315,
92,
... |
public boolean handleClassesDelta(IResourceDelta _delta, IProgressMonitor monitor, Map _buildCache) { return _delta.getKind() == IResourceDelta.ADDED || _delta.getKind() == IResourceDelta.REMOVED; | public void handleClassesDelta(IResourceDelta delta, IProgressMonitor monitor, Map buildCache) { | public boolean handleClassesDelta(IResourceDelta _delta, IProgressMonitor monitor, Map _buildCache) { return _delta.getKind() == IResourceDelta.ADDED || _delta.getKind() == IResourceDelta.REMOVED; } | 2575 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2575/5644f6506a8f17f2b8311774090206457f13a78d/DotXcodeBuilder.java/buggy/wolips/plugins/org.objectstyle.wolips.builder/java/org/objectstyle/wolips/builder/internal/DotXcodeBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1640,
4818,
9242,
12,
45,
1420,
9242,
389,
9878,
16,
467,
5491,
7187,
6438,
16,
1635,
389,
3510,
1649,
13,
288,
202,
202,
2463,
389,
9878,
18,
588,
5677,
1435,
422,
467,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
4818,
9242,
12,
45,
1420,
9242,
389,
9878,
16,
467,
5491,
7187,
6438,
16,
1635,
389,
3510,
1649,
13,
288,
202,
202,
2463,
389,
9878,
18,
588,
5677,
1435,
422,
467,... |
_t = __t2253; | _t = __t2259; | public final void selectionlistphrase(AST _t) throws RecognitionException { AST selectionlistphrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2253 = _t; AST tmp2334_AST_in = (AST)_t; match(_t,SELECTIONLIST); _t = _t.getFirstChild(); { _loop2263: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SINGLE: { AST tmp2335_AST_in = (AST)_t; match(_t,SINGLE); _t = _t.getNextSibling(); break; } case MULTIPLE: { AST tmp2336_AST_in = (AST)_t; match(_t,MULTIPLE); _t = _t.getNextSibling(); break; } case NODRAG: { AST tmp2337_AST_in = (AST)_t; match(_t,NODRAG); _t = _t.getNextSibling(); break; } case LISTITEMS: { AST __t2255 = _t; AST tmp2338_AST_in = (AST)_t; match(_t,LISTITEMS); _t = _t.getFirstChild(); constant(_t); _t = _retTree; { _loop2257: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp2339_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); constant(_t); _t = _retTree; } else { break _loop2257; } } while (true); } _t = __t2255; _t = _t.getNextSibling(); break; } case LISTITEMPAIRS: { AST __t2258 = _t; AST tmp2340_AST_in = (AST)_t; match(_t,LISTITEMPAIRS); _t = _t.getFirstChild(); constant(_t); _t = _retTree; { _loop2260: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp2341_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); constant(_t); _t = _retTree; } else { break _loop2260; } } while (true); } _t = __t2258; _t = _t.getNextSibling(); break; } case SCROLLBARHORIZONTAL: { AST tmp2342_AST_in = (AST)_t; match(_t,SCROLLBARHORIZONTAL); _t = _t.getNextSibling(); break; } case SCROLLBARVERTICAL: { AST tmp2343_AST_in = (AST)_t; match(_t,SCROLLBARVERTICAL); _t = _t.getNextSibling(); break; } case INNERCHARS: { AST __t2261 = _t; AST tmp2344_AST_in = (AST)_t; match(_t,INNERCHARS); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2261; _t = _t.getNextSibling(); break; } case INNERLINES: { AST __t2262 = _t; AST tmp2345_AST_in = (AST)_t; match(_t,INNERLINES); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t2262; _t = _t.getNextSibling(); break; } case SORT: { AST tmp2346_AST_in = (AST)_t; match(_t,SORT); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; break; } default: { break _loop2263; } } } while (true); } _t = __t2253; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4421,
1098,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4421,
1098,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
4421,
1098,
9429,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
4421,
1098,
9429,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
29... |
main.dim.enableForAllNewContexts(); | main.enableForAllNewContexts(); | public static void main(String[] args) throws Exception { Main main = new Main("Rhino JavaScript Debugger"); main.dim.breakFlag = true; main.setExitAction(new Runnable() { public void run() { System.exit(0); } }); System.setIn(main.getIn()); System.setOut(main.getOut()); System.setErr(main.getErr()); main.dim.enableForAllNewContexts(); main.setScopeProvider(new ScopeProvider() { public Scriptable getScope() { return org.mozilla.javascript.tools.shell.Main.getScope(); } }); main.debugGui.pack(); main.debugGui.setSize(600, 460); main.debugGui.setVisible(true); org.mozilla.javascript.tools.shell.Main.exec(args); } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/9c900143cf1a4536a18403cb329ddffc65fdaeee/Main.java/clean/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
3639,
1216,
1185,
565,
288,
3639,
12740,
2774,
273,
394,
12740,
2932,
54,
76,
15020,
11905,
28645,
8863,
3639,
2774,
18,
3509,
18,
8820,
4678... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
12,
780,
8526,
833,
13,
3639,
1216,
1185,
565,
288,
3639,
12740,
2774,
273,
394,
12740,
2932,
54,
76,
15020,
11905,
28645,
8863,
3639,
2774,
18,
3509,
18,
8820,
4678... |
return getModuleHandle( ).getDataSources( ).getContents( ); | return getModuleHandle( ).getAllDataSources(); | public List getDataSources( ) { return getModuleHandle( ).getDataSources( ).getContents( ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/f87270aa0595049fe640fdc4a9ae866d42a45cd9/ReportDesignHandleAdapter.java/buggy/UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/ReportDesignHandleAdapter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
4303,
8628,
12,
262,
202,
95,
202,
202,
2463,
11251,
3259,
12,
262,
18,
588,
751,
8628,
12,
262,
18,
588,
6323,
12,
11272,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
4303,
8628,
12,
262,
202,
95,
202,
202,
2463,
11251,
3259,
12,
262,
18,
588,
751,
8628,
12,
262,
18,
588,
6323,
12,
11272,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
assertTrue(t.equals(TS3WOTZ)); | assertEquals(t.getTime(), tmpDate4WOTZ.getTime()); assertTrue(rs.next()); t = rs.getTimestamp(1); assertNotNull(t); assertEquals(t.getTime(), tmpTime1WOTZ.getTime()); | private void timestampTestWOTZ() throws SQLException { Statement stmt = con.createStatement(); ResultSet rs; java.sql.Timestamp t; rs = stmt.executeQuery("select ts from " + TSWOTZ_TABLE + " order by ts"); assertNotNull(rs); assertTrue(rs.next()); t = rs.getTimestamp(1); assertNotNull(t); assertTrue(t.equals(TS1WOTZ)); assertTrue(rs.next()); t = rs.getTimestamp(1); assertNotNull(t); assertTrue(t.equals(TS2WOTZ)); assertTrue(rs.next()); t = rs.getTimestamp(1); assertNotNull(t); assertTrue(t.equals(TS3WOTZ)); assertTrue(rs.next()); t = rs.getTimestamp(1); assertNotNull(t); assertTrue(t.equals(TS4WOTZ)); assertTrue(! rs.next()); // end of table. Fail if more entries exist. rs.close(); stmt.close(); } | 46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/66d00417c97a589c1d5a037916f2f518f9540aba/TimestampTest.java/clean/src/interfaces/jdbc/org/postgresql/test/jdbc2/TimestampTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
2858,
4709,
59,
1974,
62,
1435,
1216,
6483,
202,
95,
202,
202,
3406,
3480,
273,
356,
18,
2640,
3406,
5621,
202,
202,
13198,
3597,
31,
202,
202,
6290,
18,
4669,
18,
4921,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2858,
4709,
59,
1974,
62,
1435,
1216,
6483,
202,
95,
202,
202,
3406,
3480,
273,
356,
18,
2640,
3406,
5621,
202,
202,
13198,
3597,
31,
202,
202,
6290,
18,
4669,
18,
4921,... |
ItemListener listener = new ItemListener() { public void itemStateChanged(ItemEvent e) { characterCombo.setEnabled(characterRadio.isSelected()); characterStateCombo.setEnabled(characterRadio.isSelected()); taxonSetCombo.setEnabled(taxonSetRadio.isSelected()); } }; | ItemListener listener = new ItemListener() { public void itemStateChanged(ItemEvent e) { characterCombo.setEnabled(characterRadio.isSelected()); characterStateCombo.setEnabled(characterRadio.isSelected()); taxonSetCombo.setEnabled(taxonSetRadio.isSelected()); } }; | public TreeSummaryStatistic createStatistic(TreeSummaryStatistic.Factory factory) { if (factory.allowsCharacter() || factory.allowsCharacterState() || factory.allowsTaxonList()) { OptionsPanel optionPanel = new OptionsPanel(); optionPanel.addSpanningComponent(new JLabel(factory.getSummaryStatisticDescription())); final JRadioButton wholeTreeRadio = new JRadioButton("For the whole tree", false); final JRadioButton characterRadio = new JRadioButton("Using a given character", false); final JComboBox characterCombo = new JComboBox(); for (int i = 0; i < treeStatData.characters.size(); i++) { characterCombo.addItem(treeStatData.characters.get(i)); } final JComboBox characterStateCombo = new JComboBox(); characterCombo.addItemListener( new ItemListener() { public void itemStateChanged(ItemEvent e) { TreeStatData.Character c = (TreeStatData.Character)characterCombo.getSelectedItem(); if (c != null) { for (int i = 0; i < c.states.size(); i++) { characterCombo.addItem(c.states.get(i)); } } } }); if (characterCombo.getItemCount() > 0) { characterCombo.setSelectedIndex(0); } final JRadioButton taxonSetRadio = new JRadioButton("Using a given taxon set", false); final JComboBox taxonSetCombo = new JComboBox(); for (int i = 0; i < treeStatData.taxonSets.size(); i++) { taxonSetCombo.addItem(treeStatData.taxonSets.get(i)); } ButtonGroup group = new ButtonGroup(); ItemListener listener = new ItemListener() { public void itemStateChanged(ItemEvent e) { characterCombo.setEnabled(characterRadio.isSelected()); characterStateCombo.setEnabled(characterRadio.isSelected()); taxonSetCombo.setEnabled(taxonSetRadio.isSelected()); } }; if (factory.allowsWholeTree()) { group.add(wholeTreeRadio); wholeTreeRadio.addItemListener(listener); optionPanel.addSpanningComponent(wholeTreeRadio); optionPanel.addSeparator(); } if (factory.allowsTaxonList()) { group.add(taxonSetRadio); taxonSetRadio.addItemListener(listener); optionPanel.addSpanningComponent(taxonSetRadio); optionPanel.addComponentWithLabel("Taxon Set: ", taxonSetCombo); optionPanel.addSeparator(); } if (factory.allowsCharacter()) { group.add(characterRadio); characterRadio.addItemListener(listener); optionPanel.addSpanningComponent(characterRadio); optionPanel.addComponentWithLabel("Character: ", characterStateCombo); if (factory.allowsCharacterState()) { optionPanel.addComponentWithLabel("State: ", characterStateCombo); } optionPanel.addSeparator(); } if (factory.allowsCharacter()) { characterRadio.setSelected(true); } if (factory.allowsTaxonList()) { taxonSetRadio.setSelected(true); } if (factory.allowsWholeTree()) { wholeTreeRadio.setSelected(true); } JOptionPane optionPane = new JOptionPane(optionPanel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null, null); optionPane.setBorder(new EmptyBorder(12, 12, 12, 12)); JDialog dialog = optionPane.createDialog(frame, factory.getSummaryStatisticName()); // dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); dialog.pack(); dialog.show(); if (optionPane.getValue() == null) { return null; } int value = ((Integer)optionPane.getValue()).intValue(); if (value == -1 || value == JOptionPane.CANCEL_OPTION) { return null; } if (wholeTreeRadio.isSelected()) { return factory.createStatistic(); } else if (characterRadio.isSelected()) { TreeStatData.Character c = (TreeStatData.Character)characterCombo.getSelectedItem(); if (factory.allowsCharacterState()) { return factory.createStatistic(); } else { return factory.createStatistic(); } } else if (taxonSetRadio.isSelected()) { TreeStatData.TaxonSet t = (TreeStatData.TaxonSet)taxonSetCombo.getSelectedItem(); Taxa taxa = new Taxa(); taxa.setId(t.name); Iterator iter = t.taxa.iterator(); while (iter.hasNext()) { String id = (String)iter.next(); Taxon taxon = new Taxon(id); taxa.addTaxon(taxon); } return factory.createStatistic(taxa); } else { return null; } } else { return factory.createStatistic(); } } | 49053 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49053/50b82f7bc4b2d941023c800a3c14988282b8fd44/StatisticsPanel.java/clean/trunk/src/dr/app/treestat/StatisticsPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
4902,
4733,
20673,
752,
20673,
12,
2471,
4733,
20673,
18,
1733,
3272,
13,
288,
1850,
309,
261,
6848,
18,
5965,
87,
7069,
1435,
747,
3272,
18,
5965,
87,
7069,
1119,
1435,
747,
3272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4202,
1071,
4902,
4733,
20673,
752,
20673,
12,
2471,
4733,
20673,
18,
1733,
3272,
13,
288,
1850,
309,
261,
6848,
18,
5965,
87,
7069,
1435,
747,
3272,
18,
5965,
87,
7069,
1119,
1435,
747,
3272,... |
jj_la1[66] = jj_gen; | jj_la1[67] = jj_gen; | final public void AdditiveExpression() throws ParseException { MultiplicativeExpression(); label_29: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: ; break; default: jj_la1[65] = jj_gen; break label_29; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: jj_consume_token(PLUS); break; case MINUS: jj_consume_token(MINUS); break; default: jj_la1[66] = jj_gen; jj_consume_token(-1); throw new ParseException(); } MultiplicativeExpression(); } } | 45569 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45569/0687038c0aeeacc81c38706b6c1d8dac4185836b/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
1436,
3720,
2300,
1435,
1216,
10616,
288,
565,
5991,
28884,
2300,
5621,
565,
1433,
67,
5540,
30,
565,
1323,
261,
3767,
13,
288,
1377,
1620,
14015,
78,
78,
67,
496,
79,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1436,
3720,
2300,
1435,
1216,
10616,
288,
565,
5991,
28884,
2300,
5621,
565,
1433,
67,
5540,
30,
565,
1323,
261,
3767,
13,
288,
1377,
1620,
14015,
78,
78,
67,
496,
79,
6... |
} else if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.FORM) { for (Token token2 = tokenizer.nextToken(); token2.getType() != Token.EOF; token2 = tokenizer.nextToken()) { | } else if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.FORM) { for (Token token2 = tokenizer.nextToken(); token2.getType() != Token.EOF; token2 = tokenizer .nextToken()) { | private String parseError() { String newError = ""; try { HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(new StringReader(error), null); for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) { if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.A) { } else if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.FORM) { for (Token token2 = tokenizer.nextToken(); token2.getType() != Token.EOF; token2 = tokenizer.nextToken()) { if (token2.getType() == Token.TAG) { HtmlTag tag = (HtmlTag) token2.getValue(); if (tag.getTagType() == HtmlTag.Type.FORM && tag.isEndTag()) break; } } } else { newError += token.getWhitespace().toString() + token.getValue(); } } } catch (Exception e) { newError = error; } return newError; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/58e5092cd3f2b6ccca287bcc48c3ee93b65fb89d/BugPost.java/clean/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/BugPost.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
514,
1109,
668,
1435,
288,
202,
202,
780,
394,
668,
273,
1408,
31,
202,
202,
698,
288,
1082,
202,
4353,
1228,
10524,
10123,
273,
394,
5430,
1228,
10524,
12,
2704,
26227,
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,
1152,
514,
1109,
668,
1435,
288,
202,
202,
780,
394,
668,
273,
1408,
31,
202,
202,
698,
288,
1082,
202,
4353,
1228,
10524,
10123,
273,
394,
5430,
1228,
10524,
12,
2704,
26227,
12,
... |
bList.add( new String( str ) ); | if ( !bList.contains( str ) ) bList.add( new String( str ) ); | public void add( String str ) { bList.add( new String( str ) ); } | 48071 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48071/863a435e1e81a31023f567a49dc521436d84df27/BasenameList.java/clean/java/de/dfki/lt/mary/unitselection/voiceimport_reorganized/BasenameList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
12,
514,
609,
262,
288,
3639,
309,
261,
401,
70,
682,
18,
12298,
12,
609,
262,
262,
324,
682,
18,
1289,
12,
394,
514,
12,
609,
262,
11272,
565,
289,
2,
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,
1,
1,
1,
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,
527,
12,
514,
609,
262,
288,
3639,
309,
261,
401,
70,
682,
18,
12298,
12,
609,
262,
262,
324,
682,
18,
1289,
12,
394,
514,
12,
609,
262,
11272,
565,
289,
2,
-100,
-100,
-... |
else | else { | private void reSIR(SIRContainer parent, FlatNode current, HashSet visited) { if (current.isFilter()) { SIRPipeline pipeline; if (!(parent instanceof SIRPipeline)) { pipeline = new SIRPipeline(parent, "Pipeline" + id++); pipeline.setInit(SIRStream.makeEmptyInit()); parent.add(pipeline); } else pipeline = (SIRPipeline)parent; //keep adding filters to this pipeline while (current.isFilter()) { //make sure we have not added this filter before assert !(visited.contains(current)) : "FlatGraph -> SIR does not support Feedbackloops"; //record that we have added this filter visited.add(current); List params; //if its parent does not contain it, just pass null params... if (parent.indexOf(current.getFilter()) == -1) params = new LinkedList(); else params = ((SIRFilter)current.contents).getParams(); pipeline.add((SIRFilter)current.contents, params); ((SIRFilter)current.contents).setParent(parent); //nothing more to do here so just return if (current.ways == 0) return; //assert that there is exactly one outgoing edge per filter if there is none assert current.ways == 1 && current.edges.length == 1; current = current.edges[0]; } } if (current.isSplitter()) { SIRSplitJoin splitJoin = new SIRSplitJoin(parent, "SplitJoin" + id++); splitJoin.setInit(SIRStream.makeEmptyInit()); //add this splitjoin to the parent! parent.add(splitJoin); //make sure we have not seen this splitter assert !(visited.contains(current)) : "FlatGraph -> SIR does not support Feedbackloops"; //record that we have added this splitter visited.add(current); splitJoin.setSplitter((SIRSplitter)current.contents); //create a dummy joiner for this split join just in case it does not have one SIRJoiner joiner = SIRJoiner.create(splitJoin, SIRJoinType.NULL, ((SIRSplitter)current.contents).getWays()); splitJoin.setJoiner(joiner); for (int i = 0; i < current.edges.length; i++) { if (current.edges[i] != null) { //wrap all parallel splitter edges in a pipeline SIRPipeline pipeline = new SIRPipeline(splitJoin, "Pipeline" + id++); pipeline.setInit(SIRStream.makeEmptyInit()); splitJoin.add(pipeline); reSIR(pipeline, current.edges[i], visited); } } return; } if (current.isJoiner()){ SIRContainer splitJoin = parent; while (!(splitJoin instanceof SIRSplitJoin)) { splitJoin = splitJoin.getParent(); } assert splitJoin != null; if (!visited.contains(current)) { //make sure we have not seen this Joiner assert !(visited.contains(current)) : "FlatGraph -> SIR does not support Feedbackloops"; //record that we have added this Joiner visited.add(current); //first time we are seeing this joiner so set it as the joiner //and visit the remainder of the graph ((SIRSplitJoin)splitJoin).setJoiner((SIRJoiner)current.contents); if (current.ways > 0) { assert current.edges.length == 1 && current.ways == 1 && current.edges[0] != null; reSIR(((SIRSplitJoin)splitJoin).getParent(), current.edges[0], visited); } } } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/71576bda692043a1f37c061fa2886249b20c4dd7/FlatGraphToSIR.java/clean/streams/src/at/dms/kjc/flatgraph/FlatGraphToSIR.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
283,
2320,
54,
12,
2320,
54,
2170,
982,
16,
20396,
907,
783,
16,
6847,
9711,
13,
377,
288,
3639,
309,
261,
2972,
18,
291,
1586,
10756,
288,
5411,
5705,
54,
8798,
5873,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
283,
2320,
54,
12,
2320,
54,
2170,
982,
16,
20396,
907,
783,
16,
6847,
9711,
13,
377,
288,
3639,
309,
261,
2972,
18,
291,
1586,
10756,
288,
5411,
5705,
54,
8798,
5873,
31,
... |
for (Iterator iterator = keySequenceAssignments.iterator(); iterator.hasNext();) { KeySequenceAssignment keySequenceAssignment = (KeySequenceAssignment) iterator.next(); KeySequenceBindingNode.Assignment assignment = keySequenceAssignment.assignment; String commandString = null; int difference = DIFFERENCE_NONE; | for (Iterator iterator = keySequenceAssignments.iterator(); iterator .hasNext();) { KeySequenceAssignment keySequenceAssignment = (KeySequenceAssignment) iterator .next(); KeySequenceBindingNode.Assignment assignment = keySequenceAssignment.assignment; String commandString = null; int difference = DIFFERENCE_NONE; | private void buildKeySequenceAssignmentsTable() { tableAssignmentsForKeySequence.removeAll(); for (Iterator iterator = keySequenceAssignments.iterator(); iterator.hasNext();) { KeySequenceAssignment keySequenceAssignment = (KeySequenceAssignment) iterator.next(); KeySequenceBindingNode.Assignment assignment = keySequenceAssignment.assignment; String commandString = null; int difference = DIFFERENCE_NONE; if (assignment.hasPreferenceCommandIdInFirstKeyConfiguration || assignment.hasPreferenceCommandIdInInheritedKeyConfiguration) { String preferenceCommandId; if (assignment.hasPreferenceCommandIdInFirstKeyConfiguration) preferenceCommandId = assignment.preferenceCommandIdInFirstKeyConfiguration; else preferenceCommandId = assignment.preferenceCommandIdInInheritedKeyConfiguration; if (assignment.hasPluginCommandIdInFirstKeyConfiguration || assignment.hasPluginCommandIdInInheritedKeyConfiguration) { String pluginCommandId; if (assignment.hasPluginCommandIdInFirstKeyConfiguration) pluginCommandId = assignment.pluginCommandIdInFirstKeyConfiguration; else pluginCommandId = assignment.pluginCommandIdInInheritedKeyConfiguration; if (preferenceCommandId != null) { difference = DIFFERENCE_CHANGE; commandString = commandUniqueNamesById.get(preferenceCommandId) + ""; //$NON-NLS-1$ } else { difference = DIFFERENCE_MINUS; commandString = "Unassigned"; //$NON-NLS-1$ } if (pluginCommandId != null) commandString += " (was: " + commandUniqueNamesById.get(pluginCommandId) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ else commandString += " (was: " + "Unassigned" + ")"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ } else { if (preferenceCommandId != null) { difference = DIFFERENCE_ADD; commandString = commandUniqueNamesById.get(preferenceCommandId) + ""; //$NON-NLS-1$ } else { difference = DIFFERENCE_MINUS; commandString = "Unassigned"; //$NON-NLS-1$ } } } else { String pluginCommandId; if (assignment.hasPluginCommandIdInFirstKeyConfiguration) pluginCommandId = assignment.pluginCommandIdInFirstKeyConfiguration; else pluginCommandId = assignment.pluginCommandIdInInheritedKeyConfiguration; if (pluginCommandId != null) { difference = DIFFERENCE_NONE; commandString = commandUniqueNamesById.get(pluginCommandId) + ""; //$NON-NLS-1$ } else { difference = DIFFERENCE_MINUS; commandString = "Unassigned"; //$NON-NLS-1$ } } TableItem tableItem = new TableItem(tableAssignmentsForKeySequence, SWT.NULL); switch (difference) { case DIFFERENCE_ADD : tableItem.setImage(0, IMAGE_PLUS); break; case DIFFERENCE_CHANGE : tableItem.setImage(0, IMAGE_CHANGE); break; case DIFFERENCE_MINUS : tableItem.setImage(0, IMAGE_MINUS); break; case DIFFERENCE_NONE : tableItem.setImage(0, IMAGE_BLANK); break; } String contextId = keySequenceAssignment.contextId; if (contextId == null) tableItem.setText(1, Util.translateString(RESOURCE_BUNDLE, "general")); //$NON-NLS-1$ else tableItem.setText(1, (String) contextUniqueNamesById.get(contextId)); //$NON-NLS-1$ tableItem.setText(2, commandString); if (difference == DIFFERENCE_MINUS) tableItem.setForeground(new Color(getShell().getDisplay(), RGB_MINUS)); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/664efbbd6fd6dba5c4d118b10afe31ab34b6890a/KeysPreferencePage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/KeysPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1361,
653,
4021,
18628,
1388,
1435,
288,
202,
202,
2121,
18628,
19759,
4021,
18,
4479,
1595,
5621,
202,
202,
1884,
261,
3198,
2775,
273,
498,
4021,
18628,
18,
9838,
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,
225,
202,
1152,
918,
1361,
653,
4021,
18628,
1388,
1435,
288,
202,
202,
2121,
18628,
19759,
4021,
18,
4479,
1595,
5621,
202,
202,
1884,
261,
3198,
2775,
273,
498,
4021,
18628,
18,
9838,
5621,
... |
int s = o == runtime.getNil() ? 0 : (int) (RubyNumeric.num2long(o) & 0xffff); encodeShortLittleEndian(result, s); }}); | int s = o == runtime.getNil() ? 0 : (int) (RubyNumeric.num2long(o) & 0xffff); encodeShortLittleEndian(result, s); }}); | public void encode(IRuby runtime, IRubyObject o, StringBuffer result){ int s = o == runtime.getNil() ? 0 : (int) (RubyNumeric.num2long(o) & 0xffff); encodeShortLittleEndian(result, s); }}); | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/415b1e0db282c02d672a7e34a34a2bea0f69ccb2/Pack.java/clean/src/org/jruby/util/Pack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
2017,
12,
7937,
10340,
3099,
16,
15908,
10340,
921,
320,
16,
6674,
563,
15329,
2398,
202,
474,
272,
273,
320,
422,
3099,
18,
588,
12616,
1435,
692,
374,
294,
261,
474,
13,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
2017,
12,
7937,
10340,
3099,
16,
15908,
10340,
921,
320,
16,
6674,
563,
15329,
2398,
202,
474,
272,
273,
320,
422,
3099,
18,
588,
12616,
1435,
692,
374,
294,
261,
474,
13,
2... |
if ( propDefn.getTypeCode( ) != PropertyType.LIST_TYPE ) | if ( propDefn.getTypeCode( ) != IPropertyType.LIST_TYPE ) | protected void doSetProperty( PropertyDefn propDefn, Object valueToSet ) { assert valueToSet != null; if ( propDefn.getTypeCode( ) != PropertyType.LIST_TYPE ) { DesignParserException e = new DesignParserException( DesignParserException.DESIGN_EXCEPTION_WRONG_SIMPLE_LIST_TYPE ); handler.getErrorHandler( ).semanticError( e ); valid = false; return; } // Validate the value. assert valueToSet instanceof List; List valueList = new ArrayList( ); try { for ( int i = 0; i < ( (List) valueToSet ).size( ); i++ ) { String item = (String) ( (List) valueToSet ).get( i ); PropertyType type = propDefn.getSubType( ); Object propValue = type.validateXml( handler.getModule( ), propDefn, item ); if ( propValue != null ) valueList.add( i, propValue ); } } catch ( PropertyValueException ex ) { ex.setElement( element ); ex.setPropertyName( propDefn.getName( ) ); handlePropertyValueException( ex ); valid = false; return; } if ( !valueList.isEmpty( ) && !StyledElement.STYLE_PROP.equals( propDefn.getName( ) ) ) element.setProperty( propDefn, valueList ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d802c33711e0d111551ae23575895cd060f085b6/SimplePropertyListState.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/parser/SimplePropertyListState.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
694,
1396,
12,
4276,
3262,
82,
2270,
3262,
82,
16,
1033,
460,
25208,
262,
202,
95,
202,
202,
11231,
460,
25208,
480,
446,
31,
202,
202,
430,
261,
2270,
3262,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
741,
694,
1396,
12,
4276,
3262,
82,
2270,
3262,
82,
16,
1033,
460,
25208,
262,
202,
95,
202,
202,
11231,
460,
25208,
480,
446,
31,
202,
202,
430,
261,
2270,
3262,
82,
... |
noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); | noRadio = new JRadioButton( parent.langpack.getString("LicencePanel.notagree"), true); | public LicencePanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // We initialize our layout setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // We load the licence loadLicence(); // We put our components JLabel infoLabel = new JLabel(parent.langpack.getString("LicencePanel.info"), parent.icons.getImageIcon("history"), JLabel.TRAILING); add(infoLabel); add(Box.createRigidArea(new Dimension(0, 3))); textArea = new JTextArea(licence); textArea.setMargin(new Insets(2,2,2,2)); textArea.setCaretPosition(0); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); scroller = new JScrollPane(textArea); scroller.setAlignmentX(LEFT_ALIGNMENT); add(scroller); ButtonGroup group = new ButtonGroup(); yesRadio = new JRadioButton(parent.langpack.getString("LicencePanel.agree"), false); group.add(yesRadio); add(yesRadio); yesRadio.addActionListener(this); noRadio = new JRadioButton(parent.langpack.getString("LicencePanel.notagree"), true); group.add(noRadio); add(noRadio); noRadio.addActionListener(this); } | 28044 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28044/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/LicencePanel.java/clean/src/lib/com/izforge/izpack/panels/LicencePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
511,
335,
802,
5537,
12,
18678,
3219,
982,
16,
10284,
751,
612,
396,
13,
225,
288,
565,
2240,
12,
2938,
16,
612,
396,
1769,
565,
368,
1660,
4046,
3134,
3511,
565,
18479,
12,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
335,
802,
5537,
12,
18678,
3219,
982,
16,
10284,
751,
612,
396,
13,
225,
288,
565,
2240,
12,
2938,
16,
612,
396,
1769,
565,
368,
1660,
4046,
3134,
3511,
565,
18479,
12,
2704,... |
public void setValue(String[] stringValue) { _elementValues.put(value, stringValue); } | public void setValue(final String stringValue) { _elementValues.put(VALUE, stringValue); } | public void setValue(String[] stringValue) { _elementValues.put(value, stringValue); } //-- setValue | 57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/639ed93115321ad51c2450f306c4d50d146ede46/JAnnotation.java/buggy/src/main/java/org/exolab/javasource/JAnnotation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
5524,
12,
780,
8526,
19721,
13,
202,
95,
202,
202,
67,
2956,
1972,
18,
458,
12,
1132,
16,
19721,
1769,
202,
97,
368,
413,
5524,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
918,
5524,
12,
780,
8526,
19721,
13,
202,
95,
202,
202,
67,
2956,
1972,
18,
458,
12,
1132,
16,
19721,
1769,
202,
97,
368,
413,
5524,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
public void doTestTrap(String version, boolean newSuspectOnTrap) throws UnknownHostException, InterruptedException { setUpTrapHandler(newSuspectOnTrap); | public void doTestTrap(String version, boolean newSuspectOnTrap) { if (newSuspectOnTrap) { tearDown(); setUpTrapHandler(true); anticipateEvent("uei.opennms.org/internal/discovery/newSuspect"); } | public void doTestTrap(String version, boolean newSuspectOnTrap) throws UnknownHostException, InterruptedException { setUpTrapHandler(newSuspectOnTrap); Event snmpEvent = new Event(); snmpEvent.setInterface("127.0.0.1"); snmpEvent.setNodeid(0); snmpEvent.setUei("uei.opennms.org/default/trap"); System.out.println("Anticipating: " + new EventWrapper(snmpEvent)); m_anticipator.anticipateEvent(snmpEvent); if (version.equals("v1")) { SnmpPduTrap pdu = new SnmpPduTrap(); pdu.setGeneric(6); pdu.setSpecific(1); pdu.setAgentAddress(new SnmpIPAddress(InetAddress.getByName("127.0.0.1"))); m_trapHandler.snmpReceivedTrap(null, InetAddress.getByName("127.0.0.1"), 10000, new SnmpOctetString("public".getBytes()), pdu); } else if (version.equals("v2c")) { SnmpPduRequest pdu = new SnmpPduRequest(SnmpPduPacket.V2TRAP);// pdu.setGeneric(6);// pdu.setSpecific(1); m_trapHandler.snmpReceivedTrap(null, InetAddress.getByName("127.0.0.1"), 10000, new SnmpOctetString("public".getBytes()), pdu); } else { throw new UndeclaredThrowableException(null, "unsupported SNMP version for test: " + version); } finishUp(); } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/3dd7eec7d966bc726092ffc7f3b8c3e87d53ff48/TrapHandlerTest.java/clean/src/services/org/opennms/netmgt/trapd/TrapHandlerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
4709,
56,
1266,
12,
780,
1177,
16,
1250,
30826,
407,
1181,
1398,
56,
1266,
13,
1216,
30592,
16,
7558,
288,
202,
202,
542,
1211,
56,
1266,
1503,
12,
2704,
55,
407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
741,
4709,
56,
1266,
12,
780,
1177,
16,
1250,
30826,
407,
1181,
1398,
56,
1266,
13,
1216,
30592,
16,
7558,
288,
202,
202,
542,
1211,
56,
1266,
1503,
12,
2704,
55,
407,
... |
config.setURIResolver(new TransformerURIResolver(SaxonXQueryProcessor.this, pipelineContext, INPUT_DATA, true)); | config.setURIResolver(new TransformerURIResolver(SaxonXQueryProcessor.this, pipelineContext, INPUT_DATA, URLGenerator.DEFAULT_HANDLE_XINCLUDE)); | public void readImpl(final PipelineContext pipelineContext, ContentHandler contentHandler) { try { final Document dataDocument = readInputAsDOM4J(pipelineContext, INPUT_DATA); // Create XQuery configuration (depends on attributes input) final Configuration config = new Configuration(); { config.setErrorListener(new StringErrorListener(logger)); config.setURIResolver(new TransformerURIResolver(SaxonXQueryProcessor.this, pipelineContext, INPUT_DATA, true)); // Read attributes Map attributes = null; { // Read attributes input only if connected if (getConnectedInputs().get(INPUT_ATTRIBUTES) != null) { // Read input as an attribute Map and cache it attributes = (Map) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_ATTRIBUTES), new CacheableInputReader() { public Object read(PipelineContext context, ProcessorInput input) { Document preferencesDocument = readInputAsDOM4J(context, input); OXFPropertiesSerializer.PropertyStore propertyStore = OXFPropertiesSerializer.createPropertyStore(preferencesDocument); OXFProperties.PropertySet propertySet = propertyStore.getGlobalPropertySet(); return propertySet.getObjectMap(); } }); } } if (attributes != null) setConfigurationAttributes(config, attributes); } // Create static context final LocalStaticQueryContext staticContext = new LocalStaticQueryContext(config); // Create XQuery expression (depends on config input and static context) // TODO: caching of query must also depend on attributes input XQueryExpression xqueryExpression = (XQueryExpression) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_CONFIG), new CacheableInputReader() { public Object read(PipelineContext context, ProcessorInput input) { // Read XQuery into String final Document xqueryDocument = readCacheInputAsDOM4J(pipelineContext, INPUT_CONFIG); String xqueryBody; if (XMLConstants.XS_STRING_QNAME.equals(Dom4jUtils.extractAttributeValueQName(xqueryDocument.getRootElement(), XMLConstants.XSI_TYPE_QNAME))) { // Content is text under an XML root element xqueryBody = xqueryDocument.getRootElement().getStringValue(); } else { // Content is XQuery embedded into XML xqueryBody = Dom4jUtils.domToString(xqueryDocument); xqueryBody = xqueryBody.substring(xqueryBody.indexOf(">") + 1); xqueryBody = xqueryBody.substring(0, xqueryBody.lastIndexOf("<")); } // Add namespaces declarations final Map namespaces = new HashMap(); getDeclaredNamespaces(namespaces, xqueryDocument.getRootElement()); for (Iterator i = namespaces.keySet().iterator(); i.hasNext();) { String prefix = (String) i.next(); String uri = (String) namespaces.get(prefix); staticContext.declareActiveNamespace(prefix, uri); } try { return staticContext.compileQuery(xqueryBody); } catch (Exception e) { throw new OXFException(e); } } }); // Create dynamic context and run query DynamicQueryContext dynamicContext = new DynamicQueryContext(config); dynamicContext.setContextNode(staticContext.buildDocument(new DocumentSource(dataDocument))); // TODO: use xqueryExpression.getStaticContext() when Saxon is upgraded xqueryExpression.run(dynamicContext, new SAXResult(contentHandler), new Properties()); } catch (Exception e) { throw new OXFException(e); } } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/3fbd0bd00d823a0c55f659e5ff419597d5e2e29c/SaxonXQueryProcessor.java/buggy/src/java/org/orbeon/oxf/processor/transformer/SaxonXQueryProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
855,
2828,
12,
6385,
13671,
1042,
5873,
1042,
16,
3697,
1503,
913,
1503,
13,
288,
7734,
775,
288,
10792,
727,
4319,
501,
2519,
273,
855,
1210,
1463,
8168,
24,
46,
12,
14511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
855,
2828,
12,
6385,
13671,
1042,
5873,
1042,
16,
3697,
1503,
913,
1503,
13,
288,
7734,
775,
288,
10792,
727,
4319,
501,
2519,
273,
855,
1210,
1463,
8168,
24,
46,
12,
14511,
... |
DataTools.writeReverseInt(out, height*(width+pad)); | DataTools.writeReverseInt(out, channels*height*(width+pad)); | public void save(String id, Image image, boolean last) throws FormatException, IOException { if (image == null) { throw new FormatException("Image is null"); } BufferedImage img = ImageTools.makeBuffered(image); // get the width and height of the image int width = img.getWidth(); int height = img.getHeight(); // retrieve pixel data for this plane byte[] buf = ImageTools.getPixels(img, width, height); // reorder the scanlines // also need to check if the width is a multiple of 8 // if it is, great; if not, we need to pad each scanline with enough // bytes to make the width a multiple of 8 int pad = width % 4; pad = (4 - pad) % 4; byte[] temp = buf; buf = new byte[temp.length + height*pad]; int newScanline = height - 1; for (int oldScanline=0; oldScanline<height; oldScanline++) { System.arraycopy(temp, oldScanline*width, buf, newScanline*(width+pad), width); // add padding bytes for (int i=0; i<pad; i++) { buf[newScanline*(width+pad) + width + i] = 0; } newScanline--; } // invert each pixel // this will makes the colors look right in other readers (e.g. xine), // but needs to be reversed in QTReader for (int i=0; i<buf.length; i++) { buf[i] = (byte) (255 - buf[i]); } if (!id.equals(currentId)) { // -- write the header -- offsets = new Vector(); currentId = id; out = new RandomAccessFile(id, "rw"); created = (int) System.currentTimeMillis(); numWritten++; // -- write the first header -- DataTools.writeReverseInt(out, 8); DataTools.writeString(out, "wide"); // -- write the first plane of pixel data (mdat) -- numBytes = buf.length; byteCountOffset = out.getFilePointer(); DataTools.writeReverseInt(out, numBytes + 8); DataTools.writeString(out, "mdat"); out.write(buf); offsets.add(new Integer(16)); } else { // update the number of pixel bytes written int planeOffset = numBytes; numBytes += buf.length; out.seek(byteCountOffset); DataTools.writeReverseInt(out, numBytes + 8); // write this plane's pixel data out.seek(out.length()); out.write(buf); offsets.add(new Integer(planeOffset + 16)); numWritten++; } if (last) { int duration = numWritten * 50; int timeScale = 100; // -- write moov atom -- int atomLength = 685 + 8*numWritten; DataTools.writeReverseInt(out, atomLength); DataTools.writeString(out, "moov"); // -- write mvhd atom -- DataTools.writeReverseInt(out, 108); DataTools.writeString(out, "mvhd"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, created); // creation time DataTools.writeReverseInt(out, (int) System.currentTimeMillis()); DataTools.writeReverseInt(out, timeScale); // time scale DataTools.writeReverseInt(out, duration); // duration out.write(new byte[] {0, 1, 0, 0}); // preferred rate & volume out.write(new byte[] {0, -1, 0, 0, 0, 0, 0, 0, 0, 0}); // reserved // 3x3 matrix - unsure of significance DataTools.writeReverseInt(out, 1); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 1); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 16384); DataTools.writeReverseShort(out, 0); // not sure what this is DataTools.writeReverseInt(out, 0); // preview duration DataTools.writeReverseInt(out, 0); // preview time DataTools.writeReverseInt(out, 0); // poster time DataTools.writeReverseInt(out, 0); // selection time DataTools.writeReverseInt(out, 0); // selection duration DataTools.writeReverseInt(out, 0); // current time DataTools.writeReverseInt(out, 2); // next track's id // -- write trak atom -- atomLength -= 116; DataTools.writeReverseInt(out, atomLength); DataTools.writeString(out, "trak"); // -- write tkhd atom -- DataTools.writeReverseInt(out, 92); DataTools.writeString(out, "tkhd"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 15); // flags DataTools.writeReverseInt(out, created); // creation time DataTools.writeReverseInt(out, (int) System.currentTimeMillis()); DataTools.writeReverseInt(out, 1); // track id DataTools.writeReverseInt(out, 0); // reserved DataTools.writeReverseInt(out, duration); // duration DataTools.writeReverseInt(out, 0); // reserved DataTools.writeReverseInt(out, 0); // reserved DataTools.writeReverseShort(out, 0); // reserved DataTools.writeReverseInt(out, 0); // unknown // 3x3 matrix - unsure of significance DataTools.writeReverseInt(out, 1); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 1); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 0); DataTools.writeReverseInt(out, 16384); DataTools.writeReverseInt(out, width); // image width DataTools.writeReverseInt(out, height); // image height DataTools.writeReverseShort(out, 0); // reserved // -- write edts atom -- DataTools.writeReverseInt(out, 36); DataTools.writeString(out, "edts"); // -- write elst atom -- DataTools.writeReverseInt(out, 28); DataTools.writeString(out, "elst"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, 1); // number of entries in the table DataTools.writeReverseInt(out, duration); // duration DataTools.writeReverseShort(out, 0); // time DataTools.writeReverseInt(out, 1); // rate DataTools.writeReverseShort(out, 0); // unknown // -- write mdia atom -- atomLength -= 136; DataTools.writeReverseInt(out, atomLength); DataTools.writeString(out, "mdia"); // -- write mdhd atom -- DataTools.writeReverseInt(out, 32); DataTools.writeString(out, "mdhd"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, created); // creation time DataTools.writeReverseInt(out, (int) System.currentTimeMillis()); DataTools.writeReverseInt(out, timeScale); // time scale DataTools.writeReverseInt(out, duration); // duration DataTools.writeReverseShort(out, 0); // language DataTools.writeReverseShort(out, 0); // quality // -- write hdlr atom -- DataTools.writeReverseInt(out, 58); DataTools.writeString(out, "hdlr"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeString(out, "mhlr"); DataTools.writeString(out, "vide"); DataTools.writeString(out, "appl"); out.write(new byte[] {16, 0, 0, 0, 0, 1, 1, 11, 25}); DataTools.writeString(out, "Apple Video Media Handler"); // -- write minf atom -- atomLength -= 98; DataTools.writeReverseInt(out, atomLength); DataTools.writeString(out, "minf"); // -- write vmhd atom -- DataTools.writeReverseInt(out, 20); DataTools.writeString(out, "vmhd"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 1); // flags DataTools.writeReverseShort(out, 64); // graphics mode DataTools.writeReverseShort(out, 32768); // opcolor 1 DataTools.writeReverseShort(out, 32768); // opcolor 2 DataTools.writeReverseShort(out, 32768); // opcolor 3 // -- write hdlr atom -- DataTools.writeReverseInt(out, 57); DataTools.writeString(out, "hdlr"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeString(out, "dhlr"); DataTools.writeString(out, "alis"); DataTools.writeString(out, "appl"); out.write(new byte[] {16, 0, 0, 1, 0, 1, 1, 31, 24}); DataTools.writeString(out, "Apple Alias Data Handler"); // -- write dinf atom -- DataTools.writeReverseInt(out, 36); DataTools.writeString(out, "dinf"); // -- write dref atom -- DataTools.writeReverseInt(out, 28); DataTools.writeString(out, "dref"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseShort(out, 0); // version 2 DataTools.writeReverseShort(out, 1); // flags 2 out.write(new byte[] {0, 0, 0, 12}); DataTools.writeString(out, "alis"); DataTools.writeReverseShort(out, 0); // version 3 DataTools.writeReverseShort(out, 1); // flags 3 // -- write stbl atom -- atomLength -= 121; DataTools.writeReverseInt(out, atomLength); DataTools.writeString(out, "stbl"); // -- write stsd atom -- DataTools.writeReverseInt(out, 118); DataTools.writeString(out, "stsd"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, 1); // number of entries in the table out.write(new byte[] {0, 0, 0, 102}); DataTools.writeString(out, "raw "); // codec out.write(new byte[] {0, 0, 0, 0, 0, 0}); // reserved DataTools.writeReverseShort(out, 1); // data reference DataTools.writeReverseShort(out, 1); // version DataTools.writeReverseShort(out, 1); // revision DataTools.writeString(out, "appl"); DataTools.writeReverseInt(out, 0); // temporal quality DataTools.writeReverseInt(out, 768); // spatial quality DataTools.writeReverseShort(out, width); // image width DataTools.writeReverseShort(out, height); // image height out.write(new byte[] {0, 72, 0, 0}); // horizontal dpi out.write(new byte[] {0, 72, 0, 0}); // vertical dpi DataTools.writeReverseInt(out, 0); // data size DataTools.writeReverseShort(out, 1); // frames per sample DataTools.writeReverseShort(out, 12); // length of compressor name DataTools.writeString(out, "Uncompressed"); // compressor name DataTools.writeReverseInt(out, 40); // unknown DataTools.writeReverseInt(out, 40); // unknown DataTools.writeReverseInt(out, 40); // unknown DataTools.writeReverseInt(out, 40); // unknown DataTools.writeReverseInt(out, 40); // unknown DataTools.writeReverseShort(out, 40); // bits per pixel DataTools.writeReverseInt(out, 65535); // ctab ID out.write(new byte[] {12, 103, 97, 108}); // gamma out.write(new byte[] {97, 1, -52, -52, 0, 0, 0, 0}); // unknown // -- write stts atom -- DataTools.writeReverseInt(out, 24); DataTools.writeString(out, "stts"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, 1); // number of entries in the table DataTools.writeReverseInt(out, numWritten); // number of planes DataTools.writeReverseInt(out, 50); // duration // -- write stsc atom -- DataTools.writeReverseInt(out, 28); DataTools.writeString(out, "stsc"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, 1); // number of entries in the table DataTools.writeReverseInt(out, 1); // chunk DataTools.writeReverseInt(out, 1); // samples DataTools.writeReverseInt(out, 1); // id // -- write stsz atom -- DataTools.writeReverseInt(out, 20 + 4*numWritten); DataTools.writeString(out, "stsz"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, 0); // sample size DataTools.writeReverseInt(out, numWritten); // number of planes for (int i=0; i<numWritten; i++) { DataTools.writeReverseInt(out, height*(width+pad)); // sample size } // -- write stco atom -- DataTools.writeReverseInt(out, 16 + 4*numWritten); DataTools.writeString(out, "stco"); DataTools.writeReverseShort(out, 0); // version DataTools.writeReverseShort(out, 0); // flags DataTools.writeReverseInt(out, numWritten); // number of planes for (int i=0; i<numWritten; i++) { // write the plane offset DataTools.writeReverseInt(out, ((Integer) offsets.get(i)).intValue()); } out.close(); } } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/0e3a23a19ef051cea2a077fffdafbc561473d951/QTWriter.java/buggy/loci/formats/QTWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1923,
12,
780,
612,
16,
3421,
1316,
16,
1250,
1142,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
261,
2730,
422,
446,
13,
288,
1377,
604,
394,
4077,
503,
2932,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1923,
12,
780,
612,
16,
3421,
1316,
16,
1250,
1142,
13,
565,
1216,
4077,
503,
16,
1860,
225,
288,
565,
309,
261,
2730,
422,
446,
13,
288,
1377,
604,
394,
4077,
503,
2932,
2... |
.put( Style.COLOR_PROP, DesignSchemaConstants.COLOR_ATTRIB ); cssDictionary.put( Style.DISPLAY_PROP, | .put( IStyleModel.COLOR_PROP, DesignSchemaConstants.COLOR_ATTRIB ); cssDictionary.put( IStyleModel.DISPLAY_PROP, | private static void populateCSSDictionary( ) { cssDictionary.put( Style.BACKGROUND_ATTACHMENT_PROP, DesignSchemaConstants.BACKGROUND_ATTACHMENT_ATTRIB ); cssDictionary.put( Style.BACKGROUND_COLOR_PROP, DesignSchemaConstants.BACKGROUND_COLOR_ATTRIB ); cssDictionary.put( Style.BACKGROUND_IMAGE_PROP, DesignSchemaConstants.BACKGROUND_IMAGE_ATTRIB ); cssDictionary.put( Style.BACKGROUND_POSITION_X_PROP, DesignSchemaConstants.BACKGROUND_POSITION_X_ATTRIB ); cssDictionary.put( Style.BACKGROUND_POSITION_Y_PROP, DesignSchemaConstants.BACKGROUND_POSITION_Y_ATTRIB ); cssDictionary.put( Style.BACKGROUND_REPEAT_PROP, DesignSchemaConstants.BACKGROUND_REPEAT_ATTRIB ); cssDictionary.put( Style.BORDER_BOTTOM_COLOR_PROP, DesignSchemaConstants.BORDER_BOTTOM_COLOR_ATTRIB ); cssDictionary.put( Style.BORDER_BOTTOM_STYLE_PROP, DesignSchemaConstants.BORDER_BOTTOM_STYLE_ATTRIB ); cssDictionary.put( Style.BORDER_BOTTOM_WIDTH_PROP, DesignSchemaConstants.BORDER_BOTTOM_WIDTH_ATTRIB ); cssDictionary.put( Style.BORDER_LEFT_COLOR_PROP, DesignSchemaConstants.BORDER_LEFT_COLOR_ATTRIB ); cssDictionary.put( Style.BORDER_LEFT_STYLE_PROP, DesignSchemaConstants.BORDER_LEFT_STYLE_ATTRIB ); cssDictionary.put( Style.BORDER_LEFT_WIDTH_PROP, DesignSchemaConstants.BORDER_BOTTOM_WIDTH_ATTRIB ); cssDictionary.put( Style.BORDER_RIGHT_COLOR_PROP, DesignSchemaConstants.BORDER_RIGHT_COLOR_ATTRIB ); cssDictionary.put( Style.BORDER_RIGHT_STYLE_PROP, DesignSchemaConstants.BORDER_BOTTOM_STYLE_ATTRIB ); cssDictionary.put( Style.BORDER_RIGHT_WIDTH_PROP, DesignSchemaConstants.BORDER_BOTTOM_WIDTH_ATTRIB ); cssDictionary.put( Style.BORDER_TOP_COLOR_PROP, DesignSchemaConstants.BORDER_TOP_COLOR_ATTRIB ); cssDictionary.put( Style.BORDER_TOP_STYLE_PROP, DesignSchemaConstants.BORDER_TOP_STYLE_ATTRIB ); cssDictionary.put( Style.BORDER_TOP_WIDTH_PROP, DesignSchemaConstants.BORDER_TOP_WIDTH_ATTRIB ); cssDictionary.put( Style.CAN_SHRINK_PROP, DesignSchemaConstants.CAN_SHRINK_ATTRIB ); cssDictionary .put( Style.COLOR_PROP, DesignSchemaConstants.COLOR_ATTRIB ); cssDictionary.put( Style.DISPLAY_PROP, DesignSchemaConstants.SECTION_DISPLAY_ATTRIB ); cssDictionary.put( Style.FONT_FAMILY_PROP, DesignSchemaConstants.FONT_FAMILY_ATTRIB ); cssDictionary.put( Style.FONT_SIZE_PROP, DesignSchemaConstants.FONT_SIZE_ATTRIB ); cssDictionary.put( Style.FONT_STYLE_PROP, DesignSchemaConstants.FONT_STYLE_ATTRIB ); cssDictionary.put( Style.FONT_VARIANT_PROP, DesignSchemaConstants.FONT_VARIANT_ATTRIB ); cssDictionary.put( Style.FONT_WEIGHT_PROP, DesignSchemaConstants.FONT_WEIGHT_ATTRIB ); cssDictionary.put( Style.LETTER_SPACING_PROP, DesignSchemaConstants.TEXT_LETTER_SPACING_ATTRIB ); cssDictionary.put( Style.LINE_HEIGHT_PROP, DesignSchemaConstants.TEXT_LINE_HEIGHT_ATTRIB ); cssDictionary.put( Style.MARGIN_BOTTOM_PROP, DesignSchemaConstants.MARGIN_BOTTOM_ATTRIB ); cssDictionary.put( Style.MARGIN_LEFT_PROP, DesignSchemaConstants.MARGIN_LEFT_ATTRIB ); cssDictionary.put( Style.MARGIN_RIGHT_PROP, DesignSchemaConstants.MARGIN_RIGHT_ATTRIB ); cssDictionary.put( Style.MARGIN_TOP_PROP, DesignSchemaConstants.MARGIN_TOP_ATTRIB ); cssDictionary.put( Style.ORPHANS_PROP, DesignSchemaConstants.TEXT_ORPHANS_ATTRIB ); cssDictionary.put( Style.PADDING_BOTTOM_PROP, DesignSchemaConstants.PADDING_BOTTOM_ATTRIB ); cssDictionary.put( Style.PADDING_LEFT_PROP, DesignSchemaConstants.PADDING_LEFT_ATTRIB ); cssDictionary.put( Style.PADDING_RIGHT_PROP, DesignSchemaConstants.PADDING_RIGHT_ATTRIB ); cssDictionary.put( Style.PADDING_TOP_PROP, DesignSchemaConstants.PADDING_TOP_ATTRIB ); cssDictionary.put( Style.PAGE_BREAK_AFTER_PROP, DesignSchemaConstants.SECTION_PAGE_BREAK_AFTER_ATTRIB ); cssDictionary.put( Style.PAGE_BREAK_BEFORE_PROP, DesignSchemaConstants.SECTION_PAGE_BREAK_BEFORE_ATTRIB ); cssDictionary.put( Style.PAGE_BREAK_INSIDE_PROP, DesignSchemaConstants.SECTION_PAGE_BREAK_INSIDE_ATTRIB ); cssDictionary.put( Style.SHOW_IF_BLANK_PROP, DesignSchemaConstants.SECTION_SHOW_LF_BLANK_ATTRIB ); cssDictionary.put( Style.TEXT_ALIGN_PROP, DesignSchemaConstants.TEXT_ALIGN_ATTRIB ); cssDictionary.put( Style.TEXT_INDENT_PROP, DesignSchemaConstants.TEXT_INDENT_ATTRIB ); cssDictionary.put( Style.TEXT_LINE_THROUGH_PROP, DesignSchemaConstants.TEXT_LINE_THROUGH_ATTRIB ); cssDictionary.put( Style.TEXT_OVERLINE_PROP, DesignSchemaConstants.TEXT_OVERLINE_ATTRIB ); cssDictionary.put( Style.TEXT_TRANSFORM_PROP, DesignSchemaConstants.TEXT_TRANSFORM_ATTRIB ); cssDictionary.put( Style.TEXT_UNDERLINE_PROP, DesignSchemaConstants.TEXT_UNDERLINE_ATTRIB ); cssDictionary.put( Style.VERTICAL_ALIGN_PROP, DesignSchemaConstants.TEXT_VERTICAL_ALIGN_ATTRIB ); cssDictionary.put( Style.WHITE_SPACE_PROP, DesignSchemaConstants.TEXT_WHITE_SPACE_ATTRIB ); cssDictionary.put( Style.WIDOWS_PROP, DesignSchemaConstants.TEXT_WIDOWS_ATTRIB ); cssDictionary.put( Style.WORD_SPACING_PROP, DesignSchemaConstants.TEXT_WORD_SPACING_ATTRIB ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/d802c33711e0d111551ae23575895cd060f085b6/Style.java/buggy/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/Style.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
6490,
10276,
10905,
12,
262,
202,
95,
202,
202,
5212,
10905,
18,
458,
12,
9767,
18,
8720,
20166,
67,
789,
9833,
1792,
3212,
67,
15811,
16,
9506,
202,
15478,
3078,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
6490,
10276,
10905,
12,
262,
202,
95,
202,
202,
5212,
10905,
18,
458,
12,
9767,
18,
8720,
20166,
67,
789,
9833,
1792,
3212,
67,
15811,
16,
9506,
202,
15478,
3078,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.