rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
tokenPropList = new ArrayList();
tokenPropList = null;
public void loadWordPerLineFile(TextBase base, File file) throws IOException, FileNotFoundException { this.tokenizer = new Tokenizer(Tokenizer.SPLIT, " "); if (labels == null) labels = new BasicTextLabels(base); String id = file.getName(); LineNumberReader in = new LineNumberReader(new FileReader(file)); String line; this.textBase = base; StringBuffer buf = new StringBuffer(""); int docNum = 1, start = 0, end = 0; curDocID = id + "-" + docNum; spanList = new ArrayList(); tokenPropList = new ArrayList(); while((line = in.readLine()) != null) { String[] words = line.split("\\s"); if(!(words[0].equals("-DOCSTART-"))) { if(words.length > 2) { start = buf.length(); buf.append(words[0]+" "); end = buf.length()-1; tokenPropList.add(words[1]); if(!words[3].equals("O")) spanList.add(new CharSpan(start,end,words[3],curDocID)); } }else { this.tokenizer = new Tokenizer(Tokenizer.SPLIT, " "); addDocument(buf.toString()); spanList = new ArrayList(); tokenPropList = new ArrayList(); buf = new StringBuffer(""); docNum++; curDocID = id + "-" + docNum; } } in.close(); }
51753 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51753/884e926b745d648e6a60663326e4dd5499849fae/TextBaseLoader.java/clean/src/edu/cmu/minorthird/text/TextBaseLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1262, 3944, 2173, 1670, 812, 12, 1528, 2171, 1026, 16, 1387, 585, 13, 1216, 1860, 16, 13707, 565, 288, 202, 2211, 18, 2316, 1824, 273, 394, 26702, 12, 10524, 18, 17482, 16, 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, 1071, 918, 1262, 3944, 2173, 1670, 812, 12, 1528, 2171, 1026, 16, 1387, 585, 13, 1216, 1860, 16, 13707, 565, 288, 202, 2211, 18, 2316, 1824, 273, 394, 26702, 12, 10524, 18, 17482, 16, 3...
* Add parameters into instance option for ( int i = 0; i < paramDefns.size( ); i++ ) { option.addOption( new Integer( i ).toString( ), "param" + i, true, "" ); }
option.addOption("p", "parameter", true, "parameter"); option.addOption("F", "file", true, "parameter file"); BasicParser parser = new BasicParser( ); CommandLine results = null;
protected HashMap parseParameters( ArrayList paramDefns ) { HashMap params = new HashMap( ); /*BasicParser parser = new BasicParser( ); * Add parameters into instance option for ( int i = 0; i < paramDefns.size( ); i++ ) { option.addOption( new Integer( i ).toString( ), "param" + i, //$NON-NLS-1$ true, "" ); //$NON-NLS-1$ } try { CommandLine results = parser.parse( option, args, false ); //add the parameter values into the param hash map. for ( int i = 0; i < paramDefns.size( ); i++ ) { IScalarParameterDefn paramHandle = (IScalarParameterDefn) paramDefns .get( i ); String paramName = paramHandle.getName( ); assert paramName != null; Object result = null; if ( results.hasOption( new Integer( i ).toString( ) ) ) { result = results.getOptionValue( "param" + i ); //$NON-NLS-1$ } if ( result == null ) { result = paramHandle.getDefaultValue( ); if ( ( result != null ) && ( result.equals( "" ) ) ) //$NON-NLS-1$ { result = null; } } if ( result != null ) { int type = paramHandle.getType( ); if ( type == IParameterDefn.TYPE_BOOLEAN ) { result = new Boolean( (String) result ); } params.put( paramName, result ); } } } catch ( org.apache.commons.cli.ParseException pe ) { logger.log( Level.SEVERE, "CLI parseException " + pe.getMessage( ), pe ); //$NON-NLS-1$ }*/ return params; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e6cd170d84a9ed2d8f1343b14a90fdd7a8d57a33/ReportRunner.java/clean/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/ReportRunner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1117, 4317, 1109, 2402, 12, 2407, 579, 3262, 2387, 262, 202, 202, 95, 1082, 202, 8658, 859, 273, 394, 4317, 12, 11272, 1082, 202, 20308, 8252, 2678, 2082, 273, 394, 7651, 2678, 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, 3196, 202, 1117, 4317, 1109, 2402, 12, 2407, 579, 3262, 2387, 262, 202, 202, 95, 1082, 202, 8658, 859, 273, 394, 4317, 12, 11272, 1082, 202, 20308, 8252, 2678, 2082, 273, 394, 7651, 2678, 12, ...
if (result.isError() || gb.length != bytes.limit()) {
if (gb.length != bytes.limit()) {
public void TestAPISemantics(/*String encoding*/) throws Exception { int rc; ByteBuffer gbval = ByteBuffer.wrap(gb); CharBuffer uniVal = CharBuffer.wrap(unistr); rc = 0; decoder.reset(); /* Convert the whole buffer to Unicode */ try { CharBuffer chars = CharBuffer.allocate(unistr.length()); CoderResult result = decoder.decode(gbval, chars, false); if (result.isError()) { errln("ToChars encountered Error"); rc = 1; } if (!equals(chars, unistr)) { errln("ToChars does not match"); printchars(chars); errln("Expected : "); printchars(unistr); rc = 2; } } catch (Exception e) { errln("ToChars - exception in buffer"); rc = 5; } /* Convert single bytes to Unicode */ try { CharBuffer chars = CharBuffer.allocate(unistr.length()); ByteBuffer b = ByteBuffer.allocate(1); decoder.reset(); byte[] temp = new byte[1]; CoderResult result=null; for (int i = 0; i < gb.length; i++) { b.rewind(); temp[0] = gb[i]; b.put(temp); b.rewind(); result = decoder.decode(b, chars, false); } if (result.isError() || unistr.length() != (chars.limit())) { errln("ToChars single len does not match"); rc = 3; } if (!equals(chars, unistr)) { errln("ToChars single does not match"); printchars(chars); rc = 4; } } catch (Exception e) { errln("ToChars - exception in single"); e.printStackTrace(System.err); rc = 6; } /* Convert the buffer one at a time to Unicode */ try { CharBuffer chars = CharBuffer.allocate(unistr.length()); decoder.reset(); for (int i = 0; i <= gb.length; i++) { gbval.limit(i); CoderResult result = decoder.decode(gbval, chars, false); if (result.isError()) { errln("Error while decoding -- FAILED"); } } if (chars.limit() != unistr.length()) { errln("ToChars Simple buffer len does not match"); rc = 7; } if (!equals(chars, unistr)) { errln("ToChars Simple buffer does not match"); printchars(chars); err(" Expected : "); printchars(unistr); rc = 8; } } catch (Exception e) { errln("ToChars - exception in single buffer"); e.printStackTrace(System.err); rc = 9; } if (rc != 0) { errln("Test Simple ToChars for encoding : FAILED"); } rc = 0; /* Convert the whole buffer from unicode */ try { ByteBuffer bytes = ByteBuffer.allocate(gb.length); encoder.reset(); CoderResult result = encoder.encode(uniVal, bytes, false); if (result.isError()) { errln("FromChars reported error: " + result.toString()); rc = 1; } if (!bytes.equals(gbval)) { errln("FromChars does not match"); printbytes(bytes); rc = 2; } } catch (Exception e) { errln("FromChars - exception in buffer"); e.printStackTrace(System.err); rc = 5; } /* Convert the buffer one char at a time to unicode */ try { ByteBuffer bytes = ByteBuffer.allocate(gb.length); CharBuffer c = CharBuffer.allocate(1); encoder.reset(); char[] temp = new char[1]; CoderResult result= null; for (int i = 0; i < unistr.length(); i++) { temp[0] = unistr.charAt(i); c.put(temp); c.rewind(); result = encoder.encode(c, bytes, false); c.rewind(); } if (result.isError() || gb.length != bytes.limit()) { errln("FromChars single len does not match"); rc = 3; } if (!bytes.equals(gbval)) { errln("FromChars single does not match"); printbytes(bytes); rc = 4; } } catch (Exception e) { errln("FromChars - exception in single"); e.printStackTrace(System.err); rc = 6; } /* Convert one char at a time to unicode */ try { ByteBuffer bytes = ByteBuffer.allocate(gb.length); encoder.reset(); char[] temp = unistr.toCharArray(); CoderResult result=null; for (int i = 0; i <= temp.length; i++) { uniVal.limit(i); result = encoder.encode(uniVal, bytes, false); } if (result.isError() || bytes.limit() != gb.length) { errln("FromChars Simple len does not match"); rc = 7; } if (!bytes.equals(gbval)) { errln("FromChars Simple does not match"); printbytes(bytes); rc = 8; } } catch (Exception e) { errln("FromChars - exception in single buffer"); e.printStackTrace(System.err); rc = 9; } if (rc != 0) { errln("--Test Simple FromChars " + encoding + " --FAILED"); } }
7297 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7297/7e16442b3bbb42d882c9434652f7c9516c01ddf9/TestCharset.java/clean/src/classes/com/ibm/icu4jni/test/charset/TestCharset.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 7766, 2557, 13185, 11119, 12, 20308, 780, 2688, 5549, 13, 1171, 1216, 1185, 288, 202, 202, 474, 4519, 31, 202, 202, 12242, 21649, 1125, 273, 7400, 18, 4113, 12, 4490, 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, 225, 202, 482, 918, 7766, 2557, 13185, 11119, 12, 20308, 780, 2688, 5549, 13, 1171, 1216, 1185, 288, 202, 202, 474, 4519, 31, 202, 202, 12242, 21649, 1125, 273, 7400, 18, 4113, 12, 4490, 1769,...
AST tmp1077_AST_in = (AST)_t;
AST tmp1078_AST_in = (AST)_t;
public final void defineframestate(AST _t) throws RecognitionException { AST defineframestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST def = null; AST id = null; AST __t463 = _t; def = _t==ASTNULL ? null :(AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case FRAME: case PRIVATE: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: { AST tmp1077_AST_in = (AST)_t; match(_t,PRIVATE); _t = _t.getNextSibling(); break; } case FRAME: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp1078_AST_in = (AST)_t; match(_t,FRAME); _t = _t.getNextSibling(); id = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); if ( inputState.guessing==0 ) { action.frameDef(def, id); } { _loop467: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { form_item(_t,CQ.SYMBOL); _t = _retTree; } else { break _loop467; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HEADER: { AST __t469 = _t; AST tmp1079_AST_in = (AST)_t; match(_t,HEADER); _t = _t.getFirstChild(); { int _cnt471=0; _loop471: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt471>=1 ) { break _loop471; } else {throw new NoViableAltException(_t);} } _cnt471++; } while (true); } _t = __t469; _t = _t.getNextSibling(); break; } case BACKGROUND: { AST __t472 = _t; AST tmp1080_AST_in = (AST)_t; match(_t,BACKGROUND); _t = _t.getFirstChild(); { int _cnt474=0; _loop474: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt474>=1 ) { break _loop474; } else {throw new NoViableAltException(_t);} } _cnt474++; } while (true); } _t = __t472; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case EXCEPT: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: { AST __t476 = _t; AST tmp1081_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { _loop478: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { fld1(_t,CQ.SYMBOL); _t = _retTree; } else { break _loop478; } } while (true); } _t = __t476; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; if ( inputState.guessing==0 ) { action.frameStatementEnd(); } _t = __t463; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/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, 4426, 74, 1940, 395, 340, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 4426, 74, 1940, 395, 340, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 4426, 74, 1940, 395, 340, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 4426, 74, 1940, 395, 340, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, ...
+ ( (ComputedColumnHandle) element ).getExpression( );
+ ( (ComputedColumnHandle) element ).getExpression( );
public String getTooltipText( Object element ) { if ( element instanceof Operator ) { return ( (Operator) element ).tooltip; } else if ( element instanceof ILocalizableInfo[] ) { return ( (ILocalizableInfo[]) element )[1].getToolTip( ); } else if ( element instanceof ComputedColumnHandle ) { return TOOLTIP_BINDING_PREFIX + ( (ComputedColumnHandle) element ).getExpression( ); //$NON-NLS-1$ } return getDisplayText( element ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/7abff9adc2e1dbe666760f0a31e9fbb30e31cf0e/ExpressionProvider.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ExpressionProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 19478, 8440, 1528, 12, 1033, 930, 262, 202, 95, 202, 202, 430, 261, 930, 1276, 11097, 262, 202, 202, 95, 1082, 202, 2463, 261, 261, 5592, 13, 930, 262, 18, 19798, 31, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 19478, 8440, 1528, 12, 1033, 930, 262, 202, 95, 202, 202, 430, 261, 930, 1276, 11097, 262, 202, 202, 95, 1082, 202, 2463, 261, 261, 5592, 13, 930, 262, 18, 19798, 31, 2...
return toLocale_helper(this.date, localeDateFormatter);
return toLocale_helper(date, localeDateFormatter);
private String jsFunction_toLocaleDateString() { if (localeDateFormatter == null) localeDateFormatter = DateFormat.getDateInstance(DateFormat.LONG); return toLocale_helper(this.date, localeDateFormatter); }
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/dbefc5595ba41854ec04751abfc8db52f70a5796/NativeDate.java/buggy/src/org/mozilla/javascript/NativeDate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 3828, 2083, 67, 869, 3916, 1626, 780, 1435, 288, 3639, 309, 261, 6339, 1626, 5074, 422, 446, 13, 5411, 2573, 1626, 5074, 273, 18371, 18, 588, 1626, 1442, 12, 11878, 18, 14639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 514, 3828, 2083, 67, 869, 3916, 1626, 780, 1435, 288, 3639, 309, 261, 6339, 1626, 5074, 422, 446, 13, 5411, 2573, 1626, 5074, 273, 18371, 18, 588, 1626, 1442, 12, 11878, 18, 14639, ...
private RouteList getRouteList() {
private synchronized RouteList getRouteList() {
private RouteList getRouteList() { if (LogWriter.needsLogging) sipStack.logWriter.logMessage("getRouteList " + this); // Find the top via in the route list. ListIterator li = routeList.listIterator(routeList.size()); boolean flag = true; RouteList retval = new RouteList(); while (li.hasPrevious()) { Route route = (Route) li.previous(); String host = ((SipUri) route.getAddress().getURI()).getHost(); int port = ((SipUri) route.getAddress().getURI()).getPort(); if (port == -1) port = 5060; String transport = ((SipUri) route.getAddress().getURI()).getTransportParam(); String sh = this.sipStack.getHostAddress(); int tp = this.firstTransaction.getPort(); if (flag && sh.equalsIgnoreCase(host) && port == tp) { flag = false; } else retval.addFirst(route.clone()); } // If I am a UA then I am not record routing the request. if (flag) { retval = new RouteList(); li = routeList.listIterator(); while (li.hasNext()) { Route route = (Route) li.next(); retval.add(route.clone()); } } if (LogWriter.needsLogging) { sipStack.logWriter.logMessage("----- "); sipStack.logWriter.logMessage("getRouteList for " + this); if (retval != null) sipStack.logWriter.logMessage("RouteList = " + retval.encode()); sipStack.logWriter.logMessage( "myRouteList = " + routeList.encode()); sipStack.logWriter.logMessage("----- "); } return retval; }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/e3c1e25acf20ecd3b5d346f320727b0f8094e744/DialogImpl.java/clean/trunk/src/gov/nist/javax/sip/stack/DialogImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 5179, 682, 13245, 682, 1435, 288, 202, 202, 430, 261, 1343, 2289, 18, 20600, 7735, 13, 1082, 202, 28477, 2624, 18, 1330, 2289, 18, 1330, 1079, 2932, 588, 3255, 682, 315, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5179, 682, 13245, 682, 1435, 288, 202, 202, 430, 261, 1343, 2289, 18, 20600, 7735, 13, 1082, 202, 28477, 2624, 18, 1330, 2289, 18, 1330, 1079, 2932, 588, 3255, 682, 315, 397, ...
case 627:
case 626:
public void ruleAction(int ruleNumber) { switch (ruleNumber) { // // Rule 1: TypeName ::= TypeName . ErrorId // case 1: { //#line 6 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name TypeName = (Name) getRhsSym(1); //#line 8 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, "*")); break; } // // Rule 2: PackageName ::= PackageName . ErrorId // case 2: { //#line 16 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageName = (Name) getRhsSym(1); //#line 18 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, "*")); break; } // // Rule 3: ExpressionName ::= AmbiguousName . ErrorId // case 3: { //#line 26 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 28 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 4: MethodName ::= AmbiguousName . ErrorId // case 4: { //#line 36 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 38 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 5: PackageOrTypeName ::= PackageOrTypeName . ErrorId // case 5: { //#line 46 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 48 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, "*")); break; } // // Rule 6: AmbiguousName ::= AmbiguousName . ErrorId // case 6: { //#line 56 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 58 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, "*")); break; } // // Rule 7: FieldAccess ::= Primary . ErrorId // case 7: { //#line 66 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 68 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(), Primary, "*")); break; } // // Rule 8: FieldAccess ::= super . ErrorId // case 8: { //#line 73 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), "*")); break; } // // Rule 9: FieldAccess ::= ClassName . super$sup . ErrorId // case 9: { //#line 76 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 76 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 78 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), "*")); break; } // // Rule 10: MethodInvocation ::= MethodPrimaryPrefix ( ArgumentListopt ) // case 10: { //#line 82 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodPrimaryPrefix = (Object) getRhsSym(1); //#line 82 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 84 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) ((Object[]) MethodPrimaryPrefix)[0]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodPrimaryPrefix)[1]; setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 11: MethodInvocation ::= MethodSuperPrefix ( ArgumentListopt ) // case 11: { //#line 89 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier MethodSuperPrefix = (polyglot.lex.Identifier) getRhsSym(1); //#line 89 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 91 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" polyglot.lex.Identifier identifier = MethodSuperPrefix; setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 12: MethodInvocation ::= MethodClassNameSuperPrefix ( ArgumentListopt ) // case 12: { //#line 95 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object MethodClassNameSuperPrefix = (Object) getRhsSym(1); //#line 95 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 97 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) ((Object[]) MethodClassNameSuperPrefix)[0]; JPGPosition super_pos = (JPGPosition) ((Object[]) MethodClassNameSuperPrefix)[1]; polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) ((Object[]) MethodClassNameSuperPrefix)[2]; setResult(nf.Call(pos(), nf.Super(super_pos, ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 13: MethodPrimaryPrefix ::= Primary . ErrorId$ErrorId // case 13: { //#line 104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Expr Primary = (Expr) getRhsSym(1); //#line 104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 106 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[2]; a[0] = Primary; a[1] = id(getRhsFirstTokenIndex(3)); setResult(a); break; } // // Rule 14: MethodSuperPrefix ::= super . ErrorId$ErrorId // case 14: { //#line 112 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(3); //#line 114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" setResult(id(getRhsFirstTokenIndex(3))); break; } // // Rule 15: MethodClassNameSuperPrefix ::= ClassName . super$sup . ErrorId$ErrorId // case 15: { //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Name ClassName = (Name) getRhsSym(1); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken sup = (IToken) getRhsIToken(3); //#line 117 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" IToken ErrorId = (IToken) getRhsIToken(5); //#line 119 "C:/eclipse/ws6/x10.compiler/src/x10/parser/MissingId.gi" Object[] a = new Object[3]; a[0] = ClassName; a[1] = pos(getRhsFirstTokenIndex(3)); a[2] = id(getRhsFirstTokenIndex(5)); setResult(a); break; } // // Rule 16: identifier ::= IDENTIFIER$ident // case 16: { //#line 94 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken ident = (IToken) getRhsIToken(1); //#line 96 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ident.setKind(X10Parsersym.TK_IDENTIFIER); setResult(id(getRhsFirstTokenIndex(1))); break; } // // Rule 19: IntegralType ::= byte // case 19: { //#line 121 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 20: IntegralType ::= char // case 20: { //#line 126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 21: IntegralType ::= short // case 21: { //#line 131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 22: IntegralType ::= int // case 22: { //#line 136 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 23: IntegralType ::= long // case 23: { //#line 141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 24: FloatingPointType ::= float // case 24: { //#line 147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 25: FloatingPointType ::= double // case 25: { //#line 152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 28: TypeName ::= identifier // case 28: { //#line 175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 177 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 29: TypeName ::= TypeName . identifier // case 29: { //#line 180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(1); //#line 180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 182 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), TypeName, identifier.getIdentifier())); break; } // // Rule 31: ArrayType ::= Type [ ] // case 31: { //#line 194 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 196 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.array(Type, pos(), 1)); break; } // // Rule 32: PackageName ::= identifier // case 32: { //#line 241 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 243 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 33: PackageName ::= PackageName . identifier // case 33: { //#line 246 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageName = (Name) getRhsSym(1); //#line 246 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 248 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageName, identifier.getIdentifier())); break; } // // Rule 34: ExpressionName ::= identifier // case 34: { //#line 262 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 264 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 35: ExpressionName ::= AmbiguousName . identifier // case 35: { //#line 267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 269 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 36: MethodName ::= identifier // case 36: { //#line 277 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 279 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 37: MethodName ::= AmbiguousName . identifier // case 37: { //#line 282 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 282 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 284 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 38: PackageOrTypeName ::= identifier // case 38: { //#line 292 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 294 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= PackageOrTypeName . identifier // case 39: { //#line 297 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(1); //#line 297 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 299 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), PackageOrTypeName, identifier.getIdentifier())); break; } // // Rule 40: AmbiguousName ::= identifier // case 40: { //#line 307 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 309 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= AmbiguousName . identifier // case 41: { //#line 312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name AmbiguousName = (Name) getRhsSym(1); //#line 312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 314 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(getLeftSpan(), getRightSpan()), AmbiguousName, identifier.getIdentifier())); break; } // // Rule 42: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 42: { //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" PackageNode PackageDeclarationopt = (PackageNode) getRhsSym(1); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarationsopt = (List) getRhsSym(2); //#line 324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarationsopt = (List) getRhsSym(3); //#line 326 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); int token_pos = (ImportDeclarationsopt.size() == 0 ? TypeDeclarationsopt.size() == 0 ? super.getSize() - 1 : getPrevious(getRhsFirstTokenIndex(3)) : getRhsLastTokenIndex(2) ); Import x10LangImport = nf.Import(pos(token_pos), Import.PACKAGE, x10Lang.toString()); ImportDeclarationsopt.add(x10LangImport); setResult(nf.SourceFile(pos(getLeftSpan(), getRightSpan()), PackageDeclarationopt, ImportDeclarationsopt, TypeDeclarationsopt)); break; } // // Rule 43: ImportDeclarations ::= ImportDeclaration // case 43: { //#line 342 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(1); //#line 344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Import.class, false); l.add(ImportDeclaration); setResult(l); break; } // // Rule 44: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 44: { //#line 349 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ImportDeclarations = (List) getRhsSym(1); //#line 349 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Import ImportDeclaration = (Import) getRhsSym(2); //#line 351 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (ImportDeclaration != null) ImportDeclarations.add(ImportDeclaration); //setResult(l); break; } // // Rule 45: TypeDeclarations ::= TypeDeclaration // case 45: { //#line 357 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(1); //#line 359 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); if (TypeDeclaration != null) l.add(TypeDeclaration); setResult(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 46: { //#line 365 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List TypeDeclarations = (List) getRhsSym(1); //#line 365 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl TypeDeclaration = (ClassDecl) getRhsSym(2); //#line 367 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (TypeDeclaration != null) TypeDeclarations.add(TypeDeclaration); //setResult(l); break; } // // Rule 49: SingleTypeImportDeclaration ::= import TypeName ; // case 49: { //#line 380 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name TypeName = (Name) getRhsSym(2); //#line 382 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.CLASS, TypeName.toString())); break; } // // Rule 50: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 50: { //#line 386 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name PackageOrTypeName = (Name) getRhsSym(2); //#line 388 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Import(pos(getLeftSpan(), getRightSpan()), Import.PACKAGE, PackageOrTypeName.toString())); break; } // // Rule 53: TypeDeclaration ::= ; // case 53: { //#line 402 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(null); break; } // // Rule 56: ClassModifiers ::= ClassModifiers ClassModifier // case 56: { //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifiers = (Flags) getRhsSym(1); //#line 414 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ClassModifier = (Flags) getRhsSym(2); //#line 416 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassModifiers.set(ClassModifier)); break; } // // Rule 57: ClassModifier ::= public // case 57: { //#line 424 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 58: ClassModifier ::= protected // case 58: { //#line 429 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 59: ClassModifier ::= private // case 59: { //#line 434 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 60: ClassModifier ::= abstract // case 60: { //#line 439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 61: ClassModifier ::= static // case 61: { //#line 444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 62: ClassModifier ::= final // case 62: { //#line 449 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 63: ClassModifier ::= strictfp // case 63: { //#line 454 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 64: Super ::= extends ClassType // case 64: { //#line 466 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ClassType = (TypeNode) getRhsSym(2); //#line 468 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ClassType); break; } // // Rule 65: Interfaces ::= implements InterfaceTypeList // case 65: { //#line 477 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(2); //#line 479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceTypeList); break; } // // Rule 66: InterfaceTypeList ::= InterfaceType // case 66: { //#line 483 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(1); //#line 485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 67: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 67: { //#line 490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceTypeList = (List) getRhsSym(1); //#line 490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 492 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceTypeList.add(InterfaceType); setResult(InterfaceTypeList); break; } // // Rule 68: ClassBody ::= { ClassBodyDeclarationsopt } // case 68: { //#line 502 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarationsopt = (List) getRhsSym(2); //#line 504 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(getLeftSpan(), getRightSpan()), ClassBodyDeclarationsopt)); break; } // // Rule 70: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 70: { //#line 509 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclarations = (List) getRhsSym(1); //#line 509 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ClassBodyDeclaration = (List) getRhsSym(2); //#line 511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassBodyDeclarations.addAll(ClassBodyDeclaration); // setResult(a); break; } // // Rule 72: ClassBodyDeclaration ::= InstanceInitializer // case 72: { //#line 517 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block InstanceInitializer = (Block) getRhsSym(1); //#line 519 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.NONE, InstanceInitializer)); setResult(l); break; } // // Rule 73: ClassBodyDeclaration ::= StaticInitializer // case 73: { //#line 524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block StaticInitializer = (Block) getRhsSym(1); //#line 526 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(nf.Initializer(pos(), Flags.STATIC, StaticInitializer)); setResult(l); break; } // // Rule 74: ClassBodyDeclaration ::= ConstructorDeclaration // case 74: { //#line 531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ConstructorDecl ConstructorDeclaration = (ConstructorDecl) getRhsSym(1); //#line 533 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ConstructorDeclaration); setResult(l); break; } // // Rule 76: ClassMemberDeclaration ::= MethodDeclaration // case 76: { //#line 540 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodDeclaration = (MethodDecl) getRhsSym(1); //#line 542 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(MethodDeclaration); setResult(l); break; } // // Rule 77: ClassMemberDeclaration ::= ClassDeclaration // case 77: { //#line 547 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 549 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 78: ClassMemberDeclaration ::= InterfaceDeclaration // case 78: { //#line 554 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 556 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 79: ClassMemberDeclaration ::= ; // case 79: { //#line 563 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); setResult(l); break; } // // Rule 80: VariableDeclarators ::= VariableDeclarator // case 80: { //#line 571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(1); //#line 573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(VariableDeclarator); setResult(l); break; } // // Rule 81: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 81: { //#line 578 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(1); //#line 578 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VarDeclarator VariableDeclarator = (VarDeclarator) getRhsSym(3); //#line 580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclarators.add(VariableDeclarator); // setResult(VariableDeclarators); break; } // // Rule 83: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 83: { //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 586 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 588 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableDeclaratorId.init = VariableInitializer; VariableDeclaratorId.position(pos()); // setResult(VariableDeclaratorId); break; } // // Rule 84: TraditionalVariableDeclaratorId ::= identifier // case 84: { //#line 594 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 596 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier())); break; } // // Rule 85: TraditionalVariableDeclaratorId ::= TraditionalVariableDeclaratorId [ ] // case 85: { //#line 599 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator TraditionalVariableDeclaratorId = (X10VarDeclarator) getRhsSym(1); //#line 601 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TraditionalVariableDeclaratorId.dims++; TraditionalVariableDeclaratorId.position(pos()); // setResult(a); break; } // // Rule 87: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 87: { //#line 608 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 608 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(3); //#line 610 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), identifier.getIdentifier(), IdentifierList)); break; } // // Rule 88: VariableDeclaratorId ::= [ IdentifierList ] // case 88: { //#line 613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List IdentifierList = (List) getRhsSym(2); //#line 615 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new X10VarDeclarator(pos(), IdentifierList)); break; } // // Rule 92: FieldModifiers ::= FieldModifiers FieldModifier // case 92: { //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifiers = (Flags) getRhsSym(1); //#line 623 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags FieldModifier = (Flags) getRhsSym(2); //#line 625 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(FieldModifiers.set(FieldModifier)); break; } // // Rule 93: FieldModifier ::= public // case 93: { //#line 633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 94: FieldModifier ::= protected // case 94: { //#line 638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 95: FieldModifier ::= private // case 95: { //#line 643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 96: FieldModifier ::= static // case 96: { //#line 648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 97: FieldModifier ::= final // case 97: { //#line 653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 98: FieldModifier ::= transient // case 98: { //#line 658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.TRANSIENT); break; } // // Rule 99: MethodDeclaration ::= MethodHeader MethodBody // case 99: { //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl MethodHeader = (MethodDecl) getRhsSym(1); //#line 667 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block MethodBody = (Block) getRhsSym(2); //#line 669 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" JPGPosition old_pos = (JPGPosition) MethodHeader.position(); setResult(MethodHeader.body(MethodBody) .position(pos(old_pos.getLeftIToken().getTokenIndex(), getRightSpan()))); break; } // // Rule 101: ResultType ::= void // case 101: { //#line 680 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 102: FormalParameterList ::= LastFormalParameter // case 102: { //#line 700 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(1); //#line 702 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(LastFormalParameter); setResult(l); break; } // // Rule 103: FormalParameterList ::= FormalParameters , LastFormalParameter // case 103: { //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Formal LastFormalParameter = (Formal) getRhsSym(3); //#line 709 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(LastFormalParameter); // setResult(FormalParameters); break; } // // Rule 104: FormalParameters ::= FormalParameter // case 104: { //#line 714 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(1); //#line 716 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Formal.class, false); l.add(FormalParameter); setResult(l); break; } // // Rule 105: FormalParameters ::= FormalParameters , FormalParameter // case 105: { //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List FormalParameters = (List) getRhsSym(1); //#line 721 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 723 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" FormalParameters.add(FormalParameter); // setResult(FormalParameters); break; } // // Rule 106: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 106: { //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(3); //#line 730 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableDeclaratorId != null) setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); else setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), 1), "", new AmbExpr[0])); break; } // // Rule 108: VariableModifiers ::= VariableModifiers VariableModifier // case 108: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiers = (Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifier = (Flags) getRhsSym(2); //#line 740 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(VariableModifiers.set(VariableModifier)); break; } // // Rule 109: VariableModifier ::= final // case 109: { //#line 746 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 110: LastFormalParameter ::= VariableModifiersopt Type ...opt$opt VariableDeclaratorId // case 110: { //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 752 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10VarDeclarator VariableDeclaratorId = (X10VarDeclarator) getRhsSym(4); //#line 754 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" assert(opt == null); setResult(nf.Formal(pos(), VariableModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), VariableDeclaratorId.dims), VariableDeclaratorId.name, VariableDeclaratorId.names())); break; } // // Rule 112: MethodModifiers ::= MethodModifiers MethodModifier // case 112: { //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifiers = (Flags) getRhsSym(1); //#line 766 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags MethodModifier = (Flags) getRhsSym(2); //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(MethodModifiers.set(MethodModifier)); break; } // // Rule 113: MethodModifier ::= public // case 113: { //#line 776 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 114: MethodModifier ::= protected // case 114: { //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 115: MethodModifier ::= private // case 115: { //#line 786 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 116: MethodModifier ::= abstract // case 116: { //#line 791 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 117: MethodModifier ::= static // case 117: { //#line 796 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 118: MethodModifier ::= final // case 118: { //#line 801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 119: MethodModifier ::= native // case 119: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NATIVE); break; } // // Rule 120: MethodModifier ::= strictfp // case 120: { //#line 816 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 121: Throws ::= throws ExceptionTypeList // case 121: { //#line 820 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(2); //#line 822 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExceptionTypeList); break; } // // Rule 122: ExceptionTypeList ::= ExceptionType // case 122: { //#line 826 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(1); //#line 828 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(ExceptionType); setResult(l); break; } // // Rule 123: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 123: { //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExceptionTypeList = (List) getRhsSym(1); //#line 833 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode ExceptionType = (TypeNode) getRhsSym(3); //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExceptionTypeList.add(ExceptionType); // setResult(ExceptionTypeList); break; } // // Rule 126: MethodBody ::= ; // case 126: setResult(null); break; // // Rule 128: StaticInitializer ::= static Block // case 128: { //#line 855 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 857 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 129: SimpleTypeName ::= identifier // case 129: { //#line 872 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 131: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 131: { //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifiers = (Flags) getRhsSym(1); //#line 879 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstructorModifier = (Flags) getRhsSym(2); //#line 881 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstructorModifiers.set(ConstructorModifier)); break; } // // Rule 132: ConstructorModifier ::= public // case 132: { //#line 889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 133: ConstructorModifier ::= protected // case 133: { //#line 894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 134: ConstructorModifier ::= private // case 134: { //#line 899 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 135: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 135: { //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt ExplicitConstructorInvocationopt = (Stmt) getRhsSym(2); //#line 903 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(3); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l; if (ExplicitConstructorInvocationopt == null) l = BlockStatementsopt; else { l = new TypedList(new LinkedList(), Stmt.class, false); l.add(ExplicitConstructorInvocationopt); l.addAll(BlockStatementsopt); } setResult(nf.Block(pos(), l)); break; } // // Rule 136: Arguments ::= ( ArgumentListopt ) // case 136: { //#line 936 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(2); //#line 938 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ArgumentListopt); break; } // // Rule 139: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 139: { //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifiers = (Flags) getRhsSym(1); //#line 954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags InterfaceModifier = (Flags) getRhsSym(2); //#line 956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(InterfaceModifiers.set(InterfaceModifier)); break; } // // Rule 140: InterfaceModifier ::= public // case 140: { //#line 964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 141: InterfaceModifier ::= protected // case 141: { //#line 969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PROTECTED); break; } // // Rule 142: InterfaceModifier ::= private // case 142: { //#line 974 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PRIVATE); break; } // // Rule 143: InterfaceModifier ::= abstract // case 143: { //#line 979 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 144: InterfaceModifier ::= static // case 144: { //#line 984 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 145: InterfaceModifier ::= strictfp // case 145: { //#line 989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STRICTFP); break; } // // Rule 146: ExtendsInterfaces ::= extends InterfaceType // case 146: { //#line 993 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(2); //#line 995 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(InterfaceType); setResult(l); break; } // // Rule 147: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 147: { //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ExtendsInterfaces = (List) getRhsSym(1); //#line 1000 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode InterfaceType = (TypeNode) getRhsSym(3); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ExtendsInterfaces.add(InterfaceType); // setResult(ExtendsInterfaces); break; } // // Rule 148: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 148: { //#line 1012 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarationsopt = (List) getRhsSym(2); //#line 1014 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassBody(pos(), InterfaceMemberDeclarationsopt)); break; } // // Rule 150: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 150: { //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclarations = (List) getRhsSym(1); //#line 1019 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List InterfaceMemberDeclaration = (List) getRhsSym(2); //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" InterfaceMemberDeclarations.addAll(InterfaceMemberDeclaration); // setResult(l); break; } // // Rule 152: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 152: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" MethodDecl AbstractMethodDeclaration = (MethodDecl) getRhsSym(1); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(AbstractMethodDeclaration); setResult(l); break; } // // Rule 153: InterfaceMemberDeclaration ::= ClassDeclaration // case 153: { //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1036 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(ClassDeclaration); setResult(l); break; } // // Rule 154: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 154: { //#line 1041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl InterfaceDeclaration = (ClassDecl) getRhsSym(1); //#line 1043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(InterfaceDeclaration); setResult(l); break; } // // Rule 155: InterfaceMemberDeclaration ::= ; // case 155: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Collections.EMPTY_LIST); break; } // // Rule 156: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 156: { //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiersopt = (Flags) getRhsSym(1); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1054 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1056 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ClassMember.class, false); for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); l.add(nf.FieldDecl(pos(getRhsFirstTokenIndex(2), getRightSpan()), ConstantModifiersopt, nf.array(Type, pos(getRhsFirstTokenIndex(2), getRhsLastTokenIndex(2)), d.dims), d.name, d.init)); } setResult(l); break; } // // Rule 158: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 158: { //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifiers = (Flags) getRhsSym(1); //#line 1074 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags ConstantModifier = (Flags) getRhsSym(2); //#line 1076 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ConstantModifiers.set(ConstantModifier)); break; } // // Rule 159: ConstantModifier ::= public // case 159: { //#line 1084 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 160: ConstantModifier ::= static // case 160: { //#line 1089 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.STATIC); break; } // // Rule 161: ConstantModifier ::= final // case 161: { //#line 1094 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.FINAL); break; } // // Rule 163: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 163: { //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifiers = (Flags) getRhsSym(1); //#line 1101 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags AbstractMethodModifier = (Flags) getRhsSym(2); //#line 1103 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(AbstractMethodModifiers.set(AbstractMethodModifier)); break; } // // Rule 164: AbstractMethodModifier ::= public // case 164: { //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.PUBLIC); break; } // // Rule 165: AbstractMethodModifier ::= abstract // case 165: { //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.ABSTRACT); break; } // // Rule 166: SimpleName ::= identifier // case 166: { //#line 1172 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 167: ArrayInitializer ::= { VariableInitializersopt ,opt$opt } // case 167: { //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializersopt = (List) getRhsSym(2); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Object opt = (Object) getRhsSym(3); //#line 1203 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (VariableInitializersopt == null) setResult(nf.ArrayInit(pos())); else setResult(nf.ArrayInit(pos(), VariableInitializersopt)); break; } // // Rule 168: VariableInitializers ::= VariableInitializer // case 168: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(1); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(VariableInitializer); setResult(l); break; } // // Rule 169: VariableInitializers ::= VariableInitializers , VariableInitializer // case 169: { //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableInitializers = (List) getRhsSym(1); //#line 1216 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr VariableInitializer = (Expr) getRhsSym(3); //#line 1218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" VariableInitializers.add(VariableInitializer); //setResult(VariableInitializers); break; } // // Rule 170: Block ::= { BlockStatementsopt } // case 170: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatementsopt = (List) getRhsSym(2); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Block(pos(), BlockStatementsopt)); break; } // // Rule 171: BlockStatements ::= BlockStatement // case 171: { //#line 1243 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(1); //#line 1245 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.addAll(BlockStatement); setResult(l); break; } // // Rule 172: BlockStatements ::= BlockStatements BlockStatement // case 172: { //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatement = (List) getRhsSym(2); //#line 1252 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" BlockStatements.addAll(BlockStatement); //setResult(l); break; } // // Rule 174: BlockStatement ::= ClassDeclaration // case 174: { //#line 1258 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ClassDecl ClassDeclaration = (ClassDecl) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), ClassDeclaration)); setResult(l); break; } // // Rule 175: BlockStatement ::= Statement // case 175: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(1); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(Statement); setResult(l); break; } // // Rule 177: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 177: { //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Flags VariableModifiersopt = (Flags) getRhsSym(1); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1275 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List VariableDeclarators = (List) getRhsSym(3); //#line 1277 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); if (VariableDeclarators != null) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag(VariableModifiersopt); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(Type, pos(d), d.dims), d.name, d.init)); // [IP] TODO: Add X10Local with exploded variables if (d.hasExplodedVars()) s.addAll(X10Formal_c.explode(nf, ts, d.name, pos(d), d.flags, d.names())); } } l.addAll(s); setResult(l); break; } // // Rule 201: IfThenStatement ::= if ( Expression ) Statement // case 201: { //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1338 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, Statement)); break; } // // Rule 202: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 202: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(7); //#line 1346 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, StatementNoShortIf, Statement)); break; } // // Rule 203: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf$true_stmt else StatementNoShortIf$false_stmt // case 203: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt true_stmt = (Stmt) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt false_stmt = (Stmt) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.If(pos(), Expression, true_stmt, false_stmt)); break; } // // Rule 204: EmptyStatement ::= ; // case 204: { //#line 1358 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Empty(pos())); break; } // // Rule 205: LabeledStatement ::= identifier : Statement // case 205: { //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(3); //#line 1364 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), Statement)); break; } // // Rule 206: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 206: { //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1368 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(3); //#line 1370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Labeled(pos(), identifier.getIdentifier(), StatementNoShortIf)); break; } // // Rule 207: ExpressionStatement ::= StatementExpression ; // case 207: { //#line 1373 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1375 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Eval(pos(), StatementExpression)); break; } // // Rule 215: AssertStatement ::= assert Expression ; // case 215: { //#line 1396 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1398 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), Expression)); break; } // // Rule 216: AssertStatement ::= assert Expression$expr1 : Expression$expr2 ; // case 216: { //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr1 = (Expr) getRhsSym(2); //#line 1401 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr expr2 = (Expr) getRhsSym(4); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assert(pos(), expr1, expr2)); break; } // // Rule 217: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 217: { //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1407 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlock = (List) getRhsSym(5); //#line 1409 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Switch(pos(), Expression, SwitchBlock)); break; } // // Rule 218: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 218: { //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroupsopt = (List) getRhsSym(2); //#line 1413 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabelsopt = (List) getRhsSym(3); //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroupsopt.addAll(SwitchLabelsopt); setResult(SwitchBlockStatementGroupsopt); break; } // // Rule 220: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 220: { //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroups = (List) getRhsSym(1); //#line 1421 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchBlockStatementGroup = (List) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchBlockStatementGroups.addAll(SwitchBlockStatementGroup); // setResult(SwitchBlockStatementGroups); break; } // // Rule 221: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 221: { //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1428 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List BlockStatements = (List) getRhsSym(2); //#line 1430 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), SwitchElement.class, false); l.addAll(SwitchLabels); l.add(nf.SwitchBlock(pos(), BlockStatements)); setResult(l); break; } // // Rule 222: SwitchLabels ::= SwitchLabel // case 222: { //#line 1437 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(1); //#line 1439 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Case.class, false); l.add(SwitchLabel); setResult(l); break; } // // Rule 223: SwitchLabels ::= SwitchLabels SwitchLabel // case 223: { //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List SwitchLabels = (List) getRhsSym(1); //#line 1444 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Case SwitchLabel = (Case) getRhsSym(2); //#line 1446 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" SwitchLabels.add(SwitchLabel); //setResult(SwitchLabels); break; } // // Rule 224: SwitchLabel ::= case ConstantExpression : // case 224: { //#line 1451 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConstantExpression = (Expr) getRhsSym(2); //#line 1453 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Case(pos(), ConstantExpression)); break; } // // Rule 225: SwitchLabel ::= default : // case 225: { //#line 1460 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Default(pos())); break; } // // Rule 226: WhileStatement ::= while ( Expression ) Statement // case 226: { //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(5); //#line 1469 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, Statement)); break; } // // Rule 227: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 227: { //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1475 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.While(pos(), Expression, StatementNoShortIf)); break; } // // Rule 228: DoStatement ::= do Statement while ( Expression ) ; // case 228: { //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(2); //#line 1479 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(5); //#line 1481 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Do(pos(), Statement, Expression)); break; } // // Rule 231: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 231: { //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1488 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt Statement = (Stmt) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, Statement)); break; } // // Rule 232: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 232: { //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForInitopt = (List) getRhsSym(3); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(5); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ForUpdateopt = (List) getRhsSym(7); //#line 1494 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Stmt StatementNoShortIf = (Stmt) getRhsSym(9); //#line 1496 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.For(pos(), ForInitopt, Expressionopt, ForUpdateopt, StatementNoShortIf)); break; } // // Rule 234: ForInit ::= LocalVariableDeclaration // case 234: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List LocalVariableDeclaration = (List) getRhsSym(1); //#line 1503 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), ForInit.class, false); l.addAll(LocalVariableDeclaration); //setResult(l); break; } // // Rule 236: StatementExpressionList ::= StatementExpression // case 236: { //#line 1511 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(1); //#line 1513 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Eval.class, false); l.add(nf.Eval(pos(), StatementExpression)); setResult(l); break; } // // Rule 237: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 237: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List StatementExpressionList = (List) getRhsSym(1); //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr StatementExpression = (Expr) getRhsSym(3); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" StatementExpressionList.add(nf.Eval(pos(), StatementExpression)); //setResult(StatementExpressionList); break; } // // Rule 238: BreakStatement ::= break identifieropt ; // case 238: { //#line 1528 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1530 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Break(pos())); else setResult(nf.Break(pos(), identifieropt.toString())); break; } // // Rule 239: ContinueStatement ::= continue identifieropt ; // case 239: { //#line 1536 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name identifieropt = (Name) getRhsSym(2); //#line 1538 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (identifieropt == null) setResult(nf.Continue(pos())); else setResult(nf.Continue(pos(), identifieropt.toString())); break; } // // Rule 240: ReturnStatement ::= return Expressionopt ; // case 240: { //#line 1544 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expressionopt = (Expr) getRhsSym(2); //#line 1546 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Return(pos(), Expressionopt)); break; } // // Rule 241: ThrowStatement ::= throw Expression ; // case 241: { //#line 1550 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1552 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Throw(pos(), Expression)); break; } // // Rule 242: TryStatement ::= try Block Catches // case 242: { //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1562 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(3); //#line 1564 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catches)); break; } // // Rule 243: TryStatement ::= try Block Catchesopt Finally // case 243: { //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catchesopt = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Finally = (Block) getRhsSym(4); //#line 1569 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Try(pos(), Block, Catchesopt, Finally)); break; } // // Rule 244: Catches ::= CatchClause // case 244: { //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(1); //#line 1575 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Catch.class, false); l.add(CatchClause); setResult(l); break; } // // Rule 245: Catches ::= Catches CatchClause // case 245: { //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List Catches = (List) getRhsSym(1); //#line 1580 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catch CatchClause = (Catch) getRhsSym(2); //#line 1582 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Catches.add(CatchClause); //setResult(Catches); break; } // // Rule 246: CatchClause ::= catch ( FormalParameter ) Block // case 246: { //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1587 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(5); //#line 1589 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Catch(pos(), FormalParameter, Block)); break; } // // Rule 247: Finally ::= finally Block // case 247: { //#line 1593 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Block Block = (Block) getRhsSym(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Block); break; } // // Rule 251: PrimaryNoNewArray ::= Type . class // case 251: { //#line 1613 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1615 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 252: PrimaryNoNewArray ::= void . class // case 252: { //#line 1634 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 253: PrimaryNoNewArray ::= this // case 253: { //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos())); break; } // // Rule 254: PrimaryNoNewArray ::= ClassName . this // case 254: { //#line 1643 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1645 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 255: PrimaryNoNewArray ::= ( Expression ) // case 255: { //#line 1648 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1650 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.ParExpr(pos(), Expression)); break; } // // Rule 260: Literal ::= IntegerLiteral$IntegerLiteral // case 260: { //#line 1658 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken IntegerLiteral = (IToken) getRhsIToken(1); //#line 1660 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.IntegerLiteral a = int_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 261: Literal ::= LongLiteral$LongLiteral // case 261: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken LongLiteral = (IToken) getRhsIToken(1); //#line 1666 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.LongLiteral a = long_lit(getRhsFirstTokenIndex(1)); setResult(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 262: Literal ::= FloatingPointLiteral$FloatLiteral // case 262: { //#line 1670 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken FloatLiteral = (IToken) getRhsIToken(1); //#line 1672 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.FloatLiteral a = float_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 263: Literal ::= DoubleLiteral$DoubleLiteral // case 263: { //#line 1676 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken DoubleLiteral = (IToken) getRhsIToken(1); //#line 1678 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.DoubleLiteral a = double_lit(getRhsFirstTokenIndex(1)); setResult(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 264: Literal ::= BooleanLiteral // case 264: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.BooleanLiteral BooleanLiteral = (polyglot.lex.BooleanLiteral) getRhsSym(1); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.BooleanLit(pos(), BooleanLiteral.getValue().booleanValue())); break; } // // Rule 265: Literal ::= CharacterLiteral$CharacterLiteral // case 265: { //#line 1687 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken CharacterLiteral = (IToken) getRhsIToken(1); //#line 1689 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.CharacterLiteral a = char_lit(getRhsFirstTokenIndex(1)); setResult(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 266: Literal ::= StringLiteral$str // case 266: { //#line 1693 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken str = (IToken) getRhsIToken(1); //#line 1695 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.StringLiteral a = string_lit(getRhsFirstTokenIndex(1)); setResult(nf.StringLit(pos(), a.getValue())); break; } // // Rule 267: Literal ::= null // case 267: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.NullLit(pos())); break; } // // Rule 268: BooleanLiteral ::= true$trueLiteral // case 268: { //#line 1705 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken trueLiteral = (IToken) getRhsIToken(1); //#line 1707 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 269: BooleanLiteral ::= false$falseLiteral // case 269: { //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken falseLiteral = (IToken) getRhsIToken(1); //#line 1712 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(boolean_lit(getRhsFirstTokenIndex(1))); break; } // // Rule 270: ArgumentList ::= Expression // case 270: { //#line 1725 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(1); //#line 1727 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Expression); setResult(l); break; } // // Rule 271: ArgumentList ::= ArgumentList , Expression // case 271: { //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentList = (List) getRhsSym(1); //#line 1732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 1734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" ArgumentList.add(Expression); //setResult(ArgumentList); break; } // // Rule 272: DimExprs ::= DimExpr // case 272: { //#line 1768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(1); //#line 1770 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); setResult(l); break; } // // Rule 273: DimExprs ::= DimExprs DimExpr // case 273: { //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List DimExprs = (List) getRhsSym(1); //#line 1775 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr DimExpr = (Expr) getRhsSym(2); //#line 1777 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" DimExprs.add(DimExpr); //setResult(DimExprs); break; } // // Rule 274: DimExpr ::= [ Expression ] // case 274: { //#line 1782 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(2); //#line 1784 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Expression.position(pos())); break; } // // Rule 275: Dims ::= [ ] // case 275: { //#line 1790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(1)); break; } // // Rule 276: Dims ::= Dims [ ] // case 276: { //#line 1793 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Integer Dims = (Integer) getRhsSym(1); //#line 1795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(Dims.intValue() + 1)); break; } // // Rule 277: FieldAccess ::= Primary . identifier // case 277: { //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Primary = (Expr) getRhsSym(1); //#line 1799 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1801 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(), Primary, identifier.getIdentifier())); break; } // // Rule 278: FieldAccess ::= super . identifier // case 278: { //#line 1804 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1806 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 279: FieldAccess ::= ClassName . super$sup . identifier // case 279: { //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ClassName = (Name) getRhsSym(1); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" IToken sup = (IToken) getRhsIToken(3); //#line 1809 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 280: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 280: { //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name MethodName = (Name) getRhsSym(1); //#line 1815 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" List ArgumentListopt = (List) getRhsSym(3); //#line 1817 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Call(pos(), MethodName.prefix == null ? null : MethodName.prefix.toReceiver(), MethodName.name, ArgumentListopt)); break; } // // Rule 282: PostfixExpression ::= ExpressionName // case 282: { //#line 1840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 1842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 285: PostIncrementExpression ::= PostfixExpression ++ // case 285: { //#line 1848 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_INC)); break; } // // Rule 286: PostDecrementExpression ::= PostfixExpression -- // case 286: { //#line 1854 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr PostfixExpression = (Expr) getRhsSym(1); //#line 1856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), PostfixExpression, Unary.POST_DEC)); break; } // // Rule 289: UnaryExpression ::= + UnaryExpression // case 289: { //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1864 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.POS, UnaryExpression)); break; } // // Rule 290: UnaryExpression ::= - UnaryExpression // case 290: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NEG, UnaryExpression)); break; } // // Rule 292: PreIncrementExpression ::= ++ UnaryExpression // case 292: { //#line 1874 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1876 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_INC, UnaryExpression)); break; } // // Rule 293: PreDecrementExpression ::= -- UnaryExpression // case 293: { //#line 1880 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.PRE_DEC, UnaryExpression)); break; } // // Rule 295: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 295: { //#line 1887 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1889 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.BIT_NOT, UnaryExpression)); break; } // // Rule 296: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 296: { //#line 1892 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(2); //#line 1894 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Unary(pos(), Unary.NOT, UnaryExpression)); break; } // // Rule 299: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 299: { //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1906 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1908 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MUL, UnaryExpression)); break; } // // Rule 300: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 300: { //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1911 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.DIV, UnaryExpression)); break; } // // Rule 301: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 301: { //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(1); //#line 1916 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr UnaryExpression = (Expr) getRhsSym(3); //#line 1918 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), MultiplicativeExpression, Binary.MOD, UnaryExpression)); break; } // // Rule 303: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 303: { //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1923 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1925 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.ADD, MultiplicativeExpression)); break; } // // Rule 304: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 304: { //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(1); //#line 1928 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr MultiplicativeExpression = (Expr) getRhsSym(3); //#line 1930 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AdditiveExpression, Binary.SUB, MultiplicativeExpression)); break; } // // Rule 306: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 306: { //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1935 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(3); //#line 1937 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ShiftExpression, Binary.SHL, AdditiveExpression)); break; } // // Rule 307: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 307: { //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1940 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(4); //#line 1942 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.SHR, AdditiveExpression)); break; } // // Rule 308: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 308: { //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(1); //#line 1946 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AdditiveExpression = (Expr) getRhsSym(5); //#line 1948 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), ShiftExpression, Binary.USHR, AdditiveExpression)); break; } // // Rule 310: RelationalExpression ::= RelationalExpression < ShiftExpression // case 310: { //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1954 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1956 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LT, ShiftExpression)); break; } // // Rule 311: RelationalExpression ::= RelationalExpression > ShiftExpression // case 311: { //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1959 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1961 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.GT, ShiftExpression)); break; } // // Rule 312: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 312: { //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1964 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(3); //#line 1966 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), RelationalExpression, Binary.LE, ShiftExpression)); break; } // // Rule 313: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 313: { //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1969 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ShiftExpression = (Expr) getRhsSym(4); //#line 1971 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(nf.Binary(pos(), RelationalExpression, Binary.GE, ShiftExpression)); break; } // // Rule 315: EqualityExpression ::= EqualityExpression == RelationalExpression // case 315: { //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1985 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1987 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.EQ, RelationalExpression)); break; } // // Rule 316: EqualityExpression ::= EqualityExpression != RelationalExpression // case 316: { //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(1); //#line 1990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr RelationalExpression = (Expr) getRhsSym(3); //#line 1992 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), EqualityExpression, Binary.NE, RelationalExpression)); break; } // // Rule 318: AndExpression ::= AndExpression & EqualityExpression // case 318: { //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(1); //#line 1997 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr EqualityExpression = (Expr) getRhsSym(3); //#line 1999 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), AndExpression, Binary.BIT_AND, EqualityExpression)); break; } // // Rule 320: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 320: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(1); //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AndExpression = (Expr) getRhsSym(3); //#line 2006 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ExclusiveOrExpression, Binary.BIT_XOR, AndExpression)); break; } // // Rule 322: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 322: { //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(1); //#line 2011 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ExclusiveOrExpression = (Expr) getRhsSym(3); //#line 2013 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), InclusiveOrExpression, Binary.BIT_OR, ExclusiveOrExpression)); break; } // // Rule 324: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 324: { //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(1); //#line 2018 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr InclusiveOrExpression = (Expr) getRhsSym(3); //#line 2020 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalAndExpression, Binary.COND_AND, InclusiveOrExpression)); break; } // // Rule 326: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 326: { //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2025 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalAndExpression = (Expr) getRhsSym(3); //#line 2027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Binary(pos(), ConditionalOrExpression, Binary.COND_OR, ConditionalAndExpression)); break; } // // Rule 328: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 328: { //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalOrExpression = (Expr) getRhsSym(1); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr Expression = (Expr) getRhsSym(3); //#line 2032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr ConditionalExpression = (Expr) getRhsSym(5); //#line 2034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Conditional(pos(), ConditionalOrExpression, Expression, ConditionalExpression)); break; } // // Rule 331: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 331: { //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr LeftHandSide = (Expr) getRhsSym(1); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Assign.Operator AssignmentOperator = (Assign.Operator) getRhsSym(2); //#line 2041 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Expr AssignmentExpression = (Expr) getRhsSym(3); //#line 2043 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(nf.Assign(pos(), LeftHandSide, AssignmentOperator, AssignmentExpression)); break; } // // Rule 332: LeftHandSide ::= ExpressionName // case 332: { //#line 2047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" Name ExpressionName = (Name) getRhsSym(1); //#line 2049 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(ExpressionName.toExpr()); break; } // // Rule 335: AssignmentOperator ::= = // case 335: { //#line 2057 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ASSIGN); break; } // // Rule 336: AssignmentOperator ::= *= // case 336: { //#line 2062 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MUL_ASSIGN); break; } // // Rule 337: AssignmentOperator ::= /= // case 337: { //#line 2067 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.DIV_ASSIGN); break; } // // Rule 338: AssignmentOperator ::= %= // case 338: { //#line 2072 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.MOD_ASSIGN); break; } // // Rule 339: AssignmentOperator ::= += // case 339: { //#line 2077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.ADD_ASSIGN); break; } // // Rule 340: AssignmentOperator ::= -= // case 340: { //#line 2082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SUB_ASSIGN); break; } // // Rule 341: AssignmentOperator ::= <<= // case 341: { //#line 2087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.SHL_ASSIGN); break; } // // Rule 342: AssignmentOperator ::= > > = // case 342: { //#line 2092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.SHR_ASSIGN); break; } // // Rule 343: AssignmentOperator ::= > > > = // case 343: { //#line 2098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" // TODO: make sure that there is no space after the ">" signs setResult(Assign.USHR_ASSIGN); break; } // // Rule 344: AssignmentOperator ::= &= // case 344: { //#line 2104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_AND_ASSIGN); break; } // // Rule 345: AssignmentOperator ::= ^= // case 345: { //#line 2109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_XOR_ASSIGN); break; } // // Rule 346: AssignmentOperator ::= |= // case 346: { //#line 2114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Assign.BIT_OR_ASSIGN); break; } // // Rule 349: Dimsopt ::= $Empty // case 349: { //#line 2127 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Integer(0)); break; } // // Rule 351: Catchesopt ::= $Empty // case 351: { //#line 2134 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 353: identifieropt ::= $Empty // case 353: setResult(null); break; // // Rule 354: identifieropt ::= identifier // case 354: { //#line 2141 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 2143 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 355: ForUpdateopt ::= $Empty // case 355: { //#line 2149 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 357: Expressionopt ::= $Empty // case 357: setResult(null); break; // // Rule 359: ForInitopt ::= $Empty // case 359: { //#line 2160 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 361: SwitchLabelsopt ::= $Empty // case 361: { //#line 2167 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 363: SwitchBlockStatementGroupsopt ::= $Empty // case 363: { //#line 2174 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 365: VariableModifiersopt ::= $Empty // case 365: { //#line 2181 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 367: VariableInitializersopt ::= $Empty // case 367: setResult(null); break; // // Rule 369: AbstractMethodModifiersopt ::= $Empty // case 369: { //#line 2211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 371: ConstantModifiersopt ::= $Empty // case 371: { //#line 2218 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 373: InterfaceMemberDeclarationsopt ::= $Empty // case 373: { //#line 2225 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 375: ExtendsInterfacesopt ::= $Empty // case 375: { //#line 2232 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 377: InterfaceModifiersopt ::= $Empty // case 377: { //#line 2239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 379: ClassBodyopt ::= $Empty // case 379: setResult(null); break; // // Rule 381: Argumentsopt ::= $Empty // case 381: setResult(null); break; // // Rule 382: Argumentsopt ::= Arguments // case 382: throw new Error("No action specified for rule " + 382); // // Rule 383: ,opt ::= $Empty // case 383: setResult(null); break; // // Rule 385: ArgumentListopt ::= $Empty // case 385: { //#line 2269 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 387: BlockStatementsopt ::= $Empty // case 387: { //#line 2276 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 389: ExplicitConstructorInvocationopt ::= $Empty // case 389: setResult(null); break; // // Rule 391: ConstructorModifiersopt ::= $Empty // case 391: { //#line 2287 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 393: ...opt ::= $Empty // case 393: setResult(null); break; // // Rule 395: FormalParameterListopt ::= $Empty // case 395: { //#line 2298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 397: Throwsopt ::= $Empty // case 397: { //#line 2305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 399: MethodModifiersopt ::= $Empty // case 399: { //#line 2312 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 401: FieldModifiersopt ::= $Empty // case 401: { //#line 2319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 403: ClassBodyDeclarationsopt ::= $Empty // case 403: { //#line 2326 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 405: Interfacesopt ::= $Empty // case 405: { //#line 2333 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 407: Superopt ::= $Empty // case 407: { //#line 2340 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new Name(nf, ts, pos(), "x10.lang.Object").toType()); break; } // // Rule 409: ClassModifiersopt ::= $Empty // case 409: { //#line 2351 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(Flags.NONE); break; } // // Rule 411: TypeDeclarationsopt ::= $Empty // case 411: { //#line 2363 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 413: ImportDeclarationsopt ::= $Empty // case 413: { //#line 2370 "C:/eclipse/ws6/x10.compiler/src/x10/parser/GJavaParserForX10.gi" setResult(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 415: PackageDeclarationopt ::= $Empty // case 415: setResult(null); break; // // Rule 417: ClassType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 417: { //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 715 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 717 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 418: InterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 418: { //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 726 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParametersopt == null ? TypeName.toType() : ((X10TypeNode) TypeName.toType()).dep(null, DepParametersopt)); break; } // // Rule 419: PackageDeclaration ::= package PackageName ; // case 419: { //#line 732 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name PackageName = (Name) getRhsSym(2); //#line 734 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PackageName.toPackage()); break; } // // Rule 420: NormalClassDeclaration ::= X10ClassModifiersopt class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 420: { //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 738 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 740 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(X10Flags.isValue(X10ClassModifiersopt) ? nf.ValueClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody) : nf.ClassDecl(pos(), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 422: X10ClassModifiers ::= X10ClassModifiers X10ClassModifier // case 422: { //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiers = (X10Flags) getRhsSym(1); //#line 753 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifier = (X10Flags) getRhsSym(2); //#line 755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags result = X10ClassModifiers.setX(X10ClassModifier); setResult(result); break; } // // Rule 423: X10ClassModifier ::= ClassModifier // case 423: { //#line 761 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ClassModifier = (Flags) getRhsSym(1); //#line 763 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(ClassModifier)); break; } // // Rule 424: X10ClassModifier ::= safe // case 424: { //#line 768 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 425: PropertyList ::= ( Properties WhereClauseopt ) // case 425: { //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(2); //#line 772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(3); //#line 774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = Properties; result[1] = WhereClauseopt; setResult(result); break; } // // Rule 426: PropertyList ::= ( WhereClause ) // case 426: { //#line 779 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(2); //#line 781 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] result = new Object[2]; result[0] = null; result[1] = WhereClause; setResult(result); break; } // // Rule 427: Properties ::= Property // case 427: { //#line 788 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(1); //#line 790 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), PropertyDecl.class, false); l.add(Property); setResult(l); break; } // // Rule 428: Properties ::= Properties , Property // case 428: { //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Properties = (List) getRhsSym(1); //#line 795 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" PropertyDecl Property = (PropertyDecl) getRhsSym(3); //#line 797 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Properties.add(Property); // setResult(FormalParameters); break; } // // Rule 429: Property ::= Type identifier // case 429: { //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 803 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(2); //#line 805 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PropertyDecl(pos(), Flags.PUBLIC.Final(), Type, identifier.getIdentifier())); break; } // // Rule 430: MethodHeader ::= ThisClauseopt MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 430: { //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags MethodModifiersopt = (Flags) getRhsSym(2); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 811 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 813 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name c = (MethodDeclarator != null) ? (Name) MethodDeclarator[0] : null; List d = (MethodDeclarator != null) ? (List) MethodDeclarator[1] : null; Integer e = (MethodDeclarator != null) ? (Integer) MethodDeclarator[2] : null; Expr where = (MethodDeclarator != null) ? (Expr) MethodDeclarator[3] : null; if (ResultType.type() == ts.Void() && e != null && e.intValue() > 0) { // TODO: error!!! System.err.println("Fix me - encountered method returning void but with non-zero rank?"); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, MethodModifiersopt, nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e != null ? e.intValue() : 1), c != null ? c.toString() : "", d, where, Throwsopt, null)); break; } // // Rule 431: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 431: { //#line 835 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), ArgumentListopt)); break; } // // Rule 432: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 432: { //#line 840 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(3); //#line 842 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), ArgumentListopt)); break; } // // Rule 433: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 433: { //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 845 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 847 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ThisCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 434: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 434: { //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 850 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 852 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.SuperCall(pos(), Primary, ArgumentListopt)); break; } // // Rule 435: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier PropertyListopt ExtendsInterfacesopt InterfaceBody // case 435: { //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags InterfaceModifiersopt = (Flags) getRhsSym(1); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ExtendsInterfacesopt = (List) getRhsSym(5); //#line 856 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody InterfaceBody = (ClassBody) getRhsSym(6); //#line 858 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt == null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt == null ? null : (Expr) PropertyListopt[1]; setResult(nf.ClassDecl(pos(), InterfaceModifiersopt.Interface(), identifier.getIdentifier(), props, ci, null, ExtendsInterfacesopt, InterfaceBody)); break; } // // Rule 436: AbstractMethodDeclaration ::= ThisClauseopt AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 436: { //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags AbstractMethodModifiersopt = (Flags) getRhsSym(2); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ResultType = (TypeNode) getRhsSym(3); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(4); //#line 873 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(5); //#line 875 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name c = (Name) MethodDeclarator[0]; List d = (List) MethodDeclarator[1]; Integer e = (Integer) MethodDeclarator[2]; Expr where = (Expr) MethodDeclarator[3]; if (ResultType.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } setResult(nf.MethodDecl(pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(4)), ThisClauseopt, AbstractMethodModifiersopt , nf.array((TypeNode) ResultType, pos(getRhsFirstTokenIndex(3), getRhsLastTokenIndex(3)), e.intValue()), c.toString(), d, where, Throwsopt, null)); break; } // // Rule 437: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 437: { //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ClassOrInterfaceType = (TypeNode) getRhsSym(2); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(4); //#line 898 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(6); //#line 900 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ClassBodyopt == null) setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt)); else setResult(nf.New(pos(), ClassOrInterfaceType, ArgumentListopt, ClassBodyopt)); break; } // // Rule 438: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 438: { //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 905 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 907 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), Primary, b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 439: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 439: { //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name AmbiguousName = (Name) getRhsSym(1); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(6); //#line 913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBodyopt = (ClassBody) getRhsSym(8); //#line 915 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name b = new Name(nf, ts, pos(), identifier.getIdentifier()); if (ClassBodyopt == null) setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt)); else setResult(nf.New(pos(), AmbiguousName.toExpr(), b.toType(), ArgumentListopt, ClassBodyopt)); break; } // // Rule 440: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 440: { //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Primary = (Expr) getRhsSym(1); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 924 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), Primary, identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 441: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 441: { //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 927 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(5); //#line 929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getLeftSpan())), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 442: MethodInvocation ::= ClassName . super$sup . identifier ( ArgumentListopt ) // case 442: { //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 932 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentListopt = (List) getRhsSym(7); //#line 934 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Call(pos(), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier(), ArgumentListopt)); break; } // // Rule 444: AssignPropertyCall ::= property ( ArgumentList ) // case 444: { //#line 939 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 941 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AssignPropertyCall(pos(), ArgumentList)); break; } // // Rule 445: Type ::= DataType // case 445: { //#line 950 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(1); //#line 952 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 446: Type ::= nullable < Type > DepParametersopt // case 446: { //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 955 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(5); //#line 957 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode t = nf.Nullable(pos(), Type); setResult(DepParametersopt == null ? t : t.dep(null, DepParametersopt)); break; } // // Rule 447: Type ::= future < Type > // case 447: { //#line 963 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 965 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 451: PrimitiveType ::= NumericType DepParametersopt // case 451: { //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode NumericType = (TypeNode) getRhsSym(1); //#line 980 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 982 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parser: parsed PrimitiveType |" + NumericType + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? NumericType : ((X10TypeNode) NumericType).dep(null, DepParametersopt)); break; } // // Rule 452: PrimitiveType ::= boolean DepParametersopt // case 452: { //#line 988 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 990 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode res = (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.Boolean()); setResult(DepParametersopt==null ? res : res.dep(null, DepParametersopt)); break; } // // Rule 457: ClassOrInterfaceType ::= TypeName DepParametersopt PlaceTypeSpecifieropt // case 457: { //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name TypeName = (Name) getRhsSym(1); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1002 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object PlaceTypeSpecifieropt = (Object) getRhsSym(3); //#line 1004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10TypeNode type; if (ts.isPrimitiveTypeName(TypeName.name)) { try { type= (X10TypeNode) nf.CanonicalTypeNode(pos(), ts.primitiveForName(TypeName.name)); } catch (SemanticException e) { throw new InternalCompilerError("Unable to create primitive type for '" + TypeName.name + "'!"); } } else type= (X10TypeNode) TypeName.toType(); // System.out.println("Parser: parsed ClassOrInterfaceType |" + TypeName + "| |" + DepParametersopt +"|"); setResult(DepParametersopt == null ? type : type.dep(null, DepParametersopt)); break; } // // Rule 458: DepParameters ::= ( DepParameterExpr ) // case 458: { //#line 1021 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(2); //#line 1023 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameterExpr); break; } // // Rule 459: DepParameterExpr ::= ArgumentList WhereClauseopt // case 459: { //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(1); //#line 1027 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(2); //#line 1029 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), ArgumentList, WhereClauseopt)); break; } // // Rule 460: DepParameterExpr ::= WhereClause // case 460: { //#line 1032 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClause = (Expr) getRhsSym(1); //#line 1034 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.DepParameterExpr(pos(), Collections.EMPTY_LIST, WhereClause)); break; } // // Rule 461: WhereClause ::= : ConstExpression // case 461: { //#line 1038 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1040 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 462: ConstPrimary ::= Literal // case 462: { //#line 1045 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.ast.Lit Literal = (polyglot.ast.Lit) getRhsSym(1); //#line 1047 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Literal); break; } // // Rule 463: ConstPrimary ::= Type . class // case 463: { //#line 1050 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1052 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (Type instanceof Name) { Name a = (Name) Type; setResult(nf.ClassLit(pos(), a.toType())); } else if (Type instanceof TypeNode) { setResult(nf.ClassLit(pos(), Type)); } else if (Type instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) Type; setResult(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 464: ConstPrimary ::= void . class // case 464: { //#line 1071 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(getLeftSpan()), ts.Void()))); break; } // // Rule 465: ConstPrimary ::= this // case 465: { //#line 1077 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos())); break; } // // Rule 466: ConstPrimary ::= here // case 466: { //#line 1082 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Here(pos())); break; } // // Rule 467: ConstPrimary ::= ClassName . this // case 467: { //#line 1085 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1087 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.This(pos(), ClassName.toType())); break; } // // Rule 468: ConstPrimary ::= ( ConstExpression ) // case 468: { //#line 1090 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(2); //#line 1092 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExpression); break; } // // Rule 470: ConstPrimary ::= self // case 470: { //#line 1098 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Self(pos())); break; } // // Rule 471: ConstPostfixExpression ::= ConstPrimary // case 471: { //#line 1104 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1106 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPrimary); break; } // // Rule 472: ConstPostfixExpression ::= ExpressionName // case 472: { //#line 1109 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1111 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ExpressionName.toExpr()); break; } // // Rule 473: ConstUnaryExpression ::= ConstPostfixExpression // case 473: { //#line 1114 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPostfixExpression = (Expr) getRhsSym(1); //#line 1116 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstPostfixExpression); break; } // // Rule 474: ConstUnaryExpression ::= + ConstUnaryExpression // case 474: { //#line 1119 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1121 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.POS, ConstUnaryExpression)); break; } // // Rule 475: ConstUnaryExpression ::= - ConstUnaryExpression // case 475: { //#line 1124 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1126 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NEG, ConstUnaryExpression)); break; } // // Rule 476: ConstUnaryExpression ::= ! ConstUnaryExpression // case 476: { //#line 1129 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(2); //#line 1131 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Unary(pos(), Unary.NOT, ConstUnaryExpression)); break; } // // Rule 477: ConstMultiplicativeExpression ::= ConstUnaryExpression // case 477: { //#line 1135 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(1); //#line 1137 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstUnaryExpression); break; } // // Rule 478: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression * ConstUnaryExpression // case 478: { //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1140 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1142 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MUL, ConstUnaryExpression)); break; } // // Rule 479: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression / ConstUnaryExpression // case 479: { //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1145 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1147 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.DIV, ConstUnaryExpression)); break; } // // Rule 480: ConstMultiplicativeExpression ::= ConstMultiplicativeExpression % ConstUnaryExpression // case 480: { //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1150 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstUnaryExpression = (Expr) getRhsSym(3); //#line 1152 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstMultiplicativeExpression, Binary.MOD, ConstUnaryExpression)); break; } // // Rule 481: ConstAdditiveExpression ::= ConstMultiplicativeExpression // case 481: { //#line 1156 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(1); //#line 1158 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstMultiplicativeExpression); break; } // // Rule 482: ConstAdditiveExpression ::= ConstAdditiveExpression + ConstMultiplicativeExpression // case 482: { //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1161 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1163 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.ADD, ConstMultiplicativeExpression)); break; } // // Rule 483: ConstAdditiveExpression ::= ConstAdditiveExpression - ConstMultiplicativeExpression // case 483: { //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1166 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstMultiplicativeExpression = (Expr) getRhsSym(3); //#line 1168 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAdditiveExpression, Binary.SUB, ConstMultiplicativeExpression)); break; } // // Rule 484: ConstRelationalExpression ::= ConstAdditiveExpression // case 484: { //#line 1173 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(1); //#line 1175 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAdditiveExpression); break; } // // Rule 485: ConstRelationalExpression ::= ConstRelationalExpression < ConstAdditiveExpression // case 485: { //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1178 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1180 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LT, ConstAdditiveExpression)); break; } // // Rule 486: ConstRelationalExpression ::= ConstRelationalExpression > ConstAdditiveExpression // case 486: { //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1183 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1185 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GT, ConstAdditiveExpression)); break; } // // Rule 487: ConstRelationalExpression ::= ConstRelationalExpression <= ConstAdditiveExpression // case 487: { //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1188 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(3); //#line 1190 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.LE, ConstAdditiveExpression)); break; } // // Rule 488: ConstRelationalExpression ::= ConstRelationalExpression > = ConstAdditiveExpression // case 488: { //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1193 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAdditiveExpression = (Expr) getRhsSym(4); //#line 1195 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstRelationalExpression, Binary.GE, ConstAdditiveExpression)); break; } // // Rule 489: ConstEqualityExpression ::= ConstRelationalExpression // case 489: { //#line 1199 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(1); //#line 1201 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstRelationalExpression); break; } // // Rule 490: ConstEqualityExpression ::= ConstEqualityExpression == ConstRelationalExpression // case 490: { //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1204 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1206 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.EQ, ConstRelationalExpression)); break; } // // Rule 491: ConstEqualityExpression ::= ConstEqualityExpression != ConstRelationalExpression // case 491: { //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1209 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstRelationalExpression = (Expr) getRhsSym(3); //#line 1211 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstEqualityExpression, Binary.NE, ConstRelationalExpression)); break; } // // Rule 492: ConstAndExpression ::= ConstEqualityExpression // case 492: { //#line 1215 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(1); //#line 1217 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstEqualityExpression); break; } // // Rule 493: ConstAndExpression ::= ConstAndExpression && ConstEqualityExpression // case 493: { //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1220 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstEqualityExpression = (Expr) getRhsSym(3); //#line 1222 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstAndExpression, Binary.COND_AND, ConstEqualityExpression)); break; } // // Rule 494: ConstExclusiveOrExpression ::= ConstAndExpression // case 494: { //#line 1226 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(1); //#line 1228 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstAndExpression); break; } // // Rule 495: ConstExclusiveOrExpression ::= ConstExclusiveOrExpression ^ ConstAndExpression // case 495: { //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1231 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstAndExpression = (Expr) getRhsSym(3); //#line 1233 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstExclusiveOrExpression, Binary.BIT_XOR, ConstAndExpression)); break; } // // Rule 496: ConstInclusiveOrExpression ::= ConstExclusiveOrExpression // case 496: { //#line 1237 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(1); //#line 1239 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstExclusiveOrExpression); break; } // // Rule 497: ConstInclusiveOrExpression ::= ConstInclusiveOrExpression || ConstExclusiveOrExpression // case 497: { //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1242 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExclusiveOrExpression = (Expr) getRhsSym(3); //#line 1244 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Binary(pos(), ConstInclusiveOrExpression, Binary.COND_OR, ConstExclusiveOrExpression)); break; } // // Rule 498: ConstExpression ::= ConstInclusiveOrExpression // case 498: { //#line 1248 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1250 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ConstInclusiveOrExpression); break; } // // Rule 499: ConstExpression ::= ConstInclusiveOrExpression ? ConstExpression$first : ConstExpression // case 499: { //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstInclusiveOrExpression = (Expr) getRhsSym(1); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr first = (Expr) getRhsSym(3); //#line 1253 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstExpression = (Expr) getRhsSym(5); //#line 1255 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Conditional(pos(), ConstInclusiveOrExpression, first, ConstExpression)); break; } // // Rule 500: ConstFieldAccess ::= ConstPrimary . identifier // case 500: { //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr ConstPrimary = (Expr) getRhsSym(1); //#line 1260 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1262 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(), ConstPrimary, identifier.getIdentifier())); break; } // // Rule 501: ConstFieldAccess ::= super . identifier // case 501: { //#line 1265 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1267 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getLeftSpan())), identifier.getIdentifier())); break; } // // Rule 502: ConstFieldAccess ::= ClassName . super$sup . identifier // case 502: { //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ClassName = (Name) getRhsSym(1); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken sup = (IToken) getRhsIToken(3); //#line 1270 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(5); //#line 1272 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Field(pos(getRightSpan()), nf.Super(pos(getRhsFirstTokenIndex(3)), ClassName.toType()), identifier.getIdentifier())); break; } // // Rule 504: X10ArrayType ::= Type [ . ] // case 504: { //#line 1288 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1290 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, null)); break; } // // Rule 505: X10ArrayType ::= Type value [ . ] // case 505: { //#line 1293 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1295 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, null)); break; } // // Rule 506: X10ArrayType ::= Type [ DepParameterExpr ] // case 506: { //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1298 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(3); //#line 1300 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, false, DepParameterExpr)); break; } // // Rule 507: X10ArrayType ::= Type value [ DepParameterExpr ] // case 507: { //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(1); //#line 1303 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameterExpr = (DepParameterExpr) getRhsSym(4); //#line 1305 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.X10ArrayTypeNode(pos(), Type, true, DepParameterExpr)); break; } // // Rule 508: ObjectKind ::= value // case 508: throw new Error("No action specified for rule " + 508); // // Rule 509: ObjectKind ::= reference // case 509: throw new Error("No action specified for rule " + 509); // // Rule 510: MethodModifier ::= atomic // case 510: { //#line 1319 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.ATOMIC); break; } // // Rule 511: MethodModifier ::= extern // case 511: { //#line 1324 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.NATIVE); break; } // // Rule 512: MethodModifier ::= safe // case 512: { //#line 1329 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SAFE); break; } // // Rule 513: MethodModifier ::= sequential // case 513: { //#line 1334 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.SEQUENTIAL); break; } // // Rule 514: MethodModifier ::= local // case 514: { //#line 1339 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.LOCAL); break; } // // Rule 515: MethodModifier ::= nonblocking // case 515: { //#line 1344 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.NON_BLOCKING); break; } // // Rule 517: ValueClassDeclaration ::= X10ClassModifiersopt value identifier PropertyListopt Superopt Interfacesopt ClassBody // case 517: { //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(4); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(5); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(6); //#line 1350 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(7); //#line 1352 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 518: ValueClassDeclaration ::= X10ClassModifiersopt value class identifier PropertyListopt Superopt Interfacesopt ClassBody // case 518: { //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Flags X10ClassModifiersopt = (X10Flags) getRhsSym(1); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(4); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] PropertyListopt = (Object[]) getRhsSym(5); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Superopt = (TypeNode) getRhsSym(6); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Interfacesopt = (List) getRhsSym(7); //#line 1360 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClassBody ClassBody = (ClassBody) getRhsSym(8); //#line 1362 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" checkTypeName(identifier); List/*<PropertyDecl>*/ props = PropertyListopt==null ? null : (List) PropertyListopt[0]; Expr ci = PropertyListopt==null ? null : (Expr) PropertyListopt[1]; setResult(nf.ValueClassDecl(pos(getLeftSpan(), getRightSpan()), X10ClassModifiersopt, identifier.getIdentifier(), props, ci, Superopt, Interfacesopt, ClassBody)); break; } // // Rule 519: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 519: { //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags ConstructorModifiersopt = (Flags) getRhsSym(1); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] ConstructorDeclarator = (Object[]) getRhsSym(2); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List Throwsopt = (List) getRhsSym(3); //#line 1371 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block ConstructorBody = (Block) getRhsSym(4); //#line 1373 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name a = (Name) ConstructorDeclarator[1]; DepParameterExpr c = (DepParameterExpr) ConstructorDeclarator[2]; List b = (List) ConstructorDeclarator[3]; Expr e = (Expr) ConstructorDeclarator[4]; setResult(nf.ConstructorDecl(pos(), ConstructorModifiersopt, a.toString(), c, b, e, Throwsopt, ConstructorBody)); break; } // // Rule 520: ConstructorDeclarator ::= SimpleTypeName DepParametersopt ( FormalParameterListopt WhereClauseopt ) // case 520: { //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name SimpleTypeName = (Name) getRhsSym(1); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParametersopt = (DepParameterExpr) getRhsSym(2); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(4); //#line 1381 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(5); //#line 1383 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] a = new Object[5]; a[1] = SimpleTypeName; a[2] = DepParametersopt; a[3] = FormalParameterListopt; a[4] = WhereClauseopt; setResult(a); break; } // // Rule 521: ThisClause ::= this DepParameters // case 521: { //#line 1391 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr DepParameters = (DepParameterExpr) getRhsSym(2); //#line 1393 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DepParameters); break; } // // Rule 522: Super ::= extends DataType // case 522: { //#line 1397 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode DataType = (TypeNode) getRhsSym(2); //#line 1399 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(DataType); break; } // // Rule 523: MethodDeclarator ::= identifier ( FormalParameterListopt WhereClauseopt ) // case 523: { //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List FormalParameterListopt = (List) getRhsSym(3); //#line 1403 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr WhereClauseopt = (Expr) getRhsSym(4); //#line 1405 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // System.out.println("Parsing methoddeclarator..."); Object[] a = new Object[5]; a[0] = new Name(nf, ts, pos(), identifier.getIdentifier()); a[1] = FormalParameterListopt; a[2] = new Integer(0); a[3] = WhereClauseopt; setResult(a); break; } // // Rule 524: MethodDeclarator ::= MethodDeclarator [ ] // case 524: { //#line 1415 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object[] MethodDeclarator = (Object[]) getRhsSym(1); //#line 1417 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" MethodDeclarator[2] = new Integer(((Integer) MethodDeclarator[2]).intValue() + 1); // setResult(MethodDeclarator); break; } // // Rule 525: FieldDeclaration ::= ThisClauseopt FieldModifiersopt Type VariableDeclarators ; // case 525: { //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" DepParameterExpr ThisClauseopt = (DepParameterExpr) getRhsSym(1); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Flags FieldModifiersopt = (Flags) getRhsSym(2); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1423 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List VariableDeclarators = (List) getRhsSym(4); //#line 1425 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), ClassMember.class, false); if (VariableDeclarators != null && VariableDeclarators.size() > 0) { for (Iterator i = VariableDeclarators.iterator(); i.hasNext();) { X10VarDeclarator d = (X10VarDeclarator) i.next(); if (d.hasExplodedVars()) // TODO: Report this exception correctly. throw new Error("Field Declarations may not have exploded variables." + pos()); d.setFlag(FieldModifiersopt); l.add(nf.FieldDecl(d.position(), ThisClauseopt, d.flags, nf.array(Type, Type.position(), d.dims), d.name, d.init)); } } setResult(l); break; } // // Rule 526: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt Dims ArrayInitializer // case 526: { //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(4); //#line 1459 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ArrayInit ArrayInitializer = (ArrayInit) getRhsSym(5); //#line 1461 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Dims.intValue(), ArrayInitializer)); break; } // // Rule 527: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr Dims // case 527: { //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1465 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dims = (Integer) getRhsSym(5); //#line 1467 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); setResult(nf.NewArray(pos(), ArrayBaseType, Collections.singletonList(DimExpr), Dims.intValue())); break; } // // Rule 528: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt DimExpr DimExprs Dimsopt // case 528: { //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(3); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr DimExpr = (Expr) getRhsSym(4); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List DimExprs = (List) getRhsSym(5); //#line 1471 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Integer Dimsopt = (Integer) getRhsSym(6); //#line 1473 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // setResult(nf.ArrayConstructor(pos(), a, false, null, d)); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(DimExpr); l.addAll(DimExprs); setResult(nf.NewArray(pos(), ArrayBaseType, l, Dimsopt.intValue())); break; } // // Rule 529: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] // case 529: { //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1480 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1482 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, null)); break; } // // Rule 530: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression$distr ] Expression$initializer // case 530: { //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr distr = (Expr) getRhsSym(6); //#line 1485 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr initializer = (Expr) getRhsSym(8); //#line 1487 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, distr, initializer)); break; } // // Rule 531: ArrayCreationExpression ::= new ArrayBaseType Valueopt Unsafeopt [ Expression ] ($lparen FormalParameter ) MethodBody // case 531: { //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode ArrayBaseType = (TypeNode) getRhsSym(2); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Valueopt = (Object) getRhsSym(3); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Object Unsafeopt = (Object) getRhsSym(4); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(6); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken lparen = (IToken) getRhsIToken(8); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(9); //#line 1490 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block MethodBody = (Block) getRhsSym(11); //#line 1492 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr initializer = makeInitializer( pos(getRhsFirstTokenIndex(8), getRightSpan()), ArrayBaseType, FormalParameter, MethodBody ); setResult(nf.ArrayConstructor(pos(), ArrayBaseType, Unsafeopt != null, Valueopt != null, Expression, initializer)); break; } // // Rule 532: Valueopt ::= $Empty // case 532: setResult(null); break; // // Rule 533: Valueopt ::= value // case 533: { //#line 1501 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 536: ArrayBaseType ::= nullable < Type > // case 536: { //#line 1508 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1510 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Nullable(pos(), Type)); break; } // // Rule 537: ArrayBaseType ::= future < Type > // case 537: { //#line 1513 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1515 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), Type)); break; } // // Rule 538: ArrayBaseType ::= ( Type ) // case 538: { //#line 1518 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1520 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Type); break; } // // Rule 539: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 539: { //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name ExpressionName = (Name) getRhsSym(1); //#line 1524 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1526 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), ExpressionName.toExpr(), (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), ExpressionName.toExpr(), ArgumentList)); break; } // // Rule 540: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 540: { //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PrimaryNoNewArray = (Expr) getRhsSym(1); //#line 1531 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ArgumentList = (List) getRhsSym(3); //#line 1533 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" if (ArgumentList.size() == 1) setResult(nf.X10ArrayAccess1(pos(), PrimaryNoNewArray, (Expr) ArgumentList.get(0))); else setResult(nf.X10ArrayAccess(pos(), PrimaryNoNewArray, ArgumentList)); break; } // // Rule 557: NowStatement ::= now ( Clock ) Statement // case 557: { //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1559 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1561 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, Statement)); break; } // // Rule 558: ClockedClause ::= clocked ( ClockList ) // case 558: { //#line 1565 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(3); //#line 1567 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(ClockList); break; } // // Rule 559: AsyncStatement ::= async PlaceExpressionSingleListopt ClockedClauseopt Statement // case 559: { //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1571 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(4); //#line 1573 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, Statement)); break; } // // Rule 560: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 560: { //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1581 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(3); //#line 1583 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Statement)); break; } // // Rule 561: WhenStatement ::= when ( Expression ) Statement // case 561: { //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1590 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(5); //#line 1592 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, Statement)); break; } // // Rule 562: WhenStatement ::= WhenStatement or$or ( Expression ) Statement // case 562: { //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1595 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(6); //#line 1597 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, Statement); setResult(WhenStatement); break; } // // Rule 563: ForEachStatement ::= foreach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 563: { //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1602 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1604 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 564: AtEachStatement ::= ateach ( FormalParameter : Expression ) ClockedClauseopt Statement // case 564: { //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1612 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(8); //#line 1614 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, Statement)); break; } // // Rule 565: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 565: { //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1622 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(7); //#line 1624 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, Statement)); break; } // // Rule 566: FinishStatement ::= finish Statement // case 566: { //#line 1631 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt Statement = (Stmt) getRhsSym(2); //#line 1633 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), Statement)); break; } // // Rule 567: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 567: { //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1638 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1640 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Now(pos(), Clock, StatementNoShortIf)); break; } // // Rule 568: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt ClockedClauseopt StatementNoShortIf // case 568: { //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(3); //#line 1644 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(4); //#line 1646 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Async(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 569: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 569: { //#line 1653 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1655 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Atomic(pos(), nf.Here(pos(getLeftSpan())), StatementNoShortIf)); break; } // // Rule 570: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 570: { //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1659 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(5); //#line 1661 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.When(pos(), Expression, StatementNoShortIf)); break; } // // Rule 571: WhenStatementNoShortIf ::= WhenStatement or$or ( Expression ) StatementNoShortIf // case 571: { //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" When WhenStatement = (When) getRhsSym(1); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IToken or = (IToken) getRhsIToken(2); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1664 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(6); //#line 1666 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" WhenStatement.addBranch(pos(getRhsFirstTokenIndex(2), getRightSpan()), Expression, StatementNoShortIf); setResult(WhenStatement); break; } // // Rule 572: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 572: { //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1671 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1673 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 573: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) ClockedClauseopt StatementNoShortIf // case 573: { //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockedClauseopt = (List) getRhsSym(7); //#line 1682 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(8); //#line 1684 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.AtEach(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, ClockedClauseopt, StatementNoShortIf)); break; } // // Rule 574: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 574: { //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" X10Formal FormalParameter = (X10Formal) getRhsSym(3); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(5); //#line 1692 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(7); //#line 1694 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.ForLoop(pos(), FormalParameter.flags(FormalParameter.flags().Final()), Expression, StatementNoShortIf)); break; } // // Rule 575: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 575: { //#line 1701 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Stmt StatementNoShortIf = (Stmt) getRhsSym(2); //#line 1703 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Finish(pos(), StatementNoShortIf)); break; } // // Rule 576: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 576: { //#line 1708 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpression = (Expr) getRhsSym(2); //#line 1710 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(PlaceExpression); break; } // // Rule 578: NextStatement ::= next ; // case 578: { //#line 1718 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Next(pos())); break; } // // Rule 579: AwaitStatement ::= await Expression ; // case 579: { //#line 1722 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(2); //#line 1724 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Await(pos(), Expression)); break; } // // Rule 580: ClockList ::= Clock // case 580: { //#line 1728 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(1); //#line 1730 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(Clock); setResult(l); break; } // // Rule 581: ClockList ::= ClockList , Clock // case 581: { //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List ClockList = (List) getRhsSym(1); //#line 1735 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Clock = (Expr) getRhsSym(3); //#line 1737 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ClockList.add(Clock); setResult(ClockList); break; } // // Rule 582: Clock ::= Expression // case 582: { //#line 1743 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(1); //#line 1745 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Expression); break; } // // Rule 583: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 583: { //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(2); //#line 1755 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(4); //#line 1757 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Cast(pos(), Type, UnaryExpressionNotPlusMinus)); break; } // // Rule 584: CastExpression ::= ( @ Expression ) UnaryExpressionNotPlusMinus // case 584: { //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1760 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr UnaryExpressionNotPlusMinus = (Expr) getRhsSym(5); //#line 1762 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.PlaceCast(pos(), Expression, UnaryExpressionNotPlusMinus)); break; } // // Rule 585: RelationalExpression ::= RelationalExpression instanceof Type // case 585: { //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RelationalExpression = (Expr) getRhsSym(1); //#line 1772 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" TypeNode Type = (TypeNode) getRhsSym(3); //#line 1774 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Instanceof(pos(), RelationalExpression, Type)); break; } // // Rule 586: IdentifierList ::= identifier // case 586: { //#line 1780 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1782 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(l); break; } // // Rule 587: IdentifierList ::= IdentifierList , identifier // case 587: { //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List IdentifierList = (List) getRhsSym(1); //#line 1787 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(3); //#line 1789 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" IdentifierList.add(new Name(nf, ts, pos(), identifier.getIdentifier())); setResult(IdentifierList); break; } // // Rule 588: Primary ::= here // case 588: { //#line 1796 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(((X10NodeFactory) nf).Here(pos()));//// A "here" expression used to be treated as an ExpressionName instead// of as a primary.//// setResult(new Name(nf, ts, pos(), "here"){// public Expr toExpr() {// return ((X10NodeFactory) nf).Here(pos);// }// }); break; } // // Rule 591: RegionExpression ::= Expression$expr1 : Expression$expr2 // case 591: { //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1812 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1814 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" /*Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(expr1); l.add(expr2); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); */ Call regionCall = nf.RegionMaker(pos(), expr1, expr2); setResult(regionCall); break; } // // Rule 592: RegionExpressionList ::= RegionExpression // case 592: { //#line 1830 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(1); //#line 1832 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List l = new TypedList(new LinkedList(), Expr.class, false); l.add(RegionExpression); setResult(l); break; } // // Rule 593: RegionExpressionList ::= RegionExpressionList , RegionExpression // case 593: { //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(1); //#line 1837 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr RegionExpression = (Expr) getRhsSym(3); //#line 1839 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" RegionExpressionList.add(RegionExpression); //setResult(RegionExpressionList); break; } // // Rule 594: Primary ::= [ RegionExpressionList ] // case 594: { //#line 1844 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" List RegionExpressionList = (List) getRhsSym(2); //#line 1846 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangRegion = new Name(nf, ts, pos(), x10Lang, "region"); Name x10LangRegionFactory = new Name(nf, ts, pos(), x10LangRegion, "factory"); Name x10LangRegionFactoryRegion = new Name(nf, ts, pos(), x10LangRegionFactory, "region"); Name x10LangPoint = new Name(nf, ts, pos(), x10Lang, "point"); Name x10LangPointFactory = new Name(nf, ts, pos(), x10LangPoint, "factory"); Name x10LangPointFactoryPoint = new Name(nf, ts, pos(), x10LangPointFactory, "point"); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, RegionExpressionList); setResult(tuple); break; } // // Rule 595: AssignmentExpression ::= Expression$expr1 -> Expression$expr2 // case 595: { //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr1 = (Expr) getRhsSym(1); //#line 1860 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr expr2 = (Expr) getRhsSym(3); //#line 1862 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" ConstantDistMaker call = nf.ConstantDistMaker(pos(), expr1, expr2); setResult(call); break; } // // Rule 596: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 596: { //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr PlaceExpressionSingleListopt = (Expr) getRhsSym(2); //#line 1867 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(4); //#line 1869 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(nf.Future(pos(), (PlaceExpressionSingleListopt == null ? nf.Here(pos(getLeftSpan())) : PlaceExpressionSingleListopt), Expression)); break; } // // Rule 597: FieldModifier ::= mutable // case 597: { //#line 1877 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.MUTABLE); break; } // // Rule 598: FieldModifier ::= const // case 598: { //#line 1882 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 599: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 599: throw new Error("No action specified for rule " + 599); // // Rule 600: MethodInvocation ::= MethodName ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 600: throw new Error("No action specified for rule " + 600); // // Rule 601: MethodInvocation ::= Primary . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 601: throw new Error("No action specified for rule " + 601); // // Rule 602: MethodInvocation ::= super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 602: throw new Error("No action specified for rule " + 602); // // Rule 603: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 603: throw new Error("No action specified for rule " + 603); // // Rule 604: MethodInvocation ::= TypeName . identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) // case 604: throw new Error("No action specified for rule " + 604); // // Rule 605: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 605: throw new Error("No action specified for rule " + 605); // // Rule 606: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 606: throw new Error("No action specified for rule " + 606); // // Rule 607: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt$args1 ) ( ArgumentListopt$args2 ) ClassBodyopt // case 607: throw new Error("No action specified for rule " + 607); // // Rule 608: MethodModifier ::= synchronized // case 608: { //#line 1913 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"synchronized\" is an invalid X10 Method Modifier"); setResult(Flags.SYNCHRONIZED); break; } // // Rule 609: FieldModifier ::= volatile // case 609: { //#line 1922 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "\"volatile\" is an invalid X10 Field Modifier"); setResult(Flags.VOLATILE); break; } // // Rule 610: SynchronizedStatement ::= synchronized ( Expression ) Block // case 610: { //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Expr Expression = (Expr) getRhsSym(3); //#line 1929 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" Block Block = (Block) getRhsSym(5); //#line 1931 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" unrecoverableSyntaxError = true; eq.enqueue(ErrorInfo.SYNTAX_ERROR, getErrorLocation(getLeftSpan(), getRightSpan()) + "Synchronized Statement is invalid in X10"); setResult(nf.Synchronized(pos(), Expression, Block)); break; } // // Rule 611: ThisClauseopt ::= $Empty // case 611: setResult(null); break; // // Rule 613: PlaceTypeSpecifieropt ::= $Empty // case 613: setResult(null); break; // // Rule 615: DepParametersopt ::= $Empty // case 615: setResult(null); break; // // Rule 617: PropertyListopt ::= $Empty // case 617: setResult(null); break; // // Rule 619: WhereClauseopt ::= $Empty // case 619: setResult(null); break; // // Rule 621: ObjectKindopt ::= $Empty // case 621: setResult(null); break; // // Rule 623: ArrayInitializeropt ::= $Empty // case 623: setResult(null); break; // // Rule 625: PlaceExpressionSingleListopt ::= $Empty // case 625: setResult(null); break; // // Rule 627: ArgumentListopt ::= $Empty // case 627: setResult(null); break; // // Rule 629: X10ClassModifiersopt ::= $Empty // case 629: { //#line 1977 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(X10Flags.toX10Flags(Flags.NONE)); break; } // // Rule 631: DepParametersopt ::= $Empty // case 631: setResult(null); break; // // Rule 633: Unsafeopt ::= $Empty // case 633: setResult(null); break; // // Rule 634: Unsafeopt ::= unsafe // case 634: { //#line 1989 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" // any value distinct from null setResult(this); break; } // // Rule 635: ParamIdopt ::= $Empty // case 635: setResult(null); break; // // Rule 636: ParamIdopt ::= identifier // case 636: { //#line 1996 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" polyglot.lex.Identifier identifier = (polyglot.lex.Identifier) getRhsSym(1); //#line 1998 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new Name(nf, ts, pos(), identifier.getIdentifier())); break; } // // Rule 637: ClockedClauseopt ::= $Empty // case 637: { //#line 2004 "C:/eclipse/ws6/x10.compiler/src/x10/parser/x10.g" setResult(new TypedList(new LinkedList(), Expr.class, false)); break; } default: break; } return; }
1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/13a8963410bb8c85885791a761267a089892a2fc/X10Parser.java/clean/x10.compiler/src/x10/parser/X10Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 21036, 493, 33, 21036, 263, 1068, 548, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 21036, 493, 33, 21036, 263, 1068, 548, 54...
private void resolveOnlyWeaponAttacks() { Vector results = new Vector(game.actionsSize()); // loop thru received attack actions, getting weapon results for (Enumeration i = game.getActions(); i.hasMoreElements();) { Object o = i.nextElement(); if (o instanceof WeaponAttackAction) { WeaponAttackAction waa = (WeaponAttackAction)o; results.addElement(preTreatWeaponAttack(waa)); } } // loop through weapon results and resolve int cen = Entity.NONE; for (Enumeration i = results.elements(); i.hasMoreElements();) { WeaponResult wr = (WeaponResult)i.nextElement(); resolveWeaponAttack(wr, cen); cen = wr.waa.getEntityId(); } // and clear the attacks Vector game.resetActions(); }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/1ecffa782704db8af19ae40d43a2c0659881281b/Server.java/buggy/megamek/src/megamek/server/Server.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2245, 3386, 3218, 28629, 3075, 22098, 1435, 288, 3639, 5589, 1686, 273, 394, 5589, 12, 13957, 18, 4905, 1225, 10663, 7734, 368, 2798, 286, 8653, 5079, 13843, 4209, 16, 8742, 732,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2245, 3386, 3218, 28629, 3075, 22098, 1435, 288, 3639, 5589, 1686, 273, 394, 5589, 12, 13957, 18, 4905, 1225, 10663, 7734, 368, 2798, 286, 8653, 5079, 13843, 4209, 16, 8742, 732,...
for (Iterator names = modifiedWCProps.keySet().iterator(); names.hasNext();) {
for (Iterator names = modifiedWCProps.keySet().iterator(); names.hasNext();) {
public void logChangedWCProperties(String name, Map modifiedWCProps) throws SVNException { if (modifiedWCProps != null) { Map command = new HashMap(); command.put(SVNLog.NAME_ATTR, name); for (Iterator names = modifiedWCProps.keySet().iterator(); names.hasNext();) { String propName = (String) names.next(); String propValue = (String) modifiedWCProps.get(propName); command.put(SVNLog.PROPERTY_NAME_ATTR, propName); if (propValue != null) { command.put(SVNLog.PROPERTY_VALUE_ATTR, propValue); } else { command.remove(SVNLog.PROPERTY_VALUE_ATTR); } addCommand(SVNLog.MODIFY_WC_PROPERTY, command, false); } } }
5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/8e9f923366b989c3c62646476940df918b6a732b/SVNLog.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/wc/SVNLog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 613, 5033, 59, 39, 2297, 12, 780, 508, 16, 1635, 4358, 59, 39, 5047, 13, 1216, 29537, 50, 503, 288, 3639, 309, 261, 7342, 59, 39, 5047, 480, 446, 13, 288, 5411, 1635, 1296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 613, 5033, 59, 39, 2297, 12, 780, 508, 16, 1635, 4358, 59, 39, 5047, 13, 1216, 29537, 50, 503, 288, 3639, 309, 261, 7342, 59, 39, 5047, 480, 446, 13, 288, 5411, 1635, 1296,...
String objectToString(Object object)
String objectToString(final Object object)
String objectToString(Object object) { if (object == Undefined.instance) { return "undefined"; } if (object == null) { return "null"; } if (object instanceof NativeCall) { return "[object Call]"; } Context cx = Context.enter(); try { return Context.toString(object); } finally { Context.exit(); } }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/daf6b75edbd23fda1750716a43bd235c561fef2b/Dim.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Dim.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 514, 733, 5808, 12, 6385, 1033, 733, 13, 565, 288, 3639, 309, 261, 1612, 422, 22243, 18, 1336, 13, 288, 5411, 327, 315, 5978, 14432, 3639, 289, 3639, 309, 261, 1612, 422, 446, 13, 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, 514, 733, 5808, 12, 6385, 1033, 733, 13, 565, 288, 3639, 309, 261, 1612, 422, 22243, 18, 1336, 13, 288, 5411, 327, 315, 5978, 14432, 3639, 289, 3639, 309, 261, 1612, 422, 446, 13, 288, ...
return getMultiPageEditor().getSite().getShell(); }
return getMultiPageEditor().getSite().getShell(); }
public Shell getShell() { return getMultiPageEditor().getSite().getShell(); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/f1c8b0aa355c00a6c82a289c808984de6778bfca/MultiPageEditorSite.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19433, 7932, 1165, 1435, 288, 3639, 327, 31863, 1964, 6946, 7675, 588, 4956, 7675, 588, 13220, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19433, 7932, 1165, 1435, 288, 3639, 327, 31863, 1964, 6946, 7675, 588, 4956, 7675, 588, 13220, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
synchronized (legions)
Iterator it = legions.iterator(); while (it.hasNext())
List getLegionIds() { List ids = new ArrayList(); synchronized (legions) { Iterator it = legions.iterator(); while (it.hasNext()) { Legion legion = (Legion)it.next(); ids.add(legion.getMarkerId()); } } return ids; }
51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/8d1ec51f9e7290b8276a6f9e736af457e9465186/Player.java/clean/Colossus/net/sf/colossus/server/Player.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 987, 336, 8329, 285, 2673, 1435, 565, 288, 3639, 987, 3258, 273, 394, 2407, 5621, 3639, 4498, 518, 273, 4553, 1115, 18, 9838, 5621, 1323, 261, 305, 18, 5332, 2134, 10756, 3639, 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, 987, 336, 8329, 285, 2673, 1435, 565, 288, 3639, 987, 3258, 273, 394, 2407, 5621, 3639, 4498, 518, 273, 4553, 1115, 18, 9838, 5621, 1323, 261, 305, 18, 5332, 2134, 10756, 3639, 288, 5411,...
index += VM_HardwarePerformanceMonitors.SIZE_OF_INT;
index = index.add(BYTES_IN_INT);
private void writeAppRun(int FORMAT, int run, byte[] app, int padding) { VM_Magic.setIntAtOffset( buffer, index, FORMAT); // format index += VM_HardwarePerformanceMonitors.SIZE_OF_INT; VM_Magic.setIntAtOffset( buffer, index, run); // run index += VM_HardwarePerformanceMonitors.SIZE_OF_INT; index = VM_HardwarePerformanceMonitors.writeStringToBuffer(buffer, index, app); // app name if (VM_HardwarePerformanceMonitors.verbose>=3) { VM.sysWrite ("writeAppRun(",FORMAT,", ",run); VM.sysWrite (") n_records ",n_records); VM.sysWriteln(", missed ",missed_records); } if (padding != 0) { addPadding(4-padding); } }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/3a1409586ed0fc007c4120f3a96d6f7a1ae3593c/VM_HardwarePerformanceMonitor.java/buggy/rvm/src/vm/HPM/VM_HardwarePerformanceMonitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 1045, 3371, 1997, 12, 474, 10449, 16, 509, 1086, 16, 1160, 8526, 595, 16, 509, 4992, 13, 225, 288, 565, 8251, 67, 19289, 18, 542, 1702, 861, 2335, 12, 1613, 16, 770, 16, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 3371, 1997, 12, 474, 10449, 16, 509, 1086, 16, 1160, 8526, 595, 16, 509, 4992, 13, 225, 288, 565, 8251, 67, 19289, 18, 542, 1702, 861, 2335, 12, 1613, 16, 770, 16, 10...
if (reg.isDouble()) continue; if (reg.isFloatingPoint())
if (reg.isInteger())
public OPT_FI_EscapeSummary simpleEscapeAnalysis (OPT_IR ir) { if (DEBUG) VM.sysWrite("ENTER Simple Escape Analysis " + ir.method + "\n"); if (DEBUG) ir.printInstructions(); // create a method summary object for this method VM_Method m = ir.method; OPT_MethodSummary summ = OPT_SummaryDatabase.findOrCreateMethodSummary(m); summ.setInProgress(true); OPT_FI_EscapeSummary result = new OPT_FI_EscapeSummary(); // set up register lists, SSA flags OPT_DefUse.computeDU(ir); OPT_DefUse.recomputeSSA(ir); // pass through registers, and mark escape information for (OPT_Register reg = ir.regpool.getFirstSymbolicRegister(); reg != null; reg = reg.getNext()) { // skip the following types of registers: if (reg.isFloat()) continue; if (reg.isDouble()) continue; if (reg.isFloatingPoint()) continue; if (reg.isLong()) continue; if (reg.isCondition()) continue; if (reg.isValidation()) continue; if (reg.isPhysical()) continue; if (!reg.isSSA()) continue; AnalysisResult escapes = checkAllAppearances(reg, ir); if (escapes.threadLocal) { result.setThreadLocal(reg, true); } if (escapes.methodLocal) { result.setMethodLocal(reg, true); } } // update the method summary database to note whether // parameters may escape int numParam = 0; for (OPT_OperandEnumeration e = ir.getParameters(); e.hasMoreElements(); numParam++) { OPT_Register p = ((OPT_RegisterOperand)e.next()).register; if (result.isThreadLocal(p)) { summ.setParameterMayEscapeThread(numParam, false); } else { summ.setParameterMayEscapeThread(numParam, true); } } // update the method summary to note whether the return value // may escape boolean foundEscapingReturn = false; for (Enumeration e = enumerateReturnValues(ir); e.hasMoreElements();) { OPT_Operand op = (OPT_Operand)e.nextElement(); if (op == null) continue; if (op.isRegister()) { OPT_Register r = op.asRegister().register; if (!result.isThreadLocal(r)) { foundEscapingReturn = true; } } } if (!foundEscapingReturn) summ.setResultMayEscapeThread(false); // record that we're done with analysis summ.setInProgress(false); if (DEBUG) VM.sysWrite("LEAVE Simple Escape Analysis " + ir.method + "\n"); return result; }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/b372860b0bca12a1b3850b17dde0b867223b735d/OPT_SimpleEscape.java/buggy/rvm/src/vm/compilers/optimizing/optimizations/global/simpleSSA/escape/OPT_SimpleEscape.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 16456, 67, 1653, 67, 8448, 4733, 4143, 8448, 9418, 261, 15620, 67, 7937, 9482, 13, 288, 565, 309, 261, 9394, 13, 1377, 8251, 18, 9499, 3067, 2932, 12278, 4477, 18025, 16318, 315, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 16456, 67, 1653, 67, 8448, 4733, 4143, 8448, 9418, 261, 15620, 67, 7937, 9482, 13, 288, 565, 309, 261, 9394, 13, 1377, 8251, 18, 9499, 3067, 2932, 12278, 4477, 18025, 16318, 315, 39...
fileName = dialog.open( ).trim( ); if ( fileName == null || fileName.length( ) == 0 )
fileName = dialog.open( ); if ( fileName == null || fileName.trim().length( ) == 0 )
public void handleEvent( Event event ) { String fileName = null; FileDialog dialog = new FileDialog( getShell( ), SWT.OPEN ); dialog.setText( Messages.getString( "ThumbnailBuilder.FileDialog.Title" ) ); //$NON-NLS-1$ dialog.setFilterExtensions( IMAGE_FILTER ); fileName = dialog.open( ).trim( ); if ( fileName == null || fileName.length( ) == 0 ) { return; } if ( checkExtensions( fileName ) == false ) { ExceptionHandler.openErrorMessageBox( Messages.getString( "ThumbnailBuilder.FileDialog.FileNameError.Title" ), Messages.getString( "ThumbnailBuilder.FileDialog.FileNameError.Message" ) ); return; } removeImage( ); isGenerated = false; hasThumbnail = true; image = new Image( null, fileName ); previewThumbnail.setVisible( false ); previewCanvas.setVisible( true ); previewCanvas.loadImage( image ); // previewCanvas.showOriginal( ); btnRemove.setEnabled( true ); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4f58f9dd90503f33f1ca87329e899468d7480d36/ThumbnailBuilder.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ThumbnailBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 2587, 871, 262, 202, 202, 95, 1082, 202, 780, 3968, 273, 446, 31, 1082, 202, 812, 6353, 6176, 273, 394, 1387, 6353, 12, 7932, 1165, 12, 262, 16, 348, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 2587, 871, 262, 202, 202, 95, 1082, 202, 780, 3968, 273, 446, 31, 1082, 202, 812, 6353, 6176, 273, 394, 1387, 6353, 12, 7932, 1165, 12, 262, 16, 348, 8...
p.getDriver().sendPatch(p);
((ISingleDriver)p.getDriver()).sendPatch(p);
public void sendSelectedPatch() { p.getDriver().calculateChecksum(p); p.getDriver().sendPatch(p); }
7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/af6640fd9aa925c4d7044770be761a3432d7c66e/PatchEditorFrame.java/clean/JSynthLib/core/PatchEditorFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1366, 7416, 7332, 1435, 288, 3639, 293, 18, 588, 4668, 7675, 11162, 10723, 12, 84, 1769, 3639, 14015, 5127, 1714, 4668, 13, 84, 18, 588, 4668, 1435, 2934, 4661, 7332, 12, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1366, 7416, 7332, 1435, 288, 3639, 293, 18, 588, 4668, 7675, 11162, 10723, 12, 84, 1769, 3639, 14015, 5127, 1714, 4668, 13, 84, 18, 588, 4668, 1435, 2934, 4661, 7332, 12, 84, ...
newElem.setDescription( (String) rowVector.elementAt(6) );
newElem.setDescription( (String) rowVector.elementAt(7) );
public void doSave(Object settings, boolean validateOnly) throws Exception { SwingUtilities.invokeAndWait( new Runnable(){ public void run() { ((MEditTableJPanel)configClientToSiteJPanel).getJTable().getCellEditor().stopCellEditing(); ((MEditTableJPanel)configClientToSiteJPanel).getJTable().clearSelection(); filteredDataVector = ((MEditTableJPanel)configClientToSiteJPanel).getTableModel().getFilteredDataVector(); exception = null; elemList = new ArrayList<VpnClient>(filteredDataVector.size()); VpnClient newElem = null; int rowIndex = 0; for( Vector rowVector : filteredDataVector ){ rowIndex++; newElem = new VpnClient(); newElem.setDistributeClient(false); newElem.setLive( (Boolean) rowVector.elementAt(2) ); newElem.setName( (String) rowVector.elementAt(3) ); newElem.setGroup( (VpnGroup) ((ComboBoxModel) rowVector.elementAt(4)).getSelectedItem() ); newElem.setDescription( (String) rowVector.elementAt(6) ); elemList.add(newElem); } }}); if( exception != null) throw exception; if( !validateOnly ){ try{ ServerRoutingWizard.getInfiniteProgressJComponent().startLater("Adding VPN Clients..."); ClientList clientList = new ClientList(elemList); vpnTransform.setClients(clientList); ServerRoutingWizard.getInfiniteProgressJComponent().stopLater(1500l); } catch(Exception e){ ServerRoutingWizard.getInfiniteProgressJComponent().stopLater(-1l); throw e; } } }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/b38e01d9c4ce757d2e03478dd806dc130acda0f1/ServerRoutingWizardClientsJPanel.java/buggy/tran/openvpn/gui/com/metavize/tran/openvpn/gui/ServerRoutingWizardClientsJPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 4755, 12, 921, 1947, 16, 1250, 1954, 3386, 13, 1216, 1185, 288, 202, 6050, 310, 11864, 18, 14407, 1876, 5480, 12, 394, 10254, 1435, 95, 1071, 918, 1086, 1435, 288, 202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 4755, 12, 921, 1947, 16, 1250, 1954, 3386, 13, 1216, 1185, 288, 202, 6050, 310, 11864, 18, 14407, 1876, 5480, 12, 394, 10254, 1435, 95, 1071, 918, 1086, 1435, 288, 202, ...
return statusFilter; }
return statusFilter; }
public List<String> getStatusFilter() { return statusFilter; }
47044 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47044/f705b6b4061f18824619feedc8e55c73de10e185/InstanceFilter.java/buggy/bpel-api/src/main/java/org/apache/ode/bpel/common/InstanceFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 987, 32, 780, 34, 5870, 1586, 1435, 288, 565, 327, 1267, 1586, 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, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 987, 32, 780, 34, 5870, 1586, 1435, 288, 565, 327, 1267, 1586, 31, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return rootPointer;
return (Pointer) rootPointer.clone();
public synchronized Pointer getContextPointer() { if (rootPointer == null) { rootPointer = NodePointer.newNodePointer(new QName(null, "root"), getContextBean(), getLocale()); } return rootPointer; }
52531 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52531/2cff9ca4984e054467e6b0efb20d7c462762635a/JXPathContextReferenceImpl.java/buggy/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 7107, 6474, 4926, 1435, 288, 3639, 309, 261, 3085, 4926, 422, 446, 13, 288, 5411, 1365, 4926, 273, 2029, 4926, 18, 2704, 907, 4926, 12, 2704, 16723, 12, 2011, 16, 315, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7107, 6474, 4926, 1435, 288, 3639, 309, 261, 3085, 4926, 422, 446, 13, 288, 5411, 1365, 4926, 273, 2029, 4926, 18, 2704, 907, 4926, 12, 2704, 16723, 12, 2011, 16, 315, 3085, ...
return schema; }
return schema; }
public Schema getSchema() throws OLAPException { return schema; }
37907 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/37907/b5b5168edc3af09cb74945a80b0c36e6630ed502/MondrianJolapDimension.java/buggy/src/main/mondrian/jolap/MondrianJolapDimension.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 4611, 11088, 1435, 1216, 531, 48, 2203, 503, 288, 202, 202, 2463, 1963, 31, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4611, 11088, 1435, 1216, 531, 48, 2203, 503, 288, 202, 202, 2463, 1963, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if(getFlag(LOADING) || getFlag(READ_ONLY)) return; if(getFlag(DIRTY) && getFlag(AUTOSAVE_DIRTY)) return; setFlag(DIRTY,true); setFlag(AUTOSAVE_DIRTY,true);
if(isEditable()) { setFlag(DIRTY,true); setFlag(AUTOSAVE_DIRTY,true); }
public void setDirty(boolean d) { boolean old_d = getFlag(DIRTY); if(d) { if(getFlag(LOADING) || getFlag(READ_ONLY)) return; if(getFlag(DIRTY) && getFlag(AUTOSAVE_DIRTY)) return; setFlag(DIRTY,true); setFlag(AUTOSAVE_DIRTY,true); } else { setFlag(DIRTY,false); setFlag(AUTOSAVE_DIRTY,false); if(autosaveFile != null) autosaveFile.delete(); // fixes dirty flag not being reset on // save/insert/undo/redo/undo if(!getFlag(UNDO_IN_PROGRESS)) { // this ensures that undo can clear the dirty flag properly // when all edits up to a save are undone undoMgr.bufferSaved(); } } if(d != old_d) { EditBus.send(new BufferUpdate(this,null, BufferUpdate.DIRTY_CHANGED)); } } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/9cacca6aaa265acdb4ed19b91aed40829c2df702/Buffer.java/buggy/org/gjt/sp/jedit/Buffer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 10785, 12, 6494, 302, 13, 202, 95, 202, 202, 6494, 1592, 67, 72, 273, 336, 4678, 12, 4537, 5538, 1769, 202, 202, 430, 12, 72, 13, 202, 202, 95, 1082, 202, 430, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 10785, 12, 6494, 302, 13, 202, 95, 202, 202, 6494, 1592, 67, 72, 273, 336, 4678, 12, 4537, 5538, 1769, 202, 202, 430, 12, 72, 13, 202, 202, 95, 1082, 202, 430, 1...
iVisited.accept(_Payload);
_Payload.visitAndNode(iVisited);
public void visitAndNode(AndNode iVisited) { iVisited.getFirstNode().accept(this); iVisited.accept(_Payload); iVisited.getSecondNode().accept(this); }
49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/043fa4419ad506aa6f8843684eb8114b226fe4b5/DefaultIteratorVisitor.java/clean/org/jruby/nodes/visitor/DefaultIteratorVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 1876, 907, 12, 1876, 907, 277, 30019, 13, 288, 202, 202, 77, 30019, 18, 588, 3759, 907, 7675, 9436, 12, 2211, 1769, 202, 202, 77, 30019, 18, 9436, 24899, 6110, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3757, 1876, 907, 12, 1876, 907, 277, 30019, 13, 288, 202, 202, 77, 30019, 18, 588, 3759, 907, 7675, 9436, 12, 2211, 1769, 202, 202, 77, 30019, 18, 9436, 24899, 6110, 1769...
parameters.put( "version", "1.0.0" );
mojo.setPackageWithVersion( Boolean.TRUE );
public void testModelloJavaMojo() throws Exception { ModelloCore modelloCore = (ModelloCore) lookup( ModelloCore.ROLE ); ModelloJavaMojo mojo = new ModelloJavaMojo(); File outputDirectory = getTestFile( "target/java-test" ); FileUtils.deleteDirectory( outputDirectory ); // ---------------------------------------------------------------------- // Call the mojo // ---------------------------------------------------------------------- Map parameters = new HashMap(); parameters.put( "outputDirectory", outputDirectory.getAbsolutePath() ); parameters.put( "model", getTestPath( "src/test/resources/java-model.mdo" ) ); parameters.put( "version", "1.0.0" ); parameters.put( "packageWithVersion", "true" ); parameters.put( "modelloCore", modelloCore ); PluginExecutionRequest request = new PluginExecutionRequest( parameters ); PluginExecutionResponse response = new PluginExecutionResponse(); mojo.execute( request, response ); // ---------------------------------------------------------------------- // Assert // ---------------------------------------------------------------------- File javaFile = new File( outputDirectory, "org/codehaus/mojo/modello/javatest/v1_0_0/Model.java" ); assertTrue( "The generated java file doesn't exist: '" + javaFile.getAbsolutePath() + "'.", javaFile.exists() ); }
47828 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47828/9fce0b24c4f559cdd170c9a5c8cc4d2c5d954503/ModelloJavaMojoTest.java/buggy/modello/modello-maven-plugin/src/test/java/org/codehaus/modello/ModelloJavaMojoTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1488, 383, 5852, 49, 10007, 1435, 3639, 1216, 1185, 565, 288, 3639, 3164, 383, 4670, 938, 383, 4670, 273, 261, 1488, 383, 4670, 13, 3689, 12, 3164, 383, 4670, 18, 16256, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1488, 383, 5852, 49, 10007, 1435, 3639, 1216, 1185, 565, 288, 3639, 3164, 383, 4670, 938, 383, 4670, 273, 261, 1488, 383, 4670, 13, 3689, 12, 3164, 383, 4670, 18, 16256, ...
ps.print(encode.encode(server + " " + usrName + " " + pwd + " " + port + " " + Boolean.valueOf(useTCP).toString()));
ps.print(encode.encode(server + "\n" + usrName + "\n" + pwd + "\n" + port + "\n" + Boolean.valueOf(useTCP).toString()));
private void saveLoginInfo(String server, String usrName, String pwd, String port, boolean useTCP) { Encoder encode = new Encoder(); try { OutputStream os = Persistence.get().getOutputStream("user.dat"); PrintStream ps = new PrintStream(os); ps.print(encode.encode(server + " " + usrName + " " + pwd + " " + port + " " + Boolean.valueOf(useTCP).toString())); ps.close(); } catch (IOException ioex) { JOptionPane .showMessageDialog( this, "Something went wrong when saving login information, nothing saved", "Login information save problem", JOptionPane.WARNING_MESSAGE); } }
4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/3e642b0a4d33a93fe7b92763fa7fb069e1b6ae2a/LoginDialog.java/clean/src/games/stendhal/client/gui/LoginDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1923, 5358, 966, 12, 780, 1438, 16, 514, 16575, 461, 16, 514, 14720, 16, 1082, 202, 780, 1756, 16, 1250, 999, 13891, 13, 288, 202, 202, 7204, 2017, 273, 394, 13554, 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, 1923, 5358, 966, 12, 780, 1438, 16, 514, 16575, 461, 16, 514, 14720, 16, 1082, 202, 780, 1756, 16, 1250, 999, 13891, 13, 288, 202, 202, 7204, 2017, 273, 394, 13554, 5621...
this(container, config, new ConstructorInjectionComponentAdapterFactory());
componentAdapterFactory_ = componentAdapterFactory; container_ = container; MutablePicoContainer parent = container.getContainer(); filterPico_ = parent; orb_ = (ORB) parent.getComponentInstanceOfType(ORB.class); logger_ = LogUtil.getLogger(config, getClass().getName()); loadFilterPlugins(config);
public DefaultFilterFactoryDelegate(IContainer container, Configuration config) { this(container, config, new ConstructorInjectionComponentAdapterFactory()); }
46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/b0fbbbc9e38577618188610bbe2a22de8ecfaab7/DefaultFilterFactoryDelegate.java/clean/src/org/jacorb/notification/filter/DefaultFilterFactoryDelegate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2989, 1586, 1733, 9586, 12, 45, 2170, 1478, 16, 4659, 642, 13, 565, 288, 3639, 1794, 4216, 1733, 67, 273, 1794, 4216, 1733, 31, 225, 1478, 67, 273, 1478, 31, 225, 10960, 52, 10764...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2989, 1586, 1733, 9586, 12, 45, 2170, 1478, 16, 4659, 642, 13, 565, 288, 3639, 1794, 4216, 1733, 67, 273, 1794, 4216, 1733, 31, 225, 1478, 67, 273, 1478, 31, 225, 10960, 52, 10764...
assertInstanceOf( webClient.getPage( new URL( "https:
assertInstanceOf( webClient.getPage( new URL( "https: HtmlPage.class );
public void testSourceForge_secure() throws Exception { try { final WebClient webClient = new WebClient(BrowserVersion_); webClient.setPrintContentOnFailingStatusCode(true); assertInstanceOf( webClient.getPage( new URL( "https://sourceforge.net/projects/htmlunit/" ) ), HtmlPage.class ); } catch( final MalformedURLException e ) { System.out.println("Skipping https test: "+getName()); } }
47843 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47843/ce8302ac28bf1fb5d0cc242a8bf82d819d0eac2c/SanityCheck.java/clean/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/SanityCheck.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 1830, 1290, 908, 67, 8869, 1435, 1216, 1185, 288, 3639, 775, 288, 5411, 727, 2999, 1227, 3311, 1227, 273, 394, 2999, 1227, 12, 9132, 1444, 67, 1769, 5411, 3311, 1227, 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, 918, 1842, 1830, 1290, 908, 67, 8869, 1435, 1216, 1185, 288, 3639, 775, 288, 5411, 727, 2999, 1227, 3311, 1227, 273, 394, 2999, 1227, 12, 9132, 1444, 67, 1769, 5411, 3311, 1227, 18,...
- (prePeek + bottomPeek + Math.max((initFire - 2), 0) * pop);
- initItemsNeeded;
private int calculateRemaining() { // the number of times this filter fires in the initialization // schedule int initFire = initMult; // if this is not a twostage, fake it by adding to initFire, // so we always think the preWork is called // if (!(filter instanceof SIRTwoStageFilter)) if (!filter.isTwoStage()) initFire++; // see my thesis for an explanation of this calculation if (initFire - 1 > 0) { bottomPeek = Math.max(0, peek - (prePeek - prePop)); } else bottomPeek = 0; // don't call initItemsReceived() here it // may cause an infinite loop because it creates filter infos int initItemsRec = 0; if (traceNode.getPrevious().isFilterTrace()) { FilterContent filterC = ((FilterTraceNode) traceNode.getPrevious()) .getFilter(); initItemsRec = filterC.getPushInt() * filterC.getInitMult(); if (filterC.isTwoStage()) { initItemsRec -= filterC.getPushInt(); initItemsRec += filterC.getInitPush(); } } else { // previous is an input trace InputTraceNode in = (InputTraceNode) traceNode.getPrevious(); // add all the upstream filters items that reach this filter for (int i = 0; i < in.getWeights().length; i++) { Edge incoming = in.getSources()[i]; FilterContent filterC = ((FilterTraceNode) incoming.getSrc() .getPrevious()).getFilter(); // calculate the init items sent by the upstream filter int upstreamInitItems = 0; upstreamInitItems = filterC.getPushInt() * filterC.getInitMult(); if (filterC.isTwoStage()) { upstreamInitItems -= filterC.getPushInt(); upstreamInitItems += filterC.getInitPush(); } initItemsRec += (int) ((double) upstreamInitItems * incoming .getSrc().ratio(incoming)); } } remaining = initItemsRec - (prePeek + bottomPeek + Math.max((initFire - 2), 0) * pop); assert remaining >= 0 : filter.getName() + ": Error calculating remaining " + initItemsRec + " < " + (prePeek + bottomPeek + Math.max((initFire - 2), 0) * pop); return remaining; }
5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/e0d1d883cbfe8463aae88672e4adf65f19971500/FilterInfo.java/clean/streams/src/at/dms/kjc/spacetime/FilterInfo.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 4604, 11429, 1435, 288, 3639, 368, 326, 1300, 434, 4124, 333, 1034, 29564, 316, 326, 10313, 3639, 368, 4788, 3639, 509, 1208, 9723, 273, 1208, 5049, 31, 3639, 368, 309, 333, 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, 3238, 509, 4604, 11429, 1435, 288, 3639, 368, 326, 1300, 434, 4124, 333, 1034, 29564, 316, 326, 10313, 3639, 368, 4788, 3639, 509, 1208, 9723, 273, 1208, 5049, 31, 3639, 368, 309, 333, 35...
throw new TaskExecutionException("Unexpected, multiple output names for ArrayType");
throw new TaskExecutionException( "Unexpected, multiple output names for ArrayType");
public Map execute(Map inputMap) throws TaskExecutionException { DataThing inputThing = (DataThing) inputMap.get(inputNames[0]); Map result = new HashMap(); List outputNameList = Arrays.asList(outputNames); if (inputThing != null) { String xml = inputThing.getDataObject().toString(); try { Document doc = new SAXBuilder().build(new StringReader(xml)); List children = doc.getRootElement().getChildren(); if (typeDescriptor instanceof ArrayTypeDescriptor) { if (outputNames.length > 1) throw new TaskExecutionException("Unexpected, multiple output names for ArrayType"); executeForArrayType(result, children); } else { executeForComplexType(result, outputNameList, children); } // populate missing outputs with empty strings for basic types, // empty elements for complex/array types. for (int i = 0; i < outputNames.length; i++) { if (result.get(outputNames[i]) == null) { if (outputTypes[i].equals("'text/xml'")) { result.put(outputNames[i], new DataThing("<" + outputNames[i] + " />")); } else if (outputTypes[i].startsWith("l('")) { result.put(outputNames[i], DataThingFactory.bake(new ArrayList())); } else { result.put(outputNames[i], new DataThing("")); } } } } catch (JDOMException e) { throw new TaskExecutionException("Unable to parse XML: " + xml, e); } catch (IOException e) { throw new TaskExecutionException("IOException parsing XML: " + xml, e); } } return result; }
7616 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7616/acee3e590ed2584ecc041bfef9b98f0c4848e68a/XMLOutputSplitter.java/clean/trunk/taverna1.0/processors/taverna-wsdl-processor/src/main/java/org/embl/ebi/escience/scuflworkers/java/XMLOutputSplitter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1635, 1836, 12, 863, 810, 863, 13, 1216, 3837, 14576, 288, 202, 202, 751, 10193, 810, 10193, 273, 261, 751, 10193, 13, 810, 863, 18, 588, 12, 2630, 1557, 63, 20, 19226, 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, 1635, 1836, 12, 863, 810, 863, 13, 1216, 3837, 14576, 288, 202, 202, 751, 10193, 810, 10193, 273, 261, 751, 10193, 13, 810, 863, 18, 588, 12, 2630, 1557, 63, 20, 19226, 202, ...
if (methodId == Id_JavaAdapter) { return 1; } throw IdFunction.onBadMethodId(this, methodId);
if (f.hasTag(FTAG)) { if (f.methodId == Id_JavaAdapter) { return 1; } } throw f.unknown();
public int methodArity(int methodId) { if (methodId == Id_JavaAdapter) { return 1; } throw IdFunction.onBadMethodId(this, methodId); }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/8f28fc868ac3f30ea37494abfddb6358154786c3/JavaAdapter.java/clean/js/rhino/src/org/mozilla/javascript/JavaAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 707, 686, 560, 12, 474, 707, 548, 13, 565, 288, 3639, 309, 261, 2039, 548, 422, 3124, 67, 5852, 4216, 13, 288, 327, 404, 31, 289, 3639, 604, 3124, 2083, 18, 265, 6434, 3079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 707, 686, 560, 12, 474, 707, 548, 13, 565, 288, 3639, 309, 261, 2039, 548, 422, 3124, 67, 5852, 4216, 13, 288, 327, 404, 31, 289, 3639, 604, 3124, 2083, 18, 265, 6434, 3079...
try { tag.setAttribute(getXmlElementName(), null); } catch (IncorrectOperationException e) { LOG.error(e); }
getManager().runChange(new Runnable() { public void run() { try { tag.setAttribute(getXmlElementName(), null); } catch (IncorrectOperationException e) { LOG.error(e); } } });
public final void undefineInternal() { final XmlTag tag = getXmlTag(); setDefined(false); setXmlTagToNull(); if (tag != null) { try { tag.setAttribute(getXmlElementName(), null); } catch (IncorrectOperationException e) { LOG.error(e); } fireUndefinedEvent(); } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/4437ca2f304024137a05082977d946a80498d240/AttributeChildInvocationHandler.java/buggy/dom/impl/src/com/intellij/util/xml/impl/AttributeChildInvocationHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 918, 640, 11255, 3061, 1435, 288, 565, 727, 5714, 1805, 1047, 273, 28504, 1805, 5621, 565, 444, 8116, 12, 5743, 1769, 565, 444, 4432, 1805, 774, 2041, 5621, 565, 309, 261, 2692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 727, 918, 640, 11255, 3061, 1435, 288, 565, 727, 5714, 1805, 1047, 273, 28504, 1805, 5621, 565, 444, 8116, 12, 5743, 1769, 565, 444, 4432, 1805, 774, 2041, 5621, 565, 309, 261, 2692...
return getAllKnownEntities(native2Flavor, flavor2Native);
return new ArrayList(native2Flavor.keySet());
public synchronized List getNativesForFlavor(DataFlavor flav) { if (flav == null) { return getAllKnownEntities(native2Flavor, flavor2Native); } List natives = (List) flavor2Native.get(flav); if (natives == null) { natives = new LinkedList(); } if (flav.isFlavorTextType()) { getNativesForText(natives); } else if (natives.isEmpty()) { String encodedNat = encodeDataFlavor(flav); List flavors = (List) native2Flavor.get(encodedNat); natives.add(encodedNat); flavor2Native.put(flav, natives); if (flavors == null) { flavors = new LinkedList(); native2Flavor.put(encodedNat, flavors); } if (!flavors.contains(flav)) { flavors.add(flav); } } return natives; }
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/9b00f971bab2256d913aec1b141462a929f6e182/SystemFlavorMap.java/buggy/modules/awt/src/main/java/common/java/awt/datatransfer/SystemFlavorMap.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 987, 11069, 8785, 1290, 2340, 9444, 12, 751, 2340, 9444, 31227, 13, 288, 3639, 309, 261, 2242, 842, 422, 446, 13, 288, 5411, 327, 394, 2407, 12, 13635, 22, 2340, 9444, 18, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 987, 11069, 8785, 1290, 2340, 9444, 12, 751, 2340, 9444, 31227, 13, 288, 3639, 309, 261, 2242, 842, 422, 446, 13, 288, 5411, 327, 394, 2407, 12, 13635, 22, 2340, 9444, 18, 8...
simplify.setText(file.getAbsolutePath());
String name = file.getAbsolutePath(); simplify.setText(name); System.setProperty("simplify",name);
public void actionPerformed(ActionEvent e) { JFileChooser fc = new JFileChooser(); fc.setApproveButtonText("Select"); int returnVal = fc.showOpenDialog(EscOptions.this); if (returnVal == JFileChooser.APPROVE_OPTION) { java.io.File file = fc.getSelectedFile(); simplify.setText(file.getAbsolutePath()); } }
46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/6a5c1624a7ad0a07cc712c331ce67fee4a8fc61e/EscOptions.java/clean/src/escjava/trunk/ESCTools/Escjava/java/escjava/gui/EscOptions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 565, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 202, 3639, 804, 812, 17324, 8036, 273, 394, 804, 812, 17324, 5621, 202, 202, 7142, 18, 542, 12053, 537, 3616, 1528, 2932, 3391, 8863,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 565, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 202, 3639, 804, 812, 17324, 8036, 273, 394, 804, 812, 17324, 5621, 202, 202, 7142, 18, 542, 12053, 537, 3616, 1528, 2932, 3391, 8863,...
" 6 getstatic java/lang/System.out Ljava/io/PrintStream; [21]\n" +
" 6 getstatic java.lang.System.out : java.io.PrintStream [21]\n" +
public void test001() { this.runConformTest( new String[] { "X.java", "public class X { \n" + " public static void main(String[] args) { \n" + " Cloneable c1 = new int[0]; \n"+ " Cloneable c2 = (Cloneable)c1; \n" + " System.out.print(\"SUCCESS\"); \n" + " } \n" + "} \n", }, "SUCCESS"); ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler(); String actualOutput = null; try { byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(OUTPUT_DIR + File.separator +"X.class")); actualOutput = disassembler.disassemble( classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED); } catch (org.eclipse.jdt.core.util.ClassFormatException e) { assertTrue("ClassFormatException", false); } catch (IOException e) { assertTrue("IOException", false); } String expectedOutput = " // Method descriptor #15 ([Ljava/lang/String;)V\n" + " // Stack: 2, Locals: 3\n" + " public static void main(String[] args);\n" + " 0 iconst_0\n" + " 1 newarray int [10]\n" + " 3 astore_1 [c1]\n" + " 4 aload_1 [c1]\n" + " 5 astore_2 [c2]\n" + " 6 getstatic java/lang/System.out Ljava/io/PrintStream; [21]\n" + " 9 ldc <String \"SUCCESS\"> [23]\n" + " 11 invokevirtual java/io/PrintStream.print(Ljava/lang/String;)V [29]\n" + " 14 return\n" + " Line numbers:\n" + " [pc: 0, line: 3]\n" + " [pc: 4, line: 4]\n" + " [pc: 6, line: 5]\n" + " [pc: 14, line: 6]\n" + " Local variable table:\n" + " [pc: 0, pc: 15] local: args index: 0 type: [Ljava/lang/String;\n" + " [pc: 4, pc: 15] local: c1 index: 1 type: Ljava/lang/Cloneable;\n" + " [pc: 6, pc: 15] local: c2 index: 2 type: Ljava/lang/Cloneable;\n"; int index = actualOutput.indexOf(expectedOutput); if (index == -1 || expectedOutput.length() == 0) { System.out.println(Util.displayString(actualOutput, 2)); } if (index == -1) { assertEquals("Wrong contents", expectedOutput, actualOutput); }}
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/e9ca95978aca2a442bfecfb8ac281f372092486a/CastTest.java/buggy/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 1842, 11664, 1435, 288, 202, 2211, 18, 2681, 442, 687, 4709, 12, 202, 202, 2704, 514, 8526, 288, 1082, 202, 6, 60, 18, 6290, 3113, 1082, 202, 6, 482, 667, 1139, 288, 202, 64, 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, 1071, 918, 1842, 11664, 1435, 288, 202, 2211, 18, 2681, 442, 687, 4709, 12, 202, 202, 2704, 514, 8526, 288, 1082, 202, 6, 60, 18, 6290, 3113, 1082, 202, 6, 482, 667, 1139, 288, 202, 64, 82...
throw new NameError( ruby,
throw new NameError(ruby,
public RubyObject method_missing(RubyObject symbol, RubyObject[] args) { // +++ // IMPLEMENT THIS METHOD // --- Ruby ruby = getRuby(); throw new NameError( ruby, ruby.getSourceFile() + ":" + ruby.getSourceLine() + " undefined method '" + symbol.toId() + "' for '" + type().toName() + '\''); }
1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/4e4bb40b2eb2d38881d15ca8ef7cda4c34323793/RubyObject.java/clean/org/jruby/RubyObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 19817, 921, 707, 67, 7337, 12, 54, 10340, 921, 3273, 16, 19817, 921, 8526, 833, 13, 288, 3639, 368, 965, 15, 3639, 368, 15694, 7618, 20676, 10152, 3639, 368, 9948, 3639, 19817, 2215...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 707, 67, 7337, 12, 54, 10340, 921, 3273, 16, 19817, 921, 8526, 833, 13, 288, 3639, 368, 965, 15, 3639, 368, 15694, 7618, 20676, 10152, 3639, 368, 9948, 3639, 19817, 2215...
min = Integer.MAX_VALUE; for(index = 0; index < orderedItems ; index++) { if ( num_normal_turns[index] != 0 && num_normal_turns[index] < min) min = num_normal_turns[index]; }
min = Integer.MAX_VALUE; for(index = 0; index < orderedItems ; index++) { if ( num_normal_turns[index] != 0 && num_normal_turns[index] < min) min = num_normal_turns[index]; }
public static TurnVectors generateTurnOrder( Vector v, IGame game ) { int[] num_even_turns = new int[v.size()]; int[] num_normal_turns = new int[v.size()]; int total_even_turns = 0; int total_normal_turns = 0; int index; TurnOrdered[] order = new TurnOrdered[v.size()]; int orderedItems = 0; com.sun.java.util.collections.ArrayList plist = new com.sun.java.util.collections.ArrayList(v.size()); for (Enumeration i = v.elements(); i.hasMoreElements();) { Object item = i.nextElement(); plist.add(item); } com.sun.java.util.collections.Collections.sort(plist, new com.sun.java.util.collections.Comparator() { public int compare(Object o1, Object o2) { return ((TurnOrdered)o1).getInitiative().compareTo(((TurnOrdered)o2).getInitiative()); } }); // Walk through the ordered items. for ( com.sun.java.util.collections.Iterator i = plist.iterator(); i.hasNext(); orderedItems++ ) { final TurnOrdered item = (TurnOrdered)i.next(); order[orderedItems] = item; // Track even turns separately from the normal turns. num_normal_turns[orderedItems] = item.getNormalTurns(game); num_even_turns[orderedItems] = item.getEvenTurns(); // Keep a running total. total_even_turns += num_even_turns[orderedItems]; total_normal_turns += num_normal_turns[orderedItems]; } int min; int turns_left; // We will do the 'normal' turns first, and then the 'even' turns. min = Integer.MAX_VALUE; for(index = 0; index < orderedItems ; index++) { if ( num_normal_turns[index] != 0 && num_normal_turns[index] < min) min = num_normal_turns[index]; } TurnVectors turns = new TurnVectors(total_normal_turns, total_even_turns, min); // Allocate the normal turns. turns_left = total_normal_turns; while (turns_left > 0) { for (index = 0; index < orderedItems; index++) { // If you have no turns here, skip if (num_normal_turns[index] == 0) continue; // If you have less than twice the lowest, // move 1. Otherwise, move more. int ntm = num_normal_turns[index] / min; for (int j = 0; j < ntm; j++) { turns.addNormal(order[index]); num_normal_turns[index]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } // Handle the next 'normal' turn. // Now, we allocate the 'even' turns, if there are any. if ( total_even_turns > 0 ) { min = Integer.MAX_VALUE; for (index = 0; index < orderedItems ; index++) { if ( num_even_turns[index] != 0 && num_even_turns[index] < min) min = num_even_turns[index]; } turns_left = total_even_turns; while (turns_left > 0) { for (index = 0; index < orderedItems; index++) { // If you have no turns here, skip if (num_even_turns[index] == 0) continue; // If you have less than twice the lowest, // move 1. Otherwise, move more. int ntm = num_even_turns[index] / min; for (int j = 0; j < ntm; j++) { turns.addEven(order[index]); num_even_turns[index]--; turns_left--; } } // Since the smallest unit count had to place 1, reduce min) min--; } // Handle the next 'even' turn } // End have-'even'-turns return turns; }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/f4a72f650dc986645cb9c7ceba68b40c099515a5/TurnOrdered.java/clean/megamek/src/megamek/common/TurnOrdered.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22425, 21680, 2103, 15858, 2448, 12, 5589, 331, 16, 467, 12496, 7920, 262, 565, 288, 565, 509, 8526, 818, 67, 16728, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 155...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22425, 21680, 2103, 15858, 2448, 12, 5589, 331, 16, 467, 12496, 7920, 262, 565, 288, 565, 509, 8526, 818, 67, 16728, 67, 20922, 87, 273, 394, 509, 63, 90, 18, 1467, 1435, 155...
if ( img == null )
if ( url != null )
public void handleEvent( Event event ) { // change description/image selectedIndex = templateList.getSelectionIndex( ); description.setText( ( (Template) templates.get( selectedIndex ) ).getTemplateDescription( ) ); // we need to relayout if the new text has different number of lines previewPane.layout( ); Template selTemplate = (Template) templates.get( selectedIndex ); String key = selTemplate.getPictureName( ); Object img = null; if ( (key != null) && (!"".equals( key.trim( ) )) ) //$NON-NLS-1$ { key = selTemplate.getPictureFullName( ); img = imageMap.get( key ); if ( img == null ) { img = ReportPlugin.getImage( key ); imageMap.put( key, img ); } previewCanvas.setVisible( true ); previewThumbnail.setVisible( false ); previewCanvas.clear( ); previewCanvas.loadImage( ( (Image) img ) ); previewCanvas.showOriginal( ); }else if(selTemplate.getThumbnail( ) != null && selTemplate.getThumbnail( ).length != 0) { previewCanvas.setVisible( true ); previewThumbnail.setVisible( false ); byte[] thumbnailData = selTemplate.getThumbnail( ); ByteArrayInputStream inputStream = new ByteArrayInputStream( thumbnailData ); if(thumbnailImage != null) { thumbnailImage.dispose( ); thumbnailImage = null; } thumbnailImage = new Image( null, inputStream ); previewCanvas.clear( ); previewCanvas.loadImage( ( (Image) thumbnailImage ) ); } else { previewCanvas.setVisible( false ); previewThumbnail.setVisible( true ); Control[] children = previewThumbnail.getChildren( ); for ( int i = 0; i < children.length; i++ ) { children[i].dispose( ); } ReportGraphicsViewComposite thumbnail = new ReportGraphicsViewComposite( previewThumbnail, SWT.NULL, ( (Template) templates.get( selectedIndex ) ).getReportDesignHandle( ) ); previewThumbnail.layout( ); } chkBox.setEnabled( !( ( (Template) templates.get( selectedIndex ) ).getCheatSheetId( ) .equals( "" ) || ( (Template) templates.get( selectedIndex ) ).getCheatSheetId( ) .equals( "org.eclipse.birt.report.designer.ui.cheatsheet.firstreport" ) ) ); //$NON-NLS-1$ }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/76ebe408a984f02b49cbaf1597c0c7a0213901fe/WizardTemplateChoicePage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/wizards/WizardTemplateChoicePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 2587, 871, 262, 202, 202, 95, 1082, 202, 759, 2549, 2477, 19, 2730, 1082, 202, 8109, 1016, 273, 1542, 682, 18, 588, 6233, 1016, 12, 11272, 1082, 202, 338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1640, 1133, 12, 2587, 871, 262, 202, 202, 95, 1082, 202, 759, 2549, 2477, 19, 2730, 1082, 202, 8109, 1016, 273, 1542, 682, 18, 588, 6233, 1016, 12, 11272, 1082, 202, 338...
listener.logRevision(revision);
listener.logRevision(revision, path);
public void logRevision(long revision) { if (logEnabled) { for(Iterator it=notifylisteners.iterator(); it.hasNext();) { ISVNNotifyListener listener = (ISVNNotifyListener)it.next(); listener.logRevision(revision); } } }
6016 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6016/166f3651101ab7f39c5b4b99f46a9cd3d72d145a/SVNNotificationHandler.java/buggy/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/SVNNotificationHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 613, 7939, 12, 5748, 6350, 13, 288, 3639, 309, 261, 1330, 1526, 13, 288, 5411, 364, 12, 3198, 518, 33, 12336, 16072, 18, 9838, 5621, 518, 18, 5332, 2134, 5621, 13, 288, 7734,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 613, 7939, 12, 5748, 6350, 13, 288, 3639, 309, 261, 1330, 1526, 13, 288, 5411, 364, 12, 3198, 518, 33, 12336, 16072, 18, 9838, 5621, 518, 18, 5332, 2134, 5621, 13, 288, 7734,...
Context.enter(); contextEntered = true;
public int jsxFunction_setTimeout(final String script, final int timeout) { final Runnable runnable = new Runnable() { public void run() { final Window window = Window.this; final Page page = window.getWebWindow().getEnclosedPage(); boolean contextEntered = false; try { Thread.sleep(timeout); window.getLog().debug("Executing timeout: " + script); final WebWindow webWindow = window.getWebWindow(); // test that the window is always opened and the page the same if (!webWindow.getWebClient().getWebWindows().contains(webWindow) || webWindow.getEnclosedPage() != page) { window.getLog().debug("the page that originated the setTimeout doesnt exist anymore. " + "Execution cancelled."); return; } // Register this thread with the rhino engine Context.enter(); contextEntered = true; final HtmlPage htmlPage = window.document_.getHtmlPage(); htmlPage.executeJavaScriptIfPossible( script, "Window.setTimeout()", true, htmlPage.getDocumentElement()); } catch( final InterruptedException e ) { window.getLog().debug("JavaScript timeout thread interrupted; clearTimeout() probably called."); } catch( final Exception e ) { window.getLog().error("Caught exception in Window.setTimeout()", e); } finally { if (contextEntered) { // Deregister this thread with the rhino engine Context.exit(); } } } }; final int id = nextTimeoutId_++; final String threadName = "HtmlUnit setTimeout() Thread " + id; final Thread setTimeoutThread = new Thread(runnable, threadName); timeoutThreads_.put(new Integer(id), setTimeoutThread); setTimeoutThread.setPriority(Thread.currentThread().getPriority() + 1); setTimeoutThread.start(); return id; }
3508 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3508/9ada24d275eb4c948830a5fbefb54293d8fa03f5/Window.java/buggy/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/host/Window.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 3828, 92, 2083, 67, 542, 2694, 12, 6385, 514, 2728, 16, 727, 509, 2021, 13, 288, 3639, 727, 10254, 14685, 273, 394, 10254, 1435, 288, 5411, 1071, 918, 1086, 1435, 288, 7734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 3828, 92, 2083, 67, 542, 2694, 12, 6385, 514, 2728, 16, 727, 509, 2021, 13, 288, 3639, 727, 10254, 14685, 273, 394, 10254, 1435, 288, 5411, 1071, 918, 1086, 1435, 288, 7734, ...
return (Occurrences[])map.values().toArray(result);
return (Occurrences[]) map.values().toArray(result);
public Occurrences[] scanIndexedElements(User user, Collection collection, boolean inclusive) throws PermissionDeniedException { if(!collection.getPermissions().validate(user, Permission.READ)) throw new PermissionDeniedException("you don't have the permission" + " to read collection " + collection.getName()); List collections = inclusive ? collection.getDescendants(user) : new ArrayList(); collections.add(collection); short collectionId, elementId; ElementValue ref; IndexQuery query; ArrayList values; Value val[]; String name; Collection current; Int2ObjectAVLTreeMap map = new Int2ObjectAVLTreeMap(); Occurrences oc; VariableByteInputStream is; int docId; int len; final Lock lock = elementsDb.getLock(); for (Iterator i = collections.iterator(); i.hasNext();) { current = (Collection) i.next(); collectionId = current.getId(); ref = new ElementValue(collectionId); query = new IndexQuery(null, IndexQuery.TRUNC_RIGHT, ref); try { lock.acquire(this); lock.enter(this); values = elementsDb.findEntries(query); for (Iterator j = values.iterator(); j.hasNext();) { val = (Value[]) j.next(); elementId = ByteConversion.byteToShort(val[0].getData(), 2); name = NativeBroker.getSymbols().getName(elementId); oc = (Occurrences) map.get(elementId); if (oc == null) { oc = new Occurrences(name); map.put(elementId, oc); } is = new VariableByteInputStream( val[1].data(), val[1].start(), val[1].length()); try { while (is.available() > 0) { docId = is.readInt(); len = is.readInt(); oc.addOccurrences(len); is.skip(len * 3); } } catch (EOFException e) { e.printStackTrace(); } } } catch (BTreeException e) { LOG.warn("exception while reading element index", e); } catch (IOException e) { LOG.warn("exception while reading element index", e); } catch (LockException e) { LOG.warn("failed to acquire lock", e); } finally { lock.release(this); } } Occurrences[] result = new Occurrences[map.size()]; return (Occurrences[])map.values().toArray(result); }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/81cd2509ad2f1c1446b8399acb5ad675556e5d31/NativeBroker.java/clean/src/org/exist/storage/NativeBroker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 531, 2803, 12228, 8526, 4135, 15034, 3471, 12, 1299, 729, 16, 2200, 1849, 16, 1250, 13562, 13, 225, 202, 15069, 8509, 15877, 288, 202, 202, 430, 12, 5, 5548, 18, 588, 6521, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 531, 2803, 12228, 8526, 4135, 15034, 3471, 12, 1299, 729, 16, 2200, 1849, 16, 1250, 13562, 13, 225, 202, 15069, 8509, 15877, 288, 202, 202, 430, 12, 5, 5548, 18, 588, 6521, 76...
removeJButtonActionPerformed(e);
viewJButtonActionPerformed(e);
public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); }
53635 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53635/ac301cd5fc9d341e3e7b83d05bdf6262108dae06/Manage.java/buggy/client-ui/src/main/java/com/thinkparity/browser/application/browser/display/avatar/contact/Manage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 425, 13, 288, 7734, 1476, 46, 3616, 19449, 12, 73, 1769, 5411, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 425, 13, 288, 7734, 1476, 46, 3616, 19449, 12, 73, 1769, 5411, 289, 2, -100, -100, -100, -100, -100, -100, -100, -10...
private ChartPanel createLineChart(XYDataset dataset, boolean showDecimal) { JFreeChart jFreeChart = MVChartFactory.createXYLineChart(null,null,null, dataset, PlotOrientation.VERTICAL, false,false,false); jFreeChart.setBackgroundPaint(Color.BLACK); XYPlot plot = jFreeChart.getXYPlot(); plot.setBackgroundPaint(Color.BLACK); plot.setOutlinePaint(null); plot.getRenderer().setSeriesPaint(0, new Color(.5f, .5f, 1f)); plot.getRenderer().setSeriesPaint(1, new Color(.5f, .25f, .5f)); plot.setInsets(new RectangleInsets(4,0,6,2), false); plot.setDomainCrosshairVisible(false); plot.setDomainGridlinesVisible(false); plot.setRangeCrosshairVisible(false); plot.setRangeGridlinesVisible(false); plot.setFixedDomainAxisSpace(null); NumberAxis axis = (NumberAxis) plot.getDomainAxis(); axis.setVisible(false); axis.setFixedAutoRange(60000.0); // 60 seconds axis.setAxisLineVisible(false); axis.setTickMarksVisible(false); axis = (NumberAxis) plot.getRangeAxis(); axis.setVisible(true); axis.setAutoRange(true); axis.setAutoRangeIncludesZero(false); axis.setAutoRangeStickyZero(false); axis.setAxisLineVisible(true); axis.setTickLabelFont(new java.awt.Font("Dialog", 0, 8)); axis.setTickLabelPaint(new Color(190, 190, 190)); if( showDecimal == false ){ DecimalFormat decimalFormat = new DecimalFormat(); decimalFormat.setMaximumIntegerDigits(7); decimalFormat.setMaximumFractionDigits(1); decimalFormat.setMinimumIntegerDigits(1); decimalFormat.setMinimumFractionDigits(0); axis.setNumberFormatOverride(decimalFormat); //axis.setTickUnit( new NumberTickUnit(1d) ); } else{ DecimalFormat decimalFormat = new DecimalFormat(); decimalFormat.setMaximumIntegerDigits(7); decimalFormat.setMaximumFractionDigits(3); decimalFormat.setMinimumIntegerDigits(1); decimalFormat.setMinimumFractionDigits(0); axis.setNumberFormatOverride(decimalFormat); } ChartPanel chartPanel = new ChartPanel(jFreeChart, false, false, false, false, false); chartPanel.setOpaque(true); chartPanel.setMinimumDrawHeight(20); chartPanel.setMinimumDrawWidth(20); chartPanel.setMouseZoomable(false); return chartPanel; }
49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/e77e3def44c7f8608759d99086bba6d4a2017c7b/MTransformDisplayJPanel.java/clean/gui/main/com/metavize/gui/transform/MTransformDisplayJPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 7984, 5537, 2640, 1670, 7984, 12, 8546, 10656, 8682, 16, 1075, 29510, 13606, 5749, 15329, 46, 9194, 7984, 78, 9194, 7984, 33, 49, 58, 7984, 1733, 18, 2640, 8546, 1670, 7984, 12, 2011, 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, 3238, 7984, 5537, 2640, 1670, 7984, 12, 8546, 10656, 8682, 16, 1075, 29510, 13606, 5749, 15329, 46, 9194, 7984, 78, 9194, 7984, 33, 49, 58, 7984, 1733, 18, 2640, 8546, 1670, 7984, 12, 2011, 16...
if(max != -1 && seqNumber - max > 1) {
if((max != -1) && (seqNumber - max > 1)) {
private void queueResendRequests(int seqNumber) { int max; synchronized(this) { max = packetNumbersReceived.highest(); } if(seqNumber > max) { try { if(max != -1 && seqNumber - max > 1) { Logger.minor(this, "Queueing resends from "+max+" to "+seqNumber); // Missed some packets out for(int i=max+1;i<seqNumber;i++) { queueResendRequest(i); } } } catch (UpdatableSortedLinkedListKilledException e) { // Ignore (we are decoding packet, not sending one) } } }
50619 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50619/ca136843ae9ecb30cadada58a33a5dc2cf8ad064/KeyTracker.java/buggy/src/freenet/node/KeyTracker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2389, 607, 409, 6421, 12, 474, 3833, 1854, 13, 288, 3639, 509, 943, 31, 3639, 3852, 12, 2211, 13, 288, 540, 202, 1896, 273, 4414, 10072, 8872, 18, 8766, 395, 5621, 3639, 289,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2389, 607, 409, 6421, 12, 474, 3833, 1854, 13, 288, 3639, 509, 943, 31, 3639, 3852, 12, 2211, 13, 288, 540, 202, 1896, 273, 4414, 10072, 8872, 18, 8766, 395, 5621, 3639, 289,...
String structure_table = dataset+"_structure";
String structure_table = dataset+"_structure_dm";
public void execute(int limit) throws SequenceException, InvalidQueryException { SequenceDescription seqd = query.getSequenceDescription(); boolean moreRows = true; int batchStart = 0; // need to know these indexes specifically int queryIDindex = 0; int tranIDindex = 0; int rankIndex = 0; int assemblyIndex = 0; int startIndex = 0; int endIndex = 0; int chromIndex = 0; int strandIndex = 0; List displayIDindices = new ArrayList(); List otherIndices = new ArrayList(); queryID = "gene_id"; coordStart = "exon_chrom_start"; coordEnd = "exon_chrom_end"; displayIDs.add("exon_stable_id_v"); displayIDs.add("gene_stable_id_v"); displayIDs.add("transcript_stable_id_v"); updateQuery(); Attribute[] attributes = query.getAttributes(); try { CompiledSQLQuery csql = new CompiledSQLQuery( conn, query ); String sqlbase = csql.toSQL(); String structure_table = dataset+"_structure"; sqlbase += " order by "+structure_table+".gene_id, "+structure_table+".transcript_id, "+structure_table+".rank"; while (moreRows) { String sql = sqlbase; if (limit > 0) { sql += " limit "+limit; moreRows = false; } else { sql += " limit "+batchStart+" , "+batchLength; batchStart += batchLength; } logger.info( "QUERY : " + query ); logger.info( "SQL : " +sql ); PreparedStatement ps = conn.prepareStatement( sql ); int p=1; for( int i=0, n=query.getFilters().length; i<n; ++i) { Filter f = query.getFilters()[i]; String value = f.getValue(); if ( value!=null ) { logger.info("SQL (prepared statement value) : "+p+" = " + value); ps.setString( p++, value); } } ResultSet rs = ps.executeQuery(); ResultSetMetaData rmeta = rs.getMetaData(); // process columnNames for required attribute indices for (int i = 1, nColumns = rmeta.getColumnCount(); i <= nColumns; ++i) { String column = rmeta.getColumnName(i); if (column.equals(queryID)) queryIDindex = i; else if (column.equals(TranscriptID)) tranIDindex = i; else if (column.equals(Rank)) rankIndex = i; else if (column.equals(AssemblyColumn)) assemblyIndex = i; else if (column.equals(coordStart)) startIndex = i; else if (column.equals(coordEnd)) endIndex = i; else if (column.equals(Chr)) chromIndex = i; else if (column.equals(StrandColumn)) strandIndex = i; else if (displayIDs.contains(column)) displayIDindices.add(new Integer(i)); else otherIndices.add(new Integer(i)); } int rows = 0; //rowcount Integer lastGene = new Integer(0); // will nold last geneID when new one is encountered while ( rs.next() ) { rows++; Integer geneID = new Integer(rs.getInt(queryIDindex)); Integer tranID = new Integer(rs.getInt(tranIDindex)); Integer rank = new Integer(rs.getInt(rankIndex)); if (! geneiDs.containsKey(geneID)) { if (geneiDs.size() > 0) { // write the previous genes data, and refresh the geneiDs TreeMap seqWriter.writeSequences(lastGene); geneiDs = new TreeMap(); } lastGene = geneID; Hashtable atts = new Hashtable(); //order the transcripts by their rank in ascending order atts.put(Transcripts, new TreeMap()); atts.put(Assembly, rs.getString(assemblyIndex)); geneiDs.put(geneID, atts); } Hashtable geneatts = (Hashtable) geneiDs.get(geneID); TreeMap ordtrans = (TreeMap) geneatts.get(Transcripts); if (! (ordtrans.containsKey(tranID))) ordtrans.put(tranID, new Hashtable()); int start = rs.getInt(startIndex); if (start > 0) { // if start is not null, create a new SequenceLocation object from the chr, start, end, and strand String chr = rs.getString(chromIndex); int end = rs.getInt(endIndex); int strand = rs.getInt(strandIndex); Hashtable tranatts = (Hashtable) ordtrans.get(tranID); // keep track of the lowest start and highest end for the gene if (! ( geneatts.containsKey(Geneloc) ) ) { geneatts.put(Geneloc, new SequenceLocation(chr, start, end, strand)); } else { SequenceLocation geneloc = (SequenceLocation) geneatts.get(Geneloc); if (start < geneloc.getStart()) geneatts.put(Geneloc, new SequenceLocation(chr, start, geneloc.getEnd(), strand)); // overwrite the previous copy if (end > geneloc.getEnd()) geneatts.put(Geneloc, new SequenceLocation(chr, geneloc.getStart(), end, strand)); // overwrite the previous copy } // store each exon in rank order if (!( tranatts.containsKey(Exons))) { TreeMap exonMap = new TreeMap(); tranatts.put(Exons, new TreeMap()); } // need to add this exon to the Exons Hashtable exonatts = new Hashtable(); exonatts.put(Location, new SequenceLocation(chr, start, end, strand)); ( (TreeMap) ( tranatts.get(Exons) ) ).put(rank, exonatts); } Hashtable exonatts = (Hashtable) ( (TreeMap) ((Hashtable) ordtrans.get(tranID)).get(Exons) ).get(rank); // just need the information for this exon // process displayID, if necessary if (! ( exonatts.containsKey(DisplayID) )) { StringBuffer displayID = new StringBuffer(); for (int i = 0, n = displayIDindices.size(); i < n; i++) { if (i>0) displayID.append( separator ); int currindex = ((Integer) displayIDindices.get(i)).intValue(); if ( rs.getString(currindex) != null ) displayID.append( rs.getString(currindex) ); } exonatts.put(DisplayID, displayID.toString()); } // Rest can be duplicates, or novel values for a given field, collect lists of values for each field // currindex is now the last index of the DisplayIDs. Increment it, and iterate over the rest of the ResultSet to print the description for (int i = 0, n = otherIndices.size(); i < n; i++) { int currindex = ((Integer) otherIndices.get(i)).intValue(); if (rs.getString(currindex) != null ) { String field = attributes[currindex-1].getName(); if (! fields.contains(field)) fields.add(field); String value = rs.getString(currindex); if (exonatts.containsKey(field)) { if (! ( (ArrayList) exonatts.get(field) ).contains(value)) ( (ArrayList) exonatts.get(field) ).add(value); } else { List values = new ArrayList(); values.add(value); exonatts.put(field, values); } } } // add the description, if necessary if (! exonatts.containsKey(Description)) exonatts.put( Description, seqd.getDescription() ); } // write the last genes data, if present if (lastGene.intValue() > 0) seqWriter.writeSequences(lastGene); if (rows < batchLength) moreRows = false; } osr.close(); } catch (SQLException e) { logger.warn(e.getMessage()); throw new InvalidQueryException(e); } catch (IOException e) { logger.warn("Could not write to IO "+e.getMessage()); throw new SequenceException(e); } }
2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/bd4e836ab13ff8d0c7ef0a8b87d4e965a42d5e97/TranscriptExonSeqQueryRunner.java/buggy/src/java/org/ensembl/mart/explorer/TranscriptExonSeqQueryRunner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1836, 12, 474, 1800, 13, 1216, 8370, 503, 16, 1962, 1138, 503, 288, 202, 202, 4021, 3291, 3833, 72, 273, 843, 18, 588, 4021, 3291, 5621, 565, 1250, 1898, 4300, 273, 638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1836, 12, 474, 1800, 13, 1216, 8370, 503, 16, 1962, 1138, 503, 288, 202, 202, 4021, 3291, 3833, 72, 273, 843, 18, 588, 4021, 3291, 5621, 565, 1250, 1898, 4300, 273, 638, ...
cat.debug("type="+data2.getType());
log.debug("type="+data2.getType());
public void test02LookupAndChangeUser() throws Exception { cat.debug(">test02LookupAndChangeUser()"); UserDataPK pk = new UserDataPK(username); cat.debug("pk="+ pk); UserDataRemote data2 = home.findByPrimaryKey(pk); cat.debug("found by key! ="+ data2); cat.debug("username="+data2.getUsername()); assertTrue( "wrong username", data2.getUsername().equals(username) ); cat.debug("subject="+data2.getSubjectDN()); assertTrue( "wrong DN", data2.getSubjectDN().indexOf(username) != -1); cat.debug("email="+data2.getSubjectEmail()); assertNull( "wrong email", data2.getSubjectEmail()); cat.debug("status="+data2.getStatus()); assertTrue( "wrong status", data2.getStatus() == UserDataRemote.STATUS_NEW ); cat.debug("type="+data2.getType()); assertTrue( "wrong type", data2.getType() == SecConst.USER_INVALID); cat.debug("password foo123 returned " + data2.comparePassword("foo123")); assertTrue( "wrong pwd (foo123 works)", data2.comparePassword("foo123")==false); cat.debug("password "+pwd+" returned " + data2.comparePassword(pwd)); assertTrue( "wrong pwd "+pwd, data2.comparePassword(pwd)); data2.setStatus(UserDataRemote.STATUS_GENERATED); data2.setType(SecConst.USER_ENDUSER); data2.setPassword("foo123"); data2.setSubjectEmail(username+"@anatom.se"); cat.debug("Changed it"); cat.debug("<test02LookupAndChangeUser()"); }
4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/16e6a1dbcc54470e8d05f9bc7fdc7e7ebb6fe13c/TestUserData.java/clean/src/java/se/anatom/ejbca/ra/junit/TestUserData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3103, 6609, 1876, 3043, 1299, 1435, 1216, 1185, 288, 3639, 6573, 18, 4148, 2932, 34, 3813, 3103, 6609, 1876, 3043, 1299, 1435, 8863, 3639, 31109, 8784, 2365, 273, 394, 3110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3103, 6609, 1876, 3043, 1299, 1435, 1216, 1185, 288, 3639, 6573, 18, 4148, 2932, 34, 3813, 3103, 6609, 1876, 3043, 1299, 1435, 8863, 3639, 31109, 8784, 2365, 273, 394, 3110...
ExceptionSet exceptionTypeSet = new ExceptionSet();
ExceptionSet exceptionTypeSet = exceptionSetFactory.createExceptionSet();
private ExceptionSet computeThrownExceptionTypes(BasicBlock basicBlock) throws ClassNotFoundException, DataflowAnalysisException { ExceptionSet exceptionTypeSet = new ExceptionSet(); InstructionHandle pei = basicBlock.getExceptionThrower(); Instruction ins = pei.getInstruction(); // Get the exceptions that BCEL knows about. // Note that all of these are unchecked. ExceptionThrower exceptionThrower = (ExceptionThrower) ins; Class[] exceptionList = exceptionThrower.getExceptions(); for (int i = 0; i < exceptionList.length; ++i) { exceptionTypeSet.addImplicit(new ObjectType(exceptionList[i].getName())); } // Assume that an Error may be thrown by any instruction. exceptionTypeSet.addImplicit(Hierarchy.ERROR_TYPE); if (ins instanceof ATHROW) { // For ATHROW instructions, we generate *two* blocks // for which the ATHROW is an exception thrower. // // - The first, empty basic block, does the null check // - The second block, which actually contains the ATHROW, // throws the object on the top of the operand stack // // We make a special case of the block containing the ATHROW, // by removing all of the implicit exceptions, // and using type information to figure out what is thrown. if (basicBlock.containsInstruction(pei)) { // This is the actual ATHROW, not the null check // and implicit exceptions. exceptionTypeSet.clear(); // The frame containing the thrown value is the start fact // for the block, because ATHROW is guaranteed to be // the only instruction in the block. TypeFrame frame = getStartFact(basicBlock); // Check whether or not the frame is valid. // Sun's javac sometimes emits unreachable code. // For example, it will emit code that follows a JSR // subroutine call that never returns. // If the frame is invalid, then we can just make // a conservative assumption that anything could be // thrown at this ATHROW. if (!frame.isValid()) { exceptionTypeSet.addExplicit(Type.THROWABLE); } else { Type throwType = frame.getTopValue(); if (throwType instanceof ObjectType) { exceptionTypeSet.addExplicit((ObjectType) throwType); } else if (throwType instanceof ExceptionObjectType) { exceptionTypeSet.addAll(((ExceptionObjectType)throwType).getExceptionSet()); } else { // Not sure what is being thrown here. // Be conservative. if (DEBUG) { System.out.println("Non object type " + throwType + " thrown by " + pei + " in " + SignatureConverter.convertMethodSignature(methodGen)); } exceptionTypeSet.addExplicit(Type.THROWABLE); } } } } // If it's an InvokeInstruction, add declared exceptions and RuntimeException if (ins instanceof InvokeInstruction) { ConstantPoolGen cpg = methodGen.getConstantPool(); InvokeInstruction inv = (InvokeInstruction) ins; ObjectType[] declaredExceptionList = Hierarchy.findDeclaredExceptions(inv, cpg); if (declaredExceptionList == null) { // Couldn't find declared exceptions, // so conservatively assume it could thrown any checked exception. if (DEBUG) System.out.println("Couldn't find declared exceptions for " + SignatureConverter.convertMethodSignature(inv, cpg)); exceptionTypeSet.addExplicit(Hierarchy.EXCEPTION_TYPE); } else { for (int i = 0; i < declaredExceptionList.length; ++i) { exceptionTypeSet.addExplicit(declaredExceptionList[i]); } } exceptionTypeSet.addImplicit(Hierarchy.RUNTIME_EXCEPTION_TYPE); } if (DEBUG) System.out.println(pei + " can throw " + exceptionTypeSet); return exceptionTypeSet; }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/66516145e1df96c10b637dff8fc6b0c2aecb568c/TypeAnalysis.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/TypeAnalysis.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 1185, 694, 3671, 29591, 503, 2016, 12, 8252, 1768, 5337, 1768, 13, 202, 202, 15069, 10403, 16, 1910, 2426, 9418, 503, 288, 202, 202, 503, 694, 1520, 559, 694, 273, 394, 1185, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1185, 694, 3671, 29591, 503, 2016, 12, 8252, 1768, 5337, 1768, 13, 202, 202, 15069, 10403, 16, 1910, 2426, 9418, 503, 288, 202, 202, 503, 694, 1520, 559, 694, 273, 394, 1185, ...
fireModelUpdate(lastElement, ChangeKind.REMOVED);
if (Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().getActivePart() instanceof PackageExplorerPart) { if (FilterPackageExplorerAction.getDefault() != null && FilterPackageExplorerAction.getDefault().isChecked()) { fireModelUpdate(lastElement, ChangeKind.REMOVED); } } else { fireModelUpdate(lastElement, ChangeKind.REMOVED); }
public void interestChanged(List<ITaskscapeNode> nodes) { if (!MylarUiPlugin.getDefault().isGlobalFilteringEnabled()) return; if (MylarPlugin.getTaskscapeManager().getTempRaisedHandle() != null) { final IJavaElement raisedElement = JavaCore.create(MylarPlugin.getTaskscapeManager().getTempRaisedHandle()); final PackageExplorerPart packageExplorer = PackageExplorerPart.getFromActivePerspective(); if (packageExplorer != null) { Workbench.getInstance().getDisplay().asyncExec(new Runnable() { public void run() { packageExplorer.getTreeViewer().refresh(raisedElement.getParent()); } }); } } else { ITaskscapeNode lastNode = nodes.get(nodes.size()-1); IJavaElement lastElement = JavaCore.create(lastNode.getElementHandle()); PackageExplorerPart packageExplorer = PackageExplorerPart.getFromActivePerspective(); if (packageExplorer != null && lastElement != null) { // HACK: use a more reasoanble method if (packageExplorer.getTreeViewer().testFindItem(lastElement) == null) { for (ITaskscapeNode node : nodes) { IJavaElement element = JavaCore.create(node.getElementHandle()); if (element != null && element.exists()) { if (node.getDegreeOfInterest().isInteresting()) { fireModelUpdate(element, ChangeKind.ADDED); } } } } else if (lastElement != null) { if (!lastNode.getDegreeOfInterest().isInteresting()) { fireModelUpdate(lastElement, ChangeKind.REMOVED); } } } if (lastElement != null) { revealInPackageExplorer(lastElement); } } }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/244d72134d5ef4d6c45e2bda4ea1af4f1cfc52e0/JavaUiUpdateBridge.java/buggy/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/java/JavaUiUpdateBridge.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 16513, 5033, 12, 682, 32, 1285, 835, 12476, 907, 34, 2199, 13, 288, 3639, 309, 16051, 12062, 7901, 13943, 3773, 18, 588, 1868, 7675, 291, 5160, 30115, 1526, 10756, 327, 31, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16513, 5033, 12, 682, 32, 1285, 835, 12476, 907, 34, 2199, 13, 288, 3639, 309, 16051, 12062, 7901, 13943, 3773, 18, 588, 1868, 7675, 291, 5160, 30115, 1526, 10756, 327, 31, 363...
errorButton.setSelection(selected); }
errorButton.setSelection(selected); }
public void setErrorSelected(boolean selected) { errorButton.setSelection(selected); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1ceb585b9b16047c6c580984b0c9962c41a22ba6/DialogProblemFilter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/DialogProblemFilter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 9967, 7416, 12, 6494, 3170, 13, 288, 5411, 555, 3616, 18, 542, 6233, 12, 8109, 1769, 3639, 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, 540, 1071, 918, 9967, 7416, 12, 6494, 3170, 13, 288, 5411, 555, 3616, 18, 542, 6233, 12, 8109, 1769, 3639, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Map.Entry<AvailableLoad, ValueNumber[]> entry = i.next();
AvailableLoad key = i.next(); ValueNumber[] value = availableLoadMap.get(key);
public String toString() { String frameValues = super.toString(); if (RLE_DEBUG) { StringBuffer buf = new StringBuffer(); buf.append(frameValues); Iterator<Map.Entry<AvailableLoad, ValueNumber[]>> i = availableLoadMap.entrySet().iterator(); boolean first = true; while (i.hasNext()) { Map.Entry<AvailableLoad, ValueNumber[]> entry = i.next(); if (first) first = false; else buf.append(','); buf.append(entry.getKey() + "=" + valueToString(entry.getValue())); } return buf.toString(); } else { return frameValues; } }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/da9fde93efd951d8b704faf9c38cac44d21ee590/ValueNumberFrame.java/clean/findbugs/src/java/edu/umd/cs/findbugs/ba/ValueNumberFrame.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 514, 1762, 1435, 288, 202, 202, 780, 2623, 1972, 273, 2240, 18, 10492, 5621, 202, 202, 430, 261, 54, 900, 67, 9394, 13, 288, 1082, 202, 780, 1892, 1681, 273, 394, 6674, 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, 482, 514, 1762, 1435, 288, 202, 202, 780, 2623, 1972, 273, 2240, 18, 10492, 5621, 202, 202, 430, 261, 54, 900, 67, 9394, 13, 288, 1082, 202, 780, 1892, 1681, 273, 394, 6674, 5621, ...
dX2 += dYAxisLabelsThickness; dX1 -= Math.max( bTicksLeft ? TICK_SIZE : 0,
dX2 += Math.max( dYAxisLabelsThickness, dDecorationThickness[1] ); dX1 -= Math.max( ( bTicksLeft ? TICK_SIZE : 0 ) + dDecorationThickness[0], dAppliedYAxisPlotSpacing ); } else if ( iYLabelLocation == LEFT ) { dX1 -= Math.max( ( bTicksLeft ? TICK_SIZE : 0 ) + Math.max( dYAxisLabelsThickness, dDecorationThickness[0] ),
protected final double adjustHorizontal( double dBlockX, double dBlockWidth, AllAxes aax ) throws ChartException, IllegalArgumentException { final OneAxis axPH = aax.areAxesSwapped( ) ? aax.getPrimaryOrthogonal( ) : aax.getPrimaryBase( ); final OneAxis axPV = aax.areAxesSwapped( ) ? aax.getPrimaryBase( ) : aax.getPrimaryOrthogonal( ); final AutoScale scX = axPH.getScale( ); final AutoScale scY = axPV.getScale( ); final int iXLabelLocation = axPH.getLabelPosition( ); final int iYLabelLocation = axPV.getLabelPosition( ); final int iYTitleLocation = axPV.getTitlePosition( ); final Label laXAxisLabels = axPH.getLabel( ); final Label laYAxisLabels = axPV.getLabel( ); final Label laYAxisTitle = axPV.getTitle( ); final int iYTickStyle = axPV.getCombinedTickStyle( ); final IntersectionValue iv = axPV.getIntersectionValue( ); // COMPUTE THE THICKNESS OF THE AXIS INCLUDING AXIS LABEL BOUNDS AND // AXIS-PLOT SPACING final boolean bTicksLeft = ( iYTickStyle & TICK_LEFT ) == TICK_LEFT; final boolean bTicksRight = ( iYTickStyle & TICK_RIGHT ) == TICK_RIGHT; final double dAppliedYAxisPlotSpacing = ( iv.iType == IntersectionValue.MAX || iv.iType == IntersectionValue.MIN ) ? dYAxisPlotSpacing : 0; // UPDATE Y-AXIS ENDPOINTS DUE TO AXIS LABEL SHIFTS double dStart = scY.getStart( ), dEnd = scY.getEnd( ); scY.computeTicks( ids, laYAxisLabels, iYLabelLocation, VERTICAL, dStart, dEnd, true, aax ); if ( !scY.isStepFixed( ) ) { final Object[] oaMinMax = scY.getMinMax( ); while ( !scY.checkFit( ids, laYAxisLabels, iYLabelLocation ) ) { if ( !scY.zoomOut( ) ) { break; } scY.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scY.computeTicks( ids, laYAxisLabels, iYLabelLocation, VERTICAL, dStart, dEnd, true, aax ); if ( scY.getUnit( ) != null && asInteger( scY.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } double dYAxisLabelsThickness = scY.computeAxisLabelThickness( ids, axPV.getLabel( ), VERTICAL ); double dYAxisTitleThickness = 0; if ( laYAxisTitle.isVisible( ) ) { final String sPreviousValue = laYAxisTitle.getCaption( ).getValue( ); laYAxisTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); try { dYAxisTitleThickness = computeBox( ids, iYTitleLocation, laYAxisTitle, 0, 0 ).getWidth( ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, uiex ); } finally { laYAxisTitle.getCaption( ).setValue( sPreviousValue ); } } double dX = getLocation( scX, iv ), dX1 = dX, dX2 = dX; // COMPUTE VALUES FOR x1, x, x2 // x = HORIZONTAL LOCATION OF Y-AXIS ALONG PLOT // x1 = LEFT EDGE OF Y-AXIS BAND (DUE TO AXIS LABELS, TITLE, TICKS & // SPACING) // x2 = RIGHT EDGE OF Y-AXIS BAND (DUE TO AXIS LABELS, TITLE, TICKS & // SPACING) if ( iv.iType == IntersectionValue.MIN ) { if ( scX.getDirection( ) == BACKWARD ) { // switch if scale is backward. dX = getLocation( scX, IntersectionValue.MAX_VALUE ); } dX -= dAppliedYAxisPlotSpacing; dX1 = dX; dX2 = dX; if ( bTicksLeft ) { dX1 -= TICK_SIZE; } if ( iYLabelLocation == LEFT ) { dX1 -= dYAxisLabelsThickness; dX2 += Math.max( // IF LABELS ARE LEFT, THEN RIGHT SPACING IS // MAX(RT_TICK_SIZE, HORZ_SPACING) bTicksRight ? TICK_SIZE : 0, dAppliedYAxisPlotSpacing ); } else if ( iYLabelLocation == RIGHT ) { // IF LABELS ARE RIGHT, THEN RIGHT SPACING IS // MAX(RT_TICK_SIZE+AXIS_LBL_THCKNESS, HORZ_SPACING) dX2 += Math.max( ( bTicksRight ? TICK_SIZE : 0 ) + dYAxisLabelsThickness, dAppliedYAxisPlotSpacing ); } if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } else if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } // ENSURE THAT WE DON'T GO BEHIND THE LEFT PLOT BLOCK EDGE if ( dX1 < dBlockX ) { final double dDelta = ( dBlockX - dX1 ); dX1 = dBlockX; dX += dDelta; dX2 += dDelta; } final double dDeltaX1 = dX - dX1; final double dDeltaX2 = dX2 - dX; // COMPUTE THE Y-AXIS BAND THICKNESS AND ADJUST X2 FOR LABELS BELOW if ( iYLabelLocation == RIGHT ) { // Y-AXIS BAND IS (x1 -> (x+AxisPlotSpacing)) dX2 = ( dX + dAppliedYAxisPlotSpacing ); } dYAxisLabelsThickness = dX2 - dX1; // REUSE VARIABLE // CHECK IF X-AXIS THICKNESS REQUIRES A PLOT HEIGHT RESIZE AT THE // UPPER END scX.computeAxisStartEndShifts( ids, laXAxisLabels, HORIZONTAL, iXLabelLocation, aax ); boolean startEndChanged = false; if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness > scX.getEndShift( ) ) { // REDUCE scX's STARTPOINT TO FIT THE Y-AXIS ON THE LEFT dEnd = dX2; startEndChanged = true; } else { dEnd = scX.getEnd( ); } dStart = scX.getStart( ); } else { if ( dYAxisLabelsThickness > scX.getStartShift( ) ) { // REDUCE scX's STARTPOINT TO FIT THE Y-AXIS ON THE LEFT dStart = dX2; startEndChanged = true; } else { dStart = scX.getStart( ); } dEnd = scX.getEnd( ); } scX.resetShifts( ); // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS LABELS // IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); if ( scX.getDirection( ) == BACKWARD ) { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } else { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount; if ( scX.getDirection( ) == BACKWARD ) { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } else { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } // MOVE THE Y-AXIS TO THE LEFT EDGE OF THE PLOT IF SLACK SPACE // EXISTS OR SCALE IS RECOMPUTED if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness < scX.getEndShift( ) ) { dX = scX.getEnd( ) - ( dX2 - dX ); } } else { if ( dYAxisLabelsThickness < scX.getStartShift( ) ) { dX = scX.getStart( ) - ( dX2 - dX ); } } dX -= insCA.getLeft( ); dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } else if ( iv.iType == IntersectionValue.MAX ) { if ( scX.getDirection( ) == BACKWARD ) { // switch if scale is backward. dX = getLocation( scX, IntersectionValue.MIN_VALUE ); } dX += dAppliedYAxisPlotSpacing; dX1 = dX; dX2 = dX; if ( bTicksRight ) { dX2 += TICK_SIZE; } if ( iYLabelLocation == RIGHT ) { dX2 += dYAxisLabelsThickness; dX1 -= Math.max( bTicksLeft ? TICK_SIZE : 0, dAppliedYAxisPlotSpacing ); } else if ( iYLabelLocation == LEFT ) { dX1 -= Math.max( ( bTicksLeft ? TICK_SIZE : 0 ) + dYAxisLabelsThickness, dAppliedYAxisPlotSpacing ); } if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } else if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } // ENSURE THAT WE DON'T GO AHEAD OF THE RIGHT PLOT BLOCK EDGE if ( dX2 > dBlockX + dBlockWidth ) { final double dDelta = dX2 - ( dBlockX + dBlockWidth ); dX2 = dBlockX + dBlockWidth; dX -= dDelta; dX1 -= dDelta; } final double dDeltaX1 = dX - dX1; final double dDeltaX2 = dX2 - dX; // COMPUTE THE Y-AXIS BAND THICKNESS AND ADJUST X1 IF Y-AXIS LABELS // ARE ON THE LEFT if ( iYLabelLocation == LEFT ) { // Y-AXIS BAND IS ((x-AxisPlotSpacing) -> x2) dX1 = ( dX - dAppliedYAxisPlotSpacing ); } dYAxisLabelsThickness = dX2 - dX1; // REUSE VARIABLE // CHECK IF X-AXIS THICKNESS REQUIRES A PLOT HEIGHT RESIZE AT THE // UPPER END scX.computeAxisStartEndShifts( ids, laXAxisLabels, HORIZONTAL, iXLabelLocation, aax ); boolean startEndChanged = false; if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness > scX.getStartShift( ) ) { // REDUCE scX's ENDPOINT TO FIT THE Y-AXIS ON THE RIGHT dStart = dX1; startEndChanged = true; } else { dStart = scX.getStart( ); } dEnd = scX.getEnd( ); } else { if ( dYAxisLabelsThickness > scX.getEndShift( ) ) { // REDUCE scX's ENDPOINT TO FIT THE Y-AXIS ON THE RIGHT dEnd = dX1; startEndChanged = true; } else { dEnd = scX.getEnd( ); } dStart = scX.getStart( ); } scX.resetShifts( ); // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS LABELS // IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); if ( scX.getDirection( ) == BACKWARD ) { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } else { scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount; if ( scX.getDirection( ) == BACKWARD ) { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, !startEndChanged, true, aax ); } else { tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, !startEndChanged, aax ); } if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } // MOVE THE Y-AXIS TO THE LEFT EDGE OF THE PLOT IF SLACK SPACE // EXISTS OR SCALE IS RECOMPUTED if ( scX.getDirection( ) == BACKWARD ) { if ( dYAxisLabelsThickness < scX.getStartShift( ) ) { dX = scX.getStart( ) - ( dX1 - dX ); } } else { if ( dYAxisLabelsThickness < scX.getEndShift( ) ) { dX = scX.getEnd( ) - ( dX1 - dX ); } } dX += insCA.getRight( ); dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } else { double dDeltaX1 = 0, dDeltaX2 = 0; if ( iYTitleLocation == RIGHT ) { dX2 += dYAxisTitleThickness; } else if ( iYTitleLocation == LEFT ) { dX1 -= dYAxisTitleThickness; } if ( iYLabelLocation == LEFT ) { dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ) + dYAxisLabelsThickness; dX2 += ( bTicksRight ? TICK_SIZE : 0 ); dDeltaX1 = dX - dX1; dDeltaX2 = dX2 - dX; // CHECK IF LEFT EDGE OF Y-AXIS BAND GOES BEHIND THE PLOT LEFT // EDGE if ( dX1 < dBlockX ) { final Object[] oaMinMax = scX.getMinMax( ); boolean bForceBreak = false; // A LOOP THAT ITERATIVELY ATTEMPTS TO ADJUST THE LEFT EDGE // OF THE Y-AXIS LABELS WITH THE LEFT EDGE OF THE PLOT // AND/OR // ENSURE THAT THE START POINT OF THE X-AXIS SCALE IS // SUITABLY POSITIONED do { // CANCEL OUT THE ENDPOINT LABEL SHIFT COMPUTATIONS FROM // THE X-AXIS scX.setEndPoints( scX.getStart( ) - scX.getStartShift( ), scX.getEnd( ) + scX.getEndShift( ) ); // RESTORE scX.resetShifts( ); // APPLY THE AXIS REDUCTION FORMULA W.R.T. X-AXIS // STARTPOINT double[] da = scX.getEndPoints( ); double dT_RI = dBlockX - dX1; // THRESHOLD - // REQUESTEDINTERSECTION if ( scX.getDirection( ) == BACKWARD ) { double dAMin_AMax = da[0] - da[1]; double dAMax_RI = Math.abs( da[0] - dX ); double dDelta = ( dT_RI / dAMax_RI ) * dAMin_AMax; dEnd = da[1] + dDelta; dStart = da[0]; if ( dEnd < dBlockX ) { dEnd = dBlockX; bForceBreak = true; } } else { double dAMin_AMax = da[1] - da[0]; double dAMax_RI = Math.abs( da[1] - dX ); double dDelta = ( dT_RI / dAMax_RI ) * dAMin_AMax; dStart = da[0] + dDelta; dEnd = da[1]; if ( dStart < dBlockX ) { dStart = dBlockX; bForceBreak = true; } } // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { bForceBreak = true; break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { bForceBreak = true; break; } } dX = getLocation( scX, iv ); dX1 = dX - dDeltaX1; // RE-CALCULATE X-AXIS BAND LEFT // EDGE } while ( Math.abs( dX1 - dBlockX ) > 1 && !bForceBreak ); } else { // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR dStart = scX.getStart( ); dEnd = scX.getEnd( ); scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } dX = getLocation( scX, iv ); } dX1 = dX - dDeltaX1; dX2 = dX + dDeltaX2; } else if ( iYLabelLocation == RIGHT ) { dX2 += ( bTicksRight ? TICK_SIZE : 0 ) + dYAxisLabelsThickness; dX1 -= ( bTicksLeft ? TICK_SIZE : 0 ); dDeltaX1 = dX - dX1; dDeltaX2 = dX2 - dX; // CHECK IF RIGHT EDGE OF Y-AXIS BAND GOES BEHIND THE PLOT RIGHT // EDGE if ( dX2 > dBlockX + dBlockWidth ) { final Object[] oaMinMax = scX.getMinMax( ); boolean bForceBreak = false; // A LOOP THAT ITERATIVELY ATTEMPTS TO ADJUST THE RIGHT EDGE // OF THE Y-AXIS LABELS WITH THE RIGHT EDGE OF THE PLOT // AND/OR // ENSURE THAT THE START POINT OF THE X-AXIS SCALE IS // SUITABLY POSITIONED do { // CANCEL OUT THE ENDPOINT LABEL SHIFT COMPUTATIONS FROM // THE X-AXIS scX.setEndPoints( scX.getStart( ) - scX.getStartShift( ), scX.getEnd( ) + scX.getEndShift( ) ); // RESTORE scX.resetShifts( ); // APPLY THE AXIS REDUCTION FORMULA W.R.T. X-AXIS // ENDPOINT double[] da = scX.getEndPoints( ); double dT_RI = dX2 - ( dBlockX + dBlockWidth ); // THRESHOLD // - // REQUESTEDINTERSECTION if ( scX.getDirection( ) == BACKWARD ) { double dAMin_AMax = da[0] - da[1]; double dAMin_RI = Math.abs( dX - da[1] ); double dDelta = Math.abs( dT_RI / dAMin_RI ) * dAMin_AMax; dStart = da[0] - dDelta; dEnd = da[1]; if ( dStart > dBlockX + dBlockWidth ) { dStart = dBlockX + dBlockWidth; bForceBreak = true; } } else { double dAMin_AMax = da[1] - da[0]; double dAMin_RI = Math.abs( dX - da[0] ); double dDelta = ( dT_RI / dAMin_RI ) * dAMin_AMax; dEnd = da[1] - dDelta; dStart = da[0]; if ( dEnd > dBlockX + dBlockWidth ) { dEnd = dBlockX + dBlockWidth; bForceBreak = true; } } // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { bForceBreak = true; break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { bForceBreak = true; break; } } } dX = getLocation( scX, iv ); dX2 = dX + dDeltaX2; // RE-CALCULATE X-AXIS BAND // RIGHT // EDGE } while ( Math.abs( dX2 - ( dBlockX + dBlockWidth ) ) > 1 && !bForceBreak ); } else { // LOOP THAT AUTO-RESIZES Y-AXIS AND RE-COMPUTES Y-AXIS // LABELS IF OVERLAPS OCCUR dStart = scX.getStart( ); dEnd = scX.getEnd( ); scX.setEndPoints( dStart, dEnd ); scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( !scX.isStepFixed( ) ) { final Object[] oaMinMax = scX.getMinMax( ); while ( !scX.checkFit( ids, laXAxisLabels, iXLabelLocation ) ) { if ( !scX.zoomOut( ) ) { break; } scX.updateAxisMinMax( oaMinMax[0], oaMinMax[1] ); int tickCount = scX.computeTicks( ids, laXAxisLabels, iXLabelLocation, HORIZONTAL, dStart, dEnd, true, aax ); if ( scX.getUnit( ) != null && asInteger( scX.getUnit( ) ) == Calendar.YEAR && tickCount <= 3 ) { break; } } } dX = getLocation( scX, iv ); } dX2 = dX + dDeltaX2; dX1 = dX - dDeltaX1; } axPV.setTitleCoordinate( ( iYTitleLocation == LEFT ) ? dX1 - 1 : dX2 + 1 - dYAxisTitleThickness ); } return dX; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/20bb7679d106e8105100c095c900612d5a37a46d/PlotWithAxes.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/withaxes/PlotWithAxes.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 727, 1645, 5765, 14457, 12, 1645, 302, 1768, 60, 16, 1082, 202, 9056, 302, 1768, 2384, 16, 4826, 26494, 279, 651, 262, 1216, 14804, 503, 16, 1082, 202, 31237, 202, 95, 202, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 727, 1645, 5765, 14457, 12, 1645, 302, 1768, 60, 16, 1082, 202, 9056, 302, 1768, 2384, 16, 4826, 26494, 279, 651, 262, 1216, 14804, 503, 16, 1082, 202, 31237, 202, 95, 202, 2...
protected void setValuesOffered( Set values) throws IllegalValueException {
public void setValuesOffered( Set values) throws IllegalValueException {
protected void setValuesOffered( Set values) throws IllegalValueException { if (values == null) { throw new IllegalValueException("setValuesOffered must not be called with a null value. An empty set IS permitted."); } //Empty the valuesOffered set valuesOffered.clear(); Set newValuesOffered = new LinkedHashSet(values); Object o; Iterator i = newValuesOffered.iterator(); while (i.hasNext()) { o = i.next() ; if ( possibleValues.contains(o) ) { valuesOffered.add(o); } else { throw new IllegalValueException("The following value is not a permitted value: " + o.toString() ); } } }
11869 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11869/a77e2e333b12df5bb2e6dc2d11645c4f19ccb4c4/Action.java/buggy/Coordinator/src/org/cougaar/coordinator/Action.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 27466, 10513, 329, 12, 1000, 924, 13, 1216, 2141, 9738, 288, 3639, 309, 261, 2372, 422, 446, 13, 288, 5411, 604, 394, 2141, 9738, 2932, 542, 1972, 10513, 329, 1297, 486, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27466, 10513, 329, 12, 1000, 924, 13, 1216, 2141, 9738, 288, 3639, 309, 261, 2372, 422, 446, 13, 288, 5411, 604, 394, 2141, 9738, 2932, 542, 1972, 10513, 329, 1297, 486, 506, ...
NativeJavaMethod setJavaMethod = (NativeJavaMethod) method; Method[] setMethods = setJavaMethod.methods; for (int pass = 1; pass <= 2 && setMethod == null; ++pass) { for (int i = 0; i < setMethods.length; ++i) { if (setMethods[i].getReturnType() == Void.TYPE && (!isStatic || Modifier.isStatic(setMethods[i].getModifiers())) && (params = setMethods[i].getParameterTypes()) != null && params.length == 1 ) { if ((pass == 1 && params[0] == type) || (pass == 2 && params[0].isAssignableFrom(type))) { setMethod = setMethods[i]; break; } } } }
NativeJavaMethod njm = (NativeJavaMethod) method; Class type = getMethod.getReturnType(); setMethod = extractSetMethod(type, njm, isStatic);
private void makeBeanProperties(Scriptable scope, boolean isStatic) { Hashtable ht = isStatic ? staticMembers : members; Hashtable toAdd = new Hashtable(); // Now, For each member, make "bean" properties. for (Enumeration e = ht.keys(); e.hasMoreElements(); ) { // Is this a getter? String name = (String) e.nextElement(); boolean memberIsGetMethod = name.startsWith("get"); boolean memberIsIsMethod = name.startsWith("is"); if (memberIsGetMethod || memberIsIsMethod) { // Double check name component. String nameComponent = name.substring(memberIsGetMethod ? 3 : 2); if (nameComponent.length() == 0) continue; // Make the bean property name. String beanPropertyName = nameComponent; if (Character.isUpperCase(nameComponent.charAt(0))) { if (nameComponent.length() == 1) { beanPropertyName = nameComponent.substring(0, 1).toLowerCase(); } else if (!Character.isUpperCase(nameComponent.charAt(1))) { beanPropertyName = Character.toLowerCase(nameComponent.charAt(0)) + nameComponent.substring(1); } } // If we already have a member by this name, don't do this // property. if (ht.containsKey(beanPropertyName)) continue; // Get the method by this name. Object method = ht.get(name); if (!(method instanceof NativeJavaMethod)) continue; NativeJavaMethod getJavaMethod = (NativeJavaMethod) method; // Grab and inspect the getter method; does it have an empty parameter list, // with a return value (eg. a getSomething() or isSomething())? Class[] params; Method[] getMethods = getJavaMethod.methods; Class type; if (getMethods != null && getMethods.length == 1 && (type = getMethods[0].getReturnType()) != null && (params = getMethods[0].getParameterTypes()) != null && params.length == 0) { // Make sure the method static-ness is preserved for this property. if (isStatic && !Modifier.isStatic(getMethods[0].getModifiers())) continue; // We have a getter. Now, do we have a setter? Method setMethod = null; String setter = "set" + nameComponent; if (ht.containsKey(setter)) { // Is this value a method? method = ht.get(setter); if (method instanceof NativeJavaMethod) { // // Note: it may be preferable to allow NativeJavaMethod.findFunction() // to find the appropriate setter; unfortunately, it requires an // instance of the target arg to determine that. // // Make two passes: one to find a method with direct type assignment, // and one to find a widening conversion. NativeJavaMethod setJavaMethod = (NativeJavaMethod) method; Method[] setMethods = setJavaMethod.methods; for (int pass = 1; pass <= 2 && setMethod == null; ++pass) { for (int i = 0; i < setMethods.length; ++i) { if (setMethods[i].getReturnType() == Void.TYPE && (!isStatic || Modifier.isStatic(setMethods[i].getModifiers())) && (params = setMethods[i].getParameterTypes()) != null && params.length == 1 ) { if ((pass == 1 && params[0] == type) || (pass == 2 && params[0].isAssignableFrom(type))) { setMethod = setMethods[i]; break; } } } } } } // Make the property. BeanProperty bp = new BeanProperty(getMethods[0], setMethod); toAdd.put(beanPropertyName, bp); } } } // Add the new bean properties. for (Enumeration e = toAdd.keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); Object value = toAdd.get(key); ht.put(key, value); } }
51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/32619aac8e91c998c877615fa497d1582f8f19a8/JavaMembers.java/buggy/js/rhino/src/org/mozilla/javascript/JavaMembers.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1221, 3381, 2297, 12, 3651, 429, 2146, 16, 1250, 16116, 13, 565, 288, 3639, 18559, 14049, 273, 16116, 692, 760, 6918, 294, 4833, 31, 3639, 18559, 25607, 273, 394, 18559, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1221, 3381, 2297, 12, 3651, 429, 2146, 16, 1250, 16116, 13, 565, 288, 3639, 18559, 14049, 273, 16116, 692, 760, 6918, 294, 4833, 31, 3639, 18559, 25607, 273, 394, 18559, 5621, ...
} catch (BadLocationException e1) { PydevPlugin.log(IStatus.ERROR, "Error setting selection", e1);
private void openInFile(IFile file, Location start, Location end) { if (file == null) return; IWorkbenchPage p = PydevPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); try { IEditorPart editorPart= p.openEditor(file, null, true); if (start != null && editorPart instanceof ITextEditor) { ITextEditor textEdit = (ITextEditor)editorPart; showInEditor(textEdit, start, end); } } catch (PartInitException e) { PydevPlugin.log(IStatus.ERROR, "Unexpected error opening file", e); } catch (BadLocationException e1) { PydevPlugin.log(IStatus.ERROR, "Error setting selection", e1); } }
1319 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1319/46f4537ccb62b764a878e75128abd84e94f9720a/PyOpenAction.java/clean/org.python.pydev/src/org/python/pydev/editor/actions/PyOpenAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1696, 382, 812, 12, 45, 812, 585, 16, 7050, 787, 16, 7050, 679, 13, 288, 202, 202, 430, 261, 768, 422, 446, 13, 1082, 202, 2463, 31, 202, 202, 45, 2421, 22144, 1964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1696, 382, 812, 12, 45, 812, 585, 16, 7050, 787, 16, 7050, 679, 13, 288, 202, 202, 430, 261, 768, 422, 446, 13, 1082, 202, 2463, 31, 202, 202, 45, 2421, 22144, 1964, ...
FileOutputStream output = new FileOutputStream(target); output.write((CDX_HEADER_STRING + "\n").getBytes()); CDXRecord cdxRecord = new CDXRecord(); Iterator itr = results.iterator(); while (itr.hasNext()) { SearchResult result = (SearchResult) itr.next(); cdxRecord.fromSearchResult(result); output.write((cdxRecord.toValue() + "\n").getBytes());
FileOutputStream os = new FileOutputStream(target); BufferedOutputStream bos = new BufferedOutputStream(os); PrintWriter pw = new PrintWriter(bos); try { pw.println(CDXRecord.CDX_HEADER_MAGIC); CDXRecord cdxRecord = new CDXRecord(); Iterator itr = results.iterator(); while (itr.hasNext()) { SearchResult result = (SearchResult) itr.next(); cdxRecord.fromSearchResult(result); pw.println(cdxRecord.toValue()); } } finally { pw.close();
public void serializeResults(final SearchResults results, File target) throws IOException { // TODO will this automatically close when it falls out of scope? FileOutputStream output = new FileOutputStream(target); output.write((CDX_HEADER_STRING + "\n").getBytes()); CDXRecord cdxRecord = new CDXRecord(); Iterator itr = results.iterator(); while (itr.hasNext()) { SearchResult result = (SearchResult) itr.next(); cdxRecord.fromSearchResult(result); output.write((cdxRecord.toValue() + "\n").getBytes()); } }
54068 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54068/5342cb99e2a0786cd1a044142fbf3a43cdd33dbe/ArcIndexer.java/clean/src/java/org/archive/wayback/cdx/indexer/ArcIndexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 4472, 3447, 12, 6385, 5167, 3447, 1686, 16, 1082, 202, 812, 1018, 13, 1216, 1860, 288, 9506, 202, 759, 2660, 903, 333, 6635, 1746, 1347, 518, 21714, 596, 434, 2146, 35, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 4472, 3447, 12, 6385, 5167, 3447, 1686, 16, 1082, 202, 812, 1018, 13, 1216, 1860, 288, 9506, 202, 759, 2660, 903, 333, 6635, 1746, 1347, 518, 21714, 596, 434, 2146, 35, 2...
public synchronized void postUpdateUI() {
public void postUpdateUI() {
public synchronized void postUpdateUI() { // this attempts to cleanup the damage done by updateComponentTreeUI requestFocus(); setCaret(getCaret()); select(outputMark, outputMark); }
46579 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46579/08ecc635ba8049aeb419722893f373a4a7f99a77/Console.java/buggy/src/lib/com/izforge/izpack/util/Console.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1603, 1891, 5370, 1435, 288, 3639, 368, 333, 7531, 358, 6686, 326, 302, 301, 410, 2731, 635, 1089, 1841, 2471, 5370, 3639, 590, 9233, 5621, 3639, 11440, 20731, 12, 588, 39, 207...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1603, 1891, 5370, 1435, 288, 3639, 368, 333, 7531, 358, 6686, 326, 302, 301, 410, 2731, 635, 1089, 1841, 2471, 5370, 3639, 590, 9233, 5621, 3639, 11440, 20731, 12, 588, 39, 207...
swmm.notifyListenersOfRemove(ne); ne.setComment(newComment); swmm.notifyListenersOfAdd(ne);
swmm.notifyListenersOfRemove(ne); ne.setComment(newComment); swmm.notifyListenersOfAdd(ne);
public void editComment() { FakeTreeNode ftn = (FakeTreeNode)getSelectionPath().getLastPathComponent(); NamedEdge ne = ftn.getEdge(); if(ne == null) { JOptionPane.showMessageDialog(this, "This is not an edge", "Cannot Edit Value", JOptionPane.ERROR_MESSAGE); } CommentDialog theDialog = new CommentDialog(MainFrame.getMainFrame(), ne.getComment() ); theDialog.setTitle("Enter Comment"); theDialog.setVisible(true); if (theDialog.wasApproved()) { String newComment = theDialog.getText(); swmm.notifyListenersOfRemove(ne); ne.setComment(newComment); swmm.notifyListenersOfAdd(ne); } }
47007 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47007/d9311230f82f4404a6caf7a2cb902c26b0b86646/DataMapTree.java/clean/OldSoar/trunk/visualsoar/Source/edu/umich/visualsoar/datamap/DataMapTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3874, 4469, 1435, 288, 565, 11551, 12513, 284, 5088, 273, 261, 25462, 12513, 13, 588, 6233, 743, 7675, 588, 3024, 743, 1841, 5621, 565, 9796, 6098, 1073, 273, 284, 5088, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3874, 4469, 1435, 288, 565, 11551, 12513, 284, 5088, 273, 261, 25462, 12513, 13, 588, 6233, 743, 7675, 588, 3024, 743, 1841, 5621, 565, 9796, 6098, 1073, 273, 284, 5088, 18, 58...
is.close();
public static void copyTo(Bucket decodedData, OutputStream os, long truncateLength) throws IOException { if(truncateLength == 0) return; if(truncateLength < 0) truncateLength = Long.MAX_VALUE; InputStream is = decodedData.getInputStream(); byte[] buf = new byte[4096]; long moved = 0; while(moved < truncateLength) { // DO NOT move the (int) inside the Math.min()! big numbers truncate to negative numbers. int bytes = (int) Math.min(buf.length, truncateLength - moved); if(bytes <= 0) throw new IllegalStateException("bytes="+bytes+", truncateLength="+truncateLength+", moved="+moved); bytes = is.read(buf, 0, bytes); if(bytes <= 0) { if(truncateLength == Long.MAX_VALUE) break; throw new IOException("Could not move required quantity of data: "+bytes); } os.write(buf, 0, bytes); moved += bytes; } is.close(); }
56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/fbdde7654afdefd24ae4365520a38c1c680248a7/BucketTools.java/buggy/src/freenet/support/BucketTools.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 29817, 12, 4103, 6383, 751, 16, 8962, 1140, 16, 1525, 10310, 1782, 13, 1216, 1860, 288, 202, 202, 430, 12, 27201, 1782, 422, 374, 13, 327, 31, 202, 202, 430, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 29817, 12, 4103, 6383, 751, 16, 8962, 1140, 16, 1525, 10310, 1782, 13, 1216, 1860, 288, 202, 202, 430, 12, 27201, 1782, 422, 374, 13, 327, 31, 202, 202, 430, 12, 2...
elementParent.getContainingFile(),
containingFile,
protected void replace(ReplacementInfo _info) { final ReplacementInfoImpl info = (ReplacementInfoImpl)_info; final PsiElement element = (info.matchesPtrList.get(0)).getElement(); final String replacement = info.result; if (element==null || !element.isWritable() || !element.isValid()) return; final PsiElement elementParent = element.getParent(); CommandProcessor.getInstance().executeCommand( project, new Runnable() { public void run() { ApplicationManager.getApplication().runWriteAction( new Runnable() { public void run() { boolean listContext = false; try { PsiElement el = findRealSubstitutionElement(element); listContext = isListContext(el); final PsiElement[] statements = MatcherImplUtil.createTreeFromText( replacement, false, options.getMatchOptions().getFileType(), project ); if (context == null) context = new ReplacementContext(); if (listContext) { if (statements.length > 1) { elementParent.addRangeBefore(statements[0],statements[statements.length-1],element); } else if (statements.length==1) { PsiElement replacement = getMatchExpr(statements[0]); handleComments(el, replacement); handleModifierList(el, replacement, context); replacement = handleSymbolReplacemenent(replacement, el, context); if (replacement instanceof PsiTryStatement) { final List<PsiCodeBlock> unmatchedCatchBlocks = el.getUserData(MatcherImplUtil.UNMATCHED_CATCH_BLOCK_CONTENT_VAR_KEY); final List<PsiParameter> unmatchedCatchParams = el.getUserData(MatcherImplUtil.UNMATCHED_CATCH_PARAM_CONTENT_VAR_KEY); final PsiCatchSection catches[] = ((PsiTryStatement)replacement).getCatchSections(); if (unmatchedCatchBlocks!=null && unmatchedCatchParams!=null) { for(int i = unmatchedCatchBlocks.size()-1; i >= 0; --i) { final PsiParameter parameter = unmatchedCatchParams.get(i); final PsiCatchSection catchSection = PsiManager.getInstance(project).getElementFactory().createCatchSection( (PsiClassType)parameter.getType(), parameter.getName(), null ); catchSection.getCatchBlock().replace( unmatchedCatchBlocks.get(i) ); replacement.addAfter( catchSection, catches[catches.length-1] ); } } } elementParent.addBefore(replacement,element); } } else if (statements.length > 0) { int i = 0; while( true ) { if (!(statements[i] instanceof PsiComment || statements[i] instanceof PsiWhiteSpace ) ) break; ++i; } if (i != 0) { elementParent.addRangeBefore(statements[0],statements[i-1],el); } PsiElement replacement = getMatchExpr(statements[i]); if (replacement instanceof PsiStatement && !(replacement.getLastChild() instanceof PsiJavaToken) ) { // assert w/o ; elementParent.addRangeBefore(replacement.getFirstChild(),replacement.getLastChild().getPrevSibling(),el); el.delete(); } else { PsiDocComment comment = null; if (el instanceof PsiDocCommentOwner) { comment = ((PsiDocCommentOwner)el).getDocComment(); } // preserve comments handleComments(el, replacement); handleModifierList(el, replacement, context); if (comment!=null && replacement instanceof PsiDocCommentOwner) { replacement.addBefore( comment, replacement.getFirstChild() ); } if (replacement instanceof PsiClass) { // modifier list final PsiStatement[] searchStatements = context.getCodeBlock().getStatements(); if (searchStatements.length > 0 && searchStatements[0] instanceof PsiDeclarationStatement && ((PsiDeclarationStatement)searchStatements[0]).getDeclaredElements()[0] instanceof PsiClass ) { final PsiClass replaceClazz = (PsiClass)replacement; final PsiClass queryClazz = (PsiClass)((PsiDeclarationStatement)searchStatements[0]).getDeclaredElements()[0]; final PsiClass clazz = (PsiClass)el; if (replaceClazz.getExtendsList().getTextLength() == 0 && queryClazz.getExtendsList().getTextLength() == 0 && clazz.getExtendsList().getTextLength() != 0 ) { replaceClazz.getExtendsList().addRange( clazz.getExtendsList().getFirstChild(),clazz.getExtendsList().getLastChild() ); } if (replaceClazz.getImplementsList().getTextLength() == 0 && queryClazz.getImplementsList().getTextLength() == 0 && clazz.getImplementsList().getTextLength() != 0 ) { replaceClazz.getImplementsList().addRange( clazz.getImplementsList().getFirstChild(), clazz.getImplementsList().getLastChild() ); } if (replaceClazz.getTypeParameterList().getTextLength() == 0 && queryClazz.getTypeParameterList().getTextLength() == 0 && clazz.getTypeParameterList().getTextLength() != 0 ) { // skip < and > replaceClazz.getTypeParameterList().replace( clazz.getTypeParameterList() ); } } } replacement = handleSymbolReplacemenent(replacement, el, context); el.replace(replacement); } } else { el.delete(); } } catch(IncorrectOperationException ex) { ex.printStackTrace(); } if (listContext) { for(int i = 0;i < info.matchesPtrList.size();++i) { try { PsiElement element = findRealSubstitutionElement( (info.matchesPtrList.get(i)).getElement() ); element.delete(); //PsiElement firstToDelete = element; //PsiElement lastToDelete = element; //final PsiElement prevSibling = element.getPrevSibling(); // //if (prevSibling instanceof PsiWhiteSpace) { // firstToDelete = prevSibling; //} // //final PsiElement nextSibling = element.getNextSibling(); //if (nextSibling instanceof PsiWhiteSpace) { // lastToDelete = nextSibling; //} //element.getParent().deleteChildRange(firstToDelete,lastToDelete); } catch(IncorrectOperationException ex) { ex.printStackTrace(); } } } try { CodeStyleManager codeStyleManager = PsiManager.getInstance(project).getCodeStyleManager(); if (elementParent.getContainingFile()!=null) { if (options.isToShortenFQN()) { PsiDocumentManager.getInstance(project).commitDocument( FileDocumentManager.getInstance().getDocument(elementParent.getContainingFile().getVirtualFile()) ); codeStyleManager.shortenClassReferences( elementParent.getContainingFile(), elementParent.getTextOffset(), elementParent.getTextOffset() + elementParent.getTextLength() ); } if (options.isToReformatAccordingToStyle()) { if (elementParent.getContainingFile().getVirtualFile()!=null) { PsiDocumentManager.getInstance(project).commitDocument( FileDocumentManager.getInstance().getDocument(elementParent.getContainingFile().getVirtualFile()) ); } codeStyleManager.reformatRange( elementParent.getContainingFile(), elementParent.getTextOffset(), elementParent.getTextOffset() + elementParent.getTextLength(), true ); } } } catch(IncorrectOperationException ex) { ex.printStackTrace(); } } } ); PsiDocumentManager.getInstance(project).commitAllDocuments(); } }, "ssreplace", "test" ); }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/af0a3613d2e75d4b1d05774d6dcfff87326bb682/ReplacerImpl.java/buggy/plugins/structuralsearch/source/com/intellij/structuralsearch/plugin/replace/impl/ReplacerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1453, 12, 15201, 966, 389, 1376, 13, 288, 565, 727, 6910, 475, 28015, 1123, 273, 261, 15201, 28015, 13, 67, 1376, 31, 565, 727, 453, 7722, 1046, 930, 273, 261, 1376, 18, 8436...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1453, 12, 15201, 966, 389, 1376, 13, 288, 565, 727, 6910, 475, 28015, 1123, 273, 261, 15201, 28015, 13, 67, 1376, 31, 565, 727, 453, 7722, 1046, 930, 273, 261, 1376, 18, 8436...
getCms().copyResource(getParamFile(), target, "true".equals(getParamKeeprights()));
getCms().copyResource(getParamFile(), target, "true".equals(getParamKeeprights()), true);
private boolean performCopyOperation() throws CmsException { // on folder copy display "please wait" screen, not for simple file copy CmsResource sourceRes = getCms().readFileHeader(getParamFile()); if (sourceRes.isFolder() && ! DIALOG_WAIT.equals(getParamAction())) { // return false, this will trigger the "please wait" screen return false; } // calculate the target name String target = getParamTarget(); if (target == null) target = ""; if (! target.startsWith("/")) { // target is not an absolute path, add the current parent folder target = CmsResource.getParent(getParamFile()) + target; } try { CmsResource res = getCms().readFileHeader(target); if (res.isFolder()) { // target folder already exists, so we add the current folder name if (! target.endsWith("/")) target += "/"; target = target + CmsResource.getName(getParamFile()); } } catch (CmsException e) { // target folder does not already exist, so target name is o.k. } // set the target parameter value setParamTarget(target); // delete existing target resource if confirmed by the user if (DIALOG_CONFIRMED.equals(getParamAction())) { getCms().deleteResource(target); } // copy the resource getCms().copyResource(getParamFile(), target, "true".equals(getParamKeeprights())); return true; }
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/97d901301797157fc45700e78fdba88051f665c3/CmsCopy.java/clean/src/org/opencms/workplace/CmsCopy.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 3073, 2951, 2988, 1435, 1216, 11228, 288, 3639, 368, 603, 3009, 1610, 2562, 315, 1802, 448, 2529, 6, 5518, 16, 486, 364, 4143, 585, 1610, 3639, 7630, 1084, 607, 273, 14413, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3073, 2951, 2988, 1435, 1216, 11228, 288, 3639, 368, 603, 3009, 1610, 2562, 315, 1802, 448, 2529, 6, 5518, 16, 486, 364, 4143, 585, 1610, 3639, 7630, 1084, 607, 273, 14413, 76...
return 1 + 1 + 1 + 2 + 2; case Token.REGEXP : return 1 + 2; case Icode_CLOSURE : return 1 + 2; case Token.NEW : case Token.CALL : return 1 + 2;
return 1 + 1 + 1 + 2;
private static int icodeTokenLength(int icodeToken) { switch (icodeToken) { case Icode_SCOPE : case Icode_GETPROTO : case Icode_PUSH_PARENT : case Icode_GETSCOPEPARENT : case Icode_SETPROTO : case Icode_SETPARENT : case Token.DELPROP : case Token.TYPEOF : case Token.ENTERWITH : case Token.LEAVEWITH : case Token.RETURN : case Token.RETURN_POPV : case Token.SETELEM : case Token.GETELEM : case Token.SETPROP : case Token.GETPROP : case Icode_PROPINC : case Icode_PROPDEC : case Icode_ELEMINC : case Icode_ELEMDEC : case Token.BITNOT : case Token.BITAND : case Token.BITOR : case Token.BITXOR : case Token.LSH : case Token.RSH : case Token.URSH : case Token.NOT : case Token.POS : case Token.NEG : case Token.SUB : case Token.MUL : case Token.DIV : case Token.MOD : case Token.ADD : case Token.POPV : case Token.POP : case Icode_DUP : case Icode_DUPSECOND : case Icode_SWAP : case Token.LT : case Token.GT : case Token.LE : case Token.GE : case Token.IN : case Token.INSTANCEOF : case Token.EQ : case Token.NE : case Token.SHEQ : case Token.SHNE : case Token.ZERO : case Token.ONE : case Token.NULL : case Token.THIS : case Token.THISFN : case Token.FALSE : case Token.TRUE : case Token.UNDEFINED : case Icode_CATCH: case Icode_RETUNDEF: case Icode_LITERAL_SET: case Token.STRING : case Token.NAME : case Token.SETNAME : case Icode_TYPEOFNAME : case Token.BINDNAME : case Icode_NAMEINC : case Icode_NAMEDEC : case Token.CATCH_SCOPE : return 1; case Token.THROW : // source line return 1 + 2; case Icode_GOSUB : case Token.GOTO : case Token.IFEQ : case Token.IFNE : case Icode_IFEQ_POP : // target pc offset return 1 + 2; case Icode_RETSUB : case Token.ENUM_INIT : case Token.ENUM_NEXT : case Token.ENUM_ID : case Icode_VARINC : case Icode_VARDEC : case Token.GETVAR : case Token.SETVAR : case Token.LOCAL_SAVE : case Token.LOCAL_LOAD : // slot index return 1 + 1; case Icode_CALLSPECIAL : // call type // is new // line number // arg count return 1 + 1 + 1 + 2 + 2; case Token.REGEXP : // regexp index return 1 + 2; case Icode_CLOSURE : // index of closure master copy return 1 + 2; case Token.NEW : case Token.CALL : // arg count return 1 + 2; case Icode_SHORTNUMBER : // short number return 1 + 2; case Icode_INTNUMBER : // int number return 1 + 4; case Token.NUMBER : // index of double number return 1 + 2; case Icode_LOAD_STR1: // ubyte string index return 1 + 1; case Icode_LOAD_STR2: // ushort string index return 1 + 2; case Icode_LOAD_STR4: // int string index return 1 + 4; case Icode_NAME_AND_THIS : // skipGetThis flag return 1 + 1; case Icode_LINE : // line number return 1 + 2; case Token.ARRAYLIT: // number of indexes and offset of skip array return 1 + 4 + 4; case Token.OBJECTLIT: // offset of property ids array return 1 + 4; case Icode_LITERAL_NEW: // number of literal values return 1 + 4; default: Kit.codeBug(); // Bad icodeToken return 0; } }
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/e88881f3a6bd2c7e5dc034fb562e82c4759ceacb/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 509, 277, 710, 1345, 1782, 12, 474, 277, 710, 1345, 13, 565, 288, 3639, 1620, 261, 3487, 1345, 13, 288, 5411, 648, 467, 710, 67, 19444, 294, 5411, 648, 467, 710, 67, 3264, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 509, 277, 710, 1345, 1782, 12, 474, 277, 710, 1345, 13, 565, 288, 3639, 1620, 261, 3487, 1345, 13, 288, 5411, 648, 467, 710, 67, 19444, 294, 5411, 648, 467, 710, 67, 3264, ...
public Record findMatchInDB(Record record) throws RemoteException, DBLayerException { if(record == null) return null; // Get the table. Class table = record.getClass(); // Look in the cache.// if(cacheEnabled) {// Record cachedRecord = cache.remove(table);// if( cachedRecord != null && record.equals(cachedRecord))// return cachedRecord; // hooray, one select has been saved!// } // Create a query that will look for the record with the same properties. SelectQuery query = db.createQuery( table ); // Equal properties. for(String property : record.getProperties()) { Object value = record.getValue(property); // System.out.println(" + "+table.getSimpleName()+"."+property+"="+value); // String newValue = null;// try {// newValue = new String(value.toString().getBytes(), "UTF-8");// }catch(Exception e) {} if( value == null ) // use the database null /*query.addRestriction(RESTR_IS_NULL, property, null, null, null)*/; else query.addRestriction(RESTR_EQ, property, null, value, null); } // Equal foreign keys (by their ID's)! for(String key : record.getForeignKeys() ) { Record subrecord = (Record) record.getValue(key); query.addRestriction(RESTR_EQ, key, null, subrecord, null); } // Is there such record? int results = db.executeQuery( query ); int rows = db.getNumRows( results ); if( rows > 1 && !(record instanceof Habitat) ) logger.info("There are " + rows + " completely identical records in the " + table.getSimpleName() + " table!"); record = null; if( rows != 0 ) // ain't that beautiful! record = (Record)((Object[])(db.more(results, 0, 0)[0]))[0]; db.closeQuery( query ); // Update the cache appropriately - store the record for future generations.// if( record != null && cacheEnabled ) // cache.put(table, record); return record; }
57211 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57211/4b03d285fdfd6a76458db40e687c06631401fb4c/DefaultDirector.java/clean/trunk/src/net/sf/plantlore/client/imports/DefaultDirector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2115, 4720, 2060, 382, 2290, 12, 2115, 3366, 13, 202, 15069, 5169, 503, 16, 2290, 4576, 503, 95, 202, 202, 430, 12, 3366, 631, 2011, 13, 2463, 2011, 31, 202, 202, 759, 967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2115, 4720, 2060, 382, 2290, 12, 2115, 3366, 13, 202, 15069, 5169, 503, 16, 2290, 4576, 503, 95, 202, 202, 430, 12, 3366, 631, 2011, 13, 2463, 2011, 31, 202, 202, 759, 967, ...
IEditorPart editors[] = page.getDirtyEditors(); for (int k = 0; k < editors.length; k++) { IEditorPart editor = editors[k]; if (editor.isSaveOnCloseNeeded()) { if (!dirtyEditorsInput.contains(editor .getEditorInput())) { dirtyParts.add(editor); dirtyEditorsInput.add(editor .getEditorInput()); } } } IViewPart[] viewParts = page.getDirtyViews(); for (int m=0; m<viewParts.length; m++) { IViewPart view = viewParts[m]; if (view instanceof ISaveablePart) { ISaveablePart saveable = (ISaveablePart)view; if (saveable.isSaveOnCloseNeeded()) { if (!dirtyParts.contains(saveable)) { dirtyParts.add(saveable); } } } } }
ISaveablePart[] parts = page.getDirtyParts(); for (int k = 0; k < parts.length; k++) { ISaveablePart part = parts[k]; if (part.isSaveOnCloseNeeded()) { if (part instanceof IEditorPart) { IEditorPart editor = (IEditorPart)part; if (!dirtyEditorsInput.contains(editor .getEditorInput())) { dirtyParts.add(editor); dirtyEditorsInput.add(editor .getEditorInput()); } } else { dirtyParts.add(part); } } } }
public boolean saveAllEditors(boolean confirm) { final boolean finalConfirm = confirm; final boolean[] result = new boolean[1]; result[0] = true; Platform.run(new SafeRunnable(WorkbenchMessages.ErrorClosing) { public void run() { // Collect dirtyParts ArrayList dirtyParts = new ArrayList(); ArrayList dirtyEditorsInput = new ArrayList(); IWorkbenchWindow windows[] = getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { IWorkbenchPage pages[] = windows[i].getPages(); for (int j = 0; j < pages.length; j++) { WorkbenchPage page = (WorkbenchPage) pages[j]; // add all editors to the list IEditorPart editors[] = page.getDirtyEditors(); for (int k = 0; k < editors.length; k++) { IEditorPart editor = editors[k]; if (editor.isSaveOnCloseNeeded()) { if (!dirtyEditorsInput.contains(editor .getEditorInput())) { dirtyParts.add(editor); dirtyEditorsInput.add(editor .getEditorInput()); } } } // add all the saveable views to the list IViewPart[] viewParts = page.getDirtyViews(); for (int m=0; m<viewParts.length; m++) { IViewPart view = viewParts[m]; if (view instanceof ISaveablePart) { ISaveablePart saveable = (ISaveablePart)view; if (saveable.isSaveOnCloseNeeded()) { if (!dirtyParts.contains(saveable)) { dirtyParts.add(saveable); } } } } } } if (dirtyParts.size() > 0) { IWorkbenchWindow w = getActiveWorkbenchWindow(); if (w == null) w = windows[0]; result[0] = EditorManager.saveAll(dirtyParts, finalConfirm, w); } } }); return result[0]; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/609ad53fd321be3a05929de62794a6e78e2c8455/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1923, 1595, 4666, 1383, 12, 6494, 6932, 13, 288, 202, 202, 6385, 1250, 727, 11269, 273, 6932, 31, 202, 202, 6385, 1250, 8526, 563, 273, 394, 1250, 63, 21, 15533, 202, 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, 1250, 1923, 1595, 4666, 1383, 12, 6494, 6932, 13, 288, 202, 202, 6385, 1250, 727, 11269, 273, 6932, 31, 202, 202, 6385, 1250, 8526, 563, 273, 394, 1250, 63, 21, 15533, 202, 20...
initNumberJcb(endCourseHourJcb, 8, 19);
initNumberJcb(endCourseHourJcb, FIRST_HOUR, LAST_HOUR);
private void initAddModifyCourseWindow() { teacherLabel = new JLabel("Le cours sera donn par :"); addComponent(AMCWLayout,layoutConstraints,teacherLabel,1,1,3,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(30,10,15,10)); AMCWFrame.getContentPane().add(teacherLabel); if (teachersName == null) teacherCourseJcb = new JComboBox(); else teacherCourseJcb = new JComboBox(teachersName); teacherPanel.setLayout(new BoxLayout(teacherPanel, BoxLayout.Y_AXIS)); teacherPanel.add(teacherCourseJcb); teacherPanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,teacherPanel,4,1,2,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(20,10,15,10)); AMCWFrame.getContentPane().add(teacherPanel); teacherPlus = new JButton("+"); teacherPlus.addActionListener(new ButtonPlusListener(teacherPlusPanel, teacherPanel, AMCWFrame, teachersName)); teacherPlusPanel.setLayout(new BoxLayout(teacherPlusPanel, BoxLayout.Y_AXIS)); teacherPlusPanel.add(teacherPlus); teacherPlusPanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,teacherPlusPanel,6,1,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(20,10,15,10)); AMCWFrame.getContentPane().add(teacherPlusPanel); if (teachersName == null) { teacherLabel.setEnabled(false); teacherCourseJcb.setEnabled(false); teacherPlus.setEnabled(false); } dateCourseTheLabel = new JLabel("le"); addComponent(AMCWLayout,layoutConstraints,dateCourseTheLabel,1,2,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(dateCourseTheLabel); dateCourse = new JDateChooser(); addComponent(AMCWLayout,layoutConstraints,dateCourse,2,2,2,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(dateCourse); dureeCourseDeLabel = new JLabel("de"); addComponent(AMCWLayout,layoutConstraints,dureeCourseDeLabel,1,3,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(dureeCourseDeLabel); startCourseHourJcb = new JComboBox(); initNumberJcb(startCourseHourJcb, 8, 19); addComponent(AMCWLayout,layoutConstraints,startCourseHourJcb,2,3,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(startCourseHourJcb); startCourseHourLabel = new JLabel("heure"); addComponent(AMCWLayout,layoutConstraints,startCourseHourLabel,3,3,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(startCourseHourLabel); dureeCourseALabel = new JLabel(""); addComponent(AMCWLayout,layoutConstraints,dureeCourseALabel,4,3,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(dureeCourseALabel); endCourseHourJcb = new JComboBox(); initNumberJcb(endCourseHourJcb, 8, 19); addComponent(AMCWLayout,layoutConstraints,endCourseHourJcb,5,3,GridBagConstraints.RELATIVE,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(endCourseHourJcb); endCourseHourLabel = new JLabel("heure"); addComponent(AMCWLayout,layoutConstraints,endCourseHourLabel,6,3,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(endCourseHourLabel); startCourseMinuteJcb = new JComboBox(); initMinuteJcb(startCourseMinuteJcb); addComponent(AMCWLayout,layoutConstraints,startCourseMinuteJcb,2,4,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(startCourseMinuteJcb); startCourseMinuteLabel = new JLabel("min"); addComponent(AMCWLayout,layoutConstraints,startCourseMinuteLabel,3,4,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(startCourseMinuteLabel); endCourseMinuteJcb = new JComboBox(); initMinuteJcb(endCourseMinuteJcb); addComponent(AMCWLayout,layoutConstraints,endCourseMinuteJcb,5,4,GridBagConstraints.RELATIVE,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(endCourseMinuteJcb); endCourseMinuteLabel = new JLabel("min"); addComponent(AMCWLayout,layoutConstraints,endCourseMinuteLabel,6,4,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(endCourseMinuteLabel); placeCourseLabel = new JLabel("dans le local ou les locaux :"); addComponent(AMCWLayout,layoutConstraints,placeCourseLabel,1,5,3,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(placeCourseLabel); if (roomsName == null) placeCourseJcb = new JComboBox(); else placeCourseJcb = new JComboBox(roomsName); placeCoursePanel.setLayout(new BoxLayout(placeCoursePanel, BoxLayout.Y_AXIS)); placeCoursePanel.add(placeCourseJcb); placeCoursePanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,placeCoursePanel,4,5,2,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(placeCoursePanel); placeCoursePlus = new JButton("+"); placeCoursePlus.addActionListener(new ButtonPlusListener(placeCoursePlusPanel, placeCoursePanel, AMCWFrame, roomsName)); placeCoursePlusPanel.setLayout(new BoxLayout(placeCoursePlusPanel, BoxLayout.Y_AXIS)); placeCoursePlusPanel.add(placeCoursePlus); placeCoursePlusPanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,placeCoursePlusPanel,6,5,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(placeCoursePlusPanel); if (roomsName == null) { placeCourseLabel.setEnabled(false); placeCourseJcb.setEnabled(false); placeCoursePlus.setEnabled(false); } if (type == TYPE_ADD) { repeatCourseLabel = new JLabel("Sur combien de semaines se droulera le cours ?"); addComponent(AMCWLayout,layoutConstraints,repeatCourseLabel,1,6,5,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(repeatCourseLabel); repeatCourseJcb = new JComboBox(); initNumberJcb(repeatCourseJcb, 1, 30); addComponent(AMCWLayout,layoutConstraints,repeatCourseJcb,6,6,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(repeatCourseJcb); } courseEquipmentLabel = new JLabel("Le(s) matriel(s) utilis(s) :"); addComponent(AMCWLayout,layoutConstraints,courseEquipmentLabel,1,7,3,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(courseEquipmentLabel); if (materialsName == null) courseEquipmentJcb = new JComboBox(); else courseEquipmentJcb = new JComboBox(materialsName); courseEquipmentPanel.setLayout(new BoxLayout(courseEquipmentPanel, BoxLayout.Y_AXIS)); courseEquipmentPanel.add(courseEquipmentJcb); courseEquipmentPanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,courseEquipmentPanel,4,7,2,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(courseEquipmentPanel); courseEquipmentPlus = new JButton("+"); courseEquipmentPlus.addActionListener(new ButtonPlusListener(courseEquipmentPlusPanel, courseEquipmentPanel, AMCWFrame, materialsName)); courseEquipmentPlusPanel.setLayout(new BoxLayout(courseEquipmentPlusPanel, BoxLayout.Y_AXIS)); courseEquipmentPlusPanel.add(courseEquipmentPlus); courseEquipmentPlusPanel.add(Box.createVerticalStrut(5)); addComponent(AMCWLayout,layoutConstraints,courseEquipmentPlusPanel,6,7,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(courseEquipmentPlusPanel); if (materialsName == null) { courseEquipmentJcb.setEnabled(false); courseEquipmentLabel.setEnabled(false); courseEquipmentPlus.setEnabled(false); } courseFormationLabel = new JLabel("Le cours est attribu la formation :"); addComponent(AMCWLayout,layoutConstraints,courseFormationLabel,1,8,4,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(courseFormationLabel); courseFormationJcb = new JComboBox(); addComponent(AMCWLayout,layoutConstraints,courseFormationJcb,5,8,GridBagConstraints.REMAINDER,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(courseFormationJcb); courseGroupLabel = new JLabel("et plus prcisment, au groupe :"); addComponent(AMCWLayout,layoutConstraints,courseGroupLabel,1,9,4,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,15,10)); AMCWFrame.getContentPane().add(courseGroupLabel); courseGroupJcb = new JComboBox(groupsName); addComponent(AMCWLayout,layoutConstraints,courseGroupJcb,5,9,GridBagConstraints.REMAINDER,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(5,10,15,10)); AMCWFrame.getContentPane().add(courseGroupJcb); typeCourseLabel = new JLabel("Choisissez le type de cours :"); addComponent(AMCWLayout,layoutConstraints,typeCourseLabel,1,10,3,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(15,10,0,10)); AMCWFrame.getContentPane().add(typeCourseLabel); magistral = new JRadioButton("Cours magistral",true); addComponent(AMCWLayout,layoutConstraints,magistral,1,11,2,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(5,10,20,10)); AMCWFrame.getContentPane().add(magistral); td = new JRadioButton("TD"); addComponent(AMCWLayout,layoutConstraints,td,3,11,1,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,10,20,10)); AMCWFrame.getContentPane().add(td); tp = new JRadioButton("TP"); addComponent(AMCWLayout,layoutConstraints,tp,4,11,GridBagConstraints.REMAINDER,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(5,10,20,10)); AMCWFrame.getContentPane().add(tp); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(magistral); buttonGroup.add(td); buttonGroup.add(tp); ok = new JButton("OK"); ok.addActionListener(new ActionOk()); addComponent(AMCWLayout,layoutConstraints,ok,5,12,GridBagConstraints.RELATIVE,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(20,10,10,10)); AMCWFrame.getContentPane().add(ok); annuler = new JButton("Annuler"); annuler.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { AMCWFrame.dispose(); } }); addComponent(AMCWLayout,layoutConstraints,annuler,6,12,GridBagConstraints.REMAINDER,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(20,10,10,10)); AMCWFrame.getContentPane().add(annuler); }
10961 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10961/e1d2fe1966aa19592744ffdc0b35eeacf24e65b3/AddModifyCourseWindow.java/clean/beontimeSwing/src/fr/umlv/smoreau/beontime/client/graphics/windows/AddModifyCourseWindow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 986, 11047, 39, 3117, 3829, 1435, 288, 202, 202, 736, 27779, 2224, 273, 394, 21403, 2932, 1682, 276, 4390, 703, 69, 2727, 82, 779, 294, 8863, 202, 202, 1289, 1841, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1208, 986, 11047, 39, 3117, 3829, 1435, 288, 202, 202, 736, 27779, 2224, 273, 394, 21403, 2932, 1682, 276, 4390, 703, 69, 2727, 82, 779, 294, 8863, 202, 202, 1289, 1841, ...
case WFSTATE_STEP1POOL: wi.setOwner( null );
case WFSTATE_STEP1POOL: wi.setOwner( null );
private static void doState(Context c,WorkflowItem wi, int newstate, EPerson newowner) throws SQLException, IOException, AuthorizeException { Collection mycollection = wi.getCollection(); Group mygroup = null; wi.setState(newstate); switch (newstate) { case WFSTATE_STEP1POOL: // any reviewers? // if so, add them to the tasklist wi.setOwner( null ); //wi.update(); // get reviewers (group 1 ) mygroup = mycollection.getWorkflowGroup( 1 ); if (mygroup != null ) { // there were reviewers, change the state // and add them to the list createTasks(c, wi, mygroup); wi.update(); // email notification notifyGroupOfTask(c, mygroup, wi); } else { // no reviewers, skip ahead doState(c, wi, WFSTATE_STEP2POOL, null); } break; case WFSTATE_STEP1: // remove reviewers from tasklist // assign owner deleteTasks(c, wi); wi.setOwner(newowner); break; case WFSTATE_STEP2POOL: // clear owner // any approvers? // if so, add them to tasklist // if not, skip to next state wi.setOwner( null ); // get approvers (group 2) mygroup = mycollection.getWorkflowGroup( 2 ); if( mygroup != null ) { // there were approvers, change the state // timestamp, and add them to the list createTasks(c, wi, mygroup ); // email notification notifyGroupOfTask(c, mygroup, wi); } else { // no reviewers, skip ahead doState(c, wi, WFSTATE_STEP3POOL, null); } break; case WFSTATE_STEP2: // remove admins from tasklist // assign owner deleteTasks(c, wi); wi.setOwner(newowner); break; case WFSTATE_STEP3POOL: // any editors? // if so, add them to tasklist wi.setOwner( null ); mygroup = mycollection.getWorkflowGroup( 3 ); if( mygroup != null ) { // there were editors, change the state // timestamp, and add them to the list createTasks(c, wi, mygroup); // email notification notifyGroupOfTask(c, mygroup, wi); } else { // no editors, skip ahead doState(c, wi, WFSTATE_ARCHIVE, newowner); } break; case WFSTATE_STEP3: // remove editors from tasklist // assign owner deleteTasks(c, wi); wi.setOwner(newowner); break; case WFSTATE_ARCHIVE: // put in archive in one transaction try { // remove workflow tasks deleteTasks(c, wi); mycollection = wi.getCollection(); Item myitem = archive(c, wi); // now email notification notifyOfArchive(c, myitem, mycollection); } catch(IOException e) { // indexer causes this throw e; } catch (SQLException e) { // problem starting workflow throw e; } break; } if (wi != null) wi.update(); }
49711 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49711/9f3b39bf74c835ab4139c29391aef74922485f41/WorkflowManager.java/clean/dspace/src/org/dspace/workflow/WorkflowManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 741, 1119, 12, 1042, 276, 16, 8484, 1180, 16138, 16, 509, 394, 2019, 16, 512, 8346, 394, 8443, 13, 3639, 1216, 6483, 16, 1860, 16, 23859, 503, 565, 288, 3639, 2200, 3399...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1119, 12, 1042, 276, 16, 8484, 1180, 16138, 16, 509, 394, 2019, 16, 512, 8346, 394, 8443, 13, 3639, 1216, 6483, 16, 1860, 16, 23859, 503, 565, 288, 3639, 2200, 3399...
IWorkbenchAction action = new TipsAndTricksAction(window); action.setId(getId());
RetargetAction action = new RetargetAction(getId(), IDEWorkbenchMessages.getString("Workbench.rebuildProject")); action.setToolTipText(IDEWorkbenchMessages.getString("Workbench.rebuildProjectToolTip")); window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.project.rebuildProject");
public IWorkbenchAction create(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } IWorkbenchAction action = new TipsAndTricksAction(window); action.setId(getId()); return action; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/a28eb1ef10e772648cd789827e54d2e08b8df441/IDEActionFactory.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 467, 2421, 22144, 1803, 752, 12, 45, 2421, 22144, 3829, 2742, 13, 288, 1082, 202, 430, 261, 5668, 422, 446, 13, 288, 9506, 202, 12849, 394, 2754, 5621, 1082, 202, 97, 1082, 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, 3196, 202, 482, 467, 2421, 22144, 1803, 752, 12, 45, 2421, 22144, 3829, 2742, 13, 288, 1082, 202, 430, 261, 5668, 422, 446, 13, 288, 9506, 202, 12849, 394, 2754, 5621, 1082, 202, 97, 1082, 2...
waitForActivationsToComplete();
if (activationCount > 0) { long waitTime = CLOSE_TIMEOUT; while (activationCount > 0 && waitTime > 0) { waitTime = waitOnLock(mainLock, waitTime); } if (activationCount > 0) { log.warn("Timed out waiting for activations to complete"); } }
public void close() throws JMSException { try { synchronized (mainLock) { if (closed) { return; } closing = true; //We wait for any activation in progress to complete and the resulting message //(if any) to be returned and processed. //The ensures a clean, gracefully closure of the client side consumer, without //any messages in transit which might arrive after the consumer is closed and which //subsequently might be cancelled out of sequence causing message ordering problems waitForActivationsToComplete(); //Now we know there are no activations in progress but the consumer may still be active so we call //deactivate which returns the id of the last message we should have received //if we have received this message then we know there is no possibility of any message still in //transit and we can close down with confidence //otherwise we wait for this message and timeout if it doesn't arrive which might be the case //if the connection to the server has been lost //TODO Make configurable final int TIMEOUT = 20000; long lastMessageIDToExpect = deactivateConsumer(); if (lastMessageIDToExpect != -1) { long waitTime = TIMEOUT; while (lastMessageIDToExpect != lastMessageId && waitTime > 0) { waitTime = waitOnLock(mainLock, waitTime); } if (lastMessageIDToExpect != lastMessageId) { log.warn("Timed out waiting for last message to arrive, last=" + lastMessageId +" expected=" + lastMessageIDToExpect); } } //We set this even if we timed out waiting since we do not want any more to arrive now gotLastMessage = true; //Wake up any receive() thread that might be waiting mainLock.notify(); //Now make sure that any onMessage of a listener has finished executing long waitTime = TIMEOUT; synchronized (onMessageLock) { while (onMessageExecuting && waitTime > 0) { waitTime = waitOnLock(onMessageLock, waitTime); } if (onMessageExecuting) { //Timed out waiting for last onMessage to be processed log.warn("Timed out waiting for last onMessage to be executed"); } } //Now we know that all messages have been received and processed if (!buffer.isEmpty()) { //Now we cancel any deliveries that might be waiting in our buffer Iterator iter = buffer.iterator(); List ids = new ArrayList(); while (iter.hasNext()) { MessageProxy mp = (MessageProxy)iter.next(); ids.add(new Long(mp.getMessage().getMessageID())); } cancelDeliveries(ids); } //Now we are done listener = null; receiverThread = null; closed = true; } } catch (InterruptedException e) { //No one should be interrupting the thread so this shouldn't occur throw new IllegalStateException("Thread interrupted while closing consumer"); } }
3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/07e374de7de6b7e5b2cc24cb9721dda2c85d257e/MessageCallbackHandler.java/buggy/src/main/org/jboss/jms/client/remoting/MessageCallbackHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 1746, 1435, 1216, 20343, 282, 288, 1377, 775, 1377, 288, 540, 3852, 261, 5254, 2531, 13, 540, 288, 5411, 309, 261, 12204, 13, 5411, 288, 9079, 327, 31, 5411, 289, 13491, 7647, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 1746, 1435, 1216, 20343, 282, 288, 1377, 775, 1377, 288, 540, 3852, 261, 5254, 2531, 13, 540, 288, 5411, 309, 261, 12204, 13, 5411, 288, 9079, 327, 31, 5411, 289, 13491, 7647, ...
}
private void invalidateSelectedLines() { // to hide line highlight if selections are being added later on invalidateLine(caretLine); Iterator iter = selectionManager.selection.iterator(); while(iter.hasNext()) { Selection s = (Selection)iter.next(); invalidateLineRange(s.startLine,s.endLine); } } //}}}
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/01e43a44f5f0b2f213c816f23cccf5cfebee33e7/JEditTextArea.java/clean/org/gjt/sp/jedit/textarea/JEditTextArea.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 11587, 7416, 5763, 1435, 202, 95, 202, 202, 759, 358, 6853, 980, 8839, 309, 21738, 854, 3832, 3096, 5137, 603, 202, 202, 5387, 340, 1670, 12, 71, 20731, 1670, 1769, 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, 1152, 918, 11587, 7416, 5763, 1435, 202, 95, 202, 202, 759, 358, 6853, 980, 8839, 309, 21738, 854, 3832, 3096, 5137, 603, 202, 202, 5387, 340, 1670, 12, 71, 20731, 1670, 1769, 202, ...
protected IStatus run(IProgressMonitor monitor) { HashSet disabledPlugins = new HashSet(Arrays .asList(getDisabledEarlyActivatedPlugins())); monitor.beginTask(WorkbenchMessages.Workbench_startingPlugins, extensions.length); for (int i = 0; i < extensions.length; ++i) { if (monitor.isCanceled() || !isRunning()) { return Status.CANCEL_STATUS; } IExtension extension = extensions[i]; if (!disabledPlugins.contains(extension.getNamespace())) { monitor.subTask(extension.getNamespace()); Platform.run(new EarlyStartupRunnable(extension)); } monitor.worked(1);
public void run() { try { result[0] = busyOpenWorkbenchWindow(perspID, input); } catch (WorkbenchException e) { result[0] = e;
protected IStatus run(IProgressMonitor monitor) { HashSet disabledPlugins = new HashSet(Arrays .asList(getDisabledEarlyActivatedPlugins())); monitor.beginTask(WorkbenchMessages.Workbench_startingPlugins, extensions.length); for (int i = 0; i < extensions.length; ++i) { if (monitor.isCanceled() || !isRunning()) { return Status.CANCEL_STATUS; } IExtension extension = extensions[i]; // if the plugin is not in the set of disabled plugins, then // execute the code to start it if (!disabledPlugins.contains(extension.getNamespace())) { monitor.subTask(extension.getNamespace()); Platform.run(new EarlyStartupRunnable(extension)); } monitor.worked(1); } monitor.done(); return Status.OK_STATUS; }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/bc508e6d12aaf5e44777fe0ae256945be5760cc6/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 1117, 467, 1482, 1086, 12, 45, 5491, 7187, 6438, 13, 288, 9506, 202, 13482, 5673, 9461, 273, 394, 6847, 12, 12726, 25083, 202, 18, 345, 682, 12, 588, 8853, 41, 20279, 28724, 9461, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1875, 202, 1117, 467, 1482, 1086, 12, 45, 5491, 7187, 6438, 13, 288, 9506, 202, 13482, 5673, 9461, 273, 394, 6847, 12, 12726, 25083, 202, 18, 345, 682, 12, 588, 8853, 41, 20279, 28724, 9461, ...
public Calendar getStart() { return start;
public long getStart() { return startMili;
public Calendar getStart() { return start; }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/57b925d86fd44a7384ad1e5ec70ce829303127f5/DateRangeActivityDelegate.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/DateRangeActivityDelegate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 5542, 8635, 1435, 288, 202, 202, 2463, 787, 31, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 5542, 8635, 1435, 288, 202, 202, 2463, 787, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
suite.addTestSuite(TestMemberToGroup.class);
static public Test suite() { TestSuite suite = new TestSuite(); suite.addTest( SuiteSettings.suite() ); suite.addTest( SuiteSessions.suite() ); suite.addTest( SuiteStems.suite() ); suite.addTest( SuiteGroupTypes.suite() ); suite.addTest( SuiteGroups.suite() ); suite.addTest( SuiteComposites.suite() ); suite.addTest( SuiteSubjects.suite() ); suite.addTest( SuiteQueries.suite() ); suite.addTestSuite(TestBugsClosed.class); suite.addTestSuite(TestBugsOpen.class); suite.addTestSuite(TestAccessPrivilege.class); suite.addTestSuite(TestField.class); suite.addTestSuite(TestGrFiFindByName.class); suite.addTestSuite(TestGrFiFindByUuid.class); suite.addTestSuite(TestGroup.class); suite.addTestSuite(TestGroupAddMemberGroup.class); suite.addTestSuite(TestGroupDeleteMember.class); suite.addTestSuite(TestGroupToMember.class); suite.addTestSuite(TestMember.class); suite.addTestSuite(TestMemberFinder.class); suite.addTestSuite(TestMemberToGroup.class); suite.addTestSuite(TestMemberOf.class); // TODO suite.addTestSuite(TestMemberOfAccessPrivs.class); // TODO suite.addTestSuite(TestMemberOfNamingPrivs.class); suite.addTestSuite(TestMembership.class); suite.addTestSuite(TestNamingPrivilege.class); suite.addTestSuite(TestPrivADMIN.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivCREATE.class); suite.addTestSuite(TestPrivOPTIN.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivOPTOUT.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivREAD.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivSTEM.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivVIEW.class); // TODO group-with-priv checks suite.addTestSuite(TestPrivUPDATE.class); // TODO group-with-priv checks suite.addTestSuite(TestStemAddChildGroup.class); suite.addTestSuite(TestStemAddChildStem.class); suite.addTestSuite(TestStemFinder.class); suite.addTestSuite(TestWrongFieldType.class); // TODO suite.addTestSuite(TestWheelGroup.class); return suite; } // static public Test suite()
5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/637cddc4a27c766f2329ba025d3076af682d9e37/SuiteDefault.java/buggy/grouper/src/test/edu/internet2/middleware/grouper/SuiteDefault.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 1071, 7766, 11371, 1435, 288, 565, 7766, 13587, 11371, 273, 394, 7766, 13587, 5621, 565, 11371, 18, 1289, 4709, 12, 225, 348, 9519, 2628, 18, 30676, 1435, 282, 11272, 565, 11371, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 1071, 7766, 11371, 1435, 288, 565, 7766, 13587, 11371, 273, 394, 7766, 13587, 5621, 565, 11371, 18, 1289, 4709, 12, 225, 348, 9519, 2628, 18, 30676, 1435, 282, 11272, 565, 11371, 18, ...
if (i.nextIndex() > index2)
GapContentPosition p = (GapContentPosition) i.next(); if (p.mark > endOffset)
protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector res = v; if (res == null) res = new Vector(); else res.clear(); int endOffset = offset + length; int index1 = Collections.binarySearch(positions, new GapContentPosition(offset)); int index2 = Collections.binarySearch(positions, new GapContentPosition(endOffset)); if (index1 < 0) index1 = -(index1 + 1); if (index2 < 0) index2 = -(index2 + 1); for (ListIterator i = positions.listIterator(index1); i.hasNext();) { if (i.nextIndex() > index2) break; GapContentPosition p = (GapContentPosition) i.next(); if (p.mark >= offset && p.mark <= endOffset) res.add(p); } return res; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ae9ec43c5570a0f69e3d8c8b733283719f52a770/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 5589, 336, 11024, 25277, 12, 5018, 331, 16, 509, 1384, 16, 509, 769, 13, 225, 288, 565, 5589, 400, 273, 331, 31, 565, 309, 261, 455, 422, 446, 13, 1377, 400, 273, 394, 5589, 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, 282, 4750, 5589, 336, 11024, 25277, 12, 5018, 331, 16, 509, 1384, 16, 509, 769, 13, 225, 288, 565, 5589, 400, 273, 331, 31, 565, 309, 261, 455, 422, 446, 13, 1377, 400, 273, 394, 5589, 562...
retEnv = SunRound2Client.sendMsg(util, url, soapAction);
retEnv = client.sendMsg(util, url, soapAction);
public void testR2BaseEchoStringArray() throws AxisFault { url = "http://www.caraveo.com/soap_interop/server_round2.php"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStringArrayClientUtil(); retEnv = SunRound2Client.sendMsg(util, url, soapAction); tempPath = resFilePath + "SunBaseStringArrayRes.xml"; compareXML(retEnv, tempPath); }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/95f09abc768fee06d65b12836e31273ac0e15eb3/PSRound2InteropTest.java/buggy/modules/integration/itest/test/interop/whitemesa/round2/PSRound2InteropTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 54, 22, 2171, 19704, 28547, 1435, 1216, 15509, 7083, 288, 3639, 880, 273, 315, 2505, 2207, 5591, 18, 9815, 836, 83, 18, 832, 19, 19215, 67, 30376, 19, 3567, 67, 2260, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 54, 22, 2171, 19704, 28547, 1435, 1216, 15509, 7083, 288, 3639, 880, 273, 315, 2505, 2207, 5591, 18, 9815, 836, 83, 18, 832, 19, 19215, 67, 30376, 19, 3567, 67, 2260, 2...
if (useRedraw) tree.setRedraw(true);
if (useRedraw) { tree.setRedraw(true); }
protected void inputChanged(Object input, Object oldInput) { preservingSelection(new Runnable() { public void run() { Control tree = getControl(); boolean useRedraw = true; // (size > REDRAW_THRESHOLD) || (table.getItemCount() > // REDRAW_THRESHOLD); if (useRedraw) tree.setRedraw(false); removeAll(tree); tree.setData(getRoot()); createChildren(tree); internalExpandToLevel(tree, expandToLevel); if (useRedraw) tree.setRedraw(true); } }); }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/391f2606b4ea2c1fb5052d938ca90877ee7631f6/AbstractTreeViewer.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 810, 5033, 12, 921, 810, 16, 1033, 1592, 1210, 13, 288, 3639, 27995, 6233, 12, 2704, 10254, 1435, 288, 5411, 1071, 918, 1086, 1435, 288, 7734, 8888, 2151, 273, 27174, 5621, 773...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 810, 5033, 12, 921, 810, 16, 1033, 1592, 1210, 13, 288, 3639, 27995, 6233, 12, 2704, 10254, 1435, 288, 5411, 1071, 918, 1086, 1435, 288, 7734, 8888, 2151, 273, 27174, 5621, 773...
public void mSTRING() throws RecognitionException { int STRING_StartIndex = input.index(); try { int type = STRING; int start = getCharIndex(); int line = getLine(); int charPosition = getCharPositionInLine(); int channel = Token.DEFAULT_CHANNEL; if ( backtracking>0 && alreadyParsedRule(input, 49) ) { return ; } // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:17: ( ( '"' ( options {greedy=false; } : . )* '"' ) | ( '\'' ( options {greedy=false; } : . )* '\'' ) ) int alt10=2; int LA10_0 = input.LA(1); if ( LA10_0=='"' ) { alt10=1; } else if ( LA10_0=='\'' ) { alt10=2; } else { if (backtracking>0) {failed=true; return ;} NoViableAltException nvae = new NoViableAltException("947:1: STRING : ( ( \'\"\' ( options {greedy=false; } : . )* \'\"\' ) | ( \'\\\'\' ( options {greedy=false; } : . )* \'\\\'\' ) );", 10, 0, input); throw nvae; } switch (alt10) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:17: ( '"' ( options {greedy=false; } : . )* '"' ) { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:17: ( '"' ( options {greedy=false; } : . )* '"' ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:18: '"' ( options {greedy=false; } : . )* '"' { match('"'); if (failed) return ; // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:22: ( options {greedy=false; } : . )* loop8: do { int alt8=2; int LA8_0 = input.LA(1); if ( LA8_0=='"' ) { alt8=2; } else if ( (LA8_0>='\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='\uFFFE') ) { alt8=1; } switch (alt8) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:49: . { matchAny(); if (failed) return ; } break; default : break loop8; } } while (true); match('"'); if (failed) return ; } } break; case 2 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:61: ( '\'' ( options {greedy=false; } : . )* '\'' ) { // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:61: ( '\'' ( options {greedy=false; } : . )* '\'' ) // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:62: '\'' ( options {greedy=false; } : . )* '\'' { match('\''); if (failed) return ; // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:67: ( options {greedy=false; } : . )* loop9: do { int alt9=2; int LA9_0 = input.LA(1); if ( LA9_0=='\'' ) { alt9=2; } else if ( (LA9_0>='\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='\uFFFE') ) { alt9=1; } switch (alt9) { case 1 : // /Users/bob/checkouts/jbossrules/drools-compiler/src/main/resources/org/drools/lang/drl.g:948:94: . { matchAny(); if (failed) return ; } break; default : break loop9; } } while (true); match('\''); if (failed) return ; } } break; } if ( token==null ) {emit(type,line,charPosition,channel,start,getCharIndex()-1);} } finally { if ( backtracking>0 ) { memoize(input, 49, STRING_StartIndex); } } }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/35c3932466a0269c296ae52afa8a1f8048a309d2/RuleParserLexer.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParserLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 312, 5804, 1435, 1216, 9539, 288, 3639, 509, 9469, 67, 16792, 273, 810, 18, 1615, 5621, 3639, 775, 288, 5411, 509, 618, 273, 9469, 31, 5411, 509, 787, 273, 23577, 1016, 5621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 312, 5804, 1435, 1216, 9539, 288, 3639, 509, 9469, 67, 16792, 273, 810, 18, 1615, 5621, 3639, 775, 288, 5411, 509, 618, 273, 9469, 31, 5411, 509, 787, 273, 23577, 1016, 5621, ...
{ aelfred2.setLocale (locale); }
{ aelfred2.setLocale(locale); }
public void setLocale (Locale locale) throws SAXException { aelfred2.setLocale (locale); }
1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/7fb7568e63c3fe14af521de4699cb37898923ca7/XmlReader.java/buggy/libjava/gnu/xml/aelfred2/XmlReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 19848, 261, 3916, 2573, 13, 565, 1216, 14366, 202, 95, 279, 19079, 1118, 22, 18, 542, 3916, 261, 6339, 1769, 289, 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, 377, 1071, 918, 19848, 261, 3916, 2573, 13, 565, 1216, 14366, 202, 95, 279, 19079, 1118, 22, 18, 542, 3916, 261, 6339, 1769, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if( log.isTraceEnabled() ) log.trace("Forwarding sub on " + localBroker + " from " + remoteBroker + " on "+info);
if(log.isTraceEnabled()) log.trace("Forwarding sub on "+localBroker+" from "+remoteBrokerName+" : "+info);
private void serviceRemoteConsumerAdvisory(DataStructure data) throws IOException { if( data.getClass() == ConsumerInfo.class ) { // Create a new local subscription ConsumerInfo info = (ConsumerInfo) data; BrokerId[] path = info.getBrokerPath(); if( (path!=null && path.length>0) || info.isNetworkSubscription() ) { // Ignore: We only support directly connected brokers for now. return; } if( contains(info.getBrokerPath(), localBrokerPath[0]) ) { // Ignore this consumer as it's a consumer we locally sent to the broker. return; } if( log.isTraceEnabled() ) log.trace("Forwarding sub on " + localBroker + " from " + remoteBroker + " on "+info); // Update the packet to show where it came from. info = info.copy(); info.setBrokerPath( appendToBrokerPath(info.getBrokerPath(), remoteBrokerPath) ); DemandSubscription sub = new DemandSubscription(info); sub.localInfo.setConsumerId( new ConsumerId(sessionInfo.getSessionId(), consumerIdGenerator.getNextSequenceId()) ); sub.localInfo.setDispatchAsync(dispatchAsync); sub.localInfo.setPrefetchSize(prefetchSize); byte priority = ConsumerInfo.NETWORK_CONSUMER_PRIORITY; if( priority > Byte.MIN_VALUE && info.getBrokerPath()!=null && info.getBrokerPath().length>1 ) { // The longer the path to the consumer, the less it's consumer priority. priority -= info.getBrokerPath().length+1; } sub.localInfo.setPriority(priority); subscriptionMapByLocalId.put(sub.localInfo.getConsumerId(), sub); subscriptionMapByRemoteId.put(sub.remoteInfo.getConsumerId(), sub); sub.localInfo.setBrokerPath(info.getBrokerPath()); sub.localInfo.setNetworkSubscription(true); // This works for now since we use a VM connection to the local broker. // may need to change if we ever subscribe to a remote broker. sub.localInfo.setAdditionalPredicate(new BooleanExpression(){ public boolean matches(MessageEvaluationContext message) throws JMSException { try { return matchesForwardingFilter(message.getMessage()); } catch (IOException e) { throw JMSExceptionSupport.create(e); } } public Object evaluate(MessageEvaluationContext message) throws JMSException { return matches(message) ? Boolean.TRUE : Boolean.FALSE; } }); localBroker.oneway(sub.localInfo); } if( data.getClass() == RemoveInfo.class ) { ConsumerId id = (ConsumerId) ((RemoveInfo)data).getObjectId(); DemandSubscription sub = (DemandSubscription)subscriptionMapByRemoteId.remove(id); if( sub !=null ) { subscriptionMapByLocalId.remove(sub.localInfo.getConsumerId()); localBroker.oneway(sub.localInfo.createRemoveCommand()); } } }
11783 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11783/5a429d90bbfeb27d012127cc5d03f67b0ef7ed98/DemandForwardingBridge.java/buggy/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1156, 5169, 5869, 1871, 3516, 630, 12, 751, 6999, 501, 13, 1216, 1860, 288, 3639, 309, 12, 501, 18, 588, 797, 1435, 422, 9326, 966, 18, 1106, 262, 288, 4766, 282, 368, 1788, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1156, 5169, 5869, 1871, 3516, 630, 12, 751, 6999, 501, 13, 1216, 1860, 288, 3639, 309, 12, 501, 18, 588, 797, 1435, 422, 9326, 966, 18, 1106, 262, 288, 4766, 282, 368, 1788, ...
if (isPreciseTarget) { this.isPreciseTarget = isPreciseTarget; } else { setPreciseTarget(); }
setPreciseTarget();
public void refine(VM_Method target, boolean isPreciseTarget) { this.target = target; if (isPreciseTarget) { this.isPreciseTarget = isPreciseTarget; } else { setPreciseTarget(); } }
49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/3a9aeeb7f964774e6adc285d6526603ac1570e14/OPT_MethodOperand.java/buggy/rvm/src/vm/compilers/optimizing/ir/instruction/operand/OPT_MethodOperand.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 30446, 12, 7397, 67, 1305, 1018, 16, 1250, 353, 1386, 30708, 2326, 13, 288, 377, 333, 18, 3299, 273, 1018, 31, 377, 309, 261, 291, 1386, 30708, 2326, 13, 288, 4202, 333, 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, 565, 1071, 918, 30446, 12, 7397, 67, 1305, 1018, 16, 1250, 353, 1386, 30708, 2326, 13, 288, 377, 333, 18, 3299, 273, 1018, 31, 377, 309, 261, 291, 1386, 30708, 2326, 13, 288, 4202, 333, 18, ...
public Object execMethod (int methodId, IdFunction function, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) throws JavaScriptException { switch (methodId) { case Id_abs: return wrap_double (js_abs(ScriptRuntime.toNumber(args, 0))); case Id_acos: return wrap_double (js_acos(ScriptRuntime.toNumber(args, 0))); case Id_asin: return wrap_double (js_asin(ScriptRuntime.toNumber(args, 0))); case Id_atan: return wrap_double (js_atan(ScriptRuntime.toNumber(args, 0))); case Id_atan2: return wrap_double (js_atan2(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_ceil: return wrap_double (js_ceil(ScriptRuntime.toNumber(args, 0))); case Id_cos: return wrap_double (js_cos(ScriptRuntime.toNumber(args, 0))); case Id_exp: return wrap_double (js_exp(ScriptRuntime.toNumber(args, 0))); case Id_floor: return wrap_double (js_floor(ScriptRuntime.toNumber(args, 0))); case Id_log: return wrap_double (js_log(ScriptRuntime.toNumber(args, 0))); case Id_max: return wrap_double (js_max(args)); case Id_min: return wrap_double (js_min(args)); case Id_pow: return wrap_double (js_pow(ScriptRuntime.toNumber(args, 0), ScriptRuntime.toNumber(args, 1))); case Id_random: return wrap_double (js_random()); case Id_round: return wrap_double (js_round(ScriptRuntime.toNumber(args, 0))); case Id_sin: return wrap_double (js_sin(ScriptRuntime.toNumber(args, 0))); case Id_sqrt: return wrap_double (js_sqrt(ScriptRuntime.toNumber(args, 0))); case Id_tan: return wrap_double (js_tan(ScriptRuntime.toNumber(args, 0))); } return null; }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/b6331020dcf96bb85dae57ee2a2ce947b6b0477a/NativeMath.java/buggy/js/rhino/org/mozilla/javascript/NativeMath.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 445, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 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, 1071, 1033, 1196, 1305, 3639, 261, 474, 707, 548, 16, 3124, 2083, 445, 16, 540, 1772, 9494, 16, 22780, 2146, 16, 22780, 15261, 16, 1033, 8526, 833, 13, 3639, 1216, 11905, 503, 565, 288, ...
private void __builtin_unsigned_long_long() { //unsigned long long ICASTSimpleDeclSpecifier parmSds = new CASTSimpleDeclSpecifier(); parmSds.setType(IASTSimpleDeclSpecifier.t_unspecified); parmSds.setUnsigned(true); parmSds.setLongLong(true); IType c_unsigned_long_long = new CQualifierType(parmSds); IType cpp_unsigned_long_long = new GPPBasicType(IBasicType.t_unspecified, CPPBasicType.IS_UNSIGNED & GPPBasicType.IS_LONGLONG, null); //int __builtin_ffsll(unsigned long long x) IBinding temp = null; IFunctionType functionType = null; IParameter[] theParms = new IParameter[1]; if (lang == ParserLanguage.C) { ICASTSimpleDeclSpecifier sds = new CASTSimpleDeclSpecifier(); sds.setType(IASTSimpleDeclSpecifier.t_int); IType returnType = new CBasicType(sds); IType[] parms = new IType[1]; parms[0] = c_unsigned_long_long; functionType = new CFunctionType(returnType, parms); theParms[0] = new CBuiltinParameter(parms[0]); temp = new CImplicitFunction(__BUILTIN_FFSLL, scope, functionType, theParms, false); } else { IType returnType = new CPPBasicType( IBasicType.t_int, 0 ); IType[] parms = new IType[1]; parms[0] = cpp_unsigned_long_long; functionType = new CPPFunctionType(returnType, parms); theParms[0] = new CPPBuiltinParameter(parms[0]); temp = new CPPImplicitFunction(__BUILTIN_FFSLL, scope, functionType, theParms, false); } bindings = (IBinding[])ArrayUtil.append(IBinding.class, bindings, temp); //int __builtin_clzll(unsigned long long x) temp = null; if (lang == ParserLanguage.C) { temp = new CImplicitFunction(__BUILTIN_CLZLL, scope, functionType, theParms, false); } else { temp = new CPPImplicitFunction(__BUILTIN_CLZLL, scope, functionType, theParms, false); } bindings = (IBinding[])ArrayUtil.append(IBinding.class, bindings, temp); //int __builtin_ctzll(unsigned long long x) temp = null; if (lang == ParserLanguage.C) { temp = new CImplicitFunction(__BUILTIN_CTZLL, scope, functionType, theParms, false); } else { temp = new CPPImplicitFunction(__BUILTIN_CTZLL, scope, functionType, theParms, false); } bindings = (IBinding[])ArrayUtil.append(IBinding.class, bindings, temp); //int __builtin_popcountll(unsigned long long x) temp = null; if (lang == ParserLanguage.C) { temp = new CImplicitFunction(__BUILTIN_POPCOUNTLL, scope, functionType, theParms, false); } else { temp = new CPPImplicitFunction(__BUILTIN_POPCOUNTLL, scope, functionType, theParms, false); } bindings = (IBinding[])ArrayUtil.append(IBinding.class, bindings, temp); //int __builtin_parityll(unsigned long long x) temp = null; if (lang == ParserLanguage.C) { temp = new CImplicitFunction(__BUILTIN_PARITYLL, scope, functionType, theParms, false); } else { temp = new CPPImplicitFunction(__BUILTIN_PARITYLL, scope, functionType, theParms, false); } bindings = (IBinding[])ArrayUtil.append(IBinding.class, bindings, temp); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/e5e342776ddb4235e342044729523a01bf8c688b/GCCBuiltinSymbolProvider.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/GCCBuiltinSymbolProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 6459, 972, 24553, 67, 22297, 67, 5748, 67, 5748, 1435, 95, 759, 22297, 5748, 5748, 202, 202, 2871, 9053, 5784, 3456, 21416, 1065, 81, 55, 2377, 33, 2704, 21871, 5784, 3456, 214...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 6459, 972, 24553, 67, 22297, 67, 5748, 67, 5748, 1435, 95, 759, 22297, 5748, 5748, 202, 202, 2871, 9053, 5784, 3456, 21416, 1065, 81, 55, 2377, 33, 2704, 21871, 5784, 3456, 214...
Event e = new Event("Powerbook Tilt");
Event e = new Event("Powerbook_Tilt");
public static void main(String argv[]){ if(argv.length != 1){ System.out.println("Usage: java amsProxy eventHeapServerName"); System.exit(-1); } EventHeap eh = new EventHeap(argv[0]); char[] buffer = new char[100]; BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); try{ System.out.println(in.readLine()); while( true ){ int numBytes = in.read(buffer, 0, DATA_LENGTH); if(numBytes > 0){ Event e = new Event("Powerbook Tilt"); String data = new String(buffer); System.out.println(data); System.out.flush(); // the first 4 bytes indicate x orientation String x = data.substring(0, 4); //System.out.println("x:" + x.trim()); // the next 5 for y String y = data.substring(4, 9); //System.out.println("y:" + y.trim()); // and the last 5 for z String z = data.substring(9, 14); //System.out.println("z:" + z.trim()); e.addField("X", new Integer(x.trim())); e.addField("Y", new Integer(y.trim())); e.addField("Z", new Integer(z.trim())); eh.putEvent(e); // skip the backspaces numBytes = in.read(buffer, 0, 14); } else{ Thread.sleep(0); } } } catch(Exception ex){ ex.printStackTrace(); } }
12155 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12155/f9c1fe3e711ba451e154e01c89c79cbb613a606e/amsProxy.java/buggy/trunk/Hardware Proxies/PowerbookTiltSensor/amsProxy.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 5261, 63, 5717, 95, 202, 430, 12, 19485, 18, 2469, 480, 404, 15329, 202, 565, 2332, 18, 659, 18, 8222, 2932, 5357, 30, 2252, 279, 959, 3886, 871, 15648, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5261, 63, 5717, 95, 202, 430, 12, 19485, 18, 2469, 480, 404, 15329, 202, 565, 2332, 18, 659, 18, 8222, 2932, 5357, 30, 2252, 279, 959, 3886, 871, 15648, ...
windowBodyDivCssStyle.setAttribute("height", "expression((document.getElementById('" + elementId + "').clientHeight-" + (top + bottom) + ")+'px')"); windowBodyDivCssStyle.setAttribute("width", "expression((document.getElementById('" + elementId + "').clientWidth-" + (left + right) + ")+'px')");
windowBodyDivCssStyle.setAttribute("height", "expression((document.getElementById('" + elementId + "').clientHeight-" + (top + bottom) + ")+'px')"); windowBodyDivCssStyle.setAttribute("width", "expression((document.getElementById('" + elementId + "').clientWidth-" + (left + right) + ")+'px')");
public void renderHtml(RenderContext rc, ServerComponentUpdate update, Element parentElement, Component component) { WindowPane windowPane = (WindowPane) component; String elementId = ContainerInstance.getElementId(windowPane); String bodyElementId = elementId + "_body"; String title = (String) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE); Extent width = (Extent) windowPane.getRenderProperty(WindowPane.PROPERTY_WIDTH); Extent height = (Extent) windowPane.getRenderProperty(WindowPane.PROPERTY_HEIGHT); int titleHeightPixels = ExtentRender.toPixels( (Extent) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_HEIGHT), 28); boolean movable = ((Boolean) windowPane.getRenderProperty(WindowPane.PROPERTY_MOVABLE, Boolean.TRUE)).booleanValue(); boolean renderPositioningBothSides = !rc.getContainerInstance().getClientProperties() .getBoolean(ClientProperties.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY); boolean renderSizeExpression = !renderPositioningBothSides && rc.getContainerInstance().getClientProperties() .getBoolean(ClientProperties.PROPRIETARY_IE_CSS_EXPRESSIONS_SUPPORTED); ServerMessage serverMessage = rc.getServerMessage(); serverMessage.addLibrary(WINDOW_PANE_SERVICE.getId(), true); Document document = serverMessage.getDocument(); Element windowDivElement = document.createElement("div"); windowDivElement.setAttribute("id", elementId); // Create main window DIV element. CssStyle windowDivCssStyle = new CssStyle(); windowDivCssStyle.setAttribute("z-index", "2"); //BUGBUG. Hardcoded z-index. windowDivCssStyle.setAttribute("padding", "0px"); windowDivCssStyle.setAttribute("position", "absolute"); windowDivCssStyle.setAttribute("top", ExtentRender.renderCssAttributeValue( (Extent) windowPane.getRenderProperty(WindowPane.PROPERTY_POSITION_Y, DEFAULT_POSITION_Y))); windowDivCssStyle.setAttribute("left", ExtentRender.renderCssAttributeValue( (Extent) windowPane.getRenderProperty(WindowPane.PROPERTY_POSITION_X, DEFAULT_POSITION_X))); if (width == null) { windowDivCssStyle.setAttribute("width", DEFAULT_WIDTH); } else { windowDivCssStyle.setAttribute("width", ExtentRender.renderCssAttributeValue(width)); } if (height == null) { windowDivCssStyle.setAttribute("height", DEFAULT_HEIGHT); } else { windowDivCssStyle.setAttribute("height", ExtentRender.renderCssAttributeValue(height)); } windowDivElement.setAttribute("style", windowDivCssStyle.renderInline()); parentElement.appendChild(windowDivElement); // Render window border. renderBorder(rc, windowDivElement, windowPane); // Create window body DIV element (container of title and content areas). Element windowBodyDivElement = document.createElement("div"); windowBodyDivElement.setAttribute("id", bodyElementId); CssStyle windowBodyDivCssStyle = new CssStyle(); ColorRender.renderToStyle(windowBodyDivCssStyle, (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_FOREGROUND), (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_BACKGROUND)); FontRender.renderToStyle(windowBodyDivCssStyle, (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_FONT)); if (windowBodyDivCssStyle.getAttribute("background-color") == null) { windowBodyDivCssStyle.setAttribute("background-color", "white"); } windowBodyDivCssStyle.setAttribute("position", "absolute"); windowBodyDivCssStyle.setAttribute("z-index", "2"); FillImageBorder border = (FillImageBorder) windowPane.getRenderProperty(WindowPane.PROPERTY_BORDER, DEFAULT_BORDER); Insets contentInsets = border.getContentInsets() == null ? new Insets(0) : border.getContentInsets(); int left = ExtentRender.toPixels(contentInsets.getLeft(), 0); int right = ExtentRender.toPixels(contentInsets.getRight(), 0); int top = ExtentRender.toPixels(contentInsets.getTop(), 0); int bottom = ExtentRender.toPixels(contentInsets.getBottom(), 0); windowBodyDivCssStyle.setAttribute("top", top + "px"); windowBodyDivCssStyle.setAttribute("left", left + "px"); if (renderPositioningBothSides) { windowBodyDivCssStyle.setAttribute("bottom", bottom + "px"); windowBodyDivCssStyle.setAttribute("right", right + "px"); } else if (renderSizeExpression) { windowBodyDivCssStyle.setAttribute("height", "expression((document.getElementById('" + elementId + "').clientHeight-" + (top + bottom) + ")+'px')"); windowBodyDivCssStyle.setAttribute("width", "expression((document.getElementById('" + elementId + "').clientWidth-" + (left + right) + ")+'px')"); } windowBodyDivElement.setAttribute("style", windowBodyDivCssStyle.renderInline()); windowDivElement.appendChild(windowBodyDivElement); // Create Internet Explorer Select Element blocking IFRAME. if (rc.getContainerInstance().getClientProperties().getBoolean(ClientProperties.QUIRK_IE_SELECT_Z_INDEX)) { Element iframeQuirkDivElement = document.createElement("div"); // Resuse/modify windowBodyDivCssStyle. windowBodyDivCssStyle.setAttribute("z-index", "1"); iframeQuirkDivElement.setAttribute("style", windowBodyDivCssStyle.renderInline()); windowDivElement.appendChild(iframeQuirkDivElement); Element iframeQuirkIframeElement = document.createElement("iframe"); iframeQuirkIframeElement.setAttribute("width", "100%"); iframeQuirkIframeElement.setAttribute("height", "100%"); iframeQuirkDivElement.appendChild(iframeQuirkIframeElement); } // Create outer title DIV element. Element outerTitleDivElement = document.createElement("div"); outerTitleDivElement.setAttribute("id", elementId + "_title"); CssStyle outerTitleDivCssStyle = new CssStyle(); if (movable) { outerTitleDivCssStyle.setAttribute("cursor", "move"); } ColorRender.renderToStyle(outerTitleDivCssStyle, (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FOREGROUND, Color.WHITE), (Color) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_BACKGROUND, Color.BLUE)); FontRender.renderToStyle(outerTitleDivCssStyle, (Font) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_FONT)); outerTitleDivCssStyle.setAttribute("position", "absolute"); outerTitleDivCssStyle.setAttribute("top", "0px"); outerTitleDivCssStyle.setAttribute("height", titleHeightPixels + "px"); outerTitleDivCssStyle.setAttribute("width", "100%"); outerTitleDivElement.setAttribute("style", outerTitleDivCssStyle.renderInline()); windowBodyDivElement.appendChild(outerTitleDivElement); // Create inner title DIV element. Element innerTitleDivElement = document.createElement("div"); innerTitleDivElement.setAttribute("id", elementId + "_innertitle"); CssStyle innerTitleDivCssStyle = new CssStyle(); InsetsRender.renderToStyle(innerTitleDivCssStyle, "padding", (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE_INSETS)); if (innerTitleDivCssStyle.hasAttributes()) { innerTitleDivElement.setAttribute("style", innerTitleDivCssStyle.renderInline()); } outerTitleDivElement.appendChild(innerTitleDivElement); // Create title layout TABLE. Element titleTableElement = document.createElement("table"); titleTableElement.setAttribute("style", "width:100%; padding: 0px; border-collapse: collapse;"); Element titleTbodyElement = document.createElement("tbody"); titleTableElement.appendChild(titleTbodyElement); Element titleTrElement = document.createElement("tr"); titleTbodyElement.appendChild(titleTrElement); Element titleLabelTdElement = document.createElement("td"); titleLabelTdElement.setAttribute("style", "padding: 0px; text-align: left;"); titleTrElement.appendChild(titleLabelTdElement); Element titleControlsTdElement = document.createElement("td"); titleControlsTdElement.setAttribute("style", "padding: 0px; text-align: right;"); titleTrElement.appendChild(titleControlsTdElement); if (title != null) { DomUtil.setElementText(titleLabelTdElement, title); } Element closeSpanElement = document.createElement("span"); closeSpanElement.setAttribute("id", elementId + "_close"); closeSpanElement.setAttribute("style", "cursor: pointer;"); titleControlsTdElement.appendChild(closeSpanElement); ImageReference closeIcon = (ImageReference) windowPane.getRenderProperty(WindowPane.PROPERTY_CLOSE_ICON, DEFAULT_CLOSE_ICON); if (closeIcon == null) { DomUtil.setElementText(closeSpanElement, "[X]"); } else { Element imgElement = ImageReferenceRender.renderImageReferenceElement(rc, this, windowPane, IMAGE_ID_CLOSE_ICON); closeSpanElement.appendChild(imgElement); } innerTitleDivElement.appendChild(titleTableElement); // Create outer content DIV Element. Element outerContentDivElement = document.createElement("div"); outerContentDivElement.setAttribute("id", elementId + "_outercontent"); CssStyle outerContentDivCssStyle = new CssStyle(); outerContentDivCssStyle.setAttribute("overflow", "auto"); outerContentDivCssStyle.setAttribute("padding", "0px"); outerContentDivCssStyle.setAttribute("position", "absolute"); outerContentDivCssStyle.setAttribute("width", "100%"); outerContentDivCssStyle.setAttribute("top", titleHeightPixels + "px"); if (renderPositioningBothSides) { outerContentDivCssStyle.setAttribute("bottom", "0px"); } if (renderSizeExpression) { outerContentDivCssStyle.setAttribute("height", "expression((document.getElementById('" + bodyElementId + "').clientHeight-" + titleHeightPixels + ")+'px')"); } outerContentDivElement.setAttribute("style", outerContentDivCssStyle.renderInline()); windowBodyDivElement.appendChild(outerContentDivElement); // Create inset content DIV Element. Element contentDivElement = document.createElement("div"); contentDivElement.setAttribute("id", elementId + "_content"); CssStyle contentDivCssStyle = new CssStyle(); InsetsRender.renderToStyle(contentDivCssStyle, "padding", (Insets) windowPane.getRenderProperty(WindowPane.PROPERTY_INSETS)); contentDivElement.setAttribute("style", contentDivCssStyle.renderInline()); outerContentDivElement.appendChild(contentDivElement); // Add event listeners. EventUpdate.createEventAdd(serverMessage, "click", elementId + "_close", "EchoWindowPane.userCloseClick"); if (movable) { EventUpdate.createEventAdd(serverMessage, "mousedown", elementId + "_close", "EchoWindowPane.userCloseMouseDown"); EventUpdate.createEventAdd(serverMessage, "mousedown", elementId + "_title", "EchoWindowPane.windowMoveMouseDown"); } // Render child. if (windowPane.getComponentCount() != 0) { Component child = windowPane.getComponent(0); SynchronizePeer syncPeer = SynchronizePeerFactory.getPeerForComponent(child.getClass()); if (syncPeer instanceof DomUpdateSupport) { ((DomUpdateSupport) syncPeer).renderHtml(rc, update, contentDivElement, child); } else { syncPeer.renderAdd(rc, update, elementId, child); } } }
45635 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45635/0e16a2d76781ba8685883747d0d8f1c409e05d2f/WindowPanePeer.java/clean/src/webcontainer/java/nextapp/echo2/webcontainer/syncpeer/WindowPanePeer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1743, 4353, 12, 3420, 1042, 4519, 16, 3224, 1841, 1891, 1089, 16, 5411, 3010, 30363, 16, 5435, 1794, 13, 288, 3639, 6076, 8485, 2742, 8485, 273, 261, 3829, 8485, 13, 1794, 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, 1071, 918, 1743, 4353, 12, 3420, 1042, 4519, 16, 3224, 1841, 1891, 1089, 16, 5411, 3010, 30363, 16, 5435, 1794, 13, 288, 3639, 6076, 8485, 2742, 8485, 273, 261, 3829, 8485, 13, 1794, 31, ...
files = projectDAO.load(projectId).getFiles();
return fileDAO.exists(projectId,fileName);
public boolean existsFile(Long projectId, String fileName) throws ServiceException { Set<File> files = null; try { files = projectDAO.load(projectId).getFiles(); } catch (DAOException e) { e.printStackTrace(); throw new ServiceException(); } if(files==null) return false; for(File f : files) { if(f.getFileName().equals(fileName)) return true; } return false; }
48076 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48076/23a7bf0759d441dcf52f44009903cbc7f2d08b3d/VHDLLabManagerImpl.java/buggy/src/service/hr/fer/zemris/vhdllab/service/impl/dummy/VHDLLabManagerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1704, 812, 12, 3708, 9882, 16, 514, 3968, 13, 1216, 16489, 288, 202, 202, 694, 32, 812, 34, 1390, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 2354, 273, 1984, 18485, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1704, 812, 12, 3708, 9882, 16, 514, 3968, 13, 1216, 16489, 288, 202, 202, 694, 32, 812, 34, 1390, 273, 446, 31, 202, 202, 698, 288, 1082, 202, 2354, 273, 1984, 18485, ...
final TypeFactory typeFactory = getTypeFactory( DataType.ROLE );
final TypeFactory typeFactory = getTypeFactory( DataType.class );
public void configure( final Configuration configuration ) throws ConfigurationException { final DefaultConfiguration newConfiguration = new DefaultConfiguration( configuration.getName(), configuration.getLocation() ); final String[] attributes = configuration.getAttributeNames(); for( int i = 0; i < attributes.length; i++ ) { final String name = attributes[ i ]; final String value = configuration.getAttribute( name ); if( name.equals( "id" ) || name.equals( "local-scope" ) ) { configure( this, name, value ); } else { newConfiguration.setAttribute( name, value ); } } final Configuration[] children = configuration.getChildren(); for( int i = 0; i < children.length; i++ ) { newConfiguration.addChild( children[ i ] ); } try { final TypeFactory typeFactory = getTypeFactory( DataType.ROLE ); m_value = typeFactory.create( configuration.getName() ); } catch( final Exception e ) { final String message = REZ.getString( "type.no-create.error" ); throw new ConfigurationException( message, e ); } configure( m_value, newConfiguration ); }
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/bc34bb06ca8b29568e31990be726d04559ca2972/TypeInstanceTask.java/buggy/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 5068, 12, 727, 4659, 1664, 262, 3639, 1216, 22196, 565, 288, 3639, 727, 2989, 1750, 394, 1750, 273, 5411, 394, 2989, 1750, 12, 1664, 18, 17994, 9334, 1664, 18, 588, 2735, 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, 918, 5068, 12, 727, 4659, 1664, 262, 3639, 1216, 22196, 565, 288, 3639, 727, 2989, 1750, 394, 1750, 273, 5411, 394, 2989, 1750, 12, 1664, 18, 17994, 9334, 1664, 18, 588, 2735, 1435,...
public Node getInitialNode(){
public Node getInitialNode() {
public Node getInitialNode(){ return initialNode; }
8321 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8321/10d031a20c2e73a9b0dffb98ed336997259a5ef5/Graph.java/clean/sphinx4/edu/cmu/sphinx/trainer/Graph.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 24044, 907, 1435, 288, 3639, 327, 2172, 907, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2029, 24044, 907, 1435, 288, 3639, 327, 2172, 907, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
System.out.print("static const int VM_Constants_REGENERATE_MASK = "
p("static const int VM_Constants_REGENERATE_MASK = "
static void emitVirtualMachineDeclarations (int bootImageAddress) { // load address for the boot image // System.out.print("static const int bootImageAddress = 0x" + Integer.toHexString(bootImageAddress) + ";\n"); // values in VM_Constants, from VM_Configuration // //-#if RVM_FOR_POWERPC if (VM.BuildForPowerPC) { System.out.print("static const int VM_Constants_JTOC_POINTER = " + VM_Constants.JTOC_POINTER + ";\n"); System.out.print("static const int VM_Constants_THREAD_ID_REGISTER = " + VM_Constants.THREAD_ID_REGISTER + ";\n"); System.out.print("static const int VM_Constants_FRAME_POINTER = " + VM_Constants.FRAME_POINTER + ";\n"); System.out.print("static const int VM_Constants_PROCESSOR_REGISTER = " + VM_Constants.PROCESSOR_REGISTER + ";\n"); System.out.print("static const int VM_Constants_FIRST_VOLATILE_GPR = " + VM_Constants.FIRST_VOLATILE_GPR + ";\n"); System.out.print("static const int VM_Constants_DIVIDE_BY_ZERO_MASK = " + VM_Constants.DIVIDE_BY_ZERO_MASK + ";\n"); System.out.print("static const int VM_Constants_DIVIDE_BY_ZERO_TRAP = " + VM_Constants.DIVIDE_BY_ZERO_TRAP + ";\n"); System.out.print("static const int VM_Constants_MUST_IMPLEMENT_MASK = " + VM_Constants.MUST_IMPLEMENT_MASK + ";\n"); System.out.print("static const int VM_Constants_MUST_IMPLEMENT_TRAP = " + VM_Constants.MUST_IMPLEMENT_TRAP + ";\n"); System.out.print("static const int VM_Constants_STORE_CHECK_MASK = " + VM_Constants.STORE_CHECK_MASK + ";\n"); System.out.print("static const int VM_Constants_STORE_CHECK_TRAP = " + VM_Constants.STORE_CHECK_TRAP + ";\n"); System.out.print("static const int VM_Constants_ARRAY_INDEX_MASK = " + VM_Constants.ARRAY_INDEX_MASK + ";\n"); System.out.print("static const int VM_Constants_ARRAY_INDEX_TRAP = " + VM_Constants.ARRAY_INDEX_TRAP + ";\n"); System.out.print("static const int VM_Constants_ARRAY_INDEX_REG_MASK = " + VM_Constants.ARRAY_INDEX_REG_MASK + ";\n"); System.out.print("static const int VM_Constants_ARRAY_INDEX_REG_SHIFT = " + VM_Constants.ARRAY_INDEX_REG_SHIFT + ";\n"); System.out.print("static const int VM_Constants_CONSTANT_ARRAY_INDEX_MASK = " + VM_Constants.CONSTANT_ARRAY_INDEX_MASK + ";\n"); System.out.print("static const int VM_Constants_CONSTANT_ARRAY_INDEX_TRAP = " + VM_Constants.CONSTANT_ARRAY_INDEX_TRAP + ";\n"); System.out.print("static const int VM_Constants_CONSTANT_ARRAY_INDEX_INFO = " + VM_Constants.CONSTANT_ARRAY_INDEX_INFO + ";\n"); System.out.print("static const int VM_Constants_WRITE_BUFFER_OVERFLOW_MASK = " + VM_Constants.WRITE_BUFFER_OVERFLOW_MASK + ";\n"); System.out.print("static const int VM_Constants_WRITE_BUFFER_OVERFLOW_TRAP = " + VM_Constants.WRITE_BUFFER_OVERFLOW_TRAP + ";\n"); System.out.print("static const int VM_Constants_STACK_OVERFLOW_MASK = " + VM_Constants.STACK_OVERFLOW_MASK + ";\n"); System.out.print("static const int VM_Constants_STACK_OVERFLOW_HAVE_FRAME_TRAP = " + VM_Constants.STACK_OVERFLOW_HAVE_FRAME_TRAP + ";\n"); System.out.print("static const int VM_Constants_STACK_OVERFLOW_TRAP = " + VM_Constants.STACK_OVERFLOW_TRAP + ";\n"); System.out.print("static const int VM_Constants_CHECKCAST_MASK = " + VM_Constants.CHECKCAST_MASK + ";\n"); System.out.print("static const int VM_Constants_CHECKCAST_TRAP = " + VM_Constants.CHECKCAST_TRAP + ";\n"); System.out.print("static const int VM_Constants_REGENERATE_MASK = " + VM_Constants.REGENERATE_MASK + ";\n"); System.out.print("static const int VM_Constants_REGENERATE_TRAP = " + VM_Constants.REGENERATE_TRAP + ";\n"); System.out.print("static const int VM_Constants_NULLCHECK_MASK = " + VM_Constants.NULLCHECK_MASK + ";\n"); System.out.print("static const int VM_Constants_NULLCHECK_TRAP = " + VM_Constants.NULLCHECK_TRAP + ";\n"); System.out.print("static const int VM_Constants_JNI_STACK_TRAP_MASK = " + VM_Constants.JNI_STACK_TRAP_MASK + ";\n"); System.out.print("static const int VM_Constants_JNI_STACK_TRAP = " + VM_Constants.JNI_STACK_TRAP + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_NEXT_INSTRUCTION_OFFSET = " + VM_Constants.STACKFRAME_NEXT_INSTRUCTION_OFFSET + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_ALIGNMENT = " + VM_Constants.STACKFRAME_ALIGNMENT + " ;\n"); } //-#endif //-#if RVM_FOR_IA32 if (VM.BuildForIA32) { System.out.print("static const int VM_Constants_EAX = " + VM_Constants.EAX + ";\n"); System.out.print("static const int VM_Constants_ECX = " + VM_Constants.ECX + ";\n"); System.out.print("static const int VM_Constants_EDX = " + VM_Constants.EDX + ";\n"); System.out.print("static const int VM_Constants_EBX = " + VM_Constants.EBX + ";\n"); System.out.print("static const int VM_Constants_ESP = " + VM_Constants.ESP + ";\n"); System.out.print("static const int VM_Constants_EBP = " + VM_Constants.EBP + ";\n"); System.out.print("static const int VM_Constants_ESI = " + VM_Constants.ESI + ";\n"); System.out.print("static const int VM_Constants_EDI = " + VM_Constants.EDI + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_BODY_OFFSET = " + VM_Constants.STACKFRAME_BODY_OFFSET + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_RETURN_ADDRESS_OFFSET = " + VM_Constants.STACKFRAME_RETURN_ADDRESS_OFFSET + ";\n"); System.out.print("static const int VM_Constants_RVM_TRAP_BASE = " + VM_Constants.RVM_TRAP_BASE + ";\n"); } //-#endif System.out.print("static const int VM_Constants_STACK_SIZE_GUARD = " + VM_Constants.STACK_SIZE_GUARD + ";\n"); System.out.print("static const int VM_Constants_INVISIBLE_METHOD_ID = " + VM_Constants.INVISIBLE_METHOD_ID + ";\n"); System.out.print("static const int VM_ThinLockConstants_TL_THREAD_ID_SHIFT = " + VM_ThinLockConstants.TL_THREAD_ID_SHIFT + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_HEADER_SIZE = " + VM_Constants.STACKFRAME_HEADER_SIZE + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_METHOD_ID_OFFSET = " + VM_Constants.STACKFRAME_METHOD_ID_OFFSET + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_FRAME_POINTER_OFFSET = " + VM_Constants.STACKFRAME_FRAME_POINTER_OFFSET + ";\n"); System.out.print("static const int VM_Constants_STACKFRAME_SENTINEL_FP = " + VM_Constants.STACKFRAME_SENTINEL_FP.toInt() + ";\n"); System.out.print("\n"); // values in VM_ObjectModel // System.out.println("static const int VM_ObjectModel_ARRAY_LENGTH_OFFSET = " + VM_ObjectModel.getArrayLengthOffset() + "\n;"); // values in VM_Scheduler // System.out.print("static const int VM_Scheduler_PRIMORDIAL_PROCESSOR_ID = " + VM_Scheduler.PRIMORDIAL_PROCESSOR_ID + ";\n"); System.out.print("static const int VM_Scheduler_PRIMORDIAL_THREAD_INDEX = " + VM_Scheduler.PRIMORDIAL_THREAD_INDEX + ";\n"); System.out.print("\n"); // values in VM_ThreadEventConstants // System.out.print("static const double VM_ThreadEventConstants_WAIT_INFINITE = " + VM_ThreadEventConstants.WAIT_INFINITE + ";\n"); // values in VM_ThreadIOQueue // System.out.print("static const int VM_ThreadIOQueue_READ_OFFSET = " + VM_ThreadIOQueue.READ_OFFSET + ";\n"); System.out.print("static const int VM_ThreadIOQueue_WRITE_OFFSET = " + VM_ThreadIOQueue.WRITE_OFFSET + ";\n"); System.out.print("static const int VM_ThreadIOQueue_EXCEPT_OFFSET = " + VM_ThreadIOQueue.EXCEPT_OFFSET + ";\n"); System.out.print("\n"); // values in VM_ThreadIOConstants // System.out.print("static const int VM_ThreadIOConstants_FD_READY = " + VM_ThreadIOConstants.FD_READY + ";\n"); System.out.print("static const int VM_ThreadIOConstants_FD_READY_BIT = " + VM_ThreadIOConstants.FD_READY_BIT + ";\n"); System.out.print("static const int VM_ThreadIOConstants_FD_INVALID = " + VM_ThreadIOConstants.FD_INVALID + ";\n"); System.out.print("static const int VM_ThreadIOConstants_FD_INVALID_BIT = " + VM_ThreadIOConstants.FD_INVALID_BIT + ";\n"); System.out.print("static const int VM_ThreadIOConstants_FD_MASK = " + VM_ThreadIOConstants.FD_MASK + ";\n"); System.out.print("\n"); // values in VM_ThreadProcessWaitQueue // System.out.print("static const int VM_ThreadProcessWaitQueue_PROCESS_FINISHED = " + VM_ThreadProcessWaitQueue.PROCESS_FINISHED + ";\n"); // values in VM_Runtime // System.out.print("static const int VM_Runtime_TRAP_UNKNOWN = " + VM_Runtime.TRAP_UNKNOWN + ";\n"); System.out.print("static const int VM_Runtime_TRAP_NULL_POINTER = " + VM_Runtime.TRAP_NULL_POINTER + ";\n"); System.out.print("static const int VM_Runtime_TRAP_ARRAY_BOUNDS = " + VM_Runtime.TRAP_ARRAY_BOUNDS + ";\n"); System.out.print("static const int VM_Runtime_TRAP_DIVIDE_BY_ZERO = " + VM_Runtime.TRAP_DIVIDE_BY_ZERO + ";\n"); System.out.print("static const int VM_Runtime_TRAP_STACK_OVERFLOW = " + VM_Runtime.TRAP_STACK_OVERFLOW + ";\n"); System.out.print("static const int VM_Runtime_TRAP_CHECKCAST = " + VM_Runtime.TRAP_CHECKCAST + ";\n"); System.out.print("static const int VM_Runtime_TRAP_REGENERATE = " + VM_Runtime.TRAP_REGENERATE + ";\n"); System.out.print("static const int VM_Runtime_TRAP_JNI_STACK = " + VM_Runtime.TRAP_JNI_STACK + ";\n"); System.out.print("static const int VM_Runtime_TRAP_MUST_IMPLEMENT = " + VM_Runtime.TRAP_MUST_IMPLEMENT + ";\n"); System.out.print("static const int VM_Runtime_TRAP_STORE_CHECK = " + VM_Runtime.TRAP_STORE_CHECK + ";\n"); System.out.println(); // values in VM_FileSystem // System.out.print("static const int VM_FileSystem_OPEN_READ = " + VM_FileSystem.OPEN_READ + ";\n"); System.out.print("static const int VM_FileSystem_OPEN_WRITE = " + VM_FileSystem.OPEN_WRITE + ";\n"); System.out.print("static const int VM_FileSystem_OPEN_MODIFY = " + VM_FileSystem.OPEN_MODIFY + ";\n"); System.out.print("static const int VM_FileSystem_OPEN_APPEND = " + VM_FileSystem.OPEN_APPEND + ";\n"); System.out.print("static const int VM_FileSystem_SEEK_SET = " + VM_FileSystem.SEEK_SET + ";\n"); System.out.print("static const int VM_FileSystem_SEEK_CUR = " + VM_FileSystem.SEEK_CUR + ";\n"); System.out.print("static const int VM_FileSystem_SEEK_END = " + VM_FileSystem.SEEK_END + ";\n"); System.out.print("static const int VM_FileSystem_STAT_EXISTS = " + VM_FileSystem.STAT_EXISTS + ";\n"); System.out.print("static const int VM_FileSystem_STAT_IS_FILE = " + VM_FileSystem.STAT_IS_FILE + ";\n"); System.out.print("static const int VM_FileSystem_STAT_IS_DIRECTORY = " + VM_FileSystem.STAT_IS_DIRECTORY + ";\n"); System.out.print("static const int VM_FileSystem_STAT_IS_READABLE = " + VM_FileSystem.STAT_IS_READABLE + ";\n"); System.out.print("static const int VM_FileSystem_STAT_IS_WRITABLE = " + VM_FileSystem.STAT_IS_WRITABLE + ";\n"); System.out.print("static const int VM_FileSystem_STAT_LAST_MODIFIED = " + VM_FileSystem.STAT_LAST_MODIFIED + ";\n"); System.out.print("static const int VM_FileSystem_STAT_LENGTH = " + VM_FileSystem.STAT_LENGTH + ";\n"); // fields in VM_Processor // int offset; offset = VM_Entrypoints.threadSwitchRequestedField.getOffset(); System.out.print("static const int VM_Processor_threadSwitchRequested_offset = " + offset + ";\n"); offset = VM_Entrypoints.activeThreadStackLimitField.getOffset(); offset = VM_Entrypoints.activeThreadStackLimitField.getOffset(); System.out.print("static const int VM_Processor_activeThreadStackLimit_offset = " + offset + ";\n"); offset = VM_Entrypoints.pthreadIDField.getOffset(); System.out.print("static const int VM_Processor_pthread_id_offset = " + offset + ";\n"); offset = VM_Entrypoints.epochField.getOffset(); System.out.print("static const int VM_Processor_epoch_offset = " + offset + ";\n"); offset = VM_Entrypoints.activeThreadField.getOffset(); System.out.print("static const int VM_Processor_activeThread_offset = " + offset + ";\n"); //-#if RVM_FOR_IA32 offset = VM_Entrypoints.processorThreadIdField.getOffset(); System.out.print("static const int VM_Processor_threadId_offset = " + offset + ";\n"); offset = VM_Entrypoints.processorFPField.getOffset(); System.out.print("static const int VM_Processor_framePointer_offset = " + offset + ";\n"); offset = VM_Entrypoints.processorJTOCField.getOffset(); System.out.print("static const int VM_Processor_jtoc_offset = " + offset + ";\n"); offset = VM_Entrypoints.processorTrapParamField.getOffset(); System.out.print("static const int VM_Processor_arrayIndexTrapParam_offset = " + offset + ";\n"); //-#endif // fields in VM_Thread // offset = VM_Entrypoints.threadStackField.getOffset(); System.out.print("static const int VM_Thread_stack_offset = " + offset + ";\n"); offset = VM_Entrypoints.stackLimitField.getOffset(); System.out.print("static const int VM_Thread_stackLimit_offset = " + offset + ";\n"); offset = VM_Entrypoints.threadHardwareExceptionRegistersField.getOffset(); System.out.print("static const int VM_Thread_hardwareExceptionRegisters_offset = " + offset + ";\n"); offset = VM_Entrypoints.jniEnvField.getOffset(); System.out.print("static const int VM_Thread_jniEnv_offset = " + offset + ";\n"); // fields in VM_Registers // offset = VM_Entrypoints.registersGPRsField.getOffset(); System.out.print("static const int VM_Registers_gprs_offset = " + offset + ";\n"); offset = VM_Entrypoints.registersFPRsField.getOffset(); System.out.print("static const int VM_Registers_fprs_offset = " + offset + ";\n"); offset = VM_Entrypoints.registersIPField.getOffset(); System.out.print("static const int VM_Registers_ip_offset = " + offset + ";\n"); //-#if RVM_FOR_IA32 offset = VM_Entrypoints.registersFPField.getOffset(); System.out.print("static const int VM_Registers_fp_offset = " + offset + ";\n"); //-#endif //-#if RVM_FOR_POWERPC offset = VM_Entrypoints.registersLRField.getOffset(); System.out.print("static const int VM_Registers_lr_offset = " + offset + ";\n"); //-#endif offset = VM_Entrypoints.registersInUseField.getOffset(); System.out.print("static const int VM_Registers_inuse_offset = " + offset + ";\n"); // fields in VM_JNIEnvironment offset = VM_Entrypoints.JNIEnvAddressField.getOffset(); System.out.print("static const int VM_JNIEnvironment_JNIEnvAddress_offset = " + offset + ";\n"); // fields in java.net.InetAddress // offset = VM_Entrypoints.inetAddressAddressField.getOffset(); System.out.print("static const int java_net_InetAddress_address_offset = " + offset + ";\n"); offset = VM_Entrypoints.inetAddressFamilyField.getOffset(); System.out.print("static const int java_net_InetAddress_family_offset = " + offset + ";\n"); // fields in java.net.SocketImpl // offset = VM_Entrypoints.socketImplAddressField.getOffset(); System.out.print("static const int java_net_SocketImpl_address_offset = " + offset + ";\n"); offset = VM_Entrypoints.socketImplPortField.getOffset(); System.out.print("static const int java_net_SocketImpl_port_offset = " + offset + ";\n"); // fields in com.ibm.JikesRVM.memoryManagers.JMTk.BasePlan offset = VM_Entrypoints.gcInProgressField.getOffset(); System.out.print("static const int com_ibm_JikesRVM_memoryManagers_JMTk_BasePlan_gcInProgressOffset = " + offset + ";\n"); }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/925454167bc483f10cf328dfcd6f344b2ba4704d/GenerateInterfaceDeclarations.java/clean/rvm/src/tools/bootImageRunner/GenerateInterfaceDeclarations.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 760, 918, 3626, 27454, 21408, 261, 474, 4835, 2040, 1887, 13, 288, 565, 368, 1262, 1758, 364, 326, 4835, 1316, 565, 368, 565, 2332, 18, 659, 18, 1188, 2932, 3845, 1866, 509, 4835, 2040, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 918, 3626, 27454, 21408, 261, 474, 4835, 2040, 1887, 13, 288, 565, 368, 1262, 1758, 364, 326, 4835, 1316, 565, 368, 565, 2332, 18, 659, 18, 1188, 2932, 3845, 1866, 509, 4835, 2040, ...
Main.info("SecurityManager=" + sec);
Main.debug("SecurityManager=" + sec);
public KJASSwingConsole() { initComponents(); setSize(500, 300); java.io.PrintStream st = new java.io.PrintStream( new KJASConsoleStream(this) ); System.setOut(st); System.setErr(st); System.out.println( "Java VM version: " + System.getProperty("java.version") ); System.out.println( "Java VM vendor: " + System.getProperty("java.vendor") ); String ph = System.getProperty("http.proxyHost"); String pp = System.getProperty("http.proxyPort"); if (ph != null) { System.out.println("Proxy: " + ph + ":" + pp); } SecurityManager sec = System.getSecurityManager(); Main.info("SecurityManager=" + sec); if (sec == null) { System.out.println( "WARNING: Security Manager disabled!" ); textField.setForeground(java.awt.Color.red); } }
45545 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45545/810dad2d2b6b9450f2a2bcd2cc5356134dca69f2/KJASSwingConsole.java/clean/khtml/java/org/kde/kjas/server/KJASSwingConsole.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1475, 46, 8423, 91, 310, 10215, 1435, 288, 3639, 1208, 7171, 5621, 3639, 19106, 12, 12483, 16, 11631, 1769, 3639, 2252, 18, 1594, 18, 5108, 1228, 384, 273, 394, 2252, 18, 1594, 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, 1475, 46, 8423, 91, 310, 10215, 1435, 288, 3639, 1208, 7171, 5621, 3639, 19106, 12, 12483, 16, 11631, 1769, 3639, 2252, 18, 1594, 18, 5108, 1228, 384, 273, 394, 2252, 18, 1594, 18, ...
in.seek(offset);
in.skipBytes(idata - 16);
protected void initMetadata() { Hashtable ifd = ifds[0]; long data = 0; int idata = 0; double ddata = 0; short sdata = 0; try { // -- Parse standard metadata -- // determine byte order boolean little = TiffTools.isLittleEndian(ifd); in.seek(0); put("NewSubfileType", ifd, TiffTools.NEW_SUBFILE_TYPE); put("ImageWidth", ifd, TiffTools.IMAGE_WIDTH); put("ImageLength", ifd, TiffTools.IMAGE_LENGTH); put("BitsPerSample", ifd, TiffTools.BITS_PER_SAMPLE); int comp = TiffTools.getIFDIntValue(ifd, TiffTools.COMPRESSION, false, TiffTools.UNCOMPRESSED); String compression; switch (comp) { case 1: compression = "None"; break; case 2: compression = "CCITT Group 3 1-Dimensional Modified Huffman"; break; case 3: compression = "CCITT T.4 bilevel encoding"; break; case 4: compression = "CCITT T.6 bilevel encoding"; break; case 5: compression = "LZW"; break; case 6: compression = "JPEG"; break; case 32773: compression = "PackBits"; break; default: compression = "None"; } put("Compression", compression); int photo = TiffTools.getIFDIntValue(ifd, TiffTools.PHOTOMETRIC_INTERPRETATION, true, -1); String photoInterp; switch (photo) { case 0: photoInterp = "WhiteIsZero"; break; case 1: photoInterp = "BlackIsZero"; break; case 2: photoInterp = "RGB"; break; case 3: photoInterp = "Palette"; break; case 4: photoInterp = "Transparency Mask"; break; default: photoInterp = "unknown"; break; } put("PhotometricInterpretation", photoInterp); putInt("StripOffsets", ifd, TiffTools.STRIP_OFFSETS); putInt("SamplesPerPixel", ifd, TiffTools.SAMPLES_PER_PIXEL); putInt("StripByteCounts", ifd, TiffTools.STRIP_BYTE_COUNTS); putInt("ColorMap", ifd, TiffTools.COLOR_MAP); int planar = TiffTools.getIFDIntValue(ifd, TiffTools.PLANAR_CONFIGURATION); String planarConfig; switch (planar) { case 1: planarConfig = "Chunky"; break; case 2: planarConfig = "Planar"; break; default: planarConfig = "Chunky"; } put("PlanarConfiguration", planarConfig); int predict = TiffTools.getIFDIntValue(ifd, TiffTools.PREDICTOR); String predictor; switch (predict) { case 1: predictor = "No prediction scheme"; break; case 2: predictor = "Horizontal differencing"; break; default: predictor = "No prediction scheme"; } put("Predictor", predictor); // get Zeiss LSM-specific data // grab the TIF_CZ_LSMINFO structure, 512 bytes long short[] cz = TiffTools.getIFDShortArray(ifd, ZEISS_ID, true); int p = 0; // pointer to next byte in the structure put("MagicNumber", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("StructureSize", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionX", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionY", DataTools.bytesToInt(cz, p, little)); p += 4; put("DimensionZ", DataTools.bytesToInt(cz, p, little)); p += 4; int dimensionChannels = DataTools.bytesToInt(cz, p, little); put("DimensionChannels", dimensionChannels); p += 4; put("DimensionTime", DataTools.bytesToInt(cz, p, little)); p += 4; idata = DataTools.bytesToInt(cz, p, little); String type; switch (idata) { case 1: type = "8 bit unsigned integer"; break; case 2: type = "12 bit unsigned integer"; break; case 5: type = "32 bit float"; break; case 0: type = "varying data types"; break; default: type = "8 bit unsigned integer"; break; } put("DataType", type); p += 4; put("ThumbnailX", DataTools.bytesToInt(cz, p, little)); p += 4; put("ThumbnailY", DataTools.bytesToInt(cz, p, little)); p += 4; put("VoxelSizeX", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("VoxelSizeY", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("VoxelSizeZ", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8 + 24; // skip over the next 24 bytes idata = DataTools.bytesToInt(cz, p, 2, little); switch (idata) { case 0: type = "x-y-z scan"; break; case 1: type = "z scan (x-z plane)"; break; case 2: type = "line scan"; break; case 3: type = "time series x-y"; break; case 4: type = "time series x-z"; break; case 5: type = "time series 'Mean of ROIs'"; break; case 6: type = "time series x-y-z"; break; case 7: type = "spline scan"; break; case 8: type = "spline scan x-z"; break; case 9: type = "time series spline plane x-z"; break; case 10: type = "point mode"; break; default: type = "x-y-z scan"; } put("ScanType", type); p += 2; idata = DataTools.bytesToInt(cz, p, 2, little); switch (idata) { case 0: type = "no spectral scan"; break; case 1: type = "acquired with spectral scan"; break; default: type = "no spectral scan"; } put("SpectralScan", type); p += 2; data = DataTools.bytesToLong(cz, p, 4, little); switch ((int) data) { case 0: type = "original scan data"; break; case 1: type = "calculated data"; break; case 2: type = "animation"; break; default: type = "original scan data"; } put("DataType2", type); p += 4; // the following 4 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetVectorOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseSubBlocks(data, "OffsetInputLut", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseSubBlocks(data, "OffsetOutputLut", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); // seek to this offset and read in the structure there // first we have to make sure that the structure actually exists if (data != 0) { long fp = in.getFilePointer(); in.seek(data); int blockSize = DataTools.read4SignedBytes(in, little); int numColors = DataTools.read4SignedBytes(in, little); int numNames = DataTools.read4SignedBytes(in, little); idata = DataTools.read4SignedBytes(in, little); long offset = data + idata; // will seek to this later idata = DataTools.read4SignedBytes(in, little); long offsetNames = data + idata; // will seek to this // read in the intensity value for each color in.seek(offset); for (int i=0; i<numColors; i++) { data = DataTools.read4UnsignedBytes(in, little); put("Intensity" + i, data); } // read in the channel names in.seek(offsetNames); for (int i=0; i<numNames; i++) { // we want to read until we find a null char String name = ""; char[] current = new char[1]; current[0] = in.readChar(); while (current[0] != 0) { name.concat(new String(current)); current[0] = in.readChar(); } put("ChannelName" + i, name); } in.seek(fp); } p += 4; put("TimeInterval", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following 8 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { long fp = in.getFilePointer(); in.seek(data); for (int i=0; i<dimensionChannels; i++) { data = DataTools.read4UnsignedBytes(in, little); put("OffsetChannelDataTypes" + i, data); } in.seek(fp); } p += 4; put("OffsetScanInformation", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("OffsetKsData", DataTools.bytesToLong(cz, p, 4, little)); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { long fp = in.getFilePointer(); in.seek(data); in.skipBytes(4); int numStamps = DataTools.read4SignedBytes(in, little); for (int i=0; i<numStamps; i++) { ddata = DataTools.readDouble(in, little); put("TimeStamp" + i, ddata); } in.seek(fp); } p += 4; data = DataTools.bytesToLong(cz, p, 4, little); if (data != 0) { long fp = in.getFilePointer(); in.seek(data); long numBytes = DataTools.read4UnsignedBytes(in, little); int numEvents = DataTools.read4SignedBytes(in, little); for (int i=0; i<numEvents; i++) { in.skipBytes(4); ddata = DataTools.readDouble(in, little); put("Time" + i, ddata); data = DataTools.read4UnsignedBytes(in, little); put("EventType" + i, data); byte[] descr = new byte[(int) (numBytes - 16)]; in.read(descr); put("Description" + i, new String(descr)); } in.seek(fp); } p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetRoi", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetBleachRoi", little); p += 4; put("OffsetNextRecording", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("DisplayAspectX", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectY", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectZ", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; put("DisplayAspectTime", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following 4 are file offsets data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetMeanOfRoisOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetTopoIsolineOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetTopoProfileOverlay", little); p += 4; data = DataTools.bytesToLong(cz, p, 4, little); parseOverlays(data, "OffsetLinescanOverlay", little); p += 4; put("ToolbarFlags", DataTools.bytesToLong(cz, p, 4, little)); // the following 2 are file offsets put("OffsetChannelWavelength", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("OffsetChannelFactors", DataTools.bytesToLong(cz, p, 4, little)); p += 4; put("ObjectiveSphereCorrection", Double.longBitsToDouble( DataTools.bytesToLong(cz, p, little))); p += 8; // the following is a file offset put("OffsetUnmixParameters", DataTools.bytesToLong(cz, p, 4, little)); p += 4; // -- Parse OME-XML metadata -- short[] omeData = TiffTools.getIFDShortArray(ifd, ZEISS_ID, true); int magicNum = DataTools.bytesToInt(omeData, 0, little);// int photoInterp2 = TiffTools.getIFDIntValue(ifd,// TiffTools.PHOTOMETRIC_INTERPRETATION, true, 0);// String photo2;// switch (photoInterp2) {// case 0: photo2 = "monochrome"; break;// case 1: photo2 = "monochrome"; break;// case 2: photo2 = "RGB"; break;// case 3: photo2 = "monochrome"; break;// case 4: photo2 = "RGB"; break;// default: photo2 = "monochrome";// }// OMETools.setAttribute(ome,// "ChannelInfo", "PhotometricInterpretation", photo2); int imageWidth = DataTools.bytesToInt(omeData, 8, little); int imageLength = DataTools.bytesToInt(omeData, 12, little); int zSize = DataTools.bytesToInt(omeData, 16, little); int cSize = DataTools.bytesToInt(omeData, 20, little); int tSize = DataTools.bytesToInt(omeData, 24, little); int pixel = DataTools.bytesToInt(omeData, 28, little); String pixelType; switch (pixel) { case 1: pixelType = "Uint8"; break; case 2: pixelType = "Uint16"; break; case 5: pixelType = "float"; break; default: pixelType = "Uint8"; } short scanType = DataTools.bytesToShort(omeData, 88, little); String dimOrder; switch ((int) scanType) { case 0: dimOrder = "XYZCT"; break; case 1: dimOrder = "XYZCT"; break; case 3: dimOrder = "XYTCZ"; break; case 4: dimOrder = "XYZTC"; break; case 5: dimOrder = "XYTCZ"; break; case 6: dimOrder = "XYZTC"; break; case 7: dimOrder = "XYCTZ"; break; case 8: dimOrder = "XYCZT"; break; case 9: dimOrder = "XYTCZ"; break; default: dimOrder = "XYZCT"; } OMETools.setPixels(ome, new Integer(imageWidth), // SizeX new Integer(imageLength), // SizeY new Integer(zSize), // SizeZ new Integer(cSize), // SizeC new Integer(tSize), // SizeT pixelType, // PixelType null, // BigEndian dimOrder); // DimensionOrder } catch (FormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/91859a26506b8a1d312b398da2c3ecd94e02fa60/ZeissLSMReader.java/clean/loci/formats/ZeissLSMReader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 1208, 2277, 1435, 288, 565, 18559, 309, 72, 273, 309, 2377, 63, 20, 15533, 565, 1525, 501, 273, 374, 31, 565, 509, 612, 396, 273, 374, 31, 565, 1645, 302, 892, 273, 374, 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, 282, 4750, 918, 1208, 2277, 1435, 288, 565, 18559, 309, 72, 273, 309, 2377, 63, 20, 15533, 565, 1525, 501, 273, 374, 31, 565, 509, 612, 396, 273, 374, 31, 565, 1645, 302, 892, 273, 374, 31...
private static void removeConnectionPool(ConnectionPool connectionPool, int delay) {
private static void removeConnectionPool(String finalizer, ConnectionPool connectionPool, int delay) {
private static void removeConnectionPool(ConnectionPool connectionPool, int delay) { if (connectionPool != null) { try { connectionPool.finalize(delay, "External"); } catch (Throwable t) { LOG.error("Problem trying to remove " + connectionPool.getDefinition().getName() + " connection pool", t); } ConnectionPoolManager.getInstance().removeConnectionPool(connectionPool.getDefinition().getName()); } connectionPool = null; }
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/b49d4aceadfa76e382a10231dccb48ac9263ac72/ProxoolFacade.java/clean/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 918, 1206, 1952, 2864, 12, 780, 727, 1824, 16, 4050, 2864, 1459, 2864, 16, 509, 4624, 13, 288, 3639, 309, 261, 4071, 2864, 480, 446, 13, 288, 5411, 775, 288, 7734, 1459, 2864...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 1952, 2864, 12, 780, 727, 1824, 16, 4050, 2864, 1459, 2864, 16, 509, 4624, 13, 288, 3639, 309, 261, 4071, 2864, 480, 446, 13, 288, 5411, 775, 288, 7734, 1459, 2864...
Messages.getString( "info.eclenv.creating.function", new Object[] { sName, oAggregateFunction.getClass().getName() }, Locale.getDefault() ) );
Messages.getString("info.eclenv.creating.function", new Object[] { sName, oAggregateFunction.getClass().getName() }, Locale.getDefault() ));
public final IAggregateFunction getAggregateFunction(String sName) throws PluginException { if (inEclipseEnv()) { final Object oAggregateFunction = getPluginXmlObject("aggregatefunctions", "aggregateFunction", "name", "function", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ sName); if (oAggregateFunction != null) { DefaultLoggerImpl.instance().log(ILogger.INFORMATION, Messages.getString( "info.eclenv.creating.function", //$NON-NLS-1$ new Object[] { sName, oAggregateFunction.getClass().getName() }, Locale.getDefault() // LOCALE? ) ); // i18n_CONCATENATIONS_REMOVED return (IAggregateFunction) oAggregateFunction; } DefaultLoggerImpl.instance().log(ILogger.FATAL, Messages.getString( "error.eclenv.cannot.find.function", //$NON-NLS-1$ new Object[] { sName }, Locale.getDefault() // LOCALE? ) ); // i18n_CONCATENATIONS_REMOVED } else { for (int i = 0; i < saAggregateFunctions.length; i++) { if (saAggregateFunctions[i][0].equalsIgnoreCase(sName)) { DefaultLoggerImpl.instance().log(ILogger.INFORMATION, Messages.getString( "info.stdenv.creating.function", //$NON-NLS-1$ new Object[] { sName, saAggregateFunctions[i][1] }, Locale.getDefault() // LOCALE? ) ); // i18n_CONCATENATIONS_REMOVED return (IAggregateFunction) newInstance(saAggregateFunctions[i][1]); } } DefaultLoggerImpl.instance().log(ILogger.FATAL, Messages.getString( "error.stdenv.cannot.find.function", //$NON-NLS-1$ new Object[] { sName }, Locale.getDefault() // LOCALE? ) ); // i18n_CONCATENATIONS_REMOVED } return null; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/4c3f1cb28dd9925df77890697e8cb172fe5ebfe8/PluginSettings.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/util/PluginSettings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 727, 467, 11490, 2083, 336, 11490, 2083, 12, 780, 14933, 13, 1216, 6258, 503, 565, 288, 3639, 309, 261, 267, 23057, 10472, 3491, 10756, 3639, 288, 5411, 727, 1033, 320, 11490, 2083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 11490, 2083, 336, 11490, 2083, 12, 780, 14933, 13, 1216, 6258, 503, 565, 288, 3639, 309, 261, 267, 23057, 10472, 3491, 10756, 3639, 288, 5411, 727, 1033, 320, 11490, 2083, ...
throw new IOException("missing bytes");
throw new IOException(CCorePlugin.getResourceString("Util.exception.missingBytes"));
long read_8_bytes(InputStream in) throws IOException { try { byte[] bytes = new byte[8]; int n = in.read(bytes, 0, bytes.length); if (n != 8) { throw new IOException("missing bytes"); } return read_8_bytes(bytes, 0); } catch (IndexOutOfBoundsException e) { throw new IOException("missing bytes"); } }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/74206bb9c0adfac164644b684d089bbdf8757013/Dwarf.java/clean/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 5748, 855, 67, 28, 67, 3890, 12, 4348, 316, 13, 1216, 1860, 288, 202, 202, 698, 288, 1082, 202, 7229, 8526, 1731, 273, 394, 1160, 63, 28, 15533, 1082, 202, 474, 290, 273, 316, 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, 5748, 855, 67, 28, 67, 3890, 12, 4348, 316, 13, 1216, 1860, 288, 202, 202, 698, 288, 1082, 202, 7229, 8526, 1731, 273, 394, 1160, 63, 28, 15533, 1082, 202, 474, 290, 273, 316, 18...
if (TaskListView.getDefault() != null) TaskListView.getDefault().getViewer().refresh();
if (TaskListView.getDefault() != null) TaskListView.getDefault().getViewer().refresh();
private void addPlannedTasksToCategory() { List<ITaskCategory> categories = MylarTaskListPlugin.getTaskListManager().getTaskList().getUserCategories(); String[] categoryNames = new String[categories.size()]; int i = 0; for (ITaskCategory category : categories) { categoryNames[i++] = category.getDescription(true); } if (categories.size() > 0) { ComboSelectionDialog dialog = new ComboSelectionDialog( Display.getCurrent().getActiveShell(), LABEL_DIALOG, "Select destination category: ", categoryNames, 0); int confirm = dialog.open(); if (confirm == ComboSelectionDialog.OK) { String selected = dialog.getSelectedString(); ITaskCategory destinationCategory = null; for (ITaskCategory category : categories) { if (category.getDescription(true).equals(selected)) { destinationCategory = category; break; // will go to the first one } } if (destinationCategory != null && destinationCategory instanceof TaskCategory) { TaskCategory taskCategory = (TaskCategory)destinationCategory; for (ITask task : planContentProvider.getTasks()) { if (!taskCategory.getChildren().contains(task)) { MylarTaskListPlugin.getTaskListManager().moveToCategory(taskCategory, task);// taskCategory.addTask(task);// task.setCategory(taskCategory); } } if (TaskListView.getDefault() != null) TaskListView.getDefault().getViewer().refresh(); } else { MessageDialog.openInformation(Display.getCurrent().getActiveShell(), LABEL_DIALOG, "Can not add plan tasks into a query category."); } } } else { MessageDialog.openInformation(Display.getCurrent().getActiveShell(), LABEL_DIALOG, "No categories in task list."); } }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/9a2415b840339225a82de93eb56d7c34bcf91009/TaskPlannerEditorPart.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/ui/TaskPlannerEditorPart.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 527, 1749, 10041, 6685, 774, 4457, 1435, 288, 202, 202, 682, 32, 1285, 835, 4457, 34, 6477, 273, 225, 8005, 7901, 2174, 682, 3773, 18, 588, 2174, 682, 1318, 7675, 588, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 527, 1749, 10041, 6685, 774, 4457, 1435, 288, 202, 202, 682, 32, 1285, 835, 4457, 34, 6477, 273, 225, 8005, 7901, 2174, 682, 3773, 18, 588, 2174, 682, 1318, 7675, 588, 2...
void set_slot(int id, Any data) throws InvalidSlot;
void set_slot(int id, Any data) throws InvalidSlot;
void set_slot(int id, Any data) throws InvalidSlot;
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8820e7a18265b8e9be753676d9477fb94a1447c8/ServerRequestInfoOperations.java/clean/core/src/classpath/org/org/omg/PortableInterceptor/ServerRequestInfoOperations.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 444, 67, 14194, 12, 474, 612, 16, 5502, 501, 13, 1216, 1962, 8764, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 918, 444, 67, 14194, 12, 474, 612, 16, 5502, 501, 13, 1216, 1962, 8764, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Assert.notNull(key, "Key cannot be null");
Assert.notNull(key, "Key cannot be null");
public void setLabeledEnum(String key, LabeledEnum value) { Assert.notNull(key, "Key cannot be null"); LabeledEnum old = getLabeledEnum(key); internalSet(key, enumToString(value)); afterSet(key, old, value); }
55916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55916/4b6b4231f830cf3aa5046025ca47e7366f7ddeb1/AbstractSettings.java/buggy/sandbox/src/org/springframework/richclient/settings/AbstractSettings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 16558, 329, 3572, 12, 780, 498, 16, 5287, 329, 3572, 460, 13, 288, 202, 202, 8213, 18, 902, 2041, 12, 856, 16, 315, 653, 2780, 506, 446, 8863, 202, 202, 2224, 329, 3572...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16558, 329, 3572, 12, 780, 498, 16, 5287, 329, 3572, 460, 13, 288, 202, 202, 8213, 18, 902, 2041, 12, 856, 16, 315, 653, 2780, 506, 446, 8863, 202, 202, 2224, 329, 3572...
urlDocsToBeCopied.meta_id = nexFreeMetaId.intValue();
urlDocsToBeCopied.meta_id = nextFreeMetaId.intValue();
private int copyDocument( final Integer meta_id ) { final SQLTransaction transaction = sqlProcessor.startTransaction(); transaction.executeAndCommit( new TransactionContent() { public void execute() throws SQLException { Integer nexFreeMetaId = getMaxIntValuePlusOne( transaction, "meta", "meta_id" ); Table_meta metaToBeCopied = selectFrom_meta( meta_id ); metaToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_meta( transaction, metaToBeCopied ); Table_text_docs textDocsToBeCopied = selectFrom_text_docs( meta_id ); if( null != textDocsToBeCopied ) { textDocsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_text_docs( transaction, textDocsToBeCopied ); } Table_url_docs urlDocsToBeCopied = selectFrom_url_docs( meta_id ); if( null != urlDocsToBeCopied ) { urlDocsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_url_docs( transaction, urlDocsToBeCopied ); } Table_browser_docs browserDocsToBeCopied = selectFrom_browser_docs( meta_id ); if( null != browserDocsToBeCopied ) { browserDocsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_browser_docs( transaction, browserDocsToBeCopied ); } Table_frameset_docs framesetDocsToBeCopied = selectFrom_frameset_docs( meta_id ); if( null != framesetDocsToBeCopied ) { framesetDocsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_frameset_docs( transaction, framesetDocsToBeCopied ); } Table_fileupload_docs fileUploadDocsToBeCopied = selectFrom_fileupload_docs( meta_id ); if( null != fileUploadDocsToBeCopied ) { fileUploadDocsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_fileupload_docs( transaction, fileUploadDocsToBeCopied ); } Table_texts[] textsToBeCopied = selectFrom_texts( meta_id ); for( int i = 0; i < textsToBeCopied.length; i++ ) { Table_texts textToBeCopied = textsToBeCopied[i]; textToBeCopied.meta_id = meta_id.intValue(); Integer newCounterValue = getMaxIntValuePlusOne( transaction, "texts", "counter" ); textToBeCopied.counter = newCounterValue.intValue(); insertInto_texts( transaction, textToBeCopied ); } Table_images[] imagesToBeCopied = selectFrom_images( meta_id ); for( int i = 0; i < imagesToBeCopied.length; i++ ) { Table_images imageToBeCopied = imagesToBeCopied[i]; imageToBeCopied.meta_id = meta_id.intValue(); insertInto_images( transaction, imageToBeCopied ); } Table_includes[] includesToBeCopied = selectFrom_includes( meta_id ); for( int i = 0; i < includesToBeCopied.length; i++ ) { Table_includes table_includes = includesToBeCopied[i]; table_includes.meta_id = nexFreeMetaId.intValue(); insertInto_includes( transaction, table_includes ); } Table_doc_permission_sets docPermissionSetsToBeCopied = selectFrom_doc_permission_sets( meta_id ); if( null != docPermissionSetsToBeCopied ) { docPermissionSetsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_doc_permission_sets( transaction, docPermissionSetsToBeCopied ); } Table_new_doc_permission_sets newDocPermissionSetsToBeCopied = selectFrom_new_doc_permission_sets( meta_id ); if( null != newDocPermissionSetsToBeCopied ) { newDocPermissionSetsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_new_doc_permission_sets( transaction, newDocPermissionSetsToBeCopied ); } Table_doc_permission_sets_ex docPermissionsSetsExToBeCopied = selectFrom_doc_permission_sets_ex( meta_id ); if( null != docPermissionsSetsExToBeCopied ) { docPermissionsSetsExToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_doc_permission_sets_ex( transaction, docPermissionsSetsExToBeCopied ); } Table_new_doc_permission_sets_ex newDocPermissionSetsExToBeCopied = selectFrom_new_doc_permission_sets_ex( meta_id ); if( null != newDocPermissionSetsExToBeCopied ) { newDocPermissionSetsExToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_new_doc_permission_sets_ex( transaction, newDocPermissionSetsExToBeCopied ); } Table_roles_rights rolesRightsToBeCopied = selectFrom_roles_rights( meta_id ); if( null != rolesRightsToBeCopied ) { rolesRightsToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_roles_rights( transaction, rolesRightsToBeCopied ); } Table_meta_classification metaClassificationToBeCopied = selectFrom_meta_classification( meta_id ); if( null != metaClassificationToBeCopied ) { metaClassificationToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_meta_classification( transaction, metaClassificationToBeCopied ); } Table_meta_section metaSectionToBeCopied = selectFrom_meta_section( meta_id ); if( null != metaSectionToBeCopied ) { metaSectionToBeCopied.meta_id = nexFreeMetaId.intValue(); insertInto_meta_section( transaction, metaSectionToBeCopied ); } } } ); return transaction.getRowCount(); }
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/92985c71b38c159d3e33b0a6189f7037c00bd8c7/DatabaseService.java/buggy/server/src/imcode/server/db/DatabaseService.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 1610, 2519, 12, 727, 2144, 2191, 67, 350, 262, 288, 3639, 727, 3063, 3342, 2492, 273, 1847, 5164, 18, 1937, 3342, 5621, 3639, 2492, 18, 8837, 1876, 5580, 12, 394, 5947, 1350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 1610, 2519, 12, 727, 2144, 2191, 67, 350, 262, 288, 3639, 727, 3063, 3342, 2492, 273, 1847, 5164, 18, 1937, 3342, 5621, 3639, 2492, 18, 8837, 1876, 5580, 12, 394, 5947, 1350, ...
super(context);
super();
public TestJdbcMigrationLauncher(JdbcMigrationContext context) throws MigrationException { super(context); }
49460 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49460/2f2c08b2c08972421318e736ccaf7505a8105c69/TestJdbcMigrationLauncher.java/clean/migrate/src/test/com/tacitknowledge/util/migration/jdbc/TestJdbcMigrationLauncher.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7766, 25316, 10224, 28820, 12, 25316, 10224, 1042, 819, 13, 1216, 15309, 503, 565, 288, 3639, 2240, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7766, 25316, 10224, 28820, 12, 25316, 10224, 1042, 819, 13, 1216, 15309, 503, 565, 288, 3639, 2240, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
executionContext.popReportItem();
private Object evaluateDefault(ScalarParameterDefn p, String expr) { Object value = null; int type = p.getDataType(); // evaluate the default value expression if (expr != null) { value = executionContext.evaluate(expr); if( value == null && expr != null && expr.length() > 0) value = expr; try { switch (type) { case IScalarParameterDefn.TYPE_BOOLEAN : value = DataTypeUtil.toBoolean(value); break; case IScalarParameterDefn.TYPE_DATE_TIME : value = DataTypeUtil.toDate(value); break; case IScalarParameterDefn.TYPE_DECIMAL : value = DataTypeUtil.toBigDecimal(value); break; case IScalarParameterDefn.TYPE_FLOAT : value = DataTypeUtil.toDouble(value); break; case IScalarParameterDefn.TYPE_STRING: value = DataTypeUtil.toString(value); break; default: value = null; break; } } catch (BirtException e) { log.log(Level.SEVERE, e.getLocalizedMessage(), e); value = null; } } return value; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/317e0084872a4973a293289bd7b020e7649a70fe/EngineTask.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/EngineTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 16414, 1042, 18, 5120, 4820, 1180, 5621, 1033, 16414, 1042, 18, 5120, 4820, 1180, 5621, 5956, 1868, 12, 13639, 1662, 3262, 82, 16414, 1042, 18, 5120, 4820, 1180, 5621, 293, 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, 225, 202, 1152, 16414, 1042, 18, 5120, 4820, 1180, 5621, 1033, 16414, 1042, 18, 5120, 4820, 1180, 5621, 5956, 1868, 12, 13639, 1662, 3262, 82, 16414, 1042, 18, 5120, 4820, 1180, 5621, 293, 16, ...
if( ( tType == IBasicType.t_int && ( sType == IBasicType.t_char ||
if( ( tType == IBasicType.t_int && ( sType == IBasicType.t_int || sType == IBasicType.t_char ||
static private void promotion( Cost cost ) throws DOMException{ IType src = getUltimateType( cost.source, true ); IType trg = getUltimateType( cost.target, true ); if( src.isSameType( trg ) ) return; if( src instanceof IBasicType && trg instanceof IBasicType ){ int sType = ((IBasicType)src).getType(); int tType = ((IBasicType)trg).getType(); if( ( tType == IBasicType.t_int && ( sType == IBasicType.t_char || sType == ICPPBasicType.t_bool || sType == ICPPBasicType.t_wchar_t || sType == IBasicType.t_unspecified ) ) || //treat unspecified as int ( tType == IBasicType.t_double && sType == IBasicType.t_float ) ) { cost.promotion = 1; } } else if( src instanceof IEnumeration && trg instanceof IBasicType && ( ((IBasicType)trg).getType() == IBasicType.t_int || ((IBasicType)trg).getType() == IBasicType.t_unspecified ) ) { cost.promotion = 1; } cost.rank = (cost.promotion > 0 ) ? Cost.PROMOTION_RANK : Cost.NO_MATCH_RANK; }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/52ae549c9f7c94405a98616e9b108eb17f961445/CPPSemantics.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPSemantics.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 3845, 3238, 918, 23024, 12, 28108, 6991, 262, 1216, 4703, 503, 95, 202, 202, 45, 559, 1705, 273, 23037, 5618, 4988, 559, 12, 6991, 18, 3168, 16, 638, 11272, 202, 202, 45, 559, 2722...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 3845, 3238, 918, 23024, 12, 28108, 6991, 262, 1216, 4703, 503, 95, 202, 202, 45, 559, 1705, 273, 23037, 5618, 4988, 559, 12, 6991, 18, 3168, 16, 638, 11272, 202, 202, 45, 559, 2722...
public TabbedStackPresentation(IStackPresentationSite site, AbstractTabFolder folder, TabList tabs) {
public TabbedStackPresentation(IStackPresentationSite site, AbstractTabFolder folder, TabOrder tabs, TabDragHandler dragBehavior) {
public TabbedStackPresentation(IStackPresentationSite site, AbstractTabFolder folder, TabList tabs) { super(site); tabFolder = folder; this.tabs = tabs; }
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/947362c08342c2be69172786527fe703a723e912/TabbedStackPresentation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/newapi/TabbedStackPresentation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 9483, 2992, 2624, 6351, 367, 12, 45, 2624, 6351, 367, 4956, 2834, 16, 4115, 5661, 3899, 3009, 16, 9483, 682, 10920, 13, 288, 202, 202, 9565, 12, 4256, 1769, 202, 202, 7032, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 9483, 2992, 2624, 6351, 367, 12, 45, 2624, 6351, 367, 4956, 2834, 16, 4115, 5661, 3899, 3009, 16, 9483, 682, 10920, 13, 288, 202, 202, 9565, 12, 4256, 1769, 202, 202, 7032, 38...
try { int msgNum = Integer.parseInt(e.getActionCommand()); if (getFolderInfo() != null) { FolderDisplayUI fdui = getFolderInfo().getFolderDisplayUI(); fdui.selectMessage(msgNum - 1); } } catch (NumberFormatException nfe) { } gotoInputField.selectAll(); }
try { int msgNum = Integer.parseInt(e.getActionCommand()); if (getFolderInfo() != null) { FolderDisplayUI fdui = getFolderInfo().getFolderDisplayUI(); fdui.selectMessage(msgNum - 1); } } catch (NumberFormatException nfe) { } gotoInputField.selectAll(); }
public void actionPerformed(ActionEvent e) { try { int msgNum = Integer.parseInt(e.getActionCommand()); if (getFolderInfo() != null) { FolderDisplayUI fdui = getFolderInfo().getFolderDisplayUI(); fdui.selectMessage(msgNum - 1); } } catch (NumberFormatException nfe) { } gotoInputField.selectAll(); }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/6d158745c4b6a4f5f0083ef23ca7edc9cdb05bb7/FolderStatusBar.java/clean/net/suberic/pooka/gui/FolderStatusBar.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 26100, 12, 1803, 1133, 425, 13, 288, 1082, 565, 775, 288, 1082, 202, 474, 1234, 2578, 273, 2144, 18, 2670, 1702, 12, 73, 18, 588, 1803, 2189, 10663, 1082, 202, 430, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 26100, 12, 1803, 1133, 425, 13, 288, 1082, 565, 775, 288, 1082, 202, 474, 1234, 2578, 273, 2144, 18, 2670, 1702, 12, 73, 18, 588, 1803, 2189, 10663, 1082, 202, 430, 261,...
} else if (friend_sum > .9 * foe_sum) { centity.strategy.target += .15; } else if (centity.strategy.target < 2) { centity.strategy.target += .3;
System.out.println(centity.getEntity().getShortName() + " " + centity.strategy.target);
protected void initMovement() { this.my_mechs_moved = 0; this.old_moves = null; this.enemies_moved = 0; double max_modifier = 1.4; java.util.Vector entities = game.getEntitiesVector(); double num_entities = Math.sqrt(entities.size()) / 100; Vector friends = new Vector(); Vector foes = new Vector(); double friend_sum = 0; double foe_sum = 0; double max_foe_bv = 0; CEntity max_foe = null; for (int i = 0; i < entities.size(); i++) { Entity entity = (Entity) entities.elementAt(i); CEntity centity = centities.get(entity); centity.enemy_num = i; double old_value = centity.bv * (centity.overall_armor_percent + 1); centity.reset(); //should get fresh values double new_value = centity.bv * (centity.overall_armor_percent + 1); double percent = 1 + (new_value - old_value) / old_value; if (entity.getOwner().equals(getLocalPlayer())) { friends.add(centity); friend_sum += new_value; if (percent < .85) { //small retreat centity.strategy.attack = .85; } else if (percent < .95) { centity.strategy.attack = 1; } else if (percent <= 1 && centity.strategy.attack < max_modifier) { if (percent == 1) { if (centity.strategy.attack < 1) { centity.strategy.attack = Math.min(1.4 * centity.strategy.attack, 1); } else { centity.strategy.attack *= (1.0 + num_entities); } } else { centity.strategy.attack *= (1.0 + 2 * num_entities); } } } else if (!entity.getOwner().isEnemyOf(getLocalPlayer())) { friend_sum += new_value; } else { foes.add(centity); foe_sum += new_value; if (new_value > max_foe_bv) { max_foe_bv = new_value; max_foe = centity; } if (this.getEntitiesOwned().size() > 2) { if (centity.strategy.target > 2) { centity.strategy.target = 1 + .5 * (centity.strategy.target - 2); } if (percent < .85 && centity.strategy.target < max_modifier) { centity.strategy.target *= (1.0 + 6 * num_entities); } else if (percent < .95 && centity.strategy.target < max_modifier) { centity.strategy.target *= (1.0 + 4 * num_entities); } else if (percent <= 1) { if (percent == 1) { centity.strategy.target /= (1.0 + 2 * num_entities); } else { centity.strategy.target /= (1.0 + num_entities); } } //don't go below one if (centity.strategy.target < 1) centity.strategy.target = 1; } } } System.out.println("Us " + friend_sum + " Them " + foe_sum); //do some more reasoning... if (this.unit_values.size() == 0) { this.unit_values.add(new Double(friend_sum)); this.enemy_values.add(new Double(foe_sum)); return; } Iterator i = foes.iterator(); if (friends.size() > 1) { if (Strategy.MainTarget == null || null == game.getEntity(Strategy.MainTarget.getEntity().getId())) { Strategy.MainTarget = max_foe; } Strategy.MainTarget.strategy.target += .2; while (i.hasNext()) { CEntity centity = (CEntity) i.next(); // good turn, keep up the work, but randomize to reduce // predictability if (friend_sum - foe_sum >= .9 * (((Double) this.unit_values.getLast()).doubleValue() - ((Double) this.enemy_values.getLast()).doubleValue())) { if (Compute.randomInt(2) == 1) { centity.strategy.target += .3; } //lost that turn, but still in the fight, just get a // little more aggressive } else if (friend_sum > .9 * foe_sum) { centity.strategy.target += .15; //lost that turn and loosing } else if (centity.strategy.target < 2) { //go for the gusto centity.strategy.target += .3; } System.out.println(centity.getEntity().getShortName() + " " + centity.strategy.target); } } double ratio = friend_sum / foe_sum; double mod = 1; if (ratio < .9) { mod = .95; } else if (ratio < 1) { //no change } else { //attack mod = (1.0 + num_entities); } i = friends.iterator(); while (i.hasNext()) { CEntity centity = (CEntity) i.next(); if (!(mod < 1 && centity.strategy.attack < .6) && !(mod > 1 && centity.strategy.attack >= max_modifier)) centity.strategy.attack *= mod; } System.gc(); //just to make sure }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/9a77a108fa04401312d80202b90f10e5e9898eee/TestBot.java/clean/megamek/src/megamek/client/bot/TestBot.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1208, 49, 26140, 1435, 288, 3639, 333, 18, 4811, 67, 3501, 343, 87, 67, 81, 9952, 273, 374, 31, 3639, 333, 18, 1673, 67, 81, 10829, 273, 446, 31, 3639, 333, 18, 275, 351, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1208, 49, 26140, 1435, 288, 3639, 333, 18, 4811, 67, 3501, 343, 87, 67, 81, 9952, 273, 374, 31, 3639, 333, 18, 1673, 67, 81, 10829, 273, 446, 31, 3639, 333, 18, 275, 351, ...