rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
{ e.printStackTrace(); | { e.printStackTrace(); | public void tearDown() { try { if(m_server != null) m_server.shutDown(); } catch(Exception e) { e.printStackTrace(); } try { if(m_client1 != null) m_client1.shutDown(); } catch(Exception e) { e.printStackTrace(); } try { if(m_client2 != null) m_client2.shutDown(); } catch(Exception e) { e.printStackTrace(); } } | 8909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8909/b1c2fedcc8f54a822544e2dab5fe093ff7f2b275/MessengerTest.java/buggy/triplea/src/games/strategy/net/MessengerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
268,
2091,
4164,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
430,
12,
81,
67,
3567,
480,
446,
13,
9506,
202,
81,
67,
3567,
18,
674,
322,
4164,
5621,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
268,
2091,
4164,
1435,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
430,
12,
81,
67,
3567,
480,
446,
13,
9506,
202,
81,
67,
3567,
18,
674,
322,
4164,
5621,
202,
2... |
if(fs.get("GetCHKOnly").equalsIgnoreCase("true")){ getCHKOnly=true; }else{ getCHKOnly=false; } | getCHKOnly = Fields.stringToBool(fs.get("GetCHKOnly"), false); | public ClientPutMessage(SimpleFieldSet fs) throws MessageInvalidException { identifier = fs.get("Identifier"); if(identifier == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No Identifier", null); try { String u = fs.get("URI"); if(u == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "No URI", identifier); uri = new FreenetURI(fs.get("URI")); } catch (MalformedURLException e) { throw new MessageInvalidException(ProtocolErrorMessage.URI_PARSE_ERROR, e.getMessage(), identifier); } String verbosityString = fs.get("Verbosity"); if(verbosityString == null) verbosity = 0; else { try { verbosity = Integer.parseInt(verbosityString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing Verbosity field: "+e.getMessage(), identifier); } } contentType = fs.get("Metadata.ContentType"); String maxRetriesString = fs.get("MaxRetries"); if(maxRetriesString == null) // default to 0 maxRetries = 0; else { try { maxRetries = Integer.parseInt(maxRetriesString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing MaxSize field: "+e.getMessage(), identifier); } } if(fs.get("GetCHKOnly").equalsIgnoreCase("true")){ getCHKOnly=true; }else{ getCHKOnly=false; } String priorityString = fs.get("PriorityClass"); if(priorityString == null) { // defaults to the one just below fproxy priorityClass = RequestStarter.IMMEDIATE_SPLITFILE_PRIORITY_CLASS; } else { try { priorityClass = Short.parseShort(priorityString, 10); if(priorityClass < RequestStarter.MAXIMUM_PRIORITY_CLASS || priorityClass > RequestStarter.MINIMUM_PRIORITY_CLASS) throw new MessageInvalidException(ProtocolErrorMessage.INVALID_FIELD, "Valid priorities are from "+RequestStarter.MAXIMUM_PRIORITY_CLASS+" to "+RequestStarter.MINIMUM_PRIORITY_CLASS, identifier); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing PriorityClass field: "+e.getMessage(), identifier); } } String uploadFrom = fs.get("UploadFrom"); if(uploadFrom != null && uploadFrom.equalsIgnoreCase("disk")) { fromDisk = true; String filename = fs.get("Filename"); if(filename == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Missing field Filename", identifier); File f = new File(filename); if(!(f.exists() && f.isFile() && f.canRead())) throw new MessageInvalidException(ProtocolErrorMessage.FILE_NOT_FOUND, null, identifier); dataLength = f.length(); FileBucket fileBucket = new FileBucket(f, true, false, false); this.bucket = fileBucket; } else { fromDisk = false; String dataLengthString = fs.get("DataLength"); if(dataLengthString == null) throw new MessageInvalidException(ProtocolErrorMessage.MISSING_FIELD, "Need DataLength on a ClientPut", identifier); try { dataLength = Long.parseLong(dataLengthString, 10); } catch (NumberFormatException e) { throw new MessageInvalidException(ProtocolErrorMessage.ERROR_PARSING_NUMBER, "Error parsing DataLength field: "+e.getMessage(), identifier); } } if(fs.get("DontCompress").equalsIgnoreCase("true")){ dontCompress=true; }else{ dontCompress=false; } } | 50493 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50493/c76e66320637c9e8c51b294047e6cecb45bc9066/ClientPutMessage.java/buggy/src/freenet/node/fcp/ClientPutMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
1079,
12,
5784,
974,
694,
2662,
13,
1216,
2350,
1941,
503,
288,
202,
202,
5644,
273,
2662,
18,
588,
2932,
3004,
8863,
202,
202,
430,
12,
5644,
422,
446,
13,
1082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2445,
6426,
1079,
12,
5784,
974,
694,
2662,
13,
1216,
2350,
1941,
503,
288,
202,
202,
5644,
273,
2662,
18,
588,
2932,
3004,
8863,
202,
202,
430,
12,
5644,
422,
446,
13,
1082,
... |
public void ruleAction(int ruleNumber) { if (bad_rule != 0) return; switch (ruleNumber) { // // Rule 1: identifier ::= IDENTIFIER // case 1: { if (prsStream.getKind(btParser.getToken(1)) != X10Parsersym.TK_IDENTIFIER) { System.out.println("Parser turning keyword " + prsStream.getName(btParser.getToken(1)) + " at " + prsStream.getLine(btParser.getToken(1)) + ":" + prsStream.getColumn(btParser.getToken(1)) + " into an identifier"); } break; } // // Rule 2: PrimitiveType ::= NumericType // case 2: break; // // Rule 3: PrimitiveType ::= boolean // case 3: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Boolean())); break; } // // Rule 4: NumericType ::= IntegralType // case 4: break; // // Rule 5: NumericType ::= FloatingPointType // case 5: break; // // Rule 6: IntegralType ::= byte // case 6: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Byte())); break; } // // Rule 7: IntegralType ::= char // case 7: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Char())); break; } // // Rule 8: IntegralType ::= short // case 8: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Short())); break; } // // Rule 9: IntegralType ::= int // case 9: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Int())); break; } // // Rule 10: IntegralType ::= long // case 10: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Long())); break; } // // Rule 11: FloatingPointType ::= float // case 11: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Float())); break; } // // Rule 12: FloatingPointType ::= double // case 12: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Double())); break; } // // Rule 13: ReferenceType ::= ClassOrInterfaceType // case 13: break; // // Rule 14: ReferenceType ::= ArrayType // case 14: break; // // Rule 15: ClassOrInterfaceType ::= ClassType // case 15: break; // // Rule 16: ClassType ::= TypeName // case 16: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 17: InterfaceType ::= TypeName // case 17: {//vj assert(btParser.getSym(2) == null); // generic not yet supported Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toType()); break; } // // Rule 18: TypeName ::= identifier // case 18: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 19: TypeName ::= TypeName DOT identifier // case 19: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 20: ClassName ::= TypeName // case 20: break; // // Rule 21: TypeVariable ::= identifier // case 21: break; // // Rule 22: ArrayType ::= Type LBRACKET RBRACKET // case 22: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(array(a, pos(), 1)); break; } // // Rule 23: TypeParameter ::= TypeVariable TypeBoundopt // case 23: bad_rule = 23; break; // // Rule 24: TypeBound ::= extends ClassOrInterfaceType AdditionalBoundListopt // case 24: bad_rule = 24; break; // // Rule 25: AdditionalBoundList ::= AdditionalBound // case 25: bad_rule = 25; break; // // Rule 26: AdditionalBoundList ::= AdditionalBoundList AdditionalBound // case 26: bad_rule = 26; break; // // Rule 27: AdditionalBound ::= AND InterfaceType // case 27: bad_rule = 27; break; // // Rule 28: TypeArguments ::= LESS ActualTypeArgumentList GREATER // case 28: bad_rule = 28; break; // // Rule 29: ActualTypeArgumentList ::= ActualTypeArgument // case 29: bad_rule = 29; break; // // Rule 30: ActualTypeArgumentList ::= ActualTypeArgumentList COMMA ActualTypeArgument // case 30: bad_rule = 30; break; // // Rule 31: Wildcard ::= QUESTION WildcardBoundsOpt // case 31: bad_rule = 31; break; // // Rule 32: WildcardBounds ::= extends ReferenceType // case 32: bad_rule = 32; break; // // Rule 33: WildcardBounds ::= super ReferenceType // case 33: bad_rule = 33; break; // // Rule 34: PackageName ::= identifier // case 34: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 35: PackageName ::= PackageName DOT identifier // case 35: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 36: ExpressionName ::= identifier // case 36: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 37: ExpressionName ::= AmbiguousName DOT identifier // case 37: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 38: MethodName ::= identifier // case 38: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 39: MethodName ::= AmbiguousName DOT identifier // case 39: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 40: PackageOrTypeName ::= identifier // case 40: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 41: PackageOrTypeName ::= PackageOrTypeName DOT identifier // case 41: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 42: AmbiguousName ::= identifier // case 42: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 43: AmbiguousName ::= AmbiguousName DOT identifier // case 43: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(new Name(nf, ts, pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier())); break; } // // Rule 44: CompilationUnit ::= Commentsopt PackageDeclarationopt ImportDeclarationsopt TypeDeclarationsopt // case 44: { Object comment = btParser.getSym(1); PackageNode a = (PackageNode) btParser.getSym(2); List b = (List) btParser.getSym(3), c = (List) btParser.getSym(4); Node n = nf.SourceFile(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b, c); if (comment != null) { n.setComment(comment.toString()); } btParser.setSym1(n); break; } // // Rule 45: Comments ::= Comment // case 45: { Object comment = comment(btParser.getToken(1)); btParser.setSym1(comment); break; } // // Rule 46: Comments ::= Comments Comment // case 46: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 47: ImportDeclarations ::= ImportDeclaration // case 47: { List l = new TypedList(new LinkedList(), Import.class, false); Import a = (Import) btParser.getSym(1); l.add(a); btParser.setSym1(l); break; } // // Rule 48: ImportDeclarations ::= ImportDeclarations ImportDeclaration // case 48: { List l = (TypedList) btParser.getSym(1); Import b = (Import) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 49: TypeDeclarations ::= Commentsopt TypeDeclaration // case 49: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), TopLevelDecl.class, false); TopLevelDecl a = (TopLevelDecl) btParser.getSym(2); if (a != null) l.add(a); if (comment != null) { a.setComment(comment.toString()); } btParser.setSym1(l); break; } // // Rule 50: TypeDeclarations ::= TypeDeclarations TypeDeclaration // case 50: { List l = (TypedList) btParser.getSym(1); TopLevelDecl b = (TopLevelDecl) btParser.getSym(2); if (b != null) l.add(b); //btParser.setSym1(l); break; } // // Rule 51: PackageDeclaration ::= package PackageName SEMICOLON // case 51: {//vj assert(btParser.getSym(1) == null); // generic not yet supported Name a = (Name) btParser.getSym(2); btParser.setSym1(a.toPackage()); break; } // // Rule 52: ImportDeclaration ::= SingleTypeImportDeclaration // case 52: break; // // Rule 53: ImportDeclaration ::= TypeImportOnDemandDeclaration // case 53: break; // // Rule 54: ImportDeclaration ::= SingleStaticImportDeclaration // case 54: break; // // Rule 55: ImportDeclaration ::= StaticImportOnDemandDeclaration // case 55: break; // // Rule 56: SingleTypeImportDeclaration ::= import TypeName SEMICOLON // case 56: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.CLASS, a.toString())); break; } // // Rule 57: TypeImportOnDemandDeclaration ::= import PackageOrTypeName DOT MULTIPLY SEMICOLON // case 57: { Name a = (Name) btParser.getSym(2); btParser.setSym1(nf.Import(pos(btParser.getFirstToken(), btParser.getLastToken()), Import.PACKAGE, a.toString())); break; } // // Rule 58: SingleStaticImportDeclaration ::= import static TypeName DOT identifier SEMICOLON // case 58: bad_rule = 58; break; // // Rule 59: StaticImportOnDemandDeclaration ::= import static TypeName DOT MULTIPLY SEMICOLON // case 59: bad_rule = 59; break; // // Rule 60: TypeDeclaration ::= ClassDeclaration // case 60: break; // // Rule 61: TypeDeclaration ::= InterfaceDeclaration // case 61: break; // // Rule 62: TypeDeclaration ::= SEMICOLON // case 62: { btParser.setSym1(null); break; } // // Rule 63: ClassDeclaration ::= NormalClassDeclaration // case 63: break; // // Rule 64: NormalClassDeclaration ::= Commentsopt ClassModifiersopt class identifier Superopt Interfacesopt ClassBody // case 64: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); TypeNode c = (TypeNode) btParser.getSym(5); // by default extend x10.lang.Object if (c == null) { c= new Name(nf, ts, pos(), "x10.lang.Object").toType(); } List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); Node n = a.isValue() ? nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e) : nf.ClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e); if (comment != null) n.setComment(comment.toString()); btParser.setSym1(n); break; } // // Rule 65: ClassModifiers ::= ClassModifier // case 65: break; // // Rule 66: ClassModifiers ::= ClassModifiers ClassModifier // case 66: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 67: ClassModifier ::= public // case 67: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 68: ClassModifier ::= protected // case 68: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 69: ClassModifier ::= private // case 69: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 70: ClassModifier ::= abstract // case 70: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 71: ClassModifier ::= static // case 71: { btParser.setSym1(Flags.STATIC); break; } // // Rule 72: ClassModifier ::= final // case 72: { btParser.setSym1(Flags.FINAL); break; } // // Rule 73: ClassModifier ::= strictfp // case 73: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 74: TypeParameters ::= LESS TypeParameterList GREATER // case 74: bad_rule = 74; break; // // Rule 75: TypeParameterList ::= TypeParameter // case 75: bad_rule = 75; break; // // Rule 76: TypeParameterList ::= TypeParameterList COMMA TypeParameter // case 76: bad_rule = 76; break; // // Rule 77: Super ::= extends ClassType // case 77: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 78: Interfaces ::= implements InterfaceTypeList // case 78: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 79: InterfaceTypeList ::= InterfaceType // case 79: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 80: InterfaceTypeList ::= InterfaceTypeList COMMA InterfaceType // case 80: { List l = (TypedList) btParser.getSym(1); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 81: ClassBody ::= LBRACE ClassBodyDeclarationsopt RBRACE // case 81: { btParser.setSym1(nf.ClassBody(pos(btParser.getFirstToken(), btParser.getLastToken()), (List) btParser.getSym(2))); break; } // // Rule 82: ClassBodyDeclarations ::= ClassBodyDeclaration // case 82: break; // // Rule 83: ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration // case 83: { List a = (List) btParser.getSym(1), b = (List) btParser.getSym(2); a.addAll(b); // btParser.setSym1(a); break; } // // Rule 84: ClassBodyDeclaration ::= ClassMemberDeclaration // case 84: break; // // Rule 85: ClassBodyDeclaration ::= InstanceInitializer // case 85: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.NONE, a)); btParser.setSym1(l); break; } // // Rule 86: ClassBodyDeclaration ::= StaticInitializer // case 86: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Block a = (Block) btParser.getSym(1); l.add(nf.Initializer(pos(), Flags.STATIC, a)); btParser.setSym1(l); break; } // // Rule 87: ClassBodyDeclaration ::= ConstructorDeclaration // case 87: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 88: ClassMemberDeclaration ::= FieldDeclaration // case 88: break; // // Rule 89: ClassMemberDeclaration ::= MethodDeclaration // case 89: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 90: ClassMemberDeclaration ::= ClassDeclaration // case 90: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 91: ClassMemberDeclaration ::= InterfaceDeclaration // case 91: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 92: ClassMemberDeclaration ::= SEMICOLON // case 92: { List l = new TypedList(new LinkedList(), ClassMember.class, false); btParser.setSym1(l); break; } // // Rule 93: FieldDeclaration ::= Commentsopt FieldModifiersopt Type VariableDeclarators SEMICOLON // case 93: { Object comment = btParser.getSym(1); List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(2); TypeNode b = (TypeNode) btParser.getSym(3); List c = (List) btParser.getSym(4); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } if (comment != null) ((Node) l.get(0)).setComment(comment.toString()); btParser.setSym1(l); break; } // // Rule 94: VariableDeclarators ::= VariableDeclarator // case 94: { List l = new TypedList(new LinkedList(), VarDeclarator.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 95: VariableDeclarators ::= VariableDeclarators COMMA VariableDeclarator // case 95: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 96: VariableDeclarator ::= VariableDeclaratorId // case 96: break; // // Rule 97: VariableDeclarator ::= VariableDeclaratorId EQUAL VariableInitializer // case 97: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); Expr b = (Expr) btParser.getSym(3); a.init = b; // btParser.setSym1(a); break; } // // Rule 98: VariableDeclaratorId ::= identifier // case 98: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new VarDeclarator(pos(), a.getIdentifier())); break; } // // Rule 99: VariableDeclaratorId ::= VariableDeclaratorId LBRACKET RBRACKET // case 99: { VarDeclarator a = (VarDeclarator) btParser.getSym(1); a.dims++; // btParser.setSym1(a); break; } // // Rule 100: VariableInitializer ::= Expression // case 100: break; // // Rule 101: VariableInitializer ::= ArrayInitializer // case 101: break; // // Rule 102: FieldModifiers ::= FieldModifier // case 102: break; // // Rule 103: FieldModifiers ::= FieldModifiers FieldModifier // case 103: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 104: FieldModifier ::= public // case 104: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 105: FieldModifier ::= protected // case 105: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 106: FieldModifier ::= private // case 106: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 107: FieldModifier ::= static // case 107: { btParser.setSym1(Flags.STATIC); break; } // // Rule 108: FieldModifier ::= final // case 108: { btParser.setSym1(Flags.FINAL); break; } // // Rule 109: FieldModifier ::= transient // case 109: { btParser.setSym1(Flags.TRANSIENT); break; } // // Rule 110: FieldModifier ::= volatile // case 110: { btParser.setSym1(Flags.VOLATILE); break; } // // Rule 111: MethodDeclaration ::= Commentsopt MethodHeader MethodBody // case 111: { Object comment = btParser.getSym(1); MethodDecl a = (MethodDecl) btParser.getSym(2); Block b = (Block) btParser.getSym(3); if (comment != null) a.setComment(comment.toString()); btParser.setSym1(a.body(b)); break; } // // Rule 112: MethodHeader ::= MethodModifiersopt ResultType MethodDeclarator Throwsopt // case 112: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 113: ResultType ::= Type // case 113: break; // // Rule 114: ResultType ::= void // case 114: { btParser.setSym1(nf.CanonicalTypeNode(pos(), ts.Void())); break; } // // Rule 115: MethodDeclarator ::= identifier LPAREN FormalParameterListopt RPAREN // case 115: { Object[] a = new Object[3]; a[0] = new Name(nf, ts, pos(), id(btParser.getToken(1)).getIdentifier()); a[1] = btParser.getSym(3); a[2] = new Integer(0); btParser.setSym1(a); break; } // // Rule 116: MethodDeclarator ::= MethodDeclarator LBRACKET RBRACKET // case 116: { Object[] a = (Object []) btParser.getSym(1); a[2] = new Integer(((Integer) a[2]).intValue() + 1); // btParser.setSym1(a); break; } // // Rule 117: FormalParameterList ::= LastFormalParameter // case 117: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 118: FormalParameterList ::= FormalParameters COMMA LastFormalParameter // case 118: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 119: FormalParameters ::= FormalParameter // case 119: { List l = new TypedList(new LinkedList(), Formal.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 120: FormalParameters ::= FormalParameters COMMA FormalParameter // case 120: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 121: FormalParameter ::= VariableModifiersopt Type VariableDeclaratorId // case 121: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); VarDeclarator b = (VarDeclarator) btParser.getSym(3); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 123: VariableModifiers ::= VariableModifiers VariableModifier // case 123: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 124: VariableModifier ::= final // case 124: { btParser.setSym1(Flags.FINAL); break; } // // Rule 125: LastFormalParameter ::= VariableModifiersopt Type ...opt VariableDeclaratorId // case 125: { Flags f = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); assert(btParser.getSym(3) == null); VarDeclarator b = (VarDeclarator) btParser.getSym(4); btParser.setSym1(nf.Formal(pos(), f, array(a, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), b.dims), b.name)); break; } // // Rule 126: MethodModifiers ::= MethodModifier // case 126: break; // // Rule 127: MethodModifiers ::= MethodModifiers MethodModifier // case 127: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 128: MethodModifier ::= public // case 128: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 129: MethodModifier ::= protected // case 129: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 130: MethodModifier ::= private // case 130: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 131: MethodModifier ::= abstract // case 131: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 132: MethodModifier ::= static // case 132: { btParser.setSym1(Flags.STATIC); break; } // // Rule 133: MethodModifier ::= final // case 133: { btParser.setSym1(Flags.FINAL); break; } // // Rule 134: MethodModifier ::= synchronized // case 134: { btParser.setSym1(Flags.SYNCHRONIZED); break; } // // Rule 135: MethodModifier ::= native // case 135: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 136: MethodModifier ::= strictfp // case 136: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 137: Throws ::= throws ExceptionTypeList // case 137: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 138: ExceptionTypeList ::= ExceptionType // case 138: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 139: ExceptionTypeList ::= ExceptionTypeList COMMA ExceptionType // case 139: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 140: ExceptionType ::= ClassType // case 140: break; // // Rule 141: ExceptionType ::= TypeVariable // case 141: break; // // Rule 142: MethodBody ::= Block // case 142: break; // // Rule 143: MethodBody ::= SEMICOLON // case 143: btParser.setSym1(null); break; // // Rule 144: InstanceInitializer ::= Block // case 144: break; // // Rule 145: StaticInitializer ::= static Block // case 145: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 146: ConstructorDeclaration ::= ConstructorModifiersopt ConstructorDeclarator Throwsopt ConstructorBody // case 146: { Flags m = (Flags) btParser.getSym(1); Object[] o = (Object []) btParser.getSym(2); Name a = (Name) o[1]; List b = (List) o[2]; List c = (List) btParser.getSym(3); Block d = (Block) btParser.getSym(4); btParser.setSym1(nf.ConstructorDecl(pos(), m, a.toString(), b, c, d)); break; } // // Rule 147: ConstructorDeclarator ::= SimpleTypeName LPAREN FormalParameterListopt RPAREN // case 147: {//vj assert(btParser.getSym(1) == null); Object[] a = new Object[3];//vj a[0] = btParser.getSym(1); a[1] = btParser.getSym(1); a[2] = btParser.getSym(3); btParser.setSym1(a); break; } // // Rule 148: SimpleTypeName ::= identifier // case 148: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 149: ConstructorModifiers ::= ConstructorModifier // case 149: break; // // Rule 150: ConstructorModifiers ::= ConstructorModifiers ConstructorModifier // case 150: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 151: ConstructorModifier ::= public // case 151: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 152: ConstructorModifier ::= protected // case 152: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 153: ConstructorModifier ::= private // case 153: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 154: ConstructorBody ::= LBRACE ExplicitConstructorInvocationopt BlockStatementsopt RBRACE // case 154: { Stmt a = (Stmt) btParser.getSym(2); List l; if (a == null) l = (List) btParser.getSym(3); else { l = new TypedList(new LinkedList(), Stmt.class, false); List l2 = (List) btParser.getSym(3); l.add(a); l.addAll(l2); } btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 155: ExplicitConstructorInvocation ::= this LPAREN ArgumentListopt RPAREN SEMICOLON // case 155: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.ThisCall(pos(), b)); break; } // // Rule 156: ExplicitConstructorInvocation ::= super LPAREN ArgumentListopt RPAREN SEMICOLON // case 156: {//vj assert(btParser.getSym(1) == null); List b = (List) btParser.getSym(3); btParser.setSym1(nf.SuperCall(pos(), b)); break; } // // Rule 157: ExplicitConstructorInvocation ::= Primary DOT this LPAREN ArgumentListopt RPAREN SEMICOLON // case 157: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.ThisCall(pos(), a, b)); break; } // // Rule 158: ExplicitConstructorInvocation ::= Primary DOT super LPAREN ArgumentListopt RPAREN SEMICOLON // case 158: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); List b = (List) btParser.getSym(5); btParser.setSym1(nf.SuperCall(pos(), a, b)); break; } // // Rule 159: EnumDeclaration ::= ClassModifiersopt enum identifier Interfacesopt EnumBody // case 159: bad_rule = 159; break; // // Rule 160: EnumBody ::= LBRACE EnumConstantsopt ,opt EnumBodyDeclarationsopt RBRACE // case 160: bad_rule = 160; break; // // Rule 161: EnumConstants ::= EnumConstant // case 161: bad_rule = 161; break; // // Rule 162: EnumConstants ::= EnumConstants COMMA EnumConstant // case 162: bad_rule = 162; break; // // Rule 163: EnumConstant ::= identifier Argumentsopt ClassBodyopt // case 163: bad_rule = 163; break; // // Rule 164: Arguments ::= LPAREN ArgumentListopt RPAREN // case 164: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 165: EnumBodyDeclarations ::= SEMICOLON ClassBodyDeclarationsopt // case 165: bad_rule = 165; break; // // Rule 166: InterfaceDeclaration ::= NormalInterfaceDeclaration // case 166: break; // // Rule 167: NormalInterfaceDeclaration ::= Commentsopt InterfaceModifiersopt interface identifier ExtendsInterfacesopt InterfaceBody // case 167: { Object comment = btParser.getSym(1); Flags a = (Flags) btParser.getSym(2); polyglot.lex.Identifier b = id(btParser.getToken(4));//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(5); ClassBody d = (ClassBody) btParser.getSym(6); Node n = nf.ClassDecl(pos(), a.Interface(), b.getIdentifier(), null, c, d); if (comment != null) n.setComment( comment.toString() ); btParser.setSym1(n); break; } // // Rule 168: InterfaceModifiers ::= InterfaceModifier // case 168: break; // // Rule 169: InterfaceModifiers ::= InterfaceModifiers InterfaceModifier // case 169: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 170: InterfaceModifier ::= public // case 170: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 171: InterfaceModifier ::= protected // case 171: { btParser.setSym1(Flags.PROTECTED); break; } // // Rule 172: InterfaceModifier ::= private // case 172: { btParser.setSym1(Flags.PRIVATE); break; } // // Rule 173: InterfaceModifier ::= abstract // case 173: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 174: InterfaceModifier ::= static // case 174: { btParser.setSym1(Flags.STATIC); break; } // // Rule 175: InterfaceModifier ::= strictfp // case 175: { btParser.setSym1(Flags.STRICTFP); break; } // // Rule 176: ExtendsInterfaces ::= extends InterfaceType // case 176: { List l = new TypedList(new LinkedList(), TypeNode.class, false); l.add(btParser.getSym(2)); btParser.setSym1(l); break; } // // Rule 177: ExtendsInterfaces ::= ExtendsInterfaces COMMA InterfaceType // case 177: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); // btParser.setSym1(l); break; } // // Rule 178: InterfaceBody ::= LBRACE InterfaceMemberDeclarationsopt RBRACE // case 178: { List a = (List)btParser.getSym(2); btParser.setSym1(nf.ClassBody(pos(), a)); break; } // // Rule 179: InterfaceMemberDeclarations ::= InterfaceMemberDeclaration // case 179: break; // // Rule 180: InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration // case 180: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 181: InterfaceMemberDeclaration ::= ConstantDeclaration // case 181: break; // // Rule 182: InterfaceMemberDeclaration ::= AbstractMethodDeclaration // case 182: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 183: InterfaceMemberDeclaration ::= ClassDeclaration // case 183: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 184: InterfaceMemberDeclaration ::= InterfaceDeclaration // case 184: { List l = new TypedList(new LinkedList(), ClassMember.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 185: InterfaceMemberDeclaration ::= SEMICOLON // case 185: { btParser.setSym1(Collections.EMPTY_LIST); break; } // // Rule 186: ConstantDeclaration ::= ConstantModifiersopt Type VariableDeclarators // case 186: { List l = new TypedList(new LinkedList(), ClassMember.class, false); Flags a = (Flags) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(2); List c = (List) btParser.getSym(3); for (Iterator i = c.iterator(); i.hasNext();) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.FieldDecl(pos(btParser.getFirstToken(2), btParser.getLastToken()), a, array(b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 187: ConstantModifiers ::= ConstantModifier // case 187: break; // // Rule 188: ConstantModifiers ::= ConstantModifiers ConstantModifier // case 188: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 189: ConstantModifier ::= public // case 189: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 190: ConstantModifier ::= static // case 190: { btParser.setSym1(Flags.STATIC); break; } // // Rule 191: ConstantModifier ::= final // case 191: { btParser.setSym1(Flags.FINAL); break; } // // Rule 192: AbstractMethodDeclaration ::= AbstractMethodModifiersopt ResultType MethodDeclarator Throwsopt SEMICOLON // case 192: { Flags a = (Flags) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); TypeNode b = (TypeNode) btParser.getSym(2); Object[] o = (Object []) btParser.getSym(3); Name c = (Name) o[0]; List d = (List) o[1]; Integer e = (Integer) o[2]; List f = (List) btParser.getSym(4); if (b.type() == ts.Void() && e.intValue() > 0) { // TODO: error!!! } btParser.setSym1(nf.MethodDecl(pos(btParser.getFirstToken(2), btParser.getLastToken(3)), a, array((TypeNode) b, pos(btParser.getFirstToken(2), btParser.getLastToken(2)), e.intValue()), c.toString(), d, f, null)); break; } // // Rule 193: AbstractMethodModifiers ::= AbstractMethodModifier // case 193: break; // // Rule 194: AbstractMethodModifiers ::= AbstractMethodModifiers AbstractMethodModifier // case 194: { Flags a = (Flags) btParser.getSym(1), b = (Flags) btParser.getSym(2); btParser.setSym1(a.set(b)); break; } // // Rule 195: AbstractMethodModifier ::= public // case 195: { btParser.setSym1(Flags.PUBLIC); break; } // // Rule 196: AbstractMethodModifier ::= abstract // case 196: { btParser.setSym1(Flags.ABSTRACT); break; } // // Rule 197: AnnotationTypeDeclaration ::= InterfaceModifiersopt AT interface identifier AnnotationTypeBody // case 197: bad_rule = 197; break; // // Rule 198: AnnotationTypeBody ::= LBRACE AnnotationTypeElementDeclarationsopt RBRACE // case 198: bad_rule = 198; break; // // Rule 199: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclaration // case 199: bad_rule = 199; break; // // Rule 200: AnnotationTypeElementDeclarations ::= AnnotationTypeElementDeclarations AnnotationTypeElementDeclaration // case 200: bad_rule = 200; break; // // Rule 201: AnnotationTypeElementDeclaration ::= AbstractMethodModifiersopt Type identifier LPAREN RPAREN DefaultValueopt SEMICOLON // case 201: bad_rule = 201; break; // // Rule 202: AnnotationTypeElementDeclaration ::= ConstantDeclaration // case 202: bad_rule = 202; break; // // Rule 203: AnnotationTypeElementDeclaration ::= ClassDeclaration // case 203: bad_rule = 203; break; // // Rule 204: AnnotationTypeElementDeclaration ::= InterfaceDeclaration // case 204: bad_rule = 204; break; // // Rule 205: AnnotationTypeElementDeclaration ::= EnumDeclaration // case 205: bad_rule = 205; break; // // Rule 206: AnnotationTypeElementDeclaration ::= AnnotationTypeDeclaration // case 206: bad_rule = 206; break; // // Rule 207: AnnotationTypeElementDeclaration ::= SEMICOLON // case 207: bad_rule = 207; break; // // Rule 208: DefaultValue ::= default ElementValue // case 208: bad_rule = 208; break; // // Rule 209: Annotations ::= Annotation // case 209: bad_rule = 209; break; // // Rule 210: Annotations ::= Annotations Annotation // case 210: bad_rule = 210; break; // // Rule 211: Annotation ::= NormalAnnotation // case 211: bad_rule = 211; break; // // Rule 212: Annotation ::= MarkerAnnotation // case 212: bad_rule = 212; break; // // Rule 213: Annotation ::= SingleElementAnnotation // case 213: bad_rule = 213; break; // // Rule 214: NormalAnnotation ::= AT TypeName LPAREN ElementValuePairsopt RPAREN // case 214: bad_rule = 214; break; // // Rule 215: ElementValuePairs ::= ElementValuePair // case 215: bad_rule = 215; break; // // Rule 216: ElementValuePairs ::= ElementValuePairs COMMA ElementValuePair // case 216: bad_rule = 216; break; // // Rule 217: ElementValuePair ::= SimpleName EQUAL ElementValue // case 217: bad_rule = 217; break; // // Rule 218: SimpleName ::= identifier // case 218: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 219: ElementValue ::= ConditionalExpression // case 219: bad_rule = 219; break; // // Rule 220: ElementValue ::= Annotation // case 220: bad_rule = 220; break; // // Rule 221: ElementValue ::= ElementValueArrayInitializer // case 221: bad_rule = 221; break; // // Rule 222: ElementValueArrayInitializer ::= LBRACE ElementValuesopt ,opt RBRACE // case 222: bad_rule = 222; break; // // Rule 223: ElementValues ::= ElementValue // case 223: bad_rule = 223; break; // // Rule 224: ElementValues ::= ElementValues COMMA ElementValue // case 224: bad_rule = 224; break; // // Rule 225: MarkerAnnotation ::= AT TypeName // case 225: bad_rule = 225; break; // // Rule 226: SingleElementAnnotation ::= AT TypeName LPAREN ElementValue RPAREN // case 226: bad_rule = 226; break; // // Rule 227: ArrayInitializer ::= LBRACE VariableInitializersopt ,opt RBRACE // case 227: { List a = (List) btParser.getSym(2); if (a == null) btParser.setSym1(nf.ArrayInit(pos())); else btParser.setSym1(nf.ArrayInit(pos(), a)); break; } // // Rule 228: VariableInitializers ::= VariableInitializer // case 228: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 229: VariableInitializers ::= VariableInitializers COMMA VariableInitializer // case 229: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 230: Block ::= LBRACE BlockStatementsopt RBRACE // case 230: { List l = (List) btParser.getSym(2); btParser.setSym1(nf.Block(pos(), l)); break; } // // Rule 231: BlockStatements ::= BlockStatement // case 231: { List l = new TypedList(new LinkedList(), Stmt.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); btParser.setSym1(l); break; } // // Rule 232: BlockStatements ::= BlockStatements BlockStatement // case 232: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 233: BlockStatement ::= LocalVariableDeclarationStatement // case 233: break; // // Rule 234: BlockStatement ::= ClassDeclaration // case 234: { ClassDecl a = (ClassDecl) btParser.getSym(1); List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(nf.LocalClassDecl(pos(), a)); btParser.setSym1(l); break; } // // Rule 235: BlockStatement ::= Statement // case 235: { List l = new TypedList(new LinkedList(), Stmt.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 236: LocalVariableDeclarationStatement ::= LocalVariableDeclaration SEMICOLON // case 236: break; // // Rule 237: LocalVariableDeclaration ::= VariableModifiersopt Type VariableDeclarators // case 237: { Flags flags = (Flags) btParser.getSym(1); TypeNode a = (TypeNode) btParser.getSym(2); List b = (List) btParser.getSym(3); List l = new TypedList(new LinkedList(), LocalDecl.class, false); for (Iterator i = b.iterator(); i.hasNext(); ) { VarDeclarator d = (VarDeclarator) i.next(); l.add(nf.LocalDecl(pos(d), flags, array(a, pos(d), d.dims), d.name, d.init)); } btParser.setSym1(l); break; } // // Rule 238: Statement ::= StatementWithoutTrailingSubstatement // case 238: break; // // Rule 239: Statement ::= LabeledStatement // case 239: break; // // Rule 240: Statement ::= IfThenStatement // case 240: break; // // Rule 241: Statement ::= IfThenElseStatement // case 241: break; // // Rule 242: Statement ::= WhileStatement // case 242: break; // // Rule 243: Statement ::= ForStatement // case 243: break; // // Rule 244: StatementWithoutTrailingSubstatement ::= Block // case 244: break; // // Rule 245: StatementWithoutTrailingSubstatement ::= EmptyStatement // case 245: break; // // Rule 246: StatementWithoutTrailingSubstatement ::= ExpressionStatement // case 246: break; // // Rule 247: StatementWithoutTrailingSubstatement ::= AssertStatement // case 247: break; // // Rule 248: StatementWithoutTrailingSubstatement ::= SwitchStatement // case 248: break; // // Rule 249: StatementWithoutTrailingSubstatement ::= DoStatement // case 249: break; // // Rule 250: StatementWithoutTrailingSubstatement ::= BreakStatement // case 250: break; // // Rule 251: StatementWithoutTrailingSubstatement ::= ContinueStatement // case 251: break; // // Rule 252: StatementWithoutTrailingSubstatement ::= ReturnStatement // case 252: break; // // Rule 253: StatementWithoutTrailingSubstatement ::= SynchronizedStatement // case 253: break; // // Rule 254: StatementWithoutTrailingSubstatement ::= ThrowStatement // case 254: break; // // Rule 255: StatementWithoutTrailingSubstatement ::= TryStatement // case 255: break; // // Rule 256: StatementNoShortIf ::= StatementWithoutTrailingSubstatement // case 256: break; // // Rule 257: StatementNoShortIf ::= LabeledStatementNoShortIf // case 257: break; // // Rule 258: StatementNoShortIf ::= IfThenElseStatementNoShortIf // case 258: break; // // Rule 259: StatementNoShortIf ::= WhileStatementNoShortIf // case 259: break; // // Rule 260: StatementNoShortIf ::= ForStatementNoShortIf // case 260: break; // // Rule 261: IfThenStatement ::= if LPAREN Expression RPAREN Statement // case 261: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.If(pos(), a, b)); break; } // // Rule 262: IfThenElseStatement ::= if LPAREN Expression RPAREN StatementNoShortIf else Statement // case 262: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 263: IfThenElseStatementNoShortIf ::= if LPAREN Expression RPAREN StatementNoShortIf else StatementNoShortIf // case 263: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); Stmt c = (Stmt) btParser.getSym(7); btParser.setSym1(nf.If(pos(), a, b, c)); break; } // // Rule 264: EmptyStatement ::= SEMICOLON // case 264: { btParser.setSym1(nf.Empty(pos())); break; } // // Rule 265: LabeledStatement ::= identifier COLON Statement // case 265: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 266: LabeledStatementNoShortIf ::= identifier COLON StatementNoShortIf // case 266: { polyglot.lex.Identifier a = id(btParser.getToken(1)); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Labeled(pos(), a.getIdentifier(), b)); break; } // // Rule 267: ExpressionStatement ::= StatementExpression SEMICOLON // case 267: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Eval(pos(), a)); break; } // // Rule 268: StatementExpression ::= Assignment // case 268: break; // // Rule 269: StatementExpression ::= PreIncrementExpression // case 269: break; // // Rule 270: StatementExpression ::= PreDecrementExpression // case 270: break; // // Rule 271: StatementExpression ::= PostIncrementExpression // case 271: break; // // Rule 272: StatementExpression ::= PostDecrementExpression // case 272: break; // // Rule 273: StatementExpression ::= MethodInvocation // case 273: break; // // Rule 274: StatementExpression ::= ClassInstanceCreationExpression // case 274: break; // // Rule 275: AssertStatement ::= assert Expression SEMICOLON // case 275: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Assert(pos(), a)); break; } // // Rule 276: AssertStatement ::= assert Expression COLON Expression SEMICOLON // case 276: { Expr a = (Expr) btParser.getSym(2), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Assert(pos(), a, b)); break; } // // Rule 277: SwitchStatement ::= switch LPAREN Expression RPAREN SwitchBlock // case 277: { Expr a = (Expr) btParser.getSym(3); List b = (List) btParser.getSym(5); btParser.setSym1(nf.Switch(pos(), a, b)); break; } // // Rule 278: SwitchBlock ::= LBRACE SwitchBlockStatementGroupsopt SwitchLabelsopt RBRACE // case 278: { List l = (List) btParser.getSym(2), l2 = (List) btParser.getSym(3); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 279: SwitchBlockStatementGroups ::= SwitchBlockStatementGroup // case 279: break; // // Rule 280: SwitchBlockStatementGroups ::= SwitchBlockStatementGroups SwitchBlockStatementGroup // case 280: { List l = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l2); // btParser.setSym1(l); break; } // // Rule 281: SwitchBlockStatementGroup ::= SwitchLabels BlockStatements // case 281: { List l = new TypedList(new LinkedList(), SwitchElement.class, false); List l1 = (List) btParser.getSym(1), l2 = (List) btParser.getSym(2); l.addAll(l1); l.add(nf.SwitchBlock(pos(), l2)); btParser.setSym1(l); break; } // // Rule 282: SwitchLabels ::= SwitchLabel // case 282: { List l = new TypedList(new LinkedList(), Case.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 283: SwitchLabels ::= SwitchLabels SwitchLabel // case 283: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 284: SwitchLabel ::= case ConstantExpression COLON // case 284: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Case(pos(), a)); break; } // // Rule 285: SwitchLabel ::= case EnumConstant COLON // case 285: bad_rule = 285; break; // // Rule 286: SwitchLabel ::= default COLON // case 286: { btParser.setSym1(nf.Default(pos())); break; } // // Rule 287: EnumConstant ::= identifier // case 287: bad_rule = 287; break; // // Rule 288: WhileStatement ::= while LPAREN Expression RPAREN Statement // case 288: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 289: WhileStatementNoShortIf ::= while LPAREN Expression RPAREN StatementNoShortIf // case 289: { Expr a = (Expr) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.While(pos(), a, b)); break; } // // Rule 290: DoStatement ::= do Statement while LPAREN Expression RPAREN SEMICOLON // case 290: { Stmt a = (Stmt) btParser.getSym(2); Expr b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Do(pos(), a, b)); break; } // // Rule 291: ForStatement ::= BasicForStatement // case 291: break; // // Rule 292: ForStatement ::= EnhancedForStatement // case 292: break; // // Rule 293: BasicForStatement ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN Statement // case 293: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 294: ForStatementNoShortIf ::= for LPAREN ForInitopt SEMICOLON Expressionopt SEMICOLON ForUpdateopt RPAREN StatementNoShortIf // case 294: { List a = (List) btParser.getSym(3); Expr b = (Expr) btParser.getSym(5); List c = (List) btParser.getSym(7); Stmt d = (Stmt) btParser.getSym(9); btParser.setSym1(nf.For(pos(), a, b, c, d)); break; } // // Rule 295: ForInit ::= StatementExpressionList // case 295: break; // // Rule 296: ForInit ::= LocalVariableDeclaration // case 296: { List l = new TypedList(new LinkedList(), ForInit.class, false), l2 = (List) btParser.getSym(1); l.addAll(l2); //btParser.setSym1(l); break; } // // Rule 297: ForUpdate ::= StatementExpressionList // case 297: break; // // Rule 298: StatementExpressionList ::= StatementExpression // case 298: { List l = new TypedList(new LinkedList(), Eval.class, false); Expr a = (Expr) btParser.getSym(1); l.add(nf.Eval(pos(), a)); btParser.setSym1(l); break; } // // Rule 299: StatementExpressionList ::= StatementExpressionList COMMA StatementExpression // case 299: { List l = (List) btParser.getSym(1); Expr a = (Expr) btParser.getSym(3); l.add(nf.Eval(pos(), a)); //btParser.setSym1(l); break; } // // Rule 300: BreakStatement ::= break identifieropt SEMICOLON // case 300: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Break(pos())); else btParser.setSym1(nf.Break(pos(), a.toString())); break; } // // Rule 301: ContinueStatement ::= continue identifieropt SEMICOLON // case 301: { Name a = (Name) btParser.getSym(2); if (a == null) btParser.setSym1(nf.Continue(pos())); else btParser.setSym1(nf.Continue(pos(), a.toString())); break; } // // Rule 302: ReturnStatement ::= return Expressionopt SEMICOLON // case 302: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Return(pos(), a)); break; } // // Rule 303: ThrowStatement ::= throw Expression SEMICOLON // case 303: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Throw(pos(), a)); break; } // // Rule 304: SynchronizedStatement ::= synchronized LPAREN Expression RPAREN Block // case 304: { Expr a = (Expr) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Synchronized(pos(), a, b)); break; } // // Rule 305: TryStatement ::= try Block Catches // case 305: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Try(pos(), a, b)); break; } // // Rule 306: TryStatement ::= try Block Catchesopt Finally // case 306: { Block a = (Block) btParser.getSym(2); List b = (List) btParser.getSym(3); Block c = (Block) btParser.getSym(4); btParser.setSym1(nf.Try(pos(), a, b, c)); break; } // // Rule 307: Catches ::= CatchClause // case 307: { List l = new TypedList(new LinkedList(), Catch.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 308: Catches ::= Catches CatchClause // case 308: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 309: CatchClause ::= catch LPAREN FormalParameter RPAREN Block // case 309: { Formal a = (Formal) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Catch(pos(), a, b)); break; } // // Rule 310: Finally ::= finally Block // case 310: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 311: Primary ::= PrimaryNoNewArray // case 311: break; // // Rule 312: Primary ::= ArrayCreationExpression // case 312: break; // // Rule 313: PrimaryNoNewArray ::= Literal // case 313: break; // // Rule 314: PrimaryNoNewArray ::= Type DOT class // case 314: { Object o = btParser.getSym(1); if (o instanceof Name) { Name a = (Name) o; btParser.setSym1(nf.ClassLit(pos(), a.toType())); } else if (o instanceof TypeNode) { TypeNode a = (TypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else if (o instanceof CanonicalTypeNode) { CanonicalTypeNode a = (CanonicalTypeNode) o; btParser.setSym1(nf.ClassLit(pos(), a)); } else assert(false); break; } // // Rule 315: PrimaryNoNewArray ::= void DOT class // case 315: { btParser.setSym1(nf.ClassLit(pos(), nf.CanonicalTypeNode(pos(btParser.getToken(1)), ts.Void()))); break; } // // Rule 316: PrimaryNoNewArray ::= this // case 316: { btParser.setSym1(nf.This(pos())); break; } // // Rule 317: PrimaryNoNewArray ::= ClassName DOT this // case 317: { Name a = (Name) btParser.getSym(1); btParser.setSym1(nf.This(pos(), a.toType())); break; } // // Rule 318: PrimaryNoNewArray ::= LPAREN Expression RPAREN // case 318: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 319: PrimaryNoNewArray ::= ClassInstanceCreationExpression // case 319: break; // // Rule 320: PrimaryNoNewArray ::= FieldAccess // case 320: break; // // Rule 321: PrimaryNoNewArray ::= MethodInvocation // case 321: break; // // Rule 322: PrimaryNoNewArray ::= ArrayAccess // case 322: break; // // Rule 323: Literal ::= IntegerLiteral // case 323: { // TODO: remove any prefix (such as 0x) polyglot.lex.IntegerLiteral a = int_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.INT, a.getValue().intValue())); break; } // // Rule 324: Literal ::= LongLiteral // case 324: { // TODO: remove any suffix (such as L) or prefix (such as 0x) polyglot.lex.LongLiteral a = long_lit(btParser.getToken(1), 10); btParser.setSym1(nf.IntLit(pos(), IntLit.LONG, a.getValue().longValue())); break; } // // Rule 325: Literal ::= FloatingPointLiteral // case 325: { // TODO: remove any suffix (such as F) polyglot.lex.FloatLiteral a = float_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.FLOAT, a.getValue().floatValue())); break; } // // Rule 326: Literal ::= DoubleLiteral // case 326: { // TODO: remove any suffix (such as D) polyglot.lex.DoubleLiteral a = double_lit(btParser.getToken(1)); btParser.setSym1(nf.FloatLit(pos(), FloatLit.DOUBLE, a.getValue().doubleValue())); break; } // // Rule 327: Literal ::= BooleanLiteral // case 327: { polyglot.lex.BooleanLiteral a = boolean_lit(btParser.getToken(1)); btParser.setSym1(nf.BooleanLit(pos(), a.getValue().booleanValue())); break; } // // Rule 328: Literal ::= CharacterLiteral // case 328: { polyglot.lex.CharacterLiteral a = char_lit(btParser.getToken(1)); btParser.setSym1(nf.CharLit(pos(), a.getValue().charValue())); break; } // // Rule 329: Literal ::= StringLiteral // case 329: { String s = prsStream.getName(btParser.getToken(1)); btParser.setSym1(nf.StringLit(pos(), s.substring(1, s.length() - 2))); break; } // // Rule 330: Literal ::= null // case 330: { btParser.setSym1(nf.NullLit(pos())); break; } // // Rule 331: BooleanLiteral ::= true // case 331: break; // // Rule 332: BooleanLiteral ::= false // case 332: break; // // Rule 333: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN ClassBodyopt // case 333: {//vj assert(btParser.getSym(2) == null); TypeNode a = (TypeNode) btParser.getSym(2);//vj assert(btParser.getSym(4) == null); List b = (List) btParser.getSym(4); ClassBody c = (ClassBody) btParser.getSym(6); if (c == null) btParser.setSym1(nf.New(pos(), a, b)); else btParser.setSym1(nf.New(pos(), a, b, c)); break; } // // Rule 334: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 334: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(2) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(4) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a, b.toType(), c)); else btParser.setSym1(nf.New(pos(), a, b.toType(), c, d)); break; } // // Rule 335: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN ClassBodyopt // case 335: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(4) == null); Name b = new Name(nf, ts, pos(), id(btParser.getToken(4)).getIdentifier());//vj assert(btParser.getSym(6) == null); List c = (List) btParser.getSym(6); ClassBody d = (ClassBody) btParser.getSym(8); if (d == null) btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c)); else btParser.setSym1(nf.New(pos(), a.toExpr(), b.toType(), c, d)); break; } // // Rule 336: ArgumentList ::= Expression // case 336: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 337: ArgumentList ::= ArgumentList COMMA Expression // case 337: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(3)); //btParser.setSym1(l); break; } // // Rule 338: DimExprs ::= DimExpr // case 338: { List l = new TypedList(new LinkedList(), Expr.class, false); l.add(btParser.getSym(1)); btParser.setSym1(l); break; } // // Rule 339: DimExprs ::= DimExprs DimExpr // case 339: { List l = (List) btParser.getSym(1); l.add(btParser.getSym(2)); //btParser.setSym1(l); break; } // // Rule 340: DimExpr ::= LBRACKET Expression RBRACKET // case 340: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(a.position(pos())); break; } // // Rule 341: Dims ::= LBRACKET RBRACKET // case 341: { btParser.setSym1(new Integer(1)); break; } // // Rule 342: Dims ::= Dims LBRACKET RBRACKET // case 342: { Integer a = (Integer) btParser.getSym(1); btParser.setSym1(new Integer(a.intValue() + 1)); break; } // // Rule 343: FieldAccess ::= Primary DOT identifier // case 343: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(), a, b.getIdentifier())); break; } // // Rule 344: FieldAccess ::= super DOT identifier // case 344: { polyglot.lex.Identifier a = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken())), a.getIdentifier())); break; } // // Rule 345: FieldAccess ::= ClassName DOT super DOT identifier // case 345: { Name a = (Name) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); btParser.setSym1(nf.Field(pos(btParser.getLastToken()), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier())); break; } // // Rule 346: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN // case 346: { Name a = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); btParser.setSym1(nf.Call(pos(), a.prefix == null ? null : a.prefix.toReceiver(), a.name, b)); break; } // // Rule 347: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN // case 347: { Expr a = (Expr) btParser.getSym(1);//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), a, b.getIdentifier(), c)); break; } // // Rule 348: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN // case 348: {//vj assert(btParser.getSym(3) == null); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken())), b.getIdentifier(), c)); break; } // // Rule 349: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN // case 349: { Name a = (Name) btParser.getSym(1);//vj assert(btParser.getSym(5) == null); polyglot.lex.Identifier b = id(btParser.getToken(5)); List c = (List) btParser.getSym(7); btParser.setSym1(nf.Call(pos(), nf.Super(pos(btParser.getFirstToken(3)), a.toType()), b.getIdentifier(), c)); break; } // // Rule 350: PostfixExpression ::= Primary // case 350: break; // // Rule 351: PostfixExpression ::= ExpressionName // case 351: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 352: PostfixExpression ::= PostIncrementExpression // case 352: break; // // Rule 353: PostfixExpression ::= PostDecrementExpression // case 353: break; // // Rule 354: PostIncrementExpression ::= PostfixExpression PLUS_PLUS // case 354: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_INC)); break; } // // Rule 355: PostDecrementExpression ::= PostfixExpression MINUS_MINUS // case 355: { Expr a = (Expr) btParser.getSym(1); btParser.setSym1(nf.Unary(pos(), a, Unary.POST_DEC)); break; } // // Rule 356: UnaryExpression ::= PreIncrementExpression // case 356: break; // // Rule 357: UnaryExpression ::= PreDecrementExpression // case 357: break; // // Rule 358: UnaryExpression ::= PLUS UnaryExpression // case 358: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.POS, a)); break; } // // Rule 359: UnaryExpression ::= MINUS UnaryExpression // case 359: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NEG, a)); break; } // // Rule 361: PreIncrementExpression ::= PLUS_PLUS UnaryExpression // case 361: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_INC, a)); break; } // // Rule 362: PreDecrementExpression ::= MINUS_MINUS UnaryExpression // case 362: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.PRE_DEC, a)); break; } // // Rule 363: UnaryExpressionNotPlusMinus ::= PostfixExpression // case 363: break; // // Rule 364: UnaryExpressionNotPlusMinus ::= TWIDDLE UnaryExpression // case 364: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.BIT_NOT, a)); break; } // // Rule 365: UnaryExpressionNotPlusMinus ::= NOT UnaryExpression // case 365: { Expr a = (Expr) btParser.getSym(2); btParser.setSym1(nf.Unary(pos(), Unary.NOT, a)); break; } // // Rule 367: MultiplicativeExpression ::= UnaryExpression // case 367: break; // // Rule 368: MultiplicativeExpression ::= MultiplicativeExpression MULTIPLY UnaryExpression // case 368: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MUL, b)); break; } // // Rule 369: MultiplicativeExpression ::= MultiplicativeExpression DIVIDE UnaryExpression // case 369: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.DIV, b)); break; } // // Rule 370: MultiplicativeExpression ::= MultiplicativeExpression REMAINDER UnaryExpression // case 370: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.MOD, b)); break; } // // Rule 371: AdditiveExpression ::= MultiplicativeExpression // case 371: break; // // Rule 372: AdditiveExpression ::= AdditiveExpression PLUS MultiplicativeExpression // case 372: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.ADD, b)); break; } // // Rule 373: AdditiveExpression ::= AdditiveExpression MINUS MultiplicativeExpression // case 373: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SUB, b)); break; } // // Rule 374: ShiftExpression ::= AdditiveExpression // case 374: break; // // Rule 375: ShiftExpression ::= ShiftExpression LEFT_SHIFT AdditiveExpression // case 375: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.SHL, b)); break; } // // Rule 376: ShiftExpression ::= ShiftExpression GREATER GREATER AdditiveExpression // case 376: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.SHR, b)); break; } // // Rule 377: ShiftExpression ::= ShiftExpression GREATER GREATER GREATER AdditiveExpression // case 377: { // TODO: make sure that there is no space between the ">" signs Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(5); btParser.setSym1(nf.Binary(pos(), a, Binary.USHR, b)); break; } // // Rule 378: RelationalExpression ::= ShiftExpression // case 378: break; // // Rule 379: RelationalExpression ::= RelationalExpression LESS ShiftExpression // case 379: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LT, b)); break; } // // Rule 380: RelationalExpression ::= RelationalExpression GREATER ShiftExpression // case 380: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.GT, b)); break; } // // Rule 381: RelationalExpression ::= RelationalExpression LESS_EQUAL ShiftExpression // case 381: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.LE, b)); break; } // // Rule 382: RelationalExpression ::= RelationalExpression GREATER EQUAL ShiftExpression // case 382: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Binary(pos(), a, Binary.GE, b)); break; } // // Rule 383: EqualityExpression ::= RelationalExpression // case 383: break; // // Rule 384: EqualityExpression ::= EqualityExpression EQUAL_EQUAL RelationalExpression // case 384: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.EQ, b)); break; } // // Rule 385: EqualityExpression ::= EqualityExpression NOT_EQUAL RelationalExpression // case 385: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.NE, b)); break; } // // Rule 386: AndExpression ::= EqualityExpression // case 386: break; // // Rule 387: AndExpression ::= AndExpression AND EqualityExpression // case 387: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_AND, b)); break; } // // Rule 388: ExclusiveOrExpression ::= AndExpression // case 388: break; // // Rule 389: ExclusiveOrExpression ::= ExclusiveOrExpression XOR AndExpression // case 389: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_XOR, b)); break; } // // Rule 390: InclusiveOrExpression ::= ExclusiveOrExpression // case 390: break; // // Rule 391: InclusiveOrExpression ::= InclusiveOrExpression OR ExclusiveOrExpression // case 391: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.BIT_OR, b)); break; } // // Rule 392: ConditionalAndExpression ::= InclusiveOrExpression // case 392: break; // // Rule 393: ConditionalAndExpression ::= ConditionalAndExpression AND_AND InclusiveOrExpression // case 393: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_AND, b)); break; } // // Rule 394: ConditionalOrExpression ::= ConditionalAndExpression // case 394: break; // // Rule 395: ConditionalOrExpression ::= ConditionalOrExpression OR_OR ConditionalAndExpression // case 395: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3); btParser.setSym1(nf.Binary(pos(), a, Binary.COND_OR, b)); break; } // // Rule 396: ConditionalExpression ::= ConditionalOrExpression // case 396: break; // // Rule 397: ConditionalExpression ::= ConditionalOrExpression QUESTION Expression COLON ConditionalExpression // case 397: { Expr a = (Expr) btParser.getSym(1), b = (Expr) btParser.getSym(3), c = (Expr) btParser.getSym(5); btParser.setSym1(nf.Conditional(pos(), a, b, c)); break; } // // Rule 398: AssignmentExpression ::= ConditionalExpression // case 398: break; // // Rule 399: AssignmentExpression ::= Assignment // case 399: break; // // Rule 400: Assignment ::= LeftHandSide AssignmentOperator AssignmentExpression // case 400: { Expr a = (Expr) btParser.getSym(1); Assign.Operator b = (Assign.Operator) btParser.getSym(2); Expr c = (Expr) btParser.getSym(3); btParser.setSym1(nf.Assign(pos(), a, b, c)); break; } // // Rule 401: LeftHandSide ::= ExpressionName // case 401: { Name a = (Name) btParser.getSym(1); btParser.setSym1(a.toExpr()); break; } // // Rule 402: LeftHandSide ::= FieldAccess // case 402: break; // // Rule 403: LeftHandSide ::= ArrayAccess // case 403: break; // // Rule 404: AssignmentOperator ::= EQUAL // case 404: { btParser.setSym1(Assign.ASSIGN); break; } // // Rule 405: AssignmentOperator ::= MULTIPLY_EQUAL // case 405: { btParser.setSym1(Assign.MUL_ASSIGN); break; } // // Rule 406: AssignmentOperator ::= DIVIDE_EQUAL // case 406: { btParser.setSym1(Assign.DIV_ASSIGN); break; } // // Rule 407: AssignmentOperator ::= REMAINDER_EQUAL // case 407: { btParser.setSym1(Assign.MOD_ASSIGN); break; } // // Rule 408: AssignmentOperator ::= PLUS_EQUAL // case 408: { btParser.setSym1(Assign.ADD_ASSIGN); break; } // // Rule 409: AssignmentOperator ::= MINUS_EQUAL // case 409: { btParser.setSym1(Assign.SUB_ASSIGN); break; } // // Rule 410: AssignmentOperator ::= LEFT_SHIFT_EQUAL // case 410: { btParser.setSym1(Assign.SHL_ASSIGN); break; } // // Rule 411: AssignmentOperator ::= GREATER GREATER EQUAL // case 411: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.SHR_ASSIGN); break; } // // Rule 412: AssignmentOperator ::= GREATER GREATER GREATER EQUAL // case 412: { // TODO: make sure that there is no space between the ">" signs btParser.setSym1(Assign.USHR_ASSIGN); break; } // // Rule 413: AssignmentOperator ::= AND_EQUAL // case 413: { btParser.setSym1(Assign.BIT_AND_ASSIGN); break; } // // Rule 414: AssignmentOperator ::= XOR_EQUAL // case 414: { btParser.setSym1(Assign.BIT_XOR_ASSIGN); break; } // // Rule 415: AssignmentOperator ::= OR_EQUAL // case 415: { btParser.setSym1(Assign.BIT_OR_ASSIGN); break; } // // Rule 416: Expression ::= AssignmentExpression // case 416: break; // // Rule 417: ConstantExpression ::= Expression // case 417: break; // // Rule 418: Dimsopt ::= // case 418: { btParser.setSym1(new Integer(0)); break; } // // Rule 419: Dimsopt ::= Dims // case 419: break; // // Rule 420: Catchesopt ::= // case 420: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 421: Catchesopt ::= Catches // case 421: break; // // Rule 422: identifieropt ::= // case 422: btParser.setSym1(null); break; // // Rule 423: identifieropt ::= identifier // case 423: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 424: ForUpdateopt ::= // case 424: { btParser.setSym1(new TypedList(new LinkedList(), ForUpdate.class, false)); break; } // // Rule 425: ForUpdateopt ::= ForUpdate // case 425: break; // // Rule 426: Expressionopt ::= // case 426: btParser.setSym1(null); break; // // Rule 427: Expressionopt ::= Expression // case 427: break; // // Rule 428: ForInitopt ::= // case 428: { btParser.setSym1(new TypedList(new LinkedList(), ForInit.class, false)); break; } // // Rule 429: ForInitopt ::= ForInit // case 429: break; // // Rule 430: SwitchLabelsopt ::= // case 430: { btParser.setSym1(new TypedList(new LinkedList(), Case.class, false)); break; } // // Rule 431: SwitchLabelsopt ::= SwitchLabels // case 431: break; // // Rule 432: SwitchBlockStatementGroupsopt ::= // case 432: { btParser.setSym1(new TypedList(new LinkedList(), SwitchElement.class, false)); break; } // // Rule 433: SwitchBlockStatementGroupsopt ::= SwitchBlockStatementGroups // case 433: break; // // Rule 434: VariableModifiersopt ::= // case 434: { btParser.setSym1(Flags.NONE); break; } // // Rule 435: VariableModifiersopt ::= VariableModifiers // case 435: break; // // Rule 436: VariableInitializersopt ::= // case 436: btParser.setSym1(null); break; // // Rule 437: VariableInitializersopt ::= VariableInitializers // case 437: break; // // Rule 438: ElementValuesopt ::= // case 438: btParser.setSym1(null); break; // // Rule 439: ElementValuesopt ::= ElementValues // case 439: bad_rule = 439; break; // // Rule 440: ElementValuePairsopt ::= // case 440: btParser.setSym1(null); break; // // Rule 441: ElementValuePairsopt ::= ElementValuePairs // case 441: bad_rule = 441; break; // // Rule 442: DefaultValueopt ::= // case 442: btParser.setSym1(null); break; // // Rule 443: DefaultValueopt ::= DefaultValue // case 443: break; // // Rule 444: AnnotationTypeElementDeclarationsopt ::= // case 444: btParser.setSym1(null); break; // // Rule 445: AnnotationTypeElementDeclarationsopt ::= AnnotationTypeElementDeclarations // case 445: bad_rule = 445; break; // // Rule 446: AbstractMethodModifiersopt ::= // case 446: { btParser.setSym1(Flags.NONE); break; } // // Rule 447: AbstractMethodModifiersopt ::= AbstractMethodModifiers // case 447: break; // // Rule 448: ConstantModifiersopt ::= // case 448: { btParser.setSym1(Flags.NONE); break; } // // Rule 449: ConstantModifiersopt ::= ConstantModifiers // case 449: break; // // Rule 450: InterfaceMemberDeclarationsopt ::= // case 450: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 451: InterfaceMemberDeclarationsopt ::= InterfaceMemberDeclarations // case 451: break; // // Rule 452: ExtendsInterfacesopt ::= // case 452: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 453: ExtendsInterfacesopt ::= ExtendsInterfaces // case 453: break; // // Rule 454: InterfaceModifiersopt ::= // case 454: { btParser.setSym1(Flags.NONE); break; } // // Rule 455: InterfaceModifiersopt ::= InterfaceModifiers // case 455: break; // // Rule 456: ClassBodyopt ::= // case 456: btParser.setSym1(null); break; // // Rule 457: ClassBodyopt ::= ClassBody // case 457: break; // // Rule 458: Argumentsopt ::= // case 458: btParser.setSym1(null); break; // // Rule 459: Argumentsopt ::= Arguments // case 459: bad_rule = 459; break; // // Rule 460: EnumBodyDeclarationsopt ::= // case 460: btParser.setSym1(null); break; // // Rule 461: EnumBodyDeclarationsopt ::= EnumBodyDeclarations // case 461: bad_rule = 461; break; // // Rule 462: ,opt ::= // case 462: btParser.setSym1(null); break; // // Rule 463: ,opt ::= COMMA // case 463: break; // // Rule 464: EnumConstantsopt ::= // case 464: btParser.setSym1(null); break; // // Rule 465: EnumConstantsopt ::= EnumConstants // case 465: bad_rule = 465; break; // // Rule 466: ArgumentListopt ::= // case 466: { btParser.setSym1(new TypedList(new LinkedList(), Catch.class, false)); break; } // // Rule 467: ArgumentListopt ::= ArgumentList // case 467: break; // // Rule 468: BlockStatementsopt ::= // case 468: { btParser.setSym1(new TypedList(new LinkedList(), Stmt.class, false)); break; } // // Rule 469: BlockStatementsopt ::= BlockStatements // case 469: break; // // Rule 470: ExplicitConstructorInvocationopt ::= // case 470: btParser.setSym1(null); break; // // Rule 471: ExplicitConstructorInvocationopt ::= ExplicitConstructorInvocation // case 471: break; // // Rule 472: ConstructorModifiersopt ::= // case 472: { btParser.setSym1(Flags.NONE); break; } // // Rule 473: ConstructorModifiersopt ::= ConstructorModifiers // case 473: break; // // Rule 474: ...opt ::= // case 474: btParser.setSym1(null); break; // // Rule 475: ...opt ::= ELLIPSIS // case 475: break; // // Rule 476: FormalParameterListopt ::= // case 476: { btParser.setSym1(new TypedList(new LinkedList(), Formal.class, false)); break; } // // Rule 477: FormalParameterListopt ::= FormalParameterList // case 477: break; // // Rule 478: Throwsopt ::= // case 478: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 479: Throwsopt ::= Throws // case 479: break; // // Rule 480: MethodModifiersopt ::= // case 480: { btParser.setSym1(Flags.NONE); break; } // // Rule 481: MethodModifiersopt ::= MethodModifiers // case 481: break; // // Rule 482: FieldModifiersopt ::= // case 482: { btParser.setSym1(Flags.NONE); break; } // // Rule 483: FieldModifiersopt ::= FieldModifiers // case 483: break; // // Rule 484: ClassBodyDeclarationsopt ::= // case 484: { btParser.setSym1(new TypedList(new LinkedList(), ClassMember.class, false)); break; } // // Rule 485: ClassBodyDeclarationsopt ::= ClassBodyDeclarations // case 485: break; // // Rule 486: Interfacesopt ::= // case 486: { btParser.setSym1(new TypedList(new LinkedList(), TypeNode.class, false)); break; } // // Rule 487: Interfacesopt ::= Interfaces // case 487: break; // // Rule 488: Superopt ::= // case 488: btParser.setSym1(null); break; // // Rule 489: Superopt ::= Super // case 489: break; // // Rule 490: TypeParametersopt ::= // case 490: btParser.setSym1(null); break; // // Rule 491: TypeParametersopt ::= TypeParameters // case 491: break; // // Rule 492: ClassModifiersopt ::= // case 492: { btParser.setSym1(Flags.NONE); break; } // // Rule 493: ClassModifiersopt ::= ClassModifiers // case 493: break; // // Rule 494: Annotationsopt ::= // case 494: btParser.setSym1(null); break; // // Rule 495: Annotationsopt ::= Annotations // case 495: bad_rule = 495; break; // // Rule 496: TypeDeclarationsopt ::= // case 496: { btParser.setSym1(new TypedList(new LinkedList(), TopLevelDecl.class, false)); break; } // // Rule 497: TypeDeclarationsopt ::= TypeDeclarations // case 497: break; // // Rule 498: ImportDeclarationsopt ::= // case 498: { btParser.setSym1(new TypedList(new LinkedList(), Import.class, false)); break; } // // Rule 499: ImportDeclarationsopt ::= ImportDeclarations // case 499: break; // // Rule 500: PackageDeclarationopt ::= // case 500: btParser.setSym1(null); break; // // Rule 501: PackageDeclarationopt ::= PackageDeclaration // case 501: break; // // Rule 502: WildcardBoundsOpt ::= // case 502: btParser.setSym1(null); break; // // Rule 503: WildcardBoundsOpt ::= WildcardBounds // case 503: bad_rule = 503; break; // // Rule 504: AdditionalBoundListopt ::= // case 504: btParser.setSym1(null); break; // // Rule 505: AdditionalBoundListopt ::= AdditionalBoundList // case 505: bad_rule = 505; break; // // Rule 506: TypeBoundopt ::= // case 506: btParser.setSym1(null); break; // // Rule 507: TypeBoundopt ::= TypeBound // case 507: bad_rule = 507; break; // // Rule 508: TypeArgumentsopt ::= // case 508: btParser.setSym1(null); break; // // Rule 509: TypeArgumentsopt ::= TypeArguments // case 509: bad_rule = 509; break; // // Rule 510: Commentsopt ::= // case 510: btParser.setSym1(null); break; // // Rule 511: Commentsopt ::= Comments // case 511: break; // // Rule 512: Type ::= DataType PlaceTypeSpecifieropt // case 512: { assert(btParser.getSym(2) == null); //btParser.setSym1(); break; } // // Rule 513: Type ::= nullable LESS Type GREATER // case 513: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Nullable(pos(), a)); break; } // // Rule 514: Type ::= future LESS Type GREATER // case 514: { TypeNode a = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Future(pos(), a)); break; } // // Rule 515: Type ::= boxed LESS Type GREATER // case 515: bad_rule = 515; break; // // Rule 516: Type ::= fun LESS Type COMMA Type GREATER // case 516: bad_rule = 516; break; // // Rule 517: DataType ::= PrimitiveType // case 517: break; // // Rule 518: DataType ::= ClassOrInterfaceType // case 518: break; // // Rule 519: DataType ::= ArrayType // case 519: break; // // Rule 520: PlaceTypeSpecifier ::= AT PlaceType // case 520: bad_rule = 520; break; // // Rule 521: PlaceType ::= place // case 521: break; // // Rule 522: PlaceType ::= activity // case 522: break; // // Rule 523: PlaceType ::= method // case 523: break; // // Rule 524: PlaceType ::= current // case 524: break; // // Rule 525: PlaceType ::= PlaceExpression // case 525: break; // // Rule 526: ClassOrInterfaceType ::= TypeName DepParametersopt // case 526: { Name a = (Name) btParser.getSym(1); TypeNode t = a.toType(); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.ParametricTypeNode(pos(), t, b)); break; } // // Rule 527: DepParameters ::= LPAREN DepParameterExpr RPAREN // case 527: break; // // Rule 528: DepParameterExpr ::= ArgumentList WhereClauseopt // case 528: { List a = (List) btParser.getSym(1); Expr b = (Expr) btParser.getSym(2); btParser.setSym1(nf.DepParameterExpr(pos(),a,b)); break; } // // Rule 529: DepParameterExpr ::= WhereClause // case 529: { Expr b = (Expr) btParser.getSym(1); btParser.setSym1(nf.DepParameterExpr(pos(), null, b)); break; } // // Rule 530: WhereClause ::= COLON Expression // case 530: break; // // Rule 532: X10ArrayType ::= Type LBRACKET DOT RBRACKET // case 532: { TypeNode a = (TypeNode) btParser.getSym(1); TypeNode t = nf.X10ArrayTypeNode(pos(), a, false, null); btParser.setSym1(t); break; } // // Rule 533: X10ArrayType ::= Type reference LBRACKET DOT RBRACKET // case 533: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, null)); break; } // // Rule 534: X10ArrayType ::= Type value LBRACKET DOT RBRACKET // case 534: { TypeNode a = (TypeNode) btParser.getSym(1); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, null)); break; } // // Rule 535: X10ArrayType ::= Type LBRACKET DepParameterExpr RBRACKET // case 535: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 536: X10ArrayType ::= Type reference LBRACKET DepParameterExpr RBRACKET // case 536: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, false, b)); break; } // // Rule 537: X10ArrayType ::= Type value LBRACKET DepParameterExpr RBRACKET // case 537: { TypeNode a = (TypeNode) btParser.getSym(1); DepParameterExpr b = (DepParameterExpr) btParser.getSym(2); btParser.setSym1(nf.X10ArrayTypeNode(pos(), a, true, b)); break; } // // Rule 538: ObjectKind ::= value // case 538: bad_rule = 538; break; // // Rule 539: ObjectKind ::= reference // case 539: bad_rule = 539; break; // // Rule 540: MethodModifier ::= atomic // case 540: { btParser.setSym1(Flags.ATOMIC); break; } // // Rule 541: MethodModifier ::= extern // case 541: { btParser.setSym1(Flags.NATIVE); break; } // // Rule 542: ClassDeclaration ::= ValueClassDeclaration // case 542: break; // // Rule 543: ValueClassDeclaration ::= ClassModifiersopt value identifier Superopt Interfacesopt ClassBody // case 543: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); TypeNode c = (TypeNode) btParser.getSym(4); List d = (List) btParser.getSym(5); ClassBody e = (ClassBody) btParser.getSym(6); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 544: ValueClassDeclaration ::= ClassModifiersopt value class identifier Superopt Interfacesopt ClassBody // case 544: { Flags a = (Flags) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(4)); TypeNode c = (TypeNode) btParser.getSym(5); List d = (List) btParser.getSym(6); ClassBody e = (ClassBody) btParser.getSym(7); btParser.setSym1(nf.ValueClassDecl(pos(btParser.getFirstToken(), btParser.getLastToken()), a, b.getIdentifier(), c, d, e)); break; } // // Rule 545: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET RBRACKET ArrayInitializer // case 545: { TypeNode a = (TypeNode) btParser.getSym(2); ArrayInit d = (ArrayInit) btParser.getSym(6); // btParser.setSym1(nf.ArrayConstructor(pos(), a, false, null, d)); btParser.setSym1(nf.NewArray(pos(), a, 1, d)); break; } // // Rule 546: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET // case 546: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, null)); break; } // // Rule 547: ArrayCreationExpression ::= new ArrayBaseType Unsafeopt LBRACKET Expression RBRACKET Expression // case 547: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, false, c, d)); break; } // // Rule 548: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET // case 548: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, null)); break; } // // Rule 549: ArrayCreationExpression ::= new ArrayBaseType value Unsafeopt LBRACKET Expression RBRACKET Expression // case 549: { TypeNode a = (TypeNode) btParser.getSym(2); boolean unsafe = (btParser.getSym(3) != null); Expr c = (Expr) btParser.getSym(5); Expr d = (Expr) btParser.getSym(7); btParser.setSym1(nf.ArrayConstructor(pos(), a, unsafe, true, c, d)); break; } // // Rule 550: ArrayBaseType ::= PrimitiveType // case 550: break; // // Rule 551: ArrayBaseType ::= ClassOrInterfaceType // case 551: break; // // Rule 552: ArrayAccess ::= ExpressionName LBRACKET ArgumentList RBRACKET // case 552: { Name e = (Name) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), e.toExpr(), (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), e.toExpr(), b)); break; } // // Rule 553: ArrayAccess ::= PrimaryNoNewArray LBRACKET ArgumentList RBRACKET // case 553: { Expr a = (Expr) btParser.getSym(1); List b = (List) btParser.getSym(3); if (b.size() == 1) btParser.setSym1(nf.X10ArrayAccess1(pos(), a, (Expr) b.get(0))); else btParser.setSym1(nf.X10ArrayAccess(pos(), a, b)); break; } // // Rule 554: Statement ::= NowStatement // case 554: break; // // Rule 555: Statement ::= ClockedStatement // case 555: break; // // Rule 556: Statement ::= AsyncStatement // case 556: break; // // Rule 557: Statement ::= AtomicStatement // case 557: break; // // Rule 558: Statement ::= WhenStatement // case 558: break; // // Rule 559: Statement ::= ForEachStatement // case 559: break; // // Rule 560: Statement ::= AtEachStatement // case 560: break; // // Rule 561: Statement ::= FinishStatement // case 561: break; // // Rule 562: StatementWithoutTrailingSubstatement ::= NextStatement // case 562: break; // // Rule 563: StatementWithoutTrailingSubstatement ::= AwaitStatement // case 563: break; // // Rule 564: StatementNoShortIf ::= NowStatementNoShortIf // case 564: break; // // Rule 565: StatementNoShortIf ::= ClockedStatementNoShortIf // case 565: break; // // Rule 566: StatementNoShortIf ::= AsyncStatementNoShortIf // case 566: break; // // Rule 567: StatementNoShortIf ::= AtomicStatementNoShortIf // case 567: break; // // Rule 568: StatementNoShortIf ::= WhenStatementNoShortIf // case 568: break; // // Rule 569: StatementNoShortIf ::= ForEachStatementNoShortIf // case 569: break; // // Rule 570: StatementNoShortIf ::= AtEachStatementNoShortIf // case 570: break; // // Rule 571: StatementNoShortIf ::= FinishStatementNoShortIf // case 571: break; // // Rule 572: NowStatement ::= now LPAREN Clock RPAREN Statement // case 572: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 573: ClockedStatement ::= clocked LPAREN ClockList RPAREN Statement // case 573: { List a = (List) btParser.getSym(3); Block b = (Block) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 574: AsyncStatement ::= async PlaceExpressionSingleListopt Statement // case 574: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 575: AsyncStatement ::= async LPAREN here RPAREN Statement // case 575: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 576: AtomicStatement ::= atomic PlaceExpressionSingleListopt Statement // case 576: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 577: AtomicStatement ::= atomic LPAREN here RPAREN Statement // case 577: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 578: WhenStatement ::= when LPAREN Expression RPAREN Statement // case 578: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 579: WhenStatement ::= WhenStatement or LPAREN Expression RPAREN Statement // case 579: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 580: ForEachStatement ::= foreach LPAREN FormalParameter COLON Expression RPAREN Statement // case 580: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 581: AtEachStatement ::= ateach LPAREN FormalParameter COLON Expression RPAREN Statement // case 581: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 582: EnhancedForStatement ::= for LPAREN FormalParameter COLON Expression RPAREN Statement // case 582: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForLoop(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 583: FinishStatement ::= finish Statement // case 583: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 584: NowStatementNoShortIf ::= now LPAREN Clock RPAREN StatementNoShortIf // case 584: { Name a = (Name) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Now(pos(), a.toExpr(), b)); break; } // // Rule 585: ClockedStatementNoShortIf ::= clocked LPAREN ClockList RPAREN StatementNoShortIf // case 585: { List a = (List) btParser.getSym(3); Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Clocked(pos(), a, b)); break; } // // Rule 586: AsyncStatementNoShortIf ::= async PlaceExpressionSingleListopt StatementNoShortIf // case 586: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Async(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 587: AsyncStatementNoShortIf ::= async LPAREN here RPAREN StatementNoShortIf // case 587: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Async(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 588: AtomicStatementNoShortIf ::= atomic StatementNoShortIf // case 588: { Expr e = (Expr) btParser.getSym(2); Stmt b = (Stmt) btParser.getSym(3); btParser.setSym1(nf.Atomic(pos(), (e == null ? nf.Here(pos(btParser.getFirstToken())) : e), b)); break; } // // Rule 589: AtomicStatementNoShortIf ::= atomic LPAREN here RPAREN StatementNoShortIf // case 589: { Stmt b = (Stmt) btParser.getSym(5); btParser.setSym1(nf.Atomic(pos(), nf.Here(pos(btParser.getFirstToken())), b)); break; } // // Rule 590: WhenStatementNoShortIf ::= when LPAREN Expression RPAREN StatementNoShortIf // case 590: { Expr e = (Expr) btParser.getSym(3); Stmt s = (Stmt) btParser.getSym(5); btParser.setSym1(nf.When(pos(), e,s)); break; } // // Rule 591: WhenStatementNoShortIf ::= WhenStatement or LPAREN Expression RPAREN StatementNoShortIf // case 591: { When w = (When) btParser.getSym(1); Expr e = (Expr) btParser.getSym(4); Stmt s = (Stmt) btParser.getSym(6); w.add(new When_c.Branch_c(e,s)); btParser.setSym1(w); break; } // // Rule 592: ForEachStatementNoShortIf ::= foreach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 592: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.ForEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 593: AtEachStatementNoShortIf ::= ateach LPAREN FormalParameter COLON Expression RPAREN StatementNoShortIf // case 593: { Formal f = (Formal) btParser.getSym(3); Expr e = (Expr) btParser.getSym(5); Stmt s = (Stmt) btParser.getSym(7); X10Loop x = nf.AtEach(pos(), f, e, s); btParser.setSym1(x); break; } // // Rule 594: FinishStatementNoShortIf ::= finish StatementNoShortIf // case 594: { Stmt b = (Stmt) btParser.getSym(2); btParser.setSym1(nf.Finish(pos(), b)); break; } // // Rule 595: PlaceExpressionSingleList ::= LPAREN PlaceExpression RPAREN // case 595: { btParser.setSym1(btParser.getSym(2)); break; } // // Rule 596: PlaceExpression ::= here // case 596: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken()))); break; } // // Rule 597: PlaceExpression ::= this // case 597: { btParser.setSym1(nf.Field(pos(btParser.getFirstToken()), nf.This(pos(btParser.getFirstToken())), "place")); break; } // // Rule 598: PlaceExpression ::= Expression // case 598: break; // // Rule 599: PlaceExpression ::= ArrayAccess // case 599: bad_rule = 599; break; // // Rule 600: NextStatement ::= next SEMICOLON // case 600: { btParser.setSym1(nf.Next(pos())); break; } // // Rule 601: AwaitStatement ::= await Expression SEMICOLON // case 601: { Expr e = (Expr) btParser.getSym(2); btParser.setSym1(nf.Await(pos(), e)); break; } // // Rule 602: ClockList ::= Clock // case 602: { Name c = (Name) btParser.getSym(1); List l = new TypedList(new LinkedList(), Expr.class, false); l.add(c.toExpr()); btParser.setSym1(l); break; } // // Rule 603: ClockList ::= ClockList COMMA Clock // case 603: { List l = (List) btParser.getSym(1); Name c = (Name) btParser.getSym(3); l.add(c.toExpr()); // btParser.setSym1(l); break; } // // Rule 604: Clock ::= identifier // case 604: { polyglot.lex.Identifier a = id(btParser.getToken(1)); btParser.setSym1(new Name(nf, ts, pos(), a.getIdentifier())); break; } // // Rule 605: CastExpression ::= LPAREN Type RPAREN UnaryExpressionNotPlusMinus // case 605: { TypeNode a = (TypeNode) btParser.getSym(2); Expr b = (Expr) btParser.getSym(4); btParser.setSym1(nf.Cast(pos(), a, b)); break; } // // Rule 606: MethodInvocation ::= Primary ARROW identifier LPAREN ArgumentListopt RPAREN // case 606: { Expr a = (Expr) btParser.getSym(1); polyglot.lex.Identifier b = id(btParser.getToken(3)); List c = (List) btParser.getSym(5); btParser.setSym1(nf.RemoteCall(pos(), a, b.getIdentifier(), c)); break; } // // Rule 607: RelationalExpression ::= RelationalExpression instanceof Type // case 607: { Expr a = (Expr) btParser.getSym(1); TypeNode b = (TypeNode) btParser.getSym(3); btParser.setSym1(nf.Instanceof(pos(), a, b)); break; } // // Rule 608: ExpressionName ::= here // case 608: { btParser.setSym1(new Name(nf, ts, pos(), "here"){ public Expr toExpr() { return nf.Here(pos); } }); break; } // // Rule 609: Primary ::= FutureExpression // case 609: break; // // Rule 610: FutureExpression ::= future PlaceExpressionSingleListopt LBRACE Expression RBRACE // case 610: { Expr e1 = (Expr) btParser.getSym(2), e2 = (Expr) btParser.getSym(4); btParser.setSym1(nf.Future(pos(), (e1 == null ? nf.Here(pos(btParser.getFirstToken())) : e1), e2)); break; } // // Rule 611: FutureExpression ::= future LPAREN here RPAREN LBRACE Expression RBRACE // case 611: { Expr e2 = (Expr) btParser.getSym(6); btParser.setSym1(nf.Future(pos(), nf.Here(pos(btParser.getFirstToken(3))), e2)); break; } // // Rule 612: FunExpression ::= fun Type LPAREN FormalParameterListopt RPAREN LBRACE Expression RBRACE // case 612: bad_rule = 612; break; // // Rule 613: MethodInvocation ::= MethodName LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 613: bad_rule = 613; break; // // Rule 614: MethodInvocation ::= Primary DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 614: bad_rule = 614; break; // // Rule 615: MethodInvocation ::= super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 615: bad_rule = 615; break; // // Rule 616: MethodInvocation ::= ClassName DOT super DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 616: bad_rule = 616; break; // // Rule 617: MethodInvocation ::= TypeName DOT identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN // case 617: bad_rule = 617; break; // // Rule 618: ClassInstanceCreationExpression ::= new ClassOrInterfaceType LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 618: bad_rule = 618; break; // // Rule 619: ClassInstanceCreationExpression ::= Primary DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 619: bad_rule = 619; break; // // Rule 620: ClassInstanceCreationExpression ::= AmbiguousName DOT new identifier LPAREN ArgumentListopt RPAREN LPAREN ArgumentListopt RPAREN ClassBodyopt // case 620: bad_rule = 620; break; // // Rule 621: PlaceTypeSpecifieropt ::= // case 621: btParser.setSym1(null); break; // // Rule 622: PlaceTypeSpecifieropt ::= PlaceTypeSpecifier // case 622: break; // // Rule 623: DepParametersopt ::= // case 623: btParser.setSym1(null); break; // // Rule 624: DepParametersopt ::= DepParameters // case 624: break; // // Rule 625: WhereClauseopt ::= // case 625: btParser.setSym1(null); break; // // Rule 626: WhereClauseopt ::= WhereClause // case 626: break; // // Rule 627: ObjectKindopt ::= // case 627: btParser.setSym1(null); break; // // Rule 628: ObjectKindopt ::= ObjectKind // case 628: break; // // Rule 629: ArrayInitializeropt ::= // case 629: btParser.setSym1(null); break; // // Rule 630: ArrayInitializeropt ::= ArrayInitializer // case 630: break; // // Rule 631: ConcreteDistributionopt ::= // case 631: btParser.setSym1(null); break; // // Rule 632: ConcreteDistributionopt ::= ConcreteDistribution // case 632: break; // // Rule 633: PlaceExpressionSingleListopt ::= // case 633: btParser.setSym1(null); break; // // Rule 634: PlaceExpressionSingleListopt ::= PlaceExpressionSingleList // case 634: break; // // Rule 635: ArgumentListopt ::= // case 635: btParser.setSym1(null); break; // // Rule 636: ArgumentListopt ::= ArgumentList // case 636: break; // // Rule 637: DepParametersopt ::= // case 637: btParser.setSym1(null); break; // // Rule 638: DepParametersopt ::= DepParameters // case 638: break; // // Rule 639: Unsafeopt ::= // case 639: btParser.setSym1(null); break; // // Rule 640: Unsafeopt ::= unsafe // case 640: { btParser.setSym1(nf.Here(pos(btParser.getFirstToken(1)))); break; } default: break; } return; } | 1832 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1832/a0ef25c366453f5aff64a3c99c145987b17c8f23/X10Parser.java/buggy/x10.compiler/src/x10/parser/X10Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1720,
1803,
12,
474,
1720,
1854,
13,
565,
288,
3639,
309,
261,
8759,
67,
5345,
480,
374,
13,
5411,
327,
31,
3639,
1620,
261,
5345,
1854,
13,
3639,
288,
2398,
368,
5411,
368,
... | ||
canonical = type.dateToString(data); | canonical = type.dateToString(this); | public synchronized String toString() { if (canonical == null) { canonical = type.dateToString(data); } return canonical; } | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/bcc8fb199cd33a4cd9d32cea6d8fcaaf38720890/AbstractDateTimeDV.java/buggy/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
3852,
514,
1762,
1435,
288,
5411,
309,
261,
18288,
422,
446,
13,
288,
7734,
7378,
273,
618,
18,
712,
5808,
12,
2211,
1769,
5411,
289,
5411,
327,
7378,
31,
3639,
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,
540,
1071,
3852,
514,
1762,
1435,
288,
5411,
309,
261,
18288,
422,
446,
13,
288,
7734,
7378,
273,
618,
18,
712,
5808,
12,
2211,
1769,
5411,
289,
5411,
327,
7378,
31,
3639,
289,
2,
-100,
-100... |
if (_lengthOrAttr[node] == DOM.NULL) | if (_lengthOrAttr[node] == DOM.NULL) { | public void startElement(String uri, String localName, String qname, Attributes attributes) throws SAXException { makeTextNode(false); // Get node index and setup parent/child references final int node = nextNode(); linkChildren(node); linkParent(node); _lengthOrAttr[node] = DOM.NULL; final int count = attributes.getLength(); // Append any namespace nodes if (_nextNamespace != DOM.NULL) { _lengthOrAttr[node] = _nextNamespace; while (_nextNamespace != DOM.NULL) { _parent2[_nextNamespace] = node; int tail = _nextNamespace; _nextNamespace = _nextSibling2[_nextNamespace]; // Chain last namespace node to following attribute node(s) if ((_nextNamespace == DOM.NULL) && (count > 0)) _nextSibling2[tail] = _currentAttributeNode; } } // Append any attribute nodes if (count > 0) { int attr = _currentAttributeNode; if (_lengthOrAttr[node] == DOM.NULL) _lengthOrAttr[node] = attr; for (int i = 0; i<count; i++) { attr = makeAttributeNode(node, attributes, i); _parent2[attr] = node; _nextSibling2[attr] = attr + 1; } _nextSibling2[attr] = DOM.NULL; } final int col = qname.lastIndexOf(':'); // Assign an internal type to this element (may exist) if ((uri != null) && (localName.length() > 0)) _type[node] = makeElementNode(uri, localName); else _type[node] = makeElementNode(qname, col); // Assign an internal type to the element's prefix (may exist) if (col > -1) { _prefix[node] = registerPrefix(qname.substring(0, col)); } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/ddbb116b3a67f82e811ca92d303beb50ad9fcf76/DOMImpl.java/buggy/src/org/apache/xalan/xsltc/dom/DOMImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
13591,
12,
780,
2003,
16,
514,
11927,
16,
6862,
514,
12621,
16,
9055,
1677,
13,
202,
565,
1216,
14366,
288,
202,
565,
1221,
17299,
12,
5743,
1769,
202,
565,
368,
968,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13591,
12,
780,
2003,
16,
514,
11927,
16,
6862,
514,
12621,
16,
9055,
1677,
13,
202,
565,
1216,
14366,
288,
202,
565,
1221,
17299,
12,
5743,
1769,
202,
565,
368,
968,
756... |
Log.debug("revealSomeCreatures() " + this); parent.tellChildContents(this); | Log.debug("end revealSomeCreatures() " + this); if (parent != null) { parent.tellChildContents(this); } | void revealSomeCreatures(List cnl) { Log.debug("revealSomeCreatures() for " + this + " " + cnl); CreatureInfoList cil = new CreatureInfoList(); Iterator it = cnl.iterator(); while (it.hasNext()) { String name = (String)it.next(); cil.add(new CreatureInfo(name, true, true)); } // Use a copy so we can remove creatures as we check for dupes. CreatureInfoList dupe = (CreatureInfoList)cil.clone(); // Confirm that all creatures that were certain still fit along // with the revealed creatures. int count = dupe.size(); CreatureInfoList certain = getCertainCreatures(); it = certain.iterator(); while (it.hasNext()) { CreatureInfo ci = (CreatureInfo)it.next(); if (dupe.contains(ci)) { dupe.remove(ci); } else { count++; } } if (count > getHeight()) { throw new PredictSplitsException( "Certainty error in revealSomeCreatures -- count is " + count + " height is " + getHeight()); } // Mark passed creatures as certain and then communicate this to // parent, to adjust other legions. if (getCertainCreatures().size() == getHeight()) { // We already know everything. return; } dupe = (CreatureInfoList)cil.clone(); count = 0; it = dupe.iterator(); while (it.hasNext()) { CreatureInfo ci = (CreatureInfo)it.next(); ci.setCertain(true); ci.setAtSplit(true); // If not atSpilt, then would be certain. if (creatures.numCreature(ci.getName()) < dupe.numCreature(ci.getName())) { creatures.add(ci); count++; } } // Ensure that the creatures in cnl are now marked certain. dupe = (CreatureInfoList)cil.clone(); certain = getCertainCreatures(); it = certain.iterator(); while (it.hasNext()) { CreatureInfo ci = (CreatureInfo)it.next(); if (dupe.contains(ci)) { dupe.remove(ci); } } it = dupe.iterator(); while (it.hasNext()) { CreatureInfo ci = (CreatureInfo)it.next(); Iterator it2 = creatures.iterator(); while (it2.hasNext()) { CreatureInfo ci2 = (CreatureInfo)it2.next(); if (!ci2.isCertain() && ci2.getName().equals(ci.getName())) { ci2.setCertain(true); break; } } } // Need to remove count uncertain creatures. for (int i = 0; i < count; i++) { creatures.removeLastUncertainCreature(); } Log.debug("revealSomeCreatures() " + this); parent.tellChildContents(this); } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/9e614082b5d74ca166397851f8743edd89f7bb20/PredictSplits.java/clean/Colossus/net/sf/colossus/client/PredictSplits.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
283,
24293,
17358,
1996,
2790,
12,
682,
6227,
80,
13,
565,
288,
3639,
1827,
18,
4148,
2932,
266,
24293,
17358,
1996,
2790,
1435,
364,
315,
397,
333,
397,
315,
315,
397,
6227,
80,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
283,
24293,
17358,
1996,
2790,
12,
682,
6227,
80,
13,
565,
288,
3639,
1827,
18,
4148,
2932,
266,
24293,
17358,
1996,
2790,
1435,
364,
315,
397,
333,
397,
315,
315,
397,
6227,
80,
1... |
byte[] bytes = ostr.getString(); for(int i = 0; i < bytes.length; i++) { sbuf.append(Integer.toHexString(((int)bytes[i] >> 4) & 0xf)); sbuf.append(Integer.toHexString((int)bytes[i] & 0xf)); | if ( ostr != null && ostr.getLength() > 0) { byte[] bytes = ostr.getString(); for(int i = 0; i < bytes.length; i++) { sbuf.append(Integer.toHexString(((int)bytes[i] >> 4) & 0xf)); sbuf.append(Integer.toHexString((int)bytes[i] & 0xf)); } | private void updateNonIpInterface(Connection dbc, Date now, DbNodeEntry node, int ifIndex, IfSnmpCollector snmpc) throws SQLException { Category log = ThreadCategory.getInstance(getClass()); if (log.isDebugEnabled()) log.debug("updateNonIpInterface: node= " + node.getNodeId() + " ifIndex= " + ifIndex); // Sanity Check // if (snmpc == null || snmpc.failed()) return; // Construct InetAddress object for "0.0.0.0" address // InetAddress ifAddr = null; try { ifAddr = InetAddress.getByName("0.0.0.0"); } catch (UnknownHostException uhE) { log.error("Failed to update non-IP interfaces, unable to construct '0.0.0.0' InetAddress", uhE); return; } // ------------------------------------------------------------------- // IpInterface table updates // ------------------------------------------------------------------- // Attempt to load IP Interface entry from the database // DbIpInterfaceEntry dbIpIfEntry = DbIpInterfaceEntry.get(dbc, node.getNodeId(), ifAddr, ifIndex); if (dbIpIfEntry == null) { // Create a new entry if (log.isDebugEnabled()) log.debug("updateNonIpInterface: non-IP interface with ifIndex " + ifIndex + " not in database, creating new interface object."); dbIpIfEntry = DbIpInterfaceEntry.create(node.getNodeId(), ifAddr); } // Update any IpInterface table fields which have changed // dbIpIfEntry.setLastPoll(now); dbIpIfEntry.setIfIndex(ifIndex); dbIpIfEntry.setManagedState(DbIpInterfaceEntry.STATE_UNMANAGED); int status = snmpc.getAdminStatus(ifIndex); if(status != -1) dbIpIfEntry.setStatus(status); dbIpIfEntry.setPrimaryState(DbIpInterfaceEntry.SNMP_NOT_ELIGIBLE); // Update the database dbIpIfEntry.store(dbc); // ------------------------------------------------------------------- // SnmpInterface table updates // ------------------------------------------------------------------- if (log.isDebugEnabled()) log.debug("updateNonIpInterface: updating non-IP snmp interface with nodeId=" + node.getNodeId() + " and ifIndex=" + ifIndex); // Create and load SNMP Interface entry from the database // boolean newSnmpIfTableEntry = false; DbSnmpInterfaceEntry dbSnmpIfEntry = DbSnmpInterfaceEntry.get(dbc, node.getNodeId(), ifIndex); if (dbSnmpIfEntry == null) { // SNMP Interface not found with this nodeId & ifIndex, create new interface if (log.isDebugEnabled()) log.debug("updateNonIpInterface: non-IP SNMP interface with ifIndex " + ifIndex + " not in database, creating new snmpInterface object."); dbSnmpIfEntry = DbSnmpInterfaceEntry.create(node.getNodeId(), ifIndex); newSnmpIfTableEntry = true; } // Find the ifTable entry for this interface IfTable ift = snmpc.getIfTable(); Iterator ifiter = ift.getEntries().iterator(); IfTableEntry ifte = null; boolean match = false; while(ifiter.hasNext()) { ifte = (IfTableEntry)ifiter.next(); // index // SnmpInt32 sint = (SnmpInt32)ifte.get(IfTableEntry.IF_INDEX); if(sint != null) { if (ifIndex == sint.getValue()) { if (log.isDebugEnabled()) log.debug("updateNonIpInterface: found match for ifIndex: " + ifIndex); match = true; break; } } } // Make sure we have a valid IfTableEntry object and update // any values which have changed if (match && ifte != null) { // index //dbSnmpIfEntry.updateIfIndex(ifIndex); // ipAddress dbSnmpIfEntry.updateIfAddress(ifAddr); // netmask // // NOTE: non-IP interfaces don't have netmasks so skip // type SnmpInt32 sint = (SnmpInt32)ifte.get(IfTableEntry.IF_TYPE); dbSnmpIfEntry.updateType(sint.getValue()); // description String str = SystemGroup.getPrintableString((SnmpOctetString)ifte.get(IfTableEntry.IF_DESCR)); if (log.isDebugEnabled()) log.debug("updateNonIpInterface: ifIndex: " + ifIndex + " has ifDescription: " + str); if(str != null && str.length() > 0) dbSnmpIfEntry.updateDescription(str); // physical address StringBuffer sbuf = new StringBuffer(); SnmpOctetString ostr = (SnmpOctetString)ifte.get(IfTableEntry.IF_PHYS_ADDR); byte[] bytes = ostr.getString(); for(int i = 0; i < bytes.length; i++) { sbuf.append(Integer.toHexString(((int)bytes[i] >> 4) & 0xf)); sbuf.append(Integer.toHexString((int)bytes[i] & 0xf)); } String physAddr = sbuf.toString().trim(); if (log.isDebugEnabled()) log.debug("updateNonIpInterface: ifIndex: " + ifIndex + " has physical address: -" + physAddr + "-"); if (physAddr.length() == 12) { dbSnmpIfEntry.updatePhysicalAddress(physAddr); } // speed SnmpUInt32 uint = (SnmpUInt32)ifte.get(IfTableEntry.IF_SPEED); dbSnmpIfEntry.updateSpeed((int)uint.getValue()); // admin status sint = (SnmpInt32)ifte.get(IfTableEntry.IF_ADMIN_STATUS); dbSnmpIfEntry.updateAdminStatus(sint.getValue()); // oper status sint = (SnmpInt32)ifte.get(IfTableEntry.IF_OPER_STATUS); dbSnmpIfEntry.updateOperationalStatus(sint.getValue()); // name (from interface extensions table) SnmpOctetString snmpIfName = snmpc.getIfName(ifIndex); if (snmpIfName != null) { String ifName = SystemGroup.getPrintableString(snmpIfName); if (ifName!= null && ifName.length() > 0) dbSnmpIfEntry.updateName(ifName); } } // end if valid ifTable entry // If this is a new interface or if any of the following // key fields have changed set the m_snmpIfTableChangedFlag // variable to TRUE. This will potentially trigger an event // which will cause the poller to reinitialize the primary // SNMP interface for the node. if (!m_snmpIfTableChangedFlag && newSnmpIfTableEntry || //dbSnmpIfEntry.hasIfIndexChanged() || dbSnmpIfEntry.hasIfAddressChanged() || dbSnmpIfEntry.hasTypeChanged() || dbSnmpIfEntry.hasNameChanged() || dbSnmpIfEntry.hasDescriptionChanged() || dbSnmpIfEntry.hasPhysicalAddressChanged()) { m_snmpIfTableChangedFlag = true; } // Update the database dbSnmpIfEntry.store(dbc); } | 47678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47678/8f4312100ae26baea556821175d506203929a210/RescanProcessor.java/buggy/src/services/org/opennms/netmgt/capsd/RescanProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
3989,
5273,
1358,
12,
1952,
225,
9881,
16,
25083,
225,
2167,
3639,
2037,
16,
25083,
225,
8408,
907,
1622,
756,
16,
25083,
225,
509,
540,
309,
1016,
16,
25083,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
3989,
5273,
1358,
12,
1952,
225,
9881,
16,
25083,
225,
2167,
3639,
2037,
16,
25083,
225,
8408,
907,
1622,
756,
16,
25083,
225,
509,
540,
309,
1016,
16,
25083,
225,
... |
addMethod(name, new CallbackMethod(method), noex | Constants.NOEX_CFUNC); | addMethod(name, new CallbackMethod(method, noex)); | public void defineMethod(String name, Callback method) { int noex = (name.equals("initialize")) ? Constants.NOEX_PRIVATE : Constants.NOEX_PUBLIC; addMethod(name, new CallbackMethod(method), noex | Constants.NOEX_CFUNC); } | 45827 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45827/f05423516c2d1bfe54c4363eedb9654f7cfb6898/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4426,
1305,
12,
780,
508,
16,
8444,
707,
13,
288,
3639,
509,
1158,
338,
273,
261,
529,
18,
14963,
2932,
11160,
6,
3719,
692,
5245,
18,
3417,
2294,
67,
20055,
294,
5245,
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,
4426,
1305,
12,
780,
508,
16,
8444,
707,
13,
288,
3639,
509,
1158,
338,
273,
261,
529,
18,
14963,
2932,
11160,
6,
3719,
692,
5245,
18,
3417,
2294,
67,
20055,
294,
5245,
18,
... |
this.naming.revokePriv(s, ns, priv); | String msg = "revokePriv '" + priv + "'"; GrouperLog.debug(LOG, s, msg); this.access.revokePriv(s, g, priv); GrouperLog.debug(LOG, s, msg + " revoked"); | protected void revokePriv(GrouperSession s, Stem ns, Privilege priv) throws InsufficientPrivilegeException, RevokePrivilegeException, SchemaException { GrouperSession.validate(s); this.naming.revokePriv(s, ns, priv); // FIXME try { this.nc.removeAll(); } catch (Exception e) { LOG.error(ERR_RPC + e.getMessage()); } } // protected void revokePriv(s, ns, priv) | 5235 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5235/0d42f94596acd9fca88e0b0c93b18c92a7b23722/PrivilegeResolver.java/clean/grouper/java/grouper/edu/internet2/middleware/grouper/PrivilegeResolver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
18007,
15475,
12,
1114,
264,
2157,
272,
16,
348,
874,
3153,
16,
2301,
8203,
908,
6015,
13,
565,
1216,
225,
22085,
11339,
24308,
503,
16,
5411,
23863,
24308,
503,
16,
5411,
4611... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18007,
15475,
12,
1114,
264,
2157,
272,
16,
348,
874,
3153,
16,
2301,
8203,
908,
6015,
13,
565,
1216,
225,
22085,
11339,
24308,
503,
16,
5411,
23863,
24308,
503,
16,
5411,
4611... |
try { List<byte[]> lines = new LineReader().readLines(new ByteArrayInputStream(commitMessage.getBytes())); if (!lines.isEmpty()) { int lastIndex = lines.size() - 1; if (lines.get(lastIndex).length == 0) lines.remove(lastIndex); } if (lines.isEmpty()) return ""; if (lines.size() == 1) { return new String(lines.get(0)); } else { return new String(lines.get(0)) + "..."; } } catch (IOException e) { LOG.error(e); | int index13 = commitMessage.indexOf('\r'); int index10 = commitMessage.indexOf('\n'); if (index10 < 0 && index13 < 0) { | protected Comparable getDataOf(Object object) { String commitMessage = ((VcsFileRevision)object).getCommitMessage(); try { List<byte[]> lines = new LineReader().readLines(new ByteArrayInputStream(commitMessage.getBytes())); if (!lines.isEmpty()) { int lastIndex = lines.size() - 1; if (lines.get(lastIndex).length == 0) lines.remove(lastIndex); } if (lines.isEmpty()) return ""; if (lines.size() == 1) { return new String(lines.get(0)); } else { return new String(lines.get(0)) + "..."; } } catch (IOException e) { LOG.error(e); return commitMessage; } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/3de0fd6612b01325d3a8e2dd29c980447948f32c/FileHistoryPanelImpl.java/buggy/source/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
13633,
4303,
951,
12,
921,
733,
13,
288,
1377,
514,
3294,
1079,
273,
14015,
58,
2143,
812,
7939,
13,
1612,
2934,
588,
5580,
1079,
5621,
1377,
775,
288,
3639,
987,
32,
7229,
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,
377,
4750,
13633,
4303,
951,
12,
921,
733,
13,
288,
1377,
514,
3294,
1079,
273,
14015,
58,
2143,
812,
7939,
13,
1612,
2934,
588,
5580,
1079,
5621,
1377,
775,
288,
3639,
987,
32,
7229,
8526,
... |
public void widgetSelected(SelectionEvent e) { boolean custom= fBackgroundCustomRadioButton.getSelection(); fBackgroundColorButton.setEnabled(custom); getOverlayStore().setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom); | public void widgetSelected(SelectionEvent e) { HighlightingColorListItem item= getHighlightingColorListItem(); getOverlayStore().setValue(item.getBoldKey(), fBoldCheckBox.getSelection()); | public void widgetSelected(SelectionEvent e) { boolean custom= fBackgroundCustomRadioButton.getSelection(); fBackgroundColorButton.setEnabled(custom); getOverlayStore().setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom); } | 54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/0a6dc3da2e4f6cacc956effd5590fc0bfc53a105/MakefileEditorPreferencePage.java/buggy/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/MakefileEditorPreferencePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
6862,
9506,
202,
6494,
1679,
33,
284,
8199,
3802,
19984,
3616,
18,
588,
6233,
5621,
9506,
202,
74,
21699,
3616,
18,
542,
1526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
6862,
9506,
202,
6494,
1679,
33,
284,
8199,
3802,
19984,
3616,
18,
588,
6233,
5621,
9506,
202,
74,
21699,
3616,
18,
542,
1526,
... |
if (src instanceof String) { | if (src instanceof byte[]) { sourceDoc = new StreamSource(new ByteArrayInputStream((byte[])src)); } else if (src instanceof String) { | public Object doTransform(Object src, String encoding) throws TransformerException { try { DocumentSource sourceDoc = null; DocumentResult resultDoc = new DocumentResult(); DefaultErrorListener errorListener = null; if(src instanceof byte[]) { src = new String((byte[])src); } if (src instanceof String) { String xml = (String) src; Document dom4jDoc = DocumentHelper.parseText(xml); sourceDoc = new DocumentSource(dom4jDoc); } else if (src instanceof DocumentSource) { sourceDoc = (DocumentSource) src; } else if (src instanceof Document) { sourceDoc = new DocumentSource((Document) src); } errorListener = new DefaultErrorListener(this); transformer.setErrorListener(errorListener); transformer.transform(sourceDoc, resultDoc); if(errorListener.isError()) { throw errorListener.getException(); } if (Document.class.equals(returnClass)) { return resultDoc.getDocument(); } else { Document transformedDoc = resultDoc.getDocument(); return transformedDoc.asXML(); } } catch (Exception e) { throw new TransformerException(this, e); } } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/22b3f2b0c3c9d6164f7fbdb18eca36fcf3d4dd43/XsltTransformer.java/buggy/src/java/org/mule/transformers/xml/XsltTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
741,
4059,
12,
921,
1705,
16,
514,
2688,
13,
1216,
21684,
288,
3639,
775,
288,
5411,
4319,
1830,
1084,
1759,
273,
446,
31,
5411,
4319,
1253,
563,
1759,
273,
394,
4319,
1253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
741,
4059,
12,
921,
1705,
16,
514,
2688,
13,
1216,
21684,
288,
3639,
775,
288,
5411,
4319,
1830,
1084,
1759,
273,
446,
31,
5411,
4319,
1253,
563,
1759,
273,
394,
4319,
1253,
... |
super(arguments); | super(arguments, outStream); | public TestableCommandlineParser(String[] arguments) { super(arguments); } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/f321a7dc6c9f0229cc5266d9c2923a04a755be60/TestCommandlineParser.java/clean/test/org/jruby/test/TestCommandlineParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7766,
429,
2189,
1369,
2678,
12,
780,
8526,
1775,
13,
288,
1850,
2240,
12,
7099,
16,
28997,
1769,
3639,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
7766,
429,
2189,
1369,
2678,
12,
780,
8526,
1775,
13,
288,
1850,
2240,
12,
7099,
16,
28997,
1769,
3639,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
public synchronized void addInputMethodListener(InputMethodListener l) | public synchronized void addInputMethodListener(InputMethodListener listener) | public synchronized void addInputMethodListener(InputMethodListener l) { inputMethodListener = AWTEventMulticaster.add(inputMethodListener, l); if (inputMethodListener != null) enableEvents(AWTEvent.INPUT_METHOD_EVENT_MASK); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/Component.java/clean/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
918,
527,
1210,
1305,
2223,
12,
1210,
1305,
2223,
2991,
13,
225,
288,
202,
202,
2630,
1305,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
2630,
1305,
2223,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3852,
918,
527,
1210,
1305,
2223,
12,
1210,
1305,
2223,
2991,
13,
225,
288,
202,
202,
2630,
1305,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
2630,
1305,
2223,
16,
... |
assertFalse(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.markMessageReadForUser("joesmith", new Long(1), new Long(2)); assertTrue(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.deleteUnreadStatus("joesmith", new Long(1), new Long(2)); | assertFalse(messageManager.isMessageReadForUser(new Long(1), new Long(2))); messageManager.markMessageReadForUser(new Long(1), new Long(2), true); assertTrue(messageManager.isMessageReadForUser(new Long(1), new Long(2))); messageManager.deleteUnreadStatus(new Long(1), new Long(2)); | public void testIsMessageReadForUser() { assertFalse(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.markMessageReadForUser("joesmith", new Long(1), new Long(2)); assertTrue(messageManager.isMessageReadForUser("joesmith", new Long(1), new Long(2))); messageManager.deleteUnreadStatus("joesmith", new Long(1), new Long(2)); } | 2021 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2021/91201e6a73a0f8b585c781bf4a7ca98b97854847/MessageForumsTests.java/buggy/msgcntr/messageforums-component-shared/test/org/sakaiproject/component/app/messageforums/MessageForumsTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
1079,
1994,
19894,
1435,
288,
3639,
1815,
8381,
12,
2150,
1318,
18,
291,
1079,
1994,
19894,
2932,
30952,
281,
81,
483,
3113,
394,
3407,
12,
21,
3631,
394,
3407,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2520,
1079,
1994,
19894,
1435,
288,
3639,
1815,
8381,
12,
2150,
1318,
18,
291,
1079,
1994,
19894,
2932,
30952,
281,
81,
483,
3113,
394,
3407,
12,
21,
3631,
394,
3407,
12,... |
int acc = getClassFile2().getAccessFlags(); | ClassFile cf = getClassFile2(); int acc = cf.getAccessFlags(); | public int getModifiers() { int acc = getClassFile2().getAccessFlags(); acc = AccessFlag.clear(acc, AccessFlag.SUPER); return AccessFlag.toModifier(acc); } | 11369 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11369/ad7d5a92142d2e0e877f34495d2fb08357c9a9e9/CtClassType.java/clean/src/main/javassist/CtClassType.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
18023,
1435,
288,
3639,
30614,
6080,
273,
2900,
812,
22,
5621,
509,
4078,
273,
6080,
18,
588,
1862,
5094,
5621,
3639,
4078,
273,
5016,
4678,
18,
8507,
12,
8981,
16,
5016,
4678,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
18023,
1435,
288,
3639,
30614,
6080,
273,
2900,
812,
22,
5621,
509,
4078,
273,
6080,
18,
588,
1862,
5094,
5621,
3639,
4078,
273,
5016,
4678,
18,
8507,
12,
8981,
16,
5016,
4678,... |
if(connector.isQueueEvents()) { BoundedPersistentQueue queue = connector.createQueue(endpointUri.getAddress()); queue.put(event); | if (connector.isQueueEvents()) { QueueSession session = connector.getQueueSession(); Queue queue = session.getQueue(endpointUri.getAddress()); queue.put(event); | public void doDispatch(UMOEvent event) throws Exception { UMOEndpointURI endpointUri = event.getEndpoint().getEndpointURI(); if(endpointUri==null) { throw new DispatchException(new Message(Messages.X_IS_NULL, "Endpoint"), event.getMessage(), event.getEndpoint()); } if(connector.isQueueEvents()) { BoundedPersistentQueue queue = connector.createQueue(endpointUri.getAddress()); queue.put(event); } else { VMMessageReceiver receiver = connector.getReceiver(event.getEndpoint().getEndpointURI()); if(receiver==null) { logger.warn("No receiver for endpointUri: " + event.getEndpoint().getEndpointURI()); return; } receiver.onEvent(event); } logger.debug("dispatched Event on endpointUri: " + endpointUri); } | 2370 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2370/78dbd5bd84c22fb5305dc4943325206dc111183b/VMMessageDispatcher.java/clean/providers/vm/src/java/org/mule/providers/vm/VMMessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
5325,
12,
2799,
51,
1133,
871,
13,
1216,
1185,
565,
288,
3639,
587,
5980,
3293,
3098,
2494,
3006,
273,
871,
18,
588,
3293,
7675,
588,
3293,
3098,
5621,
3639,
309,
12,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
5325,
12,
2799,
51,
1133,
871,
13,
1216,
1185,
565,
288,
3639,
587,
5980,
3293,
3098,
2494,
3006,
273,
871,
18,
588,
3293,
7675,
588,
3293,
3098,
5621,
3639,
309,
12,
80... |
updateLocation(); | public void caretUpdate( CaretEvent ce ) { _model.getActiveDocument(). syncCurrentLocationWithDefinitions(ce.getDot()); //updateLocation(); } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/670f6a3249531754b5a506ef8dd3eec3089b7300/MainFrame.java/buggy/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1071,
2725,
2735,
5621,
918,
2725,
2735,
5621,
21683,
1891,
12,
2725,
2735,
5621,
385,
20731,
1133,
2725,
2735,
5621,
5898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1089,
2735,
5621,
1071,
2725,
2735,
5621,
918,
2725,
2735,
5621,
21683,
1891,
12,
2725,
2735,
5621,
385,
20731,
1133,
2725,
2735,
5621,
5898,
... | |
if (true /* || fs.hasSelectors() || (fs.hasPatterns() && fs.createPatternSet() != null && (fs.createPatternSet().createInclude() != null && fs.createPatternSet().createExclude() != null && (fs.createPatternSet().getIncludePatterns(project) != null || fs.createPatternSet().getExcludePatterns( project) != null)))*/ ) { if (fs.getEmbed()) { | if (fs.getEmbed()) { continue; } ds = fs.getDirectoryScanner(project); dirs = ds.getIncludedDirectories(); for (int j = 0; j < dirs.length; j++) { File[] jars = fs.findJars(dirs[j]); if (jars == null || jars.length == 0) { log( "No Jars in " + dirs[j] + ", ignoring.", Project.MSG_VERBOSE); | protected String buildFrameworkPaths() { StringBuffer buf = new StringBuffer(); List frameworkSets = getApplicatonTask().getFrameworkSets(); Project project = task.getProject(); // track included jar files to avoid double entries Vector jarSet = new Vector(); for (int i = 0; i < frameworkSets.size(); i++) { FrameworkSet fs = null; DirectoryScanner ds = null; String[] dirs = null; try { fs = (FrameworkSet) frameworkSets.get(i); // Don't bother checking if it's embedded. if (!fs.isReference()) { log( "fs.createPatternSet().getIncludePatterns(project) " + fs.createPatternSet().getIncludePatterns(project), Project.MSG_VERBOSE); log( "fs.createPatternSet().getExcludePatterns(project) " + fs.createPatternSet().getExcludePatterns(project), Project.MSG_VERBOSE); } if (true /* || fs.hasSelectors() || (fs.hasPatterns() && fs.createPatternSet() != null && (fs.createPatternSet().createInclude() != null && fs.createPatternSet().createExclude() != null && (fs.createPatternSet().getIncludePatterns(project) != null || fs.createPatternSet().getExcludePatterns( project) != null)))*/ ) { if (fs.getEmbed()) { continue; } ds = fs.getDirectoryScanner(project); dirs = ds.getIncludedDirectories(); for (int j = 0; j < dirs.length; j++) { File[] jars = fs.findJars(dirs[j]); if (jars == null || jars.length == 0) { log( "No Jars in " + dirs[j] + ", ignoring.", Project.MSG_VERBOSE); continue; } int jsize = jars.length; for (int k = 0; k < jsize; k++) { if (!jarSet.contains(jars[k])) jarSet.add(jars[k]); } } } } catch (Exception anException) { // directory doesn't exist or is not readable log(anException.getMessage(), Project.MSG_WARN); } finally { fs = null; ds = null; dirs = null; } } File aFile = null; try { for (int i = 0; i < jarSet.size(); i++) { aFile = (File) jarSet.elementAt(i); log(": Framework JAR " + aFile, Project.MSG_VERBOSE); buf .append( this .getApplicatonTask() .getWOEnvironment() .getWOVariables() .encodePathForFile( aFile)) .append("\r\n"); } return buf.toString(); } catch (Exception anException) { // directory doesn't exist or is not readable log(anException.getMessage(), Project.MSG_WARN); } finally { aFile = null; } return ""; } | 50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/17f4b2985be1f5506df03fa7b673ed9115c3757e/AppFormat.java/clean/projects/woproject/src/java/org/objectstyle/woproject/ant/AppFormat.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
13701,
4466,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
682,
8257,
2785,
273,
336,
1294,
1780,
16799,
2174,
7675,
588,
13701,
2785,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
1361,
13701,
4466,
1435,
288,
202,
202,
780,
1892,
1681,
273,
394,
6674,
5621,
202,
202,
682,
8257,
2785,
273,
336,
1294,
1780,
16799,
2174,
7675,
588,
13701,
2785,
5621,
... |
System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); | if (getTreeNode().getParent() == null || CougaarThread.Debug) System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); | synchronized void decrementRunCount(Scheduler consumer) { --runningThreadCount; if (runningThreadCount < 0) { System.err.println("Thread account oddity: " +this+ " thread count is " + runningThreadCount); } listenerProxy.notifyRightReturned(consumer); } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/0277ee4b1dbeb185e9f1a4d5597e1fa1ea36250a/Scheduler.java/buggy/core/src/org/cougaar/core/thread/Scheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
15267,
1997,
1380,
12,
11870,
4765,
13,
288,
202,
413,
8704,
3830,
1380,
31,
202,
430,
261,
8704,
3830,
1380,
411,
374,
13,
288,
202,
565,
2332,
18,
370,
18,
8222,
2932,
3830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3852,
918,
15267,
1997,
1380,
12,
11870,
4765,
13,
288,
202,
413,
8704,
3830,
1380,
31,
202,
430,
261,
8704,
3830,
1380,
411,
374,
13,
288,
202,
565,
2332,
18,
370,
18,
8222,
2932,
3830... |
newExpression = createCollectionIterationText(forStatement, project); | newExpression = createCollectionIterationText(forStatement ); | public void doFix(Project project, ProblemDescriptor descriptor) throws IncorrectOperationException{ final PsiElement forElement = descriptor.getPsiElement(); if(!(forElement.getParent() instanceof PsiForStatement)){ return; } final PsiForStatement forStatement = (PsiForStatement) forElement.getParent(); final String newExpression; if(isArrayLoopStatement(forStatement)){ newExpression = createArrayIterationText(forStatement, project); } else if(isCollectionLoopStatement(forStatement)){ newExpression = createCollectionIterationText(forStatement, project); } else if(isIndexedListLoopStatement(forStatement)){ newExpression = createListIterationText(forStatement, project); } else{ return; } replaceStatementAndShortenClassNames(forStatement, newExpression); } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/8629082a2f885120180c8da4e7204776468af6a2/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/jdk15/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
364,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
741,
8585,
12,
4109,
1984,
16,
21685,
3187,
4950,
13,
7734,
1216,
657,
6746,
10602,
95,
5411,
727,
453,
7722,
1046,
364,
1046,
273,
4950,
18,
588,
52,
7722,
1046,
5621,
5411,
... |
if(!updatesPending()) { | if (!updatesPending()) { | void listenerRemoved(ILabelProviderListener listener) { if(updatesPending()){//Only keep track of them if there are updates pending removedListeners.add(listener); } if(!updatesPending()) { removedListeners.remove(listener); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/b543fc145c42526ff99e6c17d4baec8b9a5cf3e0/DecorationScheduler.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecorationScheduler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2991,
10026,
12,
45,
2224,
2249,
2223,
2991,
13,
288,
202,
202,
430,
12,
14703,
8579,
10756,
95,
759,
3386,
3455,
3298,
434,
2182,
309,
1915,
854,
4533,
4634,
1082,
202,
14923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
2991,
10026,
12,
45,
2224,
2249,
2223,
2991,
13,
288,
202,
202,
430,
12,
14703,
8579,
10756,
95,
759,
3386,
3455,
3298,
434,
2182,
309,
1915,
854,
4533,
4634,
1082,
202,
14923,... |
private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl.TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl .TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | private void fireHandleEvent(int iType) { for (int iL = 0; iL < vListeners.size(); iL++) { Event se = new Event(); se.widget = this; se.data = (fCurrent != null) ? fCurrent : ColorDefinitionImpl.TRANSPARENT(); se.type = iType; ((Listener) vListeners.get(iL)).handleEvent(se); } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/a913ff8af0f2b5b295b22dbb8880b014d596b568/FillChooserComposite.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FillChooserComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
4452,
3259,
1133,
12,
474,
277,
559,
13,
565,
288,
3639,
364,
261,
474,
277,
48,
273,
374,
31,
277,
48,
411,
331,
5583,
18,
1467,
5621,
277,
48,
27245,
3639,
288,
5411,
258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4452,
3259,
1133,
12,
474,
277,
559,
13,
565,
288,
3639,
364,
261,
474,
277,
48,
273,
374,
31,
277,
48,
411,
331,
5583,
18,
1467,
5621,
277,
48,
27245,
3639,
288,
5411,
258... |
private void checkNative(int resultLimit, int rowCount, String mdx) { | private void checkNative( int resultLimit, int rowCount, String mdx, boolean checkCaching) { | private void checkNative(int resultLimit, int rowCount, String mdx) { // Don't run the test if we're testing expression dependencies. // Expression dependencies cause spurious interval calls to // 'level.getMembers()' which create false negatives in this test. if (MondrianProperties.instance().TestExpDependencies.get() > 0) { return; } CachePool.instance().flush(); try { logger.debug("*** Native: " + mdx); Connection con = getConnection(true); RolapNativeRegistry reg = getRegistry(con); reg.useHardCache(true); TestListener listener = new TestListener(); reg.setListener(listener); reg.setEnabled(true); TestCase c = new TestCase(con, resultLimit, rowCount, mdx); Result r1 = c.run(); String s1 = toString(r1); if (!listener.isFoundEvaluator()) { fail("expected native execution of " + mdx); } if (!listener.isExcecuteSql()) { fail("cache is empty: expected SQL query to be executed"); } // run once more to make sure that the result comes from cache now listener.setExcecuteSql(false); c.run(); if (listener.isExcecuteSql()) { fail("expected result from cache when query runs twice"); } con.close(); logger.debug("*** Interpreter: " + mdx); CachePool.instance().flush(); con = getConnection(true); reg = getRegistry(con); listener.setFoundEvaluator(false); reg.setListener(listener); // disable RolapNativeSet reg.setEnabled(false); Result r2 = executeQuery(mdx, con); String s2 = toString(r2); if (listener.isFoundEvaluator()) { fail("did not expect native executions of " + mdx); } if (!s1.equals(s2)) { StringBuffer sb = new StringBuffer(); sb.append("Result differs"); sb.append("\n\nMDX:\n").append(mdx); sb.append("\n\nNative Implementation returned:\n"); sb.append(s1); sb.append("\n\nInterpreter returned:\n"); sb.append(s2); fail(sb.toString()); } } finally { Connection con = getConnection(); RolapNativeRegistry reg = getRegistry(con); reg.setEnabled(true); reg.useHardCache(false); } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/e4fb77b7d220797c199527f3d792d8a841e37a77/NonEmptyTest.java/clean/testsrc/main/mondrian/rolap/NonEmptyTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
9220,
12,
509,
563,
3039,
16,
509,
14888,
16,
514,
3481,
92,
16,
1250,
866,
17712,
13,
288,
3639,
368,
7615,
1404,
1086,
326,
1842,
309,
732,
4565,
7769,
2652,
5030,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
866,
9220,
12,
509,
563,
3039,
16,
509,
14888,
16,
514,
3481,
92,
16,
1250,
866,
17712,
13,
288,
3639,
368,
7615,
1404,
1086,
326,
1842,
309,
732,
4565,
7769,
2652,
5030,
18,... |
if (!name.equals(ROOT_COLLECTION)) collectionsCache.remove(collection); | public boolean removeCollection(Collection collection) throws PermissionDeniedException { if (readOnly) throw new PermissionDeniedException(DATABASE_IS_READ_ONLY); if (!collection.getPermissions().validate(user, Permission.WRITE)) throw new PermissionDeniedException("not allowed to remove collection"); final CollectionCache collectionsCache = pool.getCollectionsCache(); synchronized(collectionsCache) { String name = collection.getName(); // remove from parent collection Collection parent = openCollection(collection.getParentPath(), Lock.WRITE_LOCK); if (parent != null) { try { parent.removeCollection(name.substring(name.lastIndexOf("/") + 1)); saveCollection(parent); } catch (LockException e) { LOG.warn("LockException while removing collection " + name); } finally { parent.getLock().release(); } } // remove child collections String childName; Collection childCollection; LOG.debug("removing sub-collections"); for (Iterator i = collection.collectionIterator(); i.hasNext();) { childName = (String) i.next(); childCollection = openCollection(name + '/' + childName, Lock.WRITE_LOCK); try { removeCollection(childCollection); } finally { childCollection.getLock().release(); } } Lock lock = collectionsDb.getLock(); try { lock.acquire(Lock.WRITE_LOCK); // if this is not the root collection remove it completely if (name.equals(ROOT_COLLECTION)) saveCollection(collection); else { Value key; try { key = new Value(name.getBytes("UTF-8")); } catch (UnsupportedEncodingException uee) { key = new Value(name.getBytes()); } collectionsDb.remove(key); } if (!name.equals(ROOT_COLLECTION)) collectionsCache.remove(collection); } catch (LockException e) { LOG.warn("Failed to acquire lock on collections.dbx"); } catch (ReadOnlyException e) { throw new PermissionDeniedException(DATABASE_IS_READ_ONLY); } finally { lock.release(); } freeCollection(collection.getId()); textEngine.dropIndex(collection); elementIndex.dropIndex(collection); LOG.debug("removing resources ..."); for (Iterator i = collection.iterator(this); i.hasNext();) { final DocumentImpl doc = (DocumentImpl) i.next(); LOG.debug("removing document " + doc.getFileName()); new DOMTransaction(this, domDb, Lock.WRITE_LOCK) { public Object start() { if(doc.getResourceType() == DocumentImpl.BINARY_FILE) { domDb.remove(doc.getAddress()); domDb.removeOverflowValue(((BinaryDocument)doc).getPage()); } else { NodeImpl node = (NodeImpl)doc.getFirstChild(); domDb.removeAll(node.getInternalAddress()); } return null; } } .run(); new DOMTransaction(this, domDb, Lock.WRITE_LOCK) { public Object start() { try { Value ref = new NodeRef(doc.getDocId()); IndexQuery query = new IndexQuery(IndexQuery.TRUNC_RIGHT, ref); domDb.remove(query, null); domDb.flush(); } catch (BTreeException e) { LOG.warn("btree error while removing document", e); } catch (DBException e) { LOG.warn("db error while removing document", e); } catch (IOException e) { LOG.warn("io error while removing document", e); } catch (TerminatedException e) { LOG.warn("method terminated", e); } return null; } } .run(); freeDocument(doc.getDocId()); } return true; } } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/9b56c80fe6e21f4915d0b663ca9c9ce76f64dec2/NativeBroker.java/clean/src/org/exist/storage/NativeBroker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1206,
2532,
12,
2532,
1849,
13,
1216,
8509,
15877,
288,
202,
565,
309,
261,
896,
3386,
13,
202,
3639,
604,
394,
8509,
15877,
12,
22366,
67,
5127,
67,
6949,
67,
10857,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1206,
2532,
12,
2532,
1849,
13,
1216,
8509,
15877,
288,
202,
565,
309,
261,
896,
3386,
13,
202,
3639,
604,
394,
8509,
15877,
12,
22366,
67,
5127,
67,
6949,
67,
10857,
17... | |
Label label = new Label(composite, SWT.NONE); label.setText(TaskListMessages.TaskProp_priority); label.setFont(font); | private void createPriorityAndStatusArea(Composite parent) { Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; composite.setLayout(layout); Label label = new Label(composite, SWT.NONE); label.setText(TaskListMessages.TaskProp_priority); label.setFont(font); priorityCombo = new Combo(composite, SWT.READ_ONLY); priorityCombo.setItems(new String[] { TaskListMessages.TaskList_high, TaskListMessages.TaskList_normal, TaskListMessages.TaskList_low }); // Prevent Esc and Return from closing the dialog when the combo is active. priorityCombo.addTraverseListener(new TraverseListener() { public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) { e.doit = false; } } }); priorityCombo.setFont(font); completedCheckbox = new Button(composite, SWT.CHECK); completedCheckbox.setText(TaskListMessages.TaskProp_completed); GridData gridData = new GridData(); gridData.horizontalIndent = convertHorizontalDLUsToPixels(20); completedCheckbox.setLayoutData(gridData); completedCheckbox.setFont(font); if (!isEditable()) { priorityCombo.setEnabled(false); completedCheckbox.setEnabled(false); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/c0808721af02f0ecee38c2df86e12ba5bfc3ce30/TaskPropertiesDialog.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/tasklist/TaskPropertiesDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
752,
8183,
1876,
1482,
5484,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
8183,
1876,
1482,
5484,
12,
9400,
982,
13,
288,
3639,
10063,
3512,
273,
982,
18,
588,
5711,
5621,
3639,
14728,
9635,
273,
394,
14728,
12,
2938,
16,
348,
8588,
18,
9826,
... | |
public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return (((Boolean)obj).booleanValue()); } | public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return ((Boolean) obj).booleanValue(); } | public boolean readBoolean() throws IOException { Object obj = vec.elementAt(ptr++); return (((Boolean)obj).booleanValue());} | 1043 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1043/84d120cc49d42a79bfbc68fe36429395bdef90fd/UnicastRemoteCall.java/clean/libjava/gnu/java/rmi/server/UnicastRemoteCall.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
855,
5507,
1435,
1216,
1860,
288,
202,
921,
1081,
273,
7062,
18,
2956,
861,
12,
6723,
9904,
1769,
202,
2463,
261,
12443,
5507,
13,
2603,
2934,
6494,
620,
10663,
97,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
1250,
855,
5507,
1435,
1216,
1860,
288,
202,
921,
1081,
273,
7062,
18,
2956,
861,
12,
6723,
9904,
1769,
202,
2463,
261,
12443,
5507,
13,
2603,
2934,
6494,
620,
10663,
97,
2,
-100,
-100,
... |
InputStream inputData = null; | public boolean performFinish( ) { final IPath locPath = newReportFileWizardPage.getFileLocationFullPath( ); String fn = newReportFileWizardPage.getFileName( ); final String fileName; if ( !fn.endsWith( ".rptdesign" ) ) //$NON-NLS-1$ { fileName = fn + ".rptdesign"; //$NON-NLS-1$ } else { fileName = fn; } InputStream inputData = null; String cheatSheetIdFromPage = "";//$NON-NLS-1$ boolean showCheatSheetFromPage = false; URL url = Platform.find( Platform.getBundle( ReportPlugin.REPORT_UI ), new Path( templateChoicePage.getTemplate( ).getReportFullName( ))); if ( url != null ) { try { inputData = url.openStream( ); } catch ( IOException e1 ) { return false; } } else { File file = new File( templateChoicePage.getTemplate( ) .getReportFullName( ) ); if ( file.exists( ) ) { try { inputData = new FileInputStream( file ); } catch ( FileNotFoundException e ) { return false; } } } cheatSheetIdFromPage = templateChoicePage.getTemplate( ) .getCheatSheetId( ); showCheatSheetFromPage = templateChoicePage.getShowCheatSheet( ); final InputStream stream = inputData; final String cheatSheetId = cheatSheetIdFromPage; final boolean showCheatSheet = showCheatSheetFromPage; IRunnableWithProgress op = new IRunnableWithProgress( ) { public void run( IProgressMonitor monitor ) { try { doFinish( locPath, fileName, stream, cheatSheetId, showCheatSheet, monitor ); } finally { monitor.done( ); } } }; try { getContainer( ).run( true, false, op ); } catch ( InterruptedException e ) { return false; } catch ( InvocationTargetException e ) { Throwable realException = e.getTargetException( ); ExceptionHandler.handle( realException ); return false; } return true; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/76ebe408a984f02b49cbaf1597c0c7a0213901fe/NewReportWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.rcp/src/org/eclipse/birt/report/designer/ui/internal/rcp/wizards/NewReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
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,
225,
202,
482,
1250,
3073,
11641,
12,
262,
202,
95,
202,
202,
6385,
467,
743,
1515,
743,
273,
394,
4820,
812,
27130,
1964,
18,
29925,
2735,
24173,
12,
11272,
202,
202,
780,
2295,
273,
394,
4... | |
public boolean isEquivalentTo(QName aElement, QName exemplar) throws Exception{ if (aElement.localpart==exemplar.localpart && aElement.uri==exemplar.uri ) { return true; | public boolean isEquivalentTo(QName anElement, QName exemplar) throws Exception{ if (anElement.localpart==exemplar.localpart && anElement.uri==exemplar.uri ) { return true; | public boolean isEquivalentTo(QName aElement, QName exemplar) throws Exception{ if (aElement.localpart==exemplar.localpart && aElement.uri==exemplar.uri ) { return true; } if (fGrammarResolver == null || fStringPool == null) { throw new SAXException("Try to check substitutionGroup against a substitutionGroup, but no GrammarResolver is defined"); } int count = 16; // 16 is the limit of times for which we'll check the substitutionGroup transitively. int uriIndex = aElement.uri; int localpartIndex = aElement.localpart; String uri = fStringPool.toString(aElement.uri); String localpart = fStringPool.toString(aElement.localpart); while (count >= 0) { if(uri==null) { return false; } SchemaGrammar sGrammar = null; try { sGrammar = (SchemaGrammar) fGrammarResolver.getGrammar(uri); } catch ( ClassCastException ce) { //since the returen Grammar is not a SchemaGrammar, bail out return false; } if(sGrammar == null) return false; int elementIndex = sGrammar.getElementDeclIndex(uriIndex, localpartIndex, TOP_LEVEL_SCOPE); //System.out.println("----------equivClassFullName : " + uriIndex+","+localpartIndex+","+elementIndex); if (elementIndex == -1) { return false; } String substitutionGroupFullName = sGrammar.getElementDeclSubstitutionGroupElementFullName(elementIndex); //System.out.println("----------equivClassFullName : " + equivClassFullName); if (substitutionGroupFullName==null) { return false; } int commaAt = substitutionGroupFullName.indexOf(","); uri = ""; localpart = substitutionGroupFullName; if ( commaAt >= 0 ) { if (commaAt > 0 ) { uri = substitutionGroupFullName.substring(0,commaAt); } localpart = substitutionGroupFullName.substring(commaAt+1); } uriIndex = fStringPool.addSymbol(uri); localpartIndex = fStringPool.addSymbol(localpart); if (uriIndex == exemplar.uri && localpartIndex == exemplar.localpart) { return true; } count--; } return false; } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/38ed5d50bd4dc1974dd1d1bf70d1154b9831aa3f/SubstitutionGroupComparator.java/buggy/src/org/apache/xerces/validators/schema/SubstitutionGroupComparator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
22606,
774,
12,
13688,
279,
1046,
16,
16723,
431,
351,
412,
297,
13,
1216,
1185,
95,
3639,
309,
261,
69,
1046,
18,
3729,
2680,
631,
338,
351,
412,
297,
18,
3729,
2680,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
22606,
774,
12,
13688,
279,
1046,
16,
16723,
431,
351,
412,
297,
13,
1216,
1185,
95,
3639,
309,
261,
69,
1046,
18,
3729,
2680,
631,
338,
351,
412,
297,
18,
3729,
2680,
... |
if (PRUNE_INFEASIBLE_EXCEPTION_EDGES) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); } | if (PRUNE_INFEASIBLE_EXCEPTION_EDGES && !cfg.isFlagSet(PRUNED_INFEASIBLE_EXCEPTIONS)) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); | public CFG getCFG(Method method) throws CFGBuilderException { CFG cfg = cfgMap.get(method); if (cfg == null) { MethodGen methodGen = getMethodGen(method); if (DEBUG) System.out.println("Building CFG for " + methodGen.getClassName() + "." + methodGen.getName() + ":" + methodGen.getSignature()); CFGBuilder cfgBuilder = CFGBuilderFactory.create(methodGen); cfgBuilder.build(); cfg = cfgBuilder.getCFG(); cfgMap.put(method, cfg); if (PRUNE_INFEASIBLE_EXCEPTION_EDGES) { try { TypeDataflow typeDataflow = getTypeDataflow(method); new PruneInfeasibleExceptionEdges(cfg, typeDataflow, getConstantPoolGen()).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } catch (ClassNotFoundException e) { lookupFailureCallback.reportMissingClass(e); } } if (PRUNE_UNCONDITIONAL_EXCEPTION_THROWER_EDGES) { try { new PruneUnconditionalExceptionThrowerEdges( methodGen, cfg, getConstantPoolGen(), lookupFailureCallback).execute(); } catch (DataflowAnalysisException e) { // FIXME: should report the error } } } return cfg; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/e713b6f9f0c8108c61494bb15ab2b8ea02012eb6/ClassContext.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/ClassContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
19727,
2776,
273,
2776,
863,
18,
588,
12,
2039,
1769,
202,
202,
430,
261,
7066,
422,
446,
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,
225,
202,
482,
7577,
1927,
42,
43,
12,
1305,
707,
13,
1216,
7577,
1263,
503,
288,
202,
202,
19727,
2776,
273,
2776,
863,
18,
588,
12,
2039,
1769,
202,
202,
430,
261,
7066,
422,
446,
13,
28... |
if (VM.VerifyAssertions) VM.assert(!ci.intersects(physInterval)); | if (VM.VerifyAssertions) VM._assert(!ci.intersects(physInterval)); | private void updatePhysicalInterval(OPT_Register p, BasicInterval i) { // Get a representation of the intervals already assigned to p. CompoundInterval physInterval = getInterval(p); if (physInterval == null) { // no interval yet. create one. setInterval(p,new CompoundInterval(i,p)); } else { // incorporate i into the set of intervals assigned to p CompoundInterval ci = new CompoundInterval(i,p); if (VM.VerifyAssertions) VM.assert(!ci.intersects(physInterval)); physInterval.addAll(ci); } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/f852e312fd5d6396bdeff809dda7a5e06d3d3bed/OPT_LinearScan.java/buggy/rvm/src/vm/compilers/optimizing/regalloc/linearScan/OPT_LinearScan.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1089,
18136,
4006,
12,
15620,
67,
3996,
293,
16,
7651,
4006,
277,
13,
288,
4202,
368,
968,
279,
4335,
434,
326,
10389,
1818,
6958,
358,
293,
18,
1377,
21327,
4006,
24758,
4006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
18136,
4006,
12,
15620,
67,
3996,
293,
16,
7651,
4006,
277,
13,
288,
4202,
368,
968,
279,
4335,
434,
326,
10389,
1818,
6958,
358,
293,
18,
1377,
21327,
4006,
24758,
4006,... |
} catch (PartInitException e) { MylarPlugin.log(e, "could not open: " + node); } catch (JavaModelException e) { MylarPlugin.log(e, "could not open: " + node); | } catch (Throwable t) { MylarPlugin.fail(t, "Could not open editor for: " + node, true); | public void open(IMylarContextNode node) { //get the element and open it in an editor IJavaElement javaElement = JavaCore.create(node.getElementHandle()); if (javaElement == null || !javaElement.exists()) return; try { IEditorPart part = JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(part, javaElement); } catch (PartInitException e) { MylarPlugin.log(e, "could not open: " + node); } catch (JavaModelException e) { MylarPlugin.log(e, "could not open: " + node); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/5591b18724dda323ba7fc10a70b5996705030a0d/JavaUiBridge.java/clean/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/java/ui/JavaUiBridge.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1696,
12,
3445,
93,
7901,
1042,
907,
756,
13,
288,
3639,
368,
588,
326,
930,
471,
1696,
518,
316,
392,
4858,
3639,
467,
5852,
1046,
2252,
1046,
273,
5110,
4670,
18,
2640,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1696,
12,
3445,
93,
7901,
1042,
907,
756,
13,
288,
3639,
368,
588,
326,
930,
471,
1696,
518,
316,
392,
4858,
3639,
467,
5852,
1046,
2252,
1046,
273,
5110,
4670,
18,
2640,
12,... |
if (!qdoxParser.parse(classToParse)) return null; | if (!qdoxParser.parse(classToParse)) { return null; } | private static ClassMetaData parseClass(final QDoxParser qdoxParser, final String classToParse) { if (!qdoxParser.parse(classToParse)) return null; final JavaMethod[] methods = qdoxParser.getJavaMethods(); final JavaField[] fields = qdoxParser.getJavaFields(); final List methodList = new ArrayList(methods.length); for (int i = 0; i < methods.length; i++) { methodList.add(createMethodMetaData(methods[i])); } final List fieldList = new ArrayList(fields.length); for (int i = 0; i < fields.length; i++) { fieldList.add(createFieldMetaData(fields[i])); } final ClassMetaData classMetaData = new ClassMetaData(); classMetaData.setName(classToParse); classMetaData.setMethods(methodList); classMetaData.setFields(fieldList); return classMetaData; } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/b6f3077f52abeafa19bc6cb223aac8660735e950/SourceFileMetaDataCompiler.java/clean/aspectwerkz/src/main/org/codehaus/aspectwerkz/metadata/SourceFileMetaDataCompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1659,
6998,
1109,
797,
12,
6385,
2238,
40,
2409,
2678,
1043,
72,
2409,
2678,
16,
4766,
5411,
727,
514,
667,
774,
3201,
13,
288,
4202,
309,
16051,
31886,
2409,
2678,
18,
2670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1659,
6998,
1109,
797,
12,
6385,
2238,
40,
2409,
2678,
1043,
72,
2409,
2678,
16,
4766,
5411,
727,
514,
667,
774,
3201,
13,
288,
4202,
309,
16051,
31886,
2409,
2678,
18,
2670,
... |
RubyString newStr = newString(getValue()); newStr.infectBy(this); return newStr; | return newString(getValue()).infectBy(this); | public IRubyObject dup() { RubyString newStr = newString(getValue()); newStr.infectBy(this); return newStr; } | 46454 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46454/c3988bcedc9973ff7f8c24ac6423ecb89f3ada35/RubyString.java/clean/src/org/jruby/RubyString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15908,
10340,
921,
9417,
1435,
288,
202,
202,
54,
10340,
780,
394,
1585,
273,
394,
780,
12,
24805,
10663,
202,
202,
2704,
1585,
18,
10625,
386,
858,
12,
2211,
1769,
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,
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,
15908,
10340,
921,
9417,
1435,
288,
202,
202,
54,
10340,
780,
394,
1585,
273,
394,
780,
12,
24805,
10663,
202,
202,
2704,
1585,
18,
10625,
386,
858,
12,
2211,
1769,
202,
202,
... |
protected String appendPath( String parentPath, String childPath, String pathAdjustment, boolean appendPaths ) { List pathFragments = new ArrayList(); String rootPath = parentPath; String protocol = null; int protocolIdx = rootPath.indexOf( "://" ); if ( protocolIdx > -1 ) { protocol = rootPath.substring( 0, protocolIdx + 3 ); rootPath = rootPath.substring( protocolIdx + 3 ); } pathFragments.add( rootPath ); if ( appendPaths ) { if ( pathAdjustment != null ) { pathFragments.add( pathAdjustment ); } pathFragments.add( childPath ); } StringBuffer cleanedPath = new StringBuffer(); if ( protocol != null ) { cleanedPath.append( protocol ); } if ( rootPath.startsWith( "/" ) ) { cleanedPath.append( '/' ); } String lastToken = null; String currentToken = null; for ( Iterator it = pathFragments.iterator(); it.hasNext(); ) { String pathFragment = (String) it.next(); StringTokenizer tokens = new StringTokenizer( pathFragment, "/" ); while( tokens.hasMoreTokens() ) { lastToken = currentToken; currentToken = tokens.nextToken(); if ( "..".equals( currentToken ) ) { // trim the previous path part off... cleanedPath.setLength( cleanedPath.length() - ( lastToken.length() + 1 ) ); } else if ( !".".equals( currentToken ) ) { // don't worry about /./ self-references. cleanedPath.append( currentToken ).append( '/' ); } } } if ( !childPath.endsWith( "/" ) && appendPaths ) { cleanedPath.setLength( cleanedPath.length() - 1 ); } return cleanedPath.toString(); } | 11530 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11530/ad38e46b4b6bbc3fb214b07966cc42877ecec536/DefaultModelInheritanceAssembler.java/buggy/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
514,
714,
743,
12,
514,
17743,
16,
514,
1151,
743,
16,
514,
589,
19985,
16,
1250,
714,
4466,
262,
565,
288,
3639,
987,
589,
27588,
273,
394,
2407,
5621,
7734,
514,
13959,
273,
177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
514,
714,
743,
12,
514,
17743,
16,
514,
1151,
743,
16,
514,
589,
19985,
16,
1250,
714,
4466,
262,
565,
288,
3639,
987,
589,
27588,
273,
394,
2407,
5621,
7734,
514,
13959,
273,
177... | ||
protected LmcWiki parseWiki(Element wiki) throws ServiceException { | protected LmcWiki parseWiki(Element wiki) { | protected LmcWiki parseWiki(Element wiki) throws ServiceException { LmcWiki result = new LmcWiki(); result.setID(wiki.attributeValue(MailService.A_ID)); result.setWikiWord(wiki.attributeValue(MailService.A_NAME)); result.setFolder(wiki.attributeValue(MailService.A_FOLDER)); result.setRev(wiki.attributeValue(MailService.A_VERSION)); result.setLastModifiedDate(wiki.attributeValue(MailService.A_DATE)); result.setLastEditor(wiki.attributeValue(MailService.A_LAST_EDITED_BY)); result.setRestUrl(wiki.attributeValue(MailService.A_REST_URL)); try { Element c = DomUtil.get(wiki, MailService.A_BODY); result.setContents(c.getText()); } catch (Exception e) {} return result; } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/1a6d91495afcdb20d15bcb4ef0e5a4ad003854f4/LmcSoapRequest.java/buggy/ZimbraServer/src/java/com/zimbra/cs/client/soap/LmcSoapRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
511,
13952,
25438,
1109,
25438,
12,
1046,
9050,
13,
202,
202,
15069,
16489,
202,
95,
202,
202,
48,
13952,
25438,
563,
273,
394,
511,
13952,
25438,
5621,
202,
202,
2088,
18,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
511,
13952,
25438,
1109,
25438,
12,
1046,
9050,
13,
202,
202,
15069,
16489,
202,
95,
202,
202,
48,
13952,
25438,
563,
273,
394,
511,
13952,
25438,
5621,
202,
202,
2088,
18,
542... |
IEditorInput input = editor.getEditorInput(); if (input instanceof IFileEditorInput) { IFile inputFile = ((IFileEditorInput) input).getFile(); | IFile inputFile = ResourceUtil.getFile(editor.getEditorInput()); if (inputFile != null) { | void saveAllResources() { List projects = getProjectsToBuild(); if (projects == null || projects.isEmpty()) return; if (!isSaveAllSet()) return; IWorkbenchWindow[] windows = PlatformUI.getWorkbench() .getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { IWorkbenchPage[] pages = windows[i].getPages(); for (int j = 0; j < pages.length; j++) { IWorkbenchPage page = pages[j]; IEditorPart[] editors = page.getDirtyEditors(); for (int k = 0; k < editors.length; k++) { IEditorPart editor = editors[k]; IEditorInput input = editor.getEditorInput(); if (input instanceof IFileEditorInput) { IFile inputFile = ((IFileEditorInput) input).getFile(); if (projects.contains(inputFile.getProject())) { page.saveEditor(editor, false); } } } } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/35591c7d55a12520aa70b2436fcd06526a22de81/BuildAction.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
1923,
1595,
3805,
1435,
288,
3639,
987,
10137,
273,
11080,
11634,
3116,
5621,
3639,
309,
261,
13582,
422,
446,
747,
10137,
18,
291,
1921,
10756,
5411,
327,
31,
3639,
309,
16051,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
1595,
3805,
1435,
288,
3639,
987,
10137,
273,
11080,
11634,
3116,
5621,
3639,
309,
261,
13582,
422,
446,
747,
10137,
18,
291,
1921,
10756,
5411,
327,
31,
3639,
309,
16051,
291,
... |
"X key=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", | "X genericTypeSignature=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", | public void test0003() throws JavaModelException { ICompilationUnit cu = getCompilationUnit("Resolve", "src2", "test0003", "Test.java"); String str = cu.getSource(); String selection = "X"; int start = str.indexOf(selection); int length = selection.length(); IJavaElement[] elements = cu.codeSelect(start, length); assertElementsEqual( "Unexpected elements", "X key=Ltest0003/Test$X<Ljava/lang/Object;>; [in Test [in Test.java [in test0003 [in src2 [in Resolve]]]]]", elements );} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/562f566c1c2b8bfedaad7117a5b53ae2f781bec9/ResolveTests_1_5.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests_1_5.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
30770,
1435,
1216,
5110,
1488,
503,
288,
202,
45,
19184,
2802,
15985,
273,
336,
19184,
2802,
2932,
8460,
3113,
315,
4816,
22,
3113,
315,
3813,
30770,
3113,
315,
4709,
18,
6290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
30770,
1435,
1216,
5110,
1488,
503,
288,
202,
45,
19184,
2802,
15985,
273,
336,
19184,
2802,
2932,
8460,
3113,
315,
4816,
22,
3113,
315,
3813,
30770,
3113,
315,
4709,
18,
6290,
... |
throw new PainterException("wrong arguments"); | throw new PainterException("ge: wrong arguments"); | public void execute(PAContext context) throws PainterException { Object data[]; data = context.popOperands(2); if (! (data[0] instanceof Number) && ! (data[0] instanceof String)) { throw new PainterException("wrong arguments"); } if (data[0] instanceof Number) { if (! (data[1] instanceof Number)) { throw new PainterException("wrong arguments"); } double d0, d1; d0 = ( (Number) data[0]).doubleValue(); d1 = ( (Number) data[1]).doubleValue(); if (d0 != d1) { context.operands.push(new Boolean(true)); } else { context.operands.push(new Boolean(false)); } } else { if (! (data[1] instanceof String)) { throw new PainterException("wrong arguments"); } String s0, s1; s0 = (String) data[0]; s1 = (String) data[1]; if (s0.equals(s1)) { context.operands.push(new Boolean(false)); } else { context.operands.push(new Boolean(true)); } } } | 3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/a9e36ef1e4e4be2e6d4839ed4e5a42aabe172a12/PAContext.java/buggy/itext/src/com/lowagie/text/pdf/codec/postscript/PAContext.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4202,
1071,
918,
1836,
12,
4066,
1042,
819,
13,
1216,
453,
11606,
503,
288,
3639,
1033,
501,
8526,
31,
3639,
501,
273,
819,
18,
5120,
3542,
5708,
12,
22,
1769,
3639,
309,
16051,
261,
892,
63... |
new VolatileGroup(), emptyBuddies, this); | new VolatileGroup(), emptyBuddies, this, false); | ContactIcqImpl createVolatileContact(Screenname screenname) { //First create the new volatile contact; Buddy volatileBuddy = new VolatileBuddy(screenname); ContactIcqImpl newVolatileContact = new ContactIcqImpl(volatileBuddy, this, true); //Check whether a volatile group already exists and if not create //one ContactGroupIcqImpl theVolatileGroup = findContactGroup((Group)null); //if necessary create the group if (theVolatileGroup == null) { List emptyBuddies = new LinkedList(); theVolatileGroup = new ContactGroupIcqImpl( new VolatileGroup(), emptyBuddies, this); theVolatileGroup.addContact(newVolatileContact); this.rootGroup.addSubGroup(theVolatileGroup); fireGroupEvent(theVolatileGroup , ServerStoredGroupEvent.GROUP_CREATED_EVENT); } else { theVolatileGroup.addContact(newVolatileContact); fireContactAdded(theVolatileGroup , newVolatileContact , theVolatileGroup.findContactIndex(volatileBuddy)); } return newVolatileContact; } | 43455 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/43455/7dfa6e70c550256f2280e5ac66055684b47173c0/ServerStoredContactListIcqImpl.java/clean/src/net/java/sip/communicator/impl/protocol/icq/ServerStoredContactListIcqImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
13329,
45,
71,
85,
2828,
752,
17431,
20295,
6567,
12,
7956,
529,
225,
5518,
529,
13,
565,
288,
3639,
368,
3759,
752,
326,
394,
31548,
5388,
31,
3639,
605,
29017,
31548,
38,
29017,
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,
13329,
45,
71,
85,
2828,
752,
17431,
20295,
6567,
12,
7956,
529,
225,
5518,
529,
13,
565,
288,
3639,
368,
3759,
752,
326,
394,
31548,
5388,
31,
3639,
605,
29017,
31548,
38,
29017,
273,
... |
if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) | if (MethodCategory.getCategory(vie.getMethodRef()) == MethodCategory.ACCESSOR_SET) | public ContextValue getTargetContextValue() { // System.out.println(stmt); if (stmt instanceof AssignStmt) { // System.out.println(stmt); AssignStmt a = (AssignStmt) stmt; Value lhs = a.getLeftOp(); if (lhs instanceof FieldRef) { FieldRef fr=(FieldRef) lhs; if(!(fr instanceof InstanceFieldRef)) return null; InstanceFieldRef ifr=(InstanceFieldRef) fr; return new JimpleValue(ifr.getBase()); } Value rhs = a.getRightOp(); if (rhs instanceof InvokeExpr) { InstanceInvokeExpr vie = (InstanceInvokeExpr) rhs; if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) return new JimpleValue(vie.getBase()); } } else if (stmt instanceof InvokeStmt) { InvokeExpr ie = ((InvokeStmt)stmt).getInvokeExpr(); if (ie instanceof InstanceInvokeExpr) { InstanceInvokeExpr vie = (InstanceInvokeExpr) ie; if (MethodCategory.getCategory(vie.getMethod()) == MethodCategory.ACCESSOR_SET) return new JimpleValue(vie.getBase()); } } return null; } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/997f4e7c5dc7eab7f3734a2c9600492132debb26/SetFieldShadowMatch.java/clean/aop/abc/src/abc/weaving/matching/SetFieldShadowMatch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1772,
620,
8571,
1042,
620,
1435,
288,
202,
202,
759,
2332,
18,
659,
18,
8222,
12,
10589,
1769,
202,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
1082,
202,
759,
2332,
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,
1772,
620,
8571,
1042,
620,
1435,
288,
202,
202,
759,
2332,
18,
659,
18,
8222,
12,
10589,
1769,
202,
202,
430,
261,
10589,
1276,
12093,
8952,
13,
288,
1082,
202,
759,
2332,
18... |
public boolean endVisitControl(Element controlElement, String effectiveControlId) {// if (controlElement.getName().equals("repeat")) {// final RepeatControlInfo repeatControlInfo = (RepeatControlInfo) repeatStack.pop();// final List children = repeatControlInfo.getChildren();// if (children == null || children.size() == 0) {// // Update repeat index to 0 if there was no iteration// result.updateRepeatIndex(effectiveControlId, 0);// // Current index is 0// result.setRepeatIterations(effectiveControlId, 0);// } else {// // Number of iterations is number of children// result.setRepeatIterations(effectiveControlId, children.size());// }// } return true; } | 52783 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52783/502ac014788f17d34ed9102cdc4dc5bd4c8b4ed8/XFormsControls.java/buggy/src/java/org/orbeon/oxf/xforms/XFormsControls.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
1250,
679,
10432,
3367,
12,
1046,
3325,
1046,
16,
514,
11448,
3367,
548,
13,
288,
759,
282,
309,
261,
7098,
1046,
18,
17994,
7675,
14963,
2932,
9374,
6,
3719,
288,
759,
4202,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1250,
679,
10432,
3367,
12,
1046,
3325,
1046,
16,
514,
11448,
3367,
548,
13,
288,
759,
282,
309,
261,
7098,
1046,
18,
17994,
7675,
14963,
2932,
9374,
6,
3719,
288,
759,
4202,
727,
... | ||
public void descriptorList_popup(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON3) { // right button may select a line in the list int index = descriptorList.locationToIndex(e.getPoint()); Rectangle rectangle = descriptorList.getCellBounds(index, index); if ((rectangle != null) && descriptorList.getCellBounds(index, index).contains(e.getPoint())) { descriptorList.setSelectedIndex(index); } else { descriptorList.clearSelection(); } // if a line is selected, process the actions if (!descriptorList.isSelectionEmpty()) { Launcher launcher = (Launcher) (descriptorMap.get(descriptorList.getSelectedValue())); //creation of a popup menu JMenuItem menuItem; JPopupMenu popup = new JPopupMenu(); menuItem = new JMenuItem("Launch the application"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); menuItem.setEnabled(!launcher.isActivated()); menuItem = new JMenuItem("Remove the descriptor"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); menuItem = new JMenuItem("View"); menuItem.addActionListener(new GUI_PopupMenuItem_ActionListener( this)); popup.add(menuItem); //menuItem.setEnabled(true); // TODO not yet implemented popup.show(e.getComponent(), e.getX(), e.getY()); } } } | 23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/767dedf380c68f592a567587cf4ed8dfcfa46bd5/LauncherWindow.java/clean/src/org/objectweb/proactive/ic2d/gui/util/LauncherWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
12628,
682,
67,
16086,
12,
9186,
1133,
73,
15329,
430,
12,
73,
18,
588,
3616,
1435,
631,
9186,
1133,
18,
20068,
23,
15329,
759,
4083,
5391,
24877,
4025,
287,
558,
267,
451,
5449,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
12628,
682,
67,
16086,
12,
9186,
1133,
73,
15329,
430,
12,
73,
18,
588,
3616,
1435,
631,
9186,
1133,
18,
20068,
23,
15329,
759,
4083,
5391,
24877,
4025,
287,
558,
267,
451,
5449,
... | ||
protected int[] parse(String str, int[] date) throws Exception{ | protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ | protected int[] parse(String str, int[] date) throws Exception{ //PnYn MnDTnH nMnS: -P1Y2M3DT10H30M resetBuffer(str); //create structure to hold an object if ( date== null ) { date=new int[TOTAL_SIZE]; } resetDateObj(date); char c=fBuffer.charAt(fStart++); if ( c!='P' && c!='-' ) { throw new Exception(); } else { date[utc]=(c=='-')?'-':0; if ( c=='-' && fBuffer.charAt(fStart++)!='P' ) { throw new Exception(); } } int negate = 1; //negative duration if ( date[utc]=='-' ) { negate = -1; } //at least one number and designator must be seen after P boolean designator = false; int endDate = indexOf (fStart, fEnd, 'T'); if ( endDate == -1 ) { endDate = fEnd; } //find 'Y' int end = indexOf (fStart, endDate, 'Y'); if ( end!=-1 ) { //scan year date[CY]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } end = indexOf (fStart, endDate, 'M'); if ( end!=-1 ) { //scan month date[M]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } end = indexOf (fStart, endDate, 'D'); if ( end!=-1 ) { //scan day date[D]=negate * parseInt(fStart,end); fStart = end+1; designator = true; } if ( fEnd == endDate && fStart!=fEnd ) { throw new Exception(); } if ( fEnd !=endDate ) { //scan hours, minutes, seconds //REVISIT: can any item include a decimal fraction or only seconds? // end = indexOf (++fStart, fEnd, 'H'); if ( end!=-1 ) { //scan hours date[h]=negate * parseInt(fStart,end); fStart=end+1; designator = true; } end = indexOf (fStart, fEnd, 'M'); if ( end!=-1 ) { //scan min date[m]=negate * parseInt(fStart,end); fStart=end+1; designator = true; } end = indexOf (fStart, fEnd, 'S'); if ( end!=-1 ) { //scan seconds int mlsec = indexOf (fStart, end, '.'); if ( mlsec >0 ) { date[s] = negate * parseInt (fStart, mlsec); date[ms] = negate * parseInt (mlsec+1, end); } else { date[s]=negate * parseInt(fStart,end); } fStart=end+1; designator = true; } // no additional data shouls appear after last item // P1Y1M1DT is illigal value as well if ( fStart != fEnd || fBuffer.charAt(--fStart)=='T' ) { throw new Exception(); } } if ( !designator ) { throw new Exception(); } return date; } | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/4e15daa59b432b97b7f93a5e7ff868021bef81ca/DurationDatatypeValidator.java/clean/src/org/apache/xerces/validators/datatype/DurationDatatypeValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
4611,
5096,
503,
95,
3639,
368,
52,
82,
61,
82,
23851,
9081,
82,
44,
290,
29668,
55,
30,
300,
52,
21,
61,
22,
49,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
8526,
1109,
12,
780,
609,
16,
509,
8526,
1509,
13,
1216,
4611,
5096,
503,
95,
3639,
368,
52,
82,
61,
82,
23851,
9081,
82,
44,
290,
29668,
55,
30,
300,
52,
21,
61,
22,
49,... |
private void createObjects( TreeItem topItem, String objectType ) { for ( Iterator itor = DesignEngine.getMetaDataDictionary( ) .getClasses( ) .iterator( ); itor.hasNext( ); ) { IClassInfo classInfo = (IClassInfo) itor.next( ); if ( classInfo.isNative( ) && OBJECTS_TYPE_BIRT.equals( objectType ) || !classInfo.isNative( ) && OBJECTS_TYPE_NATIVE.equals( objectType ) ) { continue; } TreeItem subItem = createSubFolderItem( topItem, classInfo ); Image globalImage = null; if ( isGlobal( classInfo.getName( ) ) ) { globalImage = IMAGE_GOLBAL; } //Add members for ( Iterator iterator = classInfo.getMembers( ).iterator( ); iterator.hasNext( ); ) { IMemberInfo memberInfo = (IMemberInfo) iterator.next( ); Image image = globalImage; if ( image == null ) { if ( memberInfo.isStatic( ) ) { image = IMAGE_STATIC_MEMBER; } else { image = IMAGE_MEMBER; } } createSubTreeItem( subItem, memberInfo.getDisplayName( ), image, getMemberTextData( classInfo.getName( ), memberInfo ), memberInfo.getToolTip( ), true ); } //Add constructors and methods List methodList = new ArrayList( ); methodList.add( classInfo.getConstructor( ) ); methodList.addAll( classInfo.getMethods( ) ); for ( Iterator iterator = methodList.iterator( ); iterator.hasNext( ); ) { IMethodInfo methodInfo = (IMethodInfo) iterator.next( ); if ( methodInfo == null ) { //Constructor is null continue; } Image image = globalImage; if ( image == null ) { if ( methodInfo.isStatic( ) ) { image = IMAGE_STATIC_METHOD; } else { image = IMAGE_METHOD; } } //Split a method with more than one signature into several entries List displayList = getMethodArgumentsList( classInfo.getName( ), methodInfo ); for ( int i = 0; i < displayList.size( ); i++ ) { String[] array = (String[]) displayList.get( i ); createSubTreeItem( subItem, array[0], image, array[1], methodInfo.getToolTip( ), true ); } } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/af6d108ae5a0a444c5e5eb33b74268d9ea337374/ExpressionTreeSupport.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ExpressionTreeSupport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
752,
4710,
12,
4902,
1180,
1760,
1180,
16,
514,
16400,
262,
202,
95,
202,
202,
1884,
261,
4498,
518,
280,
273,
29703,
4410,
18,
588,
6998,
10905,
12,
262,
9506,
202,
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,
1152,
918,
752,
4710,
12,
4902,
1180,
1760,
1180,
16,
514,
16400,
262,
202,
95,
202,
202,
1884,
261,
4498,
518,
280,
273,
29703,
4410,
18,
588,
6998,
10905,
12,
262,
9506,
202,
18,... | ||
for (Iterator it = idList.iterator(); it.hasNext(); ) result[i++] = ((DbMailItem.SearchResult) it.next()).id; | for (DbMailItem.SearchResult sr : idList) result[i++] = sr.id; | public synchronized int[] listItemIds(OperationContext octxt, byte type, int folderId) throws ServiceException { boolean success = false; try { beginTransaction("listItemIds", octxt); if (!hasFullAccess()) throw ServiceException.PERM_DENIED("you do not have sufficient permissions"); Folder folder = getFolderById(folderId); List idList = DbMailItem.listByFolder(folder, type, true); if (idList == null) return null; int i = 0, result[] = new int[idList.size()]; for (Iterator it = idList.iterator(); it.hasNext(); ) result[i++] = ((DbMailItem.SearchResult) it.next()).id; success = true; return result; } finally { endTransaction(success); } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/6205598f1168bd3f7a3c0e66d3b4dcb012b0bee3/Mailbox.java/clean/ZimbraServer/src/java/com/zimbra/cs/mailbox/Mailbox.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
509,
8526,
19859,
2673,
12,
2988,
1042,
320,
20364,
16,
1160,
618,
16,
509,
31996,
13,
1216,
16489,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
775,
288,
5411,
18416,
2932,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
8526,
19859,
2673,
12,
2988,
1042,
320,
20364,
16,
1160,
618,
16,
509,
31996,
13,
1216,
16489,
288,
3639,
1250,
2216,
273,
629,
31,
3639,
775,
288,
5411,
18416,
2932,
109... |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); | setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); | public IMUObserver() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); data = new StreamXYDataset[title.length][]; for(int i = 0; i < data.length; ++i) { data[i] = new StreamXYDataset[title[i].length]; for(int j = 0; j < data[i].length; ++j) { data[i][j] = new StreamXYDataset(freq[i] * HIST_LEN); add(createChart(title[i][j], data[i][j])); } } } | 55934 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55934/5f0eb03dc169a1dcf7a7685ae06fa5f4892cb89e/IMUObserver.java/clean/src/rocketview/IMUObserver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6246,
57,
11048,
1435,
202,
95,
202,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
61,
67,
25614,
10019,
202,
202,
892,
273,
394,
3961,
8546,
10656,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6246,
57,
11048,
1435,
202,
95,
202,
202,
542,
3744,
12,
2704,
8549,
3744,
12,
2211,
16,
8549,
3744,
18,
61,
67,
25614,
10019,
202,
202,
892,
273,
394,
3961,
8546,
10656,
63,
... |
public void visitTFClosedTime(TFClosedTime n) throws IOException { | public void visitTFClosedTime(/*@non_null*/TFClosedTime n) throws IOException { | public void visitTFClosedTime(TFClosedTime n) throws IOException { visitSons(n); // TODO Auto-generated method stub } | 46634 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46634/67867c1e55343e2e2d3135b09cf373b0d4c4adac/TProofTyperVisitor.java/buggy/src/escjava/trunk/ESCTools/Escjava/java/escjava/vcGeneration/coq/TProofTyperVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
17963,
7395,
950,
12,
17963,
7395,
950,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
3757,
17963,
7395,
950,
12,
17963,
7395,
950,
290,
13,
1216,
1860,
288,
202,
202,
11658,
55,
7008,
12,
82,
1769,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
20... |
public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException | public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException | public void processPluginDescriptor( MavenPluginDescriptor mavenPluginDescriptor ) throws CycleDetectedException { if ( pluginsInProcess.contains( mavenPluginDescriptor.getPluginId() ) ) { return; } pluginsInProcess.add( mavenPluginDescriptor.getPluginId() ); PluginDescriptor pluginDescriptor = mavenPluginDescriptor.getPluginDescriptor(); for ( Iterator it = mavenPluginDescriptor.getMavenMojoDescriptors().iterator(); it.hasNext(); ) { MavenMojoDescriptor mavenMojoDescriptor = (MavenMojoDescriptor) it.next(); MojoDescriptor mojoDescriptor = mavenMojoDescriptor.getMojoDescriptor(); if ( mojoDescriptor.getPrereqs() != null ) { for ( Iterator k = mojoDescriptor.getPrereqs().iterator(); k.hasNext(); ) { String prereq = (String) k.next(); if ( !processEdge( mojoDescriptor.getId(), prereq ) ) { continue; } } } else { dag.addVertex( mojoDescriptor.getId() ); } mojoDescriptors.put( mojoDescriptor.getId(), mojoDescriptor ); pluginDescriptors.put( pluginDescriptor.getId(), pluginDescriptor ); } } | 47160 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47160/a949eb66dedc63459e4897d50c37374814750c66/DefaultPluginManager.java/buggy/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1207,
3773,
3187,
12,
17176,
3773,
3187,
20499,
3773,
3187,
262,
3639,
1216,
385,
3409,
22614,
503,
565,
288,
3639,
309,
261,
4799,
382,
2227,
18,
12298,
12,
20499,
3773,
3187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
3773,
3187,
12,
17176,
3773,
3187,
20499,
3773,
3187,
262,
3639,
1216,
385,
3409,
22614,
503,
565,
288,
3639,
309,
261,
4799,
382,
2227,
18,
12298,
12,
20499,
3773,
3187,
... |
super(position); | super(position, NodeTypes.ARGUMENTNODE); | public ArgumentNode(ISourcePosition position, String identifier) { super(position); this.identifier = identifier.intern(); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/6e15491217631472c05c6928672f9c7064a978b3/ArgumentNode.java/clean/src/org/jruby/ast/ArgumentNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5067,
907,
12,
45,
1830,
2555,
1754,
16,
514,
2756,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
18311,
8744,
1769,
7734,
333,
18,
5644,
273,
2756,
18,
267,
798,
5621,
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,
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,
5067,
907,
12,
45,
1830,
2555,
1754,
16,
514,
2756,
13,
288,
3639,
2240,
12,
3276,
16,
2029,
2016,
18,
18311,
8744,
1769,
7734,
333,
18,
5644,
273,
2756,
18,
267,
798,
5621,
565,
... |
result = 1; | return 1; | public static int getConversionWeight(Object fromObj, Class to) { int fromCode = getJSTypeCode(fromObj); int result = CONVERSION_NONE; switch (fromCode) { case JSTYPE_UNDEFINED: if (to == ScriptRuntime.StringClass || to == ScriptRuntime.ObjectClass) { result = 1; } break; case JSTYPE_NULL: if (!to.isPrimitive()) { result = 1; } break; case JSTYPE_BOOLEAN: // "boolean" is #1 if (to == Boolean.TYPE) { result = 1; } else if (to == ScriptRuntime.BooleanClass) { result = 2; } else if (to == ScriptRuntime.ObjectClass) { result = 3; } else if (to == ScriptRuntime.StringClass) { result = 4; } break; case JSTYPE_NUMBER: if (to.isPrimitive()) { if (to == Double.TYPE) { result = 1; } else if (to != Boolean.TYPE) { result = 1 + getSizeRank(to); } } else { if (to == ScriptRuntime.StringClass) { // native numbers are #1-8 result = 9; } else if (to == ScriptRuntime.ObjectClass) { result = 10; } else if (ScriptRuntime.NumberClass.isAssignableFrom(to)) { // "double" is #1 result = 2; } } break; case JSTYPE_STRING: if (to == ScriptRuntime.StringClass) { result = 1; } else if (to.isInstance(fromObj)) { result = 2; } else if (to.isPrimitive()) { if (to == Character.TYPE) { result = 3; } else if (to != Boolean.TYPE) { result = 4; } } break; case JSTYPE_JAVA_CLASS: if (to == ScriptRuntime.ClassClass) { result = 1; } else if (to == ScriptRuntime.ObjectClass) { result = 3; } else if (to == ScriptRuntime.StringClass) { result = 4; } break; case JSTYPE_JAVA_OBJECT: case JSTYPE_JAVA_ARRAY: if (to == ScriptRuntime.StringClass) { result = 2; } else if (to.isPrimitive() && to != Boolean.TYPE) { result = (fromCode == JSTYPE_JAVA_ARRAY) ? CONVERSION_NONTRIVIAL : 2 + getSizeRank(to); } else { Object javaObj = fromObj; if (javaObj instanceof Wrapper) { javaObj = ((Wrapper)javaObj).unwrap(); } if (to.isInstance(javaObj)) { result = CONVERSION_NONTRIVIAL; } } break; case JSTYPE_OBJECT: // Other objects takes #1-#3 spots if (to.isArray()) { if (fromObj instanceof NativeArray) { // This is a native array conversion to a java array // Array conversions are all equal, and preferable to object // and string conversion, per LC3. result = 1; } } else if (to == ScriptRuntime.ObjectClass) { result = 2; } else if (to == ScriptRuntime.StringClass) { result = 3; } else if (to == ScriptRuntime.DateClass) { if (fromObj instanceof NativeDate) { // This is a native date to java date conversion result = 1; } } else if (to.isPrimitive() || to != Boolean.TYPE) { result = 3 + getSizeRank(to); } break; } return result; } | 12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/a80d67208db8029f3323f99ef005d09358bde48f/NativeJavaObject.java/clean/js/rhino/src/org/mozilla/javascript/NativeJavaObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
336,
6814,
6544,
12,
921,
628,
2675,
16,
1659,
358,
13,
288,
3639,
509,
628,
1085,
273,
30257,
15460,
12,
2080,
2675,
1769,
3639,
509,
563,
273,
3492,
5757,
67,
9826,
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,
509,
336,
6814,
6544,
12,
921,
628,
2675,
16,
1659,
358,
13,
288,
3639,
509,
628,
1085,
273,
30257,
15460,
12,
2080,
2675,
1769,
3639,
509,
563,
273,
3492,
5757,
67,
9826,
31... |
public AttributeDescr auto_focus() throws RecognitionException { AttributeDescr d; Token loc=null; Token t=null; d = null; try { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: ( (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) | (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) ) int alt38=2; int LA38_0 = input.LA(1); if ( LA38_0==37 ) { int LA38_1 = input.LA(2); if ( LA38_1==BOOL ) { alt38=2; } else if ( LA38_1==EOL||LA38_1==15||LA38_1==24||LA38_1==29||LA38_1==31||LA38_1==33||(LA38_1>=35 && LA38_1<=40) ) { alt38=1; } else { NoViableAltException nvae = new NoViableAltException("505:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 38, 1, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("505:1: auto_focus returns [AttributeDescr d] : ( (loc= \'auto-focus\' opt_eol ( \';\' )? opt_eol ) | (loc= \'auto-focus\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 38, 0, input); throw nvae; } switch (alt38) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:510:17: (loc= 'auto-focus' opt_eol ( ';' )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:25: loc= 'auto-focus' opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,37,FOLLOW_37_in_auto_focus1088); following.push(FOLLOW_opt_eol_in_auto_focus1090); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:50: ( ';' )? int alt36=2; int LA36_0 = input.LA(1); if ( LA36_0==15 ) { alt36=1; } else if ( LA36_0==EOL||LA36_0==24||LA36_0==29||LA36_0==31||LA36_0==33||(LA36_0>=35 && LA36_0<=40) ) { alt36=2; } else { NoViableAltException nvae = new NoViableAltException("511:50: ( \';\' )?", 36, 0, input); throw nvae; } switch (alt36) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:511:50: ';' { match(input,15,FOLLOW_15_in_auto_focus1092); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1095); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", "true" ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; case 2 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:518:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) { // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:518:17: (loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol ) // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:25: loc= 'auto-focus' t= BOOL opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,37,FOLLOW_37_in_auto_focus1120); t=(Token)input.LT(1); match(input,BOOL,FOLLOW_BOOL_in_auto_focus1124); following.push(FOLLOW_opt_eol_in_auto_focus1126); opt_eol(); following.pop(); // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:57: ( ';' )? int alt37=2; int LA37_0 = input.LA(1); if ( LA37_0==15 ) { alt37=1; } else if ( LA37_0==EOL||LA37_0==24||LA37_0==29||LA37_0==31||LA37_0==33||(LA37_0>=35 && LA37_0<=40) ) { alt37=2; } else { NoViableAltException nvae = new NoViableAltException("519:57: ( \';\' )?", 37, 0, input); throw nvae; } switch (alt37) { case 1 : // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/drl.g:519:57: ';' { match(input,15,FOLLOW_15_in_auto_focus1128); } break; } following.push(FOLLOW_opt_eol_in_auto_focus1131); opt_eol(); following.pop(); d = new AttributeDescr( "auto-focus", t.getText() ); d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() ); } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/cb210a30853642e270a3bba6ce570409f6046852/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
540,
202,
202,
72,
273,
446,
31,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
3656,
67,
13923,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
540,
202,
202,
72,
273,
446,
31,
54... | ||
public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged) throws CmsException { | public void exportResources(String exportFile, String[] exportPaths) throws CmsException { | public void exportResources(String exportFile, String[] exportPaths, boolean includeSystem, boolean excludeUnchanged) throws CmsException { // export the resources m_driverManager.exportResources(this, m_context, exportFile, exportPaths, includeSystem, excludeUnchanged); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/13800bc9901ef233804cde14a40105c18bf67203/CmsObject.java/buggy/src/com/opencms/file/CmsObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
3805,
12,
780,
3359,
812,
16,
514,
8526,
3359,
4466,
13,
1216,
11228,
288,
3639,
368,
3359,
326,
2703,
3639,
312,
67,
7407,
1318,
18,
6530,
3805,
12,
2211,
16,
312,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
3805,
12,
780,
3359,
812,
16,
514,
8526,
3359,
4466,
13,
1216,
11228,
288,
3639,
368,
3359,
326,
2703,
3639,
312,
67,
7407,
1318,
18,
6530,
3805,
12,
2211,
16,
312,
67,... |
List<AbstractRepositoryTask> dups = getSelectedDuplicates(); if (dups != null && !dups.isEmpty()) { Iterator<AbstractRepositoryTask> iter = dups.iterator(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); while (iter.hasNext()) { AbstractRepositoryTask task = iter.next(); AbstractBugEditorInput editorInput = new ExistingBugEditorInput(TasksUiPlugin.getRepositoryManager() .getRepository(task.getRepositoryKind(), task.getRepositoryUrl()), task.getTaskData()); TaskUiUtil.openEditor(editorInput, BugzillaUiPlugin.EXISTING_BUG_EDITOR_ID, page); } return true; } | public boolean performFinish() { try { productPage.saveDataToModel(); NewBugEditorInput editorInput = new NewBugEditorInput(repository, model); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); TaskUiUtil.openEditor(editorInput, BugzillaUiPlugin.NEW_BUG_EDITOR_ID, page); return true; } catch (Exception e) { productPage.applyToStatusLine(new Status(IStatus.ERROR, "not_used", 0, "Problem occured retrieving repository configuration from " + repository.getUrl(), null)); } return false; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/d331f1fefa51a1a082c537398721fbb17db75e0b/NewBugzillaReportWizard.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaReportWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
682,
32,
7469,
3305,
2174,
34,
9417,
87,
273,
16625,
23897,
5621,
309,
261,
72,
18294,
480,
446,
597,
401,
72,
18294,
18,
291,
1921,
10756,
288,
4498,
32,
7469,
3305,
2174,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
682,
32,
7469,
3305,
2174,
34,
9417,
87,
273,
16625,
23897,
5621,
309,
261,
72,
18294,
480,
446,
597,
401,
72,
18294,
18,
291,
1921,
10756,
288,
4498,
32,
7469,
3305,
2174,
34... | |
public org.quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { org.quickfix.field.MaturityDate value = new org.quickfix.field.MaturityDate(); | public quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { quickfix.field.MaturityDate value = new quickfix.field.MaturityDate(); | public org.quickfix.field.MaturityDate getMaturityDate() throws FieldNotFound { org.quickfix.field.MaturityDate value = new org.quickfix.field.MaturityDate(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/MassQuoteAcknowledgement.java/clean/src/java/src/quickfix/fix44/MassQuoteAcknowledgement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
2108,
270,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
460,
273,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
2108,
270,
2336,
1626,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
15947,
2336,
1626,
460,
273,
394,... |
JFaceResources.getFontRegistry().put( fontName, defaultFont.getFontData()); | JFaceResources.getFontRegistry().put(fontName, defaultFont.getFontData()); | private static Font getDefaultFont(Control control) { String fontName = "DEFAULT_FONT_" + control.getClass().getName(); //$NON-NLS-1$ if (JFaceResources.getFontRegistry().hasValueFor(fontName)) return JFaceResources.getFontRegistry().get(fontName); Font cached = control.getFont(); control.setFont(null); Font defaultFont = control.getFont(); control.setFont(cached); JFaceResources.getFontRegistry().put( fontName, defaultFont.getFontData()); return defaultFont; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b55db1f8df03ebade4e59f55f97c8c3917057362/Dialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
10063,
4829,
5711,
12,
3367,
3325,
13,
288,
202,
202,
780,
3512,
461,
273,
315,
5280,
67,
25221,
9548,
397,
3325,
18,
588,
797,
7675,
17994,
5621,
4329,
3993,
17,
5106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10063,
4829,
5711,
12,
3367,
3325,
13,
288,
202,
202,
780,
3512,
461,
273,
315,
5280,
67,
25221,
9548,
397,
3325,
18,
588,
797,
7675,
17994,
5621,
4329,
3993,
17,
5106,
... |
public void constructGraph() | public void constructGraph(JScrollPane pane) | public void constructGraph() { System.out.println("Entered constructGraph"); this.jgraph.addMouseListener(new JGraphMouseAdapter(jgraph, this)); this.topLevel.construct(this, 0); model.insert(cells.toArray(), globalAttributes, cs, null, null); } | 5955 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5955/877cf4399daa658e19a37dd3f1d60fe9394a2de9/GraphStructure.java/buggy/streams/src/streamit/eclipse/grapheditor/graph/GraphStructure.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
4872,
4137,
1435,
202,
95,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
10237,
329,
4872,
4137,
8863,
1082,
202,
2211,
18,
78,
4660,
18,
1289,
9186,
2223,
12,
2704,
804,
413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4872,
4137,
1435,
202,
95,
1082,
202,
3163,
18,
659,
18,
8222,
2932,
10237,
329,
4872,
4137,
8863,
1082,
202,
2211,
18,
78,
4660,
18,
1289,
9186,
2223,
12,
2704,
804,
413... |
} else { if (row*width + col < samples[0].length) { samples[colorMap[cw + (col % cw)]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) row--; else if (col == width) { row++; col = 0; } } } */ if (i == 0) { int colorIndex = (col % cw) + ((row % 2) == 0 ? 0 : cw); samples[colorMap[colorIndex]][row*width + col] = s; col++; if (col == width) { row++; col = 0; | public static void unpackBytes(short[][] samples, int startIndex, byte[] bytes, int[] bitsPerSample, int photoInterp, int[] colorMap, boolean littleEndian, long maxValue, int planar, int strip, int numStrips) throws FormatException { if (planar == 2) { planarUnpack(samples, startIndex, bytes, bitsPerSample, photoInterp, littleEndian, strip, numStrips); return; } int totalBits = 0; for (int i=0; i<bitsPerSample.length; i++) totalBits += bitsPerSample[i]; int sampleCount = 8 * bytes.length / totalBits; if (DEBUG) { debug("unpacking " + sampleCount + " samples (startIndex=" + startIndex + "; totalBits=" + totalBits + "; numBytes=" + bytes.length + ")"); } if (startIndex + sampleCount > samples[0].length) { int trunc = startIndex + sampleCount - samples[0].length; if (DEBUG) debug("WARNING: truncated " + trunc + " extra samples"); sampleCount -= trunc; } int counter = 0; // rules on incrementing the index: // 1) if the planar configuration is set to 1 (interleaved), then add one // to the index // 2) if the planar configuration is set to 2 (separated), then go to // j + (i*(bytes.length / sampleCount)) int bps0 = bitsPerSample[0]; int bpsPow = (int) Math.pow(2, bps0); int numBytes = bps0 / 8; boolean noDiv8 = bps0 % 8 != 0; boolean bps8 = bps0 == 8; int width = 0; int height = 0; if (photoInterp == CFA_ARRAY) { width = colorMap[colorMap.length - 2]; height = colorMap[colorMap.length - 1]; } //int row = startIndex / width, col = 0; int row = 0, col = 0; if (width != 0) row = startIndex / width; int cw = 0; int ch = 0; if (photoInterp == CFA_ARRAY) { byte[] c = new byte[2]; c[0] = (byte) colorMap[0]; c[1] = (byte) colorMap[1]; cw = DataTools.bytesToInt(c, littleEndian); c[0] = (byte) colorMap[2]; c[1] = (byte) colorMap[3]; ch = DataTools.bytesToInt(c, littleEndian); int[] tmp = colorMap; colorMap = new int[tmp.length - 6]; System.arraycopy(tmp, 4, colorMap, 0, colorMap.length); } int index = 0; for (int j=0; j<sampleCount; j++) { for (int i=0; i<samples.length; i++) { if (noDiv8) { // bits per sample is not a multiple of 8 // // while images in this category are not in violation of baseline // TIFF specs, it's a bad idea to write bits per sample values that // aren't divisible by 8 // -- MELISSA TODO -- improve this as time permits if (index == bytes.length) { //throw new FormatException("bad index : i = " + i + ", j = " + j); index--; } short b = bytes[index]; index++; // if (planar == 2) index = j + (i*(bytes.length / samples.length)); // index computed mod bitsPerSample.length to avoid problems with // RGB palette int offset = (bps0 * (samples.length*j + i)) % 8; if (offset <= (8 - (bps0 % 8))) index--; if (i == 0) counter++; if (counter % 4 == 0 && i == 0) index++; int ndx = startIndex + j; short s = (short) (b < 0 ? 256 + b : b); if (photoInterp != CFA_ARRAY) samples[i][ndx] = s; if (photoInterp == WHITE_IS_ZERO || photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); // invert colors } else if (photoInterp == RGB_PALETTE) { int x = (int) (b < 0 ? 256 + b : b); int red = colorMap[x % colorMap.length]; int green = colorMap[(x + bpsPow) % colorMap.length]; int blue = colorMap[(x + 2*bpsPow) % colorMap.length]; int[] components = {red, green, blue}; samples[i][ndx] = (short) components[i]; } else if (photoInterp == CFA_ARRAY) { /* if (i == 0) { if (row % 2 == 0) { if (row*width + col < samples[0].length) { samples[colorMap[col % cw]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) { row++; col -= cw; } else if (col == width) { row += ch; col = 0; } } else { if (row*width + col < samples[0].length) { samples[colorMap[cw + (col % cw)]][row*width + col] = s; } col++; if ((col-1) % cw == (cw - 1) && col != width) row--; else if (col == width) { row++; col = 0; } } } */ if (i == 0) { int colorIndex = (col % cw) + ((row % 2) == 0 ? 0 : cw); samples[colorMap[colorIndex]][row*width + col] = s; col++; if (col == width) { row++; col = 0; } } } } else if (bps8) { // special case handles 8-bit data more quickly //if (planar == 2) { index = j+(i*(bytes.length / samples.length)); } short b = bytes[index]; index++; int ndx = startIndex + j; samples[i][ndx] = (short) (b < 0 ? Integer.MAX_VALUE + b : b); if (photoInterp == WHITE_IS_ZERO) { // invert color value samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } else if (photoInterp == RGB_PALETTE) { index--; int x = (int) (b < 0 ? 256 + b : b); int cndx = i == 0 ? x : (i == 1 ? (x + bpsPow) : (x + 2*bpsPow)); int cm = colorMap[cndx]; samples[i][ndx] = (short) (maxValue == 0 ? (cm % 255) : cm); } else if (photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } else if (photoInterp == Y_CB_CR) { if (i == bitsPerSample.length - 1) { int lumaRed = colorMap[0]; int lumaGreen = colorMap[1]; int lumaBlue = colorMap[2]; int red = (int) (samples[2][ndx]*(2 - 2*lumaRed) + samples[0][ndx]); int blue = (int) (samples[1][ndx]*(2 - 2*lumaBlue) + samples[0][ndx]); int green = (int) (samples[0][ndx] - lumaBlue*blue - lumaRed*red); if (lumaGreen != 0) green = green / lumaGreen; samples[0][ndx] = (short) (red - colorMap[4]); samples[1][ndx] = (short) (green - colorMap[6]); samples[2][ndx] = (short) (blue - colorMap[8]); } } } else { byte[] b = new byte[numBytes]; if (numBytes + index < bytes.length) { System.arraycopy(bytes, index, b, 0, numBytes); } else { System.arraycopy(bytes, bytes.length - numBytes, b, 0, numBytes); } index += numBytes; int ndx = startIndex + j; samples[i][ndx] = (short) DataTools.bytesToLong(b, !littleEndian); if (photoInterp == WHITE_IS_ZERO) { // invert color value long max = 1; for (int q=0; q<numBytes; q++) max *= 8; samples[i][ndx] = (short) (max - samples[i][ndx]); } else if (photoInterp == RGB_PALETTE) { index -= numBytes; int x = samples[i][ndx]; // this is the index into the color table int cndx = i == 0 ? x : (i == 1 ? (x + bpsPow) : (x + 2*bpsPow)); int cm = colorMap[cndx]; samples[i][ndx] = (short) (maxValue == 0 ? (cm % (bpsPow - 1)) : cm); } else if (photoInterp == CMYK) { samples[i][ndx] = (short) (Integer.MAX_VALUE - samples[i][ndx]); } } } if (photoInterp == RGB_PALETTE) index += (bps0 / 8); } } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/d3b7646e2afd5f255f939fc0097e7f8258ed64ef/TiffTools.java/buggy/loci/formats/TiffTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
6167,
2160,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
509,
8526,
2036,
863,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6167,
2160,
12,
6620,
63,
6362,
65,
5216,
16,
509,
10588,
16,
565,
1160,
8526,
1731,
16,
509,
8526,
4125,
2173,
8504,
16,
509,
10701,
2465,
84,
16,
509,
8526,
2036,
863,... | |
protected ITypeInfo usualArithmeticConversions( IASTScope scope, ITypeInfo lhs, ITypeInfo rhs) throws ASTSemanticException{ | protected ITypeInfo usualArithmeticConversions( IASTScope scope, ASTExpression lhsExp, ASTExpression rhsExp) throws ASTSemanticException{ setFilename(lhsExp.getFilename()); ITypeInfo lhs = lhsExp.getResultType().getResult(); ITypeInfo rhs = rhsExp.getResultType().getResult(); | protected ITypeInfo usualArithmeticConversions( IASTScope scope, ITypeInfo lhs, ITypeInfo rhs) throws ASTSemanticException{ if( lhs == null ) return null; if( rhs == null ) return null; // if you have a variable of type basic type, then we need to go to the basic type first while( (lhs.getType() == ITypeInfo.t_type) && (lhs.getTypeSymbol() != null)){ lhs = lhs.getTypeSymbol().getTypeInfo(); } while( (rhs.getType() == ITypeInfo.t_type) && (rhs.getTypeSymbol() != null)){ rhs = rhs.getTypeSymbol().getTypeInfo(); } if( !lhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) || !rhs.isType(ITypeInfo.t__Bool, ITypeInfo.t_enumerator ) ) { handleProblem( scope, IProblem.SEMANTIC_INVALID_CONVERSION_TYPE, null ); } ITypeInfo info = TypeInfoProvider.newTypeInfo( ); if( ( lhs.checkBit(ITypeInfo.isLong) && lhs.getType() == ITypeInfo.t_double) || ( rhs.checkBit(ITypeInfo.isLong) && rhs.getType() == ITypeInfo.t_double) ){ info.setType(ITypeInfo.t_double); info.setBit(true, ITypeInfo.isLong); return info; } else if( ( lhs.getType() == ITypeInfo.t_double ) || ( rhs.getType() == ITypeInfo.t_double ) ){ info.setType(ITypeInfo.t_double); return info; } else if ( ( lhs.getType() == ITypeInfo.t_float ) || ( rhs.getType() == ITypeInfo.t_float ) ){ info.setType(ITypeInfo.t_float); return info; } else { // perform intergral promotions (Specs section 4.5) info.setType(ITypeInfo.t_int); } if( ( lhs.checkBit(ITypeInfo.isUnsigned) && lhs.checkBit(ITypeInfo.isLong)) || ( rhs.checkBit(ITypeInfo.isUnsigned) && rhs.checkBit(ITypeInfo.isLong)) ){ info.setBit(true, ITypeInfo.isUnsigned); info.setBit(true, ITypeInfo.isLong); return info; } else if( ( lhs.checkBit(ITypeInfo.isUnsigned) && rhs.checkBit(ITypeInfo.isLong) ) || ( rhs.checkBit(ITypeInfo.isUnsigned) && lhs.checkBit(ITypeInfo.isLong) ) ){ info.setBit(true, ITypeInfo.isUnsigned); info.setBit(true, ITypeInfo.isLong); return info; } else if ( ( lhs.checkBit(ITypeInfo.isLong)) || ( rhs.checkBit(ITypeInfo.isLong)) ){ info.setBit(true, ITypeInfo.isLong); return info; } else if ( ( lhs.checkBit(ITypeInfo.isUnsigned) ) || ( rhs.checkBit(ITypeInfo.isUnsigned) ) ){ info.setBit(true, ITypeInfo.isUnsigned); return info; } else { // it should be both = int return info; } } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/05788b249420108207a100e40c01641b1faf7062/CompleteParseASTFactory.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/CompleteParseASTFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
17305,
25669,
686,
16368,
29287,
12,
467,
9053,
3876,
2146,
16,
467,
17305,
8499,
16,
467,
17305,
7711,
13,
1216,
9183,
13185,
9941,
503,
95,
202,
202,
430,
12,
8499,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
17305,
25669,
686,
16368,
29287,
12,
467,
9053,
3876,
2146,
16,
467,
17305,
8499,
16,
467,
17305,
7711,
13,
1216,
9183,
13185,
9941,
503,
95,
202,
202,
430,
12,
8499,
422,... |
PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = 0; | drawCompositeImage(size.x, size.y); | public ImageData getImageData() { Point size = getSize(); RGB black = new RGB(0, 0, 0); RGB[] rgbs = new RGB[256]; rgbs[0] = black; // transparency rgbs[1] = black; // black PaletteData dataPalette = new PaletteData(rgbs); imageData = new ImageData(size.x, size.y, 8, dataPalette); imageData.transparentPixel = 0; drawCompositeImage(size.x, size.y); for (int i = 0; i < rgbs.length; i++) { if (rgbs[i] == null) { rgbs[i] = black; } } return imageData; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/e3dd797feef0e8d8e6d4e9d98c04b37c34c84ac0/CompositeImageDescriptor.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/resource/CompositeImageDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
751,
10567,
751,
1435,
288,
3639,
4686,
963,
273,
9950,
5621,
3639,
11510,
7721,
273,
394,
11510,
12,
20,
16,
374,
16,
374,
1769,
3639,
11510,
8526,
14524,
2038,
273,
394,
115... |
Element simpleContentDecl, ComplexTypeInfo typeInfo) | Element simpleContentDecl, ComplexTypeInfo typeInfo) | private void traverseSimpleContentDecl(int typeNameIndex, Element simpleContentDecl, ComplexTypeInfo typeInfo) throws Exception { String typeName = fStringPool.toString(typeNameIndex); // ----------------------------------------------------------------------- // Get attributes. // ----------------------------------------------------------------------- String simpleContentTypeId = simpleContentDecl.getAttribute(SchemaSymbols.ATTVAL_ID); // ----------------------------------------------------------------------- // Set the content type to be simple, and initialize content spec handle // ----------------------------------------------------------------------- typeInfo.contentType = XMLElementDecl.TYPE_SIMPLE; typeInfo.contentSpecHandle = -1; Element simpleContent = checkContent(simpleContentDecl, XUtil.getFirstChildElement(simpleContentDecl),false); // If there are no children, return if (simpleContent==null) { throw new ComplexTypeRecoverableError(); } // ----------------------------------------------------------------------- // The content should be either "restriction" or "extension" // ----------------------------------------------------------------------- String simpleContentName = simpleContent.getLocalName(); if (simpleContentName.equals(SchemaSymbols.ELT_RESTRICTION)) typeInfo.derivedBy = SchemaSymbols.RESTRICTION; else if (simpleContentName.equals(SchemaSymbols.ELT_EXTENSION)) typeInfo.derivedBy = SchemaSymbols.EXTENSION; else { throw new ComplexTypeRecoverableError( "The content of the simpleContent element is invalid. The " + "content must be RESTRICTION or EXTENSION"); } // ----------------------------------------------------------------------- // Get the attributes of the restriction/extension element // ----------------------------------------------------------------------- String base = simpleContent.getAttribute(SchemaSymbols.ATT_BASE); String typeId = simpleContent.getAttribute(SchemaSymbols.ATTVAL_ID); // ----------------------------------------------------------------------- // Skip over any annotations in the restriction or extension elements // todo - check whether the content can be empty... // ----------------------------------------------------------------------- Element content = checkContent(simpleContent, XUtil.getFirstChildElement(simpleContent),true); // ----------------------------------------------------------------------- // Handle the base type name // ----------------------------------------------------------------------- if (base.length() == 0) { throw new ComplexTypeRecoverableError( "The BASE attribute must be specified for the " + "RESTRICTION or EXTENSION element"); } QName baseQName = parseBase(base); // check if we're extending a simpleType which has a "final" setting which precludes this Integer finalValue = (baseQName.uri == StringPool.EMPTY_STRING? ((Integer)fSimpleTypeFinalRegistry.get(fStringPool.toString(baseQName.localpart))): ((Integer)fSimpleTypeFinalRegistry.get(fStringPool.toString(baseQName.uri) + "," +fStringPool.toString(baseQName.localpart)))); if(finalValue != null && (finalValue.intValue() == typeInfo.derivedBy)) throw new ComplexTypeRecoverableError( "The simpleType " + base + " that " + typeName + " uses has a value of \"final\" which does not permit extension"); processBaseTypeInfo(baseQName,typeInfo); // check that the base isn't a complex type with complex content if (typeInfo.baseComplexTypeInfo != null) { if (typeInfo.baseComplexTypeInfo.contentSpecHandle > -1) { throw new ComplexTypeRecoverableError( "The type '"+ base +"' specified as the " + "base in the simpleContent element must not have complexContent"); } } // ----------------------------------------------------------------------- // Process the content of the derivation // ----------------------------------------------------------------------- Element attrNode = null; // // RESTRICTION // if (typeInfo.derivedBy==SchemaSymbols.RESTRICTION) { // //Schema Spec : 5.11: Complex Type Definition Properties Correct : 2 // if (typeInfo.baseDataTypeValidator != null) { throw new ComplexTypeRecoverableError( "The type '" + base +"' is a simple type. It cannot be used in a "+ "derivation by RESTRICTION for a complexType"); } else { typeInfo.baseDataTypeValidator = typeInfo.baseComplexTypeInfo.datatypeValidator; } // ----------------------------------------------------------------------- // There may be a simple type definition in the restriction element // The data type validator will be based on it, if specified // ----------------------------------------------------------------------- if (content.getLocalName().equals(SchemaSymbols.ELT_SIMPLETYPE )) { int simpleTypeNameIndex = traverseSimpleTypeDecl(content); if (simpleTypeNameIndex!=-1) { typeInfo.baseDataTypeValidator=fDatatypeRegistry.getDatatypeValidator( fStringPool.toString(simpleTypeNameIndex)); content = XUtil.getNextSiblingElement(content); } else { throw new ComplexTypeRecoverableError(); } } // // Build up facet information // int numEnumerationLiterals = 0; int numFacets = 0; Hashtable facetData = new Hashtable(); Vector enumData = new Vector(); Element child; //REVISIT: there is a better way to do this, for (child = content; child != null && (child.getLocalName().equals(SchemaSymbols.ELT_MINEXCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MININCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MAXEXCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_MAXINCLUSIVE) || child.getLocalName().equals(SchemaSymbols.ELT_TOTALDIGITS) || child.getLocalName().equals(SchemaSymbols.ELT_FRACTIONDIGITS) || child.getLocalName().equals(SchemaSymbols.ELT_LENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_MINLENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_MAXLENGTH) || child.getLocalName().equals(SchemaSymbols.ELT_PERIOD) || child.getLocalName().equals(SchemaSymbols.ELT_DURATION) || child.getLocalName().equals(SchemaSymbols.ELT_ENUMERATION) || child.getLocalName().equals(SchemaSymbols.ELT_PATTERN) || child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)); child = XUtil.getNextSiblingElement(child)) { if ( child.getNodeType() == Node.ELEMENT_NODE ) { Element facetElt = (Element) child; numFacets++; if (facetElt.getLocalName().equals(SchemaSymbols.ELT_ENUMERATION)) { numEnumerationLiterals++; enumData.addElement(facetElt.getAttribute(SchemaSymbols.ATT_VALUE)); //Enumerations can have annotations ? ( 0 | 1 ) Element enumContent = XUtil.getFirstChildElement( facetElt ); if( enumContent != null && enumContent.getLocalName().equals ( SchemaSymbols.ELT_ANNOTATION )){ traverseAnnotationDecl( child ); } // TO DO: if Jeff check in new changes to TraverseSimpleType, copy them over } else { facetData.put(facetElt.getLocalName(), facetElt.getAttribute( SchemaSymbols.ATT_VALUE )); } } } // end of for loop thru facets if (numEnumerationLiterals > 0) { facetData.put(SchemaSymbols.ELT_ENUMERATION, enumData); } // // If there were facets, create a new data type validator, otherwise // the data type validator is from the base // if (numFacets > 0) { typeInfo.datatypeValidator = fDatatypeRegistry.createDatatypeValidator( typeName, typeInfo.baseDataTypeValidator, facetData, false); } else typeInfo.datatypeValidator = typeInfo.baseDataTypeValidator; if (child != null) { // // Check that we have attributes // if (!isAttrOrAttrGroup(child)) { throw new ComplexTypeRecoverableError( "Invalid child in the RESTRICTION element of simpleContent"); } else attrNode = child; } } // end RESTRICTION // // EXTENSION // else { if (typeInfo.baseComplexTypeInfo != null) typeInfo.baseDataTypeValidator = typeInfo.baseComplexTypeInfo.datatypeValidator; typeInfo.datatypeValidator = typeInfo.baseDataTypeValidator; // // Look for attributes // if (content != null) { // // Check that we have attributes // if (!isAttrOrAttrGroup(content)) { throw new ComplexTypeRecoverableError( "Only annotations and attributes are allowed in the " + "content of an EXTENSION element for a complexType with simpleContent"); } else { attrNode = content; } } } // ----------------------------------------------------------------------- // add a template element to the grammar element decl pool for the type // ----------------------------------------------------------------------- int templateElementNameIndex = fStringPool.addSymbol("$"+typeName); typeInfo.templateElementIndex = fSchemaGrammar.addElementDecl( new QName(-1, templateElementNameIndex,typeNameIndex,fTargetNSURI), (fTargetNSURI==StringPool.EMPTY_STRING) ? StringPool.EMPTY_STRING : fCurrentScope, typeInfo.scopeDefined, typeInfo.contentType, typeInfo.contentSpecHandle, -1, typeInfo.datatypeValidator); typeInfo.attlistHead = fSchemaGrammar.getFirstAttributeDeclIndex( typeInfo.templateElementIndex); // ----------------------------------------------------------------------- // Process attributes // ----------------------------------------------------------------------- processAttributes(attrNode,baseQName,typeInfo); if (XUtil.getNextSiblingElement(simpleContent) != null) throw new ComplexTypeRecoverableError( "Invalid child following the RESTRICTION or EXTENSION element in the " + "complex type definition"); } // end traverseSimpleContentDecl | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/87731f2b2070ba79da173a5e6be82410b096d7c5/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10080,
5784,
1350,
3456,
12,
474,
8173,
1016,
16,
9079,
3010,
4143,
1350,
3456,
16,
16060,
17305,
23112,
13,
7734,
1216,
1185,
288,
7734,
514,
8173,
273,
284,
780,
2864,
18,
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,
3238,
918,
10080,
5784,
1350,
3456,
12,
474,
8173,
1016,
16,
9079,
3010,
4143,
1350,
3456,
16,
16060,
17305,
23112,
13,
7734,
1216,
1185,
288,
7734,
514,
8173,
273,
284,
780,
2864,
18,
10... |
public FileSystemException(String message, Throwable rootCause) { super(message, rootCause); | public FileSystemException() { super(); | public FileSystemException(String message, Throwable rootCause) { super(message, rootCause); } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/84980248fe61e869a89a4315c794e4f128cc7ba2/FileSystemException.java/buggy/src/java/org/apache/jackrabbit/jcr/fs/FileSystemException.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10931,
503,
12,
780,
883,
16,
4206,
1365,
10683,
13,
288,
202,
9565,
12,
2150,
16,
1365,
10683,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10931,
503,
12,
780,
883,
16,
4206,
1365,
10683,
13,
288,
202,
9565,
12,
2150,
16,
1365,
10683,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else if ( (LA28_0==ID) ) { alt28=2; | else if ( (LA27_0==ID) ) { alt27=2; | public BaseDescr fact_expression(String id) throws RecognitionException { BaseDescr pd = null; BaseDescr fe = null; BaseDescr f = null; pd = null; boolean multi = false; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ) int alt28=2; int LA28_0 = input.LA(1); if ( (LA28_0==LEFT_PAREN) ) { alt28=1; } else if ( (LA28_0==ID) ) { alt28=2; } else { if (backtracking>0) {failed=true; return pd;} NoViableAltException nvae = new NoViableAltException("900:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );", 28, 0, input); throw nvae; } switch (alt28) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:905:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression1771); if (failed) return pd; pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression1775); fe=fact_expression_in_paren(id); _fsp--; if (failed) return pd; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact_expression1778); if (failed) return pd; if ( backtracking==0 ) { pd=fe; } } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:906:6: f= fact { pushFollow(FOLLOW_fact_in_fact_expression1789); f=fact(); _fsp--; if (failed) return pd; if ( backtracking==0 ) { ((ColumnDescr)f).setIdentifier( id ); pd = f; } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return pd; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/afea9f80e7c11e7b76df18f232d3b5ca5ad21e72/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
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,
3360,
16198,
5410,
67,
8692,
12,
780,
612,
13,
1216,
9539,
288,
6647,
3360,
16198,
4863,
273,
446,
31,
3639,
3360,
16198,
1656,
273,
446,
31,
3639,
3360,
16198,
284,
273,
446,
31,
... |
additionalForms.add(expectationFormId); | additionalForms.add(expectationFormId.getValue()); | protected void runMatrixMigration(Connection con, boolean isDeveloper) throws JobExecutionException { logger.info("Quartz task started: runMatrixMigration()"); String tableName = getOldTableName("osp_scaffolding"), tableName2 = null, tableName3 = null; String sql = "select * from " + tableName; try { List additionalForms = new ArrayList(); additionalForms.add(expectationFormId); Statement matrixInnerStmt = con.createStatement(), innerStmt = con.createStatement(); stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); try { while (rs.next()) { String id = rs.getString("id"); String owner = rs.getString("ownerid"); String title = rs.getString("title"); String description = rs.getString("description"); String documentRoot = rs.getString("documentroot"); String privacyxsdid = rs.getString("privacyxsdid"); String worksite = rs.getString("worksiteId"); boolean published = rs.getBoolean("published"); String publishedBy = rs.getString("publishedBy"); Date publishedDate = rs.getDate("publishedDate"); String columnLabel = ""; //rs.getString("columnLabel"); String rowLabel = ""; //rs.getString("rowLabel"); String readyColor = ""; //rs.getString("readyColor"); String pendingColor = ""; //rs.getString("pendingColor"); String completedColor = ""; //rs.getString("completedColor"); String lockColor = ""; //rs.getString("lockColor"); int workflowOption = Scaffolding.HORIZONTAL_PROGRESSION; //rs.getInt("workflowOption"); String exposed_page_id = ""; //rs.getString("exposed_page_id"); String style_id = ""; //rs.getString("style_id"); Scaffolding scaffolding = new Scaffolding(); Id sid = idManager.getId(id); scaffolding.setId(null); scaffolding.setNewId(sid); scaffolding.setOwner(agentManager.getAgent(owner)); scaffolding.setTitle(title); scaffolding.setDescription(description); scaffolding.setWorksiteId(idManager.getId(worksite)); scaffolding.setPublished(published); if(publishedBy != null) scaffolding.setPublishedBy(agentManager.getAgent(publishedBy)); scaffolding.setColumnLabel(columnLabel); scaffolding.setPublishedDate(publishedDate); scaffolding.setRowLabel(rowLabel); scaffolding.setReadyColor(readyColor); scaffolding.setPendingColor(pendingColor); scaffolding.setCompletedColor(completedColor); scaffolding.setLockedColor(lockColor); scaffolding.setWorkflowOption(workflowOption); scaffolding.setExposedPageId(exposed_page_id); Style style = null; //new Style(); //style.setId(idManager.getId(style_id)); scaffolding.setStyle(style); //***************** run through the criteria tableName = getOldTableName("osp_scaffolding_criteria"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where parent_id='" + id + "' order by seq_num"; ResultSet rss = innerStmt.executeQuery(sql); Map criteriaMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Criterion criterion = new Criterion(); criterion.setId(null); criterion.setNewId(lid); criterion.setColor(color); criterion.setTextColor(textColor); criterion.setScaffolding(scaffolding); criterion.setDescription(ldescription); criterion.setSequenceNumber(sequenceNumber); scaffolding.add(criterion); criteriaMap.put(lid.getValue(), criterion); } rss.close(); //***************** run through the levels tableName = getOldTableName("osp_scaffolding_levels"); tableName2 = getOldTableName("osp_matrix_label"); sql = "select * from " + tableName + " join " + tableName2 + " on ELT=ID" + " where scaffolding_id='" + id + "' order by seq_num"; rss = innerStmt.executeQuery(sql); Map levelMap = new HashMap(); while (rss.next()) { int sequenceNumber = rss.getInt("seq_num"); Id lid = idManager.getId(rss.getString("elt")); String color = rss.getString("color"); String textColor = null; String ldescription = rss.getString("description"); Level level = new Level(); level.setId(null); level.setNewId(lid); level.setColor(color); level.setTextColor(textColor); level.setScaffolding(scaffolding); level.setDescription(ldescription); level.setSequenceNumber(sequenceNumber); scaffolding.add(level); levelMap.put(lid.getValue(), level); } rss.close(); //***************** run through the cells tableName = getOldTableName("osp_scaffolding_cell"); sql = "select * from " + tableName + " where scaffolding_id='" + id + "' "; rss = innerStmt.executeQuery(sql); Map scaffoldingCellMap = new HashMap(); Map scaffoldingCellExpheadMap = new HashMap(); while (rss.next()) { Id cid = idManager.getId(rss.getString("id")); String criterionStr = rss.getString("rootcriterion_id"); String levelStr = rss.getString("level_id"); String expectationheader = rss.getString("expectationheader"); String initialStatus = rss.getString("initialstatus"); String gradablereflection = rss.getString("gradablereflection"); Level level = (Level)levelMap.get(levelStr); Criterion criterion = (Criterion)criteriaMap.get(criterionStr); ScaffoldingCell cell = new ScaffoldingCell(); cell.setId(null); cell.setNewId(cid); cell.setInitialStatus(initialStatus); cell.setLevel(level); cell.setRootCriterion(criterion); cell.setScaffolding(scaffolding); WizardPageDefinition page = cell.getWizardPageDefinition(); page.setSiteId(worksite); page.setTitle( (criterion.getDescription() != null ? criterion.getDescription() : "") + " - " + (level.getDescription() != null ? level.getDescription() : "")); cell.setEvaluationDevice(evaluationFormId); cell.setEvaluationDeviceType(FORM_TYPE); cell.setReflectionDevice(intelGrowthFormId); cell.setReflectionDeviceType(FORM_TYPE); cell.setReviewDevice(feedbackFormId); cell.setReviewDeviceType(FORM_TYPE); cell.setAdditionalForms(additionalForms); scaffolding.add(cell); scaffoldingCellMap.put(cid.getValue(), cell); scaffoldingCellExpheadMap.put(cid.getValue(), expectationheader); } rss.close(); Id scaffId = (Id)matrixManager.save(scaffolding); scaffolding = matrixManager.getScaffolding(scaffId); tableName = getOldTableName("osp_scaffolding_cell"); tableName2 = getOldTableName("osp_expectation"); tableName3 = getOldTableName("osp_matrix_label"); sql = "select SCAFFOLDING_CELL_ID, " + tableName3 + ".ID, DESCRIPTION " + " FROM " + tableName + " JOIN " + tableName2 + " ON " + tableName + ".ID=SCAFFOLDING_CELL_ID " + " JOIN " + tableName3 + " ON ELT=" + tableName3 + ".ID " + " where scaffolding_id='" + id + "' ORDER BY SCAFFOLDING_CELL_ID, SEQ_NUM"; rss = innerStmt.executeQuery(sql); String lastScaffoldingCellId = "", guidanceText = null, scaffoldingCellId = null; while (rss.next()) { scaffoldingCellId = rss.getString("SCAFFOLDING_CELL_ID"); if(!scaffoldingCellId.equals(lastScaffoldingCellId)) { if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(lastScaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); /* description, idManager.getId(worksite), securityQualifier, securityViewFunction, securityEditFunction);*/ guidanceManager.saveGuidance(guide); scell.setGuidance(guide); } lastScaffoldingCellId = scaffoldingCellId; //starts a new cell String expHeader = (String)scaffoldingCellExpheadMap.get(scaffoldingCellId); guidanceText = expHeader + "\n<ul>"; } if(guidanceText.length() > 0) guidanceText += "\n<br />"; guidanceText += "<li>" + rss.getString("DESCRIPTION") + "</li>"; } rss.close(); if(guidanceText != null) { ScaffoldingCell scell = (ScaffoldingCell)scaffoldingCellMap.get(scaffoldingCellId); Guidance guide = guidanceManager.createNew( "", worksite, scell.getWizardPageDefinition().getId(), MatrixFunctionConstants.VIEW_SCAFFOLDING_GUIDANCE, MatrixFunctionConstants.EDIT_SCAFFOLDING_GUIDANCE); guidanceText += "</ul>"; guide.getInstruction().setText(guidanceText); guidanceManager.saveGuidance(guide); scell.setGuidance(guide); } scaffId = (Id)matrixManager.save(scaffolding); //***************** run through the user matrices tableName = getOldTableName("osp_matrix_tool"); tableName2 = getOldTableName("osp_matrix"); tableName3 = getOldTableName("osp_matrix_cell"); sql = "select " + tableName3 + ".id, matrix_id, owner, status, reflection_id, scaffolding_cell_id " + " from " + tableName + " join " + tableName2 + " on matrixtool_id=" + tableName + ".id " + " join " + tableName3 + " on matrix_id=" + tableName2 + ".id " + " where scaffolding_id='" + id + "' order by owner"; rss = innerStmt.executeQuery(sql); tableName = getOldTableName("osp_reflection"); tableName2 = getOldTableName("osp_reflection_item"); tableName3 = getOldTableName("osp_reviewer_item"); String lastOwner = ""; Matrix matrix = null; boolean badCell = false; int intelGrowthIndex = 1; while (rss.next()) { String mcidStr = rss.getString("id"); Id mcid = idManager.getId(mcidStr); String mowner = rss.getString("owner"); String status = rss.getString("status"); String scaffolding_cell_id = rss.getString("scaffolding_cell_id"); if(!mowner.equals(lastOwner)) { if(matrix != null && !badCell) matrixManager.save(matrix); lastOwner = mowner; badCell = false; matrix = new Matrix(); matrix.setOwner(agentManager.getAgent(mowner)); matrix.setScaffolding(scaffolding); } badCell = scaffolding_cell_id == null; if(!badCell) { ScaffoldingCell sCell = (ScaffoldingCell)scaffoldingCellMap.get(scaffolding_cell_id); Cell cell = new Cell(); cell.setNewId(mcid); cell.getWizardPage().setOwner(matrix.getOwner()); cell.setScaffoldingCell(sCell); cell.setStatus(status); Set attachments = new HashSet(); String cellAttachmentTable = getOldTableName("osp_cell_attachment"); sql = "select * from " + cellAttachmentTable + " where cell_id='" + mcidStr + "'"; ResultSet rsCellFiles = matrixInnerStmt.executeQuery(sql); while(rsCellFiles.next()) { String artifact = rsCellFiles.getString("artifactId"); Attachment att = new Attachment(); att.setArtifactId(idManager.getId(artifact)); attachments.add(att); } cell.setAttachments(attachments); rsCellFiles.close(); // get the intellectual growth sql = "SELECT ID, GROWTHSTATEMENT FROM " + tableName + " WHERE CELL_ID='" + mcidStr + "'"; ResultSet rsss = matrixInnerStmt.executeQuery(sql); if(rsss.next()) { String reflection_id = rsss.getString(1); String growth = rsss.getString(2); // save the intellectual growth Integer anId = incUser(matrix.getOwner().getId().getValue()); Id reflectionForm = createReflectionForm(matrix.getOwner().getId().getValue(), "IntGrowth " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), growth); Review review = reviewManager.createNew("", worksite); review.setDeviceId(intelGrowthFormId.getValue());// form idvalue review.setParent(cell.getWizardPage().getId().getValue());// wizard page review.setType(Review.REFLECTION_TYPE);//contant review.setReviewContent(reflectionForm); getReviewManager().saveReview(review); sql = "SELECT CONNECTTEXT, EVIDENCE FROM " + tableName2 + " WHERE REFLECTION_ID='" + reflection_id + "' ORDER BY SEQ_NUM"; rsss = matrixInnerStmt.executeQuery(sql); Set pageForms = new HashSet(); while(rsss.next()) { String connect_text = rsss.getString("CONNECTTEXT"); String evidence = rsss.getString("EVIDENCE"); // save the expectation anId = incUser(matrix.getOwner().getId().getValue()); Id expectationForm = createExpectationForm(matrix.getOwner().getId().getValue(), "Reflection " + scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), evidence, connect_text); pageForms.add(expectationForm); } cell.getWizardPage().setPageForms(pageForms); } rsss.close(); // sql = "SELECT ID, REVIEWER_ID, COMMENTS, GRADE, STATUS, CREATED, MODIFIED FROM " + tableName3 + " WHERE CELL_ID='" + mcidStr + "'"; rsss = matrixInnerStmt.executeQuery(sql); while(rsss.next()) { String riid = rsss.getString("ID"); String reviewer_id = rsss.getString("REVIEWER_ID"); String comment = rsss.getString("COMMENTS"); String grade = rsss.getString("GRADE"); String ri_status = rsss.getString("STATUS"); String ri_created = rsss.getString("CREATED"); String ri_modified = rsss.getString("MODIFIED"); // save the Reviews Integer anId = incUser(reviewer_id); Id evaluationForm = createEvaluationForm(reviewer_id, "Review "+ scaffolding.getTitle() + " " + sCell.getRootCriterion().getDescription() + " " + sCell.getLevel().getDescription() + " - " + anId.toString(), grade, comment); Review review = reviewManager.createNew("", worksite); review.setDeviceId(evaluationFormId.getValue());// form idvalue review.setParent(cell.getWizardPage().getId().getValue());// wizard page review.setType(Review.EVALUATION_TYPE);//contant review.setReviewContent(evaluationForm); getReviewManager().saveReview(review); } rsss.close(); matrix.add(cell); } } // end while(rss.next()) rss.close(); if(matrix != null && !badCell) matrixManager.save(matrix); } } finally { rs.close(); } } catch (Exception e) { logger.error("error selecting data with this sql: " + sql); logger.error("", e); throw new JobExecutionException(e); } finally { try { stmt.close(); } catch (Exception e) { } } logger.info("Quartz task fininshed: runMatrixMigration()"); } | 48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/d732cf646be49dbf06b5b767d5f721620406860a/OspMigrationJob.java/clean/migration/api-impl/src/java/org/theospi/portfolio/migration/OspMigrationJob.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1086,
4635,
10224,
12,
1952,
356,
16,
1250,
353,
28145,
13,
1216,
3956,
14576,
288,
1377,
1194,
18,
1376,
2932,
12099,
94,
1562,
5746,
30,
1086,
4635,
10224,
1435,
8863,
5411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
1086,
4635,
10224,
12,
1952,
356,
16,
1250,
353,
28145,
13,
1216,
3956,
14576,
288,
1377,
1194,
18,
1376,
2932,
12099,
94,
1562,
5746,
30,
1086,
4635,
10224,
1435,
8863,
5411,
... |
" ^^^^^^^^^^^\n" + | " ^^^^^^^^^^^\n" + | public void test0988() { this.runNegativeTest( new String[] { "X.java",//=================== "public class X {\n" + " void bar(GLinkElementView<?,?> g) {\n" + " g.getViewer();\n" + " }\n" + "}\n" + "\n" + "abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + "\n" + "abstract class AbstractLinkView<M> extends AbstractConnectionEditPart implements ILinkViewElement, IModelChangeListener {\n" + " @Override\n" + " public SheetViewer getViewer() { return null; } \n" + "}\n" + "\n" + "abstract class AbstractConnectionEditPart extends AbstractGraphicalEditPart implements ConnectionEditPart {}\n" + "\n" + "abstract class AbstractGraphicalEditPart extends AbstractEditPart implements GraphicalEditPart {}\n" + "\n" + "abstract class AbstractEditPart implements EditPart {\n" + " public EditPartViewer getViewer() { return null; }\n" + "}\n" + "\n" + "interface ILinkViewElement extends INodeViewElement {\n" + " public ISheetViewer getViewer();\n" + "}\n" + "\n" + "class SheetViewer implements ISheetViewer {}\n" + "\n" + "interface ISheetViewer {}\n" + "\n" + "interface EditPart {\n" + " EditPartViewer getViewer();\n" + "}\n" + "\n" + "interface ConnectionEditPart extends GraphicalEditPart {}\n" + "interface GraphicalEditPart extends EditPart {}\n" + "interface EditPartViewer {}\n" + "interface IModelChangeListener {}\n" + "\n" + "interface INodeViewElement {\n" + " public ISheetViewer getViewer();\n" + "}", // ================= }, "----------\n" + "1. ERROR in X.java (at line 7)\n" + " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + " ^^^^^^^^^^^^^^^^\n" + "The return type is incompatible with AbstractEditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + "----------\n" + "2. ERROR in X.java (at line 11)\n" + " public SheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^\n" + "The return type is incompatible with AbstractEditPart.getViewer()\n" + "----------\n");} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/30a989f2410943e7f57d79a197cf0ec585ffc59e/GenericTypeTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
5908,
5482,
1435,
288,
202,
2211,
18,
2681,
14959,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
759,
2429,
12275,
9506,
202,
6,
482,
667,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
5908,
5482,
1435,
288,
202,
2211,
18,
2681,
14959,
4709,
12,
1082,
202,
2704,
514,
8526,
288,
9506,
202,
6,
60,
18,
6290,
3113,
759,
2429,
12275,
9506,
202,
6,
482,
667,
113... |
{ List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | { List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | private void writeInheritedMethods( DocElement element ) { List props = element.getInheritedMethods( ); if ( props.isEmpty( ) ) return; writeSectionHeader( "Inherited Methods" ); writeln( "<p class=\"section-text\">" ); Iterator iter = props.iterator( ); while ( iter.hasNext( ) ) { PropertyDefn method = (PropertyDefn) iter.next( ); write( makeMemberReference( null, method.definedBy( ).getName( ), METHOD_NAME, method.getName( ) ) ); if ( iter.hasNext( ) ) writeln( ", " ); } writeln( "</p>" ); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/2012a7e6d8d91844c6c396ee5b7b69a4345dea99/Generator.java/clean/model/org.eclipse.birt.report.model/romdoc/src/org/eclipse/birt/doc/romdoc/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
29078,
4712,
12,
3521,
1046,
930,
262,
202,
95,
202,
202,
682,
3458,
273,
930,
18,
588,
29078,
4712,
12,
11272,
202,
202,
430,
261,
3458,
18,
291,
1921,
12,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1045,
29078,
4712,
12,
3521,
1046,
930,
262,
202,
95,
202,
202,
682,
3458,
273,
930,
18,
588,
29078,
4712,
12,
11272,
202,
202,
430,
261,
3458,
18,
291,
1921,
12,
262,
... |
asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); | asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffsetAsInt(), S0); | private static void storeParameters(VM_Assembler asm, int frameSize, VM_Method method, VM_Class klass) { int nextOSArgReg, nextOSArgFloatReg, nextVMArgReg, nextVMArgFloatReg; // offset to the spill area in the callee (OS frame): int spillOffsetOS; if (VM.BuildForPowerOpenABI || VM.BuildForMachOABI) { // 1st spill = JNIEnv, 2nd spill = class spillOffsetOS = NATIVE_FRAME_HEADER_SIZE + 2*BYTES_IN_STACKSLOT; } else if (VM.BuildForSVR4ABI) { spillOffsetOS = NATIVE_FRAME_HEADER_SIZE; } else { if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED); } // offset to the spill area in the caller (RVM frame), relative to the callee's FP int spillOffsetVM = frameSize + STACKFRAME_HEADER_SIZE; // does NOT include implicit this or class ptr VM_TypeReference[] types = method.getParameterTypes(); // Set up the Reference table for GC // PR <- JREFS array base asm.emitLAddr(PROCESSOR_REGISTER, VM_Entrypoints.JNIRefsField.getOffset(), S0); // TI <- JREFS current top asm.emitLInt(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); // JREFS offset for current TOP asm.emitADD(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // convert into address // TODO - count number of refs // TODO - emit overflow check for JNIRefs array // start a new JNIRefs frame on each transition from Java to native C // push current SavedFP ptr onto top of JNIRefs stack (use available S1 reg as a temp) // and make current TOP the new savedFP // asm.emitLInt (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); asm.emitSTWU (S1, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // push prev frame ptr onto JNIRefs array asm.emitSUBFC(S1, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for new TOP asm.emitSTW (S1, VM_Entrypoints.JNIRefsSavedFPField.getOffset(), S0); // save new TOP as new frame ptr in JNIEnv // for static methods: caller has placed args in r3,r4,... // for non-static methods:"this" ptr is in r3, and args start in r4,r5,... // // for static methods: for nonstatic methods: // Java caller OS callee Java caller OS callee // ----------- ---------- ----------- ---------- // spill = arg11 -> new spill spill = arg11 -> new spill // spill = arg10 -> new spill spill = arg10 -> new spill // spill = arg9 -> new spill // spill = arg9 -> new spill // spill = arg8 -> new spill spill = arg8 -> new spill // R10 = arg7 -> new spill spill = arg7 -> new spill // R9 = arg6 -> new spill R10 = arg6 -> new spill // // R8 = arg5 -> R10 R9 = arg5 -> R10 // R7 = arg4 -> R9 R8 = arg4 -> R9 // R6 = arg3 -> R8 R7 = arg3 -> R8 // R5 = arg2 -> R7 R6 = arg2 -> R7 // R4 = arg1 -> R6 R5 = arg1 -> R6 // R3 = arg0 -> R5 R4 = arg0 -> R5 // R4 = class R3 = this -> R4 // R3 = JNIenv R3 = JNIenv // nextOSArgFloatReg = FIRST_OS_PARAMETER_FPR; nextVMArgFloatReg = FIRST_VOLATILE_FPR; nextOSArgReg = FIRST_OS_PARAMETER_GPR + 2; // 1st reg = JNIEnv, 2nd reg = class/this if (method.isStatic()) { nextVMArgReg = FIRST_VOLATILE_GPR; } else { nextVMArgReg = FIRST_VOLATILE_GPR+1; // 1st reg = this, to be processed separately } // The loop below assumes the following relationship: if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_FPR==FIRST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_FPR<=LAST_VOLATILE_FPR); if (VM.VerifyAssertions) VM._assert(FIRST_OS_PARAMETER_GPR==FIRST_VOLATILE_GPR); if (VM.VerifyAssertions) VM._assert(LAST_OS_PARAMETER_GPR<=LAST_VOLATILE_GPR); generateParameterPassingCode(asm, types, nextVMArgReg, nextVMArgFloatReg, spillOffsetVM, nextOSArgReg, nextOSArgFloatReg, spillOffsetOS ); // Now add the 2 JNI parameters: JNI environment and Class or "this" object // if static method, append ref for class, else append ref for "this" // and pass offset in JNIRefs array in r4 (as second arg to called native code) int SECOND_OS_PARAMETER_GPR = FIRST_OS_PARAMETER_GPR+1; if (method.isStatic()) { klass.getClassForType(); // ensure the Java class object is created // ASSMPTION: JTOC saved above in JNIEnv is still valid, // used by following emitLAddrToc asm.emitLAddrToc(SECOND_OS_PARAMETER_GPR, klass.getTibOffset()); // r4 <= TIB asm.emitLAddr(SECOND_OS_PARAMETER_GPR, TIB_TYPE_INDEX, SECOND_OS_PARAMETER_GPR); // r4 <= VM_Type asm.emitLAddr(SECOND_OS_PARAMETER_GPR, VM_Entrypoints.classForTypeField.getOffset(), SECOND_OS_PARAMETER_GPR); // r4 <- java.lang.Class asm.emitSTAddrU (SECOND_OS_PARAMETER_GPR, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append class ptr to end of JNIRefs array asm.emitSUBFC(SECOND_OS_PARAMETER_GPR, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } else { asm.emitSTAddrU(T0, BYTES_IN_ADDRESS, KLUDGE_TI_REG); // append this ptr to end of JNIRefs array asm.emitSUBFC(SECOND_OS_PARAMETER_GPR, PROCESSOR_REGISTER, KLUDGE_TI_REG); // pass offset in bytes } // store the new JNIRefs array TOP back into JNIEnv asm.emitSUBFC(KLUDGE_TI_REG, PROCESSOR_REGISTER, KLUDGE_TI_REG); // compute offset for the current TOP asm.emitSTW(KLUDGE_TI_REG, VM_Entrypoints.JNIRefsTopField.getOffset(), S0); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/3a1409586ed0fc007c4120f3a96d6f7a1ae3593c/VM_JNICompiler.java/clean/rvm/src/vm/arch/powerPC/jni/VM_JNICompiler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
509,
2623,
1225,
16,
4766,
4202,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
565,
509,
1024,
4618,
4117,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1707,
2402,
12,
7397,
67,
1463,
5747,
749,
20415,
16,
509,
2623,
1225,
16,
4766,
4202,
8251,
67,
1305,
707,
16,
8251,
67,
797,
7352,
13,
288,
565,
509,
1024,
4618,
4117,... |
public Remote toStub(Remote obj) | public Remote toStub(Remote ObjImpl) | public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/PortableRemoteObjectDelegateImpl.java/buggy/core/src/classpath/gnu/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
6304,
358,
11974,
12,
5169,
18760,
2828,
13,
565,
1216,
5823,
921,
503,
225,
288,
565,
327,
6008,
429,
2081,
18,
869,
11974,
12,
2603,
1769,
225,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
6304,
358,
11974,
12,
5169,
18760,
2828,
13,
565,
1216,
5823,
921,
503,
225,
288,
565,
327,
6008,
429,
2081,
18,
869,
11974,
12,
2603,
1769,
225,
289,
2,
-100,
-100,
-100,
-100,
-... |
private void pepLayout(Component editorPanel, Component buttonPanel) { SpringLayout layout = new SpringLayout(); this.setLayout(layout); this.add(editorPanel); layout.putConstraint(SpringLayout.WEST, editorPanel, 5, SpringLayout.WEST, this); layout.putConstraint(SpringLayout.NORTH, editorPanel, 5, SpringLayout.NORTH, this); layout.putConstraint(SpringLayout.EAST, this, 5, SpringLayout.EAST, editorPanel); layout.putConstraint(SpringLayout.SOUTH, this, 5, SpringLayout.SOUTH, editorPanel); this.add(buttonPanel); layout.putConstraint(SpringLayout.NORTH, buttonPanel, 5, SpringLayout.SOUTH, editorPanel); layout.putConstraint(SpringLayout.WEST, buttonPanel, 5, SpringLayout.WEST, this); layout.putConstraint(SpringLayout.EAST, buttonPanel, -5, SpringLayout.EAST, this); layout.putConstraint(SpringLayout.SOUTH, this, 5, SpringLayout.SOUTH, buttonPanel); } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/ad1d7a526540019e033079228544b3a802a556d3/PropertyEditorPane.java/clean/src/net/suberic/util/gui/propedit/PropertyEditorPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
293,
881,
3744,
12,
1841,
4858,
5537,
16,
5435,
3568,
5537,
13,
288,
3639,
22751,
3744,
3511,
273,
394,
22751,
3744,
5621,
565,
333,
18,
542,
3744,
12,
6741,
1769,
565,
333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
293,
881,
3744,
12,
1841,
4858,
5537,
16,
5435,
3568,
5537,
13,
288,
3639,
22751,
3744,
3511,
273,
394,
22751,
3744,
5621,
565,
333,
18,
542,
3744,
12,
6741,
1769,
565,
333,
... | ||
catch (InvalidDataException e) { | } DebuggerInvocationUtil.invokeLater(myProject, new Runnable() { public void run() { updateBreakpointsUI(); | @SuppressWarnings({"HardCodedStringLiteral"}) public void run() { PsiDocumentManager.getInstance(myProject).commitAndRunReadAction(new Runnable() { @SuppressWarnings({"HardCodedStringLiteral"}) public void run() { final Map<String, Breakpoint> nameToBreakpointMap = new java.util.HashMap<String, Breakpoint>(); try { final List groups = parentNode.getChildren(); for (final Object group1 : groups) { final Element group = (Element)group1; final String category = group.getName(); Element anyExceptionBreakpointGroup; if (!AnyExceptionBreakpoint.ANY_EXCEPTION_BREAKPOINT.equals(category)) { // for compatibility with previous format anyExceptionBreakpointGroup = group.getChild(AnyExceptionBreakpoint.ANY_EXCEPTION_BREAKPOINT); final BreakpointFactory factory = BreakpointFactory.getInstance(category); if (factory != null) { for (final Object o : group.getChildren("breakpoint")) { Element breakpointNode = (Element)o; Breakpoint breakpoint = factory.createBreakpoint(myProject, breakpointNode); breakpoint.readExternal(breakpointNode); addBreakpoint(breakpoint); nameToBreakpointMap.put(breakpoint.getDisplayName(), breakpoint); } } } else { anyExceptionBreakpointGroup = group; } if (anyExceptionBreakpointGroup != null) { final Element breakpointElement = group.getChild("breakpoint"); if (breakpointElement != null) { myAnyExceptionBreakpoint.readExternal(breakpointElement); } } } } catch (InvalidDataException e) { } final Element rulesGroup = parentNode.getChild(RULES_GROUP_NAME); if (rulesGroup != null) { final List rules = rulesGroup.getChildren("rule"); for (final Object rule1 : rules) { final Element rule = (Element)rule1; final Element master = rule.getChild(MASTER_BREAKPOINT_TAGNAME); if (master == null) { continue; } final Element slave = rule.getChild(SLAVE_BREAKPOINT_TAGNAME); if (slave == null) { continue; } final Breakpoint masterBreakpoint = nameToBreakpointMap.get(master.getAttributeValue("name")); if (masterBreakpoint == null) { continue; } final Breakpoint slaveBreakpoint = nameToBreakpointMap.get(slave.getAttributeValue("name")); if (slaveBreakpoint == null) { continue; } addBreakpointRule(new EnableBreakpointRule(BreakpointManager.this, masterBreakpoint, slaveBreakpoint)); } } DebuggerInvocationUtil.invokeLater(myProject, new Runnable() { public void run() { updateBreakpointsUI(); } }); } }); myUIProperties.clear(); final Element props = parentNode.getChild("ui_properties"); if (props != null) { final List children = props.getChildren("property"); for (Object child : children) { Element property = (Element)child; final String name = property.getAttributeValue("name"); final String value = property.getAttributeValue("value"); if (name != null && value != null) { myUIProperties.put(name, value); } } } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/367f378dd76c2ac779f7f3e4f8ad2bae5ccf7be5/BreakpointManager.java/buggy/debugger/impl/com/intellij/debugger/ui/breakpoints/BreakpointManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
632,
29282,
4312,
12590,
6,
29601,
1085,
72,
28565,
6,
6792,
1071,
918,
1086,
1435,
288,
1850,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
7371,
1876,
1997,
1994,
1803,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
632,
29282,
4312,
12590,
6,
29601,
1085,
72,
28565,
6,
6792,
1071,
918,
1086,
1435,
288,
1850,
453,
7722,
2519,
1318,
18,
588,
1442,
12,
4811,
4109,
2934,
7371,
1876,
1997,
1994,
1803,
12... |
this.streamInput = input; this.streamOutput = output; | input = new Channel(Character.TYPE, 1); output = new Channel (Character.TYPE, 2); | public void init () { setSplitter (WEIGHTED_ROUND_ROBIN (2, 1, 4, 2)); this.add (new Filter () { Channel input = new Channel(Character.TYPE, 1); Channel output = new Channel (Character.TYPE, 2); public void initIO () { this.streamInput = input; this.streamOutput = output; } public void work() { input.popChar (); output.pushChar (input.popChar ()); } }); this.add (new Filter () { Channel input = new Channel(Character.TYPE, 1); Channel output = new Channel (Character.TYPE, 8); public void initIO () { this.streamInput = input; this.streamOutput = output; } public void work() { char c = input.popChar (); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); output.pushChar (c); } }); this.add (new Identity (Character.TYPE)); this.add(new CharPrinter()); setJoiner (WEIGHTED_ROUND_ROBIN (1, 2, 1, 0)); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/a97ca875e1744ac20c2392ec0afd90513685e318/HelloWorld2.java/clean/streams/apps/tests/hello-splits/HelloWorld2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11794,
1071,
918,
1208,
1832,
18701,
288,
27573,
444,
26738,
261,
6950,
16055,
6404,
67,
15092,
67,
1457,
12615,
261,
22,
16,
404,
16,
1059,
16,
576,
10019,
27573,
333,
18,
1289,
261,
2704,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11794,
1071,
918,
1208,
1832,
18701,
288,
27573,
444,
26738,
261,
6950,
16055,
6404,
67,
15092,
67,
1457,
12615,
261,
22,
16,
404,
16,
1059,
16,
576,
10019,
27573,
333,
18,
1289,
261,
2704,
40... |
return new RubyFixnum(ruby, value); | public static RubyFixnum newFixnum(Ruby ruby, long value) { // Cache for Fixnums (Performance) if ((value & ~Ruby.FIXNUM_CACHE_MAX) == 0) { return ruby.fixnumCache[(int) value]; } return new RubyFixnum(ruby, value); } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyFixnum.java/buggy/org/jruby/RubyFixnum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
8585,
2107,
394,
8585,
2107,
12,
54,
10340,
22155,
16,
1525,
460,
13,
288,
3639,
368,
4379,
364,
12139,
21180,
261,
25024,
13,
3639,
309,
14015,
1132,
473,
4871,
54,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19817,
8585,
2107,
394,
8585,
2107,
12,
54,
10340,
22155,
16,
1525,
460,
13,
288,
3639,
368,
4379,
364,
12139,
21180,
261,
25024,
13,
3639,
309,
14015,
1132,
473,
4871,
54,
103... | |
optionGroup.add(new JLabel("do () while:"), myDoWhileForceCombo); | optionGroup.add(new JLabel("do ... while():"), myDoWhileForceCombo); | private JPanel createForceBracesPanel() { OptionGroup optionGroup = new OptionGroup("Force Braces"); myIfForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("if ():"), myIfForceCombo); myForForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("for ():"), myForForceCombo); myWhileForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("while ():"), myWhileForceCombo); myDoWhileForceCombo = createForceBracesCombo(); optionGroup.add(new JLabel("do () while:"), myDoWhileForceCombo); return optionGroup.createPanel(); } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/eeb77b3c2e3204ee481f4e7b2b3ac28f387adebd/CodeStyleIndentAndBracesPanel.java/buggy/source/com/intellij/application/options/CodeStyleIndentAndBracesPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
24048,
752,
10997,
38,
354,
764,
5537,
1435,
288,
565,
2698,
1114,
1456,
1114,
273,
394,
2698,
1114,
2932,
10997,
605,
354,
764,
8863,
565,
3399,
2047,
10997,
16156,
273,
752,
10997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24048,
752,
10997,
38,
354,
764,
5537,
1435,
288,
565,
2698,
1114,
1456,
1114,
273,
394,
2698,
1114,
2932,
10997,
605,
354,
764,
8863,
565,
3399,
2047,
10997,
16156,
273,
752,
10997,
... |
public synchronized void addHierarchyListener(HierarchyListener l) { | public synchronized void addHierarchyListener(HierarchyListener l) { | public synchronized void addHierarchyListener(HierarchyListener l) { hierarchyListener = AWTEventMulticaster.add(hierarchyListener, l); if (hierarchyListener != null) enableEvents(AWTEvent.HIERARCHY_EVENT_MASK); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ac6303b96cdaf2d4230daf25a90dd00cc4cb192d/Component.java/clean/core/src/classpath/java/java/awt/Component.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
527,
12074,
2223,
12,
12074,
2223,
328,
13,
288,
202,
202,
17937,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
17937,
2223,
16,
328,
1769,
202,
202,
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,
225,
202,
482,
3852,
918,
527,
12074,
2223,
12,
12074,
2223,
328,
13,
288,
202,
202,
17937,
2223,
273,
432,
8588,
1133,
5049,
335,
2440,
18,
1289,
12,
17937,
2223,
16,
328,
1769,
202,
202,
4... |
} for (Iterator pathIter = loadPath.iterator(); pathIter.hasNext();) { String entry = pathIter.next().toString(); if (entry.startsWith("jar:")) { JarFile current = (JarFile)jarFiles.get(entry); if(null == current) { try { current = new JarFile(entry.substring(4)); jarFiles.put(entry,current); } catch (FileNotFoundException ignored) { } catch (IOException e) { throw runtime.newIOErrorFromException(e); } | if (current.getJarEntry(name) != null) { try { return new LoadServiceResource(new URL(entry + name), entry + name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); | private LoadServiceResource findFile(String name) { // try { if (name.startsWith("jar:")) { try { return new LoadServiceResource(new URL(name), name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } // ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); JRubyFile file = JRubyFile.create(runtime.getCurrentDirectory(),name); if(file.isFile() && file.isAbsolute()) { try { return new LoadServiceResource(file.toURL(),name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } ClassLoader classLoader = runtime.getJavaSupport().getJavaClassLoader(); String xname = name.replace('\\', '/'); // Look in classpath next (we do not use File as a test since UNC names will match) // Note: Jar resources must always begin with an '/'. if (xname.charAt(0) == '/') { URL loc = classLoader.getResource(xname); // Make sure this is not a directory or unavailable in some way if (isRequireable(loc)) { return new LoadServiceResource(loc, loc.getPath()); } } for (Iterator pathIter = loadPath.iterator(); pathIter.hasNext();) { String entry = pathIter.next().toString(); if (entry.startsWith("jar:")) { JarFile current = (JarFile)jarFiles.get(entry); if(null == current) { try { current = new JarFile(entry.substring(4)); jarFiles.put(entry,current); } catch (FileNotFoundException ignored) { } catch (IOException e) { throw runtime.newIOErrorFromException(e); } } if (current.getJarEntry(name) != null) { try { return new LoadServiceResource(new URL(entry + name), entry + name); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } } // // Load from local filesystem // NormalizedFile current = (NormalizedFile)new NormalizedFile(entry, name).getAbsoluteFile(); JRubyFile current = JRubyFile.create(JRubyFile.create(runtime.getCurrentDirectory(),entry).getAbsolutePath(), name); if (current.isFile()) { try { return new LoadServiceResource(current.toURL(), current.getPath()); } catch (MalformedURLException e) { throw runtime.newIOErrorFromException(e); } } // otherwise, try to load from classpath (Note: Jar resources always uses '/') URL loc = classLoader.getResource(entry.replace('\\', '/') + "/" + xname); // Make sure this is not a directory or unavailable in some way if (isRequireable(loc)) { return new LoadServiceResource(loc, loc.getPath()); } } // Try to load from classpath without prefix. "A/b.rb" will not load as // "./A/b.rb" in a jar file. (Note: Jar resources always uses '/') URL loc = classLoader.getResource(xname); return isRequireable(loc) ? new LoadServiceResource(loc, loc.getPath()) : null; // } catch (MalformedURLException e) { // throw runtime.newIOErrorFromException(e); // } } | 46770 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46770/d38821551a58969cd2593b463d93df5f32bf3c14/LoadService.java/clean/src/org/jruby/runtime/load/LoadService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4444,
1179,
1420,
1104,
812,
12,
780,
508,
13,
288,
3639,
368,
3639,
775,
288,
5411,
309,
261,
529,
18,
17514,
1190,
2932,
11930,
2773,
3719,
288,
7734,
775,
288,
10792,
327,
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,
3238,
4444,
1179,
1420,
1104,
812,
12,
780,
508,
13,
288,
3639,
368,
3639,
775,
288,
5411,
309,
261,
529,
18,
17514,
1190,
2932,
11930,
2773,
3719,
288,
7734,
775,
288,
10792,
327,
394,
... |
private void loadDefaultProperties() { this.prop = new Properties(); | private void loadDefaultProperties() { this.prop = new Properties(); | private void loadDefaultProperties() { this.prop = new Properties(); prop.setProperty( "basic.show.header", "true" ); prop.setProperty( "basic.msg.empty_list", "Nothing found to display" ); prop.setProperty( "sort.behavior", "page" ); prop.setProperty( "export.banner", "Export options: {0}" ); prop.setProperty( "export.banner.sepchar", " | " ); prop.setProperty( "export.csv", "true" ); prop.setProperty( "export.csv.label", "CSV" ); prop.setProperty( "export.csv.mimetype", "text/csv" ); prop.setProperty( "export.csv.include_header", "false" ); prop.setProperty( "export.excel", "true" ); prop.setProperty( "export.excel.label", "Excel" ); prop.setProperty( "export.excel.mimetype", "application/vnd.ms-excel" ); prop.setProperty( "export.excel.include_header", "false" ); prop.setProperty( "export.xml", "true" ); prop.setProperty( "export.xml.label", "XML" ); prop.setProperty( "export.xml.mimetype", "text/xml" ); prop.setProperty( "export.amount", "page" ); prop.setProperty( "export.decorated", "true" ); prop.setProperty( "paging.banner.placement", "top" ); prop.setProperty( "paging.banner.item_name", "item" ); prop.setProperty( "paging.banner.items_name", "items" ); prop.setProperty( "paging.banner.no_items_found", "No {0} found." ); prop.setProperty( "paging.banner.one_item_found", "1 {0} found." ); prop.setProperty( "paging.banner.all_items_found", "{0} {1} found, showing all {2}" ); prop.setProperty( "paging.banner.some_items_found", "{0} {1} found, displaying {2} to {3}" ); prop.setProperty( "paging.banner.include_first_last", "false" ); prop.setProperty( "paging.banner.first_label", "First" ); prop.setProperty( "paging.banner.last_label", "Last" ); prop.setProperty( "paging.banner.prev_label", "Prev" ); prop.setProperty( "paging.banner.next_label", "Next" ); prop.setProperty( "paging.banner.group_size", "8" ); prop.setProperty( "error.msg.cant_find_bean", "Could not find bean {0} in scope {1}" ); prop.setProperty( "error.msg.invalid_bean", "The bean that you gave me is not a Collection I understand: {0}" ); prop.setProperty( "error.msg.no_column_tags", "Please provide column tags." ); prop.setProperty( "error.msg.illegal_access_exception", "IllegalAccessException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.invocation_target_exception", "InvocationTargetException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.nosuchmethod_exception", "NoSuchMethodException trying to fetch property {0} on bean {1}" ); prop.setProperty( "error.msg.invalid_decorator", "Decorator class is not a subclass of TableDecorator" ); prop.setProperty( "error.msg.invalid_page", "Invalid page ({0}) provided, value should be between 1 and {1}" ); } | 10316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10316/08c9646d52e50d1acc1b275f065d301659beba20/TableTag.java/buggy/_OLD/displaytag08/src/org/apache/taglibs/display/TableTag.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
918,
1262,
1868,
2297,
1435,
282,
288,
1377,
333,
18,
5986,
273,
394,
6183,
5621,
1377,
2270,
18,
542,
1396,
12,
315,
13240,
18,
4500,
18,
3374,
3113,
315,
3767,
6,
11272,
1377,
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,
565,
3238,
918,
1262,
1868,
2297,
1435,
282,
288,
1377,
333,
18,
5986,
273,
394,
6183,
5621,
1377,
2270,
18,
542,
1396,
12,
315,
13240,
18,
4500,
18,
3374,
3113,
315,
3767,
6,
11272,
1377,
2... |
handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); | handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); | public void end(String uri, String localname, String qName) throws SAXException { final ContentHandler contentHandler = handlerContext.getController().getOutput(); final XFormsSelect1Control xformsSelect1Control = (XFormsSelect1Control) (handlerContext.isGenerateTemplate() ? null : (XFormsControl) containingDocument.getObjectById(pipelineContext, effectiveId)); final boolean isMany = localname.equals("select"); QName appearance; { final QName tempAppearance = getAppearance(elementAttributes); if (tempAppearance != null) appearance = tempAppearance; else if (isMany) appearance = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME;// default for xforms:select else appearance = XFormsConstants.XFORMS_MINIMAL_APPEARANCE_QNAME;// default for xforms:select1 } boolean isOpenSelection = "open".equals(elementAttributes.getValue("selection")); boolean isAutocomplete = isOpenSelection && XFormsConstants.XXFORMS_AUTOCOMPLETE_APPEARANCE_QNAME.equals(appearance); // NOTE: We don't support autocompletion with xforms:select for now, only with xforms:select1 if (isAutocomplete && isMany) { appearance = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME; isOpenSelection = false; isAutocomplete = false; } final boolean isFull = XFormsConstants.XFORMS_FULL_APPEARANCE_QNAME.equals(appearance); final boolean isCompact = XFormsConstants.XFORMS_COMPACT_APPEARANCE_QNAME.equals(appearance); final boolean isTree = XFormsConstants.XXFORMS_TREE_APPEARANCE_QNAME.equals(appearance); final boolean isMenu = XFormsConstants.XXFORMS_MENU_APPEARANCE_QNAME.equals(appearance); final boolean isAutocompleteNoFilter = isAutocomplete && "false".equals(elementAttributes.getValue(XFormsConstants.XXFORMS_NAMESPACE_URI, "filter")); // xforms:label handleLabelHintHelpAlert(effectiveId, "label", xformsSelect1Control); final AttributesImpl newAttributes; { final StringBuffer classes = getInitialClasses(localname, elementAttributes, xformsSelect1Control); if (isOpenSelection) classes.append(" xforms-select1-open"); if (isAutocompleteNoFilter) classes.append(" xforms-select1-open-autocomplete-nofilter"); if (isTree) classes.append(" xforms-initially-hidden"); if (!handlerContext.isGenerateTemplate()) { handleMIPClasses(classes, xformsSelect1Control); newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } else { newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } } final String xhtmlPrefix = handlerContext.findXHTMLPrefix(); if (!isStaticReadonly(xformsSelect1Control)) { if (isFull) { final String fullItemType = isMany ? "checkbox" : "radio"; final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); { contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); int itemIndex = 0; for (Iterator i = items.iterator(); i.hasNext(); itemIndex++) { final XFormsSelect1Control.Item item = (XFormsSelect1Control.Item) i.next(); handleItemFull(contentHandler, xhtmlPrefix, spanQName, xformsSelect1Control, id, effectiveId, isMany, fullItemType, item, Integer.toString(itemIndex), itemIndex == 0); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } if (hasItemset) { // Produce template reusableAttributes.clear(); reusableAttributes.addAttribute("", "id", "id", ContentHandlerHelper.CDATA, "xforms-select-template-" + effectiveId); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select-template"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, reusableAttributes); handleItemFull(contentHandler, xhtmlPrefix, spanQName, null, id, effectiveId, isMany, fullItemType, new XFormsSelect1Control.Item(true, getAttributes(itemsetAttributes, null, null), "$xforms-template-label$", "$xforms-template-value$", 1), "$xforms-item-index$", true); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); // TODO: in the future we should be able to handle multiple itemsets } } else { if (isOpenSelection) { if (isAutocomplete) { // Create xhtml:span final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); { { // Create xhtml:input final String inputQName = XMLUtils.buildQName(xhtmlPrefix, "input"); reusableAttributes.clear(); reusableAttributes.addAttribute("", "type", "type", ContentHandlerHelper.CDATA, "text"); reusableAttributes.addAttribute("", "name", "name", ContentHandlerHelper.CDATA, "xforms-select1-open-input-" + effectiveId); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select1-open-input"); reusableAttributes.addAttribute("", "autocomplete", "autocomplete", ContentHandlerHelper.CDATA, "off"); final String value = (xformsSelect1Control == null) ? null : xformsSelect1Control.getValue(); reusableAttributes.addAttribute("", "value", "value", ContentHandlerHelper.CDATA, (value == null) ? "" : value); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "input", inputQName, reusableAttributes); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "input", inputQName); } { // Create xhtml:select final String selectQName = XMLUtils.buildQName(xhtmlPrefix, "select"); reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-select1-open-select"); if (isCompact) reusableAttributes.addAttribute("", "multiple", "multiple", ContentHandlerHelper.CDATA, "multiple"); // Handle accessibility attributes handleAccessibilityAttributes(elementAttributes, reusableAttributes); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName, reusableAttributes); final String optionQName = XMLUtils.buildQName(xhtmlPrefix, "option"); handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, new XFormsSelect1Control.Item(false, new AttributesImpl(), "", "", 1)); for (Iterator i = items.iterator(); i.hasNext();) { final XFormsSelect1Control.Item item = (XFormsSelect1Control.Item) i.next(); if (item.getValue() != null) handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, item); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } else { // We do not support other appearances or regular open selection for now throw new OXFException("Open selection currently only supports the xxforms:autocomplete appearance."); // TODO: Use ValidationException. } } else if (isTree) { // xxforms:tree appearance // Create xhtml:div with tree info final String divQName = XMLUtils.buildQName(xhtmlPrefix, "div"); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, newAttributes); outputJSONTreeInfo(xformsSelect1Control, isMany, contentHandler); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } else if (isMenu) { // xxforms:menu appearance // Create enclosing xhtml:div final String divQName = XMLUtils.buildQName(xhtmlPrefix, "div"); final String ulQName = XMLUtils.buildQName(xhtmlPrefix, "ul"); final String liQName = XMLUtils.buildQName(xhtmlPrefix, "li"); final String aQName = XMLUtils.buildQName(xhtmlPrefix, "a"); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, newAttributes); // Create xhtml:div with initial menu entries reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "yuimenubar"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "bd"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "first"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "ul", ulQName, reusableAttributes); { reusableAttributes.clear(); int index = 0; for (Iterator j = items.iterator(); j.hasNext(); index++) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) j.next(); // Only care about item at level 1 if (currentItem.getLevel() != 1) continue; reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, (index == 0) ? "yuimenubaritem first" : "yuimenubaritem"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "li", liQName, reusableAttributes); { reusableAttributes.clear(); reusableAttributes.addAttribute("", "href", "href", ContentHandlerHelper.CDATA, "#"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "a", aQName, reusableAttributes); final String text = currentItem.getLabel(); contentHandler.characters(text.toCharArray(), 0, text.length()); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "a", aQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "li", liQName); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "ul", ulQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); // Create xhtml:div with tree info reusableAttributes.clear(); reusableAttributes.addAttribute("", "class", "class", ContentHandlerHelper.CDATA, "xforms-initially-hidden"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName, reusableAttributes); outputJSONTreeInfo(xformsSelect1Control, isMany, contentHandler); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "div", divQName); } else { // Create xhtml:select final String selectQName = XMLUtils.buildQName(xhtmlPrefix, "select"); if (isCompact) newAttributes.addAttribute("", "multiple", "multiple", ContentHandlerHelper.CDATA, "multiple"); // Handle accessibility attributes handleAccessibilityAttributes(elementAttributes, newAttributes); handleReadOnlyAttribute(newAttributes, xformsSelect1Control); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName, newAttributes); final String optionQName = XMLUtils.buildQName(xhtmlPrefix, "option"); final String optGroupQName = XMLUtils.buildQName(xhtmlPrefix, "optgroup"); int level = 0; for (Iterator j = items.iterator(); j.hasNext();) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) j.next(); final String value = currentItem.getValue(); final int newLevel = currentItem.getLevel(); if (level - newLevel > 0) { // We are going down one or more levels for (int i = newLevel; i < level; i++) { // End xhtml:optgroup contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName); } } if (value == null) { // Starting a new group final String label = currentItem.getLabel(); final AttributesImpl optGroupAttributes = getAttributes(currentItem.getAttributes(), null, null); if (label != null) optGroupAttributes.addAttribute("", "label", "label", ContentHandlerHelper.CDATA, label); // Start xhtml:optgroup contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName, optGroupAttributes); } else { // Adding a new item handleItemCompact(contentHandler, optionQName, xformsSelect1Control, isMany, currentItem); } level = newLevel; } // Close brackets for (int i = level; i > 1; i--) { // End xhtml:optgroup contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "optgroup", optGroupQName); } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "select", selectQName); } } } else { // Read-only mode final String spanQName = XMLUtils.buildQName(xhtmlPrefix, "span"); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName, newAttributes); if (!handlerContext.isGenerateTemplate()) { final String value = (xformsSelect1Control.getValue() == null) ? "" : xformsSelect1Control.getValue(); final StringBuffer sb = new StringBuffer(); int selectedFound = 0; for (Iterator i = items.iterator(); i.hasNext();) { final XFormsSelect1Control.Item currentItem = (XFormsSelect1Control.Item) i.next(); if (isSelected(isMany, value, currentItem.getValue())) { if (selectedFound > 0) sb.append(" - "); sb.append(currentItem.getLabel()); selectedFound++; } } if (sb.length() > 0) { final String result = sb.toString(); contentHandler.characters(result.toCharArray(), 0, result.length()); } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "span", spanQName); } // xforms:help handleLabelHintHelpAlert(effectiveId, "help", xformsSelect1Control); // xforms:alert handleLabelHintHelpAlert(effectiveId, "alert", xformsSelect1Control); // xforms:hint handleLabelHintHelpAlert(effectiveId, "hint", xformsSelect1Control); } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/05421f46b96c37b81e447acd15c2f6cdee98291f/XFormsSelect1Handler.java/clean/src/java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
13,
1216,
14366,
288,
3639,
727,
3697,
1503,
913,
1503,
273,
1838,
1042,
18,
588,
2933,
7675,
588,
1447,
5621,
3639,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
679,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
13,
1216,
14366,
288,
3639,
727,
3697,
1503,
913,
1503,
273,
1838,
1042,
18,
588,
2933,
7675,
588,
1447,
5621,
3639,
7... |
getJinFrameMenuBar().removePluginsMenu(conn); | JinFrameMenuBar menubar = getJinFrameMenuBar(); menubar.removePluginsMenu(conn); menubar.repaint(); | public void closeConnection(JinConnection conn){ Plugin [] plugins = (Plugin [])connsToPlugins.get(conn); for (int i=0;i<plugins.length;i++) try{ Plugin plugin = plugins[i]; if (plugin!=null){ System.out.println("Stopping "+plugin.getName()); plugin.stop(); } } catch (Throwable e){ // Make sure plugins don't bother other plugins. synchronized(System.err){ System.err.println("An exception occurred while stopping a plugin:"); e.printStackTrace(); } } System.out.println("Closing connection"); try{ if (conn.isConnected()){ conn.exit(); conn.disconnect(); } } catch (IOException e){ synchronized(System.err){ System.err.println("Failed to disconnect connection: "+conn); e.printStackTrace(); } } User user = (User)connsToUsers.get(conn); if (Jin.isKnownUser(user)){ if (user.isUserModified()){ System.out.println("Querying user about saving settings"); int result = JOptionPane.showConfirmDialog(this,"Save "+user.getUsername()+"'s settings into "+user.getFilename()+"?","Save settings?",JOptionPane.YES_NO_OPTION); if (result==JOptionPane.YES_OPTION){ System.out.println("Saving user settings"); Jin.save(user); } else{ System.out.println("Restoring user's original settings"); user.restore(); } } else{ System.out.println("Saving user's implicit settings"); Jin.save(user); } } else{ if (user.getUsername()!=null){ // Null means a guest. System.out.println("Querying user about creating a new account"); int result = JOptionPane.showConfirmDialog(this,"Would you like to create a new user named \""+user.getUsername()+"\"?","Create new user?",JOptionPane.YES_NO_OPTION); if (result==JOptionPane.YES_OPTION){ System.out.println("Creating new user, named "+user.getUsername()); Jin.save(user); } } } String userFilename = user.getFilename(); if (userFilename!=null){ System.out.println("Saving last user information"); Jin.setProperty("last.user", userFilename); } System.out.println("Removing connection from mappings"); connsToPlugins.remove(conn); connsToUsers.remove(conn); System.out.println("Removing plugins menu"); getJinFrameMenuBar().removePluginsMenu(conn); } | 1161 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1161/21abd566dc8bb907ae68dd63eb035dd443f84442/JinFrame.java/buggy/src/free/jin/JinFrame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1746,
1952,
12,
46,
267,
1952,
1487,
15329,
565,
6258,
5378,
4799,
273,
261,
3773,
5378,
13,
591,
2387,
774,
9461,
18,
588,
12,
4646,
1769,
565,
364,
261,
474,
277,
33,
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,
282,
1071,
918,
1746,
1952,
12,
46,
267,
1952,
1487,
15329,
565,
6258,
5378,
4799,
273,
261,
3773,
5378,
13,
591,
2387,
774,
9461,
18,
588,
12,
4646,
1769,
565,
364,
261,
474,
277,
33,
20,
... |
Platform.addAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME, map); | try { Platform.addAuthorizationInfo(new URL(getUrl()), AUTH_REALM, AUTH_SCHEME, map); } catch (MalformedURLException ex) { Platform.addAuthorizationInfo(DEFAULT_URL, getUrl(), AUTH_SCHEME, map); } | public void setAuthenticationCredentials(String username, String password) { Map<String, String> map = Platform.getAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME); if (map == null) { map = new java.util.HashMap<String, String>(); } if (username != null) { map.put(AUTH_USERNAME, username); } if (password != null) { map.put(AUTH_PASSWORD, password); } try { // write the map to the keyring Platform.addAuthorizationInfo(serverUrl, AUTH_REALM, AUTH_SCHEME, map); } catch (CoreException e) { MylarStatusHandler.fail(e, "could not set authorization", true); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b86455249adfd805375ab5ef4f49dc4b9506e0d2/TaskRepository.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/provisional/tasklist/TaskRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
6492,
6163,
12,
780,
2718,
16,
514,
2201,
13,
288,
202,
202,
863,
32,
780,
16,
514,
34,
852,
273,
11810,
18,
588,
6063,
966,
12,
3567,
1489,
16,
12790,
67,
31052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6492,
6163,
12,
780,
2718,
16,
514,
2201,
13,
288,
202,
202,
863,
32,
780,
16,
514,
34,
852,
273,
11810,
18,
588,
6063,
966,
12,
3567,
1489,
16,
12790,
67,
31052,
... |
BusyIndicator.showWhile(fDescriptionButton.getDisplay(), new Runnable() { | BusyIndicator.showWhile(fPointListViewer.getControl().getDisplay(), new Runnable() { | private void doShowDescription() { if (fShowDescriptionAction == null) fShowDescriptionAction = new ShowDescriptionAction(fCurrentPoint); else fShowDescriptionAction.setExtensionPoint(fCurrentPoint); BusyIndicator.showWhile(fDescriptionButton.getDisplay(), new Runnable() { public void run() { fShowDescriptionAction.run(); } }); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/67c7d5d0b0d525549acee2450c787ae16de799a4/PointSelectionPage.java/buggy/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
5706,
3291,
1435,
288,
202,
202,
430,
261,
74,
5706,
3291,
1803,
422,
446,
13,
1082,
202,
74,
5706,
3291,
1803,
273,
394,
9674,
3291,
1803,
12,
74,
3935,
2148,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
741,
5706,
3291,
1435,
288,
202,
202,
430,
261,
74,
5706,
3291,
1803,
422,
446,
13,
1082,
202,
74,
5706,
3291,
1803,
273,
394,
9674,
3291,
1803,
12,
74,
3935,
2148,
1769... |
} | private void performDragSetData(DragSourceEvent event) { if (MarkerTransfer.getInstance().isSupportedType(event.dataType)) { event.data = ((IStructuredSelection) getViewer().getSelection()).toArray(); return; } if (TextTransfer.getInstance().isSupportedType(event.dataType)) { List selection = ((IStructuredSelection) getViewer().getSelection()).toList(); try { IMarker[] markers = new IMarker[selection.size()]; selection.toArray(markers); if (markers != null) { event.data = copyAction.createMarkerReport(markers); } } catch (ArrayStoreException e) { } } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ea57ee1b804071939d5791d4c2986826074efe0c/MarkerView.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3073,
11728,
694,
751,
12,
11728,
1830,
1133,
871,
13,
288,
202,
202,
430,
261,
7078,
5912,
18,
588,
1442,
7675,
291,
7223,
559,
12,
2575,
18,
892,
559,
3719,
288,
1082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3073,
11728,
694,
751,
12,
11728,
1830,
1133,
871,
13,
288,
202,
202,
430,
261,
7078,
5912,
18,
588,
1442,
7675,
291,
7223,
559,
12,
2575,
18,
892,
559,
3719,
288,
1082,... | |
for (i = 0; i < formalParameterList.length; i++) { | for (i = 0; i < actualParameterList.length; i++) { | private synchronized void executeProcedureInternal( final String procedureName, final ParameterListItem[] formalParameterList, final ParameterListItem[] actualParameterList, final TdsStatement stmt, final SQLWarningChain wChain, final int timeout, final boolean noMetaData) throws java.sql.SQLException, TdsException { // SAfe We need to check if all cancel requests were processed and wait // for any outstanding cancel. It could happen that we sent the // CANCEL after the server sent us all the data, so the answer is // going to come in a packet of its own.// while (cancelActive.booleanValue()) {// waitForDataOrTimeout(wChain, timeout);// // @todo Make sure the statement/resultset are not left in an inconsistent state.// processSubPacket();// } // A stored procedure has a packet type of 0x03 in the header packet. // for non-image date the packets consists of // offset length desc. // 0 1 The length of the name of the stored proc // 1 N1 The name of the stored proc // N1 + 1 2 unknown (filled with zeros?) // N1 + 3 2 unknown prefix for param 1 (zero filled?) // N1 + 5 1 datatype for param 1 // N1 + 6 1 max length of param 1 // N1 + 7 N2 parameter 1 data // ... // // For image data (datatype 0x22) the packet consists of // 0 1 The length of the name of the stored proc // 1 N1 The name of the stored proc // N1 + 1 2 unknown (filled with zeros?) // N1 + 3 2 unknown prefix for param 1 (zero filled?) // N1 + 5 1 datatype for param 1 // N1 + 6 4 length of param 1 // N1 + 10 4 length of param 1 (duplicated?) // N1 + 7 N2 parameter 1 data // ... checkMaxRows(stmt, wChain); int i; try { // SAfe We must not do this here, if an exception is thrown before // the packet is actually sent, we will deadlock in skipToEnd // with nothing to read. // moreResults = true; // Start sending the procedure execute packet. comm.startPacket(TdsComm.PROC); if (tdsVer == Tds.TDS70) { comm.appendTdsShort((short) (procedureName.length())); comm.appendChars(procedureName); } else { final byte[] nameBytes = conn.getEncoder().getBytes(procedureName); comm.appendByte((byte) nameBytes.length); comm.appendBytes(nameBytes); } // SAfe If this is set to 512 it means "don't return column // information" (useful for scrollable statements, to reduce // the amount of data passed around). comm.appendShort((short) (noMetaData ? 512 : 0)); // Now handle the parameters for (i = 0; i < formalParameterList.length; i++) { // SAfe We could try using actualParameterList here, instead // of formalParameterList. If it works (although it // shouldn't) it will solve a lot of problems. byte nativeType = cvtJdbcTypeToNativeType(formalParameterList[i].type); if (formalParameterList[i].formalName == null) { comm.appendByte((byte) 0); } else { // Send parameter name final String name = formalParameterList[i].formalName; comm.appendByte((byte) name.length()); if (tdsVer == Tds.TDS70) { comm.appendChars(name); } else { final byte[] nameBytes = conn.getEncoder().getBytes(name); comm.appendBytes(nameBytes); } } if (actualParameterList[i].isOutput) { comm.appendByte((byte) 1); if (nativeType == SYBBIT && actualParameterList[i].value == null) { actualParameterList[i].value = Boolean.FALSE; } } else { comm.appendByte((byte) 0); } if (actualParameterList[i].value == null && (nativeType == SYBINT1 || nativeType == SYBINT2 || nativeType == SYBINT4)) { nativeType = SYBINTN; } switch (nativeType) { case SYBCHAR: { String val; try { val = (String) actualParameterList[i].value; } catch (ClassCastException e) { if (actualParameterList[i].value instanceof Boolean) val = ((Boolean) actualParameterList[i].value).booleanValue() ? "1" : "0"; else val = actualParameterList[i].value.toString(); } if (tdsVer < TDS70 && val != null && val.length() == 0) { val = " "; } final int len = val != null ? val.length() : 0; final int max = formalParameterList[i].maxLength; // MJH - Do not use the formalType from the actual parameters as // this will be null where a cached stored procedure is reused by a // different PreparedStatement from the one that created it in the fist // place. Use the formalParameter data instead. // //if (actualParameterList[i].formalType != null && // actualParameterList[i].formalType.startsWith("n")) { // if (formalParameterList[i].formalType != null && formalParameterList[i].formalType.startsWith("n")) { /* * This is a Unicode column, safe to assume TDS 7.0 */ if (max > 4000) { comm.appendByte(SYBNTEXT); comm.appendTdsInt(max * 2); if (val == null) { comm.appendTdsInt(0xFFFFFFFF); } else { comm.appendTdsInt(len * 2); comm.appendChars(val); } } else { comm.appendByte((byte) (SYBNVARCHAR | 0x80)); comm.appendTdsShort((short) (max * 2)); if (val == null) { comm.appendTdsShort((short) 0xFFFF); } else { // MJH - Trap silent truncation problem if (val.length() > 4000) throw new java.io.IOException("Field too long"); comm.appendTdsShort((short) (len * 2)); comm.appendChars(val); } } } else { /* * Either VARCHAR or TEXT, TEXT can not happen * with TDS 7.0 as we would always use NTEXT there */ if (tdsVer != TDS70 && max > 255) { // TEXT comm.appendByte(SYBTEXT); if (actualParameterList[i].value instanceof byte[]) sendSybImage((byte[]) actualParameterList[i].value); else sendSybImage(conn.getEncoder().getBytes(val)); } else { // VARCHAR sendSybChar(val, formalParameterList[i].maxLength); } } break; } case SYBINTN: comm.appendByte(SYBINTN); comm.appendByte((byte) 4); // maximum length of the field, if (actualParameterList[i].value == null) { comm.appendByte((byte) 0); // actual length } else { comm.appendByte((byte) 4); // actual length comm.appendTdsInt(((Number) (actualParameterList[i].value)).intValue()); } break; case SYBINT4: comm.appendByte(SYBINT4); comm.appendTdsInt(((Number) (actualParameterList[i].value)).intValue()); break; case SYBINT2: comm.appendByte(SYBINT2); comm.appendTdsShort(((Number) (actualParameterList[i].value)).shortValue()); break; case SYBINT1: comm.appendByte(SYBINT1); comm.appendByte(((Number) (actualParameterList[i].value)).byteValue()); break; case SYBFLT8: case SYBFLTN: { if (actualParameterList[i].value == null) { comm.appendByte(SYBFLTN); comm.appendByte((byte) 8); comm.appendByte((byte) 0); } else { Double d = null; if (actualParameterList[i].value instanceof Double) { d = (Double) (actualParameterList[i].value); } else { final Number n = (Number) (actualParameterList[i].value); d = new Double(n.doubleValue()); } comm.appendByte(SYBFLT8); comm.appendFlt8(d); } break; } case SYBDATETIMN: { writeDatetimeValue(actualParameterList[i].value); break; } case SYBIMAGE: { comm.appendByte(nativeType); sendSybImage((byte[]) actualParameterList[i].value); break; } case SYBTEXT: { comm.appendByte(SYBTEXT); sendSybImage(conn.getEncoder().getBytes( (String) actualParameterList[i].value)); break; } case SYBBIT: case SYBBITN: { if (actualParameterList[i].value == null) { comm.appendByte(SYBBITN); comm.appendByte((byte) 1); comm.appendByte((byte) 0); } else { comm.appendByte(SYBBIT); if (actualParameterList[i].value.equals(Boolean.TRUE)) { comm.appendByte((byte) 1); } else { comm.appendByte((byte) 0); } } break; } case SYBNUMERIC: case SYBDECIMAL: { writeDecimalValue(actualParameterList[i].value, actualParameterList[i].type, actualParameterList[i].scale); break; } case SYBBINARY: case SYBVARBINARY: { final byte[] value = (byte[]) actualParameterList[i].value; final int maxLength = formalParameterList[i].maxLength; if (value == null) { comm.appendByte(SYBVARBINARY); comm.appendByte((byte) (maxLength)); comm.appendByte((byte) 0); } else { if (value.length > 255) { if (tdsVer != TDS70) { throw new java.io.IOException("Field too long"); } comm.appendByte(SYBBIGVARBINARY); if (maxLength < 0 || maxLength > 8000) { comm.appendTdsShort((short) 8000); } else { comm.appendTdsShort((short) maxLength); } comm.appendTdsShort((short) (value.length)); } else { comm.appendByte(SYBVARBINARY); comm.appendByte((byte) (maxLength)); comm.appendByte((byte) (value.length)); } comm.appendBytes(value); } break; } case SYBVOID: case SYBVARCHAR: case SYBDATETIME4: case SYBREAL: case SYBMONEY: case SYBDATETIME: case SYBMONEYN: case SYBMONEY4: default: { throw new SQLException("Not implemented for nativeType 0x" + Integer.toHexString(nativeType), "HY000"); } } } moreResults = true; comm.sendPacket(); waitForDataOrTimeout(wChain, timeout); } catch (java.io.IOException e) { e.printStackTrace(); throw new SQLException("Network error- " + e.getMessage(), "08S01"); } finally { comm.packetType = 0; } } | 2029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2029/3a3251044111ce7e2d595c1b6ee4b0f047ab39e5/Tds.java/buggy/src/main/net/sourceforge/jtds/jdbc/Tds.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1836,
17213,
3061,
12,
5411,
727,
514,
12131,
461,
16,
5411,
727,
5498,
13575,
8526,
25739,
1662,
682,
16,
5411,
727,
5498,
13575,
8526,
3214,
1662,
682,
16,
5411,
727,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
1836,
17213,
3061,
12,
5411,
727,
514,
12131,
461,
16,
5411,
727,
5498,
13575,
8526,
25739,
1662,
682,
16,
5411,
727,
5498,
13575,
8526,
3214,
1662,
682,
16,
5411,
727,
3... |
arkNo = Long.parseLong(arkNumber); | arkNo = Long.parseLong(arkNumber) + 1; | private boolean parseARK(SimpleFieldSet fs) { USK ark = null; long arkNo = 0; try { String arkNumber = fs.get("ark.number"); if(arkNumber != null) { arkNo = Long.parseLong(arkNumber); } String arkPubKey = fs.get("ark.pubURI"); if(arkPubKey != null) { FreenetURI uri = new FreenetURI(arkPubKey); ClientSSK ssk = new ClientSSK(uri); ark = new USK(ssk, arkNo); } } catch (MalformedURLException e) { Logger.error(this, "Couldn't parse ARK info for "+this+": "+e, e); } catch (NumberFormatException e) { Logger.error(this, "Couldn't parse ARK info for "+this+": "+e, e); } if(ark != null) { if(myARK == null || (myARK != ark && !myARK.equals(ark))) { myARK = ark; return true; } } return false; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/c68f335b2e7b5963f848fe98c5fdf9f7c71ba69f/PeerNode.java/clean/src/freenet/node/PeerNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1109,
9584,
12,
5784,
974,
694,
2662,
13,
288,
3639,
587,
11129,
419,
79,
273,
446,
31,
3639,
1525,
419,
79,
2279,
273,
374,
31,
3639,
775,
288,
540,
202,
780,
419,
79,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
1250,
1109,
9584,
12,
5784,
974,
694,
2662,
13,
288,
3639,
587,
11129,
419,
79,
273,
446,
31,
3639,
1525,
419,
79,
2279,
273,
374,
31,
3639,
775,
288,
540,
202,
780,
419,
79,
18... |
if (jj_scan_token(BIT_OR)) return true; if (jj_3R_216()) return true; | if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(RBRACKET)) return true; | final private boolean jj_3R_249() { if (jj_scan_token(BIT_OR)) return true; if (jj_3R_216()) return true; return false; } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/b068fe5a79db07a544f081402e946a51a0f553c2/JavaParser.java/clean/pmd/src/net/sourceforge/pmd/ast/JavaParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
3247,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
15650,
67,
916,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,
54,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
3238,
1250,
10684,
67,
23,
54,
67,
3247,
29,
1435,
288,
565,
309,
261,
78,
78,
67,
9871,
67,
2316,
12,
15650,
67,
916,
3719,
327,
638,
31,
565,
309,
261,
78,
78,
67,
23,
54,
... |
case EOL: return s4; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case ID: case 53: return s3; case EOL: return s4; case 20: return s2; default: NoViableAltException nvae = new NoViableAltException("", 13, 1, input); throw nvae; } } | 6736 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6736/afa2dad261bf082d1acd2655e8290f80c6bffb15/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
1599,
30,
7734,
648,
15935,
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,
15935,
30,
10792,
327,
... | |
if (roots.contains(element)) { | if (false && isTreepathContentProvider) { ITreePathContentProvider treePathContentProvider = (ITreePathContentProvider) contentProvider; foundRoot = treePathContentProvider.getParents(element).length > 0; System.out.println("found root for " + element + " : " + foundRoot); element = null; } else if (roots.contains(element)) { | private Saveable[] computeSaveables() { ITreeContentProvider contentProvider = (ITreeContentProvider) viewer .getContentProvider(); Object viewerInput = viewer.getInput(); List result = new ArrayList(); Set roots = new HashSet(Arrays.asList(contentProvider .getElements(viewerInput))); SaveablesProvider[] saveablesProviders = getSaveablesProviders(); for (int i = 0; i < saveablesProviders.length; i++) { SaveablesProvider saveablesProvider = saveablesProviders[i]; Saveable[] saveables = saveablesProvider.getSaveables(); for (int j = 0; j < saveables.length; j++) { Saveable saveable = saveables[j]; Object[] elements = saveablesProvider.getElements(saveable); // the saveable is added to the result if at least one of the // elements representing the saveable appears in the tree, i.e. // if its parent chain leads to a root node. boolean foundRoot = false; for (int k = 0; !foundRoot && k < elements.length; k++) { Object element = elements[k]; while (!foundRoot && element != null) { if (roots.contains(element)) { // found a parent chain leading to a root. The // saveable is part of the tree. result.add(saveable); foundRoot = true; } else { element = contentProvider.getParent(element); } } } } } return (Saveable[]) result.toArray(new Saveable[result.size()]); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/9b4676789dcf60feae3ce4307e43ed05c9614f6a/NavigatorSaveablesService.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
7074,
429,
8526,
3671,
4755,
1538,
1435,
288,
202,
202,
1285,
992,
1350,
2249,
913,
2249,
273,
261,
1285,
992,
1350,
2249,
13,
14157,
9506,
202,
18,
588,
1350,
2249,
5621,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
7074,
429,
8526,
3671,
4755,
1538,
1435,
288,
202,
202,
1285,
992,
1350,
2249,
913,
2249,
273,
261,
1285,
992,
1350,
2249,
13,
14157,
9506,
202,
18,
588,
1350,
2249,
5621,
202,... |
Node internalInsertBefore(Node newChild, Node refChild,int mutationMask) throws DOMException { if (isReadOnly()) throw new DOMExceptionImpl( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); boolean errorChecking = ownerDocument.errorChecking; if (errorChecking && newChild.getOwnerDocument() != ownerDocument) { throw new DOMExceptionImpl(DOMException.WRONG_DOCUMENT_ERR, "DOM005 Wrong document"); } if (needsSyncChildren()) { synchronizeChildren(); } if (errorChecking) { // Prevent cycles in the tree boolean treeSafe = true; for (NodeImpl a = parentNode(); treeSafe && a != null; a = a.parentNode()) { treeSafe = newChild != a; } if(!treeSafe) { throw new DOMExceptionImpl(DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } // refChild must in fact be a child of this node (or null) if(refChild != null && refChild.getParentNode() != this) { throw new DOMExceptionImpl(DOMException.NOT_FOUND_ERR, "DOM008 Not found"); } } if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) { // SLOW BUT SAFE: We could insert the whole subtree without // juggling so many next/previous pointers. (Wipe out the // parent's child-list, patch the parent pointers, set the // ends of the list.) But we know some subclasses have special- // case behavior they add to insertBefore(), so we don't risk it. // This approch also takes fewer bytecodes. // NOTE: If one of the children is not a legal child of this // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children // have been transferred. (Alternative behaviors would be to // reparent up to the first failure point or reparent all those // which are acceptable to the target node, neither of which is // as robust. PR-DOM-0818 isn't entirely clear on which it // recommends????? // No need to check kids for right-document; if they weren't, // they wouldn't be kids of that DocFrag. for (Node kid = newChild.getFirstChild(); // Prescan kid != null; kid = kid.getNextSibling()) { if (errorChecking && !ownerDocument.isKidOK(this, kid)) { throw new DOMExceptionImpl( DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } } while (newChild.hasChildNodes()) { insertBefore(newChild.getFirstChild(), refChild); } } else if (errorChecking && (!(newChild instanceof ChildNode) || !ownerDocument.isKidOK(this, newChild))) { throw new DOMExceptionImpl(DOMException.HIERARCHY_REQUEST_ERR, "DOM006 Hierarchy request error"); } else { // Convert to internal type, to avoid repeated casting ChildNode newInternal = (ChildNode)newChild; EnclosingAttr enclosingAttr=null; if(MUTATIONEVENTS && (mutationMask&MUTATION_AGGREGATE)!=0) { // MUTATION PREPROCESSING // No direct pre-events, but if we're within the scope // of an Attr and DOMAttrModified was requested, // we need to preserve its previous value. LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED); if(lc.captures+lc.bubbles+lc.defaults>0) { enclosingAttr=getEnclosingAttr(); } } Node oldparent = newInternal.parentNode(); if (oldparent != null) { oldparent.removeChild(newInternal); } // Convert to internal type, to avoid repeated casting ChildNode refInternal = (ChildNode)refChild; ChildNode prev; // Find the node we're inserting after, if any (null if // inserting to head of list) prev = (refInternal == null) ? lastChild() : refInternal.previousSibling; // Attach up newInternal.ownerNode = this; newInternal.isOwned(true); // Attach after newInternal.previousSibling = prev; if (refInternal == firstChild) { firstChild = newInternal; newInternal.isFirstChild(true); } else { prev.nextSibling = newInternal; } // Attach before newInternal.nextSibling = refInternal; if (refInternal == null) { // store lastChild as previous sibling of first child firstChild.previousSibling = newInternal; } else { refInternal.previousSibling = newInternal; refInternal.isFirstChild(false); } changed(); // update cache if we have any if (nodeListLength != -1) { nodeListLength++; } if (nodeListIndex != -1) { // if the cache happens to be the refNode do the obvious if (nodeListNode == refInternal) { nodeListIndex--; nodeListNode = newInternal; } else { // otherwise just invalidate it nodeListIndex = -1; } } if(MUTATIONEVENTS) { // MUTATION POST-EVENTS: // "Local" events (non-aggregated) if( (mutationMask&MUTATION_LOCAL) != 0) { // New child is told it was inserted, and where LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED); if(lc.captures+lc.bubbles+lc.defaults>0) { MutationEvent me= new MutationEventImpl(); //?????ownerDocument.createEvent("MutationEvents"); me.initMutationEvent( MutationEventImpl.DOM_NODE_INSERTED, true,false,this,null,null,null); newInternal.dispatchEvent(me); } // If within the Document, tell the subtree it's been added // to the Doc. lc=LCount.lookup( MutationEventImpl.DOM_NODE_INSERTED_INTO_DOCUMENT); if(lc.captures+lc.bubbles+lc.defaults>0) { NodeImpl eventAncestor=this; if(enclosingAttr!=null) eventAncestor= (NodeImpl)(enclosingAttr.node.getOwnerElement()); if(eventAncestor!=null) // Might have been orphan Attr { NodeImpl p=eventAncestor; while(p!=null) { eventAncestor=p; // Last non-null ancestor // In this context, ancestry includes // walking back from Attr to Element if(p.getNodeType()==ATTRIBUTE_NODE) p=(ElementImpl) ((AttrImpl)p).getOwnerElement(); else p=p.parentNode(); } if(eventAncestor.getNodeType()==Node.DOCUMENT_NODE) { MutationEvent me= new MutationEventImpl(); //??ownerDocument.createEvent("MutationEvents") me.initMutationEvent(MutationEventImpl .DOM_NODE_INSERTED_INTO_DOCUMENT, false,false, null,null,null,null); dispatchEventToSubtree(newInternal,me); } } } } // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified // (Common to most kinds of mutation) if( (mutationMask&MUTATION_AGGREGATE) != 0) dispatchAggregateEvents(enclosingAttr); } } return newChild; } // internalInsertBefore(Node,Node,int):Node | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/42188be95585cd27cb21281ae3b2fd0eb6e81439/ParentNode.java/clean/src/org/apache/xerces/dom/ParentNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
2029,
225,
2713,
4600,
4649,
12,
907,
225,
19783,
16,
225,
2029,
225,
1278,
1763,
16,
474,
225,
11934,
5796,
13,
5375,
1216,
225,
4703,
503,
225,
288,
540,
202,
430,
225,
261,
291,
1206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2029,
225,
2713,
4600,
4649,
12,
907,
225,
19783,
16,
225,
2029,
225,
1278,
1763,
16,
474,
225,
11934,
5796,
13,
5375,
1216,
225,
4703,
503,
225,
288,
540,
202,
430,
225,
261,
291,
1206... | ||
private static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) | protected static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) | private static ChoiceItem[] buildChoiceItems(String[] stringElements, Image[] imageElements, int choiceType, Style style) { //#ifndef polish.skipArgumentCheck if (imageElements != null && imageElements.length != stringElements.length) { //#ifdef polish.verboseDebug throw new IllegalArgumentException("imageElements need to have the same length as the stringElements."); //#else //# throw new IllegalArgumentException(); //#endif } //#endif ChoiceItem[] items = new ChoiceItem[stringElements.length]; for (int i = 0; i < stringElements.length; ++i) { Image img = null; if (imageElements != null) { img = imageElements[i]; } items[i] = new ChoiceItem( stringElements[i], img, choiceType, style ); } return items; } | 9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/ea4ecf45305dae00d475324f70dd60e969446dbb/ChoiceGroup.java/clean/j2me/source/src/de/enough/polish/ui/ChoiceGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
16432,
1180,
8526,
1361,
10538,
3126,
12,
780,
8526,
533,
3471,
16,
3421,
8526,
1316,
3471,
16,
509,
6023,
559,
16,
9767,
2154,
13,
202,
95,
202,
202,
759,
7,
430,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
16432,
1180,
8526,
1361,
10538,
3126,
12,
780,
8526,
533,
3471,
16,
3421,
8526,
1316,
3471,
16,
509,
6023,
559,
16,
9767,
2154,
13,
202,
95,
202,
202,
759,
7,
430,
82,
... |
public void collapse() { Object[] nodeList = this.getContainedElements().toArray(); ConnectionSet cs = this.localGraphStruct.getConnectionSet(); this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(new Object[]{this}, true); Iterator splitEdgeIter = localGraphStruct.getGraphModel().edges(this.getSplitter().getPort()); Iterator joinEdgeIter = localGraphStruct.getGraphModel().edges(this.getJoiner().getPort()); ArrayList edgesToRemove = new ArrayList(); while (joinEdgeIter.hasNext()) { DefaultEdge edge = (DefaultEdge) joinEdgeIter.next(); Iterator sourceIter = this.getJoiner().getSourceEdges().iterator(); while(sourceIter.hasNext()) { DefaultEdge target = (DefaultEdge) sourceIter.next(); if(target.equals(edge)) { cs.disconnect(edge, true); cs.connect(edge, this.getPort(), true); this.addSourceEdge(edge); edgesToRemove.add(edge); } } Iterator targetIter = this.getSplitter().getTargetEdges().iterator(); while(targetIter.hasNext()) { DefaultEdge source = (DefaultEdge) targetIter.next(); if (source.equals(edge)) { cs.disconnect(edge,false); cs.connect(edge, this.getPort(),false); this.addTargetEdge(edge); edgesToRemove.add(edge); } } } while (splitEdgeIter.hasNext()) { DefaultEdge edge = (DefaultEdge) splitEdgeIter.next(); Iterator sourceIter = this.getJoiner().getSourceEdges().iterator(); while(sourceIter.hasNext()) { DefaultEdge source = (DefaultEdge) sourceIter.next(); if(source.equals(edge)) { cs.disconnect(edge, true); cs.connect(edge, this.getPort(), true); this.addSourceEdge(edge); edgesToRemove.add(edge); } } Iterator targetIter = this.getSplitter().getTargetEdges().iterator(); while(targetIter.hasNext()) { DefaultEdge target = (DefaultEdge) targetIter.next(); if (target.equals(edge)) { cs.disconnect(edge,false); cs.connect(edge, this.getPort(),false); this.addTargetEdge(edge); edgesToRemove.add(edge); } } } Object[] removeArray = edgesToRemove.toArray(); for(int i = 0; i<removeArray.length;i++) { this.splitter.removeSourceEdge((DefaultEdge)removeArray[i]); this.splitter.removeTargetEdge((DefaultEdge)removeArray[i]); this.joiner.removeSourceEdge((DefaultEdge)removeArray[i]); this.joiner.removeTargetEdge((DefaultEdge)removeArray[i]); } GraphConstants.setAutoSize(this.attributes, true); this.localGraphStruct.getGraphModel().edit(localGraphStruct.getAttributes(), cs, null, null); this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(nodeList, false); for (int i = level - 1; i >= 0; i--) { this.localGraphStruct.containerNodes.hideContainersAtLevel(i); } //JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct.getJGraph()); JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct); manager.arrange(); for (int i = level - 1; i >= 0; i--) { this.localGraphStruct.setLocationContainersAtLevel(i); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/9574bffa88473a3796b28f590b1c66b1a1a61c01/GEFeedbackLoop.java/clean/streams/src/streamit/eclipse/grapheditor/graph/GEFeedbackLoop.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6459,
21405,
1435,
202,
95,
202,
202,
921,
8526,
2159,
682,
33,
2211,
18,
588,
660,
8707,
3471,
7675,
31447,
5621,
202,
202,
1952,
694,
2143,
33,
2211,
18,
3729,
4137,
3823,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6459,
21405,
1435,
202,
95,
202,
202,
921,
8526,
2159,
682,
33,
2211,
18,
588,
660,
8707,
3471,
7675,
31447,
5621,
202,
202,
1952,
694,
2143,
33,
2211,
18,
3729,
4137,
3823,
1... | ||
} | protected void createButtonsForButtonBar(Composite parent) { // create OK and Cancel buttons by default okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); //do this here because setting the text will set enablement on the ok button text.setFocus(); if (value != null) { text.setText(value); text.selectAll(); }} | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/b55db1f8df03ebade4e59f55f97c8c3917057362/InputDialog.java/clean/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/InputDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
202,
759,
752,
7791,
471,
10347,
9502,
635,
805,
202,
601,
3616,
273,
752,
3616,
12,
2938,
16,
1599,
3529,
2918,
18,
3141,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
752,
14388,
1290,
3616,
5190,
12,
9400,
982,
13,
288,
202,
759,
752,
7791,
471,
10347,
9502,
635,
805,
202,
601,
3616,
273,
752,
3616,
12,
2938,
16,
1599,
3529,
2918,
18,
3141,
67... | |
return (Resource) resources.get(name); | Resource res = (Resource) resources.get(name); if (res == null) { res = createResource(name); resources.put(name, res); } return res; | public Resource getResource(String name) { update(); return (Resource) resources.get(name); } | 46029 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46029/7af9cc6a222e81c3d73450dc423d89bd58b55cd0/AbstractRepository.java/clean/src/helma/framework/repository/AbstractRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2591,
5070,
12,
780,
508,
13,
288,
3639,
1089,
5621,
3639,
2591,
400,
273,
261,
1420,
13,
2703,
18,
588,
12,
529,
1769,
225,
309,
261,
455,
422,
446,
13,
288,
400,
273,
24317,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
2591,
5070,
12,
780,
508,
13,
288,
3639,
1089,
5621,
3639,
2591,
400,
273,
261,
1420,
13,
2703,
18,
588,
12,
529,
1769,
225,
309,
261,
455,
422,
446,
13,
288,
400,
273,
24317,
1... |
KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); | final KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); | public GUIChooser() { super("Weka GUI Chooser"); Image icon = Toolkit.getDefaultToolkit(). getImage(ClassLoader.getSystemResource("weka/gui/weka_icon.gif")); setIconImage(icon); this.getContentPane().setLayout(new BorderLayout()); JPanel wbuts = new JPanel(); wbuts.setBorder(BorderFactory.createTitledBorder("GUI")); wbuts.setLayout(new GridLayout(3, 2)); wbuts.add(m_SimpleBut); wbuts.add(m_ExplorerBut); wbuts.add(m_ExperimenterBut); wbuts.add(m_KnowledgeFlowBut); wbuts.add(m_ArffViewerBut); wbuts.add(m_LogWindowBut); this.getContentPane().add(wbuts, BorderLayout.SOUTH); JPanel wekaPan = new JPanel(); wekaPan.setToolTipText("Weka, a native bird of New Zealand"); ImageIcon wii = new ImageIcon(m_weka); JLabel wekaLab = new JLabel(wii); wekaPan.add(wekaLab); this.getContentPane().add(wekaPan, BorderLayout.CENTER); JPanel titlePan = new JPanel(); titlePan.setLayout(new GridLayout(8,1)); titlePan.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5)); titlePan.add(new JLabel("Waikato Environment for", SwingConstants.CENTER)); titlePan.add(new JLabel("Knowledge Analysis", SwingConstants.CENTER)); titlePan.add(new JLabel("")); titlePan.add(new JLabel("Version " + Version.VERSION, SwingConstants.CENTER)); titlePan.add(new JLabel("")); titlePan.add(new JLabel("(c) 1999 - 2005", SwingConstants.CENTER)); titlePan.add(new JLabel("University of Waikato", SwingConstants.CENTER)); titlePan.add(new JLabel("New Zealand", SwingConstants.CENTER)); this.getContentPane().add(titlePan, BorderLayout.NORTH); m_SimpleBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_SimpleCLI == null) { m_SimpleBut.setEnabled(false); try { m_SimpleCLI = new SimpleCLI(); } catch (Exception ex) { throw new Error("Couldn't start SimpleCLI!"); } m_SimpleCLI.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_SimpleCLI.dispose(); m_SimpleCLI = null; m_SimpleBut.setEnabled(true); checkExit(); } }); m_SimpleCLI.setVisible(true); } } }); m_ExplorerBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_ExplorerFrame == null) { m_ExplorerBut.setEnabled(false); m_ExplorerFrame = new JFrame("Weka Explorer"); m_ExplorerFrame.getContentPane().setLayout(new BorderLayout()); m_ExplorerFrame.getContentPane() .add(new Explorer(), BorderLayout.CENTER); m_ExplorerFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_ExplorerFrame.dispose(); m_ExplorerFrame = null; m_ExplorerBut.setEnabled(true); checkExit(); } }); m_ExplorerFrame.pack(); m_ExplorerFrame.setSize(800, 600); m_ExplorerFrame.setVisible(true); } } }); m_ExperimenterBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (m_ExperimenterFrame == null) { m_ExperimenterBut.setEnabled(false); m_ExperimenterFrame = new JFrame("Weka Experiment Environment"); m_ExperimenterFrame.getContentPane().setLayout(new BorderLayout()); m_ExperimenterFrame.getContentPane() .add(new Experimenter(false), BorderLayout.CENTER); m_ExperimenterFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_ExperimenterFrame.dispose(); m_ExperimenterFrame = null; m_ExperimenterBut.setEnabled(true); checkExit(); } }); m_ExperimenterFrame.pack(); m_ExperimenterFrame.setSize(800, 600); m_ExperimenterFrame.setVisible(true); } } }); KnowledgeFlowApp.addStartupListener(new weka.gui.beans.StartUpListener() { public void startUpComplete() { if (m_KnowledgeFlowFrame == null) { KnowledgeFlowApp kna = KnowledgeFlowApp.getSingleton(); m_KnowledgeFlowBut.setEnabled(false); m_KnowledgeFlowFrame = new JFrame("Weka KnowledgeFlow Environment"); m_KnowledgeFlowFrame.getContentPane().setLayout(new BorderLayout()); m_KnowledgeFlowFrame.getContentPane() .add(kna, BorderLayout.CENTER); m_KnowledgeFlowFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { m_KnowledgeFlowFrame.dispose(); m_KnowledgeFlowFrame = null; weka.gui.beans.BeanConnection.reset(); weka.gui.beans.BeanInstance.reset(null); m_KnowledgeFlowBut.setEnabled(true); checkExit(); } }); m_KnowledgeFlowFrame.pack(); m_KnowledgeFlowFrame.setSize(900, 600); m_KnowledgeFlowFrame.setVisible(true); } } }); m_KnowledgeFlowBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { KnowledgeFlow.startApp(); } }); m_ArffViewerBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ArffViewer av = new ArffViewer(); av.setVisible(true); m_ArffViewers.add(av); } }); m_LogWindowBut.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { m_LogWindow.setVisible(true); } }); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent w) { dispose(); checkExit(); } }); pack(); } | 6866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6866/1e7c5001f8e3f4ea1839c1ea366643b1a1c8cd98/GUIChooser.java/clean/gui/GUIChooser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10978,
17324,
1435,
288,
565,
2240,
2932,
3218,
7282,
10978,
1680,
83,
13164,
8863,
3639,
3421,
4126,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
565,
10567,
12,
7805,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
10978,
17324,
1435,
288,
565,
2240,
2932,
3218,
7282,
10978,
1680,
83,
13164,
8863,
3639,
3421,
4126,
273,
13288,
8691,
18,
588,
1868,
6364,
8691,
7675,
565,
10567,
12,
7805,
18,
588,... |
} if (e.getAttribute("IsCategory").compareTo("true") == 0) { t.setIsCategory(true); } else { t.setIsCategory(false); } | } | public static ITask readTask(Node node, ITask root, TaskList tlist) { //extract node and create new sub task // Element e = (Element) node; ITask t; String handle = ""; if (e.hasAttribute("ID")) { handle = e.getAttribute("ID"); } else { handle = e.getAttribute("Handle"); } String label = e.getAttribute("Label"); String priority = e.getAttribute("Priority"); if (e.getAttribute("Bugzilla").compareTo("true") == 0) { t = new BugzillaTask(handle, label, true); BugzillaTask bt = (BugzillaTask) t; bt.setState(BugTaskState.FREE); bt.setLastRefresh(new Date(new Long(e.getAttribute("LastDate")) .longValue())); if (e.getAttribute("Dirty").compareTo("true") == 0) { bt.setDirty(true); } else { bt.setDirty(false); } if (bt.readBugReport() == false) { MylarPlugin.log("Failed to read bug report", null); } } else { t = new Task(handle, label); } t.setPriority(priority); t.setPath(e.getAttribute("Path")); if (e.getAttribute("Active").compareTo("true") == 0) { t.setActive(true); tlist.setActive(t, true); } else { t.setActive(false); } if (e.getAttribute("Complete").compareTo("true") == 0) { t.setCompleted(true); } else { t.setCompleted(false); } if (e.getAttribute("IsCategory").compareTo("true") == 0) { t.setIsCategory(true); } else { t.setIsCategory(false); } if (e.hasAttribute("Notes")) { t.setNotes(e.getAttribute("Notes")); } else { t.setNotes(""); } if (e.hasAttribute("Elapsed")) { t.setElapsedTime(e.getAttribute("Elapsed")); } else { t.setElapsedTime(""); } if (e.hasAttribute("Estimated")) { t.setEstimatedTime(e.getAttribute("Estimated")); } else { t.setEstimatedTime(""); } int i = 0; while (e.hasAttribute("link"+i)) { t.getRelatedLinks().add(e.getAttribute("link"+i)); i++; } if (!readVersion.equals("1.0.0")) { // for newer revisions // XXX: readVersion had to be read once to remove warning.. } i = 0; NodeList list = e.getChildNodes(); for (i = 0; i < list.getLength(); i++) { Node child = list.item(i); t.addSubtask(readTask(child, t, tlist)); } if (root != null) { t.setParent(root); } return t; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/9fa4576e36e0ed40d7b1e9e3379eb977186a3224/XmlUtil.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/util/XmlUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
467,
2174,
855,
2174,
12,
907,
756,
16,
467,
2174,
1365,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
759,
8004,
756,
471,
752,
394,
720,
1562,
202,
202,
759,
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,
760,
467,
2174,
855,
2174,
12,
907,
756,
16,
467,
2174,
1365,
16,
3837,
682,
268,
1098,
13,
288,
202,
202,
759,
8004,
756,
471,
752,
394,
720,
1562,
202,
202,
759,
202,
202,... |
public void setAttribute(String name, Object value) { if( proxyFactory != null ) proxyFactory.setAttribute(name,value); | public void setAttribute (String name, Object value) { if (proxyFactory != null) { proxyFactory.setAttribute (name, value); } | public void setAttribute(String name, Object value) { if( proxyFactory != null ) proxyFactory.setAttribute(name,value); if (value == null) { attributes.remove(name); } else { attributes.put(name, value); } } | 4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/62d71000b6d84642b07f67c825f685d42190715c/LogFactoryImpl.java/clean/src/java/org/logicalcobwebs/logging/impl/LogFactoryImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4730,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
12,
2889,
1733,
480,
446,
262,
5411,
2889,
1733,
18,
542,
1499,
12,
529,
16,
1132,
1769,
3639,
309,
261,
1132,
422,
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,
377,
1071,
918,
4730,
12,
780,
508,
16,
1033,
460,
13,
288,
3639,
309,
12,
2889,
1733,
480,
446,
262,
5411,
2889,
1733,
18,
542,
1499,
12,
529,
16,
1132,
1769,
3639,
309,
261,
1132,
422,
4... |
path = getRepositoryPath(path); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; | try{ openRepository(); path = SVNPathUtil.canonicalizeAbsPath(getRepositoryPath(path)); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; }finally{ closeRepository(); } | public SVNLock getLock(String path) throws SVNException { path = getRepositoryPath(path); SVNLock lock = FSReader.getLockHelper(path, false, myReposRootDir); return lock; } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/b3f8504a7a88adac90f7f3c9205942041f95e328/FSRepository.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/io/fs/FSRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2531,
22206,
12,
780,
589,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
8261,
743,
12,
803,
1769,
3639,
29537,
50,
2531,
2176,
273,
9247,
2514,
18,
588,
2531,
2276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
29537,
50,
2531,
22206,
12,
780,
589,
13,
1216,
29537,
50,
503,
288,
3639,
589,
273,
8261,
743,
12,
803,
1769,
3639,
29537,
50,
2531,
2176,
273,
9247,
2514,
18,
588,
2531,
2276,
1... |
"An error occurred while setting the value."); | BindingMessages.getString("ValueBinding_ErrorWhileSettingValue")); | public void updateModelFromTarget() { Object value = target.getValue(); String validationError = doValidateTarget(value); if (validationError == null) { try { model.setValue(converter.convertTargetToModel(value)); } catch (Exception ex) { context.updateValidationError(this, "An error occurred while setting the value."); } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/72f1f804799a0ffd127eeb44d2c1cc0229cf194a/ValueBinding.java/buggy/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/binding/internal/ValueBinding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
1488,
1265,
2326,
1435,
288,
202,
202,
921,
460,
273,
1018,
18,
24805,
5621,
202,
202,
780,
3379,
668,
273,
741,
4270,
2326,
12,
1132,
1769,
202,
202,
430,
261,
868... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1089,
1488,
1265,
2326,
1435,
288,
202,
202,
921,
460,
273,
1018,
18,
24805,
5621,
202,
202,
780,
3379,
668,
273,
741,
4270,
2326,
12,
1132,
1769,
202,
202,
430,
261,
868... |
case LogChute.TRACE_ID: logger.debug(RuntimeConstants.TRACE_PREFIX + message); | case TRACE_ID: logger.debug(TRACE_PREFIX + message); | public void log(int level, String message) { /* * based on level, call the right logger method * and prefix with the appropos prefix */ switch (level) { case LogChute.WARN_ID: logger.warn( RuntimeConstants.WARN_PREFIX + message ); break; case LogChute.INFO_ID: logger.info( RuntimeConstants.INFO_PREFIX + message); break; case LogChute.DEBUG_ID: logger.debug( RuntimeConstants.DEBUG_PREFIX + message); break; case LogChute.TRACE_ID: logger.debug(RuntimeConstants.TRACE_PREFIX + message); break; case LogChute.ERROR_ID: logger.error(RuntimeConstants.ERROR_PREFIX + message); break; default: logger.info( message); break; } } | 9291 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9291/1b548b8f3043015b71b0698aa7fa1f775125d16c/AvalonLogChute.java/buggy/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
12,
474,
1801,
16,
514,
883,
13,
565,
288,
3639,
1748,
540,
380,
2511,
603,
1801,
16,
745,
326,
2145,
1194,
707,
540,
380,
471,
1633,
598,
326,
6617,
917,
1633,
540,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
12,
474,
1801,
16,
514,
883,
13,
565,
288,
3639,
1748,
540,
380,
2511,
603,
1801,
16,
745,
326,
2145,
1194,
707,
540,
380,
471,
1633,
598,
326,
6617,
917,
1633,
540,
1... |
if(subNode != null) { | if (subNode != null) { | public void layout() { // Determine all the up- and downlinks for each node for(int i=0; i < _layoutedClassNodes.size(); i++) { ClassdiagramNode classdiagramNode = getClassdiagramNode(i); if(!classdiagramNode.isPackage()) { Object node = classdiagramNode.getFigure().getOwner(); if ( ModelFacade.isAModelElement(node)) { Vector specs = new Vector(((MModelElement)node).getClientDependencies()); specs.addAll(ModelFacade.getSupplierDependencies(node)); for( Iterator iter = specs.iterator(); iter.hasNext(); ) { // Realizations are stored as MAbstractions with a stereotype 'realize'. // MAbstraction is a subclass of MDependency, so get all the dependencies // for this node to get the abstractions, too. Object dep = iter.next(); if( ModelFacade.isAAbstraction(dep)) { // Is this a abstraction? Object abstr = dep; if (ModelFacade.isRealize(abstr)) { // Is this node the class, that implements the interface? Collection clients = ModelFacade.getClients(abstr); for( Iterator iter2 = clients.iterator(); iter2.hasNext(); ) { MModelElement me = (MModelElement)iter2.next(); if(node == me) { Collection suppliers = ModelFacade.getSuppliers(abstr); for( Iterator iter3 = suppliers.iterator(); iter3.hasNext(); ) { Object me2 = iter3.next(); if(ModelFacade.isAClassifier(me2)) { ClassdiagramNode superNode = getClassdiagramNode4owner(me2); if(superNode != null) { classdiagramNode.addUplink(superNode); } } } } } // Or the implemented interface? Collection suppliers = ModelFacade.getSuppliers(abstr); for( Iterator iter2 = suppliers.iterator(); iter2.hasNext(); ) { MModelElement me = (MModelElement)iter2.next(); if(node == me) { clients = ModelFacade.getClients(abstr); for( Iterator iter3 = clients.iterator(); iter3.hasNext(); ) { Object me2 = iter3.next(); if(ModelFacade.isAClassifier(me2)) { ClassdiagramNode subNode = getClassdiagramNode4owner(me2); if(subNode != null) { classdiagramNode.addDownlink(subNode); } } } } } } } } } if ( ModelFacade.isAGeneralizableElement(node) ) { for( Iterator iter = ModelFacade.getGeneralizations(node) ; iter.hasNext(); ) { Object g = iter.next(); ClassdiagramNode superNode = getClassdiagramNode4owner(ModelFacade.getParent(g)); if(superNode != null) { classdiagramNode.addUplink(superNode); } } for( Iterator iter = ModelFacade.getSpecializations(node); iter.hasNext(); ) { Object s = iter.next(); ClassdiagramNode subNode = getClassdiagramNode4owner(ModelFacade.getChild(s)); if(subNode != null) { classdiagramNode.addDownlink(subNode); } } } } } // determine maximum package rank and move the classes below rankPackagesAndMoveClassesBelow(); // layout the Packages layoutPackages(); // weightAndPlaceClasses() weightAndPlaceClasses(); // center rows //centerPlacedRows(); ClassdiagramEdge.setVGap(_vGap); ClassdiagramEdge.setHGap(_hGap); for (int i = 0; i < _layoutedObjects.size(); i++) if (_layoutedObjects.elementAt(i) instanceof ClassdiagramEdge) ((ClassdiagramEdge)_layoutedObjects.elementAt(i)).layout(); // Globals.curEditor().damageAll(); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/ClassdiagramLayouter.java/clean/src_new/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3511,
1435,
288,
27573,
368,
10229,
777,
326,
731,
17,
471,
2588,
7135,
364,
1517,
756,
3639,
364,
12,
474,
277,
33,
20,
31,
277,
411,
389,
6741,
329,
797,
3205,
18,
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,
377,
1071,
918,
3511,
1435,
288,
27573,
368,
10229,
777,
326,
731,
17,
471,
2588,
7135,
364,
1517,
756,
3639,
364,
12,
474,
277,
33,
20,
31,
277,
411,
389,
6741,
329,
797,
3205,
18,
1467,
... |
patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); | if (status.getState() == FileStatus.NEW) { DefaultListModel model = new DefaultListModel(); String[] lines = StringUtilities.readLinesFromFile(new File(repositoryRoot, status.getName()).getAbsolutePath()); for (int i = 0; i < lines.length; ++i) { model.addElement(lines[i]); } patchView.setModel(model); } else { patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); } | public void valueChanged(ListSelectionEvent e) { if (e.getValueIsAdjusting()) { return; } final int selectedRow = statusesTable.getSelectedRow(); FileStatus status = statusesTableModel.getFileStatus(selectedRow); patchView.showPatch(backEnd, repositoryRoot, null, null, status.getName()); } | 10883 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10883/f41bb209e0b40f911f74c83e893d68ff307a7622/CheckInWindow.java/clean/trunk/src/e/scm/CheckInWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
460,
5033,
12,
682,
6233,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
24805,
2520,
10952,
310,
10756,
288,
10792,
327,
31,
7734,
289,
27573,
727,
509,
3170,
1999,
273,
13516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
460,
5033,
12,
682,
6233,
1133,
425,
13,
288,
7734,
309,
261,
73,
18,
24805,
2520,
10952,
310,
10756,
288,
10792,
327,
31,
7734,
289,
27573,
727,
509,
3170,
1999,
273,
13516,
... |
if(aname.equals("PLAIN")) | else if(aname.equals("PLAIN")) | public void attribute(String aname, String value, boolean specified) { if(!specified) return; if(aname.equals("X")) config.x = Integer.parseInt(value); if(aname.equals("Y")) config.y = Integer.parseInt(value); if(aname.equals("WIDTH")) config.width = Integer.parseInt(value); if(aname.equals("HEIGHT")) config.height = Integer.parseInt(value); if(aname.equals("EXT_STATE")) config.extState = Integer.parseInt(value); if(aname.equals("PLAIN")) config.plainView = ("TRUE".equals(value)); } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/2510b6194362251bb1ab1e1468c834b198fc4e91/PerspectiveManager.java/buggy/org/gjt/sp/jedit/PerspectiveManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
1269,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
13827,
13,
9506,
202,
2463,
31,
1082,
202,
430,
12,
304,
339,
18,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
918,
1566,
12,
780,
392,
339,
16,
514,
460,
16,
1250,
1269,
13,
202,
202,
95,
1082,
202,
430,
12,
5,
13827,
13,
9506,
202,
2463,
31,
1082,
202,
430,
12,
304,
339,
18,
149... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.