rem
stringlengths
1
53.3k
add
stringlengths
0
80.5k
context
stringlengths
6
326k
meta
stringlengths
141
403
input_ids
list
attention_mask
list
labels
list
IMethodBinding method= node.resolveMethodBinding(); if (method == null) return true; String name= method.getDeclaringClass().getQualifiedName(); if (!("java.util.ResourceBundle".equals(name) && "getBundle".equals(method.getName()) && node.arguments().size() > 0) &&
IMethodBinding method= node.resolveMethodBinding(); if (method == null) return true; String name= method.getDeclaringClass().getQualifiedName(); if (!("java.util.ResourceBundle".equals(name) && "getBundle".equals(method.getName()) && node.arguments().size() > 0) &&
public boolean visit(MethodInvocation node) { IMethodBinding method= node.resolveMethodBinding(); if (method == null) return true; String name= method.getDeclaringClass().getQualifiedName(); if (!("java.util.ResourceBundle".equals(name) && "getBundle".equals(method.getName()) && node.arguments().size() > 0) && //old school //$NON-NLS-1$ //$NON-NLS-2$ !("org.eclipse.osgi.util.NLS".equals(name) && "initializeMessages".equals(method.getName()) && node.arguments().size() == 2)) //Eclipse style //$NON-NLS-1$ //$NON-NLS-2$ return true; Expression argument= (Expression)node.arguments().get(0); String bundleName= getBundleName(argument); if (bundleName != null) { resultCollector.put(RESULT_KEY, bundleName); throw new STOP_VISITING(); } if (argument instanceof Name) { Object fieldNameBinding= ((Name)argument).resolveBinding(); if (fieldNameBinding != null) { resultCollector.put(FIELD_KEY, fieldNameBinding); if (resultCollector.get(fieldNameBinding) != null) throw new STOP_VISITING(); } } return false; }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/8a88f723638993062f7c8d22b8e0a68d3fc48cbe/NLSHintHelper.java/buggy/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4697, 202, 482, 1250, 3757, 12, 1305, 9267, 756, 13, 288, 6862, 202, 45, 1305, 5250, 707, 33, 756, 18, 10828, 1305, 5250, 5621, 6862, 202, 430, 261, 2039, 422, 446, 13, 25083, 202, 2463, 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, 4697, 202, 482, 1250, 3757, 12, 1305, 9267, 756, 13, 288, 6862, 202, 45, 1305, 5250, 707, 33, 756, 18, 10828, 1305, 5250, 5621, 6862, 202, 430, 261, 2039, 422, 446, 13, 25083, 202, 2463, 638...
String encodedInstancesString; String encodedModelsString; String encodedControlsString;
final String staticStateString; final String dynamicStateString;
public void readImpl(final PipelineContext pipelineContext, ContentHandler contentHandler) { final XFormsInstance instance; XFormsInstance contextInstance = XFormsInstance.createInstanceFromContext(pipelineContext); if (contextInstance != null) { // Got instance from context instance = contextInstance; } else { // Check whether instance was submitted Document requestDocument = readInputAsDOM4J(pipelineContext, INPUT_REQUEST); // Check whether an instance was submitted boolean submitted; { PooledXPathExpression xpathExpression = XPathCache.getXPathExpression(pipelineContext, new DocumentWrapper(requestDocument, null).wrap(requestDocument), "/request/parameters/(parameter[name = '$instances'] and parameter[name = '$models' and parameter[name = '$controls']])"); try { submitted = ((Boolean) xpathExpression.evaluateSingle()).booleanValue(); } catch (XPathException e) { throw new OXFException(e); } finally { if (xpathExpression != null) xpathExpression.returnToPool(); } } if (submitted) { // Instance submitted, handle submission String encodedInstancesString; String encodedModelsString; String encodedControlsString; { // Create XPath variables Map variables = new HashMap(); variables.put("parameter-name", ""); // Create XPath expression PooledXPathExpression xpathExpression = XPathCache.getXPathExpression(pipelineContext, new DocumentWrapper(requestDocument, null).wrap(requestDocument), "normalize-space(/request/parameters/parameter[name = $parameter-name]/value)", XFormsServer.XFORMS_NAMESPACES, variables); // Extract parameters try { variables.put("parameter-name", "$instances"); encodedInstancesString = (String) xpathExpression.evaluateSingle(); variables.put("parameter-name", "$models"); encodedModelsString = (String) xpathExpression.evaluateSingle(); variables.put("parameter-name", "$controls"); encodedControlsString = (String) xpathExpression.evaluateSingle(); } catch (XPathException e) { throw new OXFException(e); } finally { if (xpathExpression != null) xpathExpression.returnToPool(); } } // Create and initialize XForms engine from encoded data XFormsContainingDocument containingDocument = XFormsServer.createXFormsEngine(pipelineContext, encodedControlsString, encodedModelsString, encodedInstancesString); // TODO: set instance values from current controls values// final RequestParameters requestParameters = (RequestParameters) readCacheInputAsObject(pipelineContext, getInputByName(INPUT_REQUEST), new CacheableInputReader() {// public Object read(PipelineContext context, ProcessorInput input) {// Document requestDocument = readInputAsDOM4J(context, input);// RequestParameters requestParameters = new RequestParameters(pipelineContext, requestDocument);// return requestParameters;// }// }); // TODO: actions, events // TODO: select submitted instance and return it instance = new XFormsInstance(pipelineContext, Dom4jUtils.NULL_DOCUMENT);//TEMP FIXME XXXX } else { // No instance submitted, return null document instance = new XFormsInstance(pipelineContext, Dom4jUtils.NULL_DOCUMENT); } } // Read out instance instance.read(contentHandler); }
52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/14a0be50c904b94d6e59f539b01860f1d64e2d9d/XFormsSubmission.java/clean/src/java/org/orbeon/oxf/xforms/XFormsSubmission.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 727, 1139, 18529, 1442, 791, 31, 7734, 1139, 18529, 1442, 819, 1442, 273, 1139, 18529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 855, 2828, 12, 6385, 13671, 1042, 5873, 1042, 16, 3697, 1503, 913, 1503, 13, 288, 7734, 727, 1139, 18529, 1442, 791, 31, 7734, 1139, 18529, 1442, 819, 1442, 273, 1139, 18529, ...
private void tdsCapabilityToken() throws IOException, ProtocolException {
private void tdsCapabilityToken() throws IOException, ProtocolException {
private void tdsCapabilityToken() throws IOException, ProtocolException { in.readShort(); // Packet length if (in.read() != 1) { throw new ProtocolException("TDS_CAPABILITY: expected request string"); } int capLen = in.read(); if (capLen != 10) { throw new ProtocolException("TDS_CAPABILITY: byte count not 10"); } byte capRequest[] = new byte[10]; in.read(capRequest); if (in.read() != 2) { throw new ProtocolException("TDS_CAPABILITY: expected response string"); } capLen = in.read(); if (capLen != 10) { throw new ProtocolException("TDS_CAPABILITY: byte count not 10"); } byte capResponse[] = new byte[10]; in.read(capResponse); // // jTDS sends 01 0A 03 84 0E EF 65 7F FF FF FF D6 // Sybase 11.92 01 0A 00 00 00 23 61 41 CF FF FF C6 // Sybase 12.52 01 0A 03 84 0A E3 61 41 FF FF FF C6 // // JTDS sends 02 0A 00 02 00 07 9E 06 48 00 00 00 // Sybase 11.92 02 0A 00 00 00 00 00 06 00 00 00 00 // Sybase 12.52 02 0A 00 00 00 00 00 06 00 00 00 00 // // // Now set the correct attributes for this connection. // See the CT_LIB documentation for details on the bit // positions. // int capMask = 0; if ((capRequest[6] & 0x30) == 0x30) { capMask |= SYB_LONGDATA; } if ((capRequest[0] & 0x03) == 0x03) { capMask |= SYB_DATETIME; } if ((capRequest[2] & 0x02) == 0x02) { capMask |= SYB_EXTCOLINFO; } if ((capRequest[3] & 0x04) == 0x04) { capMask |= SYB_BITNULL; } if ((capRequest[1] & 0x80) == 0x80) { capMask |= SYB_UNICODE; } connection.setSybaseInfo(capMask); }
439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/f99a9b30e9958da219a407c1c3f7584df0c8992c/TdsCore.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/TdsCore.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 268, 2377, 17035, 1345, 1435, 3639, 1216, 1860, 16, 4547, 503, 565, 288, 3639, 316, 18, 896, 4897, 5621, 368, 11114, 769, 3639, 309, 261, 267, 18, 896, 1435, 480, 404, 13, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 268, 2377, 17035, 1345, 1435, 3639, 1216, 1860, 16, 4547, 503, 565, 288, 3639, 316, 18, 896, 4897, 5621, 368, 11114, 769, 3639, 309, 261, 267, 18, 896, 1435, 480, 404, 13, 28...
public Box calculateBoxes(int avail_width, TableBox box, Context c, Table table) { box.width = avail_width; box.height = 100; box.x = 5; box.y = 5; // create a dummy prev row RowBox prev_row = new RowBox(0,0,0,0); int max_width = 0; // loop throw the rows CellGrid grid = table.getCellGrid(); for(int y=0; y<grid.getHeight(); y++) { // create a new row box for this row RowBox row_box = new RowBox(0,0,0,0); //row_box.node = row.node; box.rows.add(row_box); int row_height = 0; int column_count = 0; // loop through the cells for(int x=0; x<grid.getWidth(); x++) { //u.p("x = " + x); //u.p("grid width = " + grid.getWidth()); if(grid.isReal(x,y)) { //u.p("it's real"); Cell cell = grid.getCell(x,y); // create a new cell box for this cell CellBox cell_box = new CellBox(0,0,10,10); cell.cb = cell_box; cell_box.rb = row_box; // set the x coord based on the current column cell_box.x = table.calcColumnX(column_count); // set the width //u.p("column count = " + column_count + " col span = " + cell.col_span); cell_box.width = table.calcColumnWidth(column_count, cell.col_span); cell_box.node = cell.node; // do the internal layout // save the old extents and create new with smaller width Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(c.getExtents().x,c.getExtents().y, cell_box.width, 100)); // do child layout Layout layout = LayoutFactory.getLayout(cell.node); Box cell_contents = layout.layout(c,(Element)cell_box.node); cell_box.sub_box = cell_contents; cell_box.height = cell_box.sub_box.height; column_count += cell.col_span; // restore old extents c.setExtents(oe); // y is relative to the rowbox so it's just 0 cell_box.y = 0; // add the cell to the row row_box.cells.add(cell_box); // if this is a non row spanning cell then // adjust the row height to fit this cell if(cell.row_span == 1) { if(cell_box.height > row_box.height) { row_box.height = cell_box.height; } } row_box.width += cell_box.width; } else { //u.p("it's virtual"); Cell cell = grid.getCell(x,y); // create a virtual cell box for this cell CellBox cell_box = CellBox.createVirtual(cell.cb); // skip doing layout row_box.cells.add(cell_box); // skip adjusting the row height for now // set row height based on real cell contents // set row width based on real cell contents } //u.p("looping"); } //u.p("loop done"); // move the row to the right y position row_height = 0; row_box.y = prev_row.y + prev_row.height; prev_row = row_box; // adjust the max width if(row_box.width > max_width) { max_width = row_box.width; } // adjust the height of each cell in this row to be the height of // the row for(int k=0; k<row_box.cells.size(); k++) { CellBox cb = (CellBox)row_box.cells.get(k); if(cb.isReal()) { cb.height = row_box.height; cb.sub_box.height = row_box.height; } else { // adjusting height based on virtual //u.p("adjusting height based on virtual"); CellBox real = cb.getReal(); //u.p("the real cb = " + real); RowBox orig_row = real.rb; //u.p("orig row = " + orig_row); RowBox cur_row = row_box; //u.p("cur row = " + cur_row); real.height = cur_row.y - orig_row.y + cur_row.height; real.sub_box.height = real.height; //u.p("now real = " + real); } //u.p("cell = " + cb); } } box.height = prev_row.y + prev_row.height; box.width = max_width; return box; }
52947 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52947/e8e0eb314a46ddb6d7381b336fded7fb403ce0f5/TableLayout2.java/buggy/src/java/org/joshy/html/TableLayout2.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8549, 4604, 29521, 12, 474, 15783, 67, 2819, 16, 3555, 3514, 3919, 16, 1772, 276, 16, 3555, 1014, 13, 288, 3639, 3919, 18, 2819, 273, 15783, 67, 2819, 31, 3639, 3919, 18, 4210, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8549, 4604, 29521, 12, 474, 15783, 67, 2819, 16, 3555, 3514, 3919, 16, 1772, 276, 16, 3555, 1014, 13, 288, 3639, 3919, 18, 2819, 273, 15783, 67, 2819, 31, 3639, 3919, 18, 4210, 27...
case 608: {
case 609: {
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER && (Report.should_report("parser", 2))) { Report.report(2,"Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassType ::= TypeName // case 15: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 16: InterfaceType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: TypeName ::= identifier // case 17: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 18: TypeName ::= TypeName . identifier // case 18: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 19: ClassName ::= TypeName // case 19: break; // // Rule 20: TypeVariable ::= identifier // case 20: break; // // Rule 21: ArrayType ::= Type [ ] // case 21: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.array(a, pos(), 1)); break; } // // Rule 22: TypeParameter ::= TypeVariable TypeBoundopt // case 22: bad_rule = 22; break; // // Rule 23: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 23: bad_rule = 23; break; // // Rule 24: AdditionalBoundList ::= AdditionalBound // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBound ::= & InterfaceType // case 26: bad_rule = 26; break; // // Rule 27: TypeArguments ::= < ActualTypeArgumentList > // case 27: bad_rule = 27; break; // // Rule 28: ActualTypeArgumentList ::= ActualTypeArgument // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgumentList , ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: Wildcard ::= ? WildcardBoundsOpt // case 30: bad_rule = 30; break; // // Rule 31: WildcardBounds ::= extends ReferenceType // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= super ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: PackageName ::= identifier // case 33: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 34: PackageName ::= PackageName . identifier // case 34: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 35: ExpressionName ::= identifier // case 35: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 36: ExpressionName ::= AmbiguousName . identifier // case 36: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 37: MethodName ::= identifier // case 37: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 38: MethodName ::= AmbiguousName . identifier // case 38: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 39: PackageOrTypeName ::= identifier // case 39: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= PackageOrTypeName . identifier // case 40: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 41: AmbiguousName ::= identifier // case 41: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= AmbiguousName . identifier // case 42: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 43: CompilationUnit ::= PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 43: { PackageNode a = (PackageNode) btParser.getSym(1); List b = (List) btParser.getSym(2), c = (List) btParser.getSym(3); // Add import x10.lang.* by default. Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Import x10LangImport = nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, x10Lang.toString()); b.add(x10LangImport); btParser.setSym1(nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c)); break; } // // Rule 44: ImportDeclarations ::= ImportDeclaration // case 44: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 45: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 45: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 46: TypeDeclarations ::= TypeDeclaration // case 46: { List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(1); if (a != null) l.add(a); btParser.setSym1(l); break; } // // Rule 47: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 47: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 48: PackageDeclaration ::= package PackageName ; // case 48: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 49: ImportDeclaration ::= SingleTypeImportDeclaration // case 49: break; // // Rule 50: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 50: break; // // Rule 51: ImportDeclaration ::= SingleStaticImportDeclaration // case 51: break; // // Rule 52: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 52: break; // // Rule 53: SingleTypeImportDeclaration ::= import TypeName ; // case 53: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 54: TypeImportOnDemandDeclaration ::= import PackageOrTypeName . * ; // case 54: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 55: SingleStaticImportDeclaration ::= import static TypeName . identifier ; // case 55: bad_rule = 55; break; // // Rule 56: StaticImportOnDemandDeclaration ::= import static TypeName . * ; // case 56: bad_rule = 56; break; // // Rule 57: TypeDeclaration ::= ClassDeclaration // case 57: break; // // Rule 58: TypeDeclaration ::= InterfaceDeclaration // case 58: break; // // Rule 59: TypeDeclaration ::= ; // case 59: { btParser.setSym1(null); break; } // // Rule 60: ClassDeclaration ::= NormalClassDeclaration // case 60: break; // // Rule 61: NormalClassDeclaration ::= ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 61: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(4); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 62: ClassModifiers ::= ClassModifier // case 62: break; // // Rule 63: ClassModifiers ::= ClassModifiers ClassModifier // case 63: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 64: ClassModifier ::= public // case 64: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 65: ClassModifier ::= protected // case 65: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 66: ClassModifier ::= private // case 66: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 67: ClassModifier ::= abstract // case 67: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 68: ClassModifier ::= static // case 68: { btParser.setSym1(Flags.STATIC); break; } // // Rule 69: ClassModifier ::= final // case 69: { btParser.setSym1(Flags.FINAL); break; } // // Rule 70: ClassModifier ::= strictfp // case 70: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 71: TypeParameters ::= < TypeParameterList > // case 71: bad_rule = 71; break; // // Rule 72: TypeParameterList ::= TypeParameter // case 72: bad_rule = 72; break; // // Rule 73: TypeParameterList ::= TypeParameterList , TypeParameter // case 73: bad_rule = 73; break; // // Rule 74: Super ::= extends ClassType // case 74: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 75: Interfaces ::= implements InterfaceTypeList // case 75: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 76: InterfaceTypeList ::= InterfaceType // case 76: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 77: InterfaceTypeList ::= InterfaceTypeList , InterfaceType // case 77: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 78: ClassBody ::= { ClassBodyDeclarationsopt } // case 78: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 79: ClassBodyDeclarations ::= ClassBodyDeclaration // case 79: break; // // Rule 80: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 80: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 81: ClassBodyDeclaration ::= ClassMemberDeclaration // case 81: break; // // Rule 82: ClassBodyDeclaration ::= InstanceInitializer // case 82: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 83: ClassBodyDeclaration ::= StaticInitializer // case 83: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 84: ClassBodyDeclaration ::= ConstructorDeclaration // case 84: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 85: ClassMemberDeclaration ::= FieldDeclaration // case 85: break; // // Rule 86: ClassMemberDeclaration ::= MethodDeclaration // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 87: ClassMemberDeclaration ::= ClassDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= InterfaceDeclaration // case 88: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 89: ClassMemberDeclaration ::= ; // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 90: FieldDeclaration ::= FieldModifiersopt Type VariableDeclarators ; // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { 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(a); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), d.flags, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 91: VariableDeclarators ::= VariableDeclarator // case 91: { List l = new TypedList(new LinkedList(), X10VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: VariableDeclarators ::= VariableDeclarators , VariableDeclarator // case 92: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 93: VariableDeclarator ::= VariableDeclaratorId // case 93: break; // // Rule 94: VariableDeclarator ::= VariableDeclaratorId = VariableInitializer // case 94: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 95: VariableDeclaratorId ::= identifier // case 95: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 96: VariableDeclaratorId ::= VariableDeclaratorId [ ] // case 96: { X10VarDeclarator a = (X10VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 97: VariableDeclaratorId ::= identifier [ IdentifierList ] // case 97: { polyglot.lex.Identifier a = id(btParser.getToken(1)); List paramList = (List) btParser.getSym(3); btParser.setSym1(new X10VarDeclarator(pos(), a.getIdentifier(), paramList)); break; } // // Rule 98: VariableDeclaratorId ::= [ IdentifierList ] // case 98: { String name = polyglot.ext.x10.visit.X10PrettyPrinterVisitor.getId(); List paramList = (List) btParser.getSym(2); btParser.setSym1(new X10VarDeclarator(pos(), name, paramList)); break; } // // Rule 99: VariableInitializer ::= Expression // case 99: break; // // Rule 100: VariableInitializer ::= ArrayInitializer // case 100: break; // // Rule 101: FieldModifiers ::= FieldModifier // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifiers FieldModifier // case 102: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 103: FieldModifier ::= public // case 103: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 104: FieldModifier ::= protected // case 104: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 105: FieldModifier ::= private // case 105: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 106: FieldModifier ::= static // case 106: { btParser.setSym1(Flags.STATIC); break; } // // Rule 107: FieldModifier ::= final // case 107: { btParser.setSym1(Flags.FINAL); break; } // // Rule 108: FieldModifier ::= transient // case 108: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 109: FieldModifier ::= volatile // case 109: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 110: MethodDeclaration ::= MethodHeader MethodBody // case 110: { MethodDecl a = (MethodDecl) btParser.getSym(1); List l = a.formals(); List s = new TypedList(new LinkedList(), Stmt.class, false); Block b = (Block) btParser.getSym(2); for (Iterator i = l.iterator(); i.hasNext(); ) { X10Formal d = (X10Formal) i.next(); if (d.hasExplodedVars()) s.addAll( d.explode()); } if (! s.isEmpty()) { s.addAll(b.statements()); b = b.statements(s); } Flags f = a.flags(); if (f.contains(Flags.ATOMIC)) { List ss = new TypedList(new LinkedList(), Stmt.class, false); ss.add(nf.Atomic(pos(), nf.Here(pos()), b)); b = b.statements(ss); a = a.flags(f.clear(Flags.ATOMIC)); } btParser.setSym1(a.body(b)); break; } // // Rule 111: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 111: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 112: ResultType ::= Type // case 112: break; // // Rule 113: ResultType ::= void // case 113: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 114: MethodDeclarator ::= identifier ( FormalParameterListopt ) // case 114: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 115: MethodDeclarator ::= MethodDeclarator [ ] // case 115: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 116: FormalParameterList ::= LastFormalParameter // case 116: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 117: FormalParameterList ::= FormalParameters , LastFormalParameter // case 117: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 118: FormalParameters ::= FormalParameter // case 118: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameters , FormalParameter // case 119: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 120: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 120: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(3); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 122: VariableModifiers ::= VariableModifiers VariableModifier // case 122: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 123: VariableModifier ::= final // case 123: { btParser.setSym1(Flags.FINAL); break; } // // Rule 124: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 124: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); X10VarDeclarator b = (X10VarDeclarator) btParser.getSym(4); b.setFlag(f); btParser.setSym1(nf.Formal(pos(), nf.array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b)); break; } // // Rule 125: MethodModifiers ::= MethodModifier // case 125: break; // // Rule 126: MethodModifiers ::= MethodModifiers MethodModifier // case 126: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 127: MethodModifier ::= public // case 127: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 128: MethodModifier ::= protected // case 128: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 129: MethodModifier ::= private // case 129: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 130: MethodModifier ::= abstract // case 130: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 131: MethodModifier ::= static // case 131: { btParser.setSym1(Flags.STATIC); break; } // // Rule 132: MethodModifier ::= final // case 132: { btParser.setSym1(Flags.FINAL); break; } // // Rule 133: MethodModifier ::= synchronized // case 133: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 134: MethodModifier ::= native // case 134: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 135: MethodModifier ::= strictfp // case 135: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 136: Throws ::= throws ExceptionTypeList // case 136: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 137: ExceptionTypeList ::= ExceptionType // case 137: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 138: ExceptionTypeList ::= ExceptionTypeList , ExceptionType // case 138: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 139: ExceptionType ::= ClassType // case 139: break; // // Rule 140: MethodBody ::= Block // case 140: break; // // Rule 141: MethodBody ::= ; // case 141: btParser.setSym1(null); break; // // Rule 142: InstanceInitializer ::= Block // case 142: break; // // Rule 143: StaticInitializer ::= static Block // case 143: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 144: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 144: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 145: ConstructorDeclarator ::= SimpleTypeName ( FormalParameterListopt ) // case 145: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 146: SimpleTypeName ::= identifier // case 146: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 147: ConstructorModifiers ::= ConstructorModifier // case 147: break; // // Rule 148: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 148: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 149: ConstructorModifier ::= public // case 149: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 150: ConstructorModifier ::= protected // case 150: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 151: ConstructorModifier ::= private // case 151: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 152: ConstructorBody ::= { ExplicitConstructorInvocationopt BlockStatementsopt } // case 152: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 153: ExplicitConstructorInvocation ::= this ( ArgumentListopt ) ; // case 153: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 154: ExplicitConstructorInvocation ::= super ( ArgumentListopt ) ; // case 154: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 155: ExplicitConstructorInvocation ::= Primary . this ( ArgumentListopt ) ; // case 155: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= Primary . super ( ArgumentListopt ) ; // case 156: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 157: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 157: bad_rule = 157; break; // // Rule 158: EnumBody ::= { EnumConstantsopt ,opt EnumBodyDeclarationsopt } // case 158: bad_rule = 158; break; // // Rule 159: EnumConstants ::= EnumConstant // case 159: bad_rule = 159; break; // // Rule 160: EnumConstants ::= EnumConstants , EnumConstant // case 160: bad_rule = 160; break; // // Rule 161: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 161: bad_rule = 161; break; // // Rule 162: Arguments ::= ( ArgumentListopt ) // case 162: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 163: EnumBodyDeclarations ::= ; ClassBodyDeclarationsopt // case 163: bad_rule = 163; break; // // Rule 164: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 164: break; // // Rule 165: NormalInterfaceDeclaration ::= InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 165: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(4); ClassBody d = (ClassBody) btParser.getSym(5); btParser.setSym1(nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d)); break; } // // Rule 166: InterfaceModifiers ::= InterfaceModifier // case 166: break; // // Rule 167: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 167: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 168: InterfaceModifier ::= public // case 168: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 169: InterfaceModifier ::= protected // case 169: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 170: InterfaceModifier ::= private // case 170: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 171: InterfaceModifier ::= abstract // case 171: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 172: InterfaceModifier ::= static // case 172: { btParser.setSym1(Flags.STATIC); break; } // // Rule 173: InterfaceModifier ::= strictfp // case 173: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 174: ExtendsInterfaces ::= extends InterfaceType // case 174: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 175: ExtendsInterfaces ::= ExtendsInterfaces , InterfaceType // case 175: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 176: InterfaceBody ::= { InterfaceMemberDeclarationsopt } // case 176: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 177: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 177: break; // // Rule 178: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 178: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 179: InterfaceMemberDeclaration ::= ConstantDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 180: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ClassDeclaration // case 181: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 182: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ; // case 183: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 184: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { 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(btParser.getFirstToken(2), btParser.getLastToken()), a, nf.array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 185: ConstantModifiers ::= ConstantModifier // case 185: break; // // Rule 186: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 186: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 187: ConstantModifier ::= public // case 187: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 188: ConstantModifier ::= static // case 188: { btParser.setSym1(Flags.STATIC); break; } // // Rule 189: ConstantModifier ::= final // case 189: { btParser.setSym1(Flags.FINAL); break; } // // Rule 190: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt ; // case 190: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! assert(false); } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, nf.array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 191: AbstractMethodModifiers ::= AbstractMethodModifier // case 191: break; // // Rule 192: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 192: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 193: AbstractMethodModifier ::= public // case 193: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 194: AbstractMethodModifier ::= abstract // case 194: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 195: AnnotationTypeDeclaration ::= InterfaceModifiersopt @ interface identifier AnnotationTypeBody // case 195: bad_rule = 195; break; // // Rule 196: AnnotationTypeBody ::= { AnnotationTypeElementDeclarationsopt } // case 196: bad_rule = 196; break; // // Rule 197: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier ( ) DefaultValueopt ; // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= ; // case 205: bad_rule = 205; break; // // Rule 206: DefaultValue ::= default ElementValue // case 206: bad_rule = 206; break; // // Rule 207: Annotations ::= Annotation // case 207: bad_rule = 207; break; // // Rule 208: Annotations ::= Annotations Annotation // case 208: bad_rule = 208; break; // // Rule 209: Annotation ::= NormalAnnotation // case 209: bad_rule = 209; break; // // Rule 210: Annotation ::= MarkerAnnotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= SingleElementAnnotation // case 211: bad_rule = 211; break; // // Rule 212: NormalAnnotation ::= @ TypeName ( ElementValuePairsopt ) // case 212: bad_rule = 212; break; // // Rule 213: ElementValuePairs ::= ElementValuePair // case 213: bad_rule = 213; break; // // Rule 214: ElementValuePairs ::= ElementValuePairs , ElementValuePair // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePair ::= SimpleName = ElementValue // case 215: bad_rule = 215; break; // // Rule 216: SimpleName ::= identifier // case 216: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 217: ElementValue ::= ConditionalExpression // case 217: bad_rule = 217; break; // // Rule 218: ElementValue ::= Annotation // case 218: bad_rule = 218; break; // // Rule 219: ElementValue ::= ElementValueArrayInitializer // case 219: bad_rule = 219; break; // // Rule 220: ElementValueArrayInitializer ::= { ElementValuesopt ,opt } // case 220: bad_rule = 220; break; // // Rule 221: ElementValues ::= ElementValue // case 221: bad_rule = 221; break; // // Rule 222: ElementValues ::= ElementValues , ElementValue // case 222: bad_rule = 222; break; // // Rule 223: MarkerAnnotation ::= @ TypeName // case 223: bad_rule = 223; break; // // Rule 224: SingleElementAnnotation ::= @ TypeName ( ElementValue ) // case 224: bad_rule = 224; break; // // Rule 225: ArrayInitializer ::= { VariableInitializersopt ,opt } // case 225: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 226: VariableInitializers ::= VariableInitializer // case 226: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 227: VariableInitializers ::= VariableInitializers , VariableInitializer // case 227: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 228: Block ::= { BlockStatementsopt } // case 228: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 229: BlockStatements ::= BlockStatement // case 229: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 230: BlockStatements ::= BlockStatements BlockStatement // case 230: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 231: BlockStatement ::= LocalVariableDeclarationStatement // case 231: break; // // Rule 232: BlockStatement ::= ClassDeclaration // case 232: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= Statement // case 233: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 234: LocalVariableDeclarationStatement ::= LocalVariableDeclaration ; // case 234: break; // // Rule 235: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 235: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); List s = new TypedList(new LinkedList(), Stmt.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { X10VarDeclarator d = (X10VarDeclarator) i.next(); d.setFlag( flags ); // use d.flags below and not flags, setFlag may change it. l.add(nf.LocalDecl(d.pos, d.flags, nf.array(a, pos(d), d.dims), d.name, d.init)); if (d.hasExplodedVars()) s.addAll( d.explode() ); } l.addAll(s); btParser.setSym1(l); break; } // // Rule 236: Statement ::= StatementWithoutTrailingSubstatement // case 236: break; // // Rule 237: Statement ::= LabeledStatement // case 237: break; // // Rule 238: Statement ::= IfThenStatement // case 238: break; // // Rule 239: Statement ::= IfThenElseStatement // case 239: break; // // Rule 240: Statement ::= WhileStatement // case 240: break; // // Rule 241: Statement ::= ForStatement // case 241: break; // // Rule 242: StatementWithoutTrailingSubstatement ::= Block // case 242: break; // // Rule 243: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= AssertStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= DoStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= BreakStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= TryStatement // case 253: break; // // Rule 254: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 254: break; // // Rule 255: StatementNoShortIf ::= LabeledStatementNoShortIf // case 255: break; // // Rule 256: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 256: break; // // Rule 257: StatementNoShortIf ::= WhileStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= ForStatementNoShortIf // case 258: break; // // Rule 259: IfThenStatement ::= if ( Expression ) Statement // case 259: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 260: IfThenElseStatement ::= if ( Expression ) StatementNoShortIf else Statement // case 260: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 261: IfThenElseStatementNoShortIf ::= if ( Expression ) StatementNoShortIf else StatementNoShortIf // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 262: EmptyStatement ::= ; // case 262: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 263: LabeledStatement ::= identifier : Statement // case 263: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 264: LabeledStatementNoShortIf ::= identifier : StatementNoShortIf // case 264: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 265: ExpressionStatement ::= StatementExpression ; // case 265: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 266: StatementExpression ::= Assignment // case 266: break; // // Rule 267: StatementExpression ::= PreIncrementExpression // case 267: break; // // Rule 268: StatementExpression ::= PreDecrementExpression // case 268: break; // // Rule 269: StatementExpression ::= PostIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PostDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= MethodInvocation // case 271: break; // // Rule 272: StatementExpression ::= ClassInstanceCreationExpression // case 272: break; // // Rule 273: AssertStatement ::= assert Expression ; // case 273: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 274: AssertStatement ::= assert Expression : Expression ; // case 274: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 275: SwitchStatement ::= switch ( Expression ) SwitchBlock // case 275: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 276: SwitchBlock ::= { SwitchBlockStatementGroupsopt SwitchLabelsopt } // case 276: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 277: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 277: break; // // Rule 278: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 278: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 279: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 280: SwitchLabels ::= SwitchLabel // case 280: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 281: SwitchLabels ::= SwitchLabels SwitchLabel // case 281: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 282: SwitchLabel ::= case ConstantExpression : // case 282: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 283: SwitchLabel ::= case EnumConstant : // case 283: bad_rule = 283; break; // // Rule 284: SwitchLabel ::= default : // case 284: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 285: EnumConstant ::= identifier // case 285: bad_rule = 285; break; // // Rule 286: WhileStatement ::= while ( Expression ) Statement // case 286: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 287: WhileStatementNoShortIf ::= while ( Expression ) StatementNoShortIf // case 287: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 288: DoStatement ::= do Statement while ( Expression ) ; // case 288: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 289: ForStatement ::= BasicForStatement // case 289: break; // // Rule 290: ForStatement ::= EnhancedForStatement // case 290: break; // // Rule 291: BasicForStatement ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement // case 291: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 292: ForStatementNoShortIf ::= for ( ForInitopt ; Expressionopt ; ForUpdateopt ) StatementNoShortIf // case 292: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 293: ForInit ::= StatementExpressionList // case 293: break; // // Rule 294: ForInit ::= LocalVariableDeclaration // case 294: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 295: ForUpdate ::= StatementExpressionList // case 295: break; // // Rule 296: StatementExpressionList ::= StatementExpression // case 296: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 297: StatementExpressionList ::= StatementExpressionList , StatementExpression // case 297: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 298: BreakStatement ::= break identifieropt ; // case 298: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 299: ContinueStatement ::= continue identifieropt ; // case 299: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 300: ReturnStatement ::= return Expressionopt ; // case 300: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 301: ThrowStatement ::= throw Expression ; // case 301: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 302: SynchronizedStatement ::= synchronized ( Expression ) Block // case 302: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 303: TryStatement ::= try Block Catches // case 303: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 304: TryStatement ::= try Block Catchesopt Finally // case 304: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 305: Catches ::= CatchClause // case 305: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 306: Catches ::= Catches CatchClause // case 306: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 307: CatchClause ::= catch ( FormalParameter ) Block // case 307: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 308: Finally ::= finally Block // case 308: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 309: Primary ::= PrimaryNoNewArray // case 309: break; // // Rule 310: Primary ::= ArrayCreationExpression // case 310: break; // // Rule 311: PrimaryNoNewArray ::= Literal // case 311: break; // // Rule 312: PrimaryNoNewArray ::= Type . class // case 312: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 313: PrimaryNoNewArray ::= void . class // case 313: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 314: PrimaryNoNewArray ::= this // case 314: { btParser.setSym1(nf.This(pos())); break; } // // Rule 315: PrimaryNoNewArray ::= ClassName . this // case 315: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 316: PrimaryNoNewArray ::= ( Expression ) // case 316: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 317: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 317: break; // // Rule 318: PrimaryNoNewArray ::= FieldAccess // case 318: break; // // Rule 319: PrimaryNoNewArray ::= MethodInvocation // case 319: break; // // Rule 320: PrimaryNoNewArray ::= ArrayAccess // case 320: break; // // Rule 321: Literal ::= IntegerLiteral // case 321: { polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 322: Literal ::= LongLiteral // case 322: { polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1)); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 323: Literal ::= FloatingPointLiteral // case 323: { polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 324: Literal ::= DoubleLiteral // case 324: { polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 325: Literal ::= BooleanLiteral // case 325: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 326: Literal ::= CharacterLiteral // case 326: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 327: Literal ::= StringLiteral // case 327: { polyglot.lex.StringLiteral a = string_lit(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), a.getValue())); break; } // // Rule 328: Literal ::= null // case 328: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 329: BooleanLiteral ::= true // case 329: break; // // Rule 330: BooleanLiteral ::= false // case 330: break; // // Rule 331: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt // case 331: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 332: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ClassBodyopt // case 332: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 333: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ClassBodyopt // case 333: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 334: ArgumentList ::= Expression // case 334: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 335: ArgumentList ::= ArgumentList , Expression // case 335: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 336: DimExprs ::= DimExpr // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: DimExprs ::= DimExprs DimExpr // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 338: DimExpr ::= [ Expression ] // case 338: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 339: Dims ::= [ ] // case 339: { btParser.setSym1(new Integer(1)); break; } // // Rule 340: Dims ::= Dims [ ] // case 340: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 341: FieldAccess ::= Primary . identifier // case 341: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 342: FieldAccess ::= super . identifier // case 342: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 343: FieldAccess ::= ClassName . super . identifier // case 343: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 344: MethodInvocation ::= MethodName ( ArgumentListopt ) // case 344: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 345: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) // case 345: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 346: MethodInvocation ::= super . identifier ( ArgumentListopt ) // case 346: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 347: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt ) // case 347: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 348: PostfixExpression ::= Primary // case 348: break; // // Rule 349: PostfixExpression ::= ExpressionName // case 349: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 350: PostfixExpression ::= PostIncrementExpression // case 350: break; // // Rule 351: PostfixExpression ::= PostDecrementExpression // case 351: break; // // Rule 352: PostIncrementExpression ::= PostfixExpression ++ // case 352: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 353: PostDecrementExpression ::= PostfixExpression -- // case 353: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 354: UnaryExpression ::= PreIncrementExpression // case 354: break; // // Rule 355: UnaryExpression ::= PreDecrementExpression // case 355: break; // // Rule 356: UnaryExpression ::= + UnaryExpression // case 356: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 357: UnaryExpression ::= - UnaryExpression // case 357: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 359: PreIncrementExpression ::= ++ UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 360: PreDecrementExpression ::= -- UnaryExpression // case 360: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 361: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 361: break; // // Rule 362: UnaryExpressionNotPlusMinus ::= ~ UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= ! UnaryExpression // case 363: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 365: MultiplicativeExpression ::= UnaryExpression // case 365: break; // // Rule 366: MultiplicativeExpression ::= MultiplicativeExpression * UnaryExpression // case 366: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 367: MultiplicativeExpression ::= MultiplicativeExpression / UnaryExpression // case 367: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression % UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 369: AdditiveExpression ::= MultiplicativeExpression // case 369: break; // // Rule 370: AdditiveExpression ::= AdditiveExpression + MultiplicativeExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 371: AdditiveExpression ::= AdditiveExpression - MultiplicativeExpression // case 371: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 372: ShiftExpression ::= AdditiveExpression // case 372: break; // // Rule 373: ShiftExpression ::= ShiftExpression << AdditiveExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 374: ShiftExpression ::= ShiftExpression > > AdditiveExpression // case 374: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 375: ShiftExpression ::= ShiftExpression > > > AdditiveExpression // case 375: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 376: RelationalExpression ::= ShiftExpression // case 376: break; // // Rule 377: RelationalExpression ::= RelationalExpression < ShiftExpression // case 377: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 378: RelationalExpression ::= RelationalExpression > ShiftExpression // case 378: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 379: RelationalExpression ::= RelationalExpression <= ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression > = ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 381: EqualityExpression ::= RelationalExpression // case 381: break; // // Rule 382: EqualityExpression ::= EqualityExpression == RelationalExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 383: EqualityExpression ::= EqualityExpression != RelationalExpression // case 383: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 384: AndExpression ::= EqualityExpression // case 384: break; // // Rule 385: AndExpression ::= AndExpression & EqualityExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 386: ExclusiveOrExpression ::= AndExpression // case 386: break; // // Rule 387: ExclusiveOrExpression ::= ExclusiveOrExpression ^ AndExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 388: InclusiveOrExpression ::= ExclusiveOrExpression // case 388: break; // // Rule 389: InclusiveOrExpression ::= InclusiveOrExpression | ExclusiveOrExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 390: ConditionalAndExpression ::= InclusiveOrExpression // case 390: break; // // Rule 391: ConditionalAndExpression ::= ConditionalAndExpression && InclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 392: ConditionalOrExpression ::= ConditionalAndExpression // case 392: break; // // Rule 393: ConditionalOrExpression ::= ConditionalOrExpression || ConditionalAndExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 394: ConditionalExpression ::= ConditionalOrExpression // case 394: break; // // Rule 395: ConditionalExpression ::= ConditionalOrExpression ? Expression : ConditionalExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 396: AssignmentExpression ::= ConditionalExpression // case 396: break; // // Rule 397: AssignmentExpression ::= Assignment // case 397: break; // // Rule 398: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 398: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 399: LeftHandSide ::= ExpressionName // case 399: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 400: LeftHandSide ::= FieldAccess // case 400: break; // // Rule 401: LeftHandSide ::= ArrayAccess // case 401: break; // // Rule 402: AssignmentOperator ::= = // case 402: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 403: AssignmentOperator ::= *= // case 403: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 404: AssignmentOperator ::= /= // case 404: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 405: AssignmentOperator ::= %= // case 405: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= += // case 406: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= -= // case 407: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= <<= // case 408: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= > > = // case 409: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= > > > = // case 410: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= &= // case 411: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= ^= // case 412: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= |= // case 413: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 414: Expression ::= AssignmentExpression // case 414: break; // // Rule 415: ConstantExpression ::= Expression // case 415: break; // // Rule 416: Dimsopt ::= $Empty // case 416: { btParser.setSym1(new Integer(0)); break; } // // Rule 417: Dimsopt ::= Dims // case 417: break; // // Rule 418: Catchesopt ::= $Empty // case 418: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 419: Catchesopt ::= Catches // case 419: break; // // Rule 420: identifieropt ::= $Empty // case 420: btParser.setSym1(null); break; // // Rule 421: identifieropt ::= identifier // case 421: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 422: ForUpdateopt ::= $Empty // case 422: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 423: ForUpdateopt ::= ForUpdate // case 423: break; // // Rule 424: Expressionopt ::= $Empty // case 424: btParser.setSym1(null); break; // // Rule 425: Expressionopt ::= Expression // case 425: break; // // Rule 426: ForInitopt ::= $Empty // case 426: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 427: ForInitopt ::= ForInit // case 427: break; // // Rule 428: SwitchLabelsopt ::= $Empty // case 428: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 429: SwitchLabelsopt ::= SwitchLabels // case 429: break; // // Rule 430: SwitchBlockStatementGroupsopt ::= $Empty // case 430: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 431: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 431: break; // // Rule 432: VariableModifiersopt ::= $Empty // case 432: { btParser.setSym1(Flags.NONE); break; } // // Rule 433: VariableModifiersopt ::= VariableModifiers // case 433: break; // // Rule 434: VariableInitializersopt ::= $Empty // case 434: btParser.setSym1(null); break; // // Rule 435: VariableInitializersopt ::= VariableInitializers // case 435: break; // // Rule 436: ElementValuesopt ::= $Empty // case 436: btParser.setSym1(null); break; // // Rule 437: ElementValuesopt ::= ElementValues // case 437: bad_rule = 437; break; // // Rule 438: ElementValuePairsopt ::= $Empty // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuePairsopt ::= ElementValuePairs // case 439: bad_rule = 439; break; // // Rule 440: DefaultValueopt ::= $Empty // case 440: btParser.setSym1(null); break; // // Rule 441: DefaultValueopt ::= DefaultValue // case 441: break; // // Rule 442: AnnotationTypeElementDeclarationsopt ::= $Empty // case 442: btParser.setSym1(null); break; // // Rule 443: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 443: bad_rule = 443; break; // // Rule 444: AbstractMethodModifiersopt ::= $Empty // case 444: { btParser.setSym1(Flags.NONE); break; } // // Rule 445: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 445: break; // // Rule 446: ConstantModifiersopt ::= $Empty // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: ConstantModifiersopt ::= ConstantModifiers // case 447: break; // // Rule 448: InterfaceMemberDeclarationsopt ::= $Empty // case 448: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 449: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 449: break; // // Rule 450: ExtendsInterfacesopt ::= $Empty // case 450: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 451: ExtendsInterfacesopt ::= ExtendsInterfaces // case 451: break; // // Rule 452: InterfaceModifiersopt ::= $Empty // case 452: { btParser.setSym1(Flags.NONE); break; } // // Rule 453: InterfaceModifiersopt ::= InterfaceModifiers // case 453: break; // // Rule 454: ClassBodyopt ::= $Empty // case 454: btParser.setSym1(null); break; // // Rule 455: ClassBodyopt ::= ClassBody // case 455: break; // // Rule 456: Argumentsopt ::= $Empty // case 456: btParser.setSym1(null); break; // // Rule 457: Argumentsopt ::= Arguments // case 457: bad_rule = 457; break; // // Rule 458: EnumBodyDeclarationsopt ::= $Empty // case 458: btParser.setSym1(null); break; // // Rule 459: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 459: bad_rule = 459; break; // // Rule 460: ,opt ::= $Empty // case 460: btParser.setSym1(null); break; // // Rule 461: ,opt ::= , // case 461: break; // // Rule 462: EnumConstantsopt ::= $Empty // case 462: btParser.setSym1(null); break; // // Rule 463: EnumConstantsopt ::= EnumConstants // case 463: bad_rule = 463; break; // // Rule 464: ArgumentListopt ::= $Empty // case 464: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 465: ArgumentListopt ::= ArgumentList // case 465: break; // // Rule 466: BlockStatementsopt ::= $Empty // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 467: BlockStatementsopt ::= BlockStatements // case 467: break; // // Rule 468: ExplicitConstructorInvocationopt ::= $Empty // case 468: btParser.setSym1(null); break; // // Rule 469: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 469: break; // // Rule 470: ConstructorModifiersopt ::= $Empty // case 470: { btParser.setSym1(Flags.NONE); break; } // // Rule 471: ConstructorModifiersopt ::= ConstructorModifiers // case 471: break; // // Rule 472: ...opt ::= $Empty // case 472: btParser.setSym1(null); break; // // Rule 473: ...opt ::= ... // case 473: break; // // Rule 474: FormalParameterListopt ::= $Empty // case 474: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 475: FormalParameterListopt ::= FormalParameterList // case 475: break; // // Rule 476: Throwsopt ::= $Empty // case 476: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 477: Throwsopt ::= Throws // case 477: break; // // Rule 478: MethodModifiersopt ::= $Empty // case 478: { btParser.setSym1(Flags.NONE); break; } // // Rule 479: MethodModifiersopt ::= MethodModifiers // case 479: break; // // Rule 480: FieldModifiersopt ::= $Empty // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: FieldModifiersopt ::= FieldModifiers // case 481: break; // // Rule 482: ClassBodyDeclarationsopt ::= $Empty // case 482: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 483: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 483: break; // // Rule 484: Interfacesopt ::= $Empty // case 484: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 485: Interfacesopt ::= Interfaces // case 485: break; // // Rule 486: Superopt ::= $Empty // case 486: btParser.setSym1(null); break; // // Rule 487: Superopt ::= Super // case 487: break; // // Rule 488: TypeParametersopt ::= $Empty // case 488: btParser.setSym1(null); break; // // Rule 489: TypeParametersopt ::= TypeParameters // case 489: break; // // Rule 490: ClassModifiersopt ::= $Empty // case 490: { btParser.setSym1(Flags.NONE); break; } // // Rule 491: ClassModifiersopt ::= ClassModifiers // case 491: break; // // Rule 492: Annotationsopt ::= $Empty // case 492: btParser.setSym1(null); break; // // Rule 493: Annotationsopt ::= Annotations // case 493: bad_rule = 493; break; // // Rule 494: TypeDeclarationsopt ::= $Empty // case 494: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 495: TypeDeclarationsopt ::= TypeDeclarations // case 495: break; // // Rule 496: ImportDeclarationsopt ::= $Empty // case 496: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 497: ImportDeclarationsopt ::= ImportDeclarations // case 497: break; // // Rule 498: PackageDeclarationopt ::= $Empty // case 498: btParser.setSym1(null); break; // // Rule 499: PackageDeclarationopt ::= PackageDeclaration // case 499: break; // // Rule 500: WildcardBoundsOpt ::= $Empty // case 500: btParser.setSym1(null); break; // // Rule 501: WildcardBoundsOpt ::= WildcardBounds // case 501: bad_rule = 501; break; // // Rule 502: AdditionalBoundListopt ::= $Empty // case 502: btParser.setSym1(null); break; // // Rule 503: AdditionalBoundListopt ::= AdditionalBoundList // case 503: bad_rule = 503; break; // // Rule 504: TypeBoundopt ::= $Empty // case 504: btParser.setSym1(null); break; // // Rule 505: TypeBoundopt ::= TypeBound // case 505: bad_rule = 505; break; // // Rule 506: TypeArgumentsopt ::= $Empty // case 506: btParser.setSym1(null); break; // // Rule 507: TypeArgumentsopt ::= TypeArguments // case 507: bad_rule = 507; break; // // Rule 508: Type ::= DataType PlaceTypeSpecifieropt // case 508: { // Just parse the placetype and drop it for now. break; } // // Rule 509: Type ::= nullable < Type > // case 509: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 510: Type ::= future < Type > // case 510: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 511: DataType ::= PrimitiveType // case 511: break; // // Rule 512: DataType ::= ClassOrInterfaceType // case 512: break; // // Rule 513: DataType ::= ArrayType // case 513: break; // // Rule 514: PlaceTypeSpecifier ::= @ PlaceType // case 514: break; // // Rule 515: PlaceType ::= place // case 515: break; // // Rule 516: PlaceType ::= activity // case 516: break; // // Rule 517: PlaceType ::= method // case 517: break; // // Rule 518: PlaceType ::= current // case 518: break; // // Rule 519: PlaceType ::= PlaceExpression // case 519: break; // // Rule 520: ClassOrInterfaceType ::= TypeName DepParametersopt // case 520: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(b == null ? t : nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 521: DepParameters ::= ( DepParameterExpr ) // case 521: break; // // Rule 522: DepParameterExpr ::= ArgumentList WhereClauseopt // case 522: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 523: DepParameterExpr ::= WhereClause // case 523: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 524: WhereClause ::= : Expression // case 524: break; // // Rule 526: X10ArrayType ::= Type [ . ] // case 526: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 527: X10ArrayType ::= Type reference [ . ] // case 527: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 528: X10ArrayType ::= Type value [ . ] // case 528: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 529: X10ArrayType ::= Type [ DepParameterExpr ] // case 529: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 530: X10ArrayType ::= Type reference [ DepParameterExpr ] // case 530: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 531: X10ArrayType ::= Type value [ DepParameterExpr ] // case 531: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 532: ObjectKind ::= value // case 532: bad_rule = 532; break; // // Rule 533: ObjectKind ::= reference // case 533: bad_rule = 533; break; // // Rule 534: MethodModifier ::= atomic // case 534: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 535: MethodModifier ::= extern // case 535: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 536: ClassDeclaration ::= ValueClassDeclaration // case 536: break; // // Rule 537: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 537: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 538: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 538: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 539: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ ] ArrayInitializer // case 539: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 540: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] // case 540: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 541: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] Expression // case 541: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr distr = (Expr) btParser.getSym(5); Expr initializer = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, distr, initializer)); break; } // // Rule 542: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt [ Expression ] ( FormalParameter ) MethodBody // case 542: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr distr = (Expr) btParser.getSym(5); X10Formal f = (X10Formal) btParser.getSym(8); Block body = (Block) btParser.getSym(10); New initializer = makeInitializer( pos(btParser.getFirstToken(7), btParser.getLastToken(10)), a, f, body ); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, distr, initializer)); break; } // // Rule 543: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt [ Expression ] // case 543: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(6); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 544: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt [ Expression ] Expression // case 544: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(4) != null); Expr c = (Expr) btParser.getSym(6); Expr d = (Expr) btParser.getSym(8); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 545: X10ArrayInitializer ::= Expression // case 545: break; // Sigh this is not trivial to do just yet :-( // // Rule 546: X10ArrayInitializer ::= ( FormalParameter ) MethodBody // case 546: bad_rule = 546; break; // // Rule 547: ArrayBaseType ::= PrimitiveType // case 547: break; // // Rule 548: ArrayBaseType ::= ClassOrInterfaceType // case 548: break; // // Rule 549: ArrayAccess ::= ExpressionName [ ArgumentList ] // case 549: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 550: ArrayAccess ::= PrimaryNoNewArray [ ArgumentList ] // case 550: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 551: Statement ::= NowStatement // case 551: break; // // Rule 552: Statement ::= ClockedStatement // case 552: break; // // Rule 553: Statement ::= AsyncStatement // case 553: break; // // Rule 554: Statement ::= AtomicStatement // case 554: break; // // Rule 555: Statement ::= WhenStatement // case 555: break; // // Rule 556: Statement ::= ForEachStatement // case 556: break; // // Rule 557: Statement ::= AtEachStatement // case 557: break; // // Rule 558: Statement ::= FinishStatement // case 558: break; // // Rule 559: StatementWithoutTrailingSubstatement ::= NextStatement // case 559: break; // // Rule 560: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 560: break; // // Rule 561: StatementNoShortIf ::= NowStatementNoShortIf // case 561: break; // // Rule 562: StatementNoShortIf ::= ClockedStatementNoShortIf // case 562: break; // // Rule 563: StatementNoShortIf ::= AsyncStatementNoShortIf // case 563: break; // // Rule 564: StatementNoShortIf ::= AtomicStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= WhenStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= ForEachStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtEachStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= FinishStatementNoShortIf // case 568: break; // // Rule 569: NowStatement ::= now ( Clock ) Statement // case 569: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 570: ClockedStatement ::= clocked ( ClockList ) Statement // case 570: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 571: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 571: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 572: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 572: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 573: WhenStatement ::= when ( Expression ) Statement // case 573: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 574: WhenStatement ::= WhenStatement or ( Expression ) Statement // case 574: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 575: ForEachStatement ::= foreach ( FormalParameter : Expression ) Statement // case 575: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 576: AtEachStatement ::= ateach ( FormalParameter : Expression ) Statement // case 576: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 577: EnhancedForStatement ::= for ( FormalParameter : Expression ) Statement // case 577: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 578: FinishStatement ::= finish Statement // case 578: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 579: NowStatementNoShortIf ::= now ( Clock ) StatementNoShortIf // case 579: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 580: ClockedStatementNoShortIf ::= clocked ( ClockList ) StatementNoShortIf // case 580: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 581: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 581: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 582: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 582: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 583: WhenStatementNoShortIf ::= when ( Expression ) StatementNoShortIf // case 583: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 584: WhenStatementNoShortIf ::= WhenStatement or ( Expression ) StatementNoShortIf // case 584: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); When.Branch wb = nf.WhenBranch(pos(btParser.getFirstToken(2), btParser.getLastToken(6)), e, s); w.add(wb); btParser.setSym1(w); break; } // // Rule 585: ForEachStatementNoShortIf ::= foreach ( FormalParameter : Expression ) StatementNoShortIf // case 585: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 586: AtEachStatementNoShortIf ::= ateach ( FormalParameter : Expression ) StatementNoShortIf // case 586: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 587: EnhancedForStatementNoShortIf ::= for ( FormalParameter : Expression ) StatementNoShortIf // case 587: { X10Formal f = (X10Formal) btParser.getSym(3); Formal ff = f.flags(f.flags().Final()); // make it final Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), ff, e, f.hasExplodedVars() ? nf.Block(pos(), f.explode(s)) : s); btParser.setSym1(x); break; } // // Rule 588: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 588: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 589: PlaceExpressionSingleList ::= ( PlaceExpression ) // case 589: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 590: PlaceExpression ::= here // case 590: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 591: PlaceExpression ::= this // case 591: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 592: PlaceExpression ::= Expression // case 592: break; // // Rule 593: PlaceExpression ::= ArrayAccess // case 593: bad_rule = 593; break; // // Rule 594: NextStatement ::= next ; // case 594: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 595: AwaitStatement ::= await Expression ; // case 595: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 596: ClockList ::= Clock // case 596: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 597: ClockList ::= ClockList , Clock // case 597: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 598: Clock ::= identifier // case 598: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 599: CastExpression ::= ( Type ) UnaryExpressionNotPlusMinus // case 599: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 600: MethodInvocation ::= Primary -> identifier ( ArgumentListopt ) // case 600: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 601: RelationalExpression ::= RelationalExpression instanceof Type // case 601: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 602: ExpressionName ::= here // case 602: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return ((X10NodeFactory) nf).Here(pos); } }); break; } // // Rule 603: IdentifierList ::= IdentifierList , identifier // case 603: { List l = (List) btParser.getSym(1); polyglot.lex.Identifier a = id(btParser.getToken(3)); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 604: IdentifierList ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); List l = new TypedList(new LinkedList(), Name.class, false); l.add(new Name(nf, ts, pos(), a.getIdentifier())); btParser.setSym1(l); break; } // // Rule 605: Primary ::= FutureExpression // case 605: break; // // Rule 606: Primary ::= [ ArgumentList ] // case 606: { 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"); List a = (List) btParser.getSym(2); Tuple tuple = nf.Tuple(pos(), x10LangPointFactoryPoint, x10LangRegionFactoryRegion, a); btParser.setSym1(tuple); break; } // // Rule 607: AssignmentExpression ::= Expression -> Expression // case 607: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); //System.out.println("Distribution:" + a + "|" + b + "|"); // x10.lang.region.factory.region( ArgumentList ) // Construct the MethodName Name x10 = new Name(nf, ts, pos(), "x10"); Name x10Lang = new Name(nf, ts, pos(), x10, "lang"); Name x10LangDistribution = new Name(nf, ts, pos(), x10Lang, "distribution"); Name x10LangDistributionFactory = new Name(nf, ts, pos(), x10LangDistribution, "factory"); Name x10LangDistributionFactoryConstant = new Name(nf, ts, pos(), x10LangDistributionFactory, "constant"); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(a); l.add(b); Call call = nf.Call(pos(), x10LangDistributionFactoryConstant.prefix.toReceiver(), "constant", l); btParser.setSym1(call); break; } // // Rule 608: Primary ::= Expression : Expression // case 608: { Expr a = (Expr) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); 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(a); l.add(b); Call regionCall = nf.Call( pos(), x10LangRegionFactoryRegion.prefix.toReceiver(), "region", l ); btParser.setSym1(regionCall); break; } // // Rule 609: FutureExpression ::= future PlaceExpressionSingleListopt { Expression } // case 609: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 610: FieldModifier ::= mutable // case 610: { btParser.setSym1(Flags.MUTABLE); break; } // // Rule 611: FieldModifier ::= const // case 611: { btParser.setSym1(Flags.PUBLIC.set(Flags.STATIC).set(Flags.FINAL)); break; } // // Rule 612: FunExpression ::= fun Type ( FormalParameterListopt ) { Expression } // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName ( ArgumentListopt ) ( ArgumentListopt ) // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName . super . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName . identifier ( ArgumentListopt ) ( ArgumentListopt ) // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary . new identifier ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName . new identifier ( ArgumentListopt ) ( ArgumentListopt ) ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= $Empty // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= $Empty // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= $Empty // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= $Empty // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= $Empty // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: PlaceExpressionSingleListopt ::= $Empty // case 631: btParser.setSym1(null); break; // // Rule 632: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 632: break; // // Rule 633: ArgumentListopt ::= $Empty // case 633: btParser.setSym1(null); break; // // Rule 634: ArgumentListopt ::= ArgumentList // case 634: break; // // Rule 635: DepParametersopt ::= $Empty // case 635: btParser.setSym1(null); break; // // Rule 636: DepParametersopt ::= DepParameters // case 636: break; // // Rule 637: Unsafeopt ::= $Empty // case 637: btParser.setSym1(null); break; // // Rule 638: Unsafeopt ::= unsafe // case 638: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } // // Rule 639: ParamIdopt ::= $Empty // case 639: btParser.setSym1(null); break; // // Rule 640: ParamIdopt ::= identifier // case 640: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } default: break; } return; }
1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/0c6c148f7be6e4cc0e87c12a307232047c894d1b/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, ...
if (command_line_options.debug()) { Configuration.instance().set_debug(true); }
configure_options(command_line_options);
public static void main(String[] args) { initialize_configuration(); command_line_options = new CommandLineOptions(args); if (command_line_options.debug()) { Configuration.instance().set_debug(true); } mas_gui.DataSetBuilder data_builder = new mas_gui.DataSetBuilder(connection(), command_line_options); mas_gui.Chart chart; chart = new mas_gui.Chart(data_builder, chart_filename, command_line_options); }
13245 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13245/f2d79bff77febe04aef94aeaae7be8abf07198cd/MA_Client.java/buggy/src/clients/gui1_root/MA_Client.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 202, 202, 11160, 67, 7025, 5621, 202, 202, 3076, 67, 1369, 67, 2116, 273, 394, 15893, 1320, 12, 1968, 1769, 202, 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, 225, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 13, 288, 202, 202, 11160, 67, 7025, 5621, 202, 202, 3076, 67, 1369, 67, 2116, 273, 394, 15893, 1320, 12, 1968, 1769, 202, 202, 430, 261, ...
System.err.println(VerifyTests.class.getName()); System.out.println(VerifyTests.class.getName());
public void run() { try { loadAndRun(className); out.writeBoolean(true); } catch (Throwable e) { e.printStackTrace(); try { out.writeBoolean(false); } catch (IOException e1) { // ignore } } System.err.println(VerifyTests.class.getName()); System.out.println(VerifyTests.class.getName()); }
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/c15d0d4599e5079a88292ba7bcbe500266fb693d/VerifyTests.java/buggy/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/VerifyTests.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 482, 918, 1086, 1435, 288, 9506, 202, 698, 288, 6862, 202, 945, 1876, 1997, 12, 12434, 1769, 6862, 202, 659, 18, 2626, 5507, 12, 3767, 1769, 9506, 202, 97, 1044, 261, 15155, 425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 482, 918, 1086, 1435, 288, 9506, 202, 698, 288, 6862, 202, 945, 1876, 1997, 12, 12434, 1769, 6862, 202, 659, 18, 2626, 5507, 12, 3767, 1769, 9506, 202, 97, 1044, 261, 15155, 425, ...
final StarTable startable = new FitsStarTable( thdu ); int ncols = startable.getColumnCount(); int nrows = startable.getRowCount(); dv.addKeyedItem( "Columns", ncols ); dv.addKeyedItem( "Rows", nrows ); dv.addSeparator(); dv.addKeyedItem( "Number of header cards", header.getNumberOfCards() ); dv.addKeyedItem( "Blocks in header", header.getSize() / 2880 ); dv.addKeyedItem( "Blocks of data", FitsConstants.getDataSize( header ) / 2880 );
/* Make the table. */ try { ArrayDataInput istrm = hdudata.getArrayData();
public JComponent getFullView() { if ( fullview == null ) { DetailViewer dv = new DetailViewer( this ); fullview = dv.getComponent(); dv.addSeparator(); dv.addKeyedItem( "HDU type", hduType ); final StarTable startable = new FitsStarTable( thdu ); int ncols = startable.getColumnCount(); int nrows = startable.getRowCount(); dv.addKeyedItem( "Columns", ncols ); dv.addKeyedItem( "Rows", nrows ); dv.addSeparator(); dv.addKeyedItem( "Number of header cards", header.getNumberOfCards() ); dv.addKeyedItem( "Blocks in header", header.getSize() / 2880 ); dv.addKeyedItem( "Blocks of data", FitsConstants.getDataSize( header ) / 2880 ); dv.addSubHead( "Columns" ); for ( int i = 0; i < ncols; i++ ) { ColumnHeader head = startable.getHeader( i ); dv.addKeyedItem( "Column " + ( i + 1 ), head.getName() ); } dv.addPane( "Header cards", new ComponentMaker() { public JComponent getComponent() { return new TextViewer( header.iterator() ); } } ); dv.addPane( "Column details", new ComponentMaker() { public JComponent getComponent() { MetamapGroup metagroup = new StarTableMetamapGroup( startable ); return new MetaTable( metagroup ); } } ); dv.addPane( "Table data", new ComponentMaker() { public JComponent getComponent() { return new TreeviewJTable( startable ); } } ); } return fullview; }
48494 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48494/8b3f8610efbfee556558fb616a253f56118767a8/TableHDUDataNode.java/buggy/treeview/src/main/uk/ac/starlink/treeview/TableHDUDataNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 29058, 10208, 1767, 1435, 288, 3639, 309, 261, 1983, 1945, 422, 446, 262, 288, 5411, 27931, 18415, 12494, 273, 394, 27931, 18415, 12, 333, 11272, 5411, 1983, 1945, 273, 12494, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 29058, 10208, 1767, 1435, 288, 3639, 309, 261, 1983, 1945, 422, 446, 262, 288, 5411, 27931, 18415, 12494, 273, 394, 27931, 18415, 12, 333, 11272, 5411, 1983, 1945, 273, 12494, 18, 588...
return def ? !(v != null && (v.equalsIgnoreCase("false") || v.equalsIgnoreCase("no"))) : v != null && (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes")) ; }
return def ? !(v != null && (v.equalsIgnoreCase("false") || v.equalsIgnoreCase("no"))) : v != null && (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes")) ; }
private static boolean getBooleanParameter(String v, boolean def) { return def ? !(v != null && (v.equalsIgnoreCase("false") || v.equalsIgnoreCase("no"))) : v != null && (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("yes")) ; }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/f36438f64391fa83489b4c87c039249af2e81115/WrapText.java/buggy/trunk/src/java/org/apache/james/transport/mailets/WrapText.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1250, 12835, 1662, 12, 780, 331, 16, 1250, 1652, 13, 288, 202, 202, 2463, 1652, 692, 4697, 202, 5, 12, 90, 480, 446, 597, 261, 90, 18, 14963, 5556, 2932, 5743, 7923, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1250, 12835, 1662, 12, 780, 331, 16, 1250, 1652, 13, 288, 202, 202, 2463, 1652, 692, 4697, 202, 5, 12, 90, 480, 446, 597, 261, 90, 18, 14963, 5556, 2932, 5743, 7923, 7...
tree.setComponentFocus(outlineLayoutManager.ICON);
tree.setComponentFocus(OutlineLayoutManager.ICON);
public void redo() { Node youngestNode = ((PrimitiveUndoableInsert) primitives.lastElement()).getNode(); TreeContext tree = youngestNode.getTree(); // Do all the Inserts tree.setSelectedNodesParent(parent); for (int i = primitives.size() - 1; i >= 0; i--) { ((PrimitiveUndoableInsert) primitives.elementAt(i)).redo(); } // Record the EditingNode tree.setEditingNode(youngestNode); tree.setComponentFocus(outlineLayoutManager.ICON); // Redraw and Set Focus tree.doc.panel.layout.draw(youngestNode,outlineLayoutManager.ICON); }
49473 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49473/2361eab2eca8fbf91d8b2ce4fb68e843e088736a/CompoundUndoableInsert.java/clean/outliner/src/com/organic/maynard/outliner/CompoundUndoableInsert.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 24524, 1435, 288, 202, 202, 907, 677, 465, 17592, 907, 273, 14015, 9840, 31224, 429, 4600, 13, 23376, 18, 2722, 1046, 1435, 2934, 588, 907, 5621, 202, 202, 2471, 1042, 2151...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 24524, 1435, 288, 202, 202, 907, 677, 465, 17592, 907, 273, 14015, 9840, 31224, 429, 4600, 13, 23376, 18, 2722, 1046, 1435, 2934, 588, 907, 5621, 202, 202, 2471, 1042, 2151...
protected void int2alphaCount(int val, char [] aTable, FastStringBuffer stringBuf) { int radix = aTable.length; char[] table = new char[aTable.length]; // start table at 1, add last char at index 0. Reason explained above and below. int i; for (i=0; i<aTable.length-1;i++) table[i+1] = aTable[i]; table[0] = aTable[i]; // Create a buffer to hold the result // TODO: size of the table can be detereined by computing // logs of the radix. For now, we fake it. char buf[] = new char[100]; //some languages go left to right(ie. english), right to left (ie. Hebrew), //top to bottom (ie.Japanese), etc... Handle them differently //String orientation = thisBundle.getString(Constants.LANG_ORIENTATION); // next character to set in the buffer int charPos; charPos= buf.length -1 ; // work backward through buf[] // index in table of the last character that we stored int lookupIndex = 1; // start off with anything other than zero to make correction work // Correction number // // Correction can take on exactly two values: // // 0 if the next character is to be emitted is usual // // radix - 1 // if the next char to be emitted should be one less than // you would expect // // For example, consider radix 10, where 1="A" and 10="J" // // In this scheme, we count: A, B, C ... H, I, J (not A0 and certainly // not AJ), A1 // // So, how do we keep from emitting AJ for 10? After correctly emitting the // J, lookupIndex is zero. We now compute a correction number of 9 (radix-1). // In the following line, we'll compute (val+correction) % radix, which is, // (val+9)/10. By this time, val is 1, so we compute (1+9) % 10, which // is 10 % 10 or zero. So, we'll prepare to emit "JJ", but then we'll // later suppress the leading J as representing zero (in the mod system, // it can represent either 10 or zero). In summary, the correction value of // "radix-1" acts like "-1" when run through the mod operator, but with the // desireable characteristic that it never produces a negative number. int correction = 0; // TODO: throw error on out of range input do { // most of the correction calculation is explained above, the reason for the // term after the "|| " is that it correctly propagates carries across // multiple columns. correction = ((lookupIndex == 0) || (correction != 0 && lookupIndex == radix-1 )) ? (radix-1) : 0; // index in "table" of the next char to emit lookupIndex = (val+correction) % radix; // shift input by one "column" val = (val / radix); // if the next value we'd put out would be a leading zero, we're done. if (lookupIndex == 0 && val == 0) break; // put out the next character of output buf[charPos--] = table[lookupIndex]; // left to right or top to bottom } while (val > 0); stringBuf.append(buf, charPos+1, (buf.length - charPos -1)); }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/77ad973f1d6ad8f28fd358f2ba4d4c63da65d953/ElemNumber.java/buggy/src/org/apache/xalan/templates/ElemNumber.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 509, 22, 5429, 1380, 12, 474, 1244, 16, 1149, 5378, 279, 1388, 16, 9545, 780, 1892, 533, 5503, 13, 225, 288, 565, 509, 19015, 273, 279, 1388, 18, 2469, 31, 565, 1149, 8526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 918, 509, 22, 5429, 1380, 12, 474, 1244, 16, 1149, 5378, 279, 1388, 16, 9545, 780, 1892, 533, 5503, 13, 225, 288, 565, 509, 19015, 273, 279, 1388, 18, 2469, 31, 565, 1149, 8526, ...
throw new RuntimeException("PRB is aborted");
throw new AbortedException("PRB is aborted");
public synchronized void addPacket(int position, Buffer packet) { if (_aborted) { throw new RuntimeException("PRB is aborted"); } if (packet.getLength() != _packetSize) { throw new RuntimeException("New packet size "+packet.getLength()+" but expecting packet of size "+_packetSize); } if (!_received[position]) { _receivedCount++; } packet.copyTo(_data, position * _packetSize); _received[position] = true; for (Iterator i = _packetReceivedListeners.iterator(); i.hasNext();) { PacketReceivedListener prl = (PacketReceivedListener) i.next(); prl.packetReceived(position); } }
48807 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48807/b4ecaa4055b5835413830d4125c72de27d68e306/PartiallyReceivedBlock.java/buggy/src/freenet/io/xfer/PartiallyReceivedBlock.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3852, 918, 527, 6667, 12, 474, 1754, 16, 3525, 4414, 13, 288, 202, 202, 430, 261, 67, 18623, 329, 13, 288, 1082, 202, 12849, 394, 3235, 2932, 8025, 38, 353, 18166, 8863, 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, 3852, 918, 527, 6667, 12, 474, 1754, 16, 3525, 4414, 13, 288, 202, 202, 430, 261, 67, 18623, 329, 13, 288, 1082, 202, 12849, 394, 3235, 2932, 8025, 38, 353, 18166, 8863, 202, ...
Scriptable scope = ScriptableObject.getTopLevelScope(ctorObj);
scope = ScriptableObject.getTopLevelScope(scope);
public static Object newWithSpecial(Context cx, Object[] args, Function ctorObj, boolean inNewExpr) { if (!inNewExpr) { throw Context.reportRuntimeError1("msg.only.from.new", "With"); } ScriptRuntime.checkDeprecated(cx, "With"); Scriptable scope = ScriptableObject.getTopLevelScope(ctorObj); NativeWith thisObj = new NativeWith(); thisObj.setPrototype(args.length == 0 ? ScriptableObject.getClassPrototype(scope, "Object") : ScriptRuntime.toObject(cx, scope, args[0])); thisObj.setParentScope(scope); return thisObj; }
54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/39e3557521a41fef2af8cad6f420cbc8e7d83654/NativeWith.java/buggy/js/rhino/src/org/mozilla/javascript/NativeWith.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 394, 1190, 12193, 12, 1042, 9494, 16, 1033, 8526, 833, 16, 4766, 3639, 4284, 15120, 2675, 16, 1250, 316, 1908, 4742, 13, 565, 288, 3639, 309, 16051, 267, 1908, 4742, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 1033, 394, 1190, 12193, 12, 1042, 9494, 16, 1033, 8526, 833, 16, 4766, 3639, 4284, 15120, 2675, 16, 1250, 316, 1908, 4742, 13, 565, 288, 3639, 309, 16051, 267, 1908, 4742, 13, ...
final int CHAR_ZERO = (int) '0'; final int CHAR_NINE = (int) '9'; final int CHAR_A = (int) 'a'; final int CHAR_F = (int) 'f'; final int CHAR_A_FACTOR = CHAR_A - 10;
public static int parseHexInt(String s, int index) throws IllegalArgumentException, NumberFormatException { // Check preconditions if (s == null) { throw new IllegalArgumentException("s == null"); } else if (s.length() < index + 8) { throw new IllegalArgumentException("s.length() (" + s.length() + ") < index (" + index + ") + 8 (" + (index + 8) + ')'); } int n = 0; final int CHAR_ZERO = (int) '0'; final int CHAR_NINE = (int) '9'; final int CHAR_A = (int) 'a'; final int CHAR_F = (int) 'f'; final int CHAR_A_FACTOR = CHAR_A - 10; // Loop through all characters int last = index + 8; for (int i = index; i < last; i++) { int c = (int) s.charAt(i); n <<= 4; if (c >= CHAR_ZERO && c <= CHAR_NINE) { n |= (c - CHAR_ZERO); } else if (c >= CHAR_A && c <= CHAR_F) { n |= (c - CHAR_A_FACTOR); } else { throw new NumberFormatException("s.charAt(" + i + ") == '" + s.charAt(i) + '\''); } } return n; }
45757 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45757/7c2716a4104a2f13ef4e509d411b341aa085925c/HexConverter.java/clean/src/java-common/org/xins/common/text/HexConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 760, 509, 1109, 7037, 1702, 12, 780, 272, 16, 509, 770, 13, 282, 1216, 2754, 16, 12100, 288, 1377, 368, 2073, 675, 6381, 1377, 309, 261, 87, 422, 446, 13, 288, 540, 604, 394, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 760, 509, 1109, 7037, 1702, 12, 780, 272, 16, 509, 770, 13, 282, 1216, 2754, 16, 12100, 288, 1377, 368, 2073, 675, 6381, 1377, 309, 261, 87, 422, 446, 13, 288, 540, 604, 394, 27...
this.encoding = encoding; }
this.encoding = encoding; }
public void setEncoding(String encoding) { this.encoding = encoding; }
4525 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4525/7b0e98412d3e2694e76904412b41e06eca60b866/XDocletTask.java/clean/xdoclet/src/main/java/org/xdoclet/ant/XDocletTask.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 4705, 12, 780, 2688, 13, 288, 3639, 333, 18, 5999, 273, 2688, 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, ...
[ 1, 1, 1, 1, 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, 377, 1071, 918, 444, 4705, 12, 780, 2688, 13, 288, 3639, 333, 18, 5999, 273, 2688, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if( !( selCtr == nSelectors ) ) {
if( !( selCtr == nSelectors ) ) {
private void sendMTFValues() throws IOException { char len[][] = new char[ N_GROUPS ][ MAX_ALPHA_SIZE ]; int v; int t; int i; int j; int gs; int ge; int totc; int bt; int bc; int iter; int nSelectors = 0; int alphaSize; int minLen; int maxLen; int selCtr; int nGroups; int nBytes; alphaSize = nInUse + 2; for( t = 0; t < N_GROUPS; t++ ) { for( v = 0; v < alphaSize; v++ ) { len[ t ][ v ] = (char)GREATER_ICOST; } } /* * Decide how many coding tables to use */ if( nMTF <= 0 ) { panic(); } if( nMTF < 200 ) { nGroups = 2; } else if( nMTF < 600 ) { nGroups = 3; } else if( nMTF < 1200 ) { nGroups = 4; } else if( nMTF < 2400 ) { nGroups = 5; } else { nGroups = 6; } { /* * Generate an initial set of coding tables */ int nPart; int remF; int tFreq; int aFreq; nPart = nGroups; remF = nMTF; gs = 0; while( nPart > 0 ) { tFreq = remF / nPart; ge = gs - 1; aFreq = 0; while( aFreq < tFreq && ge < alphaSize - 1 ) { ge++; aFreq += mtfFreq[ ge ]; } if( ge > gs && nPart != nGroups && nPart != 1 && ( ( nGroups - nPart ) % 2 == 1 ) ) { aFreq -= mtfFreq[ ge ]; ge--; } for( v = 0; v < alphaSize; v++ ) { if( v >= gs && v <= ge ) { len[ nPart - 1 ][ v ] = (char)LESSER_ICOST; } else { len[ nPart - 1 ][ v ] = (char)GREATER_ICOST; } } nPart--; gs = ge + 1; remF -= aFreq; } } int rfreq[][] = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ]; int fave[] = new int[ N_GROUPS ]; short cost[] = new short[ N_GROUPS ]; /* * Iterate up to N_ITERS times to improve the tables. */ for( iter = 0; iter < N_ITERS; iter++ ) { for( t = 0; t < nGroups; t++ ) { fave[ t ] = 0; } for( t = 0; t < nGroups; t++ ) { for( v = 0; v < alphaSize; v++ ) { rfreq[ t ][ v ] = 0; } } nSelectors = 0; totc = 0; gs = 0; while( true ) { /* * Set group start & end marks. */ if( gs >= nMTF ) { break; } ge = gs + G_SIZE - 1; if( ge >= nMTF ) { ge = nMTF - 1; } /* * Calculate the cost of this group as coded * by each of the coding tables. */ for( t = 0; t < nGroups; t++ ) { cost[ t ] = 0; } if( nGroups == 6 ) { short cost0; short cost1; short cost2; short cost3; short cost4; short cost5; cost0 = cost1 = cost2 = cost3 = cost4 = cost5 = 0; for( i = gs; i <= ge; i++ ) { short icv = szptr[ i ]; cost0 += len[ 0 ][ icv ]; cost1 += len[ 1 ][ icv ]; cost2 += len[ 2 ][ icv ]; cost3 += len[ 3 ][ icv ]; cost4 += len[ 4 ][ icv ]; cost5 += len[ 5 ][ icv ]; } cost[ 0 ] = cost0; cost[ 1 ] = cost1; cost[ 2 ] = cost2; cost[ 3 ] = cost3; cost[ 4 ] = cost4; cost[ 5 ] = cost5; } else { for( i = gs; i <= ge; i++ ) { short icv = szptr[ i ]; for( t = 0; t < nGroups; t++ ) { cost[ t ] += len[ t ][ icv ]; } } } /* * Find the coding table which is best for this group, * and record its identity in the selector table. */ bc = 999999999; bt = -1; for( t = 0; t < nGroups; t++ ) { if( cost[ t ] < bc ) { bc = cost[ t ]; bt = t; } } ; totc += bc; fave[ bt ]++; selector[ nSelectors ] = (char)bt; nSelectors++; /* * Increment the symbol frequencies for the selected table. */ for( i = gs; i <= ge; i++ ) { rfreq[ bt ][ szptr[ i ] ]++; } gs = ge + 1; } /* * Recompute the tables based on the accumulated frequencies. */ for( t = 0; t < nGroups; t++ ) { hbMakeCodeLengths( len[ t ], rfreq[ t ], alphaSize, 20 ); } } rfreq = null; fave = null; cost = null; if( !( nGroups < 8 ) ) { panic(); } if( !( nSelectors < 32768 && nSelectors <= ( 2 + ( 900000 / G_SIZE ) ) ) ) { panic(); } { /* * Compute MTF values for the selectors. */ char pos[] = new char[ N_GROUPS ]; char ll_i; char tmp2; char tmp; for( i = 0; i < nGroups; i++ ) { pos[ i ] = (char)i; } for( i = 0; i < nSelectors; i++ ) { ll_i = selector[ i ]; j = 0; tmp = pos[ j ]; while( ll_i != tmp ) { j++; tmp2 = tmp; tmp = pos[ j ]; pos[ j ] = tmp2; } pos[ 0 ] = tmp; selectorMtf[ i ] = (char)j; } } int code[][] = new int[ N_GROUPS ][ MAX_ALPHA_SIZE ]; /* * Assign actual codes for the tables. */ for( t = 0; t < nGroups; t++ ) { minLen = 32; maxLen = 0; for( i = 0; i < alphaSize; i++ ) { if( len[ t ][ i ] > maxLen ) { maxLen = len[ t ][ i ]; } if( len[ t ][ i ] < minLen ) { minLen = len[ t ][ i ]; } } if( maxLen > 20 ) { panic(); } if( minLen < 1 ) { panic(); } hbAssignCodes( code[ t ], len[ t ], minLen, maxLen, alphaSize ); } { /* * Transmit the mapping table. */ boolean inUse16[] = new boolean[ 16 ]; for( i = 0; i < 16; i++ ) { inUse16[ i ] = false; for( j = 0; j < 16; j++ ) { if( inUse[ i * 16 + j ] ) { inUse16[ i ] = true; } } } nBytes = bytesOut; for( i = 0; i < 16; i++ ) { if( inUse16[ i ] ) { bsW( 1, 1 ); } else { bsW( 1, 0 ); } } for( i = 0; i < 16; i++ ) { if( inUse16[ i ] ) { for( j = 0; j < 16; j++ ) { if( inUse[ i * 16 + j ] ) { bsW( 1, 1 ); } else { bsW( 1, 0 ); } } } } } /* * Now the selectors. */ nBytes = bytesOut; bsW( 3, nGroups ); bsW( 15, nSelectors ); for( i = 0; i < nSelectors; i++ ) { for( j = 0; j < selectorMtf[ i ]; j++ ) { bsW( 1, 1 ); } bsW( 1, 0 ); } /* * Now the coding tables. */ nBytes = bytesOut; for( t = 0; t < nGroups; t++ ) { int curr = len[ t ][ 0 ]; bsW( 5, curr ); for( i = 0; i < alphaSize; i++ ) { while( curr < len[ t ][ i ] ) { bsW( 2, 2 ); curr++; /* * 10 */ } while( curr > len[ t ][ i ] ) { bsW( 2, 3 ); curr--; /* * 11 */ } bsW( 1, 0 ); } } /* * And finally, the block data proper */ nBytes = bytesOut; selCtr = 0; gs = 0; while( true ) { if( gs >= nMTF ) { break; } ge = gs + G_SIZE - 1; if( ge >= nMTF ) { ge = nMTF - 1; } for( i = gs; i <= ge; i++ ) { bsW( len[ selector[ selCtr ] ][ szptr[ i ] ], code[ selector[ selCtr ] ][ szptr[ i ] ] ); } gs = ge + 1; selCtr++; } if( !( selCtr == nSelectors ) ) { panic(); } }
506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/bab9e2d799ee887bc0a404b4acdec0366234eafe/CBZip2OutputStream.java/buggy/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1366, 6152, 42, 1972, 1435, 3639, 1216, 1860, 565, 288, 3639, 1149, 562, 63, 6362, 65, 273, 394, 1149, 63, 423, 67, 28977, 308, 63, 4552, 67, 26313, 67, 4574, 308, 31, 3639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1366, 6152, 42, 1972, 1435, 3639, 1216, 1860, 565, 288, 3639, 1149, 562, 63, 6362, 65, 273, 394, 1149, 63, 423, 67, 28977, 308, 63, 4552, 67, 26313, 67, 4574, 308, 31, 3639, ...
} catch(BadLocationException ignored) {
} catch (BadLocationException ignored) {
public void paint(Graphics g) { super.paint(g); FileTextArea textArea = fileWindow.textArea; Font font = textArea.getFont(); g.setFont(font); FontMetrics metrics = getFontMetrics(font); Rectangle clip = g.getClipBounds(); g.setColor(getBackground()); g.fillRect(clip.x, clip.y, clip.width, clip.height); int left = getX(); int ascent = metrics.getMaxAscent(); int h = metrics.getHeight(); int lineCount = textArea.getLineCount() + 1; String dummy = Integer.toString(lineCount); if(dummy.length() < 2) { dummy = "99"; } int maxWidth = metrics.stringWidth(dummy); int startLine = clip.y / h; int endLine = (clip.y + clip.height) / h + 1; int width = getWidth(); if(endLine > lineCount) endLine = lineCount; for(int i = startLine; i < endLine; i++) { String text; int pos = -2; try { pos = textArea.getLineStartOffset(i); } catch(BadLocationException ignored) { } boolean isBreakPoint = false; if(fileWindow.breakpoints.get(new Integer(pos)) != null) { isBreakPoint = true; } text = Integer.toString(i + 1) + " "; int w = metrics.stringWidth(text); int y = i *h; g.setColor(Color.blue); g.drawString(text, 0, y + ascent); int x = width - ascent; if(isBreakPoint) { g.setColor(new Color(0x80, 0x00, 0x00)); int dy = y + ascent - 9; g.fillOval(x, dy, 9, 9); g.drawOval(x, dy, 8, 8); g.drawOval(x, dy, 9, 9); } if(pos == fileWindow.currentPos) { Polygon arrow = new Polygon(); int dx = x; y += ascent - 10; int dy = y; arrow.addPoint(dx, dy + 3); arrow.addPoint(dx + 5, dy + 3); for(x = dx + 5; x <= dx + 10; x++, y++) { arrow.addPoint(x, y); } for(x = dx + 9; x >= dx + 5; x--, y++) { arrow.addPoint(x, y); } arrow.addPoint(dx + 5, dy + 7); arrow.addPoint(dx, dy + 7); g.setColor(Color.yellow); g.fillPolygon(arrow); g.setColor(Color.black); g.drawPolygon(arrow); } } }
13991 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13991/b9766e81693411fa600b26b9a0763dcf621b2770/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 12574, 12, 17558, 314, 13, 288, 3639, 2240, 18, 84, 1598, 12, 75, 1769, 3639, 1387, 1528, 5484, 977, 5484, 273, 585, 3829, 18, 955, 5484, 31, 3639, 10063, 3512, 273, 977, 548...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12574, 12, 17558, 314, 13, 288, 3639, 2240, 18, 84, 1598, 12, 75, 1769, 3639, 1387, 1528, 5484, 977, 5484, 273, 585, 3829, 18, 955, 5484, 31, 3639, 10063, 3512, 273, 977, 548...
if (_objectList instanceof IBatchingList) { ((IBatchingList) _objectList).setSortOrderings(sortOrderings()); } super.setSortOrderings(sortOrderings); }
if (_objectList instanceof IBatchingList) { ((IBatchingList) _objectList).setSortOrderings(sortOrderings()); } super.setSortOrderings(sortOrderings); }
public void setSortOrderings(NSArray sortOrderings) { if (_objectList instanceof IBatchingList) { ((IBatchingList) _objectList).setSortOrderings(sortOrderings()); } super.setSortOrderings(sortOrderings); }
22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/391f3d79a584840cd9dc0dd4c780de38c3c9d9b1/ERXListDisplayGroup.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXListDisplayGroup.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 31460, 899, 12, 3156, 1076, 19050, 899, 13, 288, 565, 309, 261, 67, 1612, 682, 1276, 467, 4497, 310, 682, 13, 288, 1377, 14015, 45, 4497, 310, 682, 13, 389, 1612, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 31460, 899, 12, 3156, 1076, 19050, 899, 13, 288, 565, 309, 261, 67, 1612, 682, 1276, 467, 4497, 310, 682, 13, 288, 1377, 14015, 45, 4497, 310, 682, 13, 389, 1612, 682, ...
template = new ACLMessage(); template.setSource(wildCard); template.setDest(wildCard); template.setType(wildCard); template.setContent(wildCard); template.setReplyWith(wildCard); template.setReplyTo(wildCard); template.setEnvelope(wildCard); template.setLanguage(wildCard); template.setOntology(wildCard); template.setReplyBy(wildCard); template.setProtocol(wildCard); template.setConversationId(wildCard);
template = allWildCard();
private MessageTemplate() { template = new ACLMessage(); template.setSource(wildCard); template.setDest(wildCard); template.setType(wildCard); template.setContent(wildCard); template.setReplyWith(wildCard); template.setReplyTo(wildCard); template.setEnvelope(wildCard); template.setLanguage(wildCard); template.setOntology(wildCard); template.setReplyBy(wildCard); template.setProtocol(wildCard); template.setConversationId(wildCard); }
5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/bba7dc3def8ecd7887b926fbe328a9e97082b3d5/MessageTemplate.java/clean/src/jade/lang/acl/MessageTemplate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 2350, 2283, 1435, 288, 565, 1542, 273, 394, 10098, 1079, 5621, 565, 1542, 18, 542, 1830, 12, 91, 545, 6415, 1769, 565, 1542, 18, 542, 9378, 12, 91, 545, 6415, 1769, 565, 1542, 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, 3238, 2350, 2283, 1435, 288, 565, 1542, 273, 394, 10098, 1079, 5621, 565, 1542, 18, 542, 1830, 12, 91, 545, 6415, 1769, 565, 1542, 18, 542, 9378, 12, 91, 545, 6415, 1769, 565, 1542, 18,...
throw new KeyManagementException("identity is not found");
throw new KeyManagementException(Messages.getString("security.96"));
public synchronized void removeIdentity(Identity identity) throws KeyManagementException { //Exception catched = null; if (identity == null) { throw new NullPointerException("identity is null"); } String name = identity.getName(); if (name == null) { throw new NullPointerException("invalid identity's name"); } boolean contains = names.containsKey(name); names.remove(name); PublicKey key = identity.getPublicKey(); if (key != null) { contains = contains || keys.containsKey(key); keys.remove(key); } if (!contains) { throw new KeyManagementException("identity is not found"); } }
54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/c7fdc88348ff6da63262b6309c2810876f42c6d8/SystemScope.java/clean/modules/security/src/main/java/common/org/apache/harmony/security/SystemScope.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3852, 918, 1206, 4334, 12, 4334, 4215, 13, 5411, 1216, 1929, 10998, 503, 288, 3639, 368, 503, 1044, 329, 273, 446, 31, 3639, 309, 261, 10781, 422, 446, 13, 288, 5411, 604, 394, 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, 377, 1071, 3852, 918, 1206, 4334, 12, 4334, 4215, 13, 5411, 1216, 1929, 10998, 503, 288, 3639, 368, 503, 1044, 329, 273, 446, 31, 3639, 309, 261, 10781, 422, 446, 13, 288, 5411, 604, 394, 10...
field = new BooleanFieldImpl( Boolean.valueOf( value ).booleanValue() );
field = new ObjectFieldImpl( Boolean.valueOf( value ) );
public static FieldValue getFieldValue(final String value, ValueType valueType) { FieldValue field = null; if ( value == null ) { valueType = ValueType.NULL_TYPE; } if ( valueType == ValueType.NULL_TYPE ) { field = new ObjectFieldImpl( null ); } else if ( valueType == ValueType.CHAR_TYPE ) { field = new LongFieldImpl( value.charAt( 0 ) ); } else if ( valueType == ValueType.BYTE_TYPE ) { field = new LongFieldImpl( Long.parseLong( value ) ); } else if ( valueType == ValueType.SHORT_TYPE ) { field = new LongFieldImpl( Long.parseLong( value ) ); } else if ( valueType == ValueType.INTEGER_TYPE ) { field = new LongFieldImpl( Long.parseLong( stripNumericType( value ) ) ); } else if ( valueType == ValueType.LONG_TYPE ) { field = new LongFieldImpl( Long.parseLong( stripNumericType( value ) ) ); } else if ( valueType == ValueType.FLOAT_TYPE ) { field = new DoubleFieldImpl( Float.parseFloat( stripNumericType( value ) ) ); } else if ( valueType == ValueType.DOUBLE_TYPE ) { field = new DoubleFieldImpl( Double.parseDouble( stripNumericType( value ) ) ); } else if ( valueType == ValueType.BOOLEAN_TYPE ) { field = new BooleanFieldImpl( Boolean.valueOf( value ).booleanValue() ); } else if ( valueType == ValueType.STRING_TYPE ) { field = new ObjectFieldImpl( value.intern() ); } else if ( valueType == ValueType.DATE_TYPE ) { //MN: I think its fine like this, seems to work ! field = new ObjectFieldImpl( value ); } else if ( valueType == ValueType.ARRAY_TYPE ) { //MN: I think its fine like this. field = new ObjectFieldImpl( value ); } else if ( valueType == ValueType.OBJECT_TYPE ) { field = new ObjectFieldImpl( value ); } else if ( valueType == ValueType.BIG_DECIMAL_TYPE ) { field = new ObjectFieldImpl( new BigDecimal( value ) ); } else if ( valueType == ValueType.BIG_INTEGER_TYPE ) { field = new ObjectFieldImpl( new BigInteger( value ) ); } return field; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/93fd64d61101a9651da97426a9a5da8033ab5e71/FieldFactory.java/buggy/drools-core/src/main/java/org/drools/base/FieldFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 2286, 620, 26126, 12, 6385, 514, 460, 16, 4766, 6647, 31718, 13692, 13, 288, 3639, 2286, 620, 652, 273, 446, 31, 3639, 309, 261, 460, 422, 446, 262, 288, 5411, 13692, 273, 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, 760, 2286, 620, 26126, 12, 6385, 514, 460, 16, 4766, 6647, 31718, 13692, 13, 288, 3639, 2286, 620, 652, 273, 446, 31, 3639, 309, 261, 460, 422, 446, 262, 288, 5411, 13692, 273, 31...
this.comp = comp;
public GLightweightPeer(Component comp) { this.comp = comp; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/689d5f2ad7c7bd978a5121fea0fdc0a2cfaf1e3a/GLightweightPeer.java/clean/core/src/classpath/gnu/gnu/java/awt/peer/GLightweightPeer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 10252, 750, 4865, 6813, 12, 1841, 1161, 13, 225, 288, 1377, 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, 282, 1071, 10252, 750, 4865, 6813, 12, 1841, 1161, 13, 225, 288, 1377, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS,
filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS,
public void testCompareFilter() { DataQuery query = getDefaultQuery(); DataOperation operation = SessionManager.getSession() .retrieveDataOperation("examples.DataOperationWithBindVariablesAndNull"); operation.setParameter("priority", new Integer(3)); operation.setParameter("description", null); operation.execute(); query.addFilter("description is null"); long numberNull = query.size(); FilterFactory factory = query.getFilterFactory(); // test the EQUALS query = getDefaultQuery(); Filter filter = query.addFilter(factory.compare("upper(description)", FilterFactory.EQUALS, ":description")); filter.set("description", null); assert("The EQUALS filter with null should have returned " + numberNull + " but it actually returned " + query.size(), numberNull == query.size()); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.EQUALS, ":description")); filter.set("description", "Read item 0"); assert("The EQUALS filter should have returned zero rows. Instead " + "it returned " + query.size(), query.size() == 0); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.EQUALS, "upper(:description)")); filter.set("description", "Read item 0"); assert("The EQUALS filter should have returned one row. Instead " + "it returned " + query.size(), query.size() == 1); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.EQUALS, ":description")); filter.set("description", "READ ITEM 0"); assert("The EQUALS filter should have returned one row. Instead " + "it returned " + query.size(), query.size() == 1); // test the NOT_EQUALS query = getDefaultQuery(); long totalRows = query.size(); query = getDefaultQuery(); query.addFilter("description is not null"); long numberNotNull = query.size(); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS, ":description")); filter.set("description", null); assert("The NOT_EQUALS filter with null should have returned " + numberNotNull + " but it actually returned " + query.size(), numberNotNull == query.size()); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS, ":description")); filter.set("description", "Read item 0"); assert("The NOT_EQUALS filter should have returned " + totalRows + ". " + "Instead it returned " + query.size(), query.size() == totalRows); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS, "upper(:description)")); filter.set("description", "Read item 0"); assert("The NOT_EQUALS filter should have returned " + (totalRows - 1) + ". Instead it returned " + query.size(), query.size() == totalRows - 1); query = getDefaultQuery(); filter = query.addFilter(factory.compare("upper(description)", FilterFactory.NOT_EQUALS, ":description")); filter.set("description", "READ ITEM 0"); assert("The NOT_EQUALS filter should have returned " + (totalRows - 1) + ". Instead it returned " + query.size(), query.size() == totalRows - 1); /* // Still need to test the following filters System.out.println(factory.compare("upper(one)", FilterFactory.LESS_THAN, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.GREATER_THAN, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.LESS_THAN_EQUALS, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.GREATER_THAN_EQUALS, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.STARTS_WITH, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.ENDS_WITH, "upper(two)")); System.out.println(factory.compare("upper(one)", FilterFactory.CONTAINS, "upper(two)"));*/ } /** * We want to alllow developers to filter based on items * that are not selected from the DataQuery */ public void testFilterWithArbitraryVariables() { DataQuery dq = getSession().retrieveQuery("examples.DataQueryWithMax"); // This should be uncommented when people can filter by // variables not in their MAP statment /* assert("The query should return at least one line", dq.next()); BigDecimal maxPriority = (BigDecimal) dq.get("priority"); // s_log.info("XXXX the priroity is " + maxPriority); assert("The query should only return one line", !dq.next()); dq = getSession().retrieveQuery("examples.DataQueryWithMax"); dq.addEqualsFilter("action", "write"); assert("The query should return at least one line", dq.next()); // s_log.info("YYYYY...The item from the filter = " + (BigDecimal) dq.get("priority")); assert("The query should only return one line", !dq.next()); dq = getSession().retrieveQuery("examples.DataQueryWithMax"); dq.addEqualsFilter("action", "read"); assert("The query should return at least one line", dq.next()); // s_log.info("YYYYY...The item from the filter = " + (BigDecimal) dq.get("priority")); assert("The query should only return one line", !dq.next()); */ }
12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/558097820abc0198518796cedde797658cda9a5e/FilterTest.java/buggy/archive/core-platform/test/src/com/arsdigita/persistence/FilterTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 8583, 1586, 1435, 288, 1171, 1910, 1138, 843, 273, 4829, 1138, 5621, 3639, 1910, 2988, 1674, 273, 3877, 1318, 18, 588, 2157, 1435, 5411, 263, 17466, 751, 2988, 2932, 16858,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8583, 1586, 1435, 288, 1171, 1910, 1138, 843, 273, 4829, 1138, 5621, 3639, 1910, 2988, 1674, 273, 3877, 1318, 18, 588, 2157, 1435, 5411, 263, 17466, 751, 2988, 2932, 16858,...
return LogicResourceManager.getInstance().getString("logic.Shape.Label");
return ExampleDiagramLogicMessages.logic_Shape_Label;
public static String getShapeLabel( String toGet ) { if( toGet.equals( TOOL_LED ) ) return LogicResourceManager.getInstance().getString("logic.LEDTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_FLOWCONTAINER ) ) return LogicResourceManager.getInstance().getString("logic.LogicFlowTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_CIRCUIT ) ) return LogicResourceManager.getInstance().getString("logic.CircuitTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_ORGATE ) ) return LogicResourceManager.getInstance().getString("logic.OrGateTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_ANDGATE ) ) return LogicResourceManager.getInstance().getString("logic.AndGateTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_XORGATE ) ) return LogicResourceManager.getInstance().getString("logic.XORGateTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_HALFADDER ) ) return LogicResourceManager.getInstance().getString("logic.HalfAdderTool.Label"); //$NON-NLS-1$ if( toGet.equals( TOOL_FULLADDER ) ) return LogicResourceManager.getInstance().getString("logic.FullAdderTool.Label"); //$NON-NLS-1$ return LogicResourceManager.getInstance().getString("logic.Shape.Label"); //$NON-NLS-1$ }
1758 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1758/e66f9c3483db21ee776650f0e5341a7a370f06cb/LogicConstants.java/clean/org.eclipse.gmf.runtime/examples/org.eclipse.gmf.examples.runtime.diagram.logic/src/org/eclipse/gmf/examples/runtime/diagram/logic/internal/providers/LogicConstants.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 1322, 6560, 2224, 12, 514, 358, 967, 262, 288, 9506, 202, 430, 12, 358, 967, 18, 14963, 12, 8493, 1741, 67, 6687, 262, 262, 1082, 202, 2463, 10287, 1420, 1318, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 514, 1322, 6560, 2224, 12, 514, 358, 967, 262, 288, 9506, 202, 430, 12, 358, 967, 18, 14963, 12, 8493, 1741, 67, 6687, 262, 262, 1082, 202, 2463, 10287, 1420, 1318, 18, ...
String str = "NOT YET"; /* str += ((accessFlags & I_CmsConstants.C_PERMISSION_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_PERMISSION_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_PERMISSION_VIEW)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_VISIBLE)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_VISIBLE)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_INTERNAL_READ)>0?"i":"-"); */ return str;
int accessFlags = getAccessFlags(); StringBuffer buf = new StringBuffer(); buf.append(((accessFlags & I_CmsExtendedContentDefinition.C_PERMISSION_READ) > 0 ? "r" : "-")); buf.append(((accessFlags & I_CmsExtendedContentDefinition.C_PERMISSION_WRITE) > 0 ? "w" : "-")); buf.append(((accessFlags & I_CmsExtendedContentDefinition.C_PERMISSION_VIEW) > 0 ? "v" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_GROUP_READ) > 0 ? "r" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_GROUP_WRITE) > 0 ? "w" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_GROUP_VISIBLE) > 0 ? "v" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_READ) > 0 ? "r" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_WRITE) > 0 ? "w" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_VISIBLE) > 0 ? "v" : "-")); buf.append(((accessFlags & I_CmsConstants.C_ACCESS_INTERNAL_READ) > 0 ? "i" : "-")); return buf.toString();
public String getAccessFlagsAsString() {// int accessFlags = m_channel.getAccessFlags(); String str = "NOT YET"; // TODO: reimplement using acl /* str += ((accessFlags & I_CmsConstants.C_PERMISSION_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_PERMISSION_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_PERMISSION_VIEW)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_GROUP_VISIBLE)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_READ)>0?"r":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_WRITE)>0?"w":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_PUBLIC_VISIBLE)>0?"v":"-"); str += ((accessFlags & I_CmsConstants.C_ACCESS_INTERNAL_READ)>0?"i":"-"); */ return str; }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/7ccf868bf5ddd5fe0f7e2765b33624f51fd7abcf/CmsChannelContent.java/buggy/src/com/opencms/defaults/master/CmsChannelContent.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 21909, 5094, 8092, 1435, 288, 759, 3639, 509, 2006, 5094, 273, 312, 67, 4327, 18, 588, 1862, 5094, 5621, 3639, 514, 609, 273, 315, 4400, 1624, 1584, 14432, 3639, 368, 2660, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 21909, 5094, 8092, 1435, 288, 759, 3639, 509, 2006, 5094, 273, 312, 67, 4327, 18, 588, 1862, 5094, 5621, 3639, 514, 609, 273, 315, 4400, 1624, 1584, 14432, 3639, 368, 2660, 30,...
orb.currents.remove(Thread.currentThread());
if (intercept) { Forwarding: while (true) { info.m_reply_header.reply_status = ReplyHeader.LOCATION_FORWARD; info.m_forward_reference = fex.forward; try { interceptor.send_other(info); break Forwarding; } catch (ForwardRequest fex2) { info.m_forward_reference = fex2.forward; fex.forward = info.m_forward_reference; } } } throw new gnuForwardRequest(fex.forward); } catch (gnuForwardRequest fex) { if (intercept) { Forwarding: while (true) { info.m_reply_header.reply_status = ReplyHeader.LOCATION_FORWARD; info.m_forward_reference = fex.forward_reference; try { interceptor.send_other(info); break Forwarding; } catch (ForwardRequest fex2) { info.m_forward_reference = fex2.forward; fex.forward_reference = (ObjectImpl) fex2.forward; } } } throw fex;
public OutputStream _invoke(String method, InputStream input, ResponseHandler r_handler ) throws SystemException { try { CookieHolder cookie = null; activeObjectMap.Obj self = poa.aom.get(Id); if (poa.servant_locator != null) { // If the servant locator is in use, it is always responsible // for providing the servant. self.servant = servant = null; cookie = new CookieHolder(); } else if (self != null && self.isDeactiveted()) { if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) && poa.servant_activator != null ) { // Reset the servant, forcing the subsequent activation. servant = null; } else throw new OBJECT_NOT_EXIST("Object deactivated", 0x535503ec, CompletionStatus.COMPLETED_NO ); } InvokeHandler handler = getHandler(method, cookie, true); Delegate d = null; try { d = servant._get_delegate(); orb.currents.put(Thread.currentThread(), this); } catch (Exception ex) { // In some cases exception is thrown if the delegate is not set. } if (d instanceof servantDelegate) { // If the delegate is already set, check maybe we can // reuse the existing instance. if (((servantDelegate) d).object != this) servant._set_delegate(new servantDelegate(servant, poa, Id)); } else { servant._set_delegate(new servantDelegate(servant, poa, Id)); } try { switch (manager.get_state().value()) { case State._ACTIVE : return handler._invoke(method, input, r_handler); case State._HOLDING : // The holding mode is implemented // relying on the holding capabilites of the network // support (if any). // TODO FIXME in more recent CORBA applications, the client // ORB can free the connection and wait for a server side // notification about the completed request. Implement this. int sleep = 5; int max = 500; // Wait till the state will be switched into some other // mode. while (manager.get_state().value() == State._HOLDING) { try { Thread.sleep(sleep); if (sleep < max) sleep = max; } catch (InterruptedException ex) { } } // Handle another mode. return _invoke(method, input, r_handler); case State._DISCARDING : throw new TRANSIENT("Discarding mode", 0x535503e9, CompletionStatus.COMPLETED_NO ); case State._INACTIVE : throw new OBJ_ADAPTER("POA deactivated", 0x535503ea, CompletionStatus.COMPLETED_NO ); default : throw new InternalError(); // No more states. } } finally { if (poa.servant_locator != null) { poa.servant_locator.postinvoke(Id, poa, method, cookie.value, servant ); servant = null; } } } finally { orb.currents.remove(Thread.currentThread()); } }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/d03b7ded9dacd5a74a8420d7dade451079b17d89/gnuServantObject.java/buggy/libraries/javalib/gnu/CORBA/Poa/gnuServantObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8962, 389, 14407, 12, 780, 707, 16, 5037, 810, 16, 17311, 2306, 1503, 436, 67, 4176, 11794, 262, 15604, 1216, 26731, 225, 288, 565, 775, 1377, 288, 3639, 10201, 6064, 3878, 273, 446...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 8962, 389, 14407, 12, 780, 707, 16, 5037, 810, 16, 17311, 2306, 1503, 436, 67, 4176, 11794, 262, 15604, 1216, 26731, 225, 288, 565, 775, 1377, 288, 3639, 10201, 6064, 3878, 273, 446...
if (sym == Symbol.NONE) print("<local>.this");
public SymbolTablePrinter printCommonPart(Type type) { switch (type) { case ErrorType: print("<error>"); return this; case AnyType: print("<any type>"); return this; case NoType: print("<notype>"); return this; case ThisType(Symbol sym): if (sym == Symbol.NONE) print("<local>.this"); if ((sym.isAnonymousClass() || sym.isCompoundSym()) && !global.debug) print("this"); printUsedSymbolName(sym); print(".this"); // vincent return this; case TypeRef(Type pre, Symbol sym, Type[] args): if (!global.debug) { if (type.isFunctionType()) { printFunctionType(args); return this; } if (sym.isAnonymousClass() || sym.isCompoundSym()) printTemplateType(pre.memberInfo(sym).parents()); } printPrefix(pre, sym); printUsedSymbolName(sym); if (args.length != 0) { print('['); printTypes(args, ","); print(']'); } return this; case SingleType(Type pre, Symbol sym): printPrefix(pre, sym); printUsedSymbolName(sym); return this; case ConstantType(Type base, AConstant value): printType(base);// print("(");// print(value.toString());// print(")"); return this; case CompoundType(Type[] parts, Scope members): printTypes(parts," with "); space(); return printScope(members, true); // vincent case MethodType(_, _): return printType0(type); case PolyType(_, _): return printType0(type); case OverloadedType(Symbol[] alts, Type[] alttypes): return printTypes(alttypes, " <and> "); case TypeVar(Type origin, Constraint constr): printType(origin); print("?"); return this; case UnboxedType(int kind): print(type.unboxedName(kind).toString()); return this; case UnboxedArrayType(Type elemtp): printType(elemtp); print("[]"); return this; case LazyType(): if (!global.debug) print("?"); String classname = type.getClass().getName(); print("<lazy type ").print(classname).print(">"); return this; default: String classname = type.getClass().getName(); print("<unknown type ").print(classname).print(">"); return this; } }
5590 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5590/bb210ac523be4ae6d5883e7d66598bb41403b58b/SymbolTablePrinter.java/buggy/sources/scala/tools/scaladoc/SymbolTablePrinter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 8565, 1388, 12149, 1172, 6517, 1988, 12, 559, 618, 13, 288, 3639, 1620, 261, 723, 13, 288, 202, 3593, 1068, 559, 30, 202, 565, 1172, 2932, 32, 1636, 2984, 1769, 5411, 327, 333, 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, 8565, 1388, 12149, 1172, 6517, 1988, 12, 559, 618, 13, 288, 3639, 1620, 261, 723, 13, 288, 202, 3593, 1068, 559, 30, 202, 565, 1172, 2932, 32, 1636, 2984, 1769, 5411, 327, 333, 31...
public String toString() { final String lineSeparator = System.getProperty( "line.separator" ); final String brace = ": "; final StringBuffer sb = new StringBuffer( SPECIFICATION_TITLE.toString() ); sb.append( brace ); sb.append( m_specificationTitle ); sb.append( lineSeparator ); if( null != m_specificationVersion ) { sb.append( SPECIFICATION_VERSION ); sb.append( brace ); sb.append( m_specificationVersion ); sb.append( lineSeparator ); } if( null != m_specificationVendor ) { sb.append( SPECIFICATION_VENDOR ); sb.append( brace ); sb.append( m_specificationVendor ); sb.append( lineSeparator ); } if( null != m_implementationTitle ) { sb.append( IMPLEMENTATION_TITLE ); sb.append( brace ); sb.append( m_implementationTitle ); sb.append( lineSeparator ); } if( null != m_implementationVersion ) { sb.append( IMPLEMENTATION_VERSION ); sb.append( brace ); sb.append( m_implementationVersion ); sb.append( lineSeparator ); } if( null != m_implementationVendor ) { sb.append( IMPLEMENTATION_VENDOR ); sb.append( brace ); sb.append( m_implementationVendor ); sb.append( lineSeparator ); } return sb.toString(); }
2044 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2044/e622ff134f94da7c133006a05d0aab68115a1013/Specification.java/clean/loom/support/extension/src/java/org/realityforge/extension/Specification.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 780, 10492, 1435, 95, 6385, 780, 1369, 6581, 33, 3163, 18, 588, 1396, 2932, 1369, 18, 11287, 8863, 6385, 780, 70, 9963, 1546, 2773, 31, 6385, 780, 13699, 70, 33, 2704, 780, 1892, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 780, 10492, 1435, 95, 6385, 780, 1369, 6581, 33, 3163, 18, 588, 1396, 2932, 1369, 18, 11287, 8863, 6385, 780, 70, 9963, 1546, 2773, 31, 6385, 780, 13699, 70, 33, 2704, 780, 1892, 12, 1...
_cnt1285++;
_cnt1286++;
public final void grant_rev_opt(AST _t) throws RecognitionException { AST grant_rev_opt_AST_in = (_t == ASTNULL) ? null : (AST)_t; if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ALL: { AST __t1277 = _t; AST tmp1729_AST_in = (AST)_t; match(_t,ALL); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVILEGES: { AST tmp1730_AST_in = (AST)_t; match(_t,PRIVILEGES); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1277; _t = _t.getNextSibling(); break; } case DELETE_KW: case INSERT: case SELECT: case UPDATE: case COMMA: { { int _cnt1285=0; _loop1285: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case SELECT: { AST tmp1731_AST_in = (AST)_t; match(_t,SELECT); _t = _t.getNextSibling(); break; } case INSERT: { AST tmp1732_AST_in = (AST)_t; match(_t,INSERT); _t = _t.getNextSibling(); break; } case DELETE_KW: { AST tmp1733_AST_in = (AST)_t; match(_t,DELETE_KW); _t = _t.getNextSibling(); break; } case UPDATE: { AST __t1280 = _t; AST tmp1734_AST_in = (AST)_t; match(_t,UPDATE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case Field_list: { AST __t1282 = _t; AST tmp1735_AST_in = (AST)_t; match(_t,Field_list); _t = _t.getFirstChild(); AST tmp1736_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); fld(_t,CQ.UPDATING); _t = _retTree; { _loop1284: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1737_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); fld(_t,CQ.UPDATING); _t = _retTree; } else { break _loop1284; } } while (true); } AST tmp1738_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t1282; _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1280; _t = _t.getNextSibling(); break; } case COMMA: { AST tmp1739_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); break; } default: { if ( _cnt1285>=1 ) { break _loop1285; } else {throw new NoViableAltException(_t);} } } _cnt1285++; } while (true); } break; } default: { throw new NoViableAltException(_t); } } _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, 7936, 67, 9083, 67, 3838, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 7936, 67, 9083, 67, 3838, 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, 7936, 67, 9083, 67, 3838, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 7936, 67, 9083, 67, 3838, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, ...
splitPane.setBottomComponent(attachmentScrollPane);
splitPane.setBottomComponent(attachmentDisplayPanel);
public void configureMessageDisplay() throws MessagingException { editorPane = new JTextPane(); editorPane.setEditable(false); editorPane.addHyperlinkListener(new HyperlinkDispatcher()); HyperlinkMouseHandler hmh = new HyperlinkMouseHandler(Integer.parseInt(Pooka.getProperty("Pooka.lineLength", "80"))); editorPane.addMouseListener(hmh); editorPane.addMouseMotionListener(hmh); editorScrollPane = new JScrollPane(editorPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); setDefaultFont(editorPane); // temp otherEditorPane = new JTextPane(); otherEditorPane.setEditable(false); otherEditorPane.addHyperlinkListener(new HyperlinkDispatcher()); otherEditorPane.addMouseListener(hmh); otherEditorPane.addMouseMotionListener(hmh); otherScrollPane = new JScrollPane(otherEditorPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); setDefaultFont(otherEditorPane); splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); attachmentScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); splitPane.setTopComponent(otherScrollPane); splitPane.setBottomComponent(attachmentScrollPane); this.add(WITH_ATTACHMENTS, splitPane); this.add(WITHOUT_ATTACHMENTS, editorScrollPane); keyBindings = new ConfigurableKeyBinding(this, "ReadMessageWindow.keyBindings", Pooka.getResources()); keyBindings.setActive(getActions()); editorPane.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu(editorPane, e); } } public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu(editorPane, e); } } }); if (getMessageProxy() != null) { resetEditorText(); } else { ((CardLayout)getLayout()).show(this, WITHOUT_ATTACHMENTS); editorStatus = WITHOUT_ATTACHMENTS; } }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/008aba5c98c78f2bc85f85815abc448e0914f0b9/ReadMessageDisplayPanel.java/buggy/net/suberic/pooka/gui/ReadMessageDisplayPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 5068, 1079, 4236, 1435, 1216, 23794, 503, 288, 565, 4858, 8485, 273, 394, 804, 1528, 8485, 5621, 565, 4858, 8485, 18, 542, 15470, 12, 5743, 1769, 565, 4858, 8485, 18, 1289, 159...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5068, 1079, 4236, 1435, 1216, 23794, 503, 288, 565, 4858, 8485, 273, 394, 804, 1528, 8485, 5621, 565, 4858, 8485, 18, 542, 15470, 12, 5743, 1769, 565, 4858, 8485, 18, 1289, 159...
throws Exception
throws ReportWriteException
public List execute( List artifacts, ArtifactRepository sourceRepo, ArtifactRepository targetRepo, RepositoryCleanerConfiguration configuration, File reportsBase, Reporter repoReporter ) throws Exception { Logger logger = getLogger(); List rewritten = new ArrayList(); File sourceBase = new File( new URL( sourceRepo.getUrl() ).getPath() ); File targetBase = new File( new URL( targetRepo.getUrl() ).getPath() ); for ( Iterator it = artifacts.iterator(); it.hasNext(); ) { Artifact artifact = (Artifact) it.next(); RewriteTransaction transaction = new RewriteTransaction( artifact ); String artifactReportPath = buildArtifactReportPath( artifact ); FileReporter artifactReporter = null; try { artifactReporter = new FileReporter( reportsBase, artifactReportPath ); boolean errorOccurred = false; File artifactSource = new File( sourceRepo.getBasedir(), sourceRepo.pathOf( artifact ) ); File artifactTarget = new File( targetRepo.getBasedir(), targetRepo.pathOf( artifact ).replace( '+', '-' ) ); transaction.addFile( artifactTarget ); artifact.setFile( artifactSource ); boolean targetMissingOrOlder = !artifactTarget.exists() || artifactTarget.lastModified() < artifactSource.lastModified(); if ( artifactSource.exists() && ( configuration.force() || targetMissingOrOlder ) ) { transaction.addFile( artifactTarget ); try { if ( !configuration.reportOnly() ) { if ( logger.isDebugEnabled() ) { logger.debug( "sourceRepo basedir is: \'" + sourceRepo.getBasedir() + "\'" ); logger.debug( "targetRepo basedir is: \'" + targetRepo.getBasedir() + "\'" ); } File targetParent = artifactTarget.getParentFile(); if ( !targetParent.exists() ) { targetParent.mkdirs(); } if ( logger.isDebugEnabled() ) { logger.debug( "Copying artifact[" + artifact.getId() + "] from \'" + artifactSource + "\' to \'" + artifactTarget + "\'." ); } copyArtifact( artifact, artifactTarget, artifactReporter ); } } catch ( Exception e ) { repoReporter.error( "Error transferring artifact[" + artifact.getId() + "] to the target repository.", e ); throw e; } if ( logger.isDebugEnabled() ) { logger.debug( "working on digest for artifact[" + artifact.getId() + "] with groupId: \'" + artifact.getGroupId() + "\'" ); } try { digestVerifier.verifyDigest( artifactSource, artifactTarget, transaction, artifactReporter, configuration.reportOnly() ); } catch ( Exception e ) { repoReporter.error( "Error verifying digest for artifact[" + artifact.getId() + "]", e ); throw e; } try { rewriteMetadata( artifact, transaction, sourceBase, sourceRepo, targetBase, targetRepo, artifactReporter, configuration.reportOnly() ); } catch ( Exception e ) { repoReporter.error( "Error rewriting POM for artifact[" + artifact.getId() + "] into the target repository.\n Error message: " + e.getMessage() ); throw e; } rewritten.add( artifact ); } else if ( !targetMissingOrOlder ) { artifactReporter.warn( "Target file for artifact is present and not stale. (Artifact: \'" + artifact.getId() + "\' in path: \'" + artifactSource + "\' with target path: " + artifactTarget + ")." ); } else { artifactReporter.error( "Cannot find source file for artifact: \'" + artifact.getId() + "\' under path: \'" + artifactSource + "\'" ); } if ( artifactReporter.hasError() ) { repoReporter.warn( "Error(s) occurred while rewriting artifact: \'" + artifact.getId() + "\' or its POM." ); } } catch ( Exception e ) { if ( !configuration.force() ) { repoReporter.warn( "Rolling back conversion for: " + artifact ); try { transaction.rollback(); } catch ( RollbackException re ) { repoReporter.error( "Error rolling back conversion transaction.", re ); } } else { repoReporter.warn( "NOT Rolling back conversion for: " + artifact + "; we are in --force mode." ); } artifactReporter.error( "Error while rewriting file or POM for artifact: \'" + artifact.getId() + "\'. See report at: \'" + artifactReportPath + "\'.", e ); } finally { if ( artifactReporter != null ) { artifactReporter.close(); } } } logger.info( "Actual number of artifacts rewritten: " + rewritten.size() + " (" + ( rewritten.size() * 2 ) + " including POMs)." ); return rewritten; }
47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/0db2b646d23049f80b0beb13c4c45740172fcab7/RewritePhase.java/buggy/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 1836, 12, 987, 16259, 16, 14022, 3305, 1084, 8791, 16, 14022, 3305, 1018, 8791, 16, 13491, 6281, 7605, 264, 1750, 1664, 16, 1387, 10557, 2171, 16, 25585, 3538, 13289, 262, 3639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 1836, 12, 987, 16259, 16, 14022, 3305, 1084, 8791, 16, 14022, 3305, 1018, 8791, 16, 13491, 6281, 7605, 264, 1750, 1664, 16, 1387, 10557, 2171, 16, 25585, 3538, 13289, 262, 3639, ...
public void testR2BaseEchoStructArray() throws AxisFault {
public void testR2BaseEchoStructArray() throws AxisFault {
public void testR2BaseEchoStructArray() throws AxisFault { url = "http://explorer.ne.mediaone.net/app/interop/interop"; soapAction = "http://soapinterop.org/"; util = new Round2EchoStructArrayClientUtil(); retEnv = SunRound2Client.sendMsg(util, url, soapAction); tempPath = resFilePath + "sunBaseStructArrayRes.xml"; compareXML(retEnv, tempPath); }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/95f09abc768fee06d65b12836e31273ac0e15eb3/SSRound2InteropTest.java/clean/modules/integration/itest/test/interop/whitemesa/round2/SSRound2InteropTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 54, 22, 2171, 19704, 3823, 1076, 1435, 1216, 15509, 7083, 288, 3639, 880, 273, 315, 2505, 2207, 338, 11766, 18, 4644, 18, 5829, 476, 18, 2758, 19, 2910, 19, 30376, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3823, 1076, 1435, 1216, 15509, 7083, 288, 3639, 880, 273, 315, 2505, 2207, 338, 11766, 18, 4644, 18, 5829, 476, 18, 2758, 19, 2910, 19, 30376, 19, ...
System.out.println( databaseProductName() );
public SAPDBPlugIn( JDBCAdaptor theAdaptor) { super( theAdaptor ); //TODO Remove this debug System.out.println( databaseProductName() ); }
22541 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22541/0f772c85947a30db6ca447cbb05141b20531b803/SAPDBPlugIn.java/buggy/Experimental/SAPDB_PlugIns/Pure/SAPDBPlugIn.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1071, 348, 2203, 2290, 1749, 637, 382, 12, 16364, 29888, 326, 29888, 13, 288, 3639, 2240, 12, 326, 29888, 11272, 7734, 368, 6241, 3581, 333, 1198, 540, 289, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1071, 348, 2203, 2290, 1749, 637, 382, 12, 16364, 29888, 326, 29888, 13, 288, 3639, 2240, 12, 326, 29888, 11272, 7734, 368, 6241, 3581, 333, 1198, 540, 289, 2, -100, -100, -100, -100, -10...
&& overallMoveType == IEntityMovementType.MOVE_RUN
&& (overallMoveType == IEntityMovementType.MOVE_RUN || overallMoveType == IEntityMovementType.MOVE_VTOL_RUN)
public PilotingRollData checkSideSlip(int moveType, IHex prevHex, int overallMoveType, MoveStep prevStep, int prevFacing, int curFacing, Coords lastPos, Coords curPos, int distance) { PilotingRollData roll = getBasePilotingRoll(); // TODO: add check for elevation of pavement, road, // or bridge matches entity elevation. if (moveType != IEntityMovementType.MOVE_JUMP && prevHex != null /* Bug 754610: Revert fix for bug 702735. && ( prevHex.contains(Terrain.PAVEMENT) || prevHex.contains(Terrain.ROAD) || prevHex.contains(Terrain.BRIDGE) ) */ && overallMoveType == IEntityMovementType.MOVE_RUN && prevFacing != curFacing && !lastPos.equals(curPos)) { roll.append(new PilotingRollData(getId(), 0, "VTOL flanking and turning"));//is there a mod on this roll? } else { roll.addModifier(TargetRoll.CHECK_FALSE,"Check false: VTOL is not apparently sideslipping"); } return roll; }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/463e6c6add9a0b9291900bf5c47f02d2563451e5/VTOL.java/clean/megamek/src/megamek/common/VTOL.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 453, 330, 17128, 24194, 751, 866, 8895, 55, 3169, 12, 474, 3635, 559, 16, 467, 7037, 2807, 7037, 16, 5411, 509, 13914, 7607, 559, 16, 9933, 4160, 2807, 4160, 16, 5411, 509, 2807, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 453, 330, 17128, 24194, 751, 866, 8895, 55, 3169, 12, 474, 3635, 559, 16, 467, 7037, 2807, 7037, 16, 5411, 509, 13914, 7607, 559, 16, 9933, 4160, 2807, 4160, 16, 5411, 509, 2807, ...
if (i == 0) extent = w - adjustFirst; else extent = w - adjust;
if (i == 0) { extent = w - adjustFirst; } else { extent = w - adjust; }
private Composite createInfoArea(Composite parent) { // Create the title area which will contain // a title, message, and image. this.scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); this.scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); final Composite infoArea = new Composite(this.scrolledComposite, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = 10; layout.verticalSpacing = 5; layout.numColumns = 2; infoArea.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); infoArea.setLayoutData(data); boolean wrapped = parser.isFormatWrapped(); int HINDENT = 20; // Get the background color for the title area Display display = parent.getDisplay(); Color background = JFaceColors.getBannerBackground(display); Color foreground = JFaceColors.getBannerForeground(display); infoArea.setBackground(background); int textStyle = SWT.MULTI | SWT.READ_ONLY; if (wrapped) { textStyle = textStyle | SWT.WRAP; } StyledText sampleStyledText = null; // Create the intro item WelcomeItem item = getIntroItem(); if (item != null) { StyledText styledText = new StyledText(infoArea, textStyle); this.texts.add(styledText); sampleStyledText = styledText; styledText.setCursor(null); JFaceColors.setColors(styledText, foreground, background); styledText.setText(getIntroItem().getText()); setBoldRanges(styledText, item.getBoldRanges()); setLinkRanges(styledText, item.getActionRanges()); setLinkRanges(styledText, item.getHelpRanges()); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; gd.horizontalIndent = HINDENT; gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; styledText.setLayoutData(gd); styledText.setData(item); addListeners(styledText); Label spacer = new Label(infoArea, SWT.NONE); spacer.setBackground(background); gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.horizontalSpan = 2; spacer.setLayoutData(gd); } firstText = sampleStyledText; // Create the welcome items Label imageLabel = null; WelcomeItem[] items = getItems(); for (int i = 0; i < items.length; i++) { Label label = new Label(infoArea, SWT.NONE); label.setBackground(background); label .setImage(PlatformUI .getWorkbench() .getSharedImages() .getImage( IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_ITEM)); GridData gd = new GridData(); gd.horizontalIndent = HINDENT; gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; label.setLayoutData(gd); if (imageLabel == null) { imageLabel = label; } StyledText styledText = new StyledText(infoArea, textStyle); this.texts.add(styledText); sampleStyledText = styledText; styledText.setCursor(null); JFaceColors.setColors(styledText, foreground, background); styledText.setText(items[i].getText()); setBoldRanges(styledText, items[i].getBoldRanges()); setLinkRanges(styledText, items[i].getActionRanges()); setLinkRanges(styledText, items[i].getHelpRanges()); gd = new GridData(GridData.FILL_HORIZONTAL); gd.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; gd.verticalSpan = 2; styledText.setLayoutData(gd); styledText.setData(items[i]); addListeners(styledText); Label spacer = new Label(infoArea, SWT.NONE); spacer.setBackground(background); gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.horizontalSpan = 2; spacer.setLayoutData(gd); // create context menu MenuManager menuMgr = new MenuManager("#PopUp"); //$NON-NLS-1$ menuMgr.add(copyAction); styledText.setMenu(menuMgr.createContextMenu(styledText)); } lastText = sampleStyledText; this.scrolledComposite.setContent(infoArea); Point p = infoArea.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); this.scrolledComposite.setMinHeight(p.y); if (wrapped) { // introduce a horizontal scroll bar after a minimum width is reached this.scrolledComposite.setMinWidth(WRAP_MIN_WIDTH); } else { this.scrolledComposite.setMinWidth(p.x); } this.scrolledComposite.setExpandHorizontal(true); this.scrolledComposite.setExpandVertical(true); // When the welcome editor is resized, we need to set the width hint for // wrapped StyledText widgets so that the wrapped height will be recalculated. if (wrapped && (imageLabel != null)) { // figure out how wide the StyledText widgets should be, do this by first // calculating the width of the area not used by styled text widgets Rectangle bounds = imageLabel.getBounds(); final int adjust = HINDENT + bounds.width + layout.verticalSpacing + (layout.marginWidth * 2); final int adjustFirst = HINDENT + (layout.marginWidth * 2); infoArea.addListener(SWT.Resize, new Listener() { public void handleEvent(Event event) { int w = scrolledComposite.getClientArea().width; // if the horizontal scroll bar exists, we want to wrap to the // minimum wrap width if (w < WRAP_MIN_WIDTH) { w = WRAP_MIN_WIDTH; } for (int i = 0; i < texts.size(); i++) { int extent; if (i == 0) extent = w - adjustFirst; else extent = w - adjust; StyledText text = (StyledText) texts.get(i); Point p = text.computeSize(extent, SWT.DEFAULT, false); ((GridData) text.getLayoutData()).widthHint = p.x; } // reset the scrolled composite height since the height of the // styled text widgets have changed Point p = infoArea.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); scrolledComposite.setMinHeight(p.y); } }); } // Adjust the scrollbar increments if (sampleStyledText == null) { this.scrolledComposite.getHorizontalBar().setIncrement( HORZ_SCROLL_INCREMENT); this.scrolledComposite.getVerticalBar().setIncrement( VERT_SCROLL_INCREMENT); } else { GC gc = new GC(sampleStyledText); int width = gc.getFontMetrics().getAverageCharWidth(); gc.dispose(); this.scrolledComposite.getHorizontalBar().setIncrement(width); this.scrolledComposite.getVerticalBar().setIncrement( sampleStyledText.getLineHeight()); } return infoArea; }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WelcomeEditor.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/WelcomeEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 14728, 752, 966, 5484, 12, 9400, 982, 13, 288, 3639, 368, 1788, 326, 2077, 5091, 1492, 903, 912, 3639, 368, 279, 2077, 16, 883, 16, 471, 1316, 18, 3639, 333, 18, 1017, 25054, 9400...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14728, 752, 966, 5484, 12, 9400, 982, 13, 288, 3639, 368, 1788, 326, 2077, 5091, 1492, 903, 912, 3639, 368, 279, 2077, 16, 883, 16, 471, 1316, 18, 3639, 333, 18, 1017, 25054, 9400...
if (oldContainer != null && oldContainer instanceof ViewStack) { ((ViewStack)oldContainer).setActive(false);
if (oldContainer != null && oldContainer instanceof PartStack) { ((PartStack)oldContainer).setActive(StackPresentation.AS_INACTIVE);
public void setContainer(ILayoutContainer container) { ILayoutContainer oldContainer = getContainer(); if (hasFocus) { if (oldContainer != null && oldContainer instanceof ViewStack) { ((ViewStack)oldContainer).setActive(false); } if (container != null && container instanceof ViewStack) { ((ViewStack)container).setActive(true); } } super.setContainer(container); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/caa606c7325710ffec5da6d00cdda37dc6bd0c74/ViewPane.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 28331, 12, 2627, 2012, 2170, 1478, 13, 288, 202, 202, 2627, 2012, 2170, 1592, 2170, 273, 9272, 5621, 202, 202, 430, 261, 5332, 9233, 13, 288, 1082, 202, 430, 261, 1673, 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, 28331, 12, 2627, 2012, 2170, 1478, 13, 288, 202, 202, 2627, 2012, 2170, 1592, 2170, 273, 9272, 5621, 202, 202, 430, 261, 5332, 9233, 13, 288, 1082, 202, 430, 261, 1673, 2...
tvbrowser.ui.programtable.ChannelPanel.fontChanged();
tvbrowser.ui.programtable.ChannelPanel.fontChanged();
public static void handleChangedSettings() { Property[] propArr; MainFrame mainFrame = MainFrame.getInstance(); propArr = new Property[] { propProgramTitleFont, propProgramInfoFont, propProgramTimeFont, propChannelNameFont, propUseDefaultFonts }; if (mProp.hasChanged(propArr)) { util.ui.ProgramPanel.updateFonts(); tvbrowser.ui.programtable.ChannelPanel.fontChanged(); ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane(); scrollPane.getProgramTable().fontChanged(); scrollPane.tableDataChanged(); scrollPane.getProgramTable().tableDataChanged(); } propArr = new Property[] { propLookAndFeel, propSkinLFThemepack, propIsSkinLFEnabled }; if (mProp.hasChanged(propArr)) { TVBrowser.updateLookAndFeel(); } propArr = new Property[] { propApplicationSkin, propUseApplicationSkin }; if (mProp.hasChanged(propArr)) { mainFrame.updateApplicationSkin(); } if (mProp.hasChanged(propTableLayout)) { ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane(); scrollPane.getProgramTable().setProgramTableLayout(null); } propArr = new Property[] { propTableBackgroundStyle, propOneImageBackground, propTimeBlockSize, propTimeBlockBackground1, propTimeBlockBackground2, propTimeBlockShowWest, propTimeBlockWestImage1, propTimeBlockWestImage2, propTimeOfDayBackgroundEdge, propTimeOfDayBackgroundEarly, propTimeOfDayBackgroundMidday, propTimeOfDayBackgroundAfternoon, propTimeOfDayBackgroundEvening, propEarlyTime, propMiddayTime, propAfternoonTime, propEveningTime }; if (mProp.hasChanged(propArr)) { ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane(); scrollPane.getProgramTable().updateBackground(); } propArr = new Property[] { propShowUpdateButton, propShowPreferencesButton, propToolbarButtonStyle, propToolbarButtons }; if (mProp.hasChanged(propArr)) { mainFrame.getHorizontalToolBar().updateButtons(); } if (mProp.hasChanged(propShowTimeButtons)) { mainFrame.getVerticalToolBar().updateButtons(); } if (mProp.hasChanged(propSubscribedChannels)) { ChannelList.create(); DefaultProgramTableModel model = mainFrame.getProgramTableModel(); model.setChannels(ChannelList.getSubscribedChannels()); mainFrame.getHorizontalToolBar().updateChannelChooser(); } propArr = new Property[] { propProgramTableStartOfDay, propProgramTableEndOfDay }; if (mProp.hasChanged(propArr)) { DefaultProgramTableModel model = mainFrame.getProgramTableModel(); int startOfDay = propProgramTableStartOfDay.getInt(); int endOfDay = propProgramTableEndOfDay.getInt(); model.setTimeRange(startOfDay, endOfDay); } if (mProp.hasChanged(propColumnWidth)) { util.ui.ProgramPanel.updateColumnWidth(); ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane(); scrollPane.setColumnWidth(propColumnWidth.getInt()); scrollPane.updateChannelPanel(); scrollPane.getProgramTable().updateLayout(); } propArr = new Property[] { propProgramTableIconPlugins, propProgramInfoFields }; if (mProp.hasChanged(propArr)) { // Force a recreation of the table content DefaultProgramTableModel model = mainFrame.getProgramTableModel(); model.setDate(FinderPanel.getInstance().getSelectedDate(), null, null); } /* if (mProp.hasChanged(propHiddenPluginButtons)) { mainFrame.getHorizontalToolBar().updateButtons(); } */ mProp.clearChanges(); }
9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/611b94a098b5bc4b68897e8a181b45d94061498d/Settings.java/buggy/tvbrowser/src/tvbrowser/core/Settings.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 1640, 5033, 2628, 1435, 288, 565, 4276, 8526, 2270, 5715, 31, 3639, 12740, 3219, 2774, 3219, 273, 12740, 3219, 18, 588, 1442, 5621, 3639, 2270, 5715, 273, 394, 4276, 8526, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 918, 1640, 5033, 2628, 1435, 288, 565, 4276, 8526, 2270, 5715, 31, 3639, 12740, 3219, 2774, 3219, 273, 12740, 3219, 18, 588, 1442, 5621, 3639, 2270, 5715, 273, 394, 4276, 8526, ...
if (! node.getNamespaceURI().equals(HARNESS_NAMESPACE) || ! node.getLocalName().equals(TEST_LOCAL_NAME)) { throw new IOException("invalid element: " + node.getLocalName() + " in " + node.getNamespaceURI() + " is not " + TEST_LOCAL_NAME + " in " + HARNESS_NAMESPACE);
if (node.getNamespaceURI() == null) { throw new IOException("invalid element: " + node.getLocalName() + " in " + node.getNamespaceURI() + " is not " + TEST_LOCAL_NAME + " in " + HARNESS_NAMESPACE); } if (!node.getNamespaceURI().equals(HARNESS_NAMESPACE) || !node.getLocalName().equals(TEST_LOCAL_NAME)) { throw new IOException("invalid element: " + node.getLocalName() + " in " + node.getNamespaceURI() + " is not " + TEST_LOCAL_NAME + " in " + HARNESS_NAMESPACE);
public XMLFileTest(Node node) throws IOException { if (! node.getNamespaceURI().equals(HARNESS_NAMESPACE) || ! node.getLocalName().equals(TEST_LOCAL_NAME)) { throw new IOException("invalid element: " + node.getLocalName() + " in " + node.getNamespaceURI() + " is not " + TEST_LOCAL_NAME + " in " + HARNESS_NAMESPACE); } Node queryNode = (((Element) node).getElementsByTagNameNS( HARNESS_NAMESPACE, QUERY_LOCAL_NAME).item(0)); Node nameNode = (((Element) node).getElementsByTagNameNS( HARNESS_NAMESPACE, NAME_LOCAL_NAME).item(0)); Node commentExpectedResultNode = (((Element) node) .getElementsByTagNameNS(HARNESS_NAMESPACE, COMMENT_EXPECTED_RESULT_LOCAL_NAME).item(0)); if (queryNode == null) { throw new NullPointerException("missing required element: " + QUERY_LOCAL_NAME + " in " + HARNESS_NAMESPACE); } if (nameNode == null) { throw new NullPointerException("missing required element: " + NAME_LOCAL_NAME + " in " + HARNESS_NAMESPACE); } query = queryNode.getTextContent(); name = nameNode.getTextContent(); if (commentExpectedResultNode != null) { commentExpectedResult = commentExpectedResultNode .getTextContent().trim(); } }
56684 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56684/2c36db550cd3c7914a8ca9cec7023adf6a03ed80/XMLFileTest.java/buggy/src/java/com/marklogic/performance/XMLFileTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3167, 812, 4709, 12, 907, 756, 13, 1216, 1860, 288, 3639, 309, 16051, 756, 18, 588, 3402, 3098, 7675, 14963, 12, 44, 4391, 41, 1260, 67, 11368, 13, 7734, 747, 401, 756, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3167, 812, 4709, 12, 907, 756, 13, 1216, 1860, 288, 3639, 309, 16051, 756, 18, 588, 3402, 3098, 7675, 14963, 12, 44, 4391, 41, 1260, 67, 11368, 13, 7734, 747, 401, 756, 18, 588, ...
if (stmt != null) { stmt.executeUpdate("DROP TABLE testbatch"); stmt.close(); } if (con != null) { JDBC2Tests.closeDB(con); }
JDBC2Tests.dropTable(con, "testbatch"); JDBC2Tests.closeDB(con);
protected void tearDown() throws Exception { con.setAutoCommit(true); if (stmt != null) { stmt.executeUpdate("DROP TABLE testbatch"); stmt.close(); } if (con != null) { JDBC2Tests.closeDB(con); } }
45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/b75814aee320ef2b67ad01ba72c266dbbf94db45/BatchExecuteTest.java/buggy/src/interfaces/jdbc/org/postgresql/test/jdbc2/BatchExecuteTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 268, 2091, 4164, 1435, 1216, 1185, 288, 202, 202, 591, 18, 542, 4965, 5580, 12, 3767, 1769, 202, 202, 430, 261, 10589, 480, 446, 13, 288, 1082, 202, 10589, 18, 8837, 189...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 268, 2091, 4164, 1435, 1216, 1185, 288, 202, 202, 591, 18, 542, 4965, 5580, 12, 3767, 1769, 202, 202, 430, 261, 10589, 480, 446, 13, 288, 1082, 202, 10589, 18, 8837, 189...
public void ruleAction( int ruleNumber) { switch(ruleNumber) { // // Rule 1: Token ::= Identifier // case 1: { checkForKeyWord(); break; } // // Rule 2: Token ::= " SLBody " // case 2: { makeToken(TK_StringLiteral); break; } // // Rule 3: Token ::= ' NotSQ ' // case 3: { makeToken(TK_CharacterLiteral); break; } // // Rule 4: Token ::= IntegerLiteral // case 4: { makeToken(TK_IntegerLiteral); break; } // // Rule 5: Token ::= LongLiteral // case 5: { makeToken(TK_LongLiteral); break; } // // Rule 6: Token ::= FloatingPointLiteral // case 6: { makeToken(TK_FloatingPointLiteral); break; } // // Rule 7: Token ::= DoubleLiteral // case 7: { makeToken(TK_DoubleLiteral); break; } // // Rule 8: Token ::= / * Inside Stars / // case 8: { if (getKind(lexParser.getFirstToken(3)) == Char_Star && getKind(getNext(lexParser.getFirstToken(3))) != Char_Star) makeDocComment(); break; } // // Rule 9: Token ::= SLC // case 9: { skipToken(); break; } // // Rule 10: Token ::= WS // case 10: { skipToken(); break; } // // Rule 11: Token ::= + // case 11: { makeToken(TK_PLUS); break; } // // Rule 12: Token ::= - // case 12: { makeToken(TK_MINUS); break; } // // Rule 13: Token ::= * // case 13: { makeToken(TK_MULTIPLY); break; } // // Rule 14: Token ::= / // case 14: { makeToken(TK_DIVIDE); break; } // // Rule 15: Token ::= ( // case 15: { makeToken(TK_LPAREN); break; } // // Rule 16: Token ::= ) // case 16: { makeToken(TK_RPAREN); break; } // // Rule 17: Token ::= = // case 17: { makeToken(TK_EQUAL); break; } // // Rule 18: Token ::= , // case 18: { makeToken(TK_COMMA); break; } // // Rule 19: Token ::= : // case 19: { makeToken(TK_COLON); break; } // // Rule 20: Token ::= ; // case 20: { makeToken(TK_SEMICOLON); break; } // // Rule 21: Token ::= ^ // case 21: { makeToken(TK_XOR); break; } // // Rule 22: Token ::= % // case 22: { makeToken(TK_REMAINDER); break; } // // Rule 23: Token ::= ~ // case 23: { makeToken(TK_TWIDDLE); break; } // // Rule 24: Token ::= | // case 24: { makeToken(TK_OR); break; } // // Rule 25: Token ::= & // case 25: { makeToken(TK_AND); break; } // // Rule 26: Token ::= < // case 26: { makeToken(TK_LESS); break; } // // Rule 27: Token ::= > // case 27: { makeToken(TK_GREATER); break; } // // Rule 28: Token ::= . // case 28: { makeToken(TK_DOT); break; } // // Rule 29: Token ::= ! // case 29: { makeToken(TK_NOT); break; } // // Rule 30: Token ::= [ // case 30: { makeToken(TK_LBRACKET); break; } // // Rule 31: Token ::= ] // case 31: { makeToken(TK_RBRACKET); break; } // // Rule 32: Token ::= { // case 32: { makeToken(TK_LBRACE); break; } // // Rule 33: Token ::= } // case 33: { makeToken(TK_RBRACE); break; } // // Rule 34: Token ::= ? // case 34: { makeToken(TK_QUESTION); break; } // // Rule 35: Token ::= @ // case 35: { makeToken(TK_AT); break; } // // Rule 36: Token ::= + + // case 36: { makeToken(TK_PLUS_PLUS); break; } // // Rule 37: Token ::= - - // case 37: { makeToken(TK_MINUS_MINUS); break; } // // Rule 38: Token ::= = = // case 38: { makeToken(TK_EQUAL_EQUAL); break; } // // Rule 39: Token ::= < = // case 39: { makeToken(TK_LESS_EQUAL); break; } // // Rule 40: Token ::= ! = // case 40: { makeToken(TK_NOT_EQUAL); break; } // // Rule 41: Token ::= < < // case 41: { makeToken(TK_LEFT_SHIFT); break; } // // Rule 42: Token ::= + = // case 42: { makeToken(TK_PLUS_EQUAL); break; } // // Rule 43: Token ::= - = // case 43: { makeToken(TK_MINUS_EQUAL); break; } // // Rule 44: Token ::= * = // case 44: { makeToken(TK_MULTIPLY_EQUAL); break; } // // Rule 45: Token ::= / = // case 45: { makeToken(TK_DIVIDE_EQUAL); break; } // // Rule 46: Token ::= & = // case 46: { makeToken(TK_AND_EQUAL); break; } // // Rule 47: Token ::= | = // case 47: { makeToken(TK_OR_EQUAL); break; } // // Rule 48: Token ::= ^ = // case 48: { makeToken(TK_XOR_EQUAL); break; } // // Rule 49: Token ::= % = // case 49: { makeToken(TK_REMAINDER_EQUAL); break; } // // Rule 50: Token ::= < < = // case 50: { makeToken(TK_LEFT_SHIFT_EQUAL); break; } // // Rule 51: Token ::= | | // case 51: { makeToken(TK_OR_OR); break; } // // Rule 52: Token ::= & & // case 52: { makeToken(TK_AND_AND); break; } // // Rule 53: Token ::= . . . // case 53: { makeToken(TK_ELLIPSIS); break; } // // Rule 350: Token ::= . . // case 350: { makeToken(TK_RANGE); break; } // // Rule 351: Token ::= - > // case 351: { makeToken(TK_ARROW); break; } // // Rule 352: IntLiteralAndRange ::= Integer . . // case 352: { makeToken(lexParser.getToken(1), lexParser.getLastToken(1), TK_IntegerLiteral); makeToken(lexParser.getToken(2), lexParser.getToken(3), TK_RANGE); break; } default: break; } return; }
1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/4b2801ac2ab00275efc7eb5f3257db525f56ab9d/X10Lexer.java/buggy/x10.compiler/src/x10/parser/X10Lexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 509, 1720, 1854, 13, 565, 288, 3639, 1620, 12, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 3155, 493, 33, 10333, 5411, 368, 5411, 648...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 1720, 1854, 13, 565, 288, 3639, 1620, 12, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, 6781, 404, 30, 225, 3155, 493, 33, 10333, 5411, 368, 5411, 648...
public void complete() {
void complete() {
public void complete() { try { if (mTableInserted == true) { mergeInsertedTables(); // integrate tables in the table mTableInserted = false; } } catch(DocumentException de) { throw new ExceptionConverter(de); } if (mAutoFillEmptyCells == true) { fillEmptyMatrixCells(); } if (alternatingRowAttributes != null) { Properties even = new Properties(); Properties odd = new Properties(); String name; String[] value; for (Iterator iterator = alternatingRowAttributes.keySet().iterator(); iterator.hasNext(); ) { name = String.valueOf(iterator.next()); value = (String[])alternatingRowAttributes.get(name); even.setProperty(name, value[0]); odd.setProperty(name, value[1]); } Row row; for (int i = lastHeaderRow + 1; i < rows.size(); i++) { row = (Row)rows.get(i); row.setMarkupAttributes(i % 2 == 0 ? even : odd); } } }
3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/f82915686e9b5f4c554a5d954f60c86d2892af42/Table.java/buggy/itext/src/com/lowagie/text/Table.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 3912, 1435, 288, 3639, 775, 288, 5411, 309, 261, 81, 1388, 27329, 422, 638, 13, 288, 7734, 2691, 27329, 6905, 5621, 225, 368, 23367, 4606, 316, 326, 1014, 7734, 312, 1388, 27329, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 3912, 1435, 288, 3639, 775, 288, 5411, 309, 261, 81, 1388, 27329, 422, 638, 13, 288, 7734, 2691, 27329, 6905, 5621, 225, 368, 23367, 4606, 316, 326, 1014, 7734, 312, 1388, 27329, 273...
throw new TypeError( getRuntime(),
throw getRuntime().newTypeError(
public void checkSafeString() { if (runtime.getSafeLevel() > 0 && isTaint()) { if (runtime.getCurrentFrame().getLastFunc() != null) { throw new SecurityError( runtime, "Insecure operation - " + runtime.getCurrentFrame().getLastFunc()); } throw new SecurityError(runtime, "Insecure operation: -r"); } getRuntime().secure(4); if (!(this instanceof RubyString)) { throw new TypeError( getRuntime(), "wrong argument type " + getMetaClass().getName() + " (expected String)"); } }
45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/clean/src/org/jruby/RubyObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 866, 9890, 780, 1435, 288, 3639, 309, 261, 9448, 18, 588, 9890, 2355, 1435, 405, 374, 597, 353, 29048, 10756, 288, 5411, 309, 261, 9448, 18, 588, 3935, 3219, 7675, 588, 3024, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 9890, 780, 1435, 288, 3639, 309, 261, 9448, 18, 588, 9890, 2355, 1435, 405, 374, 597, 353, 29048, 10756, 288, 5411, 309, 261, 9448, 18, 588, 3935, 3219, 7675, 588, 3024, ...
case EOL: return s4;
NoViableAltException nvae = new NoViableAltException("", 4, 9, input);
public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case ID: case 48: return s3; case EOL: return s4; case 21: return s2; default: NoViableAltException nvae = new NoViableAltException("", 13, 1, input); throw nvae; } }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/9c6423b7a31fdc4a1317e71a6d2850c94e2140e0/RuleParser.java/buggy/drools-compiler/src/main/java/org/drools/lang/RuleParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 1620, 261, 810, 18, 2534, 12, 21, 13, 262, 288, 7734, 648, 1599, 30, 7734, 648, 9934, 30, 10792, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 463, 2046, 18, 1119, 6007, 12, 1702, 1228, 810, 13, 1216, 9539, 288, 7734, 1620, 261, 810, 18, 2534, 12, 21, 13, 262, 288, 7734, 648, 1599, 30, 7734, 648, 9934, 30, 10792, 327, ...
return parentBaseURI.equals(baseURI);
return parentBaseURI != null && parentBaseURI.equals(baseURI);
protected boolean sameBaseURIAsIncludeParent() { String parentBaseURI = getIncludeParentBaseURI(); String baseURI = fCurrentBaseURI.getExpandedSystemId(); // REVISIT: should we use File#sameFile() ? // I think the benefit of using it is that it resolves host names // instead of just doing a string comparison. // TODO: [base URI] is still an open issue with the working group. // They're deciding if xml:base should be added if the [base URI] is different in terms // of resolving relative references, or if it should be added if they are different at all. // Revisit this after a final decision has been made. // The decision also affects whether we output the file name of the URI, or just the path. return parentBaseURI.equals(baseURI); }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/3ff313d1e2c3a7401d641036a8b1ae0a367988e6/XIncludeHandler.java/clean/src/org/apache/xerces/xinclude/XIncludeHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 1967, 2171, 3098, 1463, 8752, 3054, 1435, 288, 3639, 514, 982, 2171, 3098, 273, 7854, 1571, 3054, 2171, 3098, 5621, 3639, 514, 1026, 3098, 273, 284, 3935, 2171, 3098, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 1250, 1967, 2171, 3098, 1463, 8752, 3054, 1435, 288, 3639, 514, 982, 2171, 3098, 273, 7854, 1571, 3054, 2171, 3098, 5621, 3639, 514, 1026, 3098, 273, 284, 3935, 2171, 3098, 18, 588, ...
public CmsGroup createGroup(CmsRequestContext context, String name, String description, int flags, String parent) throws CmsException { return createGroup(context, new CmsUUID(), name, description, flags, parent);
public CmsGroup createGroup(CmsRequestContext context, CmsUUID id, String name, String description, int flags, String parent) throws CmsException { if (isAdmin(context)) { name = name.trim(); validFilename(name); if (name.length() > 1) { return m_userDriver.createGroup(id, name, description, flags, parent, null); } else { throw new CmsException("[" + this.getClass().getName() + "] " + name, CmsException.C_BAD_NAME); } } else { throw new CmsSecurityException("[" + this.getClass().getName() + "] createGroup() " + name, CmsSecurityException.C_SECURITY_ADMIN_PRIVILEGES_REQUIRED); }
public CmsGroup createGroup(CmsRequestContext context, String name, String description, int flags, String parent) throws CmsException { return createGroup(context, new CmsUUID(), name, description, flags, parent); }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/093e196cf83d26abb791e9279caae2e71792b9ab/CmsDriverManager.java/buggy/src/org/opencms/db/CmsDriverManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2149, 1114, 752, 1114, 12, 4747, 21426, 819, 16, 514, 508, 16, 514, 2477, 16, 509, 2943, 16, 514, 982, 13, 1216, 11228, 288, 3639, 327, 752, 1114, 12, 2472, 16, 394, 15792, 9334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2149, 1114, 752, 1114, 12, 4747, 21426, 819, 16, 514, 508, 16, 514, 2477, 16, 509, 2943, 16, 514, 982, 13, 1216, 11228, 288, 3639, 327, 752, 1114, 12, 2472, 16, 394, 15792, 9334, ...
proxySetters(bc, type);
if (!proxySetters(bc, type)) return null;
protected BCClass generateProxyBeanBytecode(Class type) { if (Modifier.isFinal(type.getModifiers())) return null; // we can only generate a valid proxy if there is a copy constructor // or a default constructor Constructor cons = findCopyConstructor(type); if (cons == null) { Constructor[] cs = type.getConstructors(); for (int i = 0; cons == null && i < cs.length; i++) if (cs[i].getParameterTypes().length == 0) cons = cs[i]; if (cons == null) return null; } Project project = new Project(); BCClass bc = project.loadClass(Strings.getPackageName (ProxyManagerImpl.class) + "." + type.getName().replace('.', '$') + "$" + nextProxyId() + PROXY_SUFFIX); bc.setSuperclass(type); bc.declareInterface(ProxyBean.class); delegateConstructors(bc, type); addProxyMethods(bc, type, true); addProxyBeanMethods(bc, type, cons); proxySetters(bc, type); addWriteReplaceMethod(bc); return bc; }
47053 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47053/7b91f912736827bfa84787a725889889a5ba90f7/ProxyManagerImpl.java/clean/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 21225, 797, 2103, 3886, 3381, 858, 16651, 12, 797, 618, 13, 288, 3639, 309, 261, 9829, 18, 291, 7951, 12, 723, 18, 588, 11948, 1435, 3719, 5411, 327, 446, 31, 3639, 368, 732, 848,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21225, 797, 2103, 3886, 3381, 858, 16651, 12, 797, 618, 13, 288, 3639, 309, 261, 9829, 18, 291, 7951, 12, 723, 18, 588, 11948, 1435, 3719, 5411, 327, 446, 31, 3639, 368, 732, 848,...
String primaryId = childMem.getString(IWorkbenchConstants.TAG_ID);
String id = childMem.getString(IWorkbenchConstants.TAG_ID);
private IStatus createReferences(IMemento views[]) { MultiStatus result = new MultiStatus( PlatformUI.PLUGIN_ID,IStatus.OK, WorkbenchMessages.getString("Perspective.problemsRestoringViews"),null); //$NON-NLS-1$ for (int x = 0; x < views.length; x ++) { // Get the view details. IMemento childMem = views[x]; String primaryId = childMem.getString(IWorkbenchConstants.TAG_ID); // skip creation of the intro reference - it's handled elsewhere. if (primaryId.equals(IIntroConstants.INTRO_VIEW_ID)) continue; String secondaryId = childMem.getString(IWorkbenchConstants.TAG_SECONDARY_ID); // Create and open the view. try { if(!"true".equals(childMem.getString(IWorkbenchConstants.TAG_REMOVED))) { //$NON-NLS-1$ viewFactory.createView(primaryId, secondaryId); } } catch (PartInitException e) { childMem.putString(IWorkbenchConstants.TAG_REMOVED,"true"); //$NON-NLS-1$ result.add( StatusUtil.newStatus( IStatus.ERROR, e.getMessage() == null ? "" : e.getMessage(), //$NON-NLS-1$ e)); } } return result;}
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/46375086edd435b12bca56fe6591bc76daacd644/Perspective.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3238, 467, 1482, 752, 8221, 12, 3445, 820, 83, 7361, 63, 5717, 288, 202, 5002, 1482, 563, 273, 394, 5991, 1482, 12, 202, 202, 8201, 5370, 18, 19415, 67, 734, 16, 45, 1482, 18, 3141, 16, 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, 3238, 467, 1482, 752, 8221, 12, 3445, 820, 83, 7361, 63, 5717, 288, 202, 5002, 1482, 563, 273, 394, 5991, 1482, 12, 202, 202, 8201, 5370, 18, 19415, 67, 734, 16, 45, 1482, 18, 3141, 16, 20...
result.append((char) ((s & 0xff00) >> 8)).append((char) (s & 0xff)); }
result.append((char) ((s & 0xff00) >> 8)).append((char) (s & 0xff)); }
private static void encodeShortBigEndian(StringBuffer result, int s) { result.append((char) ((s & 0xff00) >> 8)).append((char) (s & 0xff)); }
45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/415b1e0db282c02d672a7e34a34a2bea0f69ccb2/Pack.java/clean/src/org/jruby/util/Pack.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 2017, 4897, 9901, 7583, 12, 780, 1892, 563, 16, 509, 272, 13, 288, 202, 202, 2088, 18, 6923, 12443, 3001, 13, 14015, 87, 473, 374, 5297, 713, 13, 1671, 1725, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 2017, 4897, 9901, 7583, 12, 780, 1892, 563, 16, 509, 272, 13, 288, 202, 202, 2088, 18, 6923, 12443, 3001, 13, 14015, 87, 473, 374, 5297, 713, 13, 1671, 1725, 13, ...
case 553: {
case 552: {
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER) { System.out.println("Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassOrInterfaceType ::= ClassType // case 15: break; // // Rule 16: ClassType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: InterfaceType ::= TypeName // case 17: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 18: TypeName ::= identifier // case 18: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 19: TypeName ::= TypeName DOT identifier // case 19: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 20: ClassName ::= TypeName // case 20: break; // // Rule 21: TypeVariable ::= identifier // case 21: break; // // Rule 22: ArrayType ::= Type LBRACKET RBRACKET // case 22: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(array(a, pos(), 1)); break; } // // Rule 23: TypeParameter ::= TypeVariable TypeBoundopt // case 23: bad_rule = 23; break; // // Rule 24: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 26: bad_rule = 26; break; // // Rule 27: AdditionalBound ::= AND InterfaceType // case 27: bad_rule = 27; break; // // Rule 28: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 30: bad_rule = 30; break; // // Rule 31: Wildcard ::= QUESTION WildcardBoundsOpt // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= extends ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: WildcardBounds ::= super ReferenceType // case 33: bad_rule = 33; break; // // Rule 34: PackageName ::= identifier // case 34: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 35: PackageName ::= PackageName DOT identifier // case 35: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 36: ExpressionName ::= identifier // case 36: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 37: ExpressionName ::= AmbiguousName DOT identifier // case 37: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 38: MethodName ::= identifier // case 38: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 39: MethodName ::= AmbiguousName DOT identifier // case 39: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= identifier // case 40: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 41: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 41: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= identifier // case 42: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 43: AmbiguousName ::= AmbiguousName DOT identifier // case 43: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 44: CompilationUnit ::= Commentsopt PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 44: { Object comment = btParser.getSym(1); PackageNode a = (PackageNode) btParser.getSym(2); List b = (List) btParser.getSym(3), c = (List) btParser.getSym(4); Node n = nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c); if (comment != null) { n.setComment(comment.toString()); } btParser.setSym1(n); break; } // // Rule 45: Comments ::= Comment // case 45: { Object comment = comment(btParser.getToken(1)); btParser.setSym1(comment); break; } // // Rule 46: Comments ::= Comments Comment // case 46: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 47: ImportDeclarations ::= ImportDeclaration // case 47: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 48: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 48: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 49: TypeDeclarations ::= Commentsopt TypeDeclaration // case 49: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(2); if (a != null) l.add(a); if (comment != null) { a.setComment(comment.toString()); } btParser.setSym1(l); break; } // // Rule 50: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 50: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 51: PackageDeclaration ::= package PackageName SEMICOLON // case 51: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 52: ImportDeclaration ::= SingleTypeImportDeclaration // case 52: break; // // Rule 53: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 53: break; // // Rule 54: ImportDeclaration ::= SingleStaticImportDeclaration // case 54: break; // // Rule 55: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 55: break; // // Rule 56: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 56: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 57: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 57: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 58: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 58: bad_rule = 58; break; // // Rule 59: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 59: bad_rule = 59; break; // // Rule 60: TypeDeclaration ::= ClassDeclaration // case 60: break; // // Rule 61: TypeDeclaration ::= InterfaceDeclaration // case 61: break; // // Rule 62: TypeDeclaration ::= SEMICOLON // case 62: { btParser.setSym1(null); break; } // // Rule 63: ClassDeclaration ::= NormalClassDeclaration // case 63: break; // // Rule 64: NormalClassDeclaration ::= Commentsopt ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 64: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(5); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); Node n = a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e); if (comment != null) n.setComment(comment.toString()); btParser.setSym1(n); break; } // // Rule 65: ClassModifiers ::= ClassModifier // case 65: break; // // Rule 66: ClassModifiers ::= ClassModifiers ClassModifier // case 66: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 67: ClassModifier ::= public // case 67: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 68: ClassModifier ::= protected // case 68: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 69: ClassModifier ::= private // case 69: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 70: ClassModifier ::= abstract // case 70: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 71: ClassModifier ::= static // case 71: { btParser.setSym1(Flags.STATIC); break; } // // Rule 72: ClassModifier ::= final // case 72: { btParser.setSym1(Flags.FINAL); break; } // // Rule 73: ClassModifier ::= strictfp // case 73: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 74: TypeParameters ::= LESS TypeParameterList GREATER // case 74: bad_rule = 74; break; // // Rule 75: TypeParameterList ::= TypeParameter // case 75: bad_rule = 75; break; // // Rule 76: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 76: bad_rule = 76; break; // // Rule 77: Super ::= extends ClassType // case 77: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 78: Interfaces ::= implements InterfaceTypeList // case 78: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 79: InterfaceTypeList ::= InterfaceType // case 79: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 80: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 80: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 81: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 81: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 82: ClassBodyDeclarations ::= ClassBodyDeclaration // case 82: break; // // Rule 83: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 83: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 84: ClassBodyDeclaration ::= ClassMemberDeclaration // case 84: break; // // Rule 85: ClassBodyDeclaration ::= InstanceInitializer // case 85: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 86: ClassBodyDeclaration ::= StaticInitializer // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 87: ClassBodyDeclaration ::= ConstructorDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= FieldDeclaration // case 88: break; // // Rule 89: ClassMemberDeclaration ::= MethodDeclaration // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 90: ClassMemberDeclaration ::= ClassDeclaration // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 91: ClassMemberDeclaration ::= InterfaceDeclaration // case 91: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: ClassMemberDeclaration ::= SEMICOLON // case 92: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 93: FieldDeclaration ::= Commentsopt FieldModifiersopt Type VariableDeclarators SEMICOLON // case 93: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(2); TypeNode b = (TypeNode) btParser.getSym(3); List c = (List) btParser.getSym(4); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } if (comment != null) ((Node) l.get(0)).setComment(comment.toString()); btParser.setSym1(l); break; } // // Rule 94: VariableDeclarators ::= VariableDeclarator // case 94: { List l = new TypedList(new LinkedList(), VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 95: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 95: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 96: VariableDeclarator ::= VariableDeclaratorId // case 96: break; // // Rule 97: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 97: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 98: VariableDeclaratorId ::= identifier // case 98: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 99: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 99: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 100: VariableInitializer ::= Expression // case 100: break; // // Rule 101: VariableInitializer ::= ArrayInitializer // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifier // case 102: break; // // Rule 103: FieldModifiers ::= FieldModifiers FieldModifier // case 103: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 104: FieldModifier ::= public // case 104: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 105: FieldModifier ::= protected // case 105: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 106: FieldModifier ::= private // case 106: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 107: FieldModifier ::= static // case 107: { btParser.setSym1(Flags.STATIC); break; } // // Rule 108: FieldModifier ::= final // case 108: { btParser.setSym1(Flags.FINAL); break; } // // Rule 109: FieldModifier ::= transient // case 109: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 110: FieldModifier ::= volatile // case 110: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 111: MethodDeclaration ::= Commentsopt MethodHeader MethodBody // case 111: { Object comment = btParser.getSym(1); MethodDecl a = (MethodDecl) btParser.getSym(2); Block b = (Block) btParser.getSym(3); if (comment != null) a.setComment(comment.toString()); btParser.setSym1(a.body(b)); break; } // // Rule 112: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 112: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 113: ResultType ::= Type // case 113: break; // // Rule 114: ResultType ::= void // case 114: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 115: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 115: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 116: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 116: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 117: FormalParameterList ::= LastFormalParameter // case 117: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 118: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 118: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameter // case 119: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 120: FormalParameters ::= FormalParameters COMMA FormalParameter // case 120: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 121: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 121: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); VarDeclarator b = (VarDeclarator) btParser.getSym(3); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 123: VariableModifiers ::= VariableModifiers VariableModifier // case 123: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 124: VariableModifier ::= final // case 124: { btParser.setSym1(Flags.FINAL); break; } // // Rule 125: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 125: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); VarDeclarator b = (VarDeclarator) btParser.getSym(4); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 126: MethodModifiers ::= MethodModifier // case 126: break; // // Rule 127: MethodModifiers ::= MethodModifiers MethodModifier // case 127: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 128: MethodModifier ::= public // case 128: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 129: MethodModifier ::= protected // case 129: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 130: MethodModifier ::= private // case 130: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 131: MethodModifier ::= abstract // case 131: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 132: MethodModifier ::= static // case 132: { btParser.setSym1(Flags.STATIC); break; } // // Rule 133: MethodModifier ::= final // case 133: { btParser.setSym1(Flags.FINAL); break; } // // Rule 134: MethodModifier ::= synchronized // case 134: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 135: MethodModifier ::= native // case 135: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 136: MethodModifier ::= strictfp // case 136: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 137: Throws ::= throws ExceptionTypeList // case 137: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 138: ExceptionTypeList ::= ExceptionType // case 138: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 139: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 139: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 140: ExceptionType ::= ClassType // case 140: break; // // Rule 141: ExceptionType ::= TypeVariable // case 141: break; // // Rule 142: MethodBody ::= Block // case 142: break; // // Rule 143: MethodBody ::= SEMICOLON // case 143: btParser.setSym1(null); break; // // Rule 144: InstanceInitializer ::= Block // case 144: break; // // Rule 145: StaticInitializer ::= static Block // case 145: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 146: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 146: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 147: ConstructorDeclarator ::= SimpleTypeName LPAREN FormalParameterListopt RPAREN // case 147: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 148: SimpleTypeName ::= identifier // case 148: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 149: ConstructorModifiers ::= ConstructorModifier // case 149: break; // // Rule 150: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 150: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 151: ConstructorModifier ::= public // case 151: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 152: ConstructorModifier ::= protected // case 152: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 153: ConstructorModifier ::= private // case 153: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 154: ConstructorBody ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // case 154: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 155: ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON // case 155: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON // case 156: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 157: ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // case 157: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 158: ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // case 158: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 159: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 159: bad_rule = 159; break; // // Rule 160: EnumBody ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 160: bad_rule = 160; break; // // Rule 161: EnumConstants ::= EnumConstant // case 161: bad_rule = 161; break; // // Rule 162: EnumConstants ::= EnumConstants COMMA EnumConstant // case 162: bad_rule = 162; break; // // Rule 163: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 163: bad_rule = 163; break; // // Rule 164: Arguments ::= LPAREN ArgumentListopt RPAREN // case 164: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 165: EnumBodyDeclarations ::= SEMICOLON ClassBodyDeclarationsopt // case 165: bad_rule = 165; break; // // Rule 166: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 166: break; // // Rule 167: NormalInterfaceDeclaration ::= Commentsopt InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 167: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(5); ClassBody d = (ClassBody) btParser.getSym(6); Node n = nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d); if (comment != null) n.setComment( comment.toString() ); btParser.setSym1(n); break; } // // Rule 168: InterfaceModifiers ::= InterfaceModifier // case 168: break; // // Rule 169: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 169: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 170: InterfaceModifier ::= public // case 170: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 171: InterfaceModifier ::= protected // case 171: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 172: InterfaceModifier ::= private // case 172: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 173: InterfaceModifier ::= abstract // case 173: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 174: InterfaceModifier ::= static // case 174: { btParser.setSym1(Flags.STATIC); break; } // // Rule 175: InterfaceModifier ::= strictfp // case 175: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 176: ExtendsInterfaces ::= extends InterfaceType // case 176: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 177: ExtendsInterfaces ::= ExtendsInterfaces COMMA InterfaceType // case 177: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 178: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // case 178: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 179: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 180: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ConstantDeclaration // case 181: break; // // Rule 182: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ClassDeclaration // case 183: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 184: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 185: InterfaceMemberDeclaration ::= SEMICOLON // case 185: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 186: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 186: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 187: ConstantModifiers ::= ConstantModifier // case 187: break; // // Rule 188: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 188: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 189: ConstantModifier ::= public // case 189: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 190: ConstantModifier ::= static // case 190: { btParser.setSym1(Flags.STATIC); break; } // // Rule 191: ConstantModifier ::= final // case 191: { btParser.setSym1(Flags.FINAL); break; } // // Rule 192: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt SEMICOLON // case 192: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 193: AbstractMethodModifiers ::= AbstractMethodModifier // case 193: break; // // Rule 194: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 194: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 195: AbstractMethodModifier ::= public // case 195: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 196: AbstractMethodModifier ::= abstract // case 196: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 197: AnnotationTypeDeclaration ::= InterfaceModifiersopt AT interface identifier AnnotationTypeBody // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier LPAREN RPAREN DefaultValueopt SEMICOLON // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 205: bad_rule = 205; break; // // Rule 206: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 206: bad_rule = 206; break; // // Rule 207: AnnotationTypeElementDeclaration ::= SEMICOLON // case 207: bad_rule = 207; break; // // Rule 208: DefaultValue ::= default ElementValue // case 208: bad_rule = 208; break; // // Rule 209: Annotations ::= Annotation // case 209: bad_rule = 209; break; // // Rule 210: Annotations ::= Annotations Annotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= NormalAnnotation // case 211: bad_rule = 211; break; // // Rule 212: Annotation ::= MarkerAnnotation // case 212: bad_rule = 212; break; // // Rule 213: Annotation ::= SingleElementAnnotation // case 213: bad_rule = 213; break; // // Rule 214: NormalAnnotation ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePairs ::= ElementValuePair // case 215: bad_rule = 215; break; // // Rule 216: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 216: bad_rule = 216; break; // // Rule 217: ElementValuePair ::= SimpleName EQUAL ElementValue // case 217: bad_rule = 217; break; // // Rule 218: SimpleName ::= identifier // case 218: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 219: ElementValue ::= ConditionalExpression // case 219: bad_rule = 219; break; // // Rule 220: ElementValue ::= Annotation // case 220: bad_rule = 220; break; // // Rule 221: ElementValue ::= ElementValueArrayInitializer // case 221: bad_rule = 221; break; // // Rule 222: ElementValueArrayInitializer ::= LBRACE ElementValuesopt ,opt RBRACE // case 222: bad_rule = 222; break; // // Rule 223: ElementValues ::= ElementValue // case 223: bad_rule = 223; break; // // Rule 224: ElementValues ::= ElementValues COMMA ElementValue // case 224: bad_rule = 224; break; // // Rule 225: MarkerAnnotation ::= AT TypeName // case 225: bad_rule = 225; break; // // Rule 226: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 226: bad_rule = 226; break; // // Rule 227: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // case 227: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 228: VariableInitializers ::= VariableInitializer // case 228: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 229: VariableInitializers ::= VariableInitializers COMMA VariableInitializer // case 229: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 230: Block ::= LBRACE BlockStatementsopt RBRACE // case 230: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 231: BlockStatements ::= BlockStatement // case 231: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 232: BlockStatements ::= BlockStatements BlockStatement // case 232: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= LocalVariableDeclarationStatement // case 233: break; // // Rule 234: BlockStatement ::= ClassDeclaration // case 234: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 235: BlockStatement ::= Statement // case 235: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 236: LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON // case 236: break; // // Rule 237: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 237: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.LocalDecl(pos(d), flags, array(a, pos(d), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 238: Statement ::= StatementWithoutTrailingSubstatement // case 238: break; // // Rule 239: Statement ::= LabeledStatement // case 239: break; // // Rule 240: Statement ::= IfThenStatement // case 240: break; // // Rule 241: Statement ::= IfThenElseStatement // case 241: break; // // Rule 242: Statement ::= WhileStatement // case 242: break; // // Rule 243: Statement ::= ForStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= Block // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= AssertStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= DoStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= BreakStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 253: break; // // Rule 254: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 254: break; // // Rule 255: StatementWithoutTrailingSubstatement ::= TryStatement // case 255: break; // // Rule 256: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 256: break; // // Rule 257: StatementNoShortIf ::= LabeledStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 258: break; // // Rule 259: StatementNoShortIf ::= WhileStatementNoShortIf // case 259: break; // // Rule 260: StatementNoShortIf ::= ForStatementNoShortIf // case 260: break; // // Rule 261: IfThenStatement ::= if LPAREN Expression RPAREN Statement // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 262: IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else Statement // case 262: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 263: IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf else StatementNoShortIf // case 263: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 264: EmptyStatement ::= SEMICOLON // case 264: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 265: LabeledStatement ::= identifier COLON Statement // case 265: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 266: LabeledStatementNoShortIf ::= identifier COLON StatementNoShortIf // case 266: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 267: ExpressionStatement ::= StatementExpression SEMICOLON // case 267: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 268: StatementExpression ::= Assignment // case 268: break; // // Rule 269: StatementExpression ::= PreIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PreDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= PostIncrementExpression // case 271: break; // // Rule 272: StatementExpression ::= PostDecrementExpression // case 272: break; // // Rule 273: StatementExpression ::= MethodInvocation // case 273: break; // // Rule 274: StatementExpression ::= ClassInstanceCreationExpression // case 274: break; // // Rule 275: AssertStatement ::= assert Expression SEMICOLON // case 275: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 276: AssertStatement ::= assert Expression COLON Expression SEMICOLON // case 276: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 277: SwitchStatement ::= switch LPAREN Expression RPAREN SwitchBlock // case 277: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 278: SwitchBlock ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // case 278: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 279: break; // // Rule 280: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 280: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 281: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 281: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 282: SwitchLabels ::= SwitchLabel // case 282: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 283: SwitchLabels ::= SwitchLabels SwitchLabel // case 283: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 284: SwitchLabel ::= case ConstantExpression COLON // case 284: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 285: SwitchLabel ::= case EnumConstant COLON // case 285: bad_rule = 285; break; // // Rule 286: SwitchLabel ::= default COLON // case 286: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 287: EnumConstant ::= identifier // case 287: bad_rule = 287; break; // // Rule 288: WhileStatement ::= while LPAREN Expression RPAREN Statement // case 288: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 289: WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf // case 289: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 290: DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON // case 290: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 291: ForStatement ::= BasicForStatement // case 291: break; // // Rule 292: ForStatement ::= EnhancedForStatement // case 292: break; // // Rule 293: BasicForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN Statement // case 293: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 294: ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN StatementNoShortIf // case 294: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 295: ForInit ::= StatementExpressionList // case 295: break; // // Rule 296: ForInit ::= LocalVariableDeclaration // case 296: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 297: ForUpdate ::= StatementExpressionList // case 297: break; // // Rule 298: StatementExpressionList ::= StatementExpression // case 298: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 299: StatementExpressionList ::= StatementExpressionList COMMA StatementExpression // case 299: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 300: BreakStatement ::= break identifieropt SEMICOLON // case 300: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 301: ContinueStatement ::= continue identifieropt SEMICOLON // case 301: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 302: ReturnStatement ::= return Expressionopt SEMICOLON // case 302: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 303: ThrowStatement ::= throw Expression SEMICOLON // case 303: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 304: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN Block // case 304: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 305: TryStatement ::= try Block Catches // case 305: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 306: TryStatement ::= try Block Catchesopt Finally // case 306: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 307: Catches ::= CatchClause // case 307: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 308: Catches ::= Catches CatchClause // case 308: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 309: CatchClause ::= catch LPAREN FormalParameter RPAREN Block // case 309: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 310: Finally ::= finally Block // case 310: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 311: Primary ::= PrimaryNoNewArray // case 311: break; // // Rule 312: Primary ::= ArrayCreationExpression // case 312: break; // // Rule 313: PrimaryNoNewArray ::= Literal // case 313: break; // // Rule 314: PrimaryNoNewArray ::= Type DOT class // case 314: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 315: PrimaryNoNewArray ::= void DOT class // case 315: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 316: PrimaryNoNewArray ::= this // case 316: { btParser.setSym1(nf.This(pos())); break; } // // Rule 317: PrimaryNoNewArray ::= ClassName DOT this // case 317: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 318: PrimaryNoNewArray ::= LPAREN Expression RPAREN // case 318: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 319: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 319: break; // // Rule 320: PrimaryNoNewArray ::= FieldAccess // case 320: break; // // Rule 321: PrimaryNoNewArray ::= MethodInvocation // case 321: break; // // Rule 322: PrimaryNoNewArray ::= ArrayAccess // case 322: break; // // Rule 323: Literal ::= IntegerLiteral // case 323: { // TODO: remove any prefix (such as 0x) polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 324: Literal ::= LongLiteral // case 324: { // TODO: remove any suffix (such as L) or prefix (such as 0x) polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 325: Literal ::= FloatingPointLiteral // case 325: { // TODO: remove any suffix (such as F) polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 326: Literal ::= DoubleLiteral // case 326: { // TODO: remove any suffix (such as D) polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 327: Literal ::= BooleanLiteral // case 327: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 328: Literal ::= CharacterLiteral // case 328: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 329: Literal ::= StringLiteral // case 329: { String s = prsStream.getName(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), s.substring(1, s.length() - 2))); break; } // // Rule 330: Literal ::= null // case 330: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 331: BooleanLiteral ::= true // case 331: break; // // Rule 332: BooleanLiteral ::= false // case 332: break; // // Rule 333: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN ClassBodyopt // case 333: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 334: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 334: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 335: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 335: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 336: ArgumentList ::= Expression // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: ArgumentList ::= ArgumentList COMMA Expression // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 338: DimExprs ::= DimExpr // case 338: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 339: DimExprs ::= DimExprs DimExpr // case 339: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 340: DimExpr ::= LBRACKET Expression RBRACKET // case 340: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 341: Dims ::= LBRACKET RBRACKET // case 341: { btParser.setSym1(new Integer(1)); break; } // // Rule 342: Dims ::= Dims LBRACKET RBRACKET // case 342: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 343: FieldAccess ::= Primary DOT identifier // case 343: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 344: FieldAccess ::= super DOT identifier // case 344: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 345: FieldAccess ::= ClassName DOT super DOT identifier // case 345: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 346: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 346: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 347: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 347: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 348: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 348: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 349: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 349: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 350: PostfixExpression ::= Primary // case 350: break; // // Rule 351: PostfixExpression ::= ExpressionName // case 351: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 352: PostfixExpression ::= PostIncrementExpression // case 352: break; // // Rule 353: PostfixExpression ::= PostDecrementExpression // case 353: break; // // Rule 354: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 354: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 355: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 355: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 356: UnaryExpression ::= PreIncrementExpression // case 356: break; // // Rule 357: UnaryExpression ::= PreDecrementExpression // case 357: break; // // Rule 358: UnaryExpression ::= PLUS UnaryExpression // case 358: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 359: UnaryExpression ::= MINUS UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 361: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 362: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 363: break; // // Rule 364: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 365: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 365: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 367: MultiplicativeExpression ::= UnaryExpression // case 367: break; // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 369: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 369: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 370: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 371: AdditiveExpression ::= MultiplicativeExpression // case 371: break; // // Rule 372: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 373: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 374: ShiftExpression ::= AdditiveExpression // case 374: break; // // Rule 375: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 375: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 376: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 376: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 377: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 377: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 378: RelationalExpression ::= ShiftExpression // case 378: break; // // Rule 379: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 381: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 382: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 383: EqualityExpression ::= RelationalExpression // case 383: break; // // Rule 384: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 385: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 386: AndExpression ::= EqualityExpression // case 386: break; // // Rule 387: AndExpression ::= AndExpression AND EqualityExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 388: ExclusiveOrExpression ::= AndExpression // case 388: break; // // Rule 389: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 390: InclusiveOrExpression ::= ExclusiveOrExpression // case 390: break; // // Rule 391: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 392: ConditionalAndExpression ::= InclusiveOrExpression // case 392: break; // // Rule 393: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 394: ConditionalOrExpression ::= ConditionalAndExpression // case 394: break; // // Rule 395: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 396: ConditionalExpression ::= ConditionalOrExpression // case 396: break; // // Rule 397: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 397: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 398: AssignmentExpression ::= ConditionalExpression // case 398: break; // // Rule 399: AssignmentExpression ::= Assignment // case 399: break; // // Rule 400: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 400: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 401: LeftHandSide ::= ExpressionName // case 401: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 402: LeftHandSide ::= FieldAccess // case 402: break; // // Rule 403: LeftHandSide ::= ArrayAccess // case 403: break; // // Rule 404: AssignmentOperator ::= EQUAL // case 404: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 405: AssignmentOperator ::= MULTIPLY_EQUAL // case 405: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= DIVIDE_EQUAL // case 406: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= REMAINDER_EQUAL // case 407: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= PLUS_EQUAL // case 408: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= MINUS_EQUAL // case 409: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 410: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= GREATER GREATER EQUAL // case 411: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 412: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= AND_EQUAL // case 413: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= XOR_EQUAL // case 414: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 415: AssignmentOperator ::= OR_EQUAL // case 415: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 416: Expression ::= AssignmentExpression // case 416: break; // // Rule 417: ConstantExpression ::= Expression // case 417: break; // // Rule 418: Dimsopt ::= // case 418: { btParser.setSym1(new Integer(0)); break; } // // Rule 419: Dimsopt ::= Dims // case 419: break; // // Rule 420: Catchesopt ::= // case 420: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 421: Catchesopt ::= Catches // case 421: break; // // Rule 422: identifieropt ::= // case 422: btParser.setSym1(null); break; // // Rule 423: identifieropt ::= identifier // case 423: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 424: ForUpdateopt ::= // case 424: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 425: ForUpdateopt ::= ForUpdate // case 425: break; // // Rule 426: Expressionopt ::= // case 426: btParser.setSym1(null); break; // // Rule 427: Expressionopt ::= Expression // case 427: break; // // Rule 428: ForInitopt ::= // case 428: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 429: ForInitopt ::= ForInit // case 429: break; // // Rule 430: SwitchLabelsopt ::= // case 430: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 431: SwitchLabelsopt ::= SwitchLabels // case 431: break; // // Rule 432: SwitchBlockStatementGroupsopt ::= // case 432: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 433: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 433: break; // // Rule 434: VariableModifiersopt ::= // case 434: { btParser.setSym1(Flags.NONE); break; } // // Rule 435: VariableModifiersopt ::= VariableModifiers // case 435: break; // // Rule 436: VariableInitializersopt ::= // case 436: btParser.setSym1(null); break; // // Rule 437: VariableInitializersopt ::= VariableInitializers // case 437: break; // // Rule 438: ElementValuesopt ::= // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuesopt ::= ElementValues // case 439: bad_rule = 439; break; // // Rule 440: ElementValuePairsopt ::= // case 440: btParser.setSym1(null); break; // // Rule 441: ElementValuePairsopt ::= ElementValuePairs // case 441: bad_rule = 441; break; // // Rule 442: DefaultValueopt ::= // case 442: btParser.setSym1(null); break; // // Rule 443: DefaultValueopt ::= DefaultValue // case 443: break; // // Rule 444: AnnotationTypeElementDeclarationsopt ::= // case 444: btParser.setSym1(null); break; // // Rule 445: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 445: bad_rule = 445; break; // // Rule 446: AbstractMethodModifiersopt ::= // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 447: break; // // Rule 448: ConstantModifiersopt ::= // case 448: { btParser.setSym1(Flags.NONE); break; } // // Rule 449: ConstantModifiersopt ::= ConstantModifiers // case 449: break; // // Rule 450: InterfaceMemberDeclarationsopt ::= // case 450: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 451: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 451: break; // // Rule 452: ExtendsInterfacesopt ::= // case 452: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 453: ExtendsInterfacesopt ::= ExtendsInterfaces // case 453: break; // // Rule 454: InterfaceModifiersopt ::= // case 454: { btParser.setSym1(Flags.NONE); break; } // // Rule 455: InterfaceModifiersopt ::= InterfaceModifiers // case 455: break; // // Rule 456: ClassBodyopt ::= // case 456: btParser.setSym1(null); break; // // Rule 457: ClassBodyopt ::= ClassBody // case 457: break; // // Rule 458: Argumentsopt ::= // case 458: btParser.setSym1(null); break; // // Rule 459: Argumentsopt ::= Arguments // case 459: bad_rule = 459; break; // // Rule 460: EnumBodyDeclarationsopt ::= // case 460: btParser.setSym1(null); break; // // Rule 461: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 461: bad_rule = 461; break; // // Rule 462: ,opt ::= // case 462: btParser.setSym1(null); break; // // Rule 463: ,opt ::= COMMA // case 463: break; // // Rule 464: EnumConstantsopt ::= // case 464: btParser.setSym1(null); break; // // Rule 465: EnumConstantsopt ::= EnumConstants // case 465: bad_rule = 465; break; // // Rule 466: ArgumentListopt ::= // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 467: ArgumentListopt ::= ArgumentList // case 467: break; // // Rule 468: BlockStatementsopt ::= // case 468: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 469: BlockStatementsopt ::= BlockStatements // case 469: break; // // Rule 470: ExplicitConstructorInvocationopt ::= // case 470: btParser.setSym1(null); break; // // Rule 471: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 471: break; // // Rule 472: ConstructorModifiersopt ::= // case 472: { btParser.setSym1(Flags.NONE); break; } // // Rule 473: ConstructorModifiersopt ::= ConstructorModifiers // case 473: break; // // Rule 474: ...opt ::= // case 474: btParser.setSym1(null); break; // // Rule 475: ...opt ::= ELLIPSIS // case 475: break; // // Rule 476: FormalParameterListopt ::= // case 476: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 477: FormalParameterListopt ::= FormalParameterList // case 477: break; // // Rule 478: Throwsopt ::= // case 478: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 479: Throwsopt ::= Throws // case 479: break; // // Rule 480: MethodModifiersopt ::= // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: MethodModifiersopt ::= MethodModifiers // case 481: break; // // Rule 482: FieldModifiersopt ::= // case 482: { btParser.setSym1(Flags.NONE); break; } // // Rule 483: FieldModifiersopt ::= FieldModifiers // case 483: break; // // Rule 484: ClassBodyDeclarationsopt ::= // case 484: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 485: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 485: break; // // Rule 486: Interfacesopt ::= // case 486: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 487: Interfacesopt ::= Interfaces // case 487: break; // // Rule 488: Superopt ::= // case 488: btParser.setSym1(null); break; // // Rule 489: Superopt ::= Super // case 489: break; // // Rule 490: TypeParametersopt ::= // case 490: btParser.setSym1(null); break; // // Rule 491: TypeParametersopt ::= TypeParameters // case 491: break; // // Rule 492: ClassModifiersopt ::= // case 492: { btParser.setSym1(Flags.NONE); break; } // // Rule 493: ClassModifiersopt ::= ClassModifiers // case 493: break; // // Rule 494: Annotationsopt ::= // case 494: btParser.setSym1(null); break; // // Rule 495: Annotationsopt ::= Annotations // case 495: bad_rule = 495; break; // // Rule 496: TypeDeclarationsopt ::= // case 496: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 497: TypeDeclarationsopt ::= TypeDeclarations // case 497: break; // // Rule 498: ImportDeclarationsopt ::= // case 498: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 499: ImportDeclarationsopt ::= ImportDeclarations // case 499: break; // // Rule 500: PackageDeclarationopt ::= // case 500: btParser.setSym1(null); break; // // Rule 501: PackageDeclarationopt ::= PackageDeclaration // case 501: break; // // Rule 502: WildcardBoundsOpt ::= // case 502: btParser.setSym1(null); break; // // Rule 503: WildcardBoundsOpt ::= WildcardBounds // case 503: bad_rule = 503; break; // // Rule 504: AdditionalBoundListopt ::= // case 504: btParser.setSym1(null); break; // // Rule 505: AdditionalBoundListopt ::= AdditionalBoundList // case 505: bad_rule = 505; break; // // Rule 506: TypeBoundopt ::= // case 506: btParser.setSym1(null); break; // // Rule 507: TypeBoundopt ::= TypeBound // case 507: bad_rule = 507; break; // // Rule 508: TypeArgumentsopt ::= // case 508: btParser.setSym1(null); break; // // Rule 509: TypeArgumentsopt ::= TypeArguments // case 509: bad_rule = 509; break; // // Rule 510: Commentsopt ::= // case 510: btParser.setSym1(null); break; // // Rule 511: Commentsopt ::= Comments // case 511: break; // // Rule 512: Type ::= DataType PlaceTypeSpecifieropt // case 512: { assert(btParser.getSym(2) == null); //btParser.setSym1(); break; } // // Rule 513: Type ::= nullable LESS Type GREATER // case 513: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 514: Type ::= future LESS Type GREATER // case 514: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 515: Type ::= boxed LESS Type GREATER // case 515: bad_rule = 515; break; // // Rule 516: Type ::= fun LESS Type COMMA Type GREATER // case 516: bad_rule = 516; break; // // Rule 517: DataType ::= PrimitiveType // case 517: break; // // Rule 518: DataType ::= ClassOrInterfaceType // case 518: break; // // Rule 519: DataType ::= ArrayType // case 519: break; // // Rule 520: PlaceTypeSpecifier ::= AT PlaceType // case 520: bad_rule = 520; break; // // Rule 521: PlaceType ::= place // case 521: break; // // Rule 522: PlaceType ::= activity // case 522: break; // // Rule 523: PlaceType ::= method // case 523: break; // // Rule 524: PlaceType ::= current // case 524: break; // // Rule 525: PlaceType ::= PlaceExpression // case 525: break; // // Rule 526: ClassOrInterfaceType ::= TypeName DepParametersopt // case 526: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 527: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 527: break; // // Rule 528: DepParameterExpr ::= ArgumentList WhereClauseopt // case 528: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 529: DepParameterExpr ::= WhereClause // case 529: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 530: WhereClause ::= COLON Expression // case 530: break; // // Rule 532: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 533: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 533: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 534: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 534: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 535: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 535: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 536: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 536: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 537: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 537: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 538: ObjectKind ::= value // case 538: bad_rule = 538; break; // // Rule 539: ObjectKind ::= reference // case 539: bad_rule = 539; break; // // Rule 540: MethodModifier ::= atomic // case 540: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 541: MethodModifier ::= extern // case 541: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 542: ClassDeclaration ::= ValueClassDeclaration // case 542: break; // // Rule 543: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 543: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 544: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 544: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 545: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET RBRACKET ArrayInitializer // case 545: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 546: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET // case 546: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 547: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET Expression // case 547: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, d)); break; } // // Rule 548: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET // case 548: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 549: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET Expression // case 549: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 550: ArrayBaseType ::= PrimitiveType // case 550: break; // // Rule 551: ArrayBaseType ::= ClassOrInterfaceType // case 551: break; // // Rule 552: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 552: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 553: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 553: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 554: Statement ::= NowStatement // case 554: break; // // Rule 555: Statement ::= ClockedStatement // case 555: break; // // Rule 556: Statement ::= AsyncStatement // case 556: break; // // Rule 557: Statement ::= AtomicStatement // case 557: break; // // Rule 558: Statement ::= WhenStatement // case 558: break; // // Rule 559: Statement ::= ForEachStatement // case 559: break; // // Rule 560: Statement ::= AtEachStatement // case 560: break; // // Rule 561: Statement ::= FinishStatement // case 561: break; // // Rule 562: StatementWithoutTrailingSubstatement ::= NextStatement // case 562: break; // // Rule 563: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 563: break; // // Rule 564: StatementNoShortIf ::= NowStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= ClockedStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= AsyncStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtomicStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= WhenStatementNoShortIf // case 568: break; // // Rule 569: StatementNoShortIf ::= ForEachStatementNoShortIf // case 569: break; // // Rule 570: StatementNoShortIf ::= AtEachStatementNoShortIf // case 570: break; // // Rule 571: StatementNoShortIf ::= FinishStatementNoShortIf // case 571: break; // // Rule 572: NowStatement ::= now LPAREN Clock RPAREN Statement // case 572: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 573: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 573: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 574: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 574: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 575: AsyncStatement ::= async LPAREN here RPAREN Statement // case 575: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 576: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 576: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 577: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 577: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 578: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 578: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 579: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 579: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 580: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 580: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 581: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 581: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 582: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 582: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 583: FinishStatement ::= finish Statement // case 583: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 584: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 584: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 585: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 585: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 586: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 586: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 587: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 587: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 588: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 588: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 589: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 589: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 590: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 590: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 591: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 591: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 592: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 592: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 593: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 593: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 594: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 594: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 595: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 595: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 596: PlaceExpression ::= here // case 596: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 597: PlaceExpression ::= this // case 597: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 598: PlaceExpression ::= Expression // case 598: break; // // Rule 599: PlaceExpression ::= ArrayAccess // case 599: bad_rule = 599; break; // // Rule 600: NextStatement ::= next SEMICOLON // case 600: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 601: AwaitStatement ::= await Expression SEMICOLON // case 601: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 602: ClockList ::= Clock // case 602: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 603: ClockList ::= ClockList COMMA Clock // case 603: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 604: Clock ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 605: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 605: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 606: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 606: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 607: RelationalExpression ::= RelationalExpression instanceof Type // case 607: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 608: ExpressionName ::= here // case 608: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return nf.Here(pos); } }); break; } // // Rule 609: Primary ::= FutureExpression // case 609: break; // // Rule 610: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 610: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 611: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 611: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 612: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: ConcreteDistributionopt ::= // case 631: btParser.setSym1(null); break; // // Rule 632: ConcreteDistributionopt ::= ConcreteDistribution // case 632: break; // // Rule 633: PlaceExpressionSingleListopt ::= // case 633: btParser.setSym1(null); break; // // Rule 634: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 634: break; // // Rule 635: ArgumentListopt ::= // case 635: btParser.setSym1(null); break; // // Rule 636: ArgumentListopt ::= ArgumentList // case 636: break; // // Rule 637: DepParametersopt ::= // case 637: btParser.setSym1(null); break; // // Rule 638: DepParametersopt ::= DepParameters // case 638: break; // // Rule 639: Unsafeopt ::= // case 639: btParser.setSym1(null); break; // // Rule 640: Unsafeopt ::= unsafe // case 640: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } default: break; } return; }
1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/10b0c7616a7abbf0fc08b5455c9818b3be9b7cbc/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, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1720, 1803, 12, 474, 1720, 1854, 13, 565, 288, 3639, 309, 261, 8759, 67, 5345, 480, 374, 13, 5411, 327, 31, 3639, 1620, 261, 5345, 1854, 13, 3639, 288, 2398, 368, 5411, 368, ...
System.out.println(" " + (next.line1+i+1) + ">:" + code1[next.line1 + i]);
private void compute(Diff.change next) { if (next == null) return;//System.out.println("\nAnalysing hunk (" + next.line0 + "," + next.line1 + "," + next.deleted + "," + next.inserted + ")"); if (next.inserted == 0 && next.deleted == 0) return; if (next.inserted == 0) { // no inserted => #deleted lines beggining at line0+1 deleted in a for (int i = 0; i < next.deleted; i++) { lineDiffs.add(new LineDiff(code0[next.line0 + i], next.line0+i, null, LineDiff.ChangeType.DELETED));//System.out.println(" " + (next.line0+i+1) + "< " + code0[next.line0 + i]); } } if (next.inserted != 0 && next.deleted == 0) { // no deleted => #inserted lines beggining at line1+1 deleted in b for (int i = 0; i < next.inserted; i++) { lineDiffs.add(new LineDiff(null, next.line1+i, code1[next.line1 + i], LineDiff.ChangeType.INSERTED));//System.out.println(" " + (next.line1+i+1) + "> " + code1[next.line1 + i]); } } if (next.inserted != 0 && next.deleted != 0) { assert(next.line0 == next.line1); // TODO: Check this! Is it really o.k.? It happens from time to time //if (next.line0 != next.line1) System.out.println("\nProblematic hunk (" + next.line0 + "," + next.line1 + "," + next.deleted + "," + next.inserted + ")"); int affected = (next.deleted > next.inserted ? next.deleted : next.inserted); for (int i = 0; i < affected; i++) { if (i < next.inserted && i < next.deleted) { lineDiffs.add(new LineDiff(code0[next.line0 + i], next.line0+i, code1[next.line1 + i], LineDiff.ChangeType.CHANGED));//System.out.println(" " + (next.line0+i+1) + "<> " + code0[next.line0 + i]);//System.out.println(" " + (next.line1+i+1) + ">< " + code1[next.line1 + i]); } else if (i >= next.inserted && i < next.deleted) { lineDiffs.add(new LineDiff(code0[next.line0 + i], next.line0+i, null, LineDiff.ChangeType.DELETED));//System.out.println(" " + (next.line0+i+1) + "< " + code0[next.line0 + i]); } else if (i < next.inserted && i >= next.deleted) { lineDiffs.add(new LineDiff(null, next.line1+i, code1[next.line1 + i], LineDiff.ChangeType.INSERTED));//System.out.println(" " + (next.line1+i+1) + "> " + code1[next.line1 + i]); } else assert (false); } } }
239 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/239/628682d2ec645f88e76e2a515a4e0dbcb5937672/CodechangeDifferIntermediateModule.java/clean/modules/ECG_CodechangeDifferIntermediateModule/src/org/electrocodeogram/module/intermediate/implementation/CodechangeDifferIntermediateModule.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 3163, 18, 659, 18, 8222, 2932, 225, 315, 397, 261, 4285, 18, 1369, 21, 15, 77, 15, 21, 13, 397, 14402, 2773, 397, 981, 21, 63, 4285, 18, 1369, 21, 397, 277, 19226, 918, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1152, 3163, 18, 659, 18, 8222, 2932, 225, 315, 397, 261, 4285, 18, 1369, 21, 15, 77, 15, 21, 13, 397, 14402, 2773, 397, 981, 21, 63, 4285, 18, 1369, 21, 397, 277, 19226, 918, ...
final VM_Method getClassInitializerMethod() {
final VM_Method getClassInitializerMethod() throws VM_PragmaUninterruptible {
final VM_Method getClassInitializerMethod() { if (VM.VerifyAssertions) VM.assert(isLoaded()); return classInitializerMethod; }
4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/4a987a25f93ceebb0f47a68989f48a184a7ef4ca/VM_Class.java/clean/rvm/src/vm/classLoader/VM_Class.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 8251, 67, 1305, 2900, 14729, 1305, 1435, 1216, 8251, 67, 2050, 9454, 984, 31847, 1523, 288, 565, 309, 261, 7397, 18, 8097, 8213, 1115, 13, 8251, 18, 11231, 12, 291, 8835, 10663, 565,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 8251, 67, 1305, 2900, 14729, 1305, 1435, 1216, 8251, 67, 2050, 9454, 984, 31847, 1523, 288, 565, 309, 261, 7397, 18, 8097, 8213, 1115, 13, 8251, 18, 11231, 12, 291, 8835, 10663, 565,...
cDigestBase.defineSingletonMethod("digest",basecb.getSingletonMethod("s_digest",RubyString.class)); cDigestBase.defineSingletonMethod("hexdigest",basecb.getSingletonMethod("s_hexdigest",RubyString.class));
cDigestBase.defineSingletonMethod("digest",basecb.getSingletonMethod("s_digest",IRubyObject.class)); cDigestBase.defineSingletonMethod("hexdigest",basecb.getSingletonMethod("s_hexdigest",IRubyObject.class));
public static void createDigest(IRuby runtime) { RubyModule mDigest = runtime.defineModule("Digest"); RubyClass cDigestBase = mDigest.defineClassUnder("Base",runtime.getObject()); CallbackFactory basecb = runtime.callbackFactory(Base.class); cDigestBase.defineSingletonMethod("new",basecb.getOptSingletonMethod("newInstance")); cDigestBase.defineSingletonMethod("digest",basecb.getSingletonMethod("s_digest",RubyString.class)); cDigestBase.defineSingletonMethod("hexdigest",basecb.getSingletonMethod("s_hexdigest",RubyString.class)); cDigestBase.defineMethod("initialize",basecb.getOptMethod("initialize")); cDigestBase.defineMethod("initialize_copy",basecb.getMethod("initialize_copy",IRubyObject.class)); cDigestBase.defineMethod("clone",basecb.getMethod("rbClone")); cDigestBase.defineMethod("update",basecb.getMethod("update",IRubyObject.class)); cDigestBase.defineMethod("<<",basecb.getMethod("update",IRubyObject.class)); cDigestBase.defineMethod("digest",basecb.getMethod("digest")); cDigestBase.defineMethod("hexdigest",basecb.getMethod("hexdigest")); cDigestBase.defineMethod("to_s",basecb.getMethod("hexdigest")); cDigestBase.defineMethod("==",basecb.getMethod("eq",IRubyObject.class)); }
46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/af3894ea0dfb3e47ce20ec84c999cbcb97567438/RubyDigest.java/buggy/src/org/jruby/RubyDigest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 752, 9568, 12, 7937, 10340, 3099, 13, 288, 3639, 19817, 3120, 312, 9568, 273, 3099, 18, 11255, 3120, 2932, 9568, 8863, 3639, 19817, 797, 276, 9568, 2171, 273, 312, 9568, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 9568, 12, 7937, 10340, 3099, 13, 288, 3639, 19817, 3120, 312, 9568, 273, 3099, 18, 11255, 3120, 2932, 9568, 8863, 3639, 19817, 797, 276, 9568, 2171, 273, 312, 9568, 1...
if (baseSpec.startsWith(FILE_SCHEME)) baseURL = new File(baseSpec.substring(5)).toURL(); else
if (baseSpec.startsWith(FILE_SCHEME)) { File child = new File(baseSpec.substring(5)); baseURL = child.isAbsolute() ? child.toURL() : new File(parent, child.getPath()).toURL(); } else
private static URL searchForBundle(String name, String parent) throws MalformedURLException { URL url = null; File fileLocation = null; boolean reference = false; try { url = new URL(name); } catch (MalformedURLException e) { // TODO this is legacy support for non-URL names. It should be removed eventually. // if name was not a URL then construct one. // Assume it should be a reference and htat it is relative. This support need not // be robust as it is temporary.. fileLocation = new File(parent, name); url = new URL(REFERENCE_PROTOCOL, null, FILE_SCHEME + fileLocation.toString()); reference = true; } // if the name was a URL then see if it is relative. If so, insert syspath. if (!reference) { URL baseURL = url; // if it is a reference URL then strip off the reference: and set base to the file:... if (url.getProtocol().equals(REFERENCE_PROTOCOL)) { reference = true; String baseSpec = url.getFile(); if (baseSpec.startsWith(FILE_SCHEME)) baseURL = new File(baseSpec.substring(5)).toURL(); else baseURL = new URL(baseSpec); } fileLocation = new File(baseURL.getFile()); // if the location is relative, prefix it with the parent if (!fileLocation.isAbsolute()) fileLocation = new File(parent, fileLocation.toString()); } // If the result is a reference then search for the real result and // reconstruct the answer. if (reference) { String result = searchFor(fileLocation.getName(), new File(fileLocation.getParent()).getAbsolutePath()); if (result != null) url = new URL(REFERENCE_PROTOCOL, null, FILE_SCHEME + result); else return null; } // finally we have something worth trying try { URLConnection result = url.openConnection(); result.connect(); return url; } catch (IOException e) { // int i = location.lastIndexOf('_'); // return i == -1? location : location.substring(0, i); return null; } }
2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/7b05dd6b649dd2452f4107053e4e3c2ab89f01d0/EclipseStarter.java/clean/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1976, 1623, 1290, 3405, 12, 780, 508, 16, 514, 982, 13, 1216, 20710, 288, 202, 202, 1785, 880, 273, 446, 31, 202, 202, 812, 585, 2735, 273, 446, 31, 202, 202, 6494, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1976, 1623, 1290, 3405, 12, 780, 508, 16, 514, 982, 13, 1216, 20710, 288, 202, 202, 1785, 880, 273, 446, 31, 202, 202, 812, 585, 2735, 273, 446, 31, 202, 202, 6494, 21...
loadAttributeList();
public NodeInfo(CollectionAgent agent, String collectionName) { m_agent = agent; m_collectionName = collectionName; loadAttributeList(); }
11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/7d3dd9c5c505cae507a7524a6d4504bb28f24852/NodeInfo.java/clean/src/services/org/opennms/netmgt/collectd/NodeInfo.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 26971, 12, 2532, 3630, 4040, 16, 514, 17137, 13, 288, 377, 202, 81, 67, 5629, 273, 4040, 31, 377, 202, 81, 67, 5548, 461, 273, 17137, 31, 377, 202, 282, 289, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26971, 12, 2532, 3630, 4040, 16, 514, 17137, 13, 288, 377, 202, 81, 67, 5629, 273, 4040, 31, 377, 202, 81, 67, 5548, 461, 273, 17137, 31, 377, 202, 282, 289, 2, -100, -100, -100...
}
public HTMLWriter(String fileName, String encoding) throws FileNotFoundException, UnsupportedEncodingException { this.encoding = encoding; writer = new StringWriter(); FileOutputStream fos = new FileOutputStream(fileName); OutputStreamWriter osw; if( encoding!=null ) { HTML_META = "<meta http-equiv=\"content-type\" content=\"text/html; charset="+encoding+"\" />"; // NOI18N XML_HEADER = "<?xml version=\"1.0\" encoding=\""+encoding+"\"?>"; // NOI18N osw = new OutputStreamWriter(fos, encoding); } else osw = new OutputStreamWriter(fos); realWriter = new BufferedWriter(osw); }
8797 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8797/602c6109103dbb2d06aeb8374170c581fbbf6dbd/HTMLWriter.java/clean/src/org/omegat/filters2/html2/HTMLWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3982, 2289, 12, 780, 3968, 16, 514, 2688, 13, 1216, 2398, 13707, 16, 15367, 565, 288, 3639, 333, 18, 5999, 273, 2688, 31, 3639, 2633, 273, 394, 17436, 5621, 3639, 12942, 17615, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3982, 2289, 12, 780, 3968, 16, 514, 2688, 13, 1216, 2398, 13707, 16, 15367, 565, 288, 3639, 333, 18, 5999, 273, 2688, 31, 3639, 2633, 273, 394, 17436, 5621, 3639, 12942, 17615, 273,...
Map result = new HashMap();
final Map fields = new HashMap();
public Map readFieldsFromStream() { Map result = new HashMap(); reader.moveDown(); if (reader.getNodeName().equals(ELEMENT_FIELDS)) { // Maintain compatability with XStream 1.1.0 while (reader.hasMoreChildren()) { reader.moveDown(); if (!reader.getNodeName().equals(ELEMENT_FIELD)) { throw new ConversionException("Expected <" + ELEMENT_FIELD + "/> element inside <" + ELEMENT_FIELD + "/>"); } String name = reader.getAttribute(ATTRIBUTE_NAME); Class type = mapper.realClass(reader.getAttribute(ATTRIBUTE_CLASS)); Object value = context.convertAnother(result, type); result.put(name, value); reader.moveUp(); } } else if (reader.getNodeName().equals(ELEMENT_DEFAULT)) { // New format introduced in XStream 1.1.1 ObjectStreamClass objectStreamClass = ObjectStreamClass.lookup(currentType[0]); while (reader.hasMoreChildren()) { reader.moveDown(); String name = reader.getNodeName(); String typeName = reader.getAttribute(ATTRIBUTE_CLASS); Class type; if (typeName != null) { type = mapper.realClass(typeName); } else { ObjectStreamField field = objectStreamClass.getField(name); if (field == null) { throw new ObjectAccessException("Class " + currentType[0] + " does not contain a field named '" + name + "'"); } type = field.getType(); } Object value = context.convertAnother(result, type); result.put(name, value); reader.moveUp(); } } else { throw new ConversionException("Expected <" + ELEMENT_FIELDS + "/> or <" + ELEMENT_DEFAULT + "/> element when calling ObjectInputStream.readFields()"); } reader.moveUp(); return result; }
5142 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5142/2804901143bd4fda16bb871d1a78d34230842919/SerializableConverter.java/buggy/xstream/src/java/com/thoughtworks/xstream/converters/reflection/SerializableConverter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1635, 855, 2314, 1265, 1228, 1435, 288, 7734, 727, 1635, 1466, 273, 394, 4317, 5621, 7734, 2949, 18, 8501, 4164, 5621, 7734, 309, 261, 10530, 18, 588, 18948, 7675, 14963, 12, 10976, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 1635, 855, 2314, 1265, 1228, 1435, 288, 7734, 727, 1635, 1466, 273, 394, 4317, 5621, 7734, 2949, 18, 8501, 4164, 5621, 7734, 309, 261, 10530, 18, 588, 18948, 7675, 14963, 12, 10976, ...
ConcreteMarker next = currentList.getMarker((IMarker) removes
Object next = currentList.getMarker((IMarker) removes
private Collection getExistingMarkers(Collection existingMarkers) { if (existingMarkers.isEmpty()) return Util.EMPTY_COLLECTION; Collection toRemove = new ArrayList(); MarkerList currentList = getCurrentMarkers(); Iterator removes = existingMarkers.iterator(); while (removes.hasNext()) { ConcreteMarker next = currentList.getMarker((IMarker) removes .next()); if (next != null) toRemove.add(next); } return toRemove; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/3f185ef8a49c26ebe7720178f59c9e9cefafc3ad/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 2200, 336, 9895, 21644, 12, 2532, 2062, 21644, 13, 288, 1082, 202, 430, 261, 11711, 21644, 18, 291, 1921, 10756, 9506, 202, 2463, 3564, 18, 13625, 67, 25964, 31, 1082, 202, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1152, 2200, 336, 9895, 21644, 12, 2532, 2062, 21644, 13, 288, 1082, 202, 430, 261, 11711, 21644, 18, 291, 1921, 10756, 9506, 202, 2463, 3564, 18, 13625, 67, 25964, 31, 1082, 202, 25...
Reader r = new UnfoldingReader(reader);
public static ZVCalendar build(Reader reader) throws ServiceException { BufferedReader br = new BufferedReader(reader); reader = br; try { reader.mark(32000); } catch(IOException e) { e.printStackTrace(); } CalendarParser parser = new CalendarParserImpl(); ZContentHandler handler = new ZContentHandler(); try { parser.parse(new UnfoldingReader(reader), handler); } catch(IOException e) { throw ServiceException.FAILURE("Caught IOException parsing calendar: "+e, e); } catch(ParserException e) { StringBuilder s = new StringBuilder("Caught ParseException parsing calendar: "+e); try { reader.reset(); Reader r = new UnfoldingReader(reader); s.append('\n'); while(r.ready()) { s.append((char)(r.read())); } } catch(IOException ioe) { ioe.printStackTrace(); } throw ServiceException.FAILURE(s.toString(), e); } return handler.mCal; }
6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/1ab4fc8e511278bdb1430125ac82f69f8eb3310d/ZCalendar.java/buggy/ZimbraServer/src/java/com/zimbra/cs/mailbox/calendar/ZCalendar.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 760, 2285, 58, 7335, 1361, 12, 2514, 2949, 13, 1216, 16489, 288, 5411, 10633, 5186, 273, 394, 10633, 12, 10530, 1769, 5411, 2949, 273, 5186, 31, 5411, 775, 288, 7734, 2949, 18, 3355...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 760, 2285, 58, 7335, 1361, 12, 2514, 2949, 13, 1216, 16489, 288, 5411, 10633, 5186, 273, 394, 10633, 12, 10530, 1769, 5411, 2949, 273, 5186, 31, 5411, 775, 288, 7734, 2949, 18, 3355...
System.out.println("Read Address (0x000008 and 0x00001C) = " + asHex(bytes));
System.out.println("Read Address (0x000008 and 0x00001C) = " + asHex(bytes));
public static void main(String... args) { Protocol protocol = ProtocolFactory.getInstance().getProtocol("SSM"); byte[] bytes = protocol.constructEcuInitRequest(); System.out.println("Ecu Init = " + asHex(bytes)); bytes = protocol.constructReadAddressRequest(asBytes("0x000008"), asBytes("0x00001C")); System.out.println("Read Address (0x000008 and 0x00001C) = " + asHex(bytes)); bytes = protocol.constructReadMemoryRequest(asBytes("0x200000"), 128); System.out.println("Read Memory (from 0x200000, 128 bytes) = " + asHex(bytes)); }
48870 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48870/6d8b93ef0b928b7a726fb30dd265bef8253c864d/SSMProtocol.java/clean/src/enginuity/logger/protocol/SSMProtocol.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 2774, 12, 780, 2777, 833, 13, 288, 3639, 4547, 1771, 273, 4547, 1733, 18, 588, 1442, 7675, 588, 5752, 2932, 1260, 49, 8863, 3639, 1160, 8526, 1731, 273, 1771, 18, 10062, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2777, 833, 13, 288, 3639, 4547, 1771, 273, 4547, 1733, 18, 588, 1442, 7675, 588, 5752, 2932, 1260, 49, 8863, 3639, 1160, 8526, 1731, 273, 1771, 18, 10062, ...
if (!ISSPACE(c)) {
if (!isSpace(c)) {
private int parse_quotedwords(int term, int paren) { Node qwords = null; int strstart; int c; int nest = 0; strstart = ruby.getSourceLine(); newtok(); c = nextc(); while (ISSPACE(c)) { c = nextc(); } /* * skip preceding spaces */ pushback(c); while ((c = nextc()) != term || nest > 0) { if (c == -1) { ruby.setSourceLine(strstart); ph.rb_compile_error("unterminated string meets end of file"); return 0; } if (c == '\\') { c = nextc(); switch (c) { case '\n' : continue; case '\\' : c = '\\'; break; default : if (c == term || (paren != 0 && c == paren)) { tokadd(c); continue; } if (!ISSPACE(c)) { tokadd('\\'); } break; } } else if (ISSPACE(c)) { tokfix(); Node str = nf.newStr(RubyString.newString(ruby, tok(), toklen())); newtok(); if (qwords == null) { qwords = nf.newList(str); } else { ph.list_append(qwords, str); } c = nextc(); while (ISSPACE(c)) { c = nextc(); } // skip continuous spaces pushback(c); continue; } if (paren != 0) { if (c == paren) { nest++; } if (c == term && nest-- == 0) { break; } } tokadd(c); } tokfix(); if (toklen() > 0) { Node str = nf.newStr(RubyString.newString(ruby, tok(), toklen())); if (qwords == null) { qwords = nf.newList(str); } else { ph.list_append(qwords, str); } } if (qwords == null) { qwords = nf.newZArray(); } yyVal = qwords; ph.setLexState(LexState.EXPR_END); return Token.tDSTRING; }
46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d31a76ee29d5978a9bec41e3ac9134cee024bcab/DefaultRubyScanner.java/clean/org/jruby/parser/DefaultRubyScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 509, 1109, 67, 15179, 3753, 12, 474, 2481, 16, 509, 22146, 13, 288, 3639, 2029, 1043, 3753, 273, 446, 31, 3639, 509, 609, 1937, 31, 3639, 509, 276, 31, 3639, 509, 15095, 273, 374,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 67, 15179, 3753, 12, 474, 2481, 16, 509, 22146, 13, 288, 3639, 2029, 1043, 3753, 273, 446, 31, 3639, 509, 609, 1937, 31, 3639, 509, 276, 31, 3639, 509, 15095, 273, 374,...
cbVisible.setEnabled( bState );
public void setEnabled( boolean bState ) { boolean bEnableUI = true; if ( this.bVisibilityEnabled ) { bEnableUI = cbVisible.getSelection( ); } setVisibleState( bState & bEnableUI ); cbVisible.setEnabled( bState ); grpAttributes.setEnabled( bState ); this.bEnabled = bState; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/c2dd0ce7a0333e0b49545e8c079ade8adc6ac0c8/LabelAttributesComposite.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/LabelAttributesComposite.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 12888, 12, 1250, 324, 1119, 262, 202, 95, 202, 202, 6494, 324, 8317, 5370, 273, 638, 31, 202, 202, 430, 261, 333, 18, 70, 10135, 1526, 262, 202, 202, 95, 1082, 202, 70,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12888, 12, 1250, 324, 1119, 262, 202, 95, 202, 202, 6494, 324, 8317, 5370, 273, 638, 31, 202, 202, 430, 261, 333, 18, 70, 10135, 1526, 262, 202, 202, 95, 1082, 202, 70,...
page = ( (FormEditor) editor ).getActivePageInstance( );
page = ( (MultiPageReportEditor) editor ).getCurrentPageInstance( );
private SourceViewer getViewer( ) { IEditorPart activeEditor = PlatformUI.getWorkbench( ) .getActiveWorkbenchWindow( ) .getActivePage( ) .getActiveEditor( ); IFormPage page = null; if ( activeEditor instanceof MultiPageReportEditor ) { page = ( (MultiPageReportEditor) activeEditor ).getActivePageInstance( ); } else if ( activeEditor instanceof IReportEditor ) { IEditorPart editor = ( (IReportEditor) activeEditor ).getEditorPart( ); if ( editor instanceof FormEditor ) { page = ( (FormEditor) editor ).getActivePageInstance( ); } } if ( page instanceof ReportScriptFormPage ) { if ( ( (ReportScriptFormPage) page ).getScriptEditor( ) instanceof JSEditor ) { return ( (JSEditor) ( (ReportScriptFormPage) page ).getScriptEditor( ) ).getViewer( ); } } return null; }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/b240651a7b95a8fa44d683f5f9fe03804b7e68af/TreeViewPalettePage.java/clean/UI/org.eclipse.birt.report.designer.ui.editors.schematic/src/org/eclipse/birt/report/designer/internal/ui/editors/script/TreeViewPalettePage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 4998, 18415, 8893, 264, 12, 262, 202, 95, 202, 202, 45, 6946, 1988, 2695, 6946, 273, 11810, 5370, 18, 588, 2421, 22144, 12, 262, 9506, 202, 18, 588, 3896, 2421, 22144, 3829, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4998, 18415, 8893, 264, 12, 262, 202, 95, 202, 202, 45, 6946, 1988, 2695, 6946, 273, 11810, 5370, 18, 588, 2421, 22144, 12, 262, 9506, 202, 18, 588, 3896, 2421, 22144, 3829, ...
public static WritableRaster createWritableRaster(SampleModel sm, Point location) {
public static WritableRaster createWritableRaster(SampleModel sm, Point location) {
public static WritableRaster createWritableRaster(SampleModel sm, Point location) { return new WritableRaster(sm, location); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2d7debfa0b9e176eb89b1dd2089f53cb5079cc16/Raster.java/buggy/core/src/classpath/java/java/awt/image/Raster.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 14505, 18637, 752, 12061, 18637, 12, 8504, 1488, 3029, 16, 4686, 2117, 13, 288, 202, 202, 2463, 394, 14505, 18637, 12, 4808, 16, 2117, 1769, 202, 97, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 14505, 18637, 752, 12061, 18637, 12, 8504, 1488, 3029, 16, 4686, 2117, 13, 288, 202, 202, 2463, 394, 14505, 18637, 12, 4808, 16, 2117, 1769, 202, 97, 2, -100, -100, -100, ...
continue; } if (openQuote != 0) { if (c == openQuote) { nest++; } if (c == closeQuote && nest-- == 0) { break; } } stringToken.append((char) c); }
continue; } if (openQuote != 0) { if (c == openQuote) { nest++; } if (c == closeQuote && nest-- == 0) { break; } } stringToken.append((char) c); }
private int parseQuotedWords(int closeQuote, int openQuote) { int c = nextc(); ISourcePosition position = support.getPosition(); // Skip preceding spaces. while (isSpace(c)) { c = nextc(); } pushback(c); ArrayNode qwords = new ArrayNode(position); // FIX int nest = 0; StringBuffer stringToken = new StringBuffer(); while ((c = nextc()) != closeQuote || nest > 0) { if (c == -1) { errorHandler.handleError(IErrors.COMPILE_ERROR, position, Messages.getString("unterminated_string")); //$NON-NLS-1$ return 0; } if (c == '\\') { c = nextc(); switch (c) { case '\n' : continue; case '\\' : c = '\\'; break; default : if (c == closeQuote || (openQuote != 0 && c == openQuote)) { stringToken.append((char) c); continue; } if (!isSpace(c)) { stringToken.append('\\'); } break; } } else if (isSpace(c)) { qwords.add(new StrNode(support.getPosition(), stringToken.toString())); stringToken.setLength(0); //Benoit: reset the buffer // skip continuous spaces c = nextc(); while (isSpace(c)) { c = nextc(); } pushback(c); continue; } if (openQuote != 0) { if (c == openQuote) { nest++; } if (c == closeQuote && nest-- == 0) { break; } } stringToken.append((char) c); } if (stringToken.length() > 0) { qwords.add(new StrNode(support.getPosition(), stringToken.toString())); } lexState = LexState.EXPR_END; yaccValue = qwords; return Token.tARRAY; }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/af104711597d4d5b2089320e2517b95b8df14492/RubyYaccLexer.java/buggy/org/jruby/lexer/yacc/RubyYaccLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 509, 1109, 15919, 7363, 12, 474, 1746, 10257, 16, 509, 1696, 10257, 13, 288, 202, 202, 474, 276, 273, 1024, 71, 5621, 202, 202, 45, 1830, 2555, 1754, 273, 2865, 18, 588, 2555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 1109, 15919, 7363, 12, 474, 1746, 10257, 16, 509, 1696, 10257, 13, 288, 202, 202, 474, 276, 273, 1024, 71, 5621, 202, 202, 45, 1830, 2555, 1754, 273, 2865, 18, 588, 2555...
if (jj_3R_304()) return true;
if (jj_scan_token(EQ)) return true;
final private boolean jj_3R_298() { if (jj_3R_304()) return true; return false; }
41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/1d8de6b34ea0ddb64fc94b478c0950c0d35de605/JavaParser.java/buggy/pmd/src/net/sourceforge/pmd/ast/JavaParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 5540, 28, 1435, 288, 565, 309, 261, 78, 78, 67, 9871, 67, 2316, 12, 27247, 3719, 327, 638, 31, 565, 327, 629, 31, 225, 289, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 727, 3238, 1250, 10684, 67, 23, 54, 67, 5540, 28, 1435, 288, 565, 309, 261, 78, 78, 67, 9871, 67, 2316, 12, 27247, 3719, 327, 638, 31, 565, 327, 629, 31, 225, 289, 2, -100, -100, -1...
NativeJavaMethod.signature(args),
NativeJavaMethod.scriptSignature(args),
static Member findFunction(Member[] methodsOrCtors, Object[] args) { if (methodsOrCtors.length == 0) return null; boolean hasMethods = methodsOrCtors[0] instanceof Method; if (Context.useJSObject && NativeJavaObject.jsObjectClass != null) { try { for (int i = 0; i < args.length; i++) { if (NativeJavaObject.jsObjectClass.isInstance(args[i])) args[i] = NativeJavaObject.jsObjectGetScriptable.invoke( args[i], ScriptRuntime.emptyArgs); } } catch (InvocationTargetException e) { // Just abandon conversion from JSObject } catch (IllegalAccessException e) { // Just abandon conversion from JSObject } } Member bestFit = null; Class[] bestFitTypes = null; java.util.Vector ambiguousMethods = null; for (int i = 0; i < methodsOrCtors.length; i++) { Member member = methodsOrCtors[i]; Class paramTypes[] = hasMethods ? ((Method) member).getParameterTypes() : ((Constructor) member).getParameterTypes(); if (paramTypes.length != args.length) { continue; } if (bestFitTypes == null) { int j; for (j = 0; j < paramTypes.length; j++) { if (!NativeJavaObject.canConvert(args[j], paramTypes[j])) { if (debug) printDebug("Rejecting ", member, args); break; } } if (j == paramTypes.length) { if (debug) printDebug("Found ", member, args); bestFit = member; bestFitTypes = paramTypes; } } else { int preference = NativeJavaMethod.preferSignature(args, paramTypes, bestFitTypes); if (preference == PREFERENCE_AMBIGUOUS) { if (debug) printDebug("Deferring ", member, args); // add to "ambiguity list" if (ambiguousMethods == null) ambiguousMethods = new java.util.Vector(); ambiguousMethods.addElement(member); } else if (preference == PREFERENCE_FIRST_ARG) { if (debug) printDebug("Substituting ", member, args); bestFit = member; bestFitTypes = paramTypes; } else { if (debug) printDebug("Rejecting ", member, args); } } } if (ambiguousMethods == null) return bestFit; // Compare ambiguous methods with best fit, in case // the current best fit removes the ambiguities. for (int i = ambiguousMethods.size() - 1; i >= 0 ; i--) { Member member = (Member)ambiguousMethods.elementAt(i); Class paramTypes[] = hasMethods ? ((Method) member).getParameterTypes() : ((Constructor) member).getParameterTypes(); int preference = NativeJavaMethod.preferSignature(args, paramTypes, bestFitTypes); if (preference == PREFERENCE_FIRST_ARG) { if (debug) printDebug("Substituting ", member, args); bestFit = member; bestFitTypes = paramTypes; ambiguousMethods.removeElementAt(i); } else if (preference == PREFERENCE_SECOND_ARG) { if (debug) printDebug("Rejecting ", member, args); ambiguousMethods.removeElementAt(i); } else { if (debug) printDebug("UNRESOLVED: ", member, args); } } if (ambiguousMethods.size() > 0) { // PENDING: report remaining ambiguity StringBuffer buf = new StringBuffer(); boolean isCtor = (bestFit instanceof Constructor); ambiguousMethods.addElement(bestFit); for (int i = 0; i < ambiguousMethods.size(); i++) { if (i != 0) { buf.append(", "); } Member member = (Member)ambiguousMethods.elementAt(i); if (!isCtor) { Class rtnType = ((Method)member).getReturnType(); buf.append(rtnType); buf.append(' '); } buf.append(NativeJavaMethod.signature(member)); } String errMsg; if (isCtor) { Object errArgs[] = { bestFit.getName(), NativeJavaMethod.signature(args), buf.toString() }; errMsg = Context.getMessage("msg.constructor.ambiguous", errArgs); } else { Object errArgs[] = { bestFit.getDeclaringClass().getName(), bestFit.getName(), NativeJavaMethod.signature(args), buf.toString() }; errMsg = Context.getMessage("msg.method.ambiguous", errArgs); } throw Context.reportRuntimeError(errMsg); } return bestFit; }
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/a66a71b8d7fdff3115a1305db27d683777b6080b/NativeJavaMethod.java/buggy/js/rhino/org/mozilla/javascript/NativeJavaMethod.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 8596, 1104, 2083, 12, 4419, 8526, 2590, 1162, 39, 88, 1383, 16, 1033, 8526, 833, 13, 288, 3639, 309, 261, 5163, 1162, 39, 88, 1383, 18, 2469, 422, 374, 13, 5411, 327, 446, 31, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 8596, 1104, 2083, 12, 4419, 8526, 2590, 1162, 39, 88, 1383, 16, 1033, 8526, 833, 13, 288, 3639, 309, 261, 5163, 1162, 39, 88, 1383, 18, 2469, 422, 374, 13, 5411, 327, 446, 31, 36...
mExpandButton = new JButton ("Expand");
mExpandButton = new JButton ("Hide");
public PanelTreeFolder (JComponent top_component) { super(); setLayout (new BorderLayout()); add (Box.createHorizontalStrut(40), BorderLayout.WEST); mNorth = new JPanel(); mNorth.setLayout (new BoxLayout(mNorth, BoxLayout.X_AXIS)); add (mNorth, BorderLayout.NORTH); mExpandButton = new JButton ("Expand"); mNorth.add (mExpandButton); mNorth.add (top_component); mCenter = new JPanel(); mCenter.setLayout (new BoxLayout (mCenter, BoxLayout.Y_AXIS)); add (mCenter, BorderLayout.CENTER); mExpanded = true; mExpandButton.addActionListener (this); }
7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/069d3e2b19b6dc13a075194aa374ef703ed24197/PanelTreeFolder.java/buggy/modules/jackal/perfmonitor/org/vrjuggler/jccl/perfmonitor/PanelTreeFolder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 23641, 2471, 3899, 261, 46, 1841, 1760, 67, 4652, 13, 288, 3639, 2240, 5621, 3639, 18479, 261, 2704, 30814, 10663, 3639, 527, 261, 3514, 18, 2640, 14457, 1585, 322, 12, 7132, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23641, 2471, 3899, 261, 46, 1841, 1760, 67, 4652, 13, 288, 3639, 2240, 5621, 3639, 18479, 261, 2704, 30814, 10663, 3639, 527, 261, 3514, 18, 2640, 14457, 1585, 322, 12, 7132, 3631, ...
controller.getCurrentDomain().getIdDomain(), 0, 0, users);
controller.getSelectedDomain().getIdDomain(), 0, 0, users);
protected void readUsers() throws Exception { IncredibleHostingSystem usersDB = null; ArrayList users = new ArrayList(); ArrayList extUsers = new ArrayList(); try { usersDB = new IncredibleHostingSystem(); usersDB.open(); MailService mailService = usersDB.getMailService(); OperationStatus stat = mailService.getUsersInDomain( controller.getCurrentDomain().getIdDomain(), 0, 0, users); if ( ! OperationStatus.SUCCESS.equals(stat) ) { logger.info(this.getClass().getName() +".getUsers: Error: "+stat.getDescription()); this.setResult(stat.getDescription()); } else { Iterator eaIter = users.iterator(); for( int i=0; eaIter.hasNext(); ++i ) { extUsers.add(new ExtendedUser((User)eaIter.next())); } } } finally { try { usersDB.close(); } catch (Exception e) {}; } usersModel = new UsersDataModel(new ListDataModel(extUsers)); }
10413 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10413/860ab2d4c3eee878c2bb21c9db510e250ddbde3c/Users.java/clean/trunk/src/com/foo_baz/ihs/backing/mailservice/Users.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 855, 6588, 1435, 1216, 1185, 288, 202, 202, 14559, 1118, 1523, 2594, 310, 3163, 3677, 2290, 273, 446, 31, 202, 202, 19558, 3677, 273, 394, 2407, 5621, 202, 202, 19558, 111...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 855, 6588, 1435, 1216, 1185, 288, 202, 202, 14559, 1118, 1523, 2594, 310, 3163, 3677, 2290, 273, 446, 31, 202, 202, 19558, 3677, 273, 394, 2407, 5621, 202, 202, 19558, 111...
public String getDisplayName() {
public String getDisplayName(){
public String getDisplayName() { return "'for' loop where update or condition doesn't use loop variable"; }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForLoopThatDoesntUseLoopVariableInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/bugs/ForLoopThatDoesntUseLoopVariableInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 514, 22055, 1435, 95, 3639, 327, 2491, 1884, 11, 2798, 1625, 1089, 578, 2269, 3302, 1404, 999, 2798, 2190, 14432, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 514, 22055, 1435, 95, 3639, 327, 2491, 1884, 11, 2798, 1625, 1089, 578, 2269, 3302, 1404, 999, 2798, 2190, 14432, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key);
try{ host = InetAddress.getByName(host).getHostAddress(); }catch(Exception _){} TripleKey key = new TripleKey(host, port, csf); UnicastConnectionManager man = (UnicastConnectionManager)clients.get(key);
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) {//System.out.println("getInstance: " + port + "," + ssf); if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = new UnicastConnectionManager(port, ssf); if (debug) { nsmanager++; System.out.println("\n\n ****** " + nsmanager + " server managers.\n\n"); } // The provided port might not be the set port. key.port = man.serverPort; servers.put(key, man); } return (man);}
27835 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27835/e835c12a0e664d4b68ae8f0b19ddc7c28e3acf17/UnicastConnectionManager.java/buggy/libjava/gnu/java/rmi/server/UnicastConnectionManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 760, 3852, 1351, 12544, 1952, 1318, 3694, 12, 474, 1756, 16, 534, 7492, 2081, 4534, 1733, 5202, 74, 13, 288, 759, 3163, 18, 659, 18, 8222, 2932, 588, 1442, 30, 315, 397, 1756, 397, 575...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 3852, 1351, 12544, 1952, 1318, 3694, 12, 474, 1756, 16, 534, 7492, 2081, 4534, 1733, 5202, 74, 13, 288, 759, 3163, 18, 659, 18, 8222, 2932, 588, 1442, 30, 315, 397, 1756, 397, 575...
synchronized (currentlyNotifying) {
synchronized (TaskListNotificationManager.class) {
public static List<ITaskListNotification> getNotifications() { synchronized (currentlyNotifying) { return Collections.unmodifiableList(notifications); } }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/d039ebb0a7848e86b90d4756fe087ad97f5b9f4b/TaskListNotificationManager.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/TaskListNotificationManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 987, 32, 1285, 835, 682, 4386, 34, 336, 14111, 1435, 288, 202, 202, 22043, 261, 2972, 715, 9168, 310, 13, 288, 1082, 202, 2463, 5737, 18, 318, 13388, 682, 12, 15286, 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, 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, 760, 987, 32, 1285, 835, 682, 4386, 34, 336, 14111, 1435, 288, 202, 202, 22043, 261, 2972, 715, 9168, 310, 13, 288, 1082, 202, 2463, 5737, 18, 318, 13388, 682, 12, 15286, 1769...
storeResult("Topic1", totalTimeTaken);
Execution execution = createExecution("Topic1"); execution.addMeasurement(new Measurement("throughput", 1000 * (double)numMessages / totalTimeTaken)); pm.saveExecution(execution);
public void testTopic1() { log.info("Running test Topic1"); SenderJob sender = createDefaultSenderJob(testTopicName); sender.setNumMessages(10000); sender.setMsgSize(1024); sender.setMf(new BytesMessageMessageFactory()); sender.setTransacted(false); sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT); ReceiverJob receiver = createDefaultReceiverJob(testTopicName); receiver.setAckMode(Session.AUTO_ACKNOWLEDGE); receiver.setTransacted(false); JobTimings[] results = runJobs(new Job[] {sender, receiver}); /* * NB. * When we calculating the total time taken from first send to last receive, there is some * error involved due to the differences in network latency and other remoting overhead * when sending the jobs to be executed on potentially different remote machines. * We make the assumption that this this difference is very small compared with time taken * to run the tests as to be negligible. */ long totalTimeTaken = results[1].getTestTime() + results[1].getInitTime() - results[0].getInitTime(); storeResult("Topic1", totalTimeTaken); log.info("Test Topic1 finished"); }
3806 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3806/96f752d06dba37742f7716ee54f31f1982df763e/PerfRunner.java/clean/tests/src/org/jboss/test/messaging/jms/perf/PerfRunner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 1842, 6657, 21, 1435, 282, 288, 1377, 613, 18, 1376, 2932, 7051, 1842, 11789, 21, 8863, 5411, 15044, 2278, 5793, 273, 27346, 12021, 2278, 12, 3813, 6657, 461, 1769, 1377, 5793, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 6657, 21, 1435, 282, 288, 1377, 613, 18, 1376, 2932, 7051, 1842, 11789, 21, 8863, 5411, 15044, 2278, 5793, 273, 27346, 12021, 2278, 12, 3813, 6657, 461, 1769, 1377, 5793, ...
fail("MessageFormatException expected as value doesn't exist.");
fail("Exception Expected.");
private void testString(JMSMapMessage m) throws JMSException { Assert.assertFalse(m.getBoolean("message")); try { m.getByte("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } try { m.getShort("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } //Try bad reads try { m.getChar("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } try { m.getInt("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } try { m.getLong("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } //Try bad reads try { m.getFloat("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } //Try bad reads try { m.getDouble("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } //Try bad reads try { m.getBytes("message"); fail("MessageFormatException expected as value doesn't exist."); } catch (MessageFormatException nfe) { //normal execution } Assert.assertEquals(MESSAGE + m.getInt("messageNumber"), m.getString("message")); }
45585 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45585/dc3b5d32de80ec74031cc79dc32d982fd43c55ce/MapMessageTest.java/clean/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/MapMessageTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1842, 780, 12, 46, 3537, 863, 1079, 312, 13, 1216, 20343, 565, 288, 3639, 5452, 18, 11231, 8381, 12, 81, 18, 588, 5507, 2932, 2150, 7923, 1769, 3639, 775, 3639, 288, 5411, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1842, 780, 12, 46, 3537, 863, 1079, 312, 13, 1216, 20343, 565, 288, 3639, 5452, 18, 11231, 8381, 12, 81, 18, 588, 5507, 2932, 2150, 7923, 1769, 3639, 775, 3639, 288, 5411, 31...
public org.quickfix.field.SecurityType getSecurityType() throws FieldNotFound { org.quickfix.field.SecurityType value = new org.quickfix.field.SecurityType();
public quickfix.field.SecurityType getSecurityType() throws FieldNotFound { quickfix.field.SecurityType value = new quickfix.field.SecurityType();
public org.quickfix.field.SecurityType getSecurityType() throws FieldNotFound { org.quickfix.field.SecurityType value = new org.quickfix.field.SecurityType(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Advertisement.java/clean/src/java/src/quickfix/fix41/Advertisement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 19288, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 460, 273, 394, 2358, 18, 19525, 904, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 19288, 559, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 4368, 559, 460, 273, 394, 2358, 18, 19525, 904, 18...
public RegisterLayoutNode(DsfSession session) { super(session, IRegisters.IRegisterDMContext.class);
public RegisterLayoutNode(AbstractVMProvider provider, DsfSession session) { super(provider, session, IRegisters.IRegisterDMContext.class);
public RegisterLayoutNode(DsfSession session) { super(session, IRegisters.IRegisterDMContext.class); }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/b191075ec4d85f4cc588e7556be42d8f15e4745e/RegisterLayoutNode.java/clean/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5433, 3744, 907, 12, 40, 21668, 2157, 1339, 13, 288, 3639, 2240, 12, 3184, 16, 467, 10277, 18, 45, 3996, 16125, 1042, 18, 1106, 1769, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5433, 3744, 907, 12, 40, 21668, 2157, 1339, 13, 288, 3639, 2240, 12, 3184, 16, 467, 10277, 18, 45, 3996, 16125, 1042, 18, 1106, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -1...
sp = (prevLocation != -1) ? prevLocation + 1 : vn.context[curDepth] + 1;
sp = (prevLocation != -1) ? increment(prevLocation): vn.context[curDepth] + 1;
public int getNext() throws TextIterException { int vtdSize = vn.vtdBuffer.size(); switch (depth) { case 0 : // scan forward, if none found, jump to level 1 element and scan backward until one is found // if there isn't a level-one element, jump to the end of vtd buffer and scan backward int sp = (prevLocation != -1) ? prevLocation + 1 : vn.rootIndex + 1; if (vn.l1Buffer.size() != 0) { int temp1 = vn.l1Buffer.upper32At(0); int temp2 = vn.l1Buffer.upper32At(vn.l1Buffer.size() - 1); lcIndex = (lcIndex != -1) ? lcIndex : 0; while (sp < vtdSize) { if (sp >= temp1 && sp < temp2) { int s = vn.l1Buffer.upper32At(lcIndex); if (sp == s) { // get to the next l1 element then do a rewind lcIndex++; sp = vn.l1Buffer.upper32At(lcIndex) - 1; while (vn.getTokenDepth(sp) == 1 && vn.getTokenType(sp) != VTDNav.TOKEN_STARTING_TAG) { //probe depth in here sp--; } sp++; // point to the first possible node continue; } if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } else if (sp < temp1) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } else { if (sp == temp2) { // get to the end of the document and do a rewind sp = vn.vtdBuffer.size() - 1; while (vn.getTokenDepth(sp) == 1) { sp--; } sp++; continue; } if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } } return -1; // found nothing } else { // no child element for root, just scan right forward while (sp < vtdSize) { if (isText(sp) == true) { prevLocation = sp; return sp; } sp++; } return -1; } case 1 : if (prevLocation != -1) { sp = prevLocation + 1; } else { // fetch lclower and lcupper lcLower = vn.l1Buffer.lower32At(vn.l1index); if (lcLower != -1) { lcUpper = vn.l2Buffer.size() - 1; int size = vn.l1Buffer.size(); for (int i = lcLower + 1; i < size - 1; i++) { int temp = vn.l1Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = vn.context[1] + 1; } // check for l2lower and l2upper if (lcLower != -1) { // have at least one child element int temp1 = vn.l2Buffer.upper32At(lcLower); int temp2 = vn.l2Buffer.upper32At(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l2Buffer.upper32At(lcIndex) - 1; while (vn.getTokenDepth(sp) == 1) { sp--; } sp++; continue; } if (isText(sp) == true) { prevLocation = sp; return sp; } } else if (sp < temp1) { if (isText(sp) == true) { prevLocation = sp; return sp; } } else { //if (sp == temp2) { // last child element //} else if (isText(sp) == true && vn.getTokenDepth(sp) == 1) { prevLocation = sp; return sp; } else if (vn.getTokenDepth(sp) == 0) { break; } } sp++; } return -1; } else { // no child element int depth = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && depth >= 1 && !(depth == 1 && type == VTDNav.TOKEN_STARTING_TAG)) { if (isText(sp) == true) { prevLocation = sp; return sp; } depth = vn.getTokenDepth(sp); type = vn.getTokenType(sp); sp++; } return -1; } case 2 : if (prevLocation != -1) { sp = prevLocation + 1; } else { // fetch lclower and lcupper lcLower = vn.l2Buffer.lower32At(vn.l2index); if (lcLower != -1) { lcUpper = vn.l3Buffer.size() - 1; int size = vn.l2Buffer.size(); for (int i = lcLower + 1; i < size - 1; i++) { int temp = vn.l1Buffer.lower32At(i); if (temp != 0xffffffff) { lcUpper = temp - 1; break; } } } sp = vn.context[2] + 1; } // check for l3lower and l3upper if (lcLower != -1) { // at least one child element int temp1 = vn.l3Buffer.intAt(lcLower); int temp2 = vn.l3Buffer.intAt(lcUpper); lcIndex = (lcIndex != -1) ? lcIndex : lcLower; while (sp < vtdSize) { int s = vn.l3Buffer.intAt(lcIndex); //int s = vn.l2Buffer.upper32At(lcIndex); if (sp >= temp1 && sp < temp2) { if (sp == s) { lcIndex++; sp = vn.l3Buffer.intAt(lcIndex) - 1; while (vn.getTokenDepth(sp) == 2) { sp--; } sp++; continue; } if (isText(sp) == true) { prevLocation = sp; return sp; } } else if (sp < temp1) { if (isText(sp) == true) { prevLocation = sp; return sp; } } else { //if (sp == temp2) { // last child element //} else if (isText(sp) == true && vn.getTokenDepth(sp) == 2) { prevLocation = sp; return sp; } else if (vn.getTokenDepth(sp) < 2) { break; } } sp++; } return -1; } else { // no child elements int depth = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && depth >= 2 && !(depth == 2 && type == VTDNav.TOKEN_STARTING_TAG)) { // the last condition indicates the start of the next sibling element if (isText(sp) == true) { prevLocation = sp; return sp; } depth = vn.getTokenDepth(sp); type = vn.getTokenType(sp); sp++; } return -1; } default : int curDepth = vn.context[0]; sp = (prevLocation != -1) ? prevLocation + 1 : vn.context[curDepth] + 1; int depth = vn.getTokenDepth(sp); int type = vn.getTokenType(sp); while (sp < vtdSize && depth >= curDepth && !(depth == curDepth && type == VTDNav.TOKEN_STARTING_TAG)) { if (isText(sp) == true) { prevLocation = sp; return sp; } depth = vn.getTokenDepth(sp); type = vn.getTokenType(sp); sp++; } } return -1;}
3680 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3680/946353eacf894337d8e98671c240d204d4e13200/TextIter.java/clean/com/ximpleware/TextIter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 509, 6927, 1435, 1216, 3867, 2360, 503, 288, 565, 509, 331, 4465, 1225, 273, 21732, 18, 90, 4465, 1892, 18, 1467, 5621, 565, 1620, 261, 5979, 13, 288, 3639, 648, 374, 294, 5411, 368, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 6927, 1435, 1216, 3867, 2360, 503, 288, 565, 509, 331, 4465, 1225, 273, 21732, 18, 90, 4465, 1892, 18, 1467, 5621, 565, 1620, 261, 5979, 13, 288, 3639, 648, 374, 294, 5411, 368, 4...
Type prefix = qualifier.getType();
public Tree transform(Tree tree) { switch (tree) { case ClassDef(_, _, _, _, _, Template(_, Tree[] body)): Symbol clasz = tree.symbol(); TreeList members = new TreeList(transform(body)); checkOverloadedTermsOf(clasz); addBridges(clasz, members); return gen.ClassDef(clasz, members.toArray()); case ValDef(_, _, _, Tree rhs): Symbol field = tree.symbol(); if (rhs != Tree.Empty) rhs = transform(rhs, field.nextType()); return gen.ValDef(field, rhs); case DefDef(_, _, _, _, _, Tree rhs): Symbol method = tree.symbol(); if (rhs != Tree.Empty) rhs = transform(rhs, method.nextType().resultType()); return gen.DefDef(method, rhs); case LabelDef(_, Ident[] params, Tree body): Symbol label = tree.symbol(); body = transform(body, label.nextType().resultType()); return gen.LabelDef(label, Tree.symbolOf(params), body); case Assign(Tree lhs, Tree rhs): lhs = transform(lhs); rhs = transform(rhs, lhs.type); return gen.Assign(tree.pos, lhs, rhs); case Return(Tree expr): Symbol method = tree.symbol(); Type type = method.nextType().resultType(); return gen.Return(tree.pos, method, transform(expr, type)); case New(Template(Tree[] base, Tree[] body)): assert base.length == 1 && body.length == 0: tree; if (tree.getType().symbol() == definitions.ARRAY_CLASS) { switch (base[0]) { case Apply(_, Tree[] args): assert args.length == 1: tree; Type element = getArrayElementType(tree.getType()).erasure(); Tree size = transform(args[0]); return genNewUnboxedArray(tree.pos, element, size); default: throw Debug.abort("illegal case", tree); } } return gen.New(tree.pos, transform(base[0])); case Apply(TypeApply(Tree fun, Tree[] targs), Tree[] vargs): fun = transform(fun); vargs = transform(vargs); Symbol symbol = fun.symbol(); if (symbol == definitions.ANY_AS) { assert targs.length == 1 && vargs.length == 0: tree; return coerce(getQualifier(fun), targs[0].getType().erasure()); } if (symbol == definitions.ANY_IS) { assert targs.length == 1 && vargs.length == 0: tree; Type type = targs[0].type.erasure(); if (isUnboxedSimpleType(type)) type = targs[0].type; return gen.mkIsInstanceOf(tree.pos, getQualifier(fun), type); } return genApply(tree.pos, fun, vargs); case Apply(Tree fun, Tree[] vargs): fun = transform(fun); vargs = transform(vargs); switch (fun) { case Select(Apply(Tree bfun, Tree[] bargs), _): Symbol bsym = bfun.symbol(); if (primitives.getPrimitive(bsym) != Primitive.BOX) break; assert bargs.length == 1: fun; switch (primitives.getPrimitive(fun.symbol())) { case LENGTH: assert vargs.length == 0: tree; Tree array = bargs[0]; return genUnboxedArrayLength(tree.pos, array); case APPLY: assert vargs.length == 1: tree; Tree array = bargs[0]; Tree index = vargs[0]; return genUnboxedArrayGet(tree.pos, array, index); case UPDATE: assert vargs.length == 2: tree; Tree array = bargs[0]; Tree index = vargs[0]; Tree value = vargs[1]; return genUnboxedArraySet(tree.pos, array, index, value); } } return genApply(tree.pos, fun, vargs); case Select(Tree qualifier, _): Type prefix = qualifier.getType(); Symbol symbol = tree.symbol(); qualifier = transform(qualifier); qualifier = coerce(qualifier, prefix.erasure()); // Might end up with "box(unbox(...))". That's needed by backend. if (isUnboxedType(qualifier.getType())) qualifier = box(qualifier); return gen.Select(tree.pos, qualifier, symbol); case Ident(_): Symbol symbol = tree.symbol(); if (symbol == definitions.ZERO) return gen.mkNullLit(tree.pos); return gen.Ident(tree.pos, symbol); case Block(_): case If(_, _, _): case Switch(_, _, _, _): return transform(tree, tree.getType().fullErasure()); default: return super.transform(tree); } }
49529 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49529/a3a5e047a624e5575005845a9731247214414f0c/Erasure.java/clean/sources/scalac/transformer/Erasure.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4902, 2510, 12, 2471, 2151, 13, 288, 3639, 1620, 261, 3413, 13, 288, 202, 3593, 1659, 3262, 24899, 16, 389, 16, 389, 16, 389, 16, 389, 16, 5035, 24899, 16, 4902, 8526, 1417, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4902, 2510, 12, 2471, 2151, 13, 288, 3639, 1620, 261, 3413, 13, 288, 202, 3593, 1659, 3262, 24899, 16, 389, 16, 389, 16, 389, 16, 389, 16, 5035, 24899, 16, 4902, 8526, 1417, 3719,...
private void setPropertyFromBAOS(ByteArrayOutputStream baos, String propertyName) throws IOException { BufferedReader in = new BufferedReader(new StringReader(Execute.toString(baos))); String line = null; StringBuffer val = new StringBuffer(); while ((line = in.readLine()) != null) { if (val.length() != 0) { val.append(StringUtils.LINE_SEP); } val.append(line); } managingTask.getProject().setNewProperty(propertyName, val.toString()); }
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/6ee5317ca34e43ca1d62e890dcf034eb44cca649/Redirector.java/buggy/src/main/org/apache/tools/ant/taskdefs/Redirector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 7486, 1265, 12536, 4618, 12, 8826, 4632, 17548, 16, 4766, 1377, 514, 5470, 13, 1216, 1860, 288, 5411, 10633, 316, 273, 5411, 394, 10633, 12, 2704, 26227, 12, 5289, 18, 10492, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7486, 1265, 12536, 4618, 12, 8826, 4632, 17548, 16, 4766, 1377, 514, 5470, 13, 1216, 1860, 288, 5411, 10633, 316, 273, 5411, 394, 10633, 12, 2704, 26227, 12, 5289, 18, 10492, 1...
return (EReference)seriesDefinitionEClass.getEStructuralFeatures().get(0);
return (EReference) seriesDefinitionEClass.getEStructuralFeatures().get(0);
public EReference getSeriesDefinition_Query() { return (EReference)seriesDefinitionEClass.getEStructuralFeatures().get(0); }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/e5c78f0e8317166d02fa384e14c3dd7aa1796f2c/DataPackageImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/impl/DataPackageImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 512, 2404, 336, 6485, 1852, 67, 1138, 1435, 565, 288, 3639, 327, 261, 41, 2404, 13, 4166, 1852, 5720, 18, 588, 41, 14372, 8696, 7675, 588, 12, 20, 1769, 565, 289, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 512, 2404, 336, 6485, 1852, 67, 1138, 1435, 565, 288, 3639, 327, 261, 41, 2404, 13, 4166, 1852, 5720, 18, 588, 41, 14372, 8696, 7675, 588, 12, 20, 1769, 565, 289, 2, -100, -100, ...
stringBuffer.append(TEXT_367); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_368); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_369); stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_370); stringBuffer.append(featureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_371); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_372); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_373); if (ecoreFeature.isMany()) { stringBuffer.append(TEXT_374); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_375); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_376); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_377); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_378); stringBuffer.append(featureToSet.getAccessorName()); stringBuffer.append(TEXT_379); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_380); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_381); } else { stringBuffer.append(TEXT_382); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_383); } stringBuffer.append(TEXT_384); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); stringBuffer.append(TEXT_385); stringBuffer.append(metaFeatures.size()); stringBuffer.append(TEXT_386); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_387); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_388); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_389); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_390); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_391); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_392); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_393); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_394); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_395);
stringBuffer.append(TEXT_335); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_336); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_337);
public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); final GenCommonBase genElement = (GenCommonBase) ((Object[]) argument)[0];final GenChildLabelNode genChildNode = (GenChildLabelNode)genElement;GenNode genHost = genChildNode;GenNode genNode = genChildNode; /*var used by componentEditPolicy.javajetinc*/GenClass underlyingMetaClass = genHost.getDomainMetaClass();GenDiagram genDiagram = genChildNode.getDiagram();final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1];LabelModelFacet labelModelFacet = genChildNode.getLabelModelFacet();final boolean isReadOnly = genChildNode.isLabelReadOnly(); stringBuffer.append(TEXT_1); String copyrightText = genDiagram.getEditorGen().getCopyrightText();if (copyrightText != null && copyrightText.trim().length() > 0) { stringBuffer.append(TEXT_2); stringBuffer.append(copyrightText.replaceAll("\n", "\n * ")); stringBuffer.append(TEXT_3); } stringBuffer.append(TEXT_4); stringBuffer.append(TEXT_5); class FeatureGetAccessorHelper { /** * @param containerName the name of the container * @param feature the feature whose value is in interest * @param containerMetaClass the <code>GenClass</code> of the container, or <code>null</code>, if the container is declared as an <code>EObject</code>. * @param needsCastToResultType whether the cast to the result type is required (this parameter is only used if the <code>EClass</code> this feature belongs to is an external interface). */ public void appendFeatureValueGetter(String containerName, GenFeature feature, GenClass containerMetaClass, boolean needsCastToResultType) { if (feature.getGenClass().isExternalInterface()) { boolean needsCastToEObject = containerMetaClass != null && containerMetaClass.isExternalInterface(); if (needsCastToResultType) { stringBuffer.append(TEXT_6); stringBuffer.append(importManager.getImportedName(feature.isListType() ? "java.util.Collection" : feature.getTypeGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_7); } if (needsCastToEObject) { stringBuffer.append(TEXT_8); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_9); } stringBuffer.append(containerName); if (needsCastToEObject) { stringBuffer.append(TEXT_10); } stringBuffer.append(TEXT_11); stringBuffer.append(importManager.getImportedName(feature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_12); stringBuffer.append(feature.getFeatureAccessorName()); stringBuffer.append(TEXT_13); if (needsCastToResultType) { stringBuffer.append(TEXT_14); } } else { boolean needsCastToFeatureGenType = containerMetaClass == null || containerMetaClass.isExternalInterface(); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_15); stringBuffer.append(importManager.getImportedName(feature.getGenClass().getQualifiedInterfaceName())); stringBuffer.append(TEXT_16); } stringBuffer.append(containerName); if (needsCastToFeatureGenType) { stringBuffer.append(TEXT_17); } stringBuffer.append(TEXT_18); stringBuffer.append(feature.getGetAccessor()); stringBuffer.append(TEXT_19); } }}final FeatureGetAccessorHelper myFeatureGetAccessorHelper = new FeatureGetAccessorHelper(); stringBuffer.append(TEXT_20); importManager.emitPackageStatement(stringBuffer);importManager.registerInnerClass("TreeEditPartAdapter");importManager.addImport("org.eclipse.gef.EditPolicy");importManager.addImport("org.eclipse.gef.Request");importManager.addImport("org.eclipse.gmf.runtime.notation.View");importManager.addImport("org.eclipse.gmf.runtime.notation.NotationPackage");importManager.addImport("java.util.List");importManager.markImportLocation(stringBuffer); stringBuffer.append(TEXT_21); stringBuffer.append(genChildNode.getEditPartClassName()); stringBuffer.append(TEXT_22); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.AbstractGraphicalEditPart")); stringBuffer.append(TEXT_23); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.IUpdatableEditPart")); stringBuffer.append(TEXT_24); {GenCommonBase genCommonBase = genChildNode; stringBuffer.append(TEXT_25); stringBuffer.append(TEXT_26); stringBuffer.append(genCommonBase.getVisualID()); stringBuffer.append(TEXT_27); } stringBuffer.append(TEXT_28); stringBuffer.append(TEXT_29); if (!isReadOnly) { stringBuffer.append(TEXT_30); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_31); } stringBuffer.append(TEXT_32); stringBuffer.append(genChildNode.getEditPartClassName()); stringBuffer.append(TEXT_33); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); stringBuffer.append(TEXT_34); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); stringBuffer.append(TEXT_35); stringBuffer.append(TEXT_36); stringBuffer.append(TEXT_37); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_38); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_39); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_40); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); stringBuffer.append(TEXT_41); String resolvedSemanticElement = "(" + importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()) + ") getDiagramNode().getElement()"; final String primaryView = "getDiagramNode()"; if (!isReadOnly) { String editPatternCode = "EDIT_PATTERN"; //declared in labelText.javajetinc, used in directEditCommand.jetinc. stringBuffer.append(TEXT_42); stringBuffer.append(TEXT_43); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_44); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); stringBuffer.append(TEXT_45); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_46); stringBuffer.append(TEXT_47); stringBuffer.append(TEXT_48); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_49); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_50); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_51); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_52); stringBuffer.append(editPatternCode); stringBuffer.append(TEXT_53); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_54); stringBuffer.append(importManager.getImportedName("java.text.ParseException")); stringBuffer.append(TEXT_55); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_56); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_57); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_58); stringBuffer.append(primaryView); stringBuffer.append(TEXT_59); if (labelModelFacet instanceof FeatureLabelModelFacet) { GenFeature featureToSet = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); EStructuralFeature ecoreFeature = featureToSet.getEcoreFeature(); stringBuffer.append(TEXT_60); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_61); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_62); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_63); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_64); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_65); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_66); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_67); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_68); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_69); stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_70); stringBuffer.append(featureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_71); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_72); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_73); if (ecoreFeature.isMany()) { stringBuffer.append(TEXT_74); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_75); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_76); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_77); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_78); stringBuffer.append(featureToSet.getAccessorName()); stringBuffer.append(TEXT_79); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_80); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_81); } else { stringBuffer.append(TEXT_82); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_83); } stringBuffer.append(TEXT_84); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); stringBuffer.append(TEXT_85); stringBuffer.append(metaFeatures.size()); stringBuffer.append(TEXT_86); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_87); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_88); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_89); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_90); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_91); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_92); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_93); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_94); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_95); boolean haveDeclaredValues = false; for(int i = 0; i < metaFeatures.size(); i++) { GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); stringBuffer.append(TEXT_96); if (i == 0) { stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_97); } stringBuffer.append(TEXT_98); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_99); stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_100); stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_101); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_102); stringBuffer.append(i); stringBuffer.append(TEXT_103); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_104); if (nextEcoreFeature.isMany()) { stringBuffer.append(TEXT_105); if (!haveDeclaredValues) { haveDeclaredValues = true; stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_106); } stringBuffer.append(TEXT_107); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_108); stringBuffer.append(nextFeatureToSet.getAccessorName()); stringBuffer.append(TEXT_109); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_110); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_111); } else { stringBuffer.append(TEXT_112); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_113); } } stringBuffer.append(TEXT_114); } stringBuffer.append(TEXT_115); } stringBuffer.append(TEXT_116); stringBuffer.append(TEXT_117); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_118); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); stringBuffer.append(TEXT_119); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_120); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); stringBuffer.append(TEXT_121); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_122); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_123); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_124); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_125); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_126); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_127); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_128); {TypeModelFacet facet = genNode.getModelFacet();GenFeature childFeature = facet.getChildMetaFeature();GenFeature containmentFeature = facet.getContainmentMetaFeature();if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { stringBuffer.append(TEXT_129); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_130); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_131); if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_132); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_133); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_134); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_135); } else { stringBuffer.append(TEXT_136); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_137); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_138); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_139); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_140); } if (childFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_141); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_142); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_143); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_144); } else { stringBuffer.append(TEXT_145); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_146); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_147); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_148); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_149); } stringBuffer.append(TEXT_150); } else { if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_151); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_152); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_153); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_154); } else { stringBuffer.append(TEXT_155); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_156); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_157); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_158); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_159); }} stringBuffer.append(TEXT_160); } /*restrict local vars used in component edit policy*/ stringBuffer.append(TEXT_161); if (!isReadOnly) { stringBuffer.append(TEXT_162); stringBuffer.append(TEXT_163); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); stringBuffer.append(TEXT_164); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); stringBuffer.append(TEXT_165); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_166); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager")); stringBuffer.append(TEXT_167); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); stringBuffer.append(TEXT_168); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); stringBuffer.append(TEXT_169); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); stringBuffer.append(TEXT_170); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); stringBuffer.append(TEXT_171); } stringBuffer.append(TEXT_172); stringBuffer.append(TEXT_173); /*genFeature.getObjectType() throws NPE on primitive types. This is a workaround. */HashMap primitiveTypeToWrapperClassName = new HashMap();primitiveTypeToWrapperClassName.put(Boolean.TYPE, "Boolean");primitiveTypeToWrapperClassName.put(Byte.TYPE, "Byte");primitiveTypeToWrapperClassName.put(Character.TYPE, "Character");primitiveTypeToWrapperClassName.put(Double.TYPE, "Double");primitiveTypeToWrapperClassName.put(Float.TYPE, "Float");primitiveTypeToWrapperClassName.put(Integer.TYPE, "Integer");primitiveTypeToWrapperClassName.put(Long.TYPE, "Long");primitiveTypeToWrapperClassName.put(Short.TYPE, "Short");String viewPattern = null;String editPattern = null;if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; viewPattern = featureLabelModelFacet.getViewPattern(); if (viewPattern == null || viewPattern.length() == 0) { viewPattern = "{0}"; } editPattern = featureLabelModelFacet.getEditPattern(); if (editPattern == null || editPattern.length() == 0) { editPattern = "{0}"; }} else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; viewPattern = compositeFeatureLabelModelFacet.getViewPattern(); if (viewPattern == null || viewPattern.length() == 0) { StringBuffer patternBuffer = new StringBuffer(); for(int i = 0; i < compositeFeatureLabelModelFacet.getMetaFeatures().size(); i++) { patternBuffer.append("{").append(i).append("} "); } viewPattern = patternBuffer.toString().trim(); } editPattern = compositeFeatureLabelModelFacet.getEditPattern(); if (editPattern == null || editPattern.length() == 0) { StringBuffer patternBuffer = new StringBuffer(); for(int i = 0; i < compositeFeatureLabelModelFacet.getMetaFeatures().size(); i++) { patternBuffer.append("{").append(i).append("} "); } editPattern = patternBuffer.toString().trim(); }} stringBuffer.append(TEXT_174); stringBuffer.append(viewPattern); stringBuffer.append(TEXT_175); stringBuffer.append(editPattern); stringBuffer.append(TEXT_176); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_177); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_178); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_179); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_180); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_181); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet featureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; GenFeature feature = featureLabelModelFacet.getMetaFeature(); if (!feature.isPrimitiveType()) { stringBuffer.append(TEXT_182); myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); stringBuffer.append(TEXT_183); } stringBuffer.append(TEXT_184); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_185); if (feature.isPrimitiveType()) { stringBuffer.append(TEXT_186); stringBuffer.append(primitiveTypeToWrapperClassName.get(feature.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); stringBuffer.append(TEXT_187); } myFeatureGetAccessorHelper.appendFeatureValueGetter("element", feature, underlyingMetaClass, false); if (feature.isPrimitiveType()) { stringBuffer.append(TEXT_188); } stringBuffer.append(TEXT_189); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; stringBuffer.append(TEXT_190); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_191); for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); if (next.isPrimitiveType()) { stringBuffer.append(TEXT_192); stringBuffer.append(primitiveTypeToWrapperClassName.get(next.getTypeGenClassifier().getEcoreClassifier().getInstanceClass())); stringBuffer.append(TEXT_193); } myFeatureGetAccessorHelper.appendFeatureValueGetter("element", next, underlyingMetaClass, false); if (next.isPrimitiveType()) { stringBuffer.append(TEXT_194); } if (it.hasNext()) { stringBuffer.append(TEXT_195); } } stringBuffer.append(TEXT_196); } else { stringBuffer.append(TEXT_197); } stringBuffer.append(TEXT_198); stringBuffer.append(TEXT_199); boolean isFixedFontSetInFigure;{ StyleAttributes styleAttributes = (genElement.getViewmap() == null) ? null : (StyleAttributes)genElement.getViewmap().find(StyleAttributes.class); isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont();} stringBuffer.append(TEXT_200); if (!isFixedFontSetInFigure) { stringBuffer.append(TEXT_201); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_202); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_203); stringBuffer.append(primaryView); stringBuffer.append(TEXT_204); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_205); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_206); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_207); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_208); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); stringBuffer.append(TEXT_209); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_210); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); stringBuffer.append(TEXT_211); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_212); } stringBuffer.append(TEXT_213); if (!isFixedFontSetInFigure) { stringBuffer.append(TEXT_214); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); stringBuffer.append(TEXT_215); } stringBuffer.append(TEXT_216); stringBuffer.append(TEXT_217); stringBuffer.append(TEXT_218); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_219); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); stringBuffer.append(TEXT_220); stringBuffer.append(primaryView); stringBuffer.append(TEXT_221); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_222); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_223); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_224); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_225); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); stringBuffer.append(TEXT_226); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image")); stringBuffer.append(TEXT_227); if (genChildNode.isLabelElementIcon()) { stringBuffer.append(TEXT_228); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.resource.ImageDescriptor")); stringBuffer.append(TEXT_229); stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); stringBuffer.append(TEXT_230); } stringBuffer.append(TEXT_231); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.TreeEditPart")); stringBuffer.append(TEXT_232); /*@ include file="adapters/propertySource.javajetinc"*/ stringBuffer.append(TEXT_233); stringBuffer.append(TEXT_234); stringBuffer.append(TEXT_235); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_236); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_237); stringBuffer.append(TEXT_238); stringBuffer.append(TEXT_239); stringBuffer.append(importManager.getImportedName("java.util.HashMap")); stringBuffer.append(TEXT_240); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_241); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_242); stringBuffer.append(TEXT_243); stringBuffer.append(TEXT_244); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_245); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_246); stringBuffer.append(TEXT_247); stringBuffer.append(TEXT_248); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_249); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet compositeFeatureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); stringBuffer.append(TEXT_250); stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_251); stringBuffer.append(next.getFeatureAccessorName()); stringBuffer.append(TEXT_252); }} stringBuffer.append(TEXT_253); stringBuffer.append(TEXT_254); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_255); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_256); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_257); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_258); stringBuffer.append(TEXT_259); stringBuffer.append(TEXT_260); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); stringBuffer.append(TEXT_261); final Viewmap viewmap = genChildNode.getViewmap(); stringBuffer.append(TEXT_262); final String figureQualifiedClassName;if (viewmap instanceof ParentAssignedViewmap) { ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; figureQualifiedClassName = parentAssignedViewmap.getFigureQualifiedClassName() == null ? "org.eclipse.draw2d.IFigure" : parentAssignedViewmap.getFigureQualifiedClassName();} else if (viewmap instanceof FigureViewmap) { String figureQualifiedClassNameCandidate = ((FigureViewmap) viewmap).getFigureQualifiedClassName(); if (figureQualifiedClassNameCandidate == null || figureQualifiedClassNameCandidate.trim().length() == 0) { figureQualifiedClassName = "org.eclipse.draw2d.Label"; } else { figureQualifiedClassName = figureQualifiedClassNameCandidate; }} else if (viewmap instanceof SnippetViewmap) { figureQualifiedClassName = "org.eclipse.draw2d.IFigure";} else if (viewmap instanceof InnerClassViewmap) { figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();} else { figureQualifiedClassName = "org.eclipse.draw2d.IFigure";}final String figureImportedName;if (viewmap instanceof InnerClassViewmap) { figureImportedName = figureQualifiedClassName; //do not import inner class} else { figureImportedName = importManager.getImportedName(figureQualifiedClassName);}if (viewmap instanceof ParentAssignedViewmap) { final ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; stringBuffer.append(TEXT_263); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); stringBuffer.append(TEXT_264); stringBuffer.append((parentAssignedViewmap.getSetterName() == null ? "setLabel" : parentAssignedViewmap.getSetterName())); stringBuffer.append(TEXT_265); } else { stringBuffer.append(TEXT_266); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_267); if (viewmap instanceof FigureViewmap) { stringBuffer.append(TEXT_268); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_269); } // instanceof FigureViewmap else if (viewmap instanceof SnippetViewmap) { stringBuffer.append(TEXT_270); stringBuffer.append(((SnippetViewmap) viewmap).getBody()); stringBuffer.append(TEXT_271); } // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter else if (viewmap instanceof InnerClassViewmap) { stringBuffer.append(TEXT_272); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_273); } stringBuffer.append(TEXT_274); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); stringBuffer.append(TEXT_275); stringBuffer.append(figureImportedName); stringBuffer.append(TEXT_276); if ("org.eclipse.draw2d.Label".equals(figureQualifiedClassName) || viewmap instanceof InnerClassViewmap) { stringBuffer.append(TEXT_277); } else { stringBuffer.append(TEXT_278); } stringBuffer.append(TEXT_279); } /*not parent-assigned*/ stringBuffer.append(TEXT_280); if (!"org.eclipse.draw2d.Label".equals(figureQualifiedClassName) && viewmap instanceof InnerClassViewmap==false) { stringBuffer.append(TEXT_281); } stringBuffer.append(TEXT_282); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); stringBuffer.append(TEXT_283); stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label")); stringBuffer.append(TEXT_284); String labelSetterName = "setLabel"; // same assumption in NodeEditPartString labelFigureClassName = "org.eclipse.draw2d.IFigure";if (viewmap instanceof ParentAssignedViewmap) { ParentAssignedViewmap parentAssignedViewmap = (ParentAssignedViewmap) viewmap; if (parentAssignedViewmap.getSetterName() != null) { labelSetterName = parentAssignedViewmap.getSetterName(); } if (parentAssignedViewmap.getFigureQualifiedClassName() != null) { labelFigureClassName = parentAssignedViewmap.getFigureQualifiedClassName(); }} // FIXME perhaps, there's no sense to have setLabel for any other viewmap than ParentAssigned? stringBuffer.append(TEXT_285); stringBuffer.append(labelSetterName); stringBuffer.append(TEXT_286); stringBuffer.append(importManager.getImportedName(labelFigureClassName)); stringBuffer.append(TEXT_287); if ("org.eclipse.draw2d.Label".equals(labelFigureClassName)) { stringBuffer.append(TEXT_288); } else { stringBuffer.append(TEXT_289); } stringBuffer.append(TEXT_290); if (viewmap instanceof InnerClassViewmap) { String classBody = ((InnerClassViewmap) viewmap).getClassBody(); stringBuffer.append(TEXT_291); stringBuffer.append(classBody); stringBuffer.append(TEXT_292); if (classBody.indexOf("DPtoLP") != -1) { stringBuffer.append(TEXT_293); } } stringBuffer.append(TEXT_294); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.tree.BaseTreeEditPart")); stringBuffer.append(TEXT_295); stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); stringBuffer.append(TEXT_296); stringBuffer.append(TEXT_297); stringBuffer.append(TEXT_298); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_299); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy")); stringBuffer.append(TEXT_300); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_301); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest")); stringBuffer.append(TEXT_302); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_303); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_304); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_305); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_306); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_307); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_308); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_309); {TypeModelFacet facet = genNode.getModelFacet();GenFeature childFeature = facet.getChildMetaFeature();GenFeature containmentFeature = facet.getContainmentMetaFeature();if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) { stringBuffer.append(TEXT_310); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_311); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_312); if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_313); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_314); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_315); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_316); } else { stringBuffer.append(TEXT_317); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_318); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_319); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_320); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_321); } if (childFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_322); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_323); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_324); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_325); } else { stringBuffer.append(TEXT_326); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_327); stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_328); stringBuffer.append(childFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_329); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_330); } stringBuffer.append(TEXT_331); } else { if (containmentFeature.getEcoreFeature().isMany()) { stringBuffer.append(TEXT_332); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_333); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_334); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_335); } else { stringBuffer.append(TEXT_336); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_337); stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_338); stringBuffer.append(containmentFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_339); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_340); }} stringBuffer.append(TEXT_341); } /*restrict local vars used in component edit policy*/ if (!isReadOnly) { String editPatternCode = "EDIT_PATTERN"; //declared in labelText.javajetinc, used in directEditCommand.jetinc. stringBuffer.append(TEXT_342); stringBuffer.append(TEXT_343); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy")); stringBuffer.append(TEXT_344); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.DirectEditPolicy")); stringBuffer.append(TEXT_345); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_346); stringBuffer.append(TEXT_347); stringBuffer.append(TEXT_348); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command")); stringBuffer.append(TEXT_349); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); stringBuffer.append(TEXT_350); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_351); stringBuffer.append(importManager.getImportedName("java.text.MessageFormat")); stringBuffer.append(TEXT_352); stringBuffer.append(editPatternCode); stringBuffer.append(TEXT_353); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_354); stringBuffer.append(importManager.getImportedName("java.text.ParseException")); stringBuffer.append(TEXT_355); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_356); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_357); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); stringBuffer.append(TEXT_358); stringBuffer.append(primaryView); stringBuffer.append(TEXT_359); if (labelModelFacet instanceof FeatureLabelModelFacet) { GenFeature featureToSet = ((FeatureLabelModelFacet)labelModelFacet).getMetaFeature(); EStructuralFeature ecoreFeature = featureToSet.getEcoreFeature(); stringBuffer.append(TEXT_360); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_361); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_362); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_363); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_364); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_365); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_366); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_367); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_368); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_369); stringBuffer.append(importManager.getImportedName(featureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_370); stringBuffer.append(featureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_371); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_372); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_373); if (ecoreFeature.isMany()) { stringBuffer.append(TEXT_374); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_375); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_376); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_377); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_378); stringBuffer.append(featureToSet.getAccessorName()); stringBuffer.append(TEXT_379); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_380); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_381); } else { stringBuffer.append(TEXT_382); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_383); } stringBuffer.append(TEXT_384); } else if (labelModelFacet instanceof CompositeFeatureLabelModelFacet) { CompositeFeatureLabelModelFacet compositeFeatureLabelModelFacet = (CompositeFeatureLabelModelFacet) labelModelFacet; List metaFeatures = compositeFeatureLabelModelFacet.getMetaFeatures(); stringBuffer.append(TEXT_385); stringBuffer.append(metaFeatures.size()); stringBuffer.append(TEXT_386); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")); stringBuffer.append(TEXT_387); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_388); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")); stringBuffer.append(TEXT_389); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command")); stringBuffer.append(TEXT_390); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); stringBuffer.append(TEXT_391); stringBuffer.append(importManager.getImportedName(underlyingMetaClass.getQualifiedInterfaceName())); stringBuffer.append(TEXT_392); stringBuffer.append(resolvedSemanticElement); stringBuffer.append(TEXT_393); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_394); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")); stringBuffer.append(TEXT_395); boolean haveDeclaredValues = false; for(int i = 0; i < metaFeatures.size(); i++) { GenFeature nextFeatureToSet = (GenFeature) metaFeatures.get(i); EStructuralFeature nextEcoreFeature = nextFeatureToSet.getEcoreFeature(); stringBuffer.append(TEXT_396); if (i == 0) { stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_397); } stringBuffer.append(TEXT_398); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAttribute")); stringBuffer.append(TEXT_399); stringBuffer.append(importManager.getImportedName(nextFeatureToSet.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_400); stringBuffer.append(nextFeatureToSet.getFeatureAccessorName()); stringBuffer.append(TEXT_401); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.ParserUtil")); stringBuffer.append(TEXT_402); stringBuffer.append(i); stringBuffer.append(TEXT_403); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); stringBuffer.append(TEXT_404); if (nextEcoreFeature.isMany()) { stringBuffer.append(TEXT_405); if (!haveDeclaredValues) { haveDeclaredValues = true; stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.EList")); stringBuffer.append(TEXT_406); } stringBuffer.append(TEXT_407); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(TEXT_408); stringBuffer.append(nextFeatureToSet.getAccessorName()); stringBuffer.append(TEXT_409); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand")); stringBuffer.append(TEXT_410); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand")); stringBuffer.append(TEXT_411); } else { stringBuffer.append(TEXT_412); stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand")); stringBuffer.append(TEXT_413); } } stringBuffer.append(TEXT_414); } stringBuffer.append(TEXT_415); } stringBuffer.append(TEXT_416); stringBuffer.append(TEXT_417); stringBuffer.append(TEXT_418); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_419); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); stringBuffer.append(TEXT_420); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); stringBuffer.append(TEXT_421); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_422); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.services.TreeDirectEditManager")); stringBuffer.append(TEXT_423); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.TextCellEditor")); stringBuffer.append(TEXT_424); stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.CellEditorLocator")); stringBuffer.append(TEXT_425); stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.CellEditor")); stringBuffer.append(TEXT_426); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.TreeItem")); stringBuffer.append(TEXT_427); stringBuffer.append(importManager.getImportedName("org.eclipse.swt.widgets.TreeItem")); stringBuffer.append(TEXT_428); stringBuffer.append(TEXT_429); stringBuffer.append(TEXT_430); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_431); stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter")); stringBuffer.append(TEXT_432); if (labelModelFacet instanceof FeatureLabelModelFacet) { FeatureLabelModelFacet compositeFeatureLabelModelFacet = (FeatureLabelModelFacet) labelModelFacet; for(Iterator it = compositeFeatureLabelModelFacet.getMetaFeatures().iterator(); it.hasNext(); ) { GenFeature next = (GenFeature) it.next(); stringBuffer.append(TEXT_433); stringBuffer.append(importManager.getImportedName(next.getGenPackage().getQualifiedPackageInterfaceName())); stringBuffer.append(TEXT_434); stringBuffer.append(next.getFeatureAccessorName()); stringBuffer.append(TEXT_435); }} stringBuffer.append(TEXT_436); stringBuffer.append(importManager.getImportedName("java.util.List")); stringBuffer.append(TEXT_437); stringBuffer.append(importManager.getImportedName("java.util.Collections")); stringBuffer.append(TEXT_438); importManager.emitSortedImports(); stringBuffer.append(TEXT_439); return stringBuffer.toString(); }
7409 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7409/de70953cec74fbba0ed0cfbed37c36c0b594b3db/ChildNodeEditPartGenerator.java/clean/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/ChildNodeEditPartGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 2103, 12, 921, 1237, 13, 225, 288, 565, 727, 6674, 533, 1892, 273, 394, 6674, 5621, 565, 727, 10938, 6517, 2171, 3157, 1046, 273, 261, 7642, 6517, 2171, 13, 14015, 921, 63, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 514, 2103, 12, 921, 1237, 13, 225, 288, 565, 727, 6674, 533, 1892, 273, 394, 6674, 5621, 565, 727, 10938, 6517, 2171, 3157, 1046, 273, 261, 7642, 6517, 2171, 13, 14015, 921, 63, 5...
if (jj_3R_84()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
if (jj_3R_81()) return true; return false; }
static final private boolean jj_3_54() { if (jj_3R_84()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/23e69d576250f417c265d779703b8da08a67aaed/CPPParser.java/clean/pmd/src/net/sourceforge/pmd/cpd/cppast/CPPParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 727, 3238, 1250, 10684, 67, 23, 67, 6564, 1435, 288, 3639, 309, 261, 78, 78, 67, 23, 54, 67, 5193, 10756, 327, 638, 31, 3639, 309, 261, 78, 78, 67, 11821, 422, 374, 597, 10684, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 727, 3238, 1250, 10684, 67, 23, 67, 6564, 1435, 288, 3639, 309, 261, 78, 78, 67, 23, 54, 67, 5193, 10756, 327, 638, 31, 3639, 309, 261, 78, 78, 67, 11821, 422, 374, 597, 10684, ...
private void doAdd(Collection added) {
private void doAdd(Collection added, boolean updateViewer) {
private void doAdd(Collection added) { elements.doFireAdd(added); Object[] toAdd = added.toArray(); if (viewer instanceof TableViewer) { TableViewer tv = (TableViewer) viewer; tv.add(toAdd); } else if (viewer instanceof AbstractListViewer) { AbstractListViewer lv = (AbstractListViewer) viewer; lv.add(toAdd); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/6e52ef0cf7eb70c9ebd472ff52712741ca54cbb6/UpdatableSetContentProvider.java/clean/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/UpdatableSetContentProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 741, 986, 12, 2532, 3096, 16, 1250, 1089, 18415, 13, 288, 377, 202, 6274, 18, 2896, 9723, 986, 12, 9665, 1769, 377, 202, 377, 202, 921, 8526, 25607, 273, 3096, 18, 31447, 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, 377, 3238, 918, 741, 986, 12, 2532, 3096, 16, 1250, 1089, 18415, 13, 288, 377, 202, 6274, 18, 2896, 9723, 986, 12, 9665, 1769, 377, 202, 377, 202, 921, 8526, 25607, 273, 3096, 18, 31447, 562...
public Stmt codeGen(SootMethod method,LocalGeneratorEx localgen, Chain units,Stmt begin,Stmt fail,boolean sense, WeavingContext wc) { // We don't expect the frontend/matcher to produce a residue that does this. // There's no reason we couldn't just do the standard "automatic fail" thing // if there was ever a need, though. if(!sense) throw new InternalCompilerError("hasAspect residue should never be used negated"); List paramTypes; List params; if(pervalue==null) { params=new ArrayList(); paramTypes=new ArrayList(); } else { params=new ArrayList(1); paramTypes=new ArrayList(1); paramTypes.add(Scene.v().getSootClass("java.lang.Object").getType()); params.add(pervalue.getSootValue()); } Local hasaspect = localgen.generateLocal(BooleanType.v(),"hasAspect"); AssignStmt stmtHasAspect = Jimple.v().newAssignStmt (hasaspect, Jimple.v().newStaticInvokeExpr (Scene.v().makeMethodRef(aspct,"hasAspect",paramTypes,BooleanType.v(),true),params)); units.insertAfter(stmtHasAspect,begin); Stmt abort=Jimple.v().newIfStmt (Jimple.v().newEqExpr(hasaspect,IntConstant.v(0)),fail); units.insertAfter(abort,stmtHasAspect); return abort; }
236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/c5c34a78aa16c6f0b18caaca32e384c85c435b1e/HasAspect.java/buggy/aop/abc/src/abc/weaving/residues/HasAspect.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1071, 13751, 981, 7642, 12, 55, 1632, 1305, 707, 16, 2042, 3908, 424, 1191, 4507, 16, 1082, 202, 3893, 4971, 16, 8952, 2376, 16, 8952, 2321, 16, 6494, 12764, 16, 1082, 202, 3218, 5339, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1071, 13751, 981, 7642, 12, 55, 1632, 1305, 707, 16, 2042, 3908, 424, 1191, 4507, 16, 1082, 202, 3893, 4971, 16, 8952, 2376, 16, 8952, 2321, 16, 6494, 12764, 16, 1082, 202, 3218, 5339, ...
prop == IASTNamedTypeSpecifier.NAME)
prop == IASTNamedTypeSpecifier.NAME || prop == ICPPASTConstructorChainInitializer.MEMBER_ID)
public int processName( IASTName name ){ if( name instanceof ICPPASTQualifiedName ) return PROCESS_CONTINUE; ASTNodeProperty prop = name.getPropertyInParent(); ASTNodeProperty p2 = null; if( prop == ICPPASTQualifiedName.SEGMENT_NAME ){ p2 = prop; prop = name.getParent().getPropertyInParent(); } switch( kind ){ case KIND_LABEL: if( prop == IASTGotoStatement.NAME ) break; return PROCESS_CONTINUE; case KIND_TYPE: case KIND_COMPOSITE: if( prop == IASTNamedTypeSpecifier.NAME || prop == ICPPASTPointerToMember.NAME || prop == ICPPASTTypenameExpression.TYPENAME || prop == ICPPASTUsingDeclaration.NAME || prop == ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier.NAME || p2 == ICPPASTQualifiedName.SEGMENT_NAME ) { break; } else if( prop == IASTElaboratedTypeSpecifier.TYPE_NAME ) { IASTNode p = name.getParent().getParent(); if( !(p instanceof IASTSimpleDeclaration) || ((IASTSimpleDeclaration)p).getDeclarators().length > 0 ) { break; } } if( kind == KIND_TYPE ) return PROCESS_CONTINUE; case KIND_OBJ_FN: if( prop == IASTIdExpression.ID_NAME || prop == IASTFieldReference.FIELD_NAME || prop == ICPPASTUsingDirective.QUALIFIED_NAME || prop == ICPPASTUsingDeclaration.NAME || prop == IASTFunctionCallExpression.FUNCTION_NAME || prop == ICPPASTUsingDeclaration.NAME || prop == IASTNamedTypeSpecifier.NAME) { break; } return PROCESS_CONTINUE; case KIND_NAMESPACE: if( prop == ICPPASTUsingDirective.QUALIFIED_NAME || prop == ICPPASTNamespaceAlias.MAPPING_NAME || prop == ICPPASTUsingDeclaration.NAME || p2 == ICPPASTQualifiedName.SEGMENT_NAME ) { break; } return PROCESS_CONTINUE; } if( binding != null ){ IBinding potential = name.resolveBinding(); IBinding [] bs = null; IBinding candidate = null; int n = -1; if( potential instanceof ICPPCompositeBinding ){ try { bs = ((ICPPCompositeBinding)potential).getBindings(); } catch ( DOMException e ) { return PROCESS_CONTINUE; } candidate = bs[ ++n ]; } else { candidate = potential; } while( candidate != null ) { boolean found = false; if( binding instanceof ICPPCompositeBinding ){ try { found = ArrayUtil.contains( ((ICPPCompositeBinding)binding).getBindings(), candidate ); } catch ( DOMException e ) { } } else { found = ( binding == candidate ); } if( found ){ if( refs.length == idx ){ IASTName [] temp = new IASTName[ refs.length * 2 ]; System.arraycopy( refs, 0, temp, 0, refs.length ); refs = temp; } refs[idx++] = name; break; } if( n > -1 && ++n < bs.length ){ candidate = bs[n]; } else break; } } return PROCESS_CONTINUE; }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/12cdf18a8053d18c59fcd34c52179a7281178e5a/CPPVisitor.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPVisitor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 509, 1207, 461, 12, 467, 9053, 461, 508, 262, 95, 1082, 202, 430, 12, 508, 1276, 467, 4258, 4066, 882, 12345, 262, 327, 20647, 67, 6067, 26725, 31, 25083, 202, 9053, 907, 139...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 1207, 461, 12, 467, 9053, 461, 508, 262, 95, 1082, 202, 430, 12, 508, 1276, 467, 4258, 4066, 882, 12345, 262, 327, 20647, 67, 6067, 26725, 31, 25083, 202, 9053, 907, 139...
status = HttpServletResponse.SC_OK;
public void export(HttpServletRequest req, HttpServletResponse res, CmsObject cms, CmsStaticExportData data) throws CmsException, IOException, ServletException { CmsFile file; // TODO: Check if setting site root to "/" still works with HTML pages that contain links cms.getRequestContext().setSiteRoot("/"); String vfsName = data.getVfsName(); String rfsName = data.getRfsName(); CmsResource resource = data.getResource(); String oldUri = null; // this flag signals if the export method is used for "export on demand" or // "export on publish". // if no request and result stream are available, it was called during "export on publish" boolean exportOnDemand = ((req != null) && (res != null)); if (OpenCms.getLog(this).isDebugEnabled()) { OpenCms.getLog(this).debug("Static export starting for resource " + data); } // read vfs resource if (resource.isFile()) { file = cms.readFile(vfsName); } else { file = CmsFile.upgrade(OpenCmsCore.getInstance().initResource(cms, vfsName, req, res), cms); vfsName = vfsName + file.getName(); rfsName += C_EXPORT_DEFAULT_FILE; } // check loader id for resource int loaderId = file.getLoaderId(); I_CmsResourceLoader loader = OpenCms.getLoaderManager().getLoader(loaderId); if ((loader == null) || (! loader.isStaticExportEnabled())) { throw new CmsException("Unable to export VFS file " + vfsName + ", loader with id " + loaderId + " does not support static export"); } FileOutputStream exportStream = null; File exportFile = null; String exportFileName = CmsLinkManager.normalizeRfsPath(getExportPath() + rfsName.substring(1)); // only export those resource where the export property is set if (OpenCms.getLinkManager().exportRequired(cms, vfsName)) { // make sure all required parent folder exist createExportFolder(rfsName); // generate export file instance and output stream exportFile = new File(exportFileName); } // ensure we have exactly the same setup as if called "the usual way" // we only have to do this in case of the static export on demand if (exportOnDemand) { String mimetype = OpenCms.getLoaderManager().getMimeType(file.getName(), cms.getRequestContext().getEncoding()); res.setContentType(mimetype); oldUri = cms.getRequestContext().getUri(); cms.getRequestContext().setUri(vfsName); } // do the export byte[] result = loader.export(cms, file, req, res); // release unused resources file = null; if (result != null) { // write new exported file content try { exportStream = new FileOutputStream(exportFile); exportStream.write(result); exportStream.close(); } catch (Throwable t) { throw new CmsException("Creation of static export output stream failed for RFS file " + exportFileName); } // update the file with the modification date from the server if (req != null) { Long dateLastModified = (Long)req.getAttribute(I_CmsConstants.C_HEADER_OPENCMS_EXPORT); if (dateLastModified != null) { exportFile.setLastModified((dateLastModified.longValue() / 1000) * 1000); } } } // restore context // we only have to do this in case of the static export on demand if (exportOnDemand) { cms.getRequestContext().setUri(oldUri); } // log export success if (OpenCms.getLog(this).isInfoEnabled()) { OpenCms.getLog(this).info("Static exported vfs file '" + vfsName + "' to rfs file '" + exportFileName + "'"); } }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/0b9e093fb5b2c85534e37349cf5f34aece2186de/CmsStaticExportManager.java/buggy/src/org/opencms/staticexport/CmsStaticExportManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1071, 2327, 273, 12446...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1267, 273, 12446, 18, 2312, 67, 3141, 31, 1071, 2327, 273, 12446...
FeeBO firstRepaymentFee = TestObjectFactory.createOneTimeRateFee("First Repayment Fee", FeeCategory.LOAN,Double.valueOf("40"),FeeFormula.INTEREST, FeePayment.TIME_OF_FIRSTLOANREPAYMENT);
FeeBO firstRepaymentFee = TestObjectFactory.createOneTimeRateFee( "First Repayment Fee", FeeCategory.LOAN, Double.valueOf("40"), FeeFormula.INTEREST, FeePayment.TIME_OF_FIRSTLOANREPAYMENT);
public void testDisburseLoanWithAllTypeOfFees() throws NumberFormatException, InvalidUserException, PropertyNotFoundException, SystemException, ApplicationException { Short dayOfMonth = (short)1; MeetingBO meeting = TestObjectFactory.getMeetingHelper(2,2,4); meeting.setMeetingStartDate(Calendar.getInstance()); meeting.getMeetingDetails().getMeetingRecurrence().setDayNumber(dayOfMonth); TestObjectFactory.createMeeting(meeting); center = TestObjectFactory.createCenter("Center", Short.valueOf("13"), "1.1", meeting, new Date(System.currentTimeMillis())); group = TestObjectFactory.createGroup("Group", Short.valueOf("9"), "1.1.1", center, new Date(System.currentTimeMillis())); LoanOfferingBO loanOffering = TestObjectFactory.createLoanOffering( "Loan", Short.valueOf("2"), new Date(System.currentTimeMillis()), Short.valueOf("1"), 300.0, 1.2, Short.valueOf("3"), Short.valueOf("1"), Short .valueOf("3"), Short.valueOf("1"), Short.valueOf("0"), Short.valueOf("1"), center.getCustomerMeeting().getMeeting()); Calendar disbursementDate = new GregorianCalendar(); int year = disbursementDate.get(Calendar.YEAR); int month = disbursementDate.get(Calendar.MONTH); int day = disbursementDate.get(0); if(disbursementDate.get(Calendar.DAY_OF_MONTH) == dayOfMonth.intValue()) disbursementDate = new GregorianCalendar(year, month,day); else disbursementDate = new GregorianCalendar(year, month+1,day); List<FeeView> feeViewList=new ArrayList<FeeView>(); FeeBO upfrontFee = TestObjectFactory.createOneTimeRateFee("Upfront Fee", FeeCategory.LOAN, Double.valueOf("20"),FeeFormula.AMOUNT, FeePayment.UPFRONT); feeViewList.add(new FeeView(upfrontFee)); FeeBO disbursementFee = TestObjectFactory.createOneTimeRateFee("Disbursment Fee", FeeCategory.LOAN,Double.valueOf("30"), FeeFormula.AMOUNT_AND_INTEREST,FeePayment.TIME_OF_DISBURSMENT); feeViewList.add(new FeeView(disbursementFee)); FeeBO firstRepaymentFee = TestObjectFactory.createOneTimeRateFee("First Repayment Fee", FeeCategory.LOAN,Double.valueOf("40"),FeeFormula.INTEREST, FeePayment.TIME_OF_FIRSTLOANREPAYMENT); feeViewList.add(new FeeView(firstRepaymentFee)); FeeBO periodicFee = TestObjectFactory.createPeriodicAmountFee("Periodic Fee", FeeCategory.LOAN, "100", MeetingFrequency.MONTHLY, Short .valueOf("1")); feeViewList.add(new FeeView(periodicFee)); accountBO=new LoanBO(TestObjectFactory.getUserContext(), loanOffering, group, AccountState.getStatus(Short.valueOf("5")), new Money("300.0"), Short.valueOf("6"),disbursementDate.getTime(),false,1.2,(short) 0, new Fund(),feeViewList); new TestObjectPersistence().persist(accountBO); disbursementDate = new GregorianCalendar(); year = disbursementDate.get(Calendar.YEAR); month = disbursementDate.get(Calendar.MONTH); day = disbursementDate.get(0); if(disbursementDate.get(Calendar.DAY_OF_MONTH) == dayOfMonth.intValue()) disbursementDate = new GregorianCalendar(year, month+2,day); else disbursementDate = new GregorianCalendar(year, month+3,day); ((LoanBO) accountBO).disburseLoan("1234", disbursementDate.getTime(), Short.valueOf("1"), accountBO.getPersonnel(), disbursementDate.getTime(), Short .valueOf("1")); Session session = HibernateUtil.getSessionTL(); HibernateUtil.startTransaction(); session.save(accountBO); HibernateUtil.getTransaction().commit(); }
45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/8b7a0cdb79f363f8ac3f82d8f06e16d5166a08ed/TestLoanBO.java/clean/mifos/test/org/mifos/application/accounts/loan/business/TestLoanBO.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1669, 70, 295, 307, 1504, 304, 1190, 1595, 559, 951, 2954, 281, 1435, 1216, 12100, 16, 1962, 1299, 503, 16, 4276, 3990, 16, 26731, 16, 28816, 288, 202, 202, 4897, 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, 1842, 1669, 70, 295, 307, 1504, 304, 1190, 1595, 559, 951, 2954, 281, 1435, 1216, 12100, 16, 1962, 1299, 503, 16, 4276, 3990, 16, 26731, 16, 28816, 288, 202, 202, 4897, 2...
base = (DatatypeValidator)subUnionMemberDV.elementAt(i);
base = subUnionMemberDV[i];
private static boolean checkSimpleDerivation(DatatypeValidator derived, DatatypeValidator base, int block) { // 1 They are the same type definition. if (derived == base) return true; // 2 All of the following must be true: // 2.1 restriction is not in the subset, or in the {final} of its own {base type definition}; if ((block & SchemaSymbols.RESTRICTION) != 0 || (derived.getBaseValidator().getFinalSet() & SchemaSymbols.RESTRICTION) != 0) { return false; } // 2.2 One of the following must be true: // 2.2.1 D's base type definition is B. DatatypeValidator directBase = derived.getBaseValidator(); if (directBase == base) return true; // 2.2.2 D's base type definition is not the simple ur-type definition and is validly derived from B given the subset, as defined by this constraint. if (directBase != SchemaGrammar.fAnySimpleType && checkSimpleDerivation(directBase, base, block)) { return true; } // 2.2.3 D's {variety} is list or union and B is the simple ur-type definition. if ((derived instanceof ListDatatypeValidator || derived instanceof UnionDatatypeValidator) && base == SchemaGrammar.fAnySimpleType) { return true; } // 2.2.4 B's {variety} is union and D is validly derived from a type definition in B's {member type definitions} given the subset, as defined by this constraint. if (base instanceof UnionDatatypeValidator) { Vector subUnionMemberDV = ((UnionDatatypeValidator)base).getBaseValidators(); int subUnionSize = subUnionMemberDV.size(); for (int i=0; i<subUnionSize; i++) { base = (DatatypeValidator)subUnionMemberDV.elementAt(i); if (checkSimpleDerivation(derived, base, block)) return true; } } return false; }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/5b0cf65d1d2e090172d69189c96c522d6a30ac2c/XSConstraints.java/buggy/src/org/apache/xerces/impl/xs/XSConstraints.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 1250, 866, 5784, 12041, 8482, 12, 20228, 5126, 10379, 16, 21168, 5126, 1026, 16, 509, 1203, 13, 288, 3639, 368, 404, 16448, 854, 326, 1967, 618, 2379, 18, 3639, 309, 261, 765, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 1250, 866, 5784, 12041, 8482, 12, 20228, 5126, 10379, 16, 21168, 5126, 1026, 16, 509, 1203, 13, 288, 3639, 368, 404, 16448, 854, 326, 1967, 618, 2379, 18, 3639, 309, 261, 765, ...
return true;
CmsToolManager toolManager = OpenCms.getWorkplaceManager().getToolManager(); List subTools = toolManager.getToolsForPath(getPath(), false); Iterator itSubTools = subTools.iterator(); while (itSubTools.hasNext()) { String subToolPath = (String)itSubTools.next(); CmsTool subTool = toolManager.resolveAdminTool(subToolPath); if (subTool.getHandler().isVisible(cms)) { return true; } } return !getLink().equals(CmsToolManager.C_VIEW_JSPPAGE_LOCATION);
public boolean isVisible(CmsObject cms) { return true; }
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/da2a826305eb90dc1336f08f1dc169063d6bb49e/CmsDefaultToolHandler.java/buggy/src/org/opencms/workplace/tools/CmsDefaultToolHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 20453, 12, 4747, 921, 6166, 13, 288, 540, 2149, 6364, 1318, 5226, 1318, 273, 10319, 18, 588, 16514, 1318, 7675, 588, 6364, 1318, 5621, 987, 720, 10348, 273, 5226, 1318, 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, 377, 1071, 1250, 20453, 12, 4747, 921, 6166, 13, 288, 540, 2149, 6364, 1318, 5226, 1318, 273, 10319, 18, 588, 16514, 1318, 7675, 588, 6364, 1318, 5621, 987, 720, 10348, 273, 5226, 1318, 18, 58...
assertEqual(result, expecting);
assertEquals(result, expecting);
public void testDefaultArgumentAsTemplate2() throws Exception { String templates = "group test;" +newline+ "method(name,size) ::= <<"+newline+ "<stat(...)>" +newline+ ">>"+newline+ "stat(name,value={ [<name>] }) ::= \"x=<value>; // <name>\""+newline ; StringTemplateGroup group = new StringTemplateGroup(new StringReader(templates)); StringTemplate b = group.getInstanceOf("method"); b.setAttribute("name", "foo"); b.setAttribute("size", "2"); String expecting = "x= [foo] ; // foo"; String result = b.toString(); //System.err.println("result='"+result+"'"); assertEqual(result, expecting); }
52527 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52527/158b0f9c5220709dc9d801ee911d1605a906ccaf/TestStringTemplate.java/clean/src/org/antlr/stringtemplate/test/TestStringTemplate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1868, 1379, 1463, 2283, 22, 1435, 1216, 1185, 288, 202, 202, 780, 5539, 273, 9506, 202, 6, 1655, 1842, 4868, 397, 22861, 15, 9506, 202, 6, 2039, 12, 529, 16, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 1868, 1379, 1463, 2283, 22, 1435, 1216, 1185, 288, 202, 202, 780, 5539, 273, 9506, 202, 6, 1655, 1842, 4868, 397, 22861, 15, 9506, 202, 6, 2039, 12, 529, 16, 1467, ...
mainSiena.publish(probe);
siena.publish(probe);
private void getReport(ClientDesc currentClient){ Notification probe = new Notification(); probe.putAttribute(SienaConstants.AI2TV_WF_UPDATE_REQUEST, ""); probe.putAttribute(SienaConstants.CLIENT_ID, currentClient.getClientID()); probe.putAttribute(SienaConstants.ABS_TIME_SENT, System.currentTimeMillis()); System.out.println("dp2041: publishing report request: " + probe); try { mainSiena.publish(probe); } catch (siena.SienaException e){ System.err.println("WFSubscriber publishing sienaException during report request: " + e); } }
14573 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14573/6bd8c2084f57686d9134c0462943cc7a40c93eef/WFSubscriber.java/clean/workflow/WFSubscriber.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 22452, 12, 1227, 4217, 783, 1227, 15329, 565, 8050, 10695, 273, 394, 8050, 5621, 565, 10695, 18, 458, 1499, 12, 55, 77, 24457, 2918, 18, 18194, 22, 15579, 67, 59, 42, 67, 821...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22452, 12, 1227, 4217, 783, 1227, 15329, 565, 8050, 10695, 273, 394, 8050, 5621, 565, 10695, 18, 458, 1499, 12, 55, 77, 24457, 2918, 18, 18194, 22, 15579, 67, 59, 42, 67, 821...
int wildPos, starPos, questionPos;
int wildPos, starPos = -1, questionPos;
public static final char[] bestPrefix( char [] prefix, char optionalType, char[] name, char[][] containingTypes, int matchMode, boolean isCaseSensitive) { char[] result = null; int pos = 0; int wildPos, starPos, questionPos; //length of prefix + separator int length = prefix.length; //add length for optional type + another separator if( optionalType != 0 ) length += 2; if (!isCaseSensitive){ //index is case sensitive, thus in case attempting case insensitive search, cannot consider //type name. name = null; } else if( matchMode == PATTERN_MATCH && name != null ){ starPos = CharOperation.indexOf( '*', name ); questionPos = CharOperation.indexOf( '?', name ); if( starPos >= 0 ){ if( questionPos >= 0 ) wildPos = ( starPos < questionPos ) ? starPos : questionPos; else wildPos = starPos; } else { wildPos = questionPos; } switch( wildPos ){ case -1 : break; case 0 : name = null; break; default : name = CharOperation.subarray( name, 0, wildPos ); break; } } //add length for name if( name != null ){ length += name.length; } else { //name is null, don't even consider qualifications. result = new char [ length ]; System.arraycopy( prefix, 0, result, 0, pos = prefix.length ); if( optionalType != 0){ result[ pos++ ] = optionalType; result[ pos++ ] = SEPARATOR; } return result; } //add the total length of the qualifiers //we don't want to mess with the contents of this array (treat it as constant) //so check for wild cards later. if( containingTypes != null ){ for( int i = 0; i < containingTypes.length; i++ ){ if( containingTypes[i].length > 0 ){ length += containingTypes[ i ].length; length++; //separator } } } //because we haven't checked qualifier wild cards yet, this array might turn out //to be too long. So fill a temp array, then check the length after char [] temp = new char [ length ]; System.arraycopy( prefix, 0, temp, 0, pos = prefix.length ); if( optionalType != 0 ){ temp[ pos++ ] = optionalType; temp[ pos++ ] = SEPARATOR; } System.arraycopy( name, 0, temp, pos, name.length ); pos += name.length; if( containingTypes != null ){ for( int i = containingTypes.length - 1; i >= 0; i-- ){ if( matchMode == PATTERN_MATCH ){ starPos = CharOperation.indexOf( '*', containingTypes[i] ); questionPos = CharOperation.indexOf( '?', containingTypes[i] ); if( starPos >= 0 ){ if( questionPos >= 0 ) wildPos = ( starPos < questionPos ) ? starPos : questionPos; else wildPos = starPos; } else { wildPos = questionPos; } if( wildPos >= 0 ){ temp[ pos++ ] = SEPARATOR; System.arraycopy( containingTypes[i], 0, temp, pos, wildPos ); pos += starPos; break; } } if( containingTypes[i].length > 0 ){ temp[ pos++ ] = SEPARATOR; System.arraycopy( containingTypes[i], 0, temp, pos, containingTypes[i].length ); pos += containingTypes[i].length; } } } if( pos < length ){ result = new char[ pos ]; System.arraycopy( temp, 0, result, 0, pos ); } else { result = temp; } return result; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/51a73af86dfc48263b870da877579caead870558/AbstractIndexer.java/buggy/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 727, 1149, 8526, 3796, 2244, 12, 1149, 5378, 1633, 16, 1149, 3129, 559, 16, 1149, 8526, 508, 16, 1149, 63, 6362, 65, 4191, 2016, 16, 509, 845, 2309, 16, 1250, 353, 2449, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 727, 1149, 8526, 3796, 2244, 12, 1149, 5378, 1633, 16, 1149, 3129, 559, 16, 1149, 8526, 508, 16, 1149, 63, 6362, 65, 4191, 2016, 16, 509, 845, 2309, 16, 1250, 353, 2449, ...
LOSDialog ld = new LOSDialog(frame, client.game.getMechInFirst(), client.game.getMechInSecond());
GUIPreferences gp = GUIPreferences.getInstance(); LOSDialog ld = new LOSDialog(frame, gp.getMechInFirst(), gp.getMechInSecond());
public void showLOSSettingDialog() { LOSDialog ld = new LOSDialog(frame, client.game.getMechInFirst(), client.game.getMechInSecond()); ld.show(); client.game.setMechInFirst(ld.getMechInFirst()); client.game.setMechInSecond(ld.getMechInSecond()); }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/92a73ae877ead830a9e6ebc17df507943de8c895/ClientGUI.java/clean/megamek/src/megamek/client/ui/AWT/ClientGUI.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2405, 1502, 55, 5568, 6353, 1435, 288, 3639, 10978, 12377, 4178, 273, 10978, 12377, 18, 588, 1442, 5621, 1806, 55, 6353, 16916, 273, 394, 1806, 55, 6353, 12, 3789, 16, 4178, 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, 2405, 1502, 55, 5568, 6353, 1435, 288, 3639, 10978, 12377, 4178, 273, 10978, 12377, 18, 588, 1442, 5621, 1806, 55, 6353, 16916, 273, 394, 1806, 55, 6353, 12, 3789, 16, 4178, 18...
throw (RuntimeException)itExcptn.getTargetException();
throw (RuntimeException) itExcptn.getTargetException();
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 19817, 921, 27632, 12, 54, 10340, 921, 10665, 16, 1033, 8526, 707, 2615, 16, 19817, 22155, 13, 288, 3639, 309, 261, 8792, 2615, 13, 288, 5411, 19817, 921, 8526, 3127, 1076, 273, 394...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 19817, 921, 27632, 12, 54, 10340, 921, 10665, 16, 1033, 8526, 707, 2615, 16, 19817, 22155, 13, 288, 3639, 309, 261, 8792, 2615, 13, 288, 5411, 19817, 921, 8526, 3127, 1076, 273, 394...
Parser.Rule matchedRule = editor.rules.getRuleAtPosition(candidate.start);
Parser.Rule matchedRule = editor.rules.getRuleAtPosition(candidate.getStart());
public void findUsage() { Token token = getTokenAtPosition(getCaretPosition()); if(token == null) return; String tokenAttribute = token.getAttribute(); TUsage usage = new TUsage(editor); editor.getTabbedPane().add("Usages of \""+tokenAttribute+"\"", usage.getContainer()); editor.getTabbedPane().setSelectedIndex(editor.getTabbedPane().getTabCount()-1); Iterator iterator = editor.getTokens().iterator(); while(iterator.hasNext()) { Token candidate = (Token)iterator.next(); if(candidate.getAttribute().equals(tokenAttribute)) { Parser.Rule matchedRule = editor.rules.getRuleAtPosition(candidate.start); if(matchedRule != null) usage.addMatch(matchedRule, candidate); } } Statistics.shared().recordEvent(Statistics.EVENT_FIND_USAGES); }
51505 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51505/f13d59e2934691783709edc81c3eb7cea20d0849/MenuGrammar.java/clean/src/org/antlr/works/editor/actions/MenuGrammar.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1104, 5357, 1435, 288, 3639, 3155, 1147, 273, 9162, 861, 2555, 12, 588, 39, 20731, 2555, 10663, 3639, 309, 12, 2316, 422, 446, 13, 5411, 327, 31, 3639, 514, 1147, 1499, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1104, 5357, 1435, 288, 3639, 3155, 1147, 273, 9162, 861, 2555, 12, 588, 39, 20731, 2555, 10663, 3639, 309, 12, 2316, 422, 446, 13, 5411, 327, 31, 3639, 514, 1147, 1499, 273, ...
setModified(true);
public void setCreateDate(Date createDate) { if (((createDate == null) && (_createDate != null)) || ((createDate != null) && (_createDate == null)) || ((createDate != null) && (_createDate != null) && !createDate.equals(_createDate))) { _createDate = createDate; setModified(true); } }
53908 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53908/f4d6afc6707f57fd84bf6b624f0c119657b0a766/ReleaseModel.java/buggy/portal-ejb/src/com/liferay/portal/model/ReleaseModel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 1684, 1626, 12, 1626, 752, 1626, 13, 288, 202, 202, 430, 261, 12443, 2640, 1626, 422, 446, 13, 597, 261, 67, 2640, 1626, 480, 446, 3719, 747, 9506, 202, 12443, 2640,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 1684, 1626, 12, 1626, 752, 1626, 13, 288, 202, 202, 430, 261, 12443, 2640, 1626, 422, 446, 13, 597, 261, 67, 2640, 1626, 480, 446, 3719, 747, 9506, 202, 12443, 2640,...
throw new IllegalArgumentException("no argument may be less then 1");
throw new IllegalArgumentException("no argument may be less than 1");
public ResolutionSyntax(int crossFeedResolution, int feedResolution, int units) { if (crossFeedResolution < 1 || feedResolution < 1 || units < 1) throw new IllegalArgumentException("no argument may be less then 1"); this.crossFeedResolution = crossFeedResolution * units; this.feedResolution = feedResolution * units; }
25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/f6df144a51f6df4ab5f69c781f796e6a912ade6a/ResolutionSyntax.java/buggy/libjava/javax/print/attribute/ResolutionSyntax.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 24933, 8070, 12, 474, 6828, 8141, 11098, 16, 509, 4746, 11098, 16, 12900, 509, 4971, 13, 225, 288, 565, 309, 261, 14653, 8141, 11098, 411, 404, 3639, 747, 4746, 11098, 411, 404, 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, 282, 1071, 24933, 8070, 12, 474, 6828, 8141, 11098, 16, 509, 4746, 11098, 16, 12900, 509, 4971, 13, 225, 288, 565, 309, 261, 14653, 8141, 11098, 411, 404, 3639, 747, 4746, 11098, 411, 404, 363...
MylarPlugin.log(ex, "couldn't open summary editor");
ErrorLogger.log(ex, "couldn't open summary editor");
public void run(IAction action) { if (action instanceof ViewPluginAction) { ViewPluginAction objectAction = (ViewPluginAction)action; final List<File> files = getStatsFilesFromSelection(objectAction); Workbench.getInstance().getDisplay().asyncExec(new Runnable() { public void run() { try { List<IUsageCollector> delegates = new ArrayList<IUsageCollector>(); delegates.add(new ViewUsageCollector()); delegates.add(new PerspectiveUsageCollector()); delegates.add(new CommandUsageCollector());// delegates.add(new CsvOutputCollector()); delegates.add(new SummaryCollector()); DelegatingUsageCollector collector = new DelegatingUsageCollector(); collector.setReportTitle("Usage Summary"); collector.setDelegates(delegates); ReportGenerator generator = new ReportGenerator(MylarMonitorPlugin.getDefault().getInteractionLogger(), collector); IWorkbenchPage page = MylarReportsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(); if (page == null) return; IEditorInput input = new UsageStatsEditorInput(files, generator); page.openEditor(input, MylarReportsPlugin.REPORT_SUMMARY_ID); } catch (PartInitException ex) { MylarPlugin.log(ex, "couldn't open summary editor"); } } }); } }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/6e4c36ce82823e91011a538b1e18917054cfdf11/UsageSummaryAction.java/buggy/sandbox/org.eclipse.mylyn.monitor.reports/src/org/eclipse/mylyn/monitor/reports/ui/actions/UsageSummaryAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 12, 45, 1803, 1301, 13, 288, 377, 202, 430, 261, 1128, 1276, 4441, 3773, 1803, 13, 288, 377, 202, 202, 1767, 3773, 1803, 733, 1803, 273, 261, 1767, 3773, 1803, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 12, 45, 1803, 1301, 13, 288, 377, 202, 430, 261, 1128, 1276, 4441, 3773, 1803, 13, 288, 377, 202, 202, 1767, 3773, 1803, 733, 1803, 273, 261, 1767, 3773, 1803, 13, ...
img = (java.awt.Image) _ids.loadImage( new URL( sUrl ) );
try { byte[] data = Base64.decode( ( (EmbeddedImage) flBackground ).getData( ) ); img = createImage( data ); } catch ( Exception ilex ) { throw new ChartException( ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, ilex ); }
public void fillOval( OvalRenderEvent ore ) throws ChartException { final Fill flBackground = ore.getBackground( ); final Bounds bo = ore.getBounds( ); final Ellipse2D.Double e2d = new Ellipse2D.Double( bo.getLeft( ), bo.getTop( ), bo.getWidth( ), bo.getHeight( ) ); if ( flBackground instanceof ColorDefinition ) { final ColorDefinition cd = (ColorDefinition) flBackground; _g2d.setColor( (Color) _ids.getColor( cd ) ); _g2d.fill( e2d ); } else if ( flBackground instanceof Gradient ) { final Gradient g = (Gradient) flBackground; final ColorDefinition cdStart = (ColorDefinition) g.getStartColor( ); final ColorDefinition cdEnd = (ColorDefinition) g.getEndColor( ); // boolean bCyclic = g.isCyclic(); double dAngleInDegrees = g.getDirection( ); final double dAngleInRadians = ( ( -dAngleInDegrees * Math.PI ) / 180.0 ); // int iAlpha = g.getTransparency(); /* * if (bCyclic) { } */ if ( dAngleInDegrees < -90 || dAngleInDegrees > 90 ) { throw new ChartException( ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, "exception.gradient.angle",//$NON-NLS-1$ new Object[]{ new Double( dAngleInDegrees ) }, ResourceBundle.getBundle( Messages.DEVICE_EXTENSION, getLocale( ) ) ); } Point2D.Double p2dStart, p2dEnd; if ( dAngleInDegrees == 90 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); } else if ( dAngleInDegrees == -90 ) { p2dEnd = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); } else if ( dAngleInDegrees > 0 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) + bo.getHeight( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) + bo.getHeight( ) - bo.getWidth( ) * Math.abs( Math.tan( dAngleInRadians ) ) ); } else if ( dAngleInDegrees < 0 ) { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) + bo.getWidth( ) * Math.abs( Math.tan( dAngleInRadians ) ) ); } else { p2dStart = new Point2D.Double( bo.getLeft( ), bo.getTop( ) ); p2dEnd = new Point2D.Double( bo.getLeft( ) + bo.getWidth( ), bo.getTop( ) ); } _g2d.setPaint( new GradientPaint( p2dStart, (Color) _ids.getColor( cdStart ), p2dEnd, (Color) _ids.getColor( cdEnd ) ) ); _g2d.fill( e2d ); } else if ( flBackground instanceof org.eclipse.birt.chart.model.attribute.Image ) { final String sUrl = ( (org.eclipse.birt.chart.model.attribute.Image) flBackground ).getURL( ); java.awt.Image img = null; try { img = (java.awt.Image) _ids.loadImage( new URL( sUrl ) ); } catch ( ChartException ilex ) { throw new ChartException( ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, ilex ); } catch ( MalformedURLException muex ) { throw new ChartException( ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, muex ); } final Shape shClip = _g2d.getClip( ); Area ar1 = new Area( shClip ); Area ar2 = new Area( e2d ); ar2.intersect( ar1 ); _g2d.setClip( ar2 ); final Size szImage = _ids.getSize( img ); int iXRepeat = (int) ( Math.ceil( e2d.width / szImage.getWidth( ) ) ); int iYRepeat = (int) ( Math.ceil( e2d.height / szImage.getHeight( ) ) ); ImageObserver io = (ImageObserver) _ids.getObserver( ); for ( int i = 0; i < iXRepeat; i++ ) { for ( int j = 0; j < iYRepeat; j++ ) { _g2d.drawImage( img, (int) ( e2d.x + i * szImage.getWidth( ) ), (int) ( e2d.y + j * szImage.getHeight( ) ), io ); } } // img.flush(); // FLUSHED LATER BY CACHE; DON'T FLUSH HERE _g2d.setClip( shClip ); // RESTORE } }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/99ab478a2cd0ab25560606c29779d9cf026ebe25/SwingRendererImpl.java/clean/chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/swing/SwingRendererImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3636, 51, 1125, 12, 531, 1125, 3420, 1133, 320, 266, 262, 1216, 14804, 503, 202, 95, 202, 202, 6385, 14192, 1183, 8199, 273, 320, 266, 18, 588, 8199, 12, 11272, 202, 202,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 3636, 51, 1125, 12, 531, 1125, 3420, 1133, 320, 266, 262, 1216, 14804, 503, 202, 95, 202, 202, 6385, 14192, 1183, 8199, 273, 320, 266, 18, 588, 8199, 12, 11272, 202, 202,...
jdk.getVersionString().indexOf("1.5") > 0 &&
JavaSdk.getInstance().compareTo(jdk.getVersionString(), "1.5") >= 0 &&
public boolean isAvailable(Project project, Editor editor, PsiFile file) { final Module module = ModuleUtil.findModuleForPsiElement(myContext); if (module == null) return false; final ProjectJdk jdk = ModuleRootManager.getInstance(module).getJdk(); if (jdk == null) return false; if (DaemonCodeAnalyzerSettings.getInstance().SUPPRESS_WARNINGS && jdk.getVersionString().indexOf("1.5") > 0 && LanguageLevel.JDK_1_5.compareTo(PsiUtil.getLanguageLevel(myContext)) <= 0) return false; final PsiDocCommentOwner container = getContainer(); return myContext.isValid() && myContext.getManager().isInProject(myContext) && container != null && !(container instanceof JspHolderMethod); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/7f8b6b854d7639111c3f49ad5e5b3d9966c6adfe/AddNoInspectionDocTagAction.java/clean/codeInsight/impl/com/intellij/codeInsight/daemon/impl/AddNoInspectionDocTagAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1250, 28293, 12, 4109, 1984, 16, 18451, 4858, 16, 453, 7722, 812, 585, 13, 288, 565, 727, 5924, 1605, 273, 5924, 1304, 18, 4720, 3120, 1290, 52, 7722, 1046, 12, 4811, 1042, 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, 282, 1071, 1250, 28293, 12, 4109, 1984, 16, 18451, 4858, 16, 453, 7722, 812, 585, 13, 288, 565, 727, 5924, 1605, 273, 5924, 1304, 18, 4720, 3120, 1290, 52, 7722, 1046, 12, 4811, 1042, 1769, ...
System.out.println("Reading serialized object");
public static Object instantiate(ClassLoader cld, String beanName) throws IOException, ClassNotFoundException {System.out.println("Beans:instantiate: name=" + beanName + ", loader=" + cld); if (cld == null) { cld = SystemClassLoader.getClassLoader(); } InputStream in = cld.getResourceAsStream(beanName.replace('.', '/') + ".ser"); Object obj; if (in != null) {System.out.println("Reading serialized object"); obj = (new ClassLoaderObjectInputStream(in, cld)).readObject(); } else { try {System.out.println("Creating new instance"); obj = cld.loadClass(beanName).newInstance(); } catch (InstantiationException _) {System.out.println("InstantiationException"); throw new ClassNotFoundException(beanName); } catch (IllegalAccessException _) {System.out.println("IllegalAccessException"); throw new ClassNotFoundException(beanName); } } return (obj);}
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/06e7e9b156ff83048f7b63b268ef1cdd965a5fc5/Beans.java/buggy/libraries/javalib/java/beans/Beans.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 760, 1033, 10275, 12, 7805, 23451, 16, 514, 17932, 13, 1216, 1860, 16, 10403, 288, 3163, 18, 659, 18, 8222, 2932, 14495, 30, 24628, 3840, 30, 508, 1546, 397, 17932, 397, 3104, 4088, 1546...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 760, 1033, 10275, 12, 7805, 23451, 16, 514, 17932, 13, 1216, 1860, 16, 10403, 288, 3163, 18, 659, 18, 8222, 2932, 14495, 30, 24628, 3840, 30, 508, 1546, 397, 17932, 397, 3104, 4088, 1546...