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 |
|---|---|---|---|---|---|---|
if (!type.equals("") || (elementMiscFlags > 0) | if (!type.equals("") || (elementMiscFlags > 0) | private QName traverseElementDecl(Element elementDecl) throws Exception { int contentSpecType = -1; int contentSpecNodeIndex = -1; int typeNameIndex = -1; int scopeDefined = -2; //signal a error if -2 gets gets through //cause scope can never be -2. DatatypeValidator dv = null; String name = elementDecl.getAttribute(SchemaSymbols.ATT_NAME); if ( DEBUGGING ) System.out.println("traversing element decl : " + name ); String ref = elementDecl.getAttribute(SchemaSymbols.ATT_REF); String type = elementDecl.getAttribute(SchemaSymbols.ATT_TYPE); String minOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MINOCCURS); String maxOccurs = elementDecl.getAttribute(SchemaSymbols.ATT_MAXOCCURS); String dflt = elementDecl.getAttribute(SchemaSymbols.ATT_DEFAULT); String fixed = elementDecl.getAttribute(SchemaSymbols.ATT_FIXED); if(!(dflt.equals("") || fixed.equals(""))) // REVISIT: localize reportGenericSchemaError("an element cannot have both \"fixed\" and \"default\" present at the same time"); String substitutionGroup = elementDecl.getAttribute(SchemaSymbols.ATT_SUBSTITUTIONGROUP); // form attribute String isQName = elementDecl.getAttribute(SchemaSymbols.ATT_FORM); String fromAnotherSchema = null; if (isTopLevel(elementDecl)) { if(name.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element must have a name"); else if (!ref.equals("")) // REVISIT: localize reportGenericSchemaError("globally-declared element " + name + " cannot have a ref attribute"); int nameIndex = fStringPool.addSymbol(name); int eltKey = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, nameIndex,TOP_LEVEL_SCOPE); if (eltKey > -1 ) { return new QName(-1,nameIndex,nameIndex,fTargetNSURI); } } // parse out 'block', 'final', 'nullable', 'abstract' String blockSetStr = null; Attr blockAttr = elementDecl.getAttributeNode( SchemaSymbols.ATT_BLOCK ); if (blockAttr != null) blockSetStr = blockAttr.getValue(); int blockSet = parseBlockSet(blockSetStr); if( (blockSetStr != null) && !blockSetStr.equals("") && (!blockSetStr.equals(SchemaSymbols.ATTVAL_POUNDALL) && (((blockSet & SchemaSymbols.RESTRICTION) == 0) && (((blockSet & SchemaSymbols.EXTENSION) == 0) && ((blockSet & SchemaSymbols.SUBSTITUTION) == 0))))) reportGenericSchemaError("The values of the 'block' attribute of an element must be either #all or a list of 'substitution', 'restriction' and 'extension'; " + blockSetStr + " was found"); String finalSetStr = null; Attr finalAttr = elementDecl.getAttributeNode( SchemaSymbols.ATT_FINAL ); if (finalAttr != null) finalSetStr = finalAttr.getValue(); int finalSet = parseFinalSet(finalSetStr); if( (finalSetStr != null) && !finalSetStr.equals("") && (!finalSetStr.equals(SchemaSymbols.ATTVAL_POUNDALL) && (((finalSet & SchemaSymbols.RESTRICTION) == 0) && ((finalSet & SchemaSymbols.EXTENSION) == 0)))) reportGenericSchemaError("The values of the 'final' attribute of an element must be either #all or a list of 'restriction' and 'extension'; " + finalSetStr + " was found"); boolean isNullable = elementDecl.getAttribute (SchemaSymbols.ATT_NULLABLE).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; boolean isAbstract = elementDecl.getAttribute (SchemaSymbols.ATT_ABSTRACT).equals(SchemaSymbols.ATTVAL_TRUE)? true:false; int elementMiscFlags = 0; if (isNullable) { elementMiscFlags += SchemaSymbols.NULLABLE; } if (isAbstract) { elementMiscFlags += SchemaSymbols.ABSTRACT; } // make the property of the element's value being fixed also appear in elementMiscFlags if(!fixed.equals("")) elementMiscFlags += SchemaSymbols.FIXED; //if this is a reference to a global element if (!ref.equals("")) { //REVISIT top level check for ref if (!type.equals("") || (elementMiscFlags > 0) || (finalSetStr != null && finalSet > 0) || (blockSetStr != null && blockSet > 0) || !dflt.equals("") || !fixed.equals("")) reportSchemaError(SchemaMessageProvider.BadAttWithRef, null); if (!name.equals("")) // REVISIT: Localize reportGenericSchemaError("element " + name + " cannot also have a ref attribute"); Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { if (XUtil.getNextSiblingElement(child) != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); else traverseAnnotationDecl(child); } else if (child != null) reportSchemaError(SchemaMessageProvider.NoContentForRef, null); String prefix = ""; String localpart = ref; int colonptr = ref.indexOf(":"); if ( colonptr > 0) { prefix = ref.substring(0,colonptr); localpart = ref.substring(colonptr+1); } int localpartIndex = fStringPool.addSymbol(localpart); String uriString = resolvePrefixToURI(prefix); QName eltName = new QName(prefix != null ? fStringPool.addSymbol(prefix) : -1, localpartIndex, fStringPool.addSymbol(ref), uriString != null ? fStringPool.addSymbol(uriString) : StringPool.EMPTY_STRING); //if from another schema, just return the element QName if (! uriString.equals(fTargetNSURIString) ) { return eltName; } int elementIndex = fSchemaGrammar.getElementDeclIndex(eltName, TOP_LEVEL_SCOPE); //if not found, traverse the top level element that if referenced if (elementIndex == -1 ) { Element targetElement = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT,localpart); if (targetElement == null ) { // REVISIT: Localize reportGenericSchemaError("Element " + localpart + " not found in the Schema"); //REVISIT, for now, the QName anyway return eltName; //return new QName(-1,fStringPool.addSymbol(localpart), -1, fStringPool.addSymbol(uriString)); } else { // do nothing here, other wise would cause infinite loop for // <element name="recur"><complexType><element ref="recur"> ... //eltName= traverseElementDecl(targetElement); } } return eltName; } else if (name.equals("")) // REVISIT: Localize reportGenericSchemaError("a local element must have a name or a ref attribute present"); // Handle the substitutionGroup Element substitutionGroupElementDecl = null; int substitutionGroupElementDeclIndex = -1; boolean noErrorSoFar = true; String substitutionGroupUri = null; String substitutionGroupLocalpart = null; String substitutionGroupFullName = null; ComplexTypeInfo substitutionGroupEltTypeInfo = null; DatatypeValidator substitutionGroupEltDV = null; if ( substitutionGroup.length() > 0 ) { if(!ref.equals("")) // REVISIT: Localize reportGenericSchemaError("a local element cannot have a substitutionGroup"); substitutionGroupUri = resolvePrefixToURI(getPrefix(substitutionGroup)); substitutionGroupLocalpart = getLocalPart(substitutionGroup); substitutionGroupFullName = substitutionGroupUri+","+substitutionGroupLocalpart; if ( !substitutionGroupUri.equals(fTargetNSURIString) ) { substitutionGroupEltTypeInfo = getElementDeclTypeInfoFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltTypeInfo == null) { substitutionGroupEltDV = getElementDeclTypeValidatorFromNS(substitutionGroupUri, substitutionGroupLocalpart); if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } else { substitutionGroupElementDecl = getTopLevelComponentByName(SchemaSymbols.ELT_ELEMENT, substitutionGroupLocalpart); if (substitutionGroupElementDecl == null) { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("unable to locate substitutionGroup affiliation element " +substitutionGroup +" in element declaration " +name); } } else { substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); if ( substitutionGroupElementDeclIndex == -1) { traverseElementDecl(substitutionGroupElementDecl); substitutionGroupElementDeclIndex = fSchemaGrammar.getElementDeclIndex(fTargetNSURI, getLocalPartIndex(substitutionGroup),TOP_LEVEL_SCOPE); } } if (substitutionGroupElementDeclIndex != -1) { substitutionGroupEltTypeInfo = fSchemaGrammar.getElementComplexTypeInfo( substitutionGroupElementDeclIndex ); if (substitutionGroupEltTypeInfo == null) { fSchemaGrammar.getElementDecl(substitutionGroupElementDeclIndex, fTempElementDecl); substitutionGroupEltDV = fTempElementDecl.datatypeValidator; if (substitutionGroupEltDV == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type for element '" +substitutionGroupLocalpart + "' in schema '" + substitutionGroupUri+"'"); } } } } } // // resolving the type for this element right here // ComplexTypeInfo typeInfo = null; // element has a single child element, either a datatype or a type, null if primitive Element child = XUtil.getFirstChildElement(elementDecl); if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(child); child = XUtil.getNextSiblingElement(child); } if(child != null && child.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) // REVISIT: Localize reportGenericSchemaError("element declarations can contain at most one annotation Element Information Item"); boolean haveAnonType = false; // Handle Anonymous type if there is one if (child != null) { String childName = child.getLocalName(); if (childName.equals(SchemaSymbols.ELT_COMPLEXTYPE)) { if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous complexType in element '" + name +"' has a name attribute"); } else { // Determine what the type name will be String anonTypeName = genAnonTypeName(child); if (fCurrentTypeNameStack.search((Object)anonTypeName) > - 1) { // A recursing element using an anonymous type int uriInd = StringPool.EMPTY_STRING; if ( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified) { uriInd = fTargetNSURI; } int nameIndex = fStringPool.addSymbol(name); QName tempQName = new QName(fCurrentScope, nameIndex, nameIndex, uriInd); fElementRecurseComplex.put(tempQName, anonTypeName); return new QName(-1, nameIndex, nameIndex, uriInd); } else { typeNameIndex = traverseComplexTypeDecl(child); if (typeNameIndex != -1 ) { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse complexType error in element '" + name +"'"); } } } haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (childName.equals(SchemaSymbols.ELT_SIMPLETYPE)) { if (child.getAttribute(SchemaSymbols.ATT_NAME).length() > 0) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("anonymous simpleType in element '" + name +"' has a name attribute"); } else typeNameIndex = traverseSimpleTypeDecl(child); if (typeNameIndex != -1) { dv = fDatatypeRegistry.getDatatypeValidator(fStringPool.toString(typeNameIndex)); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("traverse simpleType error in element '" + name +"'"); } contentSpecType = XMLElementDecl.TYPE_SIMPLE; haveAnonType = true; child = XUtil.getNextSiblingElement(child); } else if (type.equals("")) { // "ur-typed" leaf contentSpecType = XMLElementDecl.TYPE_ANY; //REVISIT: is this right? //contentSpecType = fStringPool.addSymbol("UR_TYPE"); // set occurrence count contentSpecNodeIndex = -1; } // see if there's something here; it had better be key, keyref or unique. if (child != null) childName = child.getLocalName(); while ((child != null) && ((childName.equals(SchemaSymbols.ELT_KEY)) || (childName.equals(SchemaSymbols.ELT_KEYREF)) || (childName.equals(SchemaSymbols.ELT_UNIQUE)))) { child = XUtil.getNextSiblingElement(child); if (child != null) { childName = child.getLocalName(); } } if (child != null) { // REVISIT: Localize noErrorSoFar = false; reportGenericSchemaError("the content of an element information item must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)"); } } // handle type="" here if (haveAnonType && (type.length()>0)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError( "Element '"+ name + "' have both a type attribute and a annoymous type child" ); } // type specified as an attribute and no child is type decl. else if (!type.equals("")) { String prefix = ""; String localpart = type; int colonptr = type.indexOf(":"); if ( colonptr > 0) { prefix = type.substring(0,colonptr); localpart = type.substring(colonptr+1); } String typeURI = resolvePrefixToURI(prefix); // check if the type is from the same Schema if ( !typeURI.equals(fTargetNSURIString) && !typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && typeURI.length() != 0) { // REVISIT, only needed because of resolvePrifixToURI. fromAnotherSchema = typeURI; typeInfo = getTypeInfoFromNS(typeURI, localpart); if (typeInfo == null) { dv = getTypeValidatorFromNS(typeURI, localpart); if (dv == null) { //TO DO: report error here; noErrorSoFar = false; reportGenericSchemaError("Could not find type " +localpart + " in schema " + typeURI); } } } else { typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(typeURI+","+localpart); if (typeInfo == null) { dv = getDatatypeValidator(typeURI, localpart); if (dv == null ) if (typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) && !fTargetNSURIString.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } else { Element topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_COMPLEXTYPE,localpart); if (topleveltype != null) { if (fCurrentTypeNameStack.search((Object)localpart) > - 1) { //then we found a recursive element using complexType. // REVISIT: this will be broken when recursing happens between 2 schemas int uriInd = StringPool.EMPTY_STRING; if ( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified) { uriInd = fTargetNSURI; } int nameIndex = fStringPool.addSymbol(name); QName tempQName = new QName(fCurrentScope, nameIndex, nameIndex, uriInd); fElementRecurseComplex.put(tempQName, localpart); return new QName(-1, nameIndex, nameIndex, uriInd); } else { typeNameIndex = traverseComplexTypeDecl( topleveltype ); typeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(typeNameIndex)); } } else { topleveltype = getTopLevelComponentByName(SchemaSymbols.ELT_SIMPLETYPE, localpart); if (topleveltype != null) { typeNameIndex = traverseSimpleTypeDecl( topleveltype ); dv = getDatatypeValidator(typeURI, localpart); } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("type not found : " + typeURI+":"+localpart); } } } } } } // now we need to make sure that our substitution (if any) // is valid, now that we have all the requisite type-related info. if(substitutionGroup.length() > 0) { checkSubstitutionGroupOK(elementDecl, substitutionGroupElementDecl, noErrorSoFar, substitutionGroupElementDeclIndex, typeInfo, substitutionGroupEltTypeInfo, dv, substitutionGroupEltDV); } // this element is ur-type, check its substitutionGroup affiliation. // if there is substitutionGroup affiliation and not type definition found for this element, // then grab substitutionGroup affiliation's type and give it to this element if ( noErrorSoFar && typeInfo == null && dv == null ) { typeInfo = substitutionGroupEltTypeInfo; dv = substitutionGroupEltDV; } if (typeInfo == null && dv==null) { if (noErrorSoFar) { // Actually this Element's type definition is ur-type; contentSpecType = XMLElementDecl.TYPE_ANY; // REVISIT, need to wait till we have wildcards implementation. // ADD attribute wildcards here } else { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError ("untyped element : " + name ); } } // if element belongs to a compelx type if (typeInfo!=null) { contentSpecNodeIndex = typeInfo.contentSpecHandle; contentSpecType = typeInfo.contentType; scopeDefined = typeInfo.scopeDefined; dv = typeInfo.datatypeValidator; } // if element belongs to a simple type if (dv!=null) { contentSpecType = XMLElementDecl.TYPE_SIMPLE; if (typeInfo == null) { fromAnotherSchema = null; // not to switch schema in this case } } // Now we can handle validation etc. of default and fixed attributes, // since we finally have all the type information. if(!fixed.equals("")) dflt = fixed; if(!dflt.equals("")) { if(dv == null) { // in this case validate according to xs:string new StringDatatypeValidator().validate(dflt, null); } else { dv.validate(dflt, null); } if(typeInfo != null && (typeInfo.contentType != XMLElementDecl.TYPE_MIXED && typeInfo.contentType != XMLElementDecl.TYPE_SIMPLE)) { // REVISIT: Localize reportGenericSchemaError ("element " + name + " has a fixed or default value and must have a mixed or simple content model"); } } // // Create element decl // int elementNameIndex = fStringPool.addSymbol(name); int localpartIndex = elementNameIndex; int uriIndex = StringPool.EMPTY_STRING; int enclosingScope = fCurrentScope; //refer to 4.3.2 in "XML Schema Part 1: Structures" if ( isTopLevel(elementDecl)) { uriIndex = fTargetNSURI; enclosingScope = TOP_LEVEL_SCOPE; } else if ( !isQName.equals(SchemaSymbols.ATTVAL_UNQUALIFIED) && (( isQName.equals(SchemaSymbols.ATTVAL_QUALIFIED)|| fElementDefaultQualified ))) { uriIndex = fTargetNSURI; } //There can never be two elements with the same name and different type in the same scope. int existSuchElementIndex = fSchemaGrammar.getElementDeclIndex(uriIndex, localpartIndex, enclosingScope); if ( existSuchElementIndex > -1) { fSchemaGrammar.getElementDecl(existSuchElementIndex, fTempElementDecl); DatatypeValidator edv = fTempElementDecl.datatypeValidator; ComplexTypeInfo eTypeInfo = fSchemaGrammar.getElementComplexTypeInfo(existSuchElementIndex); if ( ((eTypeInfo != null)&&(eTypeInfo!=typeInfo)) || ((edv != null)&&(edv != dv)) ) { noErrorSoFar = false; // REVISIT: Localize reportGenericSchemaError("duplicate element decl in the same scope : " + fStringPool.toString(localpartIndex)); } } QName eltQName = new QName(-1,localpartIndex,elementNameIndex,uriIndex); // add element decl to pool int attrListHead = -1 ; // copy up attribute decls from type object if (typeInfo != null) { attrListHead = typeInfo.attlistHead; } int elementIndex = fSchemaGrammar.addElementDecl(eltQName, enclosingScope, scopeDefined, contentSpecType, contentSpecNodeIndex, attrListHead, dv); if ( DEBUGGING ) { /***/ System.out.println("########elementIndex:"+elementIndex+" ("+fStringPool.toString(eltQName.uri)+"," + fStringPool.toString(eltQName.localpart) + ")"+ " eltType:"+type+" contentSpecType:"+contentSpecType+ " SpecNodeIndex:"+ contentSpecNodeIndex +" enclosingScope: " +enclosingScope + " scopeDefined: " +scopeDefined+"\n"); /***/ } fSchemaGrammar.setElementComplexTypeInfo(elementIndex, typeInfo); // REVISIT: should we report error if typeInfo was null? // mark element if its type belongs to different Schema. fSchemaGrammar.setElementFromAnotherSchemaURI(elementIndex, fromAnotherSchema); // set BlockSet, FinalSet, Nullable and Abstract for this element decl fSchemaGrammar.setElementDeclBlockSet(elementIndex, blockSet); fSchemaGrammar.setElementDeclFinalSet(elementIndex, finalSet); fSchemaGrammar.setElementDeclMiscFlags(elementIndex, elementMiscFlags); fSchemaGrammar.setElementDefault(elementIndex, dflt); // setSubstitutionGroupElementFullName fSchemaGrammar.setElementDeclSubstitutionGroupElementFullName(elementIndex, substitutionGroupFullName); // // key/keyref/unique processing // Element ic = XUtil.getFirstChildElementNS(elementDecl, IDENTITY_CONSTRAINTS); if (ic != null) { Integer elementIndexObj = new Integer(elementIndex); Vector identityConstraints = (Vector)fIdentityConstraints.get(elementIndexObj); if (identityConstraints == null) { identityConstraints = new Vector(); fIdentityConstraints.put(elementIndexObj, identityConstraints); } while (ic != null) { if (DEBUG_IC_DATATYPES) { System.out.println("<ICD>: adding ic for later traversal: "+ic); } identityConstraints.addElement(ic); ic = XUtil.getNextSiblingElementNS(ic, IDENTITY_CONSTRAINTS); } } return eltQName; }// end of method traverseElementDecl(Element) | 1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/87731f2b2070ba79da173a5e6be82410b096d7c5/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16723,
10080,
1046,
3456,
12,
1046,
930,
3456,
13,
1216,
1185,
288,
3639,
509,
29617,
559,
1377,
273,
300,
21,
31,
3639,
509,
29617,
907,
1016,
273,
300,
21,
31,
3639,
509,
8173,
... |
if ((k < length) && (text.charAt(k) == '{')){ | if ((k < length) && (text.charAt(k) == '{')) { | private int _indentSpecialCases(int tab, int distToPrevNewline) throws BadLocationException { //not a special case. if (distToPrevNewline == -1) return tab; //setup int start = _reduced.getDistToPreviousNewline(distToPrevNewline + 1); if (start == -1) start = 0; else start = _currentLocation - start; String text = this.getText(start,_currentLocation - start); //case of } int length = text.length(); int k = length - distToPrevNewline; while (k < length && text.charAt(k) == ' ') k++; if(k < length && text.charAt(k) == '}') tab -= _indent; // if no matching { then let offset be 0. if(tab < 0) tab = 0; //non-normal endings int i = length - distToPrevNewline - 2; int distanceMoved = distToPrevNewline + 2; move(-distToPrevNewline - 2); //assumed: we are at end of a line. while (i >= 0 && _isCommentedOrSpace(i, text)){ i--; if (i > 0){ //gaurentees you don't move into document Start. distanceMoved++; move(-1); } } move (distanceMoved); //move the document bac. if (i >= 0 && !(_normEndings.contains(text.substring(i, i+1)))) { int j = 0; while ((j < length) && (text.charAt(j) == ' ')) j++; if ((k < length) && (text.charAt(k) == '{')){ if ((j < length) && (text.charAt(j) == '{')) tab = j + _indent; else tab = j; } else tab = j + _indent; } //return tab return tab; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/e325016b29b8dde8e3ba0908ae34d55edb22c64f/DefinitionsDocument.java/buggy/drjava/src/edu/rice/cs/drjava/DefinitionsDocument.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
389,
9355,
12193,
30744,
12,
474,
3246,
16,
509,
2411,
774,
9958,
26754,
13,
565,
1216,
6107,
2735,
503,
225,
288,
565,
368,
902,
279,
4582,
648,
18,
565,
309,
261,
4413,
774... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
509,
389,
9355,
12193,
30744,
12,
474,
3246,
16,
509,
2411,
774,
9958,
26754,
13,
565,
1216,
6107,
2735,
503,
225,
288,
565,
368,
902,
279,
4582,
648,
18,
565,
309,
261,
4413,
774... |
yaccValue = ">"; src.unread(c); | src.unread(c); yaccValue = new Token(">", getPosition(null, false)); | private int yylex() { char c; boolean spaceSeen = false; boolean commandState; if (lex_strterm != null) { int tok = lex_strterm.parseString(this, src); if (tok == Tokens.tSTRING_END || tok == Tokens.tREGEXP_END) { lex_strterm = null; lex_state = LexState.EXPR_END; } return tok; } currentPos = src.getPosition(); commandState = commandStart; commandStart = false; retry: for(;;) { c = src.read(); switch(c) { case '\004': /* ^D */ case '\032': /* ^Z */ case 0: /* end of script. */ return 0; /* white spaces */ case ' ': case '\t': case '\f': case '\r': case '\13': /* '\v' */ spaceSeen = true; continue retry; case '#': /* it's a comment */ while ((c = src.read()) != '\n') { if (c == EOF) { return 0; } } /* fall through */ case '\n': // Replace a string of newlines with a single one while((c = src.read()) == '\n') { currentPos = src.getPosition(); } src.unread( c ); if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_CLASS) { continue retry; } commandStart = true; lex_state = LexState.EXPR_BEG; return '\n'; case '*': if ((c = src.read()) == '*') { if ((c = src.read()) == '=') { yaccValue = "**"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } yaccValue = "**"; src.unread(c); c = Tokens.tPOW; } else { if (c == '=') { yaccValue = "*"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { warnings.warning(src.getPosition(), "`*' interpreted as argument prefix"); c = Tokens.tSTAR; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tSTAR; } else { c = Tokens.tSTAR2; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "*"; return c; case '!': lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { return Tokens.tNEQ; } if (c == '~') { return Tokens.tNMATCH; } src.unread(c); return Tokens.tBANG; case '=': // Skip documentation nodes if (src.wasBeginOfLine()) { /* skip embedded rd document */ if (isNextNoCase("begin")) { c = src.read(); if (Character.isWhitespace(c)) { // In case last next was the newline. src.unread(c); for (;;) { c = src.read(); // If a line is followed by a blank line put // it back. while (c == '\n') { c = src.read(); } if (c == EOF) { throw new SyntaxException(src.getPosition(), "embedded document meets end of file"); } if (c != '=') continue; if (src.wasBeginOfLine() && isNextNoCase("end")) { //if (src.peek('\n')) { // break; //} //c = src.read(); //if (Character.isWhitespace(c)) { src.readLine(); break; //} //src.unread(c); } } continue retry; } src.unread(c); } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } c = src.read(); if (c == '=') { c = src.read(); if (c == '=') { yaccValue = "==="; return Tokens.tEQQ; } src.unread(c); yaccValue = "=="; return Tokens.tEQ; } if (c == '~') { yaccValue = "=~"; return Tokens.tMATCH; } else if (c == '>') { return Tokens.tASSOC; } src.unread(c); return '='; case '<': c = src.read(); if (c == '<' && lex_state != LexState.EXPR_END && lex_state != LexState.EXPR_DOT && lex_state != LexState.EXPR_ENDARG && lex_state != LexState.EXPR_CLASS && (!lex_state.isArgument() || spaceSeen)) { int tok = hereDocumentIdentifier(); if (tok != 0) return tok; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if (c == '=') { if ((c = src.read()) == '>') { yaccValue = "<=>"; return Tokens.tCMP; } yaccValue = "<="; src.unread(c); return Tokens.tLEQ; } if (c == '<') { yaccValue = "<<"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tLSHFT; } yaccValue = "<"; src.unread(c); return Tokens.tLT; case '>': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } if ((c = src.read()) == '=') { yaccValue = ">="; return Tokens.tGEQ; } if (c == '>') { yaccValue = ">>"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tRSHFT; } yaccValue = ">"; src.unread(c); return Tokens.tGT; case '"': lex_strterm = new StringTerm(str_dquote, '"', '\0'); return Tokens.tSTRING_BEG; case '`': yaccValue = "`"; if (lex_state == LexState.EXPR_FNAME) { lex_state = LexState.EXPR_END; return Tokens.tBACK_REF2; } if (lex_state == LexState.EXPR_DOT) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } return Tokens.tBACK_REF2; } lex_strterm = new StringTerm(str_xquote, '`', '\0'); return Tokens.tXSTRING_BEG; case '\'': lex_strterm = new StringTerm(str_squote, '\'', '\0'); return Tokens.tSTRING_BEG; case '?': if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG) { lex_state = LexState.EXPR_BEG; return '?'; } c = src.read(); if (c == EOF) { throw new SyntaxException(src.getPosition(), "incomplete character syntax"); } if (Character.isWhitespace(c)){ if (!lex_state.isArgument()){ int c2 = 0; switch (c) { case ' ': c2 = 's'; break; case '\n': c2 = 'n'; break; case '\t': c2 = 't'; break; /* What is \v in C? case '\v': c2 = 'v'; break; */ case '\r': c2 = 'r'; break; case '\f': c2 = 'f'; break; } if (c2 != 0) { warnings.warn(src.getPosition(), "invalid character syntax; use ?\\" + c2); } } src.unread(c); lex_state = LexState.EXPR_BEG; return '?'; /*} else if (ismbchar(c)) { // ruby - we don't support them either? rb_warn("multibyte character literal not supported yet; use ?\\" + c); support.unread(c); lexState = LexState.EXPR_BEG; return '?';*/ } else if ((Character.isLetterOrDigit(c) || c == '_') && !src.peek('\n') && isNext_identchar()) { src.unread(c); lex_state = LexState.EXPR_BEG; return '?'; } else if (c == '\\') { c = src.readEscape(); } c &= 0xff; lex_state = LexState.EXPR_END; yaccValue = new Long(c); return Tokens.tINTEGER; case '&': if ((c = src.read()) == '&') { lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { yaccValue = "&&"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tANDOP; } else if (c == '=') { yaccValue = "&"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)){ warnings.warning(src.getPosition(), "`&' interpreted as argument prefix"); c = Tokens.tAMPER; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tAMPER; } else { c = Tokens.tAMPER2; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "&"; return c; case '|': if ((c = src.read()) == '|') { lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '=') { yaccValue = "||"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); return Tokens.tOROP; } if (c == '=') { yaccValue = "|"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "|"; src.unread(c); return Tokens.tPIPE; case '+': c = src.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { yaccValue = "@+"; return Tokens.tUPLUS; } yaccValue = "+"; src.unread(c); return Tokens.tPLUS; } if (c == '=') { yaccValue = "+"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; src.unread(c); if (Character.isDigit(c)) { c = '+'; return parseNumber(c); } return Tokens.tUPLUS; } lex_state = LexState.EXPR_BEG; src.unread(c); return Tokens.tPLUS; case '-': c = src.read(); if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if (c == '@') { yaccValue = "@-"; return Tokens.tUMINUS; } yaccValue = "-"; src.unread(c); return Tokens.tMINUS; } if (c == '=') { yaccValue = "-"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c))) { if (lex_state.isArgument()) arg_ambiguous(); lex_state = LexState.EXPR_BEG; src.unread(c); if (Character.isDigit(c)) { return Tokens.tUMINUS_NUM; } return Tokens.tUMINUS; } lex_state = LexState.EXPR_BEG; src.unread(c); return Tokens.tMINUS; case '.': lex_state = LexState.EXPR_BEG; if ((c = src.read()) == '.') { if ((c = src.read()) == '.') { return Tokens.tDOT3; } src.unread(c); return Tokens.tDOT2; } src.unread(c); if (Character.isDigit(c)) { throw new SyntaxException(src.getPosition(), "no .<digit> floating literal anymore; put 0 before dot"); } lex_state = LexState.EXPR_DOT; return Tokens.tDOT; case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : return parseNumber(c); case ']': case '}': case ')': conditionState.restart(); cmdArgumentState.restart(); lex_state = LexState.EXPR_END; return c; case ':': c = src.read(); if (c == ':') { if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_CLASS || (lex_state.isArgument() && spaceSeen)) { lex_state = LexState.EXPR_BEG; return Tokens.tCOLON3; } lex_state = LexState.EXPR_DOT; return Tokens.tCOLON2; } if (lex_state == LexState.EXPR_END || lex_state == LexState.EXPR_ENDARG || Character.isWhitespace(c)) { src.unread(c); lex_state = LexState.EXPR_BEG; return ':'; } switch (c) { case '\'': lex_strterm = new StringTerm(str_ssym, c, '\0'); break; case '"': lex_strterm = new StringTerm(str_dsym, c, '\0'); break; default: src.unread(c); break; } lex_state = LexState.EXPR_FNAME; return Tokens.tSYMBEG; case '/': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { lex_strterm = new StringTerm(str_regexp, '/', '\0'); return Tokens.tREGEXP_BEG; } if ((c = src.read()) == '=') { yaccValue = "/"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } src.unread(c); if (lex_state.isArgument() && spaceSeen) { if (!Character.isWhitespace(c)) { arg_ambiguous(); lex_strterm = new StringTerm(str_regexp, '/', '\0'); return Tokens.tREGEXP_BEG; } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "/"; return Tokens.tDIVIDE; case '^': yaccValue = "^"; if ((c = src.read()) == '=') { lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } src.unread(c); return Tokens.tCARET; case ';': commandStart = true; case ',': lex_state = LexState.EXPR_BEG; return c; case '~': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { if ((c = src.read()) != '@') { src.unread(c); } } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "~"; return Tokens.tTILDE; case '(': c = Tokens.tLPAREN2; commandStart = true; if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tLPAREN; } else if (spaceSeen) { if (lex_state == LexState.EXPR_CMDARG) { c = Tokens.tLPAREN_ARG; } else if (lex_state == LexState.EXPR_ARG) { warnings.warn(src.getPosition(), "don't put space before argument parentheses"); c = Tokens.tLPAREN2; } } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '[': if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; if ((c = src.read()) == ']') { if ((c = src.read()) == '=') { yaccValue = "[]="; return Tokens.tASET; } yaccValue = "[]"; src.unread(c); return Tokens.tAREF; } src.unread(c); return '['; } else if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { c = Tokens.tLBRACK; } else if (lex_state.isArgument() && spaceSeen) { c = Tokens.tLBRACK; } lex_state = LexState.EXPR_BEG; conditionState.stop(); cmdArgumentState.stop(); return c; case '{': c = Tokens.tLCURLY; if (lex_state.isArgument() || lex_state == LexState.EXPR_END) { c = Tokens.tLCURLY; /* block (primary) */ } else if (lex_state == LexState.EXPR_ENDARG) { c = Tokens.tLBRACE_ARG; /* block (expr) */ } else { c = Tokens.tLBRACE; /* hash */ } conditionState.stop(); cmdArgumentState.stop(); lex_state = LexState.EXPR_BEG; return c; case '\\': c = src.read(); if (c == '\n') { spaceSeen = true; continue retry; /* skip \\n */ } src.unread(c); return '\\'; case '%': if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID) { return parseQuote(src.read()); } if ((c = src.read()) == '=') { yaccValue = "%"; lex_state = LexState.EXPR_BEG; return Tokens.tOP_ASGN; } if (lex_state.isArgument() && spaceSeen && !Character.isWhitespace(c)) { return parseQuote(c); } if (lex_state == LexState.EXPR_FNAME || lex_state == LexState.EXPR_DOT) { lex_state = LexState.EXPR_ARG; } else { lex_state = LexState.EXPR_BEG; } yaccValue = "%"; src.unread(c); return Tokens.tPERCENT; case '$': lex_state = LexState.EXPR_END; tokenBuffer.setLength(0); c = src.read(); switch (c) { case '_': /* $_: last read line string */ c = src.read(); if (isIdentifierChar(c)) { tokenBuffer.append('$'); tokenBuffer.append('_'); break; } src.unread(c); c = '_'; /* fall through */ case '*': /* $*: argv */ case '$': /* $$: pid */ case '?': /* $?: last status */ case '!': /* $!: error string */ case '@': /* $@: error position */ case '/': /* $/: input record separator */ case '\\': /* $\: output record separator */ case ';': /* $;: field separator */ case ',': /* $,: output field separator */ case '.': /* $.: last read line number */ case '=': /* $=: ignorecase */ case ':': /* $:: load path */ case '<': /* $<: reading filename */ case '>': /* $>: default output handle */ case '\"': /* $": already loaded files */ tokenBuffer.append('$'); tokenBuffer.append(c); yaccValue = tokenBuffer.toString(); return Tokens.tGVAR; case '-': tokenBuffer.append('$'); tokenBuffer.append(c); c = src.read(); tokenBuffer.append(c); yaccValue = tokenBuffer.toString(); /* xxx shouldn't check if valid option variable */ return Tokens.tGVAR; case '~': /* $~: match-data */ case '&': /* $&: last match */ case '`': /* $`: string before last match */ case '\'': /* $': string after last match */ case '+': /* $+: string matches last paren. */ yaccValue = new BackRefNode(src.getPosition(), c); return Tokens.tBACK_REF; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': tokenBuffer.append('$'); do { tokenBuffer.append(c); c = src.read(); } while (Character.isDigit(c)); src.unread(c); yaccValue = new NthRefNode(src.getPosition(), Integer.parseInt(tokenBuffer.substring(1))); return Tokens.tNTH_REF; default: if (!isIdentifierChar(c)) { src.unread(c); return '$'; } case '0': tokenBuffer.append('$'); } break; case '@': c = src.read(); tokenBuffer.setLength(0); tokenBuffer.append('@'); if (c == '@') { tokenBuffer.append('@'); c = src.read(); } if (Character.isDigit(c)) { if (tokenBuffer.length() == 1) { throw new SyntaxException(src.getPosition(), "`@" + c + "' is not allowed as an instance variable name"); } throw new SyntaxException(src.getPosition(), "`@@" + c + "' is not allowed as a class variable name"); } if (!isIdentifierChar(c)) { src.unread(c); return '@'; } break; case '_': if (src.wasBeginOfLine() && src.matchString("_END__\n", false)) { parserSupport.getResult().setEndSeen(true); return 0; } tokenBuffer.setLength(0); break; default: if (!isIdentifierChar(c)) { throw new SyntaxException(src.getPosition(), "Invalid char `\\" + new PrintfFormat("%.3o").sprintf(c) + "' in expression"); } tokenBuffer.setLength(0); break; } do { tokenBuffer.append(c); /* no special multibyte character handling is needed in Java * if (ismbchar(c)) { int i, len = mbclen(c)-1; for (i = 0; i < len; i++) { c = src.read(); tokenBuffer.append(c); } }*/ c = src.read(); } while (isIdentifierChar(c)); char peek = src.read(); if ((c == '!' || c == '?') && isIdentifierChar(tokenBuffer.charAt(0)) && peek != '=') { src.unread(peek); tokenBuffer.append(c); } else { src.unread(peek); src.unread(c); } int result = 0; switch (tokenBuffer.charAt(0)) { case '$': lex_state = LexState.EXPR_END; result = Tokens.tGVAR; break; case '@': lex_state = LexState.EXPR_END; if (tokenBuffer.charAt(1) == '@') { result = Tokens.tCVAR; } else { result = Tokens.tIVAR; } break; default: char last = tokenBuffer.charAt(tokenBuffer.length() - 1); if (last == '!' || last == '?') { result = Tokens.tFID; } else { if (lex_state == LexState.EXPR_FNAME) { /* // Enebo: This should be equivalent to below without // so much read/unread action. if ((c = src.read()) == '=') { char c2 = src.read(); if (c2 != '~' && c2 != '>' && (c2 != '=' || (c2 == '\n' && src.peek('>')))) { result = Token.tIDENTIFIER; tokenBuffer.append(c); } else { src.unread(c2); src.unread(c); } } else { src.unread(c); } */ if ((c = src.read()) == '=' && !src.peek('~') && !src.peek('>') && (!src.peek('=') || (src.peek('\n') && src.getCharAt(1) == '>'))) { result = Tokens.tIDENTIFIER; tokenBuffer.append(c); } else { src.unread(c); } } if (result == 0 && ISUPPER(tokenBuffer.charAt(0))) { result = Tokens.tCONSTANT; } else { result = Tokens.tIDENTIFIER; } } if (lex_state != LexState.EXPR_DOT) { /* See if it is a reserved word. */ Keyword keyword = Keyword.getKeyword(tokenBuffer.toString(), tokenBuffer.length()); if (keyword != null) { // enum lex_state LexState state = lex_state; lex_state = keyword.state; if (state.isExprFName()) { yaccValue = keyword.name; } if (keyword.id0 == Tokens.kDO) { if (conditionState.isInState()) { return Tokens.kDO_COND; } if (cmdArgumentState.isInState() && state != LexState.EXPR_CMDARG) { return Tokens.kDO_BLOCK; } if (state == LexState.EXPR_ENDARG) { return Tokens.kDO_BLOCK; } return Tokens.kDO; } if (state == LexState.EXPR_BEG) { return keyword.id0; } if (keyword.id0 != keyword.id1) { lex_state = LexState.EXPR_BEG; } return keyword.id1; } } if (lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_MID || lex_state == LexState.EXPR_DOT || lex_state == LexState.EXPR_ARG || lex_state == LexState.EXPR_CMDARG) { if (commandState) { lex_state = LexState.EXPR_CMDARG; } else { lex_state = LexState.EXPR_ARG; } } else { lex_state = LexState.EXPR_END; } } yaccValue = tokenBuffer.toString(); // Lame: parsing logic made it into lexer in ruby...So we // are emulating if (IdUtil.isLocal((String)yaccValue) && ((((LocalNamesElement) parserSupport.getLocalNames().peek()).isInBlock() && ((BlockNamesElement) parserSupport.getBlockNames().peek()).isDefined((String) yaccValue)) || ((LocalNamesElement) parserSupport.getLocalNames().peek()).isLocalRegistered((String) yaccValue))) { lex_state = LexState.EXPR_END; } return result; } } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/b1293eda8454686e846e2a9837b348e2983bb423/RubyYaccLexer.java/buggy/src/org/jruby/lexer/yacc/RubyYaccLexer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
677,
1362,
92,
1435,
288,
3639,
1149,
276,
31,
3639,
1250,
3476,
15160,
273,
629,
31,
3639,
1250,
1296,
1119,
31,
7734,
309,
261,
4149,
67,
701,
6408,
480,
446,
13,
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,
377,
3238,
509,
677,
1362,
92,
1435,
288,
3639,
1149,
276,
31,
3639,
1250,
3476,
15160,
273,
629,
31,
3639,
1250,
1296,
1119,
31,
7734,
309,
261,
4149,
67,
701,
6408,
480,
446,
13,
288,
1082... |
if (x + size.x > bounds.x + bounds.width) x = bounds.x + bounds.width - size.x; if (y + size.y > bounds.y + bounds.height) y = bounds.y + bounds.height - size.y; | if (x + size.x > bounds.x + bounds.width) { x = bounds.x + bounds.width - size.x; } if (y + size.y > bounds.y + bounds.height) { y = bounds.y + bounds.height - size.y; } | public void show(Control control, Point displayCoordinates, IPresentablePart currentSelection) { int shellStyle = SWT.RESIZE | SWT.ON_TOP | SWT.NO_TRIM; int tableStyle = SWT.V_SCROLL | SWT.H_SCROLL; final BasicPartList editorList = new BasicPartList(control.getShell(), shellStyle, tableStyle, site, folder); editorList.setInput(folder); Point size = editorList.computeSizeHint(); int x = displayCoordinates.x; int y = displayCoordinates.y; Monitor mon = folder.getTabFolder().getControl().getMonitor(); Rectangle bounds = mon.getClientArea(); if (x + size.x > bounds.x + bounds.width) x = bounds.x + bounds.width - size.x; if (y + size.y > bounds.y + bounds.height) y = bounds.y + bounds.height - size.y; editorList.setLocation(new Point(x, y)); editorList.setVisible(true); editorList.setFocus(); editorList.getTableViewer().getTable().getShell().addListener( SWT.Deactivate, new Listener() { public void handleEvent(Event event) { editorList.setVisible(false); } } ); } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/DefaultPartList.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultPartList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2405,
12,
3367,
3325,
16,
4686,
2562,
13431,
16,
5411,
2971,
1581,
429,
1988,
783,
6233,
13,
288,
3639,
509,
5972,
2885,
273,
348,
8588,
18,
862,
4574,
571,
348,
8588,
18,
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,
377,
1071,
918,
2405,
12,
3367,
3325,
16,
4686,
2562,
13431,
16,
5411,
2971,
1581,
429,
1988,
783,
6233,
13,
288,
3639,
509,
5972,
2885,
273,
348,
8588,
18,
862,
4574,
571,
348,
8588,
18,
67... |
jButtonUndo.setEnabled(false); | jButtonUndo.setEnabled(false); | private void jButtonToBeginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonToBeginActionPerformed myParent.mTableBegining(); jButtonToBegin.setEnabled(false); jButtonOneRowM.setEnabled(false); jButtonToBegin.repaint(); jButtonOneRowM.repaint(); jButtonToEnd.setEnabled(true); jButtonOneRowP.setEnabled(true); jButtonToEnd.repaint(); jButtonOneRowP.repaint(); repaintComp(); setUndoDada(); jButtonUndo.setEnabled(false); }//GEN-LAST:event_jButtonToBeginActionPerformed | 12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/ba6fed56cb52b278f5b34b26ee3d38610f6a9303/aeAnLevel.java/clean/src/nom/aeAnLevel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
525,
3616,
774,
8149,
19449,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
78,
3616,
774,
8149,
19449,
3639,
3399,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
525,
3616,
774,
8149,
19449,
12,
6290,
18,
2219,
88,
18,
2575,
18,
1803,
1133,
6324,
13,
288,
759,
16652,
17,
15354,
30,
2575,
67,
78,
3616,
774,
8149,
19449,
3639,
3399,
305... |
firstAtomNeighboors = ac.getConnectedAtoms(atoms[a1]); | firstAtomNeighboors = atomContainer.getConnectedAtoms(atoms[a1]); | public DescriptorResult calculate(AtomContainer ac) throws CDKException { Atom[] atoms = ac.getAtoms(); Atom[] firstAtomNeighboors = null; Atom[] secondAtomNeighboors = null; Atom[] thirdAtomNeighboors = null; DoubleArrayResult kierValues = new DoubleArrayResult(3); double bond1 = 0; double bond2 = 0; double bond3 = 0; double kier1 = 0; double kier2 = 0; double kier3 = 0; double atomsCount = atoms.length; ArrayList singlePaths = new ArrayList(); ArrayList doublePaths = new ArrayList(); ArrayList triplePaths = new ArrayList(); double[] sorterFirst = new double[2]; double[] sorterSecond = new double[3]; String tmpbond2 = ""; String tmpbond3 = ""; for (int a1 = 0; a1 < atoms.length; a1 ++) { bond1 = 0; firstAtomNeighboors = ac.getConnectedAtoms(atoms[a1]); for (int a2 = 0; a2 < firstAtomNeighboors.length; a2 ++) { bond1 = ac.getBondNumber( atoms[a1], firstAtomNeighboors[a2] ); if(!singlePaths.contains(new Double(bond1))) { singlePaths.add(new Double(bond1)); java.util.Collections.sort(singlePaths); } secondAtomNeighboors = ac.getConnectedAtoms(firstAtomNeighboors[a2]); for (int a3 = 0; a3 < secondAtomNeighboors.length; a3 ++) { bond2 = ac.getBondNumber( firstAtomNeighboors[a2], secondAtomNeighboors[a3] ); if(!singlePaths.contains(new Double(bond2))) { singlePaths.add(new Double(bond2)); } sorterFirst[0] = bond1; sorterFirst[1] = bond2; java.util.Arrays.sort(sorterFirst); tmpbond2 = sorterFirst[0] + "+" + sorterFirst[1]; if(!doublePaths.contains(new String(tmpbond2)) && (bond1 != bond2)) { doublePaths.add(new String(tmpbond2)); } thirdAtomNeighboors = ac.getConnectedAtoms(secondAtomNeighboors[a3]); for (int a4 = 0; a4 < thirdAtomNeighboors.length; a4 ++) { bond3 = ac.getBondNumber( secondAtomNeighboors[a3], thirdAtomNeighboors[a4] ); if(!singlePaths.contains(new Double(bond3))) { singlePaths.add(new Double(bond3)); } sorterSecond[0] = bond1; sorterSecond[1] = bond2; sorterSecond[2] = bond3; java.util.Arrays.sort(sorterSecond); tmpbond3 = sorterSecond[0] + "+" + sorterSecond[1] + "+" + sorterSecond[2]; if(!triplePaths.contains(new String(tmpbond3))) { if((bond1 != bond2) && (bond1 != bond3) && (bond2 != bond3)) { triplePaths.add(new String(tmpbond3)); } } } } } } kier1 = ( ( (atomsCount) * ( (atomsCount - 1) * (atomsCount - 1) ) ) / ( singlePaths.size() * singlePaths.size() ) ); kier2 = ( ( (atomsCount - 1) * ( (atomsCount - 2) * (atomsCount - 2) ) ) / ( doublePaths.size() * doublePaths.size() ) ); if(atomsCount % 2 != 0) { kier3 = ( ( (atomsCount - 1) * ( (atomsCount - 3) * (atomsCount - 3) ) ) / ( triplePaths.size() * triplePaths.size() ) ); } else { kier3 = ( ( (atomsCount - 3) * ( (atomsCount - 2) * (atomsCount - 2) ) ) / ( triplePaths.size() * triplePaths.size() ) ); } kierValues.add(kier1); kierValues.add(kier2); kierValues.add(kier3); return kierValues; } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/0a7f0ac7459a9f9ba3f69e907ae5192937b6f0bd/KappaShapeIndicesDescriptor.java/buggy/src/org/openscience/cdk/qsar/KappaShapeIndicesDescriptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
12823,
1253,
4604,
12,
3641,
2170,
1721,
13,
1216,
24570,
288,
202,
202,
3641,
8526,
9006,
273,
1721,
18,
588,
14280,
5621,
202,
202,
3641,
8526,
1122,
3641,
6586,
2031,
1075,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12823,
1253,
4604,
12,
3641,
2170,
1721,
13,
1216,
24570,
288,
202,
202,
3641,
8526,
9006,
273,
1721,
18,
588,
14280,
5621,
202,
202,
3641,
8526,
1122,
3641,
6586,
2031,
1075,
1... |
super.startElement(uri, localname, qName, (level == 0) ? getAttributesWithClass(attributes) : attributes); level++; | super.startElement(uri, localname, qName, topLevel ? getAttributesWithClass(attributes) : attributes); | public void startElement(String uri, String localname, String qName, Attributes attributes) throws SAXException { flushCharacters(false); // The first element received determines the type of separator checkDelimiters(uri, qName); // Add or update classes on element if needed super.startElement(uri, localname, qName, (level == 0) ? getAttributesWithClass(attributes) : attributes); level++; } | 54445 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54445/5980cbcb73a0d483ca5623e89efe2b06427f3109/OutputInterceptor.java/clean/src/java/org/orbeon/oxf/xforms/processor/handlers/OutputInterceptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
3639,
3663,
11600,
12,
5743,
1769,
3639,
368,
1021,
1122,
930,
5079,
12949,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
780,
2003,
16,
514,
1191,
529,
16,
514,
22914,
16,
9055,
1677,
13,
1216,
14366,
288,
3639,
3663,
11600,
12,
5743,
1769,
3639,
368,
1021,
1122,
930,
5079,
12949,
326,... |
part.moveAbove(getPresentation().getControl()); | private void showPart(LayoutPart part, IPresentablePart position) { part.setContainer(this); IPresentablePart presentablePart = part.getPresentablePart(); if (presentablePart == null) { return; } part.createControl(getParent()); if (part.getControl().getParent() != getControl().getParent()) { part.reparent(getControl().getParent()); } part.moveAbove(getPresentation().getControl()); presentationSite.getPresentation().addPart(presentablePart, position); if (current == null) { setSelection(part); } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/db95d896a9728c87e103baad4b7543446b1ff52f/PartTabFolder.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartTabFolder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2405,
1988,
12,
3744,
1988,
1087,
16,
2971,
1581,
429,
1988,
1754,
13,
288,
3639,
1087,
18,
542,
2170,
12,
2211,
1769,
7734,
2971,
1581,
429,
1988,
3430,
429,
1988,
273,
1087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
1988,
12,
3744,
1988,
1087,
16,
2971,
1581,
429,
1988,
1754,
13,
288,
3639,
1087,
18,
542,
2170,
12,
2211,
1769,
7734,
2971,
1581,
429,
1988,
3430,
429,
1988,
273,
1087,
... | |
rows[i]=posX++; cols[i]=posY; | rows[idx]=posX++; cols[idx]=posY; | public static SpaceTimeSchedule layout(Trace[] traces,int row,int col) { SpaceTimeSchedule sched=new SpaceTimeSchedule(row,col); final int len=row*2+col*2-4; int[] rows=new int[len]; int[] cols=new int[len]; rows[0]=0; cols[0]=0; row--; col--; int idx=1; int posX=0; int posY=1; for(;idx<row;idx++) { rows[idx]=posX; cols[idx]=posY++; //System.out.println("("+rows[idx]+","+cols[idx]+")"); } for(int i=0;i<col;i++,idx++) { rows[i]=posX++; cols[i]=posY; //System.out.println("("+rows[i]+","+cols[i]+")"); } for(int i=0;i<row;i++,idx++) { rows[i]=posX; cols[i]=posY--; //System.out.println("("+rows[i]+","+cols[i]+")"); } for(int i=0;i<col;i++,idx++) { rows[i]=posX--; cols[i]=posY; //System.out.println("("+rows[i]+","+cols[i]+")"); } idx=0; final int tracesLen=traces.length; for(int i=0;i<tracesLen;i++) { Trace trace=traces[i]; //System.out.println("Laying out: "+trace); int size=trace.size(); TraceNode filter=trace.getHead().getNext(); //System.out.println(idx); int curRow=rows[idx]; int curCol=cols[idx]; ((FilterTraceNode)filter).setXY(curRow,curCol); sched.addHead(trace,curRow,curCol); idx++; if(idx==len) idx=0; filter=filter.getNext(); for(int j=1;j<size;j++) { //System.out.println(idx); curRow=rows[idx]; curCol=cols[idx]; ((FilterTraceNode)filter).setXY(curRow,curCol); sched.add(trace,curRow,curCol); idx++; if(idx==len) idx=0; filter=filter.getNext(); } } return sched; } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/1ff21fed22869a860efa5b084da4ab3e91518173/TestLayout.java/buggy/streams/src/at/dms/kjc/spacetime/TestLayout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
14059,
950,
6061,
3511,
12,
3448,
8526,
19649,
16,
474,
1027,
16,
474,
645,
13,
288,
202,
3819,
950,
6061,
23964,
33,
2704,
14059,
950,
6061,
12,
492,
16,
1293,
1769,
202,
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,
377,
1071,
760,
14059,
950,
6061,
3511,
12,
3448,
8526,
19649,
16,
474,
1027,
16,
474,
645,
13,
288,
202,
3819,
950,
6061,
23964,
33,
2704,
14059,
950,
6061,
12,
492,
16,
1293,
1769,
202,
63... |
public IChemFormat getFormat() { | public IResourceFormat getFormat() { | public IChemFormat getFormat() { return new XYZFormat(); } | 46046 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46046/c20f0a656b069d8a3e653822a8741d3aedc2b0f2/XYZReader.java/buggy/src/org/openscience/cdk/io/XYZReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1420,
1630,
10959,
1435,
288,
3639,
327,
394,
30742,
1630,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
1420,
1630,
10959,
1435,
288,
3639,
327,
394,
30742,
1630,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
case TokenStream.IFEQ : val = stack[stackTop]; | } case TokenStream.IFEQ : { boolean valBln; Object val = stack[stackTop]; | public static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, NativeFunction fnOrScript, InterpreterData theData) throws JavaScriptException { if (cx.interpreterSecurityDomain != theData.securityDomain) { // If securityDomain is different, update domain in Cotext // and call self under new domain Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; try { return interpret(cx, scope, thisObj, args, fnOrScript, theData); } finally { cx.interpreterSecurityDomain = savedDomain; } } int i; Object lhs; final int maxStack = theData.itsMaxStack; final int maxVars = (fnOrScript.argNames == null) ? 0 : fnOrScript.argNames.length; final int maxLocals = theData.itsMaxLocals; final int maxTryDepth = theData.itsMaxTryDepth; final int VAR_SHFT = maxStack; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_SCOPE_SHFT = LOCAL_SHFT + maxLocals;// stack[0 <= i < VAR_SHFT]: stack data// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_SCOPE_SHFT]: used for newtemp/usetemp// stack[TRY_SCOPE_SHFT <= i]: try scopes// when 0 <= i < LOCAL_SHFT and stack[x] == DBL_MRK,// sDbl[i] gives the number value final Object DBL_MRK = Interpreter.DBL_MRK; Object[] stack = new Object[TRY_SCOPE_SHFT + maxTryDepth]; double[] sDbl = new double[TRY_SCOPE_SHFT]; int stackTop = -1; byte[] iCode = theData.itsICode; String[] strings = theData.itsStringTable; int pc = 0; int iCodeLength = theData.itsICodeTop; final Scriptable undefined = Undefined.instance; if (maxVars != 0) { int definedArgs = fnOrScript.argCount; if (definedArgs != 0) { if (definedArgs > args.length) { definedArgs = args.length; } for (i = 0; i != definedArgs; ++i) { stack[VAR_SHFT + i] = args[i]; } } for (i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } } if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs, val; double valDbl; boolean valBln; int count; int slot; String name = null; Object[] outArgs; int lIntValue; double lDbl; int rIntValue; double rDbl;// tryStack[2 * i]: starting pc of catch block// tryStack[2 * i + 1]: starting pc of finally block int[] tryStack = null; int tryStackTop = 0; InterpreterFrame frame = null; if (cx.debugger != null) { frame = new InterpreterFrame(scope, theData, fnOrScript); cx.pushFrame(frame); } Object result = undefined; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; while (pc < iCodeLength) { try { switch (iCode[pc] & 0xff) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : if (tryStackTop == 0) { tryStack = new int[maxTryDepth * 2]; } i = getTarget(iCode, pc + 1); if (i == pc) i = 0; tryStack[tryStackTop * 2] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; tryStack[tryStackTop * 2 + 1] = i; stack[TRY_SCOPE_SHFT + tryStackTop] = scope; ++tryStackTop; pc += 4; break; case TokenStream.GE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LE : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.GT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.LT : --stackTop; rhs = stack[stackTop + 1]; lhs = stack[stackTop]; if (rhs == DBL_MRK || lhs == DBL_MRK) { rDbl = stack_double(stack, sDbl, stackTop + 1); lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IN : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.INSTANCEOF : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.EQ : --stackTop; valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.NE : --stackTop; valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHEQ : --stackTop; valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.SHNE : --stackTop; valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; case TokenStream.IFNE : val = stack[stackTop]; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount (instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; case TokenStream.BITAND : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; case TokenStream.BITOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; case TokenStream.BITXOR : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; case TokenStream.LSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; case TokenStream.RSH : rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; case TokenStream.URSH : rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; case TokenStream.NEG : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; case TokenStream.POS : rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; case TokenStream.MUL : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; case TokenStream.DIV : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; case TokenStream.MOD : rDbl = stack_double(stack, sDbl, stackTop); --stackTop; lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; case TokenStream.BINDNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; case TokenStream.GETBASE : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; // what about class cast exception here for lhs? stack[stackTop] = ScriptRuntime.setName ((Scriptable)lhs, rhs, scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop]; --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; case TokenStream.CALLSPECIAL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); name = strings[getShort(iCode, pc + 3)]; count = getShort(iCode, pc + 5); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; case TokenStream.CALL : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined) { i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } Scriptable calleeScope = scope; if (theData.itsNeedsActivation) { calleeScope = ScriptableObject. getTopLevelScope(scope); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, calleeScope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.NEW : if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } count = getShort(iCode, pc + 3); outArgs = getArgsArray(stack, sDbl, stackTop, count); stackTop -= count; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); if (lhs == undefined && getShort(iCode, pc + 1) != -1) { // special code for better error message for call // to undefined lhs = strings[getShort(iCode, pc + 1)]; } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; instructionCount = cx.instructionCount; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = theData. itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement (scope, strings[getShort(iCode, pc + 1)]); pc += 2; break; case TokenStream.SETVAR : slot = (iCode[++pc] & 0xFF); stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; break; case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(result); case TokenStream.JTHROW : result = stack[stackTop]; // No need to check for DBL_MRK: result is Exception --stackTop; if (result instanceof JavaScriptException) throw (JavaScriptException)result; else throw (RuntimeException)result; case TokenStream.ENTERWITH : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime. nextEnum((Enumeration)val); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = getShort(iCode, pc + 1); stack[++stackTop] = new InterpretedFunction( theData.itsNestedFunctions[i], scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); pc += 2; break; case TokenStream.OBJECT : i = getShort(iCode, pc + 1); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case SOURCEFILE_ICODE : cx.interpreterSourceFile = theData.itsSourceFile; break; case LINE_ICODE : case BREAKPOINT_ICODE : i = getShort(iCode, pc + 1); cx.interpreterLine = i; if (frame != null) frame.setLineNumber(i); if ((iCode[pc] & 0xff) == BREAKPOINT_ICODE || cx.inLineStepMode) { cx.getDebuggableEngine(). getDebugger().handleBreakpointHit(cx); } pc += 2; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object errObj; // Object seen by catch for (;;) { if (ex instanceof JavaScriptException) { errObj = ScriptRuntime. unwrapJavaScriptException((JavaScriptException)ex); exType = SCRIPT_THROW; } else if (ex instanceof EcmaError) { // an offical ECMA error object, errObj = ((EcmaError)ex).getErrorObject(); exType = ECMA; } else if (ex instanceof WrappedException) { Object w = ((WrappedException) ex).unwrap(); if (w instanceof Throwable) { ex = (Throwable) w; continue; } errObj = ex; exType = RUNTIME; } else if (ex instanceof RuntimeException) { errObj = ex; exType = RUNTIME; } else { errObj = ex; // Error instance exType = OTHER; } break; } if (exType != OTHER && cx.debugger != null) { cx.debugger.handleExceptionThrown(cx, errObj); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { --tryStackTop; if (exType == SCRIPT_THROW || exType == ECMA) { // Check for catch only for // JavaScriptException and EcmaError pc = tryStack[tryStackTop * 2]; if (pc != 0) { // Has catch block rethrow = false; } } if (rethrow) { pc = tryStack[tryStackTop * 2 + 1]; if (pc != 0) { // has finally block rethrow = false; errObj = ex; } } } if (rethrow) { if (frame != null) cx.popFrame(); if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // prepare stack and restore this function's security domain. scope = (Scriptable)stack[TRY_SCOPE_SHFT + tryStackTop]; stackTop = 0; stack[0] = errObj; } } if (frame != null) cx.popFrame(); if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/052726b68e684efc593535d50a73767571084837/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
4766,
282,
22780,
15261,
16,
1033,
8526,
833,
16,
4766,
282,
16717,
2083,
2295,
1162,
3651,
16,
4766,
282,
5294,
11599,
751,
3... |
textArea.getBuffer().insert(caret,str); textArea.scrollToCaret(true); | { Log.log(Log.DEBUG,this,"=> String"); String str = (String)t.getTransferData( DataFlavor.stringFlavor); JEditTextArea textArea = (JEditTextArea)c; int caret = textArea.getCaretPosition(); Selection s = textArea.getSelectionAtOffset(caret); /* if user drops into a selection, replace selection */ if(s != null) textArea.setSelectedText(s,str); /* otherwise just insert the text */ else textArea.getBuffer().insert(caret,str); textArea.scrollToCaret(true); } | public boolean importData(JComponent c, Transferable t) { Log.log(Log.DEBUG,this,"Import data"); if(!canImport(c,t.getTransferDataFlavors())) return false; try { String str = (String)t.getTransferData( DataFlavor.stringFlavor); JEditTextArea textArea = (JEditTextArea)c; int caret = textArea.getCaretPosition(); Selection s = textArea.getSelectionAtOffset(caret); /* if user drops into a selection, replace selection */ if(s != null) textArea.setSelectedText(s,str); /* otherwise just insert the text */ else textArea.getBuffer().insert(caret,str); textArea.scrollToCaret(true); } catch(Exception e) { } GUIUtilities.getView(c).toFront(); GUIUtilities.getView(c).requestFocus(); c.requestFocus(); return true; } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/497d3746d5eac63aa708fb75d81a90bd7c7fe1fe/Java14.java/clean/org/gjt/sp/jedit/Java14.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
1930,
751,
12,
46,
1841,
276,
16,
12279,
429,
268,
13,
202,
202,
95,
1082,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
5010,
501,
8863,
1082,
202,
430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
1930,
751,
12,
46,
1841,
276,
16,
12279,
429,
268,
13,
202,
202,
95,
1082,
202,
1343,
18,
1330,
12,
1343,
18,
9394,
16,
2211,
10837,
5010,
501,
8863,
1082,
202,
430,
... |
return "DSA.g-"+p.bitLength(); | return "DSA.g-" + p.bitLength(); | public String keyType() { return "DSA.g-"+p.bitLength(); } | 46035 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46035/0400e73e7503ab43211657c44d8448afd6346cce/DSAGroup.java/buggy/src/freenet/crypt/DSAGroup.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
14867,
1435,
288,
202,
2463,
315,
19748,
18,
75,
10951,
397,
293,
18,
3682,
1782,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
14867,
1435,
288,
202,
2463,
315,
19748,
18,
75,
10951,
397,
293,
18,
3682,
1782,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
descriptor)) | descriptor)) | private void testExistingMethod(String name, String descriptor) throws CannotCompileException { ListIterator it = methods.listIterator(0); while (it.hasNext()) { MethodInfo minfo = (MethodInfo)it.next(); if (minfo.getName().equals(name) && Descriptor.eqParamTypes(minfo.getDescriptor(), descriptor)) throw new CannotCompileException("duplicate method: " + name); } } | 11369 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11369/ae4b81c8204eec47ccd579ce0ae07e808b9a8b58/ClassFile.java/clean/src/main/javassist/bytecode/ClassFile.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1842,
9895,
1305,
12,
780,
508,
16,
514,
4950,
13,
5411,
1216,
14143,
9937,
503,
288,
3639,
987,
3198,
518,
273,
2590,
18,
1098,
3198,
12,
20,
1769,
3639,
1323,
261,
305,
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,
1842,
9895,
1305,
12,
780,
508,
16,
514,
4950,
13,
5411,
1216,
14143,
9937,
503,
288,
3639,
987,
3198,
518,
273,
2590,
18,
1098,
3198,
12,
20,
1769,
3639,
1323,
261,
305,
18,... |
return (args != null && args[1] != null && degreeType.equals(args[1])); } | return (args != null && args[1] != null && degreeType.equals(args[1])); } | private boolean checkDegreeType(Object[] args, DegreeType degreeType) { return (args != null && args[1] != null && degreeType.equals(args[1])); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/df2938c039923d69a1db1c512c05c72e9dd2f0d6/EnrollmentWithoutRulesAuthorizationFilter.java/buggy/src/net/sourceforge/fenixedu/applicationTier/Filtro/enrollment/EnrollmentWithoutRulesAuthorizationFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
866,
22885,
559,
12,
921,
8526,
833,
16,
463,
1332,
992,
559,
10782,
559,
13,
288,
202,
202,
2463,
261,
1968,
480,
446,
597,
833,
63,
21,
65,
480,
446,
597,
10782,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
1250,
866,
22885,
559,
12,
921,
8526,
833,
16,
463,
1332,
992,
559,
10782,
559,
13,
288,
202,
202,
2463,
261,
1968,
480,
446,
597,
833,
63,
21,
65,
480,
446,
597,
10782,
55... |
iCodeTop = addByte(Icode_SCOPE, iCodeTop); iCodeTop = addByte(Token.STRING, iCodeTop); | iCodeTop = addIcode(Icode_SCOPE, iCodeTop); iCodeTop = addToken(Token.STRING, iCodeTop); | private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; switch (type) { case Token.FUNCTION : { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = scriptOrFn.getFunctionNode(fnIndex); if (fn.itsFunctionType != FunctionNode.FUNCTION_STATEMENT) { // Only function expressions or function expression // statements needs closure code creating new function // object on stack as function statements are initialized // at script/function start iCodeTop = addByte(Token.CLOSURE, iCodeTop); iCodeTop = addIndex(fnIndex, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.SCRIPT : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != Token.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.CASE : iCodeTop = updateLineNumber(node, iCodeTop); child = child.getNext(); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.LABEL : case Token.LOOP : case Token.DEFAULT : case Token.BLOCK : case Token.VOID : case Token.NOP : iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.WITH : ++itsWithDepth; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } --itsWithDepth; break; case Token.COMMA : iCodeTop = generateICode(child, iCodeTop); while (null != (child = child.getNext())) { iCodeTop = addByte(Token.POP, iCodeTop); itsStackDepth--; iCodeTop = generateICode(child, iCodeTop); } break; case Token.SWITCH : { iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); int theLocalSlot = itsData.itsMaxLocals++; iCodeTop = addByte(Token.NEWTEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); iCodeTop = addByte(Token.POP, iCodeTop); itsStackDepth--; ObjArray cases = (ObjArray) node.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.get(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addByte(Token.USETEMP, iCodeTop); iCodeTop = addByte(theLocalSlot, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(Token.SHEQ, iCodeTop); itsStackDepth--; Node target = new Node(Token.TARGET); thisCase.addChildAfter(target, first); iCodeTop = addGoto(target, Token.IFEQ, iCodeTop); } Node defaultNode = (Node) node.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node defaultTarget = new Node(Token.TARGET); defaultNode.getFirstChild(). addChildToFront(defaultTarget); iCodeTop = addGoto(defaultTarget, Token.GOTO, iCodeTop); } Node breakTarget = (Node) node.getProp(Node.BREAK_PROP); iCodeTop = addGoto(breakTarget, Token.GOTO, iCodeTop); break; } case Token.TARGET : { markTargetLabel(node, iCodeTop); break; } case Token.EQOP : case Token.RELOP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); int op = node.getOperation(); if (version == Context.VERSION_1_2) { if (op == Token.EQ) { op = Token.SHEQ; } else if (op == Token.NE) { op = Token.SHNE; } } iCodeTop = addByte(op, iCodeTop); itsStackDepth--; break; } case Token.NEW : case Token.CALL : { int childCount = 0; String functionName = null; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (functionName == null) { int childType = child.getType(); if (childType == Token.NAME || childType == Token.GETPROP) { functionName = lastAddString; } } child = child.getNext(); childCount++; } int callType = node.getIntProp(Node.SPECIALCALL_PROP, Node.NON_SPECIALCALL); if (callType != Node.NON_SPECIALCALL) { // embed line number and source filename iCodeTop = addByte(Icode_CALLSPECIAL, iCodeTop); iCodeTop = addByte(callType, iCodeTop); iCodeTop = addByte(type == Token.NEW ? 1 : 0, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); } else { iCodeTop = addByte(type, iCodeTop); iCodeTop = addString(functionName, iCodeTop); } itsStackDepth -= (childCount - 1); // always a result value // subtract from child count to account for [thisObj &] fun if (type == Token.NEW) { childCount -= 1; } else { childCount -= 2; } iCodeTop = addIndex(childCount, iCodeTop); if (childCount > itsData.itsMaxCalleeArgs) itsData.itsMaxCalleeArgs = childCount; break; } case Token.NEWLOCAL : case Token.NEWTEMP : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.NEWTEMP, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); break; } case Token.USELOCAL : { if (node.getProp(Node.TARGET_PROP) != null) { iCodeTop = addByte(Icode_RETSUB, iCodeTop); } else { iCodeTop = addByte(Token.USETEMP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } Node temp = (Node) node.getProp(Node.LOCAL_PROP); iCodeTop = addLocalRef(temp, iCodeTop); break; } case Token.USETEMP : { iCodeTop = addByte(Token.USETEMP, iCodeTop); Node temp = (Node) node.getProp(Node.TEMP_PROP); iCodeTop = addLocalRef(temp, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case Token.IFEQ : case Token.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case Token.GOTO : { Node target = (Node)(node.getProp(Node.TARGET_PROP)); iCodeTop = addGoto(target, (byte) type, iCodeTop); break; } case Token.JSR : { Node target = (Node)(node.getProp(Node.TARGET_PROP)); iCodeTop = addGoto(target, Icode_GOSUB, iCodeTop); break; } case Token.AND : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Icode_DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int falseJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.IFNE, iCodeTop); iCodeTop = addByte(Token.POP, iCodeTop); itsStackDepth--; child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(falseJumpStart, iCodeTop); break; } case Token.OR : { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Icode_DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int trueJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.IFEQ, iCodeTop); iCodeTop = addByte(Token.POP, iCodeTop); itsStackDepth--; child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(trueJumpStart, iCodeTop); break; } case Token.GETPROP : { iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) { iCodeTop = addByte(Icode_GETPROTO, iCodeTop); } else if (s.equals("__parent__")) { iCodeTop = addByte(Icode_GETSCOPEPARENT, iCodeTop); } else { badTree(node); } } else { child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.GETPROP, iCodeTop); itsStackDepth--; } break; } case Token.DELPROP : case Token.BITAND : case Token.BITOR : case Token.BITXOR : case Token.LSH : case Token.RSH : case Token.URSH : case Token.ADD : case Token.SUB : case Token.MOD : case Token.DIV : case Token.MUL : case Token.GETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth--; break; case Token.CONVERT : { iCodeTop = generateICode(child, iCodeTop); Object toType = node.getProp(Node.TYPE_PROP); if (toType == ScriptRuntime.NumberClass) { iCodeTop = addByte(Token.POS, iCodeTop); } else { badTree(node); } break; } case Token.UNARYOP : iCodeTop = generateICode(child, iCodeTop); switch (node.getOperation()) { case Token.VOID : iCodeTop = addByte(Token.POP, iCodeTop); iCodeTop = addByte(Token.UNDEFINED, iCodeTop); break; case Token.NOT : { int trueJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.IFEQ, iCodeTop); iCodeTop = addByte(Token.TRUE, iCodeTop); int beyondJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.GOTO, iCodeTop); resolveForwardGoto(trueJumpStart, iCodeTop); iCodeTop = addByte(Token.FALSE, iCodeTop); resolveForwardGoto(beyondJumpStart, iCodeTop); break; } case Token.BITNOT : iCodeTop = addByte(Token.BITNOT, iCodeTop); break; case Token.TYPEOF : iCodeTop = addByte(Token.TYPEOF, iCodeTop); break; case Token.SUB : iCodeTop = addByte(Token.NEG, iCodeTop); break; case Token.ADD : iCodeTop = addByte(Token.POS, iCodeTop); break; default: badTree(node); break; } break; case Token.SETPROP : { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); String s = (String) node.getProp(Node.SPECIAL_PROP_PROP); if (s != null) { if (s.equals("__proto__")) { iCodeTop = addByte(Icode_SETPROTO, iCodeTop); } else if (s.equals("__parent__")) { iCodeTop = addByte(Icode_SETPARENT, iCodeTop); } else { badTree(node); } } else { child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.SETPROP, iCodeTop); itsStackDepth -= 2; } break; } case Token.SETELEM : iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth -= 2; break; case Token.SETNAME : iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.SETNAME, iCodeTop); iCodeTop = addString(firstChild.getString(), iCodeTop); itsStackDepth--; break; case Token.TYPEOF : { String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = scriptOrFn.getParamOrVarIndex(name); if (index == -1) { iCodeTop = addByte(Token.TYPEOFNAME, iCodeTop); iCodeTop = addString(name, iCodeTop); } else { iCodeTop = addByte(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); iCodeTop = addByte(Token.TYPEOF, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case Token.PARENT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Icode_GETPARENT, iCodeTop); break; case Token.GETBASE : case Token.BINDNAME : case Token.NAME : case Token.STRING : iCodeTop = addByte(type, iCodeTop); iCodeTop = addString(node.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.INC : case Token.DEC : { int childType = child.getType(); switch (childType) { case Token.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addByte(Icode_SCOPE, iCodeTop); iCodeTop = addByte(Token.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(type == Token.INC ? Token.PROPINC : Token.PROPDEC, iCodeTop); itsStackDepth--; } else { int i = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addByte(type == Token.INC ? Token.VARINC : Token.VARDEC, iCodeTop); iCodeTop = addByte(i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.GETPROP : case Token.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNext(); iCodeTop = generateICode(getPropChild, iCodeTop); if (childType == Token.GETPROP) { iCodeTop = addByte(type == Token.INC ? Token.PROPINC : Token.PROPDEC, iCodeTop); } else { iCodeTop = addByte(type == Token.INC ? Token.ELEMINC : Token.ELEMDEC, iCodeTop); } itsStackDepth--; break; } default : { iCodeTop = addByte(type == Token.INC ? Token.NAMEINC : Token.NAMEDEC, iCodeTop); iCodeTop = addString(child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } } break; } case Token.NUMBER : { double num = node.getDouble(); int inum = (int)num; if (inum == num) { if (inum == 0) { iCodeTop = addByte(Token.ZERO, iCodeTop); } else if (inum == 1) { iCodeTop = addByte(Token.ONE, iCodeTop); } else if ((short)inum == inum) { iCodeTop = addByte(Icode_SHORTNUMBER, iCodeTop); iCodeTop = addShort(inum, iCodeTop); } else { iCodeTop = addByte(Icode_INTNUMBER, iCodeTop); iCodeTop = addInt(inum, iCodeTop); } } else { iCodeTop = addByte(Token.NUMBER, iCodeTop); iCodeTop = addDouble(num, iCodeTop); } itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case Token.POP : case Token.POPV : iCodeTop = updateLineNumber(node, iCodeTop); case Token.ENTERWITH : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); itsStackDepth--; break; case Token.GETTHIS : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(type, iCodeTop); break; case Token.NEWSCOPE : iCodeTop = addByte(type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.LEAVEWITH : iCodeTop = addByte(type, iCodeTop); break; case Token.TRY : { Node catchTarget = (Node)node.getProp(Node.TARGET_PROP); Node finallyTarget = (Node)node.getProp(Node.FINALLY_PROP); int tryStart = iCodeTop; int tryEnd = -1; int catchStart = -1; int finallyStart = -1; while (child != null) { boolean generated = false; if (child == catchTarget) { if (child.getType() != Token.TARGET) Context.codeBug(); if (tryEnd >= 0) Context.codeBug(); tryEnd = iCodeTop; catchStart = iCodeTop; markTargetLabel(child, iCodeTop); generated = true; // Catch code has exception object on the stack itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } else if (child == finallyTarget) { if (child.getType() != Token.TARGET) Context.codeBug(); if (tryEnd < 0) { tryEnd = iCodeTop; } finallyStart = iCodeTop; markTargetLabel(child, iCodeTop); generated = true; // Adjust stack for finally code: on the top of the // stack it has either a PC value when called from // GOSUB or exception object to rethrow when called // from exception handler itsStackDepth = 1; if (itsStackDepth > itsData.itsMaxStack) { itsData.itsMaxStack = itsStackDepth; } } if (!generated) { iCodeTop = generateICode(child, iCodeTop); } child = child.getNext(); } itsStackDepth = 0; // [tryStart, tryEnd) contains GOSUB to call finally when it // presents at the end of try code and before return, break // continue that transfer control outside try. // After finally is executed the control will be // transfered back into [tryStart, tryEnd) and exception // handling assumes that the only code executed after // finally returns will be a jump outside try which could not // trigger exceptions. // It does not hold if instruction observer throws during // goto. Currently it may lead to double execution of finally. addExceptionHandler(tryStart, tryEnd, catchStart, finallyStart, itsWithDepth); break; } case Token.THROW : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.THROW, iCodeTop); itsStackDepth--; break; case Token.RETURN : iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.RETURN, iCodeTop); itsStackDepth--; } else { iCodeTop = addByte(Icode_RETUNDEF, iCodeTop); } break; case Token.GETVAR : { String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addByte(Icode_SCOPE, iCodeTop); iCodeTop = addByte(Token.STRING, iCodeTop); iCodeTop = addString(name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addByte(Token.GETPROP, iCodeTop); itsStackDepth--; } else { int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addByte(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.SETVAR : { if (itsData.itsNeedsActivation) { child.setType(Token.BINDNAME); node.setType(Token.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addByte(Token.SETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); } break; } case Token.PRIMARY: iCodeTop = addByte(node.getOperation(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.ENUMINIT : iCodeTop = generateICode(child, iCodeTop); iCodeTop = addByte(Token.ENUMINIT, iCodeTop); iCodeTop = addLocalRef(node, iCodeTop); itsStackDepth--; break; case Token.ENUMNEXT : { iCodeTop = addByte(Token.ENUMNEXT, iCodeTop); Node init = (Node)node.getProp(Node.ENUM_PROP); iCodeTop = addLocalRef(init, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } case Token.ENUMDONE : // could release the local here?? break; case Token.REGEXP : { int index = node.getExistingIntProp(Node.REGEXP_PROP); iCodeTop = addByte(Token.REGEXP, iCodeTop); iCodeTop = addIndex(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } default : badTree(node); break; } return iCodeTop; } | 12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/b4041d1788a1c2647ff0fba69f0305761a5ff3bf/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3639,
... |
Mac macSunJCE = Mac.getInstance(alg, "SunJCE"); macSunJCE.init(sk); macSunJCE.update(clearText.getBytes()); byte[] resultSunJCE = macSunJCE.doFinal(clearText.getBytes()); | Mac macJCE = null; String javaVendorName = System.getProperty("java.vendor"); if ( javaVendorName.equals("IBM Corporation") ) { macJCE = Mac.getInstance(alg, "IBMJCE"); } else if ( javaVendorName.equals("Sun Microsystems Inc.") ) { macJCE = Mac.getInstance(alg, "SunJCE"); } macJCE.init(sk); macJCE.update(clearText.getBytes()); byte[] resultSunJCE = macJCE.doFinal(clearText.getBytes()); | public static void doHMAC(SecretKeyFacade sk, String alg) throws Exception { String clearText = new String("Hi There"); //Get the Mozilla-JSS HMAC Mac macJSS = Mac.getInstance(alg, "Mozilla-JSS"); macJSS.init(sk); macJSS.update(clearText.getBytes()); byte[] resultJSS = macJSS.doFinal(clearText.getBytes()); //Get the SunJCE HMAC Mac macSunJCE = Mac.getInstance(alg, "SunJCE"); macSunJCE.init(sk); macSunJCE.update(clearText.getBytes()); byte[] resultSunJCE = macSunJCE.doFinal(clearText.getBytes()); //Check to see if HMACs are equal if ( java.util.Arrays.equals(resultJSS, resultSunJCE) ) { System.out.println("Sun and Mozilla give same " + alg); } else { throw new Exception("ERROR: Sun and Mozilla give different "+ alg ); } } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/2c88207a24bea2d0af88356473969a2e94d3f349/HMACTest.java/buggy/security/jss/org/mozilla/jss/tests/HMACTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
741,
25624,
12,
24526,
12467,
4343,
16,
514,
11989,
13,
377,
1216,
1185,
288,
7734,
514,
2424,
1528,
273,
394,
514,
2932,
25009,
6149,
8863,
3639,
368,
967,
326,
19058,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
741,
25624,
12,
24526,
12467,
4343,
16,
514,
11989,
13,
377,
1216,
1185,
288,
7734,
514,
2424,
1528,
273,
394,
514,
2932,
25009,
6149,
8863,
3639,
368,
967,
326,
19058,
10... |
public void run() { if(isDisposed()) { return; } fProgressBar.stopped();// updateProgressBar(m_progressBar.getMaximum(), false); } | 52916 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52916/939c2626f5ef7c6550d3a506ac6dd14b7667f498/TestRunnerViewPart.java/clean/src/main/org/testng/eclipse/ui/TestRunnerViewPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2681,
1435,
95,
430,
12,
291,
1669,
7423,
10756,
95,
2463,
31,
97,
74,
31547,
18,
24228,
5621,
759,
2725,
31547,
12,
81,
67,
8298,
5190,
18,
588,
13528,
9334,
5743,
1769,
97,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
2681,
1435,
95,
430,
12,
291,
1669,
7423,
10756,
95,
2463,
31,
97,
74,
31547,
18,
24228,
5621,
759,
2725,
31547,
12,
81,
67,
8298,
5190,
18,
588,
13528,
9334,
5743,
1769,
97,
2,
... | ||
editingNodeParent = (DatasetViewTreeNode)selnode.getParent(); editingNodeIndex = editingNodeParent.getIndex(selnode); treemodel.removeNodeFromParent(selnode); String result = treemodel.insertNodeInto(selnode, dropnode, dropnode.getChildCount()); | String result = new String(); if (selnode.getUserObject().getClass().equals(dropnode.getUserObject().getClass())) { treemodel.removeNodeFromParent(selnode); result = treemodel.insertNodeInto(selnode, (DatasetViewTreeNode) dropnode.getParent(), dropnode.getParent().getIndex(dropnode) + 1); } else result = treemodel.insertNodeInto(selnode, dropnode, 0); | public void dragDropEnd(DragSourceDropEvent event) { if (event.getDropSuccess()) { try { if (dropnode.equals(selnode)) { String result = "Error, illegal action, drag==drop, the source is \nthe same as the destination"; JOptionPane.showMessageDialog(frame, result, "Error", JOptionPane.ERROR_MESSAGE); return; } else { //dropnode.add(selnode); editingNodeParent = (DatasetViewTreeNode)selnode.getParent(); editingNodeIndex = editingNodeParent.getIndex(selnode); treemodel.removeNodeFromParent(selnode); String result = treemodel.insertNodeInto(selnode, dropnode, dropnode.getChildCount()); if (result.startsWith("Error")) { JOptionPane.showMessageDialog(frame, result, "Error", JOptionPane.ERROR_MESSAGE); //in case of error we need to insert back the deleted node... treemodel.insertNodeInto(selnode, editingNodeParent, editingNodeIndex); CUT_INITIATED = 0; return; } } } catch (IllegalArgumentException iae) { throw new IllegalArgumentException(iae.toString()); } //treemodel.reload(selnode.getParent()); } } | 2000 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2000/082dd174b481a0310ab6715ad2ee8e75b718027c/DatasetViewTree.java/buggy/src/java/org/ensembl/mart/vieweditor/DatasetViewTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
8823,
7544,
1638,
12,
11728,
1830,
7544,
1133,
871,
13,
288,
5411,
309,
261,
2575,
18,
588,
7544,
4510,
10756,
288,
7734,
775,
288,
10792,
309,
261,
7285,
2159,
18,
14963,
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,
1071,
918,
8823,
7544,
1638,
12,
11728,
1830,
7544,
1133,
871,
13,
288,
5411,
309,
261,
2575,
18,
588,
7544,
4510,
10756,
288,
7734,
775,
288,
10792,
309,
261,
7285,
2159,
18,
14963,
12,
... |
for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } | for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } | public RubyObject m_attr_accessor(RubyObject[] args) { for (int i = 0; i < args.length; i++) { addAttribute(((RubySymbol) args[i]).toId(), true, true, true); } return getRuby().getNil(); } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/clean/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
312,
67,
1747,
67,
3860,
280,
12,
54,
10340,
921,
8526,
833,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
833,
18,
2469,
31,
277,
27245,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
921,
312,
67,
1747,
67,
3860,
280,
12,
54,
10340,
921,
8526,
833,
13,
288,
202,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
833,
18,
2469,
31,
277,
27245,
288,
... |
descriptor.update(); Object element = descriptor.getElement(); if (element != null) { myUnbuiltNodes.remove(node); myUpdater.addSubtreeToUpdateByElement(element); myUpdater.performUpdate(); | descriptor.update(); Object element = descriptor.getElement(); if (element == null) return; | public void run() { descriptor.update(); Object element = descriptor.getElement(); if (element != null) { myUnbuiltNodes.remove(node); myUpdater.addSubtreeToUpdateByElement(element); myUpdater.performUpdate(); for (int i = 0; i < node.getChildCount(); i++) { TreeNode child = node.getChildAt(i); if (child instanceof LoadingNode) { if (TreeBuilderUtil.isNodeOrChildSelected(myTree, node)) { myTree.addSelectionPath(new TreePath(myTreeModel.getPathToRoot(node))); } myTreeModel.removeNodeFromParent((MutableTreeNode)child); break; } } } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/100def6e9fe26bba3206e24fd68301c8585501e0/AbstractTreeBuilder.java/clean/source/com/intellij/ide/util/treeView/AbstractTreeBuilder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1086,
1435,
288,
1850,
4950,
18,
2725,
5621,
1850,
1033,
930,
273,
4950,
18,
21336,
5621,
1850,
309,
261,
2956,
480,
446,
13,
288,
5411,
3399,
984,
12406,
3205,
18,
4479,
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,
1071,
918,
1086,
1435,
288,
1850,
4950,
18,
2725,
5621,
1850,
1033,
930,
273,
4950,
18,
21336,
5621,
1850,
309,
261,
2956,
480,
446,
13,
288,
5411,
3399,
984,
12406,
3205,
18,
4479,
12,
... |
_t = __t2408; | _t = __t2409; | public final void createtablestate(AST _t) throws RecognitionException { AST createtablestate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t2406 = _t; AST tmp1925_AST_in = (AST)_t; match(_t,CREATE); _t = _t.getFirstChild(); AST tmp1926_AST_in = (AST)_t; match(_t,TABLE); _t = _t.getNextSibling(); AST tmp1927_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); AST tmp1928_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ID: { sql_col_def(_t); _t = _retTree; break; } case UNIQUE: { AST __t2408 = _t; AST tmp1929_AST_in = (AST)_t; match(_t,UNIQUE); _t = _t.getFirstChild(); AST tmp1930_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); AST tmp1931_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop2410: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1932_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); AST tmp1933_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); } else { break _loop2410; } } while (true); } AST tmp1934_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2408; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } { _loop2416: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1935_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case ID: { sql_col_def(_t); _t = _retTree; break; } case UNIQUE: { AST __t2413 = _t; AST tmp1936_AST_in = (AST)_t; match(_t,UNIQUE); _t = _t.getFirstChild(); AST tmp1937_AST_in = (AST)_t; match(_t,LEFTPAREN); _t = _t.getNextSibling(); AST tmp1938_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop2415: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==COMMA)) { AST tmp1939_AST_in = (AST)_t; match(_t,COMMA); _t = _t.getNextSibling(); AST tmp1940_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); } else { break _loop2415; } } while (true); } AST tmp1941_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); _t = __t2413; _t = _t.getNextSibling(); break; } default: { throw new NoViableAltException(_t); } } } } else { break _loop2416; } } while (true); } AST tmp1942_AST_in = (AST)_t; match(_t,RIGHTPAREN); _t = _t.getNextSibling(); state_end(_t); _t = _retTree; _t = __t2406; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser01.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser01/TreeParser01.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1519,
270,
278,
9237,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1519,
270,
278,
9237,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
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,
482,
727,
918,
1519,
270,
278,
9237,
395,
340,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
1519,
270,
278,
9237,
395,
340,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
... |
getBySystemName(mControlSensorSystemName); | provideSensor(mControlSensorSystemName); | public void activateLight() { // skip if Light is already active if (!mActive) { // activate according to control type switch (mControlType) { case SENSOR_CONTROL: mControlSensor = InstanceManager.sensorManagerInstance(). getBySystemName(mControlSensorSystemName); if (mControlSensor!=null) { mControlSensor.addPropertyChangeListener(mSensorListener = new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if (e.getPropertyName().equals("KnownState")) { int now = mControlSensor.getKnownState(); if (now==Sensor.ACTIVE) { if (mControlSensorSense==Sensor.ACTIVE) { // Turn light on setState(ON); } else { // Turn light off setState(OFF); } } else if (now==Sensor.INACTIVE) { if (mControlSensorSense==Sensor.INACTIVE) { // Turn light on setState(ON); } else { // Turn light off setState(OFF); } } } } }); mActive = true; } else { // control sensor does not exist log.error("Light "+getSystemName()+" is linked to a Sensor that does not exist: "+ mControlSensorSystemName); return; } break; case FAST_CLOCK_CONTROL: break; case TURNOUT_STATUS_CONTROL: mControlTurnout = InstanceManager.turnoutManagerInstance(). getBySystemName(mControlTurnoutSystemName); if (mControlTurnout!=null) { mControlTurnout.addPropertyChangeListener(mTurnoutListener = new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if (e.getPropertyName().equals("KnownState")) { int now = mControlTurnout.getKnownState(); if (now==Turnout.CLOSED) { if (mTurnoutState==Turnout.CLOSED) { // Turn light on setState(ON); } else { // Turn light off setState(OFF); } } else if (now==Turnout.THROWN) { if (mTurnoutState==Turnout.THROWN) { // Turn light on setState(ON); } else { // Turn light off setState(OFF); } } } } }); mActive = true; } else { // control turnout does not exist log.error("Light "+getSystemName()+" is linked to a Turnout that does not exist: "+ mControlSensorSystemName); return; } break; case NO_CONTROL: // No control mechanism specified break; default: log.warn("Unexpected control type when activating Light: "+getSystemName()); } } } | 213 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/213/d47c9c4880e790069a0aa1ab544713af3fb80c41/AbstractLight.java/buggy/jmri/AbstractLight.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10235,
12128,
1435,
288,
3639,
368,
2488,
309,
15992,
353,
1818,
2695,
3639,
309,
16051,
81,
3896,
13,
288,
5411,
368,
10235,
4888,
358,
3325,
618,
5411,
1620,
261,
81,
3367,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
10235,
12128,
1435,
288,
3639,
368,
2488,
309,
15992,
353,
1818,
2695,
3639,
309,
16051,
81,
3896,
13,
288,
5411,
368,
10235,
4888,
358,
3325,
618,
5411,
1620,
261,
81,
3367,
5... |
seriesDefns = ChartUIUtil.getOrthogonalSeriesDefinitions( getChart( ), -1 ); | seriesDefns = ChartUIUtil.getAllOrthogonalSeriesDefinitions( getChart( ) ); | public void getComponent( Composite parent ) { final int COLUMN_NUMBER = 5; cmpContent = new Composite( parent, SWT.NONE ); { GridLayout glContent = new GridLayout( COLUMN_NUMBER, false ); glContent.horizontalSpacing = 20; cmpContent.setLayout( glContent ); GridData gd = new GridData( GridData.FILL_BOTH ); cmpContent.setLayoutData( gd ); } new Label( cmpContent, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.ColorBy" ) ); //$NON-NLS-1$ cmbColorBy = new Combo( cmpContent, SWT.DROP_DOWN | SWT.READ_ONLY ); { GridData gridData = new GridData( ); gridData.horizontalSpan = COLUMN_NUMBER - 1; cmbColorBy.setLayoutData( gridData ); NameSet ns = LiteralHelper.legendItemTypeSet; cmbColorBy.setItems( ns.getDisplayNames( ) ); cmbColorBy.select( ns.getSafeNameIndex( getChart( ).getLegend( ) .getItemType( ) .getName( ) ) ); cmbColorBy.addSelectionListener( this ); } Label separator = new Label( cmpContent, SWT.SEPARATOR | SWT.HORIZONTAL ); { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); // gd.horizontalIndent = -5; gd.horizontalSpan = COLUMN_NUMBER; separator.setLayoutData( gd ); } Label lblSeries = new Label( cmpContent, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; lblSeries.setLayoutData( gd ); lblSeries.setFont( JFaceResources.getBannerFont( ) ); lblSeries.setText( Messages.getString( "SeriesSheetImpl.Label.Series" ) ); //$NON-NLS-1$ } Label lblTitle = new Label( cmpContent, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; lblTitle.setLayoutData( gd ); lblTitle.setFont( JFaceResources.getBannerFont( ) ); lblTitle.setText( Messages.getString( "SeriesSheetImpl.Label.Title" ) ); //$NON-NLS-1$ } Label lblType = new Label( cmpContent, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; lblType.setLayoutData( gd ); lblType.setFont( JFaceResources.getBannerFont( ) ); lblType.setText( Messages.getString( "SeriesSheetImpl.Label.Type" ) ); //$NON-NLS-1$ } Label lblVisible = new Label( cmpContent, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; lblVisible.setLayoutData( gd ); lblVisible.setFont( JFaceResources.getBannerFont( ) ); lblVisible.setText( Messages.getString( "SeriesSheetImpl.Label.Visible" ) ); //$NON-NLS-1$ } Label lblStack = new Label( cmpContent, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalAlignment = SWT.CENTER; lblStack.setLayoutData( gd ); lblStack.setFont( JFaceResources.getBannerFont( ) ); lblStack.setText( Messages.getString( "SeriesSheetImpl.Label.Stacked" ) ); //$NON-NLS-1$ } List seriesDefns = ChartUIUtil.getBaseSeriesDefinitions( getChart( ) ); int treeIndex = 0; for ( int i = 0; i < seriesDefns.size( ); i++ ) { new SeriesOptionChoser( ( (SeriesDefinition) seriesDefns.get( i ) ), getChart( ) instanceof ChartWithAxes ? Messages.getString( "SeriesSheetImpl.Label.CategoryXSeries" ) : Messages.getString( "SeriesSheetImpl.Label.CategoryBaseSeries" ), //$NON-NLS-1$ //$NON-NLS-2$ i, treeIndex++ ).placeComponents( cmpContent ); } seriesDefns = ChartUIUtil.getOrthogonalSeriesDefinitions( getChart( ), -1 ); for ( int i = 0; i < seriesDefns.size( ); i++ ) { String text = getChart( ) instanceof ChartWithAxes ? Messages.getString( "SeriesSheetImpl.Label.ValueYSeries" ) : Messages.getString( "SeriesSheetImpl.Label.ValueOrthogonalSeries" ); //$NON-NLS-1$ //$NON-NLS-2$ new SeriesOptionChoser( ( (SeriesDefinition) seriesDefns.get( i ) ), ( seriesDefns.size( ) == 1 ? text : ( text + " - " + ( i + 1 ) ) ) + ":", i, treeIndex++ ).placeComponents( cmpContent ); //$NON-NLS-1$ //$NON-NLS-2$ } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/28738ea1377c73d595430451bea56e1444db4233/SeriesSheetImpl.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/series/SeriesSheetImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
6385,
509,
13473,
67,
9931,
273,
1381,
31,
202,
202,
9625,
1350,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
6385,
509,
13473,
67,
9931,
273,
1381,
31,
202,
202,
9625,
1350,
273,
394,
14728,
12,
982,
16,
348,
8588,
18,
9826,
11272,
... |
tr.appendSemicolon(semi); | tr.printType(printType); tr.appendSemicolon(printSemi); | public void prettyPrint(CodeWriter w, PrettyPrinter tr) { boolean semi = tr.appendSemicolon(true); w.write(flags.translate()); print(type, w, tr); w.write(" "); w.write(name); if (init != null) { w.write(" ="); w.allowBreak(2, " "); print(init, w, tr); } if (semi) { w.write(";"); } tr.appendSemicolon(semi); } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/3d89dbe1de98f29c3fc47971d4a9b9af8cab2dca/LocalDecl_c.java/clean/src/polyglot/ast/LocalDecl_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
30410,
12,
1085,
2289,
341,
16,
22328,
12149,
433,
13,
288,
3639,
1250,
23161,
273,
433,
18,
6923,
13185,
17280,
12,
3767,
1769,
3639,
341,
18,
2626,
12,
7133,
18,
13929,
10663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30410,
12,
1085,
2289,
341,
16,
22328,
12149,
433,
13,
288,
3639,
1250,
23161,
273,
433,
18,
6923,
13185,
17280,
12,
3767,
1769,
3639,
341,
18,
2626,
12,
7133,
18,
13929,
10663... |
public TarInputStream(InputStream is) { this(is, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE); | public TarInputStream( InputStream is ) { this( is, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE ); | public TarInputStream(InputStream is) { this(is, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE); } | 10884 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10884/8348e0b29d34f62b8f140a99598373fb0cbf7fcb/TarInputStream.java/buggy/src/main/java/org/codehaus/plexus/archiver/tar/TarInputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
20334,
4348,
12,
4348,
353,
13,
288,
3639,
333,
12,
291,
16,
20334,
1892,
18,
5280,
67,
14618,
47,
4574,
16,
20334,
1892,
18,
5280,
67,
54,
10160,
4574,
1769,
565,
289,
2,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
20334,
4348,
12,
4348,
353,
13,
288,
3639,
333,
12,
291,
16,
20334,
1892,
18,
5280,
67,
14618,
47,
4574,
16,
20334,
1892,
18,
5280,
67,
54,
10160,
4574,
1769,
565,
289,
2,
-100,
... |
if (errors.size() > 0) { | if (wasSuccessful() == false) { | private void showDifferencesBetweenRevisions(final Revision olderRevision, final Revision newerRevision) { new Thread(new BackEndWorker("Getting differences between revisions...") { public void work() { command = backEnd.getDifferencesCommand(olderRevision, newerRevision, filePath); status = ProcessUtilities.backQuote(backEnd.getRoot(), command, lines, errors); } public void finish() { // CVS returns a non-zero exit status if there were any differences. if (errors.size() > 0) { showToolError(revisionsList, errors); return; } DefaultListModel differences = new DefaultListModel(); for (String line : lines) { differences.addElement(line); } switchAnnotationView(differences, PatchListCellRenderer.INSTANCE, differencesDoubleClickListener); // We can't easily retain the context when switching to differences. // As an extension, though, we could do this. annotationView.ensureIndexIsVisible(0); setAnnotatedRevision(null); } }).start(); } | 10883 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10883/9ead4acb5357b2b80b77bd66273c261d972f8504/RevisionWindow.java/buggy/trunk/src/e/scm/RevisionWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2405,
10428,
2980,
11831,
21208,
12,
6385,
13132,
12156,
7939,
16,
727,
13132,
16069,
7939,
13,
288,
3639,
394,
4884,
12,
2704,
4297,
1638,
6671,
2932,
19213,
16440,
3086,
18325,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
10428,
2980,
11831,
21208,
12,
6385,
13132,
12156,
7939,
16,
727,
13132,
16069,
7939,
13,
288,
3639,
394,
4884,
12,
2704,
4297,
1638,
6671,
2932,
19213,
16440,
3086,
18325,
... |
File target = new File("src/test/output/test.log"); | File target = new File(Constants.TEST_DIR_PREFIX + "output/test.log"); | protected void setUp() throws Exception { super.setUp(); layout = new EchoLayout(); File target = new File("src/test/output/test.log"); target.mkdirs(); target.delete(); } | 45789 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45789/d2873019d4e1c4a5f3d8e0e5c18525f3227fe733/RenamingTest.java/clean/logback-core/src/test/java/ch/qos/logback/core/rolling/RenamingTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
24292,
1435,
1216,
1185,
288,
565,
2240,
18,
542,
1211,
5621,
565,
3511,
273,
394,
28995,
3744,
5621,
565,
1387,
1018,
273,
394,
1387,
12,
2918,
18,
16961,
67,
4537,
67,
6307,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
1435,
1216,
1185,
288,
565,
2240,
18,
542,
1211,
5621,
565,
3511,
273,
394,
28995,
3744,
5621,
565,
1387,
1018,
273,
394,
1387,
12,
2918,
18,
16961,
67,
4537,
67,
6307,
... |
public static TvDataBase getInstance() { if (mSingleton == null) { mSingleton = new TvDataBase(); } return mSingleton; } | 9266 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9266/a4b81fbf34013b6ddf1de7376d745af2d6d0f4be/TvDataBase.java/buggy/tvbrowser/src/tvbrowser/core/TvDataBase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
399,
90,
751,
2171,
3694,
1435,
288,
565,
309,
261,
81,
19571,
422,
446,
13,
288,
1377,
312,
19571,
273,
394,
399,
90,
751,
2171,
5621,
565,
289,
3639,
327,
312,
19571,
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,
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,
760,
399,
90,
751,
2171,
3694,
1435,
288,
565,
309,
261,
81,
19571,
422,
446,
13,
288,
1377,
312,
19571,
273,
394,
399,
90,
751,
2171,
5621,
565,
289,
3639,
327,
312,
19571,
31,
... | ||
Runnable terminator = new Runnable() { public void run() { try { if (time > 0) { Thread.sleep(time); } } catch (Exception ex) { | if (!terminationType.equals("none")) { Runnable terminator = new Runnable() { public void run() { if (sfLog().isDebugEnabled()) { sfLog().debug("Timer set:" +time+". Going to sleep "+myId);} try { if (time > 0) { Thread.sleep(time); } } catch (Exception ex) { } String terminationMessage = "Timer '"+time+"' expired . Terminating "+myId; if (sfLog().isDebugEnabled()) { sfLog().debug(terminationMessage);} sfTerminate(new TerminationRecord(terminationType, terminationMessage , null)); | public synchronized void sfStart() throws SmartFrogException, RemoteException { super.sfStart(); if (message != null) { if (sfLog().isInfoEnabled()) { String infoStr=message; sfLog().info(infoStr); } } Runnable terminator = new Runnable() { public void run() { try { if (time > 0) { Thread.sleep(time); } } catch (Exception ex) { } sfTerminate(new TerminationRecord(terminationType, myId, null)); } }; if (!terminationType.equals("none")) { new Thread(terminator).start(); } } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/2ceb086448d620c5d1837df6ff51652003388526/DoNothing.java/clean/core/smartfrog/src/org/smartfrog/sfcore/workflow/components/DoNothing.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
9033,
1685,
1435,
1216,
19656,
42,
303,
75,
503,
16,
18361,
288,
3639,
2240,
18,
21668,
1685,
5621,
3639,
309,
261,
2150,
480,
446,
13,
288,
5411,
309,
261,
21668,
1343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3852,
918,
9033,
1685,
1435,
1216,
19656,
42,
303,
75,
503,
16,
18361,
288,
3639,
2240,
18,
21668,
1685,
5621,
3639,
309,
261,
2150,
480,
446,
13,
288,
5411,
309,
261,
21668,
1343,
... |
public String toString() { return ScriptRuntime.numberToString(doubleValue); | public String toString(Object base) { if (base == Undefined.instance) return ScriptRuntime.numberToString(doubleValue, 10); else return ScriptRuntime.numberToString(doubleValue, ScriptRuntime.toInt32(base)); | public String toString() { return ScriptRuntime.numberToString(doubleValue); } | 19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/7a485cb3e2a37902650dc9ddcf08a26117f89437/NativeNumber.java/buggy/org/mozilla/javascript/NativeNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
202,
565,
327,
7739,
5576,
18,
2696,
5808,
12,
9056,
620,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1762,
1435,
288,
202,
565,
327,
7739,
5576,
18,
2696,
5808,
12,
9056,
620,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
public void setNoTabs(boolean value) { this.noTabs = value; | public void setNoTabs() { this.noTabs = true; this.summary = false; | public void setNoTabs(boolean value) { this.noTabs = value; } | 10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/eb1721d6b126fd28bdce68ab036624e338d8ea11/MineBugHistory.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/workflow/MineBugHistory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
2279,
17348,
12,
6494,
460,
13,
288,
202,
202,
2211,
18,
2135,
17348,
273,
460,
31,
202,
97,
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,
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,
225,
202,
482,
918,
444,
2279,
17348,
12,
6494,
460,
13,
288,
202,
202,
2211,
18,
2135,
17348,
273,
460,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
anticipateAndSend(false, null, "v1", ".1.3.6.1.2.1.15.7", 6, 2); | anticipateAndSend(false, true, null, "v1", ".1.3.6.1.2.1.15.7", 6, 2); | public void testV1TrapDroppedEvent() throws Exception { anticipateAndSend(false, null, "v1", ".1.3.6.1.2.1.15.7", 6, 2); } | 48885 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48885/babd69f99b2c34d418f92b79c80dc38b03680037/TrapHandlerTest.java/buggy/opennms-services/src/test/java/org/opennms/netmgt/trapd/TrapHandlerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
58,
21,
56,
1266,
23683,
1133,
1435,
1216,
1185,
288,
3639,
17841,
24629,
340,
1876,
3826,
12,
5743,
16,
638,
16,
446,
16,
315,
90,
21,
3113,
3552,
21,
18,
23,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
58,
21,
56,
1266,
23683,
1133,
1435,
1216,
1185,
288,
3639,
17841,
24629,
340,
1876,
3826,
12,
5743,
16,
638,
16,
446,
16,
315,
90,
21,
3113,
3552,
21,
18,
23,
18,
26... |
case IProblem.AmbiguousType: | case IProblem.AmbiguousType: case IProblem.UnusedPrivateMethod: case IProblem.UnusedPrivateConstructor: case IProblem.UnusedPrivateField: case IProblem.UnusedPrivateType: | public static boolean hasCorrections(int problemId) { switch (problemId) { case IProblem.UnterminatedString: case IProblem.UnusedImport: case IProblem.DuplicateImport: case IProblem.CannotImportPackage: case IProblem.ConflictingImport: case IProblem.UndefinedMethod: case IProblem.UndefinedConstructor: case IProblem.ParameterMismatch: case IProblem.MethodButWithConstructorName: case IProblem.UndefinedField: case IProblem.UndefinedName: case IProblem.PublicClassMustMatchFileName: case IProblem.PackageIsNotExpectedPackage: case IProblem.UndefinedType: case IProblem.FieldTypeNotFound: case IProblem.ArgumentTypeNotFound: case IProblem.ReturnTypeNotFound: case IProblem.SuperclassNotFound: case IProblem.ExceptionTypeNotFound: case IProblem.InterfaceNotFound: case IProblem.TypeMismatch: case IProblem.UnhandledException: case IProblem.UnreachableCatch: case IProblem.VoidMethodReturnsValue: case IProblem.ShouldReturnValue: case IProblem.MissingReturnType: case IProblem.NonExternalizedStringLiteral: case IProblem.NonStaticAccessToStaticField: case IProblem.NonStaticAccessToStaticMethod: case IProblem.StaticMethodRequested: case IProblem.NonStaticFieldFromStaticInvocation: case IProblem.InstanceMethodDuringConstructorInvocation: case IProblem.InstanceFieldDuringConstructorInvocation: case IProblem.NotVisibleMethod: case IProblem.NotVisibleConstructor: case IProblem.NotVisibleType: case IProblem.SuperclassNotVisible: case IProblem.InterfaceNotVisible: case IProblem.FieldTypeNotVisible: case IProblem.ArgumentTypeNotVisible: case IProblem.ReturnTypeNotVisible: case IProblem.ExceptionTypeNotVisible: case IProblem.NotVisibleField: case IProblem.ImportNotVisible: case IProblem.BodyForAbstractMethod: case IProblem.AbstractMethodInAbstractClass: case IProblem.AbstractMethodMustBeImplemented: case IProblem.BodyForNativeMethod: case IProblem.OuterLocalMustBeFinal: case IProblem.UninitializedLocalVariable: case IProblem.UndefinedConstructorInDefaultConstructor: case IProblem.UnhandledExceptionInDefaultConstructor: case IProblem.NotVisibleConstructorInDefaultConstructor: case IProblem.FieldTypeAmbiguous: case IProblem.ArgumentTypeAmbiguous: case IProblem.ExceptionTypeAmbiguous: case IProblem.ReturnTypeAmbiguous: case IProblem.SuperclassAmbiguous: case IProblem.InterfaceAmbiguous: case IProblem.AmbiguousType: return true; default: return false; } } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/59b3648e77412b0e707bde0559346b31913d03c5/QuickFixProcessor.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
711,
20884,
87,
12,
474,
6199,
548,
13,
288,
202,
202,
9610,
261,
18968,
548,
13,
288,
1082,
202,
3593,
467,
13719,
18,
984,
29133,
780,
30,
1082,
202,
3593,
467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
1250,
711,
20884,
87,
12,
474,
6199,
548,
13,
288,
202,
202,
9610,
261,
18968,
548,
13,
288,
1082,
202,
3593,
467,
13719,
18,
984,
29133,
780,
30,
1082,
202,
3593,
467,
... |
System.err.println("Could not open special bundle - no specials written."); | System.err.println("Could not open ICU special bundle " + specialsDir + File.separator + locName + ".xml - no specials written."); | private ICUResourceWriter.Resource parseBundle(Node root){ ICUResourceWriter.ResourceTable table = null; ICUResourceWriter.Resource current = null; StringBuffer xpath = new StringBuffer(); xpath.append("//ldml"); int savedLength = xpath.length(); for(Node node=root.getFirstChild(); node!=null; node=node.getNextSibling()){ if(node.getNodeType()!=Node.ELEMENT_NODE){ continue; } String name = node.getNodeName(); ICUResourceWriter.Resource res = null; if(name.equals(LDMLConstants.ALIAS)){ ICUResourceWriter.ResourceString str = new ICUResourceWriter.ResourceString(); str.name = "\"%%ALIAS\""; str.val = LDMLUtilities.getAttributeValue(node, LDMLConstants.SOURCE); res = str; table.first = current = null; }else if(name.equals(LDMLConstants.IDENTITY)){ table = (ICUResourceWriter.ResourceTable) parseIdentity(node, xpath); current = findLast(table.first); continue; }else if(name.equals(LDMLConstants.LDML) ){ if(LDMLUtilities.isNodeDraft(node) && writeDraft==false){ System.err.println("WARNING: The LDML file "+sourceDir+File.separator+locName+".xml is marked draft! Not producing ICU file. "); System.exit(-1); } node=node.getFirstChild(); continue; }else if (name.equals(LDMLConstants.SPECIAL)){ /* * IGNORE SPECIALS * FOR NOW */ node=node.getFirstChild(); continue; }else if(name.equals(LDMLConstants.LDN)){ res = parseLocaleDisplayNames(node, xpath); }else if(name.equals(LDMLConstants.LAYOUT)){ //TODO res = parseLayout(node, xpath); }else if(name.equals(LDMLConstants.CHARACTERS)){ res = parseCharacters(node, xpath); }else if(name.equals(LDMLConstants.DELIMITERS)){ res = parseDelimiters(node, xpath); }else if(name.equals(LDMLConstants.MEASUREMENT)){ res = parseMeasurement(node, xpath); }else if(name.equals(LDMLConstants.DATES)){ res = parseDates(node, xpath); }else if(name.equals(LDMLConstants.NUMBERS)){ res = parseNumbers(node, xpath); }else if(name.equals(LDMLConstants.COLLATIONS)){ if(locName.equals("root")){ ICUResourceWriter.ResourceInclude include = new ICUResourceWriter.ResourceInclude(); include.name="\"%%UCARULES\""; include.val = "../unidata/UCARules.txt"; res = include; include.next = parseCollations(node, xpath); }else{ res = parseCollations(node, xpath); } }else if(name.equals(LDMLConstants.POSIX)){ res = parsePosix(node, xpath); }else if(name.indexOf("icu:")>-1|| name.indexOf("openOffice:")>-1){ //TODO: these are specials .. ignore for now ... figure out // what to do later }else{ System.err.println("Encountered unknown element: "+name); System.exit(-1); } if(res!=null){ if(current == null){ table.first = res; current = findLast(res); }else{ current.next = res; current = findLast(res); } res = null; } xpath.delete(savedLength,xpath.length()); } // now fetch the specials and append to the real bundle if(specialsDir!=null && ULocale.getCountry(locName).equals("")){ if(specialsDoc == null) { System.err.println("Could not open special bundle - no specials written."); } else { if(table.comment == null) { table.comment = ""; } ICUResourceWriter.Resource res = parseSpecials(specialsDoc); table.comment = table.comment + " ICU <specials> source: " + specialsDir + File.separator + locName + ".xml"; if(res!=null){ if(current == null){ table.first = res; current = findLast(res); }else{ current.next = res; current = findLast(res); } res = null; } } } return table; } | 27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/8a2b8554eb28f00e3dd375127e6dc8f5a60deddb/LDML2ICUConverter.java/clean/tools/java/org/unicode/cldr/icu/LDML2ICUConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
28009,
1420,
2289,
18,
1420,
1109,
3405,
12,
907,
1365,
15329,
3639,
28009,
1420,
2289,
18,
1420,
1388,
1014,
273,
446,
31,
3639,
28009,
1420,
2289,
18,
1420,
783,
273,
446,
31,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
28009,
1420,
2289,
18,
1420,
1109,
3405,
12,
907,
1365,
15329,
3639,
28009,
1420,
2289,
18,
1420,
1388,
1014,
273,
446,
31,
3639,
28009,
1420,
2289,
18,
1420,
783,
273,
446,
31,
363... |
pushInput(null, ">"); | pushInput("", ">"); | private void readDoctypeDecl() throws IOException, XMLStreamException { if (!supportDTD) error("parser was configured not to support DTDs"); requireWhitespace(); String rootName = readNmtoken(true); skipWhitespace(); ExternalIds ids = readExternalIds(false, true); doctype = this.new Doctype(rootName, ids.publicId, ids.systemId); // Parse internal subset first skipWhitespace(); if (tryRead('[')) { while (true) { expandPE = true; skipWhitespace(); expandPE = false; if (tryRead(']')) break; else { peIsError = expandPE = true; readMarkupdecl(); peIsError = expandPE = false; } } } skipWhitespace(); require('>'); // Parse external subset if (ids.systemId != null && externalEntities) { pushInput(null, ">"); pushInput("[dtd]", ids); // loop until we get back to ">" while (true) { expandPE = true; skipWhitespace(); expandPE = false; mark(1); char c = readCh(); if (c == '>') break; else if (c == '\uffff') popInput(); else { reset(); peIsError = expandPE = true; readMarkupdecl(); peIsError = expandPE = false; } } if (inputStack.size() != 2) error("external subset has unmatched '>'"); popInput(); } // Make rootName available for reading buf.setLength(0); buf.append(rootName); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0194d0bf7a4335231f8ce3fab46cefa8a9a70bb0/XMLParser.java/buggy/core/src/classpath/gnu/gnu/xml/stream/XMLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
3244,
12387,
3456,
1435,
565,
1216,
1860,
16,
21526,
225,
288,
565,
309,
16051,
13261,
25728,
13,
1377,
555,
2932,
4288,
1703,
4351,
486,
358,
2865,
10696,
22831,
8863,
565,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
855,
3244,
12387,
3456,
1435,
565,
1216,
1860,
16,
21526,
225,
288,
565,
309,
16051,
13261,
25728,
13,
1377,
555,
2932,
4288,
1703,
4351,
486,
358,
2865,
10696,
22831,
8863,
565,... |
if (file != null) { resources.add(file); | if (file == null) { IEditorInput editorInput = editor.getEditorInput(); if(editorInput != null ){ Object mapping = editorInput.getAdapter(ResourceMapping.class); if(mapping != null) selectedElements.add(mapping); } } else{ selectedElements.add(file); | protected void focusSelectionChanged(IWorkbenchPart part, ISelection selection) { List resources = new ArrayList(); if (part instanceof IEditorPart) { IEditorPart editor = (IEditorPart) part; IFile file = ResourceUtil.getFile(editor.getEditorInput()); if (file != null) { resources.add(file); } } else { if (selection instanceof IStructuredSelection) { for (Iterator iterator = ((IStructuredSelection) selection) .iterator(); iterator.hasNext();) { Object object = iterator.next(); if (object instanceof IAdaptable) { ITaskListResourceAdapter taskListResourceAdapter; Object adapter = ((IAdaptable) object) .getAdapter(ITaskListResourceAdapter.class); if (adapter != null && adapter instanceof ITaskListResourceAdapter) { taskListResourceAdapter = (ITaskListResourceAdapter) adapter; } else { taskListResourceAdapter = DefaultMarkerResourceAdapter .getDefault(); } IResource resource = taskListResourceAdapter .getAffectedResource((IAdaptable) object); if (resource != null) { resources.add(resource); } } } } } IResource[] focus = new IResource[resources.size()]; resources.toArray(focus); updateFocusResource(focus); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/48e1562baddfe36702b2ca299bc62a20ec11214e/MarkerView.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
7155,
6233,
5033,
12,
45,
2421,
22144,
1988,
1087,
16,
1082,
202,
45,
6233,
4421,
13,
288,
202,
202,
682,
2703,
273,
394,
2407,
5621,
202,
202,
430,
261,
2680,
1276,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
7155,
6233,
5033,
12,
45,
2421,
22144,
1988,
1087,
16,
1082,
202,
45,
6233,
4421,
13,
288,
202,
202,
682,
2703,
273,
394,
2407,
5621,
202,
202,
430,
261,
2680,
1276,
467... |
method = (MetaMethod) chooseMethod(methodName, methods, argClasses, true); if (method == null) { int size = (arguments != null) ? arguments.length : 0; if (size == 1) { Object firstArgument = arguments[0]; if (firstArgument instanceof List) { | int size = (arguments != null) ? arguments.length : 0; if (size == 1) { Object firstArgument = arguments[0]; if (firstArgument instanceof List) { | protected MetaMethod pickMethod(Object object, String methodName, Object[] arguments) { MetaMethod method = null; List methods = getMethods(methodName); if (!methods.isEmpty()) { Class[] argClasses = convertToTypeArray(arguments); method = (MetaMethod) chooseMethod(methodName, methods, argClasses, false); if (method == null) { method = (MetaMethod) chooseMethod(methodName, methods, argClasses, true); if (method == null) { int size = (arguments != null) ? arguments.length : 0; if (size == 1) { Object firstArgument = arguments[0]; if (firstArgument instanceof List) { // lets coerce the list arguments into an array of // arguments // e.g. calling JFrame.setLocation( [100, 100] ) List list = (List) firstArgument; arguments = list.toArray(); argClasses = convertToTypeArray(arguments); method = (MetaMethod) chooseMethod(methodName, methods, argClasses, true); if (method==null) return null; return new TransformMetaMethod(method) { public Object invoke(Object object, Object[] arguments) throws Exception { Object firstArgument = arguments[0]; List list = (List) firstArgument; arguments = list.toArray(); return super.invoke(object, arguments); } }; } } } } } return method; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/5a8268a75c8af9f2515974d6c004683f76dfc140/MetaClass.java/clean/src/main/groovy/lang/MetaClass.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
6565,
1305,
6002,
1305,
12,
921,
733,
16,
514,
4918,
16,
1033,
8526,
1775,
13,
288,
3639,
6565,
1305,
707,
273,
446,
31,
3639,
987,
2590,
273,
15429,
12,
2039,
461,
1769,
3639,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
6565,
1305,
6002,
1305,
12,
921,
733,
16,
514,
4918,
16,
1033,
8526,
1775,
13,
288,
3639,
6565,
1305,
707,
273,
446,
31,
3639,
987,
2590,
273,
15429,
12,
2039,
461,
1769,
3639,
30... |
toStringValue.append(this.delivery_number).append('.'); toStringValue.append(this.delivery_type_number).append('.'); toStringValue.append(this.delivery_invoice_year).append('.'); toStringValue.append(this.delivery_invoice_number).append('.'); | java.lang.reflect.Field [] fields = getClass().getFields(); for (int i=0; i < fields.length; i++) { try { toStringValue.append(fields[i].get(this)).append('.'); } catch (IllegalAccessException ex) { ex.printStackTrace(); toStringValue.append(" ").append('.'); } } | public String toString() { StringBuffer toStringValue = new StringBuffer("[."); toStringValue.append(this.delivery_number).append('.'); toStringValue.append(this.delivery_type_number).append('.'); toStringValue.append(this.delivery_invoice_year).append('.'); toStringValue.append(this.delivery_invoice_number).append('.'); toStringValue.append(']'); return toStringValue.toString(); } | 14127 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14127/2826910c9dcd07979594578c7feff0b20e8fbc25/TransportChargeKey.java/buggy/OpenXavaTest/gen-src/org/openxava/test/ejb/TransportChargeKey.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1762,
1435,
282,
288,
1377,
6674,
1762,
620,
273,
394,
6674,
2932,
63,
1199,
1769,
540,
1762,
620,
18,
6923,
12,
2211,
18,
15703,
67,
2696,
2934,
6923,
2668,
1093,
1769,
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,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
514,
1762,
1435,
282,
288,
1377,
6674,
1762,
620,
273,
394,
6674,
2932,
63,
1199,
1769,
540,
1762,
620,
18,
6923,
12,
2211,
18,
15703,
67,
2696,
2934,
6923,
2668,
1093,
1769,
540,
... |
setSize(width, height); | this.width = width; this.height = height; | public void resize(int width, int height) { setSize(width, height); } | 1739 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1739/3fe1c14284ce32b79d0e66441aec6a45a77ff684/Rectangle.java/clean/libjava/java/awt/Rectangle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7041,
12,
474,
1835,
16,
509,
2072,
13,
225,
288,
565,
333,
18,
2819,
273,
1835,
31,
333,
18,
4210,
273,
2072,
31,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
7041,
12,
474,
1835,
16,
509,
2072,
13,
225,
288,
565,
333,
18,
2819,
273,
1835,
31,
333,
18,
4210,
273,
2072,
31,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if (c.isVisible()) {c.setBounds(insets.left,insets.top+40,368,40);} | if (c.isVisible()) { c.setBounds(insets.left, insets.top + 40, 368, 40); } | public void layoutContainer(Container parent) { Insets insets = parent.getInsets(); Component c; c = parent.getComponent(0); if (c.isVisible()) {c.setBounds(insets.left+368,insets.top,168,80);} c = parent.getComponent(1); if (c.isVisible()) {c.setBounds(insets.left,insets.top,368,40);} c = parent.getComponent(2); if (c.isVisible()) {c.setBounds(insets.left,insets.top+40,368,40);} } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/5ce9b17c12a2b8c491678a62c14ea1084efd627e/ImagePanel.java/clean/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3511,
2170,
12,
2170,
982,
13,
288,
3639,
22300,
23576,
273,
982,
18,
588,
382,
4424,
5621,
3639,
5435,
276,
31,
3639,
276,
273,
982,
18,
588,
1841,
12,
20,
1769,
3639,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2170,
12,
2170,
982,
13,
288,
3639,
22300,
23576,
273,
982,
18,
588,
382,
4424,
5621,
3639,
5435,
276,
31,
3639,
276,
273,
982,
18,
588,
1841,
12,
20,
1769,
3639,
309,
... |
String modeName = setName.substring(0, delim); | Log.log(Log.ERROR,TokenMarker.class, "Unknown edit mode: " + modeName); rules = null; } else { TokenMarker marker = mode.getTokenMarker(); | public ParserRuleSet getRuleSet(String setName) { ParserRuleSet rules; int delim = setName.indexOf("::"); if (delim == -1) { rules = (ParserRuleSet) ruleSets.get(rulePfx.concat(setName)); } else { rules = (ParserRuleSet) ruleSets.get(setName); if (rules == null && !setName.startsWith(rulePfx)) { String modeName = setName.substring(0, delim); rules = getExternalRuleSet(modeName, setName.substring(delim + 2)); // store external ParserRuleSet in the local hashtable for // faster lookups later if (rules != null) ruleSets.put(setName, rules); } } if (rules == null) { Log.log(Log.ERROR,this,"Unresolved delegate target: " + setName); } return rules; } | 6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/bc79149bc32eb5244e4805319591fc75beecf428/TokenMarker.java/buggy/org/gjt/sp/jedit/syntax/TokenMarker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
6783,
21474,
19048,
694,
12,
780,
6788,
13,
202,
95,
202,
202,
2678,
21474,
2931,
31,
202,
202,
474,
10508,
273,
6788,
18,
31806,
2932,
30,
2773,
1769,
202,
202,
430,
261,
238... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6783,
21474,
19048,
694,
12,
780,
6788,
13,
202,
95,
202,
202,
2678,
21474,
2931,
31,
202,
202,
474,
10508,
273,
6788,
18,
31806,
2932,
30,
2773,
1769,
202,
202,
430,
261,
238... |
return ((MCompositeState)handle).getSubvertices(); | return ((MCompositeState) handle).getSubvertices(); | public static Collection getSubvertices(Object handle) { if (isACompositeState(handle)) { return ((MCompositeState)handle).getSubvertices(); } throw new IllegalArgumentException("Unrecognized object " + handle); } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/ModelFacade.java/clean/src_new/org/argouml/model/ModelFacade.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2200,
7040,
17476,
12,
921,
1640,
13,
288,
3639,
309,
261,
291,
37,
9400,
1119,
12,
4110,
3719,
288,
5411,
327,
14015,
49,
9400,
1119,
13,
1640,
2934,
588,
1676,
17476,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2200,
7040,
17476,
12,
921,
1640,
13,
288,
3639,
309,
261,
291,
37,
9400,
1119,
12,
4110,
3719,
288,
5411,
327,
14015,
49,
9400,
1119,
13,
1640,
2934,
588,
1676,
17476,
5621,
... |
JiraFilter filter = new JiraFilter(repository.getUrl().toExternalForm(), namedFilter); | JiraFilter filter = new JiraFilter(repository.getUrl(), namedFilter); | public boolean performFinish() { NamedFilter namedFilter = queryPage.getSelectedFilter(); if (namedFilter != null) { JiraFilter filter = new JiraFilter(repository.getUrl().toExternalForm(), namedFilter); MylarTaskListPlugin.getTaskListManager().addQuery(filter); AbstractRepositoryConnector connector = MylarTaskListPlugin.getRepositoryManager().getRepositoryConnector(repository.getKind()); if (connector != null) { connector.synchronize(filter, null); }// filter.refreshHits(); } return true; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b86455249adfd805375ab5ef4f49dc4b9506e0d2/NewJiraQueryWizard.java/clean/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/ui/wizards/NewJiraQueryWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
3073,
11641,
1435,
288,
202,
202,
7604,
1586,
4141,
1586,
273,
843,
1964,
18,
588,
7416,
1586,
5621,
202,
202,
430,
261,
13188,
1586,
480,
446,
13,
288,
1082,
202,
46,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1435,
288,
202,
202,
7604,
1586,
4141,
1586,
273,
843,
1964,
18,
588,
7416,
1586,
5621,
202,
202,
430,
261,
13188,
1586,
480,
446,
13,
288,
1082,
202,
46,
1... |
if (deviceIDoffset>0) p.sysex[deviceIDoffset]=(byte)(getChannel()-1); | if (deviceIDoffset>0) ((Patch)p).sysex[deviceIDoffset]=(byte)(getChannel()-1); | protected void sendPatch (Patch p) { byte []tmp=new byte[275]; if (deviceIDoffset>0) p.sysex[deviceIDoffset]=(byte)(getChannel()-1); try { for (int i=0;i<100;i++) { System.arraycopy(p.sysex,275*i,tmp,0,275); send(tmp); Thread.sleep(15); } }catch (Exception e) {ErrorMsg.reportError("Error","Unable to send Patch",e);} } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/b6e99a36d447b749f8ec1622f6d2477fcd586fcb/OberheimMatrixBankDriver.java/clean/JSynthLib/synthdrivers/OberheimMatrix/OberheimMatrixBankDriver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
918,
1366,
7332,
261,
7332,
293,
13,
282,
288,
377,
1160,
5378,
5645,
33,
2704,
1160,
63,
5324,
25,
15533,
565,
309,
261,
5964,
734,
3348,
34,
20,
13,
14015,
7332,
13,
84,
2934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
7332,
261,
7332,
293,
13,
282,
288,
377,
1160,
5378,
5645,
33,
2704,
1160,
63,
5324,
25,
15533,
565,
309,
261,
5964,
734,
3348,
34,
20,
13,
14015,
7332,
13,
84,
2934,
... |
Indent.getNormalIndent()); | Indent.getNoneIndent()); | private Block createTagContentNode(final ArrayList<Block> localResult) { return AbstractSyntheticBlock.createSynteticBlock( localResult, this, Indent.getNoneIndent(), myXmlFormattingPolicy, Indent.getNormalIndent()); } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/a973741de360342dedc2b037040fa5bd152a2048/XmlTagBlock.java/clean/source/com/intellij/psi/formatter/xml/XmlTagBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
3914,
752,
1805,
1350,
907,
12,
6385,
2407,
32,
1768,
34,
1191,
1253,
13,
288,
565,
327,
4115,
10503,
16466,
1768,
18,
2640,
10876,
496,
7943,
1768,
12,
1377,
1191,
1253,
16,
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,
3914,
752,
1805,
1350,
907,
12,
6385,
2407,
32,
1768,
34,
1191,
1253,
13,
288,
565,
327,
4115,
10503,
16466,
1768,
18,
2640,
10876,
496,
7943,
1768,
12,
1377,
1191,
1253,
16,
333,
... |
} } else if (propertyName.equals(EAR_COMPONENT_NAME)) { model.setProperty(EAR_COMPONENT_HANDLE, computeEARHandle((String)propertyValue)); | } } else if (propertyName.equals(EAR_COMPONENT_NAME)) { model.setProperty(EAR_COMPONENT_HANDLE, computeEARHandle((String) propertyValue)); | public boolean propertySet(String propertyName, Object propertyValue) { boolean status = super.propertySet(propertyName, propertyValue); if (PROJECT_NAME.equals(propertyName) && propertyValue !=null && ((String)propertyValue).length()!=0) { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject((String)propertyValue); if (project != null) { IProjectProperties projProperties = ServerCore.getProjectProperties(project); if( projProperties.getRuntimeTarget() != null ){ String[] validModuleVersions = getServerVersions(getComponentID(), projProperties.getRuntimeTarget().getRuntimeType()); model.setProperty(VALID_COMPONENT_VERSIONS_FOR_PROJECT_RUNTIME, validModuleVersions); } } } else if (propertyName.equals(EAR_COMPONENT_NAME)) { model.setProperty(EAR_COMPONENT_HANDLE, computeEARHandle((String)propertyValue)); model.setProperty(EAR_COMPONENT_DEPLOY_NAME, propertyValue); IDataModel earDM = (IDataModel)model.getProperty(NESTED_EAR_COMPONENT_CREATION_DM); earDM.setProperty(PROJECT_NAME, propertyValue); } else if(propertyName.equals(COMPONENT_NAME)){ if (!model.isPropertySet(EAR_COMPONENT_NAME)) { model.notifyPropertyChange(EAR_COMPONENT_NAME, IDataModel.VALID_VALUES_CHG); model.setProperty(EAR_COMPONENT_DEPLOY_NAME, getProperty(EAR_COMPONENT_NAME)); } } else if (propertyName.equals(PROJECT_NAME)) { WorkbenchComponent workbenchComp = getTargetWorkbenchComponent(); setEARComponentIfJ2EEModuleCreationOnly(workbenchComp,propertyValue); } else if (propertyName.equals(ADD_TO_EAR)) { model.notifyPropertyChange(NESTED_EAR_COMPONENT_CREATION_DM, IDataModel.DEFAULT_CHG); model.notifyPropertyChange(ADD_TO_EAR, IDataModel.VALID_VALUES_CHG); }// else if (propertyName.equals(J2EE_VERSION)) {// Integer modVersion = convertJ2EEVersionToModuleVersion((Integer) propertyValue);// propertySet(COMPONENT_VERSION, modVersion);// return false;// } return status; } | 8196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8196/adfedea2b23b364bbd7b56fa3578ef4f83a91f15/J2EEComponentCreationDataModelProvider.java/clean/plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentCreationDataModelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
1272,
694,
12,
780,
5470,
16,
1033,
12337,
13,
288,
3639,
1250,
1267,
273,
2240,
18,
4468,
694,
12,
4468,
461,
16,
12337,
1769,
3639,
309,
261,
17147,
67,
1985,
18,
1496... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1272,
694,
12,
780,
5470,
16,
1033,
12337,
13,
288,
3639,
1250,
1267,
273,
2240,
18,
4468,
694,
12,
4468,
461,
16,
12337,
1769,
3639,
309,
261,
17147,
67,
1985,
18,
1496... |
public ArgsNode(ISourcePosition position, int argsCount, ListNode optArgs, int restArg, BlockArgNode blockArgNode) { | public ArgsNode(ISourcePosition position, ListNode arguments, ListNode optionalArguments, int restArguments, BlockArgNode blockArgNode) { | public ArgsNode(ISourcePosition position, int argsCount, ListNode optArgs, int restArg, BlockArgNode blockArgNode) { super(position); this.argsCount = argsCount; this.optArgs = optArgs; this.restArg = restArg; this.blockArgNode = blockArgNode; } | 49476 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49476/b1293eda8454686e846e2a9837b348e2983bb423/ArgsNode.java/buggy/src/org/jruby/ast/ArgsNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6634,
907,
12,
45,
1830,
2555,
1754,
16,
987,
907,
1775,
16,
987,
907,
3129,
4628,
16,
509,
3127,
4628,
16,
3914,
4117,
907,
1203,
4117,
907,
13,
288,
3639,
2240,
12,
3276,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6634,
907,
12,
45,
1830,
2555,
1754,
16,
987,
907,
1775,
16,
987,
907,
3129,
4628,
16,
509,
3127,
4628,
16,
3914,
4117,
907,
1203,
4117,
907,
13,
288,
3639,
2240,
12,
3276,
1769,
... |
for (MasterDegreeThesisDataVersion masterDegreeThesisDataVersion : this .getMasterDegreeThesisGuider()) { if (masterDegreeThesisDataVersion.getCurrentState().getState() .equals(State.ACTIVE)) { guidedThesis.add(masterDegreeThesisDataVersion); } } | for (MasterDegreeThesisDataVersion masterDegreeThesisDataVersion : this .getMasterDegreeThesisGuider()) { if (masterDegreeThesisDataVersion.getCurrentState().getState().equals(State.ACTIVE)) { guidedThesis.add(masterDegreeThesisDataVersion); } } | public List<MasterDegreeThesisDataVersion> getAllGuidedMasterDegreeThesis() { List<MasterDegreeThesisDataVersion> guidedThesis = new ArrayList<MasterDegreeThesisDataVersion>(); for (MasterDegreeThesisDataVersion masterDegreeThesisDataVersion : this .getMasterDegreeThesisGuider()) { if (masterDegreeThesisDataVersion.getCurrentState().getState() .equals(State.ACTIVE)) { guidedThesis.add(masterDegreeThesisDataVersion); } } return guidedThesis; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/5b5f9004b199ea31821cb6486595ed0b3ee2d7df/Teacher.java/clean/src/net/sourceforge/fenixedu/domain/Teacher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
987,
32,
7786,
22885,
1315,
16786,
751,
1444,
34,
5514,
18070,
785,
7786,
22885,
1315,
16786,
1435,
288,
202,
202,
682,
32,
7786,
22885,
1315,
16786,
751,
1444,
34,
13238,
785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
32,
7786,
22885,
1315,
16786,
751,
1444,
34,
5514,
18070,
785,
7786,
22885,
1315,
16786,
1435,
288,
202,
202,
682,
32,
7786,
22885,
1315,
16786,
751,
1444,
34,
13238,
785,
... |
JavaGenerationParameters params = getJavaGenerationParameters(); String returnTypeName = TypeGenerator.qualifiedClassName(params, type); String className = TypeGenerator.className(type); String makeClassName = "make" + className; String manyPattern = patternListVariable(type); String elementType = type.getElementType(); Separators separators = type.getSeparators(); int headLength = 1 + separators.getLength(); int tailIndex = 1 + type.countSeparatorFields(); | JavaGenerationParameters params = getJavaGenerationParameters(); String returnTypeName = TypeGenerator.qualifiedClassName(params, type); String className = TypeGenerator.className(type); String makeClassName = "make" + className; String manyPattern = patternListVariable(type); String elementType = type.getElementType(); Separators separators = type.getSeparators(); int headLength = 1 + separators.getLength(); int tailIndex = 1 + type.countSeparatorFields(); | private void genSeparatedListFromTermMethod(SeparatedListType type) { JavaGenerationParameters params = getJavaGenerationParameters(); String returnTypeName = TypeGenerator.qualifiedClassName(params, type); String className = TypeGenerator.className(type); String makeClassName = "make" + className; String manyPattern = patternListVariable(type); String elementType = type.getElementType(); // String elementClass = TypeGenerator.className(elementType); // String elementClassFromTerm = elementClass + "FromTerm"; Separators separators = type.getSeparators(); int headLength = 1 + separators.getLength(); // on the ATerm level int tailIndex = 1 + type.countSeparatorFields(); // on the abstract // level println(" public " + returnTypeName + " " + className + "FromTerm(aterm.ATerm trm) {"); println(" if (!(trm instanceof aterm.ATermList)) {"); println(" throw new IllegalArgumentException(\"This is not a " + className + ": \" + trm);"); println(" }"); println(); println(" aterm.ATermList list = (aterm.ATermList) trm;"); println(" if (list.isEmpty()) {"); println(" return " + makeClassName + "();"); println(" }"); println(); println(" if (list.getLength() == 1) {"); String singletonElement = buildFromTermListElement(elementType, "list.getFirst()"); println(" return " + makeClassName + "(" + singletonElement + ");"); println(" }"); println(); println(" int length = (list.getLength() / " + headLength + ") + 1;"); println(" java.util.List[] nodes = new java.util.List[length-1];"); println(); println(" for (int i = 0; i < length - 1; i++) {"); println(" java.util.List args = list.match(" + manyPattern + ");"); println(" if (args == null) {"); println(" throw new IllegalArgumentException(\"This is not a " + className + ": \" + trm);"); println(" }"); println(" nodes[i] = args;"); println(" list = (aterm.ATermList) args.get(" + tailIndex + ");"); println(" }"); println(); println(" if (list.getLength() != 1) {"); println(" throw new IllegalArgumentException(\"This is not a " + className + ": \" + trm);"); println(" }"); println(); println(" " + returnTypeName + " result = " + makeClassName + "(" + singletonElement + ");"); println(); println(" for (int i = length - 2; i >= 0; i--) {"); println(" java.util.List children = nodes[i];"); String elementTypeName = TypeGenerator.qualifiedClassName(params, elementType); String head = buildFromTermListElement(elementType, "(aterm.ATerm) children.get(0)"); println(" " + elementTypeName + " head = " + head + ";"); genFromTermSeparatorFieldAssigments(type); String separatorArgs = buildOptionalSeparatorArguments(type); println(" result = " + makeClassName + "(head, " + separatorArgs + "result);"); println(" }"); println(); println(" return result;"); println(" }"); println(); } | 3664 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3664/76875cdfe2af0d6de4ab58a245cce8bd703a86ab/FactoryGenerator.java/clean/apigen/apigen/gen/java/FactoryGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3157,
28174,
682,
1265,
4065,
1305,
12,
28174,
19366,
618,
13,
288,
202,
202,
5852,
13842,
2402,
859,
273,
18911,
13842,
2402,
5621,
202,
202,
780,
327,
7947,
273,
1412,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3157,
28174,
682,
1265,
4065,
1305,
12,
28174,
19366,
618,
13,
288,
202,
202,
5852,
13842,
2402,
859,
273,
18911,
13842,
2402,
5621,
202,
202,
780,
327,
7947,
273,
1412,
3... |
pc = finallyStack[tryStackTop - 1]; scope = scopeStack[tryStackTop - 1]; | pc = finallyStack[--tryStackTop]; scope = scopeStack[tryStackTop]; | public static Object interpret(InterpreterData theData) throws JavaScriptException { Object lhs; Object[] stack = new Object[theData.itsMaxStack]; int stackTop = -1; byte[] iCode = theData.itsICode; int pc = 0; int iCodeLength = theData.itsICodeTop; Object[] local = null; // used for newtemp/usetemp etc. if (theData.itsMaxLocals > 0) local = new Object[theData.itsMaxLocals]; Object[] vars = null; final Scriptable undefined = Undefined.instance; int i = theData.itsVariableTable.size(); if (i > 0) { vars = new Object[i]; for (i = 0; i < theData.itsVariableTable.getParameterCount(); i++) { if (i >= theData.itsInArgs.length) vars[i] = undefined; else vars[i] = theData.itsInArgs[i]; } for ( ; i < vars.length; i++) vars[i] = undefined; } Context cx = theData.itsCX; Scriptable scope = theData.itsScope; if (theData.itsNestedFunctions != null) { for (i = 0; i < theData.itsNestedFunctions.length; i++) createFunctionObject(theData.itsNestedFunctions[i], scope); } Object id; Object rhs; int count; int slot; String name = null; Object[] outArgs; int lIntValue; long lLongValue; int rIntValue; int[] catchStack = null; int[] finallyStack = null; Scriptable[] scopeStack = null; int tryStackTop = 0; if (theData.itsMaxTryDepth > 0) { catchStack = new int[theData.itsMaxTryDepth]; finallyStack = new int[theData.itsMaxTryDepth]; scopeStack = new Scriptable[theData.itsMaxTryDepth]; } /* Save the security domain. Must restore upon normal exit. * If we exit the interpreter loop by throwing an exception, * set cx.interpreterSecurityDomain to null, and require the * catching function to restore it. */ Object savedSecurityDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = theData.securityDomain; Object result = undefined; while (pc < iCodeLength) { try { switch ((int)(iCode[pc] & 0xff)) { case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : i = getTarget(iCode, pc + 1); if (i == pc) i = 0; catchStack[tryStackTop] = i; i = getTarget(iCode, pc + 3); if (i == (pc + 2)) i = 0; finallyStack[tryStackTop] = i; scopeStack[tryStackTop++] = scope; pc += 4; break; case TokenStream.GE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(rhs, lhs); break; case TokenStream.LE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LEB(lhs, rhs); break; case TokenStream.GT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(rhs, lhs); break; case TokenStream.LT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.cmp_LTB(lhs, rhs); break; case TokenStream.IN : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean(ScriptRuntime.in(lhs, rhs)); break; case TokenStream.INSTANCEOF : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Boolean( ScriptRuntime.instanceOf(scope, lhs, rhs)); break; case TokenStream.EQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.eqB(rhs, lhs); break; case TokenStream.NE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.neB(lhs, rhs); break; case TokenStream.SHEQ : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.seqB(lhs, rhs); break; case TokenStream.SHNE : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.sneB(lhs, rhs); break; case TokenStream.IFNE : if (!ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.IFEQ : if (ScriptRuntime.toBoolean(stack[stackTop--])) { pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; case TokenStream.GOTO : pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : stack[++stackTop] = new Integer(pc + 3); pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : slot = (iCode[++pc] & 0xFF); pc = ((Integer)local[slot]).intValue(); continue; case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop--]; break; case TokenStream.RETURN : result = stack[stackTop--]; pc = getTarget(iCode, pc + 1); break; case TokenStream.BITNOT : rIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(~rIntValue); break; case TokenStream.BITAND : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue & rIntValue); break; case TokenStream.BITOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue | rIntValue); break; case TokenStream.BITXOR : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue ^ rIntValue); break; case TokenStream.LSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue << rIntValue); break; case TokenStream.RSH : rIntValue = ScriptRuntime.toInt32(stack[stackTop--]); lIntValue = ScriptRuntime.toInt32(stack[stackTop]); stack[stackTop] = new Double(lIntValue >> rIntValue); break; case TokenStream.URSH : rIntValue = (ScriptRuntime.toInt32(stack[stackTop--]) & 0x1F); lLongValue = ScriptRuntime.toUint32(stack[stackTop]); stack[stackTop] = new Double(lLongValue >>> rIntValue); break; case TokenStream.ADD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.add(lhs, rhs); break; case TokenStream.SUB : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) - ScriptRuntime.toNumber(rhs)); break; case TokenStream.NEG : rhs = stack[stackTop]; stack[stackTop] = new Double(-ScriptRuntime.toNumber(rhs)); break; case TokenStream.POS : rhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(rhs)); break; case TokenStream.MUL : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) * ScriptRuntime.toNumber(rhs)); break; case TokenStream.DIV : rhs = stack[stackTop--]; lhs = stack[stackTop]; // Detect the divide by zero or let Java do it ? stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) / ScriptRuntime.toNumber(rhs)); break; case TokenStream.MOD : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = new Double(ScriptRuntime.toNumber(lhs) % ScriptRuntime.toNumber(rhs)); break; case TokenStream.BINDNAME : stack[++stackTop] = ScriptRuntime.bind(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.GETBASE : stack[++stackTop] = ScriptRuntime.getBase(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETNAME : rhs = stack[stackTop--]; lhs = stack[stackTop]; // what about class cast exception here ? stack[stackTop] = ScriptRuntime.setName((Scriptable)lhs, rhs, scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.DELPROP : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; case TokenStream.GETPROP : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; case TokenStream.SETPROP : rhs = stack[stackTop--]; name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; case TokenStream.GETELEM : id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getElem(lhs, id, scope); break; case TokenStream.SETELEM : rhs = stack[stackTop--]; id = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setElem(lhs, id, rhs, scope); break; case TokenStream.PROPINC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; case TokenStream.PROPDEC : name = (String)stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; case TokenStream.ELEMINC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; case TokenStream.ELEMDEC : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; case TokenStream.GETTHIS : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis((Scriptable)lhs); break; case TokenStream.NEWTEMP : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); local[slot] = lhs; break; case TokenStream.USETEMP : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = local[slot]; break; case TokenStream.CALLSPECIAL : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); name = getString(theData.itsStringTable, iCode, pc + 3); count = (iCode[pc + 5] << 8) | (iCode[pc + 6] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, theData.itsThisObj, scope, name, i); pc += 6; break; case TokenStream.CALL : count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; rhs = stack[stackTop--]; lhs = stack[stackTop]; if (lhs == undefined) { lhs = getString(theData.itsStringTable, iCode, pc + 1); } stack[stackTop] = ScriptRuntime.call(cx, lhs, rhs, outArgs, scope); pc += 4; break; case TokenStream.NEW : count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); outArgs = new Object[count]; for (i = count - 1; i >= 0; i--) outArgs[i] = stack[stackTop--]; lhs = stack[stackTop]; if (lhs == undefined) { lhs = getString(theData.itsStringTable, iCode, pc + 1); } stack[stackTop] = ScriptRuntime.newObject(cx, lhs, outArgs, scope); pc += 4; break; case TokenStream.TYPEOF : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.typeof(lhs); break; case TokenStream.TYPEOFNAME : name = getString(theData.itsStringTable, iCode, pc + 1); stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; case TokenStream.STRING : stack[++stackTop] = getString(theData.itsStringTable, iCode, pc + 1); pc += 2; break; case TokenStream.NUMBER : stack[++stackTop] = getNumber(theData.itsNumberTable, iCode, pc + 1); pc += 2; break; case TokenStream.NAME : stack[++stackTop] = ScriptRuntime.name(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEINC : stack[++stackTop] = ScriptRuntime.postIncrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.NAMEDEC : stack[++stackTop] = ScriptRuntime.postDecrement(scope, getString(theData.itsStringTable, iCode, pc + 1)); pc += 2; break; case TokenStream.SETVAR : lhs = stack[stackTop]; slot = (iCode[++pc] & 0xFF); vars[slot] = lhs; break; case TokenStream.GETVAR : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; break; case TokenStream.VARINC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postIncrement(vars[slot]); break; case TokenStream.VARDEC : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = vars[slot]; vars[slot] = ScriptRuntime.postDecrement(vars[slot]); break; case TokenStream.ZERO : stack[++stackTop] = zero; break; case TokenStream.ONE : stack[++stackTop] = one; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = theData.itsThisObj; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : cx.interpreterSecurityDomain = null; throw new JavaScriptException(stack[stackTop--]); case TokenStream.JTHROW : cx.interpreterSecurityDomain = null; lhs = stack[stackTop--]; if (lhs instanceof JavaScriptException) throw (JavaScriptException)lhs; else throw (RuntimeException)lhs; case TokenStream.ENTERWITH : lhs = stack[stackTop--]; scope = ScriptRuntime.enterWith(lhs, scope); break; case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : slot = (iCode[++pc] & 0xFF); lhs = stack[stackTop--]; local[slot] = ScriptRuntime.initEnum(lhs, scope); break; case TokenStream.ENUMNEXT : slot = (iCode[++pc] & 0xFF); stack[++stackTop] = ScriptRuntime.nextEnum((Enumeration)local[slot]); break; case TokenStream.GETPROTO : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; case TokenStream.GETPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs); break; case TokenStream.GETSCOPEPARENT : lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; case TokenStream.SETPROTO : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; case TokenStream.SETPARENT : rhs = stack[stackTop--]; lhs = stack[stackTop]; stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); if (theData.itsNestedFunctions[i] instanceof InterpretedFunction) { stack[++stackTop] = new InterpretedFunction( (InterpretedFunction) (theData.itsNestedFunctions[i]), scope, cx); createFunctionObject( (InterpretedFunction)stack[stackTop], scope); } else stack[++stackTop] = ScriptRuntime.createFunctionObject(scope, theData.itsNestedFunctions[i].getClass(), cx); pc += 2; break; case TokenStream.OBJECT : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); stack[++stackTop] = theData.itsRegExpLiterals[i]; pc += 2; break; case TokenStream.LINE : i = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); cx.interpreterLine = i; pc += 2; break; case TokenStream.SOURCEFILE : cx.interpreterSourceFile = theData.itsSourceFile; break; default : dumpICode(theData); throw new RuntimeException("Unknown icode : " + (iCode[pc] & 0xff) + " @ pc : " + pc); } pc++; } catch (EcmaError ee) { // an offical ECMA error object, // handle as if it were a JavaScriptException stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[tryStackTop - 1]; scope = scopeStack[tryStackTop - 1]; if (pc == 0) { pc = finallyStack[tryStackTop - 1]; if (pc == 0) throw ee; stack[0] = ee.getErrorObject(); tryStackTop--; } else stack[0] = ee.getErrorObject(); } else throw ee; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (JavaScriptException jsx) { stackTop = 0; cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { pc = catchStack[tryStackTop - 1]; scope = scopeStack[tryStackTop - 1]; if (pc == 0) { pc = finallyStack[tryStackTop - 1]; if (pc == 0) throw jsx; stack[0] = jsx; tryStackTop--; } else stack[0] = ScriptRuntime.unwrapJavaScriptException(jsx); } else throw jsx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } catch (RuntimeException jx) { cx.interpreterSecurityDomain = null; if (tryStackTop > 0) { stackTop = 0; stack[0] = jx; pc = finallyStack[tryStackTop - 1]; scope = scopeStack[tryStackTop - 1]; if (pc == 0) throw jx; tryStackTop--; } else throw jx; // We caught an exception; restore this function's // security domain. cx.interpreterSecurityDomain = theData.securityDomain; } } cx.interpreterSecurityDomain = savedSecurityDomain; return result; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/be8d0da3f81b333dc48b04cbbc76d20e79773420/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1033,
10634,
12,
30010,
751,
326,
751,
13,
3639,
1216,
11905,
503,
565,
288,
3639,
1033,
8499,
31,
3639,
1033,
8526,
2110,
273,
394,
1033,
63,
5787,
751,
18,
1282,
2747,
2624,
... |
clicked.removeAllSeismograms(); | clicked.remove(me); | public void removeSeismogram(MouseEvent me){ BasicSeismogramDisplay clicked = ((BasicSeismogramDisplay)me.getComponent()); clicked.removeAllSeismograms(); seismograms.remove(clicked); basicDisplays.remove(clicked); ((SeismogramDisplay)basicDisplays.getFirst()).addTopTimeBorder(); ((SeismogramDisplay)basicDisplays.getLast()).addBottomTimeBorder(); } | 52623 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52623/464b3b6420615df8658f27e1fc6f2170a69738ec/VerticalSeismogramDisplay.java/clean/src/edu/sc/seis/fissuresUtil/display/VerticalSeismogramDisplay.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1206,
1761,
6228,
5553,
12,
9186,
1133,
1791,
15329,
202,
8252,
1761,
6228,
5553,
4236,
17688,
273,
14015,
8252,
1761,
6228,
5553,
4236,
13,
3501,
18,
588,
1841,
10663,
202,
7475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
1761,
6228,
5553,
12,
9186,
1133,
1791,
15329,
202,
8252,
1761,
6228,
5553,
4236,
17688,
273,
14015,
8252,
1761,
6228,
5553,
4236,
13,
3501,
18,
588,
1841,
10663,
202,
7475... |
int lengthData = binaryData.length; int lengthEncode = lengthData; byte[] decodedData = new byte[lengthData]; for( int i = 0; i<lengthData; i++ ){ decodedData[i] = hexNumberTable[binaryData[i]]; } return decodedData; | int lengthData = binaryData.length; if( lengthData == 0 || lengthData % 2 != 0) return null; int lengthDecode = lengthData / 2; byte[] decodedData = new byte[lengthDecode]; for( int i = 0; i<lengthDecode; i++ ){ decodedData[i] = (byte)((hexNumberTable[binaryData[i*2]] << 4) | hexNumberTable[binaryData[i*2+1]]); } return decodedData; | static public byte[] decode ( byte[] binaryData ) { int lengthData = binaryData.length; int lengthEncode = lengthData; byte[] decodedData = new byte[lengthData]; for( int i = 0; i<lengthData; i++ ){ decodedData[i] = hexNumberTable[binaryData[i]]; } return decodedData; } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/883e3640a5fdfbff1ae8c32eabc60743dc590d6c/HexBin.java/buggy/src/org/apache/xerces/utils/HexBin.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
225,
1160,
8526,
2495,
261,
1160,
8526,
225,
3112,
751,
262,
288,
1377,
509,
769,
751,
282,
273,
3112,
751,
18,
2469,
31,
1377,
509,
769,
5509,
273,
769,
751,
31,
1377,
1160,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1071,
225,
1160,
8526,
2495,
261,
1160,
8526,
225,
3112,
751,
262,
288,
1377,
509,
769,
751,
282,
273,
3112,
751,
18,
2469,
31,
1377,
509,
769,
5509,
273,
769,
751,
31,
1377,
1160,... |
filter.getName(), | stream.getName(), | private void registerChildren(JMethodDeclaration init, List children) { int childCount = children.size()-1; // iterate in reverse order so they come out right ListIterator it = children.listIterator(); // find the end of the list (to get it from an index you need // a linked list... is there a better way to iterate backwards?) for (; it.hasNext(); it.next()); for (; it.hasPrevious(); childCount--) { Object o = it.previous(); if (o instanceof List) { Utils.fail("No support for hierarchical streams yet"); } Utils.assert(o instanceof SIRFilter, "Can only lower filters for now, but got a " + o.getClass() + " instead."); SIRFilter filter = (SIRFilter)o; // register the child init.addStatementFirst(new LIRSetChild(LoweringConstants. getStreamContext(), /* child type */ filter.getName(), /* child name */ LoweringConstants. getChildName(childCount))); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/4169e7bbe10ae89f1279491f6e9aba44d83b57ec/LowerInitFunctions.java/clean/streams/src/at/dms/kjc/sir/lowering/LowerInitFunctions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1744,
4212,
12,
46,
1305,
6094,
1208,
16,
4405,
225,
987,
2325,
13,
288,
202,
474,
31492,
273,
2325,
18,
1467,
1435,
17,
21,
31,
202,
759,
7401,
316,
4219,
1353,
1427,
2898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1744,
4212,
12,
46,
1305,
6094,
1208,
16,
4405,
225,
987,
2325,
13,
288,
202,
474,
31492,
273,
2325,
18,
1467,
1435,
17,
21,
31,
202,
759,
7401,
316,
4219,
1353,
1427,
2898,
... |
final StructureSource src = isSeries((StructureSource) pre.getSource( )); if ( src != null ){ svg_g2d.popParent(); | if (pre.getSource() instanceof StructureSource) { final StructureSource src = isSeries((StructureSource) pre.getSource( )); if ( src != null ){ svg_g2d.popParent(); } | protected void ungroupPrimitive(PrimitiveRenderEvent pre){ SVGGraphics2D svg_g2d = (SVGGraphics2D)_g2d;// svg_g2d.setStyleClass(null); // svg_g2d.setId(null); //For now only ungroup series elements final StructureSource src = isSeries((StructureSource) pre.getSource( )); if ( src != null ){ svg_g2d.popParent(); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/a2eedcd4785f76b2a94f0f64ae876f6e446f0766/SVGRendererImpl.java/buggy/chart/org.eclipse.birt.chart.device.svg/src/org/eclipse/birt/chart/device/svg/SVGRendererImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
640,
1655,
9840,
12,
9840,
3420,
1133,
675,
15329,
202,
202,
26531,
17558,
22,
40,
9804,
67,
75,
22,
72,
273,
261,
26531,
17558,
22,
40,
13,
67,
75,
22,
72,
31,
759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
640,
1655,
9840,
12,
9840,
3420,
1133,
675,
15329,
202,
202,
26531,
17558,
22,
40,
9804,
67,
75,
22,
72,
273,
261,
26531,
17558,
22,
40,
13,
67,
75,
22,
72,
31,
759,
... |
return widths[1]; | return widthsAndHeights[1]; | public static int getCharWidth( Composite composite, CharWidthType type ) { if( composite == null ) throw new IllegalArgumentException(); if( type == null ) throw new IllegalArgumentException(); int[] widths = CACHED_WIDTHS.get( composite.getFont() ); if ( widths == null ) { widths = new int[3]; GC gc = null; try { gc = new GC( composite ); widths[0] = gc.getFontMetrics().getAverageCharWidth(); widths[1] = gc.getCharWidth( 'W' ); widths[2] = (int)( (2*widths[0] + widths[1])/3 ); } finally { gc.dispose(); } CACHED_WIDTHS.put( composite.getFont(), widths ); } assert widths != null; assert widths.length == 3; switch( type ) { case AVERAGE: return widths[0]; case MAX : return widths[1]; case SAFE: return widths[2]; default: assert false; return Integer.MIN_VALUE; } } | 13434 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13434/729d7e35d37f66e553c3deea025da98870ec48a2/FontUtil.java/buggy/trunk/workspace/org.essentialplatform.louis/src/org/essentialplatform/louis/util/FontUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
509,
23577,
2384,
12,
14728,
9635,
16,
3703,
2384,
559,
618,
262,
288,
377,
202,
430,
12,
9635,
422,
446,
262,
604,
394,
2754,
5621,
377,
202,
430,
12,
618,
422,
446,
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,
377,
1071,
760,
509,
23577,
2384,
12,
14728,
9635,
16,
3703,
2384,
559,
618,
262,
288,
377,
202,
430,
12,
9635,
422,
446,
262,
604,
394,
2754,
5621,
377,
202,
430,
12,
618,
422,
446,
262,
... |
try { resp.reset(); } catch (IllegalStateException ise) { log.debug("Can't reset response headers."); } | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (servletRequest.getParameter(TableTagParameters.PARAMETER_EXPORTING) == null) { if (log.isDebugEnabled()) { log.debug("Filter has been called, but PARAMETER_EXPORTING parameter has not been found."); } //don't filter! filterChain.doFilter(servletRequest, servletResponse); return; } HttpServletRequest request = (HttpServletRequest) servletRequest; BufferedResponseWrapper wrapper = new BufferedResponseWrapper((HttpServletResponse) servletResponse); // In a portlet environment, you do not have direct access to the actual request object, so any attribute that // is added will not be visible outside of your portlet. So instead, users MUST append to the StringBuffer, so // that the portlets do not have to bind a new attribute to the request. request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY, new StringBuffer(8096)); request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_TYPE, new StringBuffer(80)); request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_FILENAME, new StringBuffer(80)); filterChain.doFilter(request, wrapper); String pageContent; String contentType; StringBuffer buf = (StringBuffer) request.getAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY); HttpServletResponse resp = (HttpServletResponse) servletResponse; String characterEncoding = resp.getCharacterEncoding(); if (characterEncoding != null) { characterEncoding = "; charset=" + characterEncoding; } if (buf != null && buf.length() > 0) { pageContent = buf.toString(); contentType = ObjectUtils.toString(request.getAttribute(TableTag.FILTER_CONTENT_OVERRIDE_TYPE)); if (log.isDebugEnabled()) { log.debug("Overriding output, writing new output with content type " + contentType); } StringBuffer filename = (StringBuffer) request.getAttribute(TableTag.FILTER_CONTENT_OVERRIDE_FILENAME); try { // needed to reset headers (be sure there are no "no-cache" headers, else export will not work) resp.reset(); } catch (IllegalStateException ise) { log.debug("Can't reset response headers."); } if (filename != null && StringUtils.isNotEmpty(filename.toString())) { if (log.isDebugEnabled()) { log.debug("Filename specified as " + filename); } resp.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\""); } } else { log.debug("NOT overriding input. "); pageContent = wrapper.toString(); contentType = wrapper.getContentType(); } if (contentType != null) { if (contentType.indexOf("charset") > -1) { // charset is already specified (see #921811) servletResponse.setContentType(contentType); } else { servletResponse.setContentType(contentType + StringUtils.defaultString(characterEncoding)); } } servletResponse.setContentLength(pageContent.length()); PrintWriter out = servletResponse.getWriter(); out.write(pageContent); out.close(); } | 10316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10316/64d3d22b04ceb33179e7fe4a4e7c1ecd3c73652d/ResponseOverrideFilter.java/clean/displaytag/src/main/java/org/displaytag/filter/ResponseOverrideFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1586,
12,
18572,
8100,
691,
16,
7971,
1064,
8100,
1064,
16,
4008,
3893,
1034,
3893,
13,
3639,
1216,
1860,
16,
16517,
565,
288,
3639,
309,
261,
23231,
691,
18,
588,
1662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
741,
1586,
12,
18572,
8100,
691,
16,
7971,
1064,
8100,
1064,
16,
4008,
3893,
1034,
3893,
13,
3639,
1216,
1860,
16,
16517,
565,
288,
3639,
309,
261,
23231,
691,
18,
588,
1662,
... | |
ObjectReference trav = TraceInterface.getBootImageLink().plus(bootStart.toWord().toOffset()).toObjectReference(); | ObjectReference trav = TraceInterface.getBootImageLink().plus( bootStart.toWord().toOffset()).toObjectReference(); | public static final void boot(Address bootStart) { Word nextOID = TraceInterface.getOID(); ObjectReference trav = TraceInterface.getBootImageLink().plus(bootStart.toWord().toOffset()).toObjectReference(); objectLinks.set(ALLOC_BOOT, trav); /* Loop through all the objects within boot image */ while (!trav.isNull()) { ObjectReference next = TraceInterface.getLink(trav); Word thisOID = TraceInterface.getOID(trav); /* Add the boot image object to the trace. */ trace.push(TRACE_BOOT_ALLOC); trace.push(thisOID); trace.push(nextOID.minus(thisOID).lsh(LOG_BYTES_IN_ADDRESS)); nextOID = thisOID; /* Move to the next object & adjust for starting address of the bootImage */ if (!next.isNull()) { next = next.toAddress().plus(bootStart.toWord().toOffset()).toObjectReference(); TraceInterface.setLink(trav, next); } trav = next; } } | 4011 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4011/30524c62fa391922d51289c03075f714c772951c/TraceGenerator.java/buggy/MMTk/src/org/mmtk/utility/TraceGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
918,
4835,
12,
1887,
4835,
1685,
13,
288,
565,
9926,
1024,
12945,
273,
2677,
1358,
18,
588,
12945,
5621,
565,
31321,
1284,
90,
273,
2677,
1358,
18,
588,
15817,
2040,
2098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
918,
4835,
12,
1887,
4835,
1685,
13,
288,
565,
9926,
1024,
12945,
273,
2677,
1358,
18,
588,
12945,
5621,
565,
31321,
1284,
90,
273,
2677,
1358,
18,
588,
15817,
2040,
2098,... |
fireChanged(createMatcher(filters)); | fireChanged(getMatcher()); | public void setFilterText(String[] filterStrings) { String[] oldFilters = this.filters; this.filters = TextMatcher.normalizeFilters(filterStrings); boolean need_to_fire_update = setValue(TextMatcher.normalizeFilters(filterStrings)); if (need_to_fire_update) { // fire the event only as necessary if(!TextMatcher.isFilterEqual(oldFilters, filters)) { // classify the change in filter and apply the new filter to this list if(filters.length == 0) { fireMatchAll(); } else if(TextMatcher.isFilterRelaxed(oldFilters, filters)) { fireRelaxed(createMatcher(filters)); } else if(TextMatcher.isFilterConstrained(oldFilters, filters)) { fireConstrained(createMatcher(filters)); } else { fireChanged(createMatcher(filters)); } } } } | 10062 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10062/df6caeef56ae8fa4ebf3607239b6f541b49def0c/TextMatcherEditor.java/buggy/source/ca/odell/glazedlists/TextMatcherEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
22855,
1528,
12,
780,
8526,
1034,
7957,
13,
288,
3639,
514,
8526,
1592,
5422,
273,
333,
18,
6348,
31,
3639,
333,
18,
6348,
273,
3867,
6286,
18,
12237,
5422,
12,
2188,
7957,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22855,
1528,
12,
780,
8526,
1034,
7957,
13,
288,
3639,
514,
8526,
1592,
5422,
273,
333,
18,
6348,
31,
3639,
333,
18,
6348,
273,
3867,
6286,
18,
12237,
5422,
12,
2188,
7957,
1... |
repo.addRemoteRoot(new URL("http: | String urlspec = "mockproto: urlConnection = Handler.registerURL(urlspec + location, "This is test file content"); repo.addRemoteRoot(new URL(urlspec)); | protected void setUp() throws Exception { super.setUp(); File temp = new File(System.getProperty("java.io.tmpdir")); localRoot = new File(temp, "localRepo"); desc = new ComponentDescription("product", "1.1.1", "myproduct/product-1.1.1.txt"); fakeRemoteRoot = new File(temp, "remoteRepo"); testArchive = new File(fakeRemoteRoot, desc.getLocation()); testArchive.getParentFile().mkdirs(); testArchive.createNewFile(); FileOutputStream fos = new FileOutputStream(testArchive); PrintWriter writer = new PrintWriter(fos); writer.println("Hello World"); writer.flush(); writer.close(); desc2 = new ComponentDescription("commons-logging", "1.0.1", "commons-logging/jars/commons-logging-1.0.1.jar"); desc3 = new ComponentDescription("nosuchfile", "noversion", "nolocation"); repo = new ComponentRepository(localRoot); repo.addRemoteRoot(fakeRemoteRoot.toURL()); repo.addRemoteRoot(new URL("http://www.ibiblio.org/maven/")); } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/69411dec1d3b9fe0aead88ec392f76ff0d35c1ce/DownloadTest.java/clean/modules/core/src/test/org/apache/geronimo/deployment/repository/DownloadTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
1387,
1906,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
6290,
18,
1594,
18,
5645,
1214,
7923,
1769,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24292,
1435,
1216,
1185,
288,
3639,
2240,
18,
542,
1211,
5621,
3639,
1387,
1906,
273,
394,
1387,
12,
3163,
18,
588,
1396,
2932,
6290,
18,
1594,
18,
5645,
1214,
7923,
1769,
3639... |
HTMLNode completedDownloadsTempInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Downloads to temporary directory (" + completedDownloadToTemp.size() + ")")); | HTMLNode completedDownloadsTempInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Downloads to temporary directory (" + completedDownloadToTemp.size() + ')')); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { // We ensure that we have a FCP server running if(!fcp.enabled){ this.writeReply(ctx, 400, "text/plain", "FCP server is missing", "You need to enable the FCP server to access this page"); return; } HTTPRequest request = new HTTPRequest(uri, null, ctx); String requestPath = request.getPath().substring("/queue/".length()); if (requestPath.length() > 0) { /* okay, there is something in the path, check it. */ try { FreenetURI key = new FreenetURI(requestPath); /* locate request */ ClientRequest[] clientRequests = fcp.getGlobalRequests(); for (int requestIndex = 0, requestCount = clientRequests.length; requestIndex < requestCount; requestIndex++) { ClientRequest clientRequest = clientRequests[requestIndex]; if (clientRequest.hasFinished() && (clientRequest instanceof ClientGet)) { ClientGet clientGet = (ClientGet) clientRequest; if (clientGet.getURI().toString(false).equals(key.toString(false))) { Bucket data = clientGet.getBucket(); String mimeType = clientGet.getMIMEType(); String requestedMimeType = request.getParam("type", null); String forceString = request.getParam("force"); FProxyToadlet.handleDownload(ctx, data, ctx.getBucketFactory(), mimeType, requestedMimeType, forceString, request.isParameterSet("forcedownload"), "/queue/", key, ""); return; } } } } catch (MalformedURLException mue1) { } } PageMaker pageMaker = ctx.getPageMaker(); // First, get the queued requests, and separate them into different types. LinkedList completedDownloadToDisk = new LinkedList(); LinkedList completedDownloadToTemp = new LinkedList(); LinkedList completedUpload = new LinkedList(); LinkedList completedDirUpload = new LinkedList(); LinkedList failedDownload = new LinkedList(); LinkedList failedUpload = new LinkedList(); LinkedList failedDirUpload = new LinkedList(); LinkedList uncompletedDownload = new LinkedList(); LinkedList uncompletedUpload = new LinkedList(); LinkedList uncompletedDirUpload = new LinkedList(); ClientRequest[] reqs = fcp.getGlobalRequests(); if(Logger.shouldLog(Logger.MINOR, this)) Logger.minor(this, "Request count: "+reqs.length); if(reqs.length < 1){ HTMLNode pageNode = pageMaker.getPageNode("Global queue of " + core.getMyName()); HTMLNode contentNode = pageMaker.getContentNode(pageNode); /* add alert summary box */ contentNode.addChild(core.alerts.createSummary()); HTMLNode infobox = contentNode.addChild(pageMaker.getInfobox("infobox-information", "Global queue is empty")); HTMLNode infoboxContent = pageMaker.getContentNode(infobox); infoboxContent.addChild("#", "There is no task queued on the global queue at the moment."); contentNode.addChild(createInsertBox(pageMaker)); writeReply(ctx, 200, "text/html", "OK", pageNode.generate()); return; } for(int i=0;i<reqs.length;i++) { ClientRequest req = reqs[i]; if(req instanceof ClientGet) { ClientGet cg = (ClientGet) req; if(cg.hasSucceeded()) { if(cg.isDirect()) completedDownloadToTemp.add(cg); else if(cg.isToDisk()) completedDownloadToDisk.add(cg); else // FIXME Logger.error(this, "Don't know what to do with "+cg); } else if(cg.hasFinished()) { failedDownload.add(cg); } else { uncompletedDownload.add(cg); } } else if(req instanceof ClientPut) { ClientPut cp = (ClientPut) req; if(cp.hasSucceeded()) { completedUpload.add(cp); } else if(cp.hasFinished()) { failedUpload.add(cp); } else { uncompletedUpload.add(cp); } } else if(req instanceof ClientPutDir) { ClientPutDir cp = (ClientPutDir) req; if(cp.hasSucceeded()) { completedDirUpload.add(cp); } else if(cp.hasFinished()) { failedDirUpload.add(cp); } else { uncompletedDirUpload.add(cp); } } } Comparator identifierComparator = new Comparator() { public int compare(Object first, Object second) { ClientRequest firstRequest = (ClientRequest) first; ClientRequest secondRequest = (ClientRequest) second; short firstPrio = firstRequest.getPriority(); short secondPrio = secondRequest.getPriority(); if(firstPrio > secondPrio) return 1; if(secondPrio > firstPrio) return -1; return firstRequest.getIdentifier().compareTo(secondRequest.getIdentifier()); } }; Collections.sort(completedDownloadToDisk, identifierComparator); Collections.sort(completedDownloadToTemp, identifierComparator); Collections.sort(completedUpload, identifierComparator); Collections.sort(completedDirUpload, identifierComparator); Collections.sort(failedDownload, identifierComparator); Collections.sort(failedUpload, identifierComparator); Collections.sort(failedDirUpload, identifierComparator); Collections.sort(uncompletedDownload, identifierComparator); Collections.sort(uncompletedUpload, identifierComparator); Collections.sort(uncompletedDirUpload, identifierComparator); HTMLNode pageNode = pageMaker.getPageNode("(" + (uncompletedDirUpload.size() + uncompletedDownload.size() + uncompletedUpload.size()) + "/" + (failedDirUpload.size() + failedDownload.size() + failedUpload.size()) + "/" + (completedDirUpload.size() + completedDownloadToDisk.size() + completedDownloadToTemp.size() + completedUpload.size()) + ") Queued Requests of " + core.getMyName()); HTMLNode contentNode = pageMaker.getContentNode(pageNode); /* add alert summary box */ contentNode.addChild(core.alerts.createSummary()); /* add file insert box */ contentNode.addChild(createInsertBox(pageMaker)); /* navigation bar */ HTMLNode navigationBar = pageMaker.getInfobox("navbar", "Request Navigation"); HTMLNode navigationContent = pageMaker.getContentNode(navigationBar).addChild("ul"); boolean includeNavigationBar = false; if (!completedDownloadToTemp.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#completedDownloadToTemp", "Completed downloads to temp"); includeNavigationBar = true; } if (!completedDownloadToDisk.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#completedDownloadToDisk", "Completed downloads to disk"); includeNavigationBar = true; } if (!completedUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#completedUpload", "Completed uploads"); includeNavigationBar = true; } if (!completedDirUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#completeDirUpload", "Completed directory uploads"); includeNavigationBar = true; } if (!failedDownload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#failedDownload", "Failed downloads"); includeNavigationBar = true; } if (!failedUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#failedUpload", "Failed uploads"); includeNavigationBar = true; } if (!failedDirUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#failedDirUpload", "Failed directory uploads"); includeNavigationBar = true; } if (!uncompletedDownload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#uncompletedDownload", "Downloads in progress"); includeNavigationBar = true; } if (!uncompletedUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#uncompletedUpload", "Uploads in progress"); includeNavigationBar = true; } if (!uncompletedDirUpload.isEmpty()) { navigationContent.addChild("li").addChild("a", "href", "#uncompletedDirUpload", "Directory uploads in progress"); includeNavigationBar = true; } if (includeNavigationBar) { contentNode.addChild(navigationBar); } HTMLNode legendBox = contentNode.addChild(pageMaker.getInfobox("legend", "Legend")); HTMLNode legendContent = pageMaker.getContentNode(legendBox); HTMLNode legendTable = legendContent.addChild("table", "class", "queue"); HTMLNode legendRow = legendTable.addChild("tr"); for(int i=0; i<7; i++){ legendRow.addChild("td", "class", "priority" + i, "Priority " + i); } if (reqs.length > 1 && SimpleToadletServer.isPanicButtonToBeShown) { contentNode.addChild(createPanicBox(pageMaker)); } boolean advancedEnabled = core.isAdvancedDarknetEnabled(); if (!completedDownloadToTemp.isEmpty()) { contentNode.addChild("a", "name", "completedDownloadToTemp"); HTMLNode completedDownloadsTempInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Downloads to temporary directory (" + completedDownloadToTemp.size() + ")")); HTMLNode completedDownloadsToTempContent = pageMaker.getContentNode(completedDownloadsTempInfobox); if (advancedEnabled) { completedDownloadsToTempContent.addChild(createRequestTable(pageMaker, completedDownloadToTemp, new int[] { LIST_IDENTIFIER, LIST_SIZE, LIST_MIME_TYPE, LIST_DOWNLOAD, LIST_PERSISTENCE, LIST_KEY })); } else { completedDownloadsToTempContent.addChild(createRequestTable(pageMaker, completedDownloadToTemp, new int[] { LIST_SIZE, LIST_MIME_TYPE, LIST_DOWNLOAD, LIST_PERSISTENCE, LIST_KEY })); } } if (!completedDownloadToDisk.isEmpty()) { contentNode.addChild("a", "name", "completedDownloadToDisk"); HTMLNode completedToDiskInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Downloads to download directory (" + completedDownloadToDisk.size() + ")")); HTMLNode completedToDiskInfoboxContent = pageMaker.getContentNode(completedToDiskInfobox); if (advancedEnabled) { completedToDiskInfoboxContent.addChild(createRequestTable(pageMaker, completedDownloadToDisk, new int[] { LIST_IDENTIFIER, LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_DOWNLOAD, LIST_PERSISTENCE, LIST_KEY })); } else { completedToDiskInfoboxContent.addChild(createRequestTable(pageMaker, completedDownloadToDisk, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_DOWNLOAD, LIST_PERSISTENCE, LIST_KEY })); } } if (!completedUpload.isEmpty()) { contentNode.addChild("a", "name", "completedUpload"); HTMLNode completedUploadInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Uploads (" + completedUpload.size() + ")")); HTMLNode completedUploadInfoboxContent = pageMaker.getContentNode(completedUploadInfobox); if (advancedEnabled) { completedUploadInfoboxContent.addChild(createRequestTable(pageMaker, completedUpload, new int[] { LIST_IDENTIFIER, LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PERSISTENCE, LIST_KEY })); } else { completedUploadInfoboxContent.addChild(createRequestTable(pageMaker, completedUpload, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PERSISTENCE, LIST_KEY })); } } if (!completedDirUpload.isEmpty()) { contentNode.addChild("a", "name", "completedDirUpload"); HTMLNode completedUploadDirInfobox = contentNode.addChild(pageMaker.getInfobox("completed_requests", "Completed: Directory Uploads (" + completedDirUpload.size() + ")")); HTMLNode completedUploadDirContent = pageMaker.getContentNode(completedUploadDirInfobox); if (advancedEnabled) { completedUploadDirContent.addChild(createRequestTable(pageMaker, completedDirUpload, new int[] { LIST_IDENTIFIER, LIST_FILES, LIST_TOTAL_SIZE, LIST_PERSISTENCE, LIST_KEY })); } else { completedUploadDirContent.addChild(createRequestTable(pageMaker, completedDirUpload, new int[] { LIST_FILES, LIST_TOTAL_SIZE, LIST_PERSISTENCE, LIST_KEY })); } } if (!failedDownload.isEmpty()) { contentNode.addChild("a", "name", "failedDownload"); HTMLNode failedInfobox = contentNode.addChild(pageMaker.getInfobox("failed_requests", "Failed: Downloads (" + failedDownload.size() + ")")); HTMLNode failedContent = pageMaker.getContentNode(failedInfobox); if (advancedEnabled) { failedContent.addChild(createRequestTable(pageMaker, failedDownload, new int[] { LIST_IDENTIFIER, LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } else { failedContent.addChild(createRequestTable(pageMaker, failedDownload, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } } if (!failedUpload.isEmpty()) { contentNode.addChild("a", "name", "failedUpload"); HTMLNode failedInfobox = contentNode.addChild(pageMaker.getInfobox("failed_requests", "Failed: Uploads (" + failedUpload.size() + ")")); HTMLNode failedContent = pageMaker.getContentNode(failedInfobox); if (advancedEnabled) { failedContent.addChild(createRequestTable(pageMaker, failedUpload, new int[] { LIST_IDENTIFIER, LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } else { failedContent.addChild(createRequestTable(pageMaker, failedUpload, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } } if (!failedDirUpload.isEmpty()) { contentNode.addChild("a", "name", "failedDirUpload"); HTMLNode failedInfobox = contentNode.addChild(pageMaker.getInfobox("failed_requests", "Failed: Directory Uploads (" + failedDirUpload.size() + ")")); HTMLNode failedContent = pageMaker.getContentNode(failedInfobox); if (advancedEnabled) { failedContent.addChild(createRequestTable(pageMaker, failedDirUpload, new int[] { LIST_IDENTIFIER, LIST_FILES, LIST_TOTAL_SIZE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } else { failedContent.addChild(createRequestTable(pageMaker, failedDirUpload, new int[] { LIST_FILES, LIST_TOTAL_SIZE, LIST_PROGRESS, LIST_REASON, LIST_PERSISTENCE, LIST_KEY })); } } if (!uncompletedDownload.isEmpty()) { contentNode.addChild("a", "name", "uncompletedDownload"); HTMLNode uncompletedInfobox = contentNode.addChild(pageMaker.getInfobox("requests_in_progress", "In Progress: Downloads (" + uncompletedDownload.size() + ")")); HTMLNode uncompletedContent = pageMaker.getContentNode(uncompletedInfobox); if (advancedEnabled) { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedDownload, new int[] { LIST_IDENTIFIER, LIST_PRIORITY, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_FILENAME, LIST_KEY })); } else { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedDownload, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_KEY })); } } if (!uncompletedUpload.isEmpty()) { contentNode.addChild("a", "name", "uncompletedUpload"); HTMLNode uncompletedInfobox = contentNode.addChild(pageMaker.getInfobox("requests_in_progress", "In Progress: Uploads (" + uncompletedUpload.size() + ")")); HTMLNode uncompletedContent = pageMaker.getContentNode(uncompletedInfobox); if (advancedEnabled) { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedUpload, new int[] { LIST_IDENTIFIER, LIST_PRIORITY, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_FILENAME, LIST_KEY })); } else { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedUpload, new int[] { LIST_FILENAME, LIST_SIZE, LIST_MIME_TYPE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_KEY })); } } if (!uncompletedDirUpload.isEmpty()) { contentNode.addChild("a", "name", "uncompletedDirUpload"); HTMLNode uncompletedInfobox = contentNode.addChild(pageMaker.getInfobox("requests_in_progress", "In Progress: DirUploads (" + uncompletedDirUpload.size() + ")")); HTMLNode uncompletedContent = pageMaker.getContentNode(uncompletedInfobox); if (advancedEnabled) { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedDirUpload, new int[] { LIST_IDENTIFIER, LIST_FILES, LIST_PRIORITY, LIST_TOTAL_SIZE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_KEY })); } else { uncompletedContent.addChild(createRequestTable(pageMaker, uncompletedDirUpload, new int[] { LIST_FILES, LIST_TOTAL_SIZE, LIST_PROGRESS, LIST_PERSISTENCE, LIST_KEY })); } } MultiValueTable pageHeaders = new MultiValueTable(); this.writeReply(ctx, 200, "text/html", "OK", pageHeaders, pageNode.generate()); } | 52909 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52909/62fd59041864b4ed1f43adc676de6bfb5ea977f3/QueueToadlet.java/buggy/src/freenet/clients/http/QueueToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
225,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
759,
1660,
338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
225,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
759,
1660,
338... |
Debug.println("Bundle.getResource(" + name + ") called when loader == null: " + this); Debug.printStackTrace(new Exception("Stack trace")); | Debug.println("Bundle.getResource(" + name + ") called when loader == null: " + this); Debug.printStackTrace(new Exception("Stack trace")); | public URL getResource(String name) { checkValid(); getBundleLoader(); if (loader == null) { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { Debug.println("Bundle.getResource(" + name + ") called when loader == null: " + this); Debug.printStackTrace(new Exception("Stack trace")); } return (null); } return (loader.getResource(name)); } | 2516 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2516/f6b030fd34392bc883e417c7cb597856203b60f9/BundleHost.java/buggy/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleHost.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1976,
5070,
12,
780,
508,
13,
288,
202,
202,
1893,
1556,
5621,
202,
202,
588,
3405,
2886,
5621,
202,
202,
430,
261,
6714,
422,
446,
13,
288,
1082,
202,
430,
261,
2829,
18,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1976,
5070,
12,
780,
508,
13,
288,
202,
202,
1893,
1556,
5621,
202,
202,
588,
3405,
2886,
5621,
202,
202,
430,
261,
6714,
422,
446,
13,
288,
1082,
202,
430,
261,
2829,
18,
9... |
if (changes) { HighlightInfo[] newHighlights = array.toArray(new HighlightInfo[array.size()]); DaemonCodeAnalyzerImpl.setHighlights(document, newHighlights, project); | if (toRemove) { document.getMarkupModel(project).removeHighlighter(highlighter); changes = true; | public static void updateHighlightersByTyping(Project project, DocumentEvent e) { Document document = e.getDocument(); HighlightInfo[] highlights = DaemonCodeAnalyzerImpl.getHighlights(document, project); if (highlights != null) { int offset = e.getOffset(); Editor[] editors = EditorFactory.getInstance().getEditors(document, project); if (editors.length > 0) { Editor editor = editors[0]; // use any editor - just to fetch SelectInEditorManager HighlighterIterator iterator = ((EditorEx)editor).getHighlighter().createIterator(Math.max(0, offset - 1)); if (iterator.atEnd()) return; int start = iterator.getStart(); while (iterator.getEnd() < e.getOffset() + e.getNewLength()) { iterator.advance(); if (iterator.atEnd()) return; } int end = iterator.getEnd(); ArrayList<HighlightInfo> array = new ArrayList<HighlightInfo>(); boolean changes = false; for (HighlightInfo info : highlights) { RangeHighlighter highlighter = info.highlighter; boolean toRemove = false; if (info.needUpdateOnTyping()) { int highlighterStart = highlighter.getStartOffset(); int highlighterEnd = highlighter.getEndOffset(); if (info.isAfterEndOfLine) { if (highlighterStart < document.getTextLength()) { highlighterStart += 1; } if (highlighterEnd < document.getTextLength()) { highlighterEnd += 1; } } if (!highlighter.isValid()) { toRemove = true; } else if (start < highlighterEnd && highlighterStart < end) { LOG.assertTrue(0 <= highlighterStart); LOG.assertTrue(highlighterStart < document.getTextLength()); HighlighterIterator iterator1 = ((EditorEx)editor).getHighlighter().createIterator(highlighterStart); int start1 = iterator1.getStart(); while (iterator1.getEnd() < highlighterEnd) { iterator1.advance(); } int end1 = iterator1.getEnd(); CharSequence chars = document.getCharsSequence(); String token = chars.subSequence(start1, end1).toString(); if (start1 != highlighterStart || end1 != highlighterEnd || !token.equals(info.text)) { toRemove = true; } } } if (toRemove) { document.getMarkupModel(project).removeHighlighter(highlighter); changes = true; } else { array.add(info); } } if (changes) { HighlightInfo[] newHighlights = array.toArray(new HighlightInfo[array.size()]); DaemonCodeAnalyzerImpl.setHighlights(document, newHighlights, project); } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/b31bebc4bb3d15df5d43bdfc0c9732c73c647877/UpdateHighlightersUtil.java/clean/codeInsight/impl/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1089,
8573,
80,
2031,
5432,
858,
18488,
310,
12,
4109,
1984,
16,
4319,
1133,
425,
13,
288,
565,
4319,
1668,
273,
425,
18,
588,
2519,
5621,
565,
31386,
966,
8526,
8839,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
1089,
8573,
80,
2031,
5432,
858,
18488,
310,
12,
4109,
1984,
16,
4319,
1133,
425,
13,
288,
565,
4319,
1668,
273,
425,
18,
588,
2519,
5621,
565,
31386,
966,
8526,
8839,
8... |
public void data(int row, int column, String s) throws ParseException { throw new ParseException(""); } | 57344 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57344/0161c60988acd0837b7392536c3eb6d76fbbefc9/SemanticUtil.java/buggy/src/org/genepattern/util/SemanticUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
892,
12,
474,
492,
16,
474,
2827,
16,
7957,
13,
15069,
13047,
95,
12849,
2704,
13047,
2932,
8863,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
6459,
892,
12,
474,
492,
16,
474,
2827,
16,
7957,
13,
15069,
13047,
95,
12849,
2704,
13047,
2932,
8863,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | ||
runtime.getIterStack().push(runtime.isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); | getRuntime().getIterStack().push(getRuntime().isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); | public void callInit(IRubyObject[] args) { runtime.getIterStack().push(runtime.isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); try { callMethod("initialize", args); } finally { runtime.getIterStack().pop(); } } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyObject.java/clean/src/org/jruby/RubyObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
2570,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
18814,
7675,
588,
2360,
2624,
7675,
6206,
12,
588,
5576,
7675,
291,
1768,
6083,
1435,
692,
3016,
18,
11844,
67,
3670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
745,
2570,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
18814,
7675,
588,
2360,
2624,
7675,
6206,
12,
588,
5576,
7675,
291,
1768,
6083,
1435,
692,
3016,
18,
11844,
67,
3670,... |
public void startElement (String uri, String name, String qName, Attributes atts) | public void startElement (String namespaceURI, String localName, String qName, Attributes atts) | public void startElement (String uri, String name, String qName, Attributes atts) { charBuff = new StringBuffer(); if (name.equals("properties")) properties = new Properties(); else if (name.equals("db-type-mapping")) dbTypeMapping = new DbTypeMapping(); else if (name.equals("type")) type = new Type(); } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/fff5f83048237ba0891f7dc710a4af381699a38c/DbLoader.java/clean/source/org/jasig/portal/tools/DbLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
261,
780,
19421,
16,
514,
11927,
16,
514,
22914,
16,
9055,
15687,
13,
565,
288,
1377,
1149,
10642,
273,
394,
6674,
5621,
1377,
309,
261,
529,
18,
14963,
2932,
4738,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
261,
780,
19421,
16,
514,
11927,
16,
514,
22914,
16,
9055,
15687,
13,
565,
288,
1377,
1149,
10642,
273,
394,
6674,
5621,
1377,
309,
261,
529,
18,
14963,
2932,
4738,
6,
... |
if (val == null) return null; | if (val == null) { return null; } | public String getStringProperty(String name) { String val = props.getProperty(name); if (val == null) return null; return val.trim(); } | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/PropertiesParser.java/clean/src/java/org/quartz/utils/PropertiesParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
4997,
1396,
12,
780,
508,
13,
288,
3639,
514,
1244,
273,
3458,
18,
588,
1396,
12,
529,
1769,
3639,
309,
261,
1125,
422,
446,
13,
288,
327,
446,
31,
289,
3639,
327,
1244,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
4997,
1396,
12,
780,
508,
13,
288,
3639,
514,
1244,
273,
3458,
18,
588,
1396,
12,
529,
1769,
3639,
309,
261,
1125,
422,
446,
13,
288,
327,
446,
31,
289,
3639,
327,
1244,
18... |
return new DelayedFreeBucket(new PaddedEphemerallyEncryptedBucket(b, 1024, rand, false)); | return new DelayedFreeBucket(this, new PaddedEphemerallyEncryptedBucket(b, 1024, rand, false)); | public Bucket makeEncryptedBucket() throws IOException { Bucket b = makeRawBucket(-1); return new DelayedFreeBucket(new PaddedEphemerallyEncryptedBucket(b, 1024, rand, false)); } | 51738 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51738/8b2c06b956e45c96344a02727091d991e261801f/PersistentTempBucketFactory.java/buggy/src/freenet/support/io/PersistentTempBucketFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7408,
1221,
14678,
4103,
1435,
1216,
1860,
288,
202,
202,
4103,
324,
273,
1221,
4809,
4103,
19236,
21,
1769,
202,
202,
2463,
394,
20165,
329,
9194,
4103,
12,
2704,
453,
9665,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
7408,
1221,
14678,
4103,
1435,
1216,
1860,
288,
202,
202,
4103,
324,
273,
1221,
4809,
4103,
19236,
21,
1769,
202,
202,
2463,
394,
20165,
329,
9194,
4103,
12,
2704,
453,
9665,
41... |
addMethod(name, new EvaluateMethod(new ZSuperNode(getRuntime().getPosition())), noex); | ICallable superCall = new EvaluateMethod(new ZSuperNode(getRuntime().getPosition()), visibility); addMethod(name, superCall); | public void exportMethod(String name, int noex) { if (this == getRuntime().getClasses().getObjectClass()) { getRuntime().secure(4); } ICallable method = searchMethod(name); if (method == null && isModule()) { method = getRuntime().getClasses().getObjectClass().searchMethod(name); } if (method == null) { throw new NameError( ruby, "undefined method '" + name + "' for " + (isModule() ? "module" : "class") + " '" + toName() + "'"); } if (method.getNoex() != noex) { if (this == method.getImplementationClass()) { method.setNoex(noex); } else { addMethod(name, new EvaluateMethod(new ZSuperNode(getRuntime().getPosition())), noex); } } } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/f05423516c2d1bfe54c4363eedb9654f7cfb6898/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
1305,
12,
780,
508,
16,
509,
1158,
338,
13,
288,
3639,
309,
261,
2211,
422,
18814,
7675,
588,
4818,
7675,
588,
921,
797,
10756,
288,
5411,
18814,
7675,
8869,
12,
24,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3359,
1305,
12,
780,
508,
16,
509,
1158,
338,
13,
288,
3639,
309,
261,
2211,
422,
18814,
7675,
588,
4818,
7675,
588,
921,
797,
10756,
288,
5411,
18814,
7675,
8869,
12,
24,
17... |
super.destroy(); if (log == null) { log("RepositoryStartupServlet shutting down..."); } else { log.info("RepositoryStartupServlet shutting down..."); } | super.destroy(); if (log == null) { log("RepositoryStartupServlet shutting down..."); } else { log.info("RepositoryStartupServlet shutting down..."); } | public void destroy() { super.destroy(); if (log == null) { log("RepositoryStartupServlet shutting down..."); } else { log.info("RepositoryStartupServlet shutting down..."); } shutdownRepository(); unregisterRMI(); unregisterJNDI(); if (log == null) { log("RepositoryStartupServlet shut down."); } else { log.info("RepositoryStartupServlet shut down."); } } | 48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/ea26796f449e8d6bdf969e6f35b5306748634e12/RepositoryStartupServlet.java/buggy/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5546,
1435,
288,
202,
9565,
18,
11662,
5621,
202,
430,
261,
1330,
422,
446,
13,
288,
202,
565,
613,
2932,
3305,
22178,
4745,
24376,
2588,
7070,
1769,
202,
97,
469,
288,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5546,
1435,
288,
202,
9565,
18,
11662,
5621,
202,
430,
261,
1330,
422,
446,
13,
288,
202,
565,
613,
2932,
3305,
22178,
4745,
24376,
2588,
7070,
1769,
202,
97,
469,
288,
202,
... |
LocalVariable mark = context.markLocalVariables(); | LocalVariable mark = context.markLocalVariables(true); | public Sequence eval( Sequence contextSequence, Item contextItem) throws XPathException { // Save the local variable stack LocalVariable mark = context.markLocalVariables(); QName varName; LocalVariable var; Sequence argSeq; int j = 0; for(Iterator i = parameters.iterator(); i.hasNext(); j++) { varName = (QName)i.next(); var = new LocalVariable(varName); var.setValue(currentArguments[j]); context.declareVariable(var); } Sequence result = body.eval(contextSequence, contextItem); // restore the local variable stack context.popLocalVariables(mark); return result; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/756afca2dcd29715e82e9ea850a9f1680091db57/UserDefinedFunction.java/clean/src/org/exist/xquery/UserDefinedFunction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8370,
5302,
12,
202,
202,
4021,
819,
4021,
16,
202,
202,
1180,
819,
1180,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
759,
7074,
326,
1191,
2190,
2110,
202,
202,
2042,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8370,
5302,
12,
202,
202,
4021,
819,
4021,
16,
202,
202,
1180,
819,
1180,
13,
202,
202,
15069,
10172,
503,
288,
202,
202,
759,
7074,
326,
1191,
2190,
2110,
202,
202,
2042,
309... |
int defaultLevel = "default".equals(level) ? 0 : Integer.parseInt(level); | int defaultLevel = level.length() == 0 || "default".equals(level) ? 0 : Integer.parseInt(level); | public void widgetSelected(SelectionEvent e) { // Clean up any previous editor control Control oldEditor = editor1.getEditor(); if (oldEditor != null) oldEditor.dispose(); oldEditor = editor2.getEditor(); if (oldEditor != null) oldEditor.dispose(); // Identify the selected row final TreeItem item = (TreeItem) e.item; if (!isEditable(item)) return; final Spinner spinner = new Spinner(tree, SWT.BORDER); spinner.setMinimum(0); String level = item.getText(1); int defaultLevel = "default".equals(level) ? 0 : Integer.parseInt(level); //$NON-NLS-1$ spinner.setSelection(defaultLevel); spinner.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { if (item.getChecked()) { int selection = spinner.getSelection(); item.setText(1, selection == 0 ? "default" //$NON-NLS-1$ : Integer.toString(selection)); fTab.updateLaunchConfigurationDialog(); } } }); editor1.setEditor(spinner, item, 1); final CCombo combo = new CCombo(tree, SWT.BORDER | SWT.READ_ONLY); combo.setItems(new String[] { "default", Boolean.toString(true), Boolean.toString(false) }); //$NON-NLS-1$ combo.setText(item.getText(2)); combo.pack(); combo.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (item.getChecked()) { item.setText(2, combo.getText()); fTab.updateLaunchConfigurationDialog(); } } }); editor2.setEditor(combo, item, 2); } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/10328d02e0a095fe18e9fe3ba0219ed66e2e9676/EquinoxPluginBlock.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EquinoxPluginBlock.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1875,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
9506,
202,
759,
9645,
731,
1281,
2416,
4858,
3325,
9506,
202,
3367,
1592,
6946,
273,
4858,
21,
18,
588,
6946,
5621,
9506,
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,
1875,
202,
482,
918,
3604,
7416,
12,
6233,
1133,
425,
13,
288,
9506,
202,
759,
9645,
731,
1281,
2416,
4858,
3325,
9506,
202,
3367,
1592,
6946,
273,
4858,
21,
18,
588,
6946,
5621,
9506,
202,
... |
private void mustbe(char c, boolean copy) throws SQLException { if (in[s] != c) { throw new SQLException(Messages.get("error.parsesql.mustbe", String.valueOf(s), String.valueOf(c)), "22019"); } if (copy) { out[d++] = in[s++]; } else { s++; } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/7280c48789e4df146f790790062fb954f7dc9903/SQLParser.java/clean/src/main/net/sourceforge/jtds/jdbc/SQLParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1297,
2196,
12,
3001,
276,
16,
1250,
1610,
13,
3639,
1216,
6483,
288,
3639,
309,
261,
267,
63,
87,
65,
480,
276,
13,
288,
5411,
604,
394,
6483,
12,
5058,
18,
588,
2932,
163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1297,
2196,
12,
3001,
276,
16,
1250,
1610,
13,
3639,
1216,
6483,
288,
3639,
309,
261,
267,
63,
87,
65,
480,
276,
13,
288,
5411,
604,
394,
6483,
12,
5058,
18,
588,
2932,
163... | ||
WorldIterator schedules = new NonNullElements(KEY.TRAIN_SCHEDULES, w); | WorldIterator schedules = new NonNullElements(KEY.TRAIN_SCHEDULES, w, p); | static RemoveStationMove getInstance(ReadOnlyWorld w, ChangeTrackPieceMove removeTrackMove, FreerailsPrincipal p) { WorldIterator wi = new NonNullElements(KEY.STATIONS, w, p); int stationIndex = -1; while (wi.next()) { StationModel station = (StationModel)wi.getElement(); if (station.x == removeTrackMove.getLocation().x && station.y == removeTrackMove.getLocation().y) { //We have found the station! stationIndex = wi.getIndex(); break; } } if (-1 == stationIndex) { throw new IllegalArgumentException("Could find a station at " + removeTrackMove.getLocation().x + ", " + removeTrackMove.getLocation().y); } StationModel station2remove = (StationModel)w.get(KEY.STATIONS, stationIndex, p); ArrayList moves = new ArrayList(); moves.add(removeTrackMove); moves.add(new RemoveItemFromListMove(KEY.STATIONS, stationIndex, station2remove, p)); //Now update any train schedules that include this station. WorldIterator schedules = new NonNullElements(KEY.TRAIN_SCHEDULES, w); while (schedules.next()) { ImmutableSchedule schedule = (ImmutableSchedule)schedules.getElement(); ObjectKey stationKey = new ObjectKey(KEY.STATIONS, p, stationIndex); if (schedule.stopsAtStation(stationKey)) { MutableSchedule mutableSchedule = new MutableSchedule(schedule); mutableSchedule.removeAllStopsAtStation(stationKey); Move changeScheduleMove = new ChangeTrainScheduleMove(schedules.getIndex(), schedule, mutableSchedule.toImmutableSchedule()); moves.add(changeScheduleMove); } } return new RemoveStationMove(moves); } | 9170 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9170/0f0d2fc188b00c01c5e02e0adc969b4c7ad83bd9/RemoveStationMove.java/buggy/railz/src/org/railz/move/RemoveStationMove.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
3581,
16672,
7607,
3694,
12,
12066,
18071,
341,
16,
3639,
7576,
4402,
22607,
7607,
1206,
4402,
7607,
16,
478,
266,
264,
15208,
9155,
293,
13,
288,
3639,
21820,
3198,
16138,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
3581,
16672,
7607,
3694,
12,
12066,
18071,
341,
16,
3639,
7576,
4402,
22607,
7607,
1206,
4402,
7607,
16,
478,
266,
264,
15208,
9155,
293,
13,
288,
3639,
21820,
3198,
16138,
273,
394,
... |
RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); | RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); | public GetMethodBodyResult getMethodBody(RubyId id, int noex) { GetMethodBodyResult result = new GetMethodBodyResult(this, id, noex); MethodNode methodNode = searchMethod(id); if (methodNode == null || methodNode.getBodyNode() == null) { System.out.println( "Cant find method \"" + id.toName() + "\" in class " + toName()); RubyMethodCacheEntry.saveEmptyEntry(getRuby(), this, id); return result; } RubyMethodCacheEntry ent = new RubyMethodCacheEntry(this, methodNode.getNoex()); Node body = methodNode.getBodyNode(); if (body instanceof FBodyNode) { FBodyNode fbody = (FBodyNode) body; ent.setMid(id); ent.setOrigin((RubyModule) fbody.getOrigin()); ent.setMid0(fbody.getMId()); ent.setMethod(fbody.getHeadNode()); result.setRecvClass((RubyModule) fbody.getOrigin()); result.setId(fbody.getMId()); body = fbody.getHeadNode(); } else { ent.setMid(id); ent.setMid0(id); ent.setOrigin(methodNode.getMethodOrigin()); ent.setMethod(body); result.setRecvClass(methodNode.getMethodOrigin()); } RubyMethodCacheEntry.saveEntry(getRuby(), this, id, ent); result.setNoex(ent.getNoex()); result.setBody(body); return result; } | 47619 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47619/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyModule.java/buggy/org/jruby/RubyModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
968,
1305,
2250,
1253,
6272,
2250,
12,
54,
10340,
548,
612,
16,
509,
1158,
338,
13,
288,
202,
202,
967,
1305,
2250,
1253,
563,
273,
394,
968,
1305,
2250,
1253,
12,
2211,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
968,
1305,
2250,
1253,
6272,
2250,
12,
54,
10340,
548,
612,
16,
509,
1158,
338,
13,
288,
202,
202,
967,
1305,
2250,
1253,
563,
273,
394,
968,
1305,
2250,
1253,
12,
2211,
16,
... |
public void stop() throws Exception { connector.onStopped(this); try { if (masterBroker != null){ masterBroker.stop(); } // If the transport has not failed yet, // notify the peer that we are doing a normal shutdown. if( transportException == null ) { transport.oneway(new ShutdownInfo()); } } catch (Exception ignore) { //ignore.printStackTrace(); } transport.stop(); active = false; super.stop(); } | 17032 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17032/4b595ea6dc2d0bd3dcd7e80d0ddb670ead17245d/TransportConnection.java/clean/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2132,
1435,
1216,
1185,
288,
3639,
8703,
18,
265,
15294,
12,
2211,
1769,
3639,
775,
288,
5411,
309,
261,
7525,
11194,
480,
446,
15329,
7734,
4171,
11194,
18,
5681,
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,
377,
1071,
918,
2132,
1435,
1216,
1185,
288,
3639,
8703,
18,
265,
15294,
12,
2211,
1769,
3639,
775,
288,
5411,
309,
261,
7525,
11194,
480,
446,
15329,
7734,
4171,
11194,
18,
5681,
5621,
5411,
... | ||
if (element instanceof IPluginFolder) { switch (((IPluginFolder) element).getFolderId()) { case IPluginFolder.F_IMPORTS : | if (element instanceof IBundleFolder) { switch (((IBundleFolder) element).getFolderId()) { case IBundleFolder.F_IMPORTS : | public String getText(Object element) { if (element instanceof PluginObjectAdapter) element = ((PluginObjectAdapter) element).getObject(); if (element instanceof IPluginDescriptor) { return ((IPluginDescriptor)element).getUniqueIdentifier(); } if (element instanceof IPluginFolder) { switch (((IPluginFolder) element).getFolderId()) { case IPluginFolder.F_IMPORTS : return PDERuntimeMessages.RegistryView_folders_imports; case IPluginFolder.F_LIBRARIES : return PDERuntimeMessages.RegistryView_folders_libraries; case IPluginFolder.F_EXTENSION_POINTS : return PDERuntimeMessages.RegistryView_folders_extensionPoints; case IPluginFolder.F_EXTENSIONS : return PDERuntimeMessages.RegistryView_folders_extensions; } } if (element instanceof IExtension) { if (((RegistryBrowserContentProvider)viewer.getContentProvider()).isInExtensionSet) return ((IExtension) element).getExtensionPointUniqueIdentifier(); IPluginDescriptor desc = ((IExtension) element).getDeclaringPluginDescriptor(); return "contributed by: "+ desc.getUniqueIdentifier(); //$NON-NLS-1$ } if (element instanceof IExtensionPoint) { String pluginId = ((IExtensionPoint)element).getDeclaringPluginDescriptor().getUniqueIdentifier();//getParentIdentifier(); String extPointId = ((IExtensionPoint) element).getUniqueIdentifier(); return extPointId.substring(pluginId.length()+1); } if (element instanceof IPluginPrerequisite) { return ((IPluginPrerequisite) element).getUniqueIdentifier(); } if (element instanceof ILibrary) { return ((ILibrary) element).getPath().toString(); } if (element instanceof ManifestElement) { return ((ManifestElement)element).getValue(); } if (element instanceof IConfigurationElement) { String label = ((IConfigurationElement) element).getAttribute("label"); //$NON-NLS-1$ if (label == null){ label = ((IConfigurationElement) element).getAttribute("name"); //$NON-NLS-1$ } if (label == null && ((IConfigurationElement) element).getAttribute("id") != null){ //$NON-NLS-1$ String[] labelSplit = ((IConfigurationElement) element).getAttribute("id").split("\\."); //$NON-NLS-1$ //$NON-NLS-2$ label = labelSplit.length == 0 ? null: labelSplit[labelSplit.length-1]; } if (label == null){ label = ((IConfigurationElement) element).getName(); } return label; } return super.getText(element); } | 8783 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8783/10f8d9f93008f8e1166f536a05142e5a501f547d/RegistryBrowserLabelProvider.java/buggy/ui/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserLabelProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
6701,
12,
921,
930,
13,
288,
202,
202,
430,
261,
2956,
1276,
6258,
921,
4216,
13,
1082,
202,
2956,
273,
14015,
3773,
921,
4216,
13,
930,
2934,
588,
921,
5621,
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,
514,
6701,
12,
921,
930,
13,
288,
202,
202,
430,
261,
2956,
1276,
6258,
921,
4216,
13,
1082,
202,
2956,
273,
14015,
3773,
921,
4216,
13,
930,
2934,
588,
921,
5621,
202,
202,
... |
ActionConfig validationActionConfig = new ActionConfig(null, SimpleAction.class, null, results, interceptors); | params = new HashMap(); params.put("date", new java.util.Date(2002 - 1900, 11, 20)); ActionConfig validationActionConfig = new ActionConfig(null, SimpleAction.class, params, results, interceptors); | public void init(Configuration configurationManager) { PackageConfig defaultPackageContext = new PackageConfig(); HashMap params = new HashMap(); params.put("bar", "5"); HashMap results = new HashMap(); HashMap successParams = new HashMap(); successParams.put("actionName", "bar"); results.put("success", new ResultConfig("success", ActionChainResult.class, successParams)); ActionConfig fooActionConfig = new ActionConfig(null, SimpleAction.class, params, results, null); defaultPackageContext.addActionConfig(FOO_ACTION_NAME, fooActionConfig); results = new HashMap(); successParams = new HashMap(); successParams.put("actionName", "bar"); results.put("success", new ResultConfig("success", ActionChainResult.class, successParams)); List interceptors = new ArrayList(); interceptors.add(new ParametersInterceptor()); ActionConfig paramInterceptorActionConfig = new ActionConfig(null, SimpleAction.class, null, results, interceptors); defaultPackageContext.addActionConfig(PARAM_INTERCEPTOR_ACTION_NAME, paramInterceptorActionConfig); interceptors = new ArrayList(); interceptors.add(new ModelDrivenInterceptor()); interceptors.add(new ParametersInterceptor()); ActionConfig modelParamActionConfig = new ActionConfig(null, ModelDrivenAction.class, null, null, interceptors); defaultPackageContext.addActionConfig(MODEL_DRIVEN_PARAM_TEST, modelParamActionConfig); results = new HashMap(); successParams = new HashMap(); successParams.put("actionName", "bar"); results.put("success", new ResultConfig("success", ActionChainResult.class, successParams)); interceptors = new ArrayList(); interceptors.add(new StaticParametersInterceptor()); interceptors.add(new ModelDrivenInterceptor()); interceptors.add(new ParametersInterceptor()); interceptors.add(new ValidationInterceptor()); ActionConfig validationActionConfig = new ActionConfig(null, SimpleAction.class, null, results, interceptors); defaultPackageContext.addActionConfig(VALIDATION_ACTION_NAME, validationActionConfig); defaultPackageContext.addActionConfig(VALIDATION_ALIAS_NAME, validationActionConfig); defaultPackageContext.addActionConfig(VALIDATION_SUBPROPERTY_NAME, validationActionConfig); // We need this actionconfig to be the final destination for action chaining ActionConfig barActionConfig = new ActionConfig(null, SimpleAction.class, null, null, null); defaultPackageContext.addActionConfig("bar", barActionConfig); configurationManager.addPackageConfig("defaultPackage", defaultPackageContext); } | 16468 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/16468/eac7eca011e0abff3d327240d3a6285ebe01486c/MockConfigurationProvider.java/clean/src/test/com/opensymphony/xwork/config/providers/MockConfigurationProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1208,
12,
1750,
1664,
1318,
13,
288,
3639,
7508,
809,
805,
2261,
1042,
273,
394,
7508,
809,
5621,
3639,
4317,
859,
273,
394,
4317,
5621,
3639,
859,
18,
458,
2932,
3215,
3113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
12,
1750,
1664,
1318,
13,
288,
3639,
7508,
809,
805,
2261,
1042,
273,
394,
7508,
809,
5621,
3639,
4317,
859,
273,
394,
4317,
5621,
3639,
859,
18,
458,
2932,
3215,
3113,
... |
try { os.close(); } catch (IOException e) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_IO_ERROR, e.getMessage()), e); | if (os != null) { try { os.close(); } catch (IOException e) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_IO_ERROR, e.getMessage()), e); } | public boolean processCommand(String commandName, InputStream parameters) throws SVNException { String pattern = (String) COMMANDS_MAP.get(commandName); if (pattern == null) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_UNKNOWN_CMD)); } if ("textdelta-chunk".equals(commandName)) { if (myBuilder.getDiffWindow() == null) { Object[] items = null; try { items = SVNReader.parse(parameters, "(SB))", null); } catch (Throwable th) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Cannot read editor command: {0}", th.getLocalizedMessage()); SVNErrorManager.error(err, th); } byte[] bytes = (byte[]) items[1]; myBuilder.accept(bytes, 0); if (myBuilder.getDiffWindow() != null) { myIsDelta = false; myLenght = myBuilder.getDiffWindow().getNewDataLength(); myDiffStream = myEditor.textDeltaChunk(myFilePath, myBuilder.getDiffWindow()); if (myDiffStream == null) { myDiffStream = SVNFileUtil.DUMMY_OUT; } if (myLenght == 0) { closeDiffStream(); } } } else if (myDiffStream != null) { if (myLenght > 0) { byte[] line; line = (byte[]) SVNReader.parse(parameters, "(sB))", null)[0]; myLenght -= line.length; try { myDiffStream.write(line); } catch (IOException e) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_IO_ERROR, e.getMessage()), e); } } if (myLenght == 0) { closeDiffStream(); } } return true; } boolean last = "close-edit".equals(commandName) || "abort-edit".equals(commandName); Object[] items = SVNReader.parse(parameters, pattern, new Object[10]); if ("target-rev".equals(commandName)) { myEditor.targetRevision(SVNReader.getLong(items, 0)); } else if ("open-root".equals(commandName)) { myEditor.openRoot(SVNReader.getLong(items, 0)); } else if ("delete-entry".equals(commandName)) { myEditor .deleteEntry((String) items[0], SVNReader.getLong(items, 1)); } else if ("add-dir".equals(commandName)) { myEditor.addDir((String) items[0], (String) items[3], SVNReader .getLong(items, 4)); } else if ("open-dir".equals(commandName)) { myEditor.openDir((String) items[0], SVNReader.getLong(items, 3)); } else if ("change-dir-prop".equals(commandName)) { myEditor.changeDirProperty((String) items[1], (String) items[2]); } else if ("close-dir".equals(commandName)) { myEditor.closeDir(); } else if ("add-file".equals(commandName)) { myEditor.addFile((String) items[0], (String) items[3], SVNReader .getLong(items, 4)); myFilePath = (String) items[0]; } else if ("open-file".equals(commandName)) { myEditor.openFile((String) items[0], SVNReader.getLong(items, 3)); myFilePath = (String) items[0]; } else if ("change-file-prop".equals(commandName)) { myEditor.changeFileProperty(myFilePath, (String) items[1], (String) items[2]); } else if ("close-file".equals(commandName)) { myEditor.closeFile(myFilePath, (String) items[1]); } else if ("apply-textdelta".equals(commandName)) { myBuilder.reset(); myLenght = 0; myDiffStream = null; myIsDelta = true; myEditor.applyTextDelta(myFilePath, (String) items[1]); } else if ("textdelta-end".equals(commandName)) { // if there was text-delta-chunk, but no window was sent, sent empty one. if (myIsDelta) { OutputStream os = myEditor.textDeltaChunk(myFilePath, new SVNDiffWindow(0,0,0,0,0)); try { os.close(); } catch (IOException e) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_IO_ERROR, e.getMessage()), e); } } myIsDelta = false; myEditor.textDeltaEnd(myFilePath); } else if ("close-edit".equals(commandName)) { myEditor.closeEdit(); } else if ("abort-edit".equals(commandName)) { myEditor.abortEdit(); } return !last; } | 2776 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2776/f9a0a256be39c7c63c640a5b35c161f6f155f102/SVNEditModeReader.java/clean/javasvn/src/org/tmatesoft/svn/core/internal/io/svn/SVNEditModeReader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
2189,
12,
780,
20893,
16,
5037,
1472,
13,
1216,
29537,
50,
503,
288,
3639,
514,
1936,
273,
261,
780,
13,
5423,
9560,
3948,
67,
8352,
18,
588,
12,
3076,
461,
1769,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1207,
2189,
12,
780,
20893,
16,
5037,
1472,
13,
1216,
29537,
50,
503,
288,
3639,
514,
1936,
273,
261,
780,
13,
5423,
9560,
3948,
67,
8352,
18,
588,
12,
3076,
461,
1769,
3639... |
options.put(JavaCore.CODEASSIST_DEPRECATION_CHECK, JavaCore.ENABLED); COMPLETION_PROJECT.setOptions(options); | public void testDeprecationCheck15() throws JavaModelException { Map options = COMPLETION_PROJECT.getOptions(true); Object timeout = options.get(JavaCore.CODEASSIST_DEPRECATION_CHECK); try { options.put(JavaCore.CODEASSIST_DEPRECATION_CHECK, JavaCore.ENABLED); COMPLETION_PROJECT.setOptions(options); this.workingCopies = new ICompilationUnit[2]; this.workingCopies[0] = getWorkingCopy( "/Completion/src/deprecation/Test.java", "package deprecation;"+ "public class Test {\n"+ " void foo() {"+ " ZZZType1.foo\n"+ " }"+ "}"); this.workingCopies[1] = getWorkingCopy( "/Completion/src/deprecation/ZZZType1.java", "package deprecation;"+ "/** @deprecated */\n"+ "public class ZZZType1 {\n"+ " public static int foo1;\n"+ " public static int foo2;\n"+ "}"); CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true); String str = this.workingCopies[0].getSource(); String completeBehind = "ZZZType1.foo"; int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length(); this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner); assertResults( "", requestor.getResults()); } finally { options.put(JavaCore.CODEASSIST_DEPRECATION_CHECK, timeout); COMPLETION_PROJECT.setOptions(options); }} | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/dcc29d9125ab9c75db7cf3e3d58d8d50a20cc0a2/CompletionTests.java/buggy/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
1842,
758,
13643,
1564,
3600,
1435,
1216,
5110,
1488,
503,
288,
202,
863,
702,
273,
13846,
30985,
67,
17147,
18,
588,
1320,
12,
3767,
1769,
202,
921,
2021,
273,
702,
18,
588,
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,
1071,
918,
1842,
758,
13643,
1564,
3600,
1435,
1216,
5110,
1488,
503,
288,
202,
863,
702,
273,
13846,
30985,
67,
17147,
18,
588,
1320,
12,
3767,
1769,
202,
921,
2021,
273,
702,
18,
588,
12,
... | |
broker.close(); | private List loadFenixExecutionCourses() { List fenixExecutionCourses = null; PersistenceBroker broker = null; Query query = new QueryByCriteria(DisciplinaExecucao.class, null); try { broker = PersistenceBrokerFactory.defaultPersistenceBroker(); // ask the broker to retrieve the Extent collection fenixExecutionCourses = (List) broker.getCollectionByQuery(query); broker.close(); } catch (Throwable t) { t.printStackTrace(); } return fenixExecutionCourses; } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/53013a043f50b18d7bf0d8c61c272a5b69840dcd/SiglaDataLoader.java/clean/src/middleware/sigla/SiglaDataLoader.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
987,
1262,
42,
275,
697,
3210,
39,
10692,
1435,
288,
202,
202,
682,
284,
275,
697,
3210,
39,
10692,
273,
446,
31,
202,
202,
13182,
11194,
8625,
273,
446,
31,
202,
202,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
1262,
42,
275,
697,
3210,
39,
10692,
1435,
288,
202,
202,
682,
284,
275,
697,
3210,
39,
10692,
273,
446,
31,
202,
202,
13182,
11194,
8625,
273,
446,
31,
202,
202,
1138,
... | |
{ this.safeModeEnabled = safeModeEnabled; } | { this.safeModeEnabled = safeModeEnabled; } | public void setSafeModeEnabled(boolean safeModeEnabled) { this.safeModeEnabled = safeModeEnabled; } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/82f517dadfef099f4d5dcbaf1f1676a345fa6d79/BaseStep.java/buggy/src/be/ibridge/kettle/trans/step/BaseStep.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
9890,
2309,
1526,
12,
6494,
4183,
2309,
1526,
13,
202,
95,
202,
202,
2211,
18,
4626,
2309,
1526,
273,
4183,
2309,
1526,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
9890,
2309,
1526,
12,
6494,
4183,
2309,
1526,
13,
202,
95,
202,
202,
2211,
18,
4626,
2309,
1526,
273,
4183,
2309,
1526,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,... |
u2 = newRefValue; } | u2 = newRefValue; } | public void setRefValue(CRefNode newRefValue) { u2 = newRefValue; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/clean/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
30556,
12,
39,
1957,
907,
394,
30556,
13,
288,
202,
202,
89,
22,
273,
394,
30556,
31,
202,
97,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
444,
30556,
12,
39,
1957,
907,
394,
30556,
13,
288,
202,
202,
89,
22,
273,
394,
30556,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Generator gen = new Generator(new NutchConf()); | Generator gen = new Generator(NutchConfiguration.create()); | public static void main(String args[]) throws Exception { if (args.length < 2) { System.out.println("Usage: Generator <crawldb> <segments_dir> [-topN N] [-numFetchers numFetchers] [-adddays numDays]"); return; } File dbDir = new File(args[0]); File segmentsDir = new File(args[1]); long curTime = System.currentTimeMillis(); long topN = Long.MAX_VALUE; int numFetchers = -1; for (int i = 2; i < args.length; i++) { if ("-topN".equals(args[i])) { topN = Long.parseLong(args[i+1]); i++; } else if ("-numFetchers".equals(args[i])) { numFetchers = Integer.parseInt(args[i+1]); i++; } else if ("-adddays".equals(args[i])) { long numDays = Integer.parseInt(args[i+1]); curTime += numDays * 1000L * 60 * 60 * 24; } } if (topN != Long.MAX_VALUE) LOG.info("topN: " + topN); Generator gen = new Generator(new NutchConf()); gen.generate(dbDir, segmentsDir, numFetchers, topN, curTime); } | 50818 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50818/25437bc825d50715dcc9a289a1b4c8fbbc6aced1/Generator.java/buggy/src/java/org/apache/nutch/crawl/Generator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
918,
2774,
12,
780,
833,
63,
5717,
1216,
1185,
288,
565,
309,
261,
1968,
18,
2469,
411,
576,
13,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
10159,
411,
71,
1899,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2774,
12,
780,
833,
63,
5717,
1216,
1185,
288,
565,
309,
261,
1968,
18,
2469,
411,
576,
13,
288,
1377,
2332,
18,
659,
18,
8222,
2932,
5357,
30,
10159,
411,
71,
1899,
1... |
public org.quickfix.field.RFQReqID getRFQReqID() throws FieldNotFound { org.quickfix.field.RFQReqID value = new org.quickfix.field.RFQReqID(); | public quickfix.field.RFQReqID getRFQReqID() throws FieldNotFound { quickfix.field.RFQReqID value = new quickfix.field.RFQReqID(); | public org.quickfix.field.RFQReqID getRFQReqID() throws FieldNotFound { org.quickfix.field.RFQReqID value = new org.quickfix.field.RFQReqID(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteRequest.java/buggy/src/java/src/quickfix/fix43/QuoteRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
12918,
53,
6113,
734,
4170,
23032,
6113,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
12918,
53,
6113,
734,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12918,
53,
6113,
734,
4170,
23032,
6113,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
12918,
53,
6113,
734,
460,
... |
boolean activityActivityBindingsChanged, | boolean activityRequirementBindingsChanged, | public ActivityEvent( IActivity activity, boolean activityActivityBindingsChanged, boolean activityPatternBindingsChanged, boolean definedChanged, boolean descriptionChanged, boolean enabledChanged, boolean nameChanged) { if (activity == null) throw new NullPointerException(); this.activity = activity; this.activityActivityBindingsChanged = activityActivityBindingsChanged; this.activityPatternBindingsChanged = activityPatternBindingsChanged; this.definedChanged = definedChanged; this.enabledChanged = enabledChanged; this.nameChanged = nameChanged; this.descriptionChanged = descriptionChanged; } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/61842f9a715897e11fb6af364c40e35b86918e60/ActivityEvent.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/activities/ActivityEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9621,
1133,
12,
202,
202,
45,
6193,
5728,
16,
202,
202,
6494,
5728,
6193,
10497,
5033,
16,
202,
202,
6494,
5728,
3234,
10497,
5033,
16,
202,
202,
6494,
2553,
5033,
16,
202,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
9621,
1133,
12,
202,
202,
45,
6193,
5728,
16,
202,
202,
6494,
5728,
6193,
10497,
5033,
16,
202,
202,
6494,
5728,
3234,
10497,
5033,
16,
202,
202,
6494,
2553,
5033,
16,
202,
20... |
public JavaEachMethod(String hasNextMethod, String nextMethod) { | public JavaEachMethod(String iteratorMethod, String hasNextMethod, String nextMethod) { this.iteratorMethod = iteratorMethod; | public JavaEachMethod(String hasNextMethod, String nextMethod) { this.hasNextMethod = hasNextMethod; this.nextMethod = nextMethod; } | 47984 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47984/1ceedf02ac15d7325cfcf505ca74f35c5bc4a258/JavaEachMethod.java/buggy/org/jruby/javasupport/JavaEachMethod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
3442,
1305,
12,
780,
2775,
1305,
16,
514,
4564,
1305,
16,
514,
1024,
1305,
13,
288,
333,
18,
9838,
1305,
273,
2775,
1305,
31,
3639,
333,
18,
5332,
2134,
1305,
273,
4564,
130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5110,
3442,
1305,
12,
780,
2775,
1305,
16,
514,
4564,
1305,
16,
514,
1024,
1305,
13,
288,
333,
18,
9838,
1305,
273,
2775,
1305,
31,
3639,
333,
18,
5332,
2134,
1305,
273,
4564,
130... |
(NodeSet) super.eval(context, docs, contextSequence, null); | super.eval(docs, contextSequence, null).toNodeSet(); | public Sequence eval( StaticContext context, DocumentSet docs, Sequence contextSequence, Item contextItem) throws XPathException { setInPredicate(true); //long start = System.currentTimeMillis(); Expression inner = getExpression(0); if (inner == null) return Sequence.EMPTY_SEQUENCE; if (contextItem != null) contextSequence = contextItem.toSequence(); int type = inner.returnsType(); if (Type.subTypeOf(type, Type.NODE)) { ExtArrayNodeSet result = new ExtArrayNodeSet(); NodeSet nodes = (NodeSet) super.eval(context, docs, contextSequence, null); NodeProxy current; ContextItem contextNode; NodeProxy next; DocumentImpl lastDoc = null; int count = 0, sizeHint = -1; for (Iterator i = nodes.iterator(); i.hasNext(); count++) { current = (NodeProxy) i.next(); if(lastDoc == null || current.doc != lastDoc) { lastDoc = current.doc; sizeHint = nodes.getSizeHint(lastDoc); } contextNode = current.getContext(); if (contextNode == null) { throw new XPathException("Internal evaluation error: context node is missing!"); } while (contextNode != null) { next = contextNode.getNode(); next.addMatches(current.match); if (!result.contains(next)) result.add(next, sizeHint); contextNode = contextNode.getNextItem(); } } return result; } else if ( Type.subTypeOf(type, Type.BOOLEAN) || Type.subTypeOf(type, Type.STRING)) { //string has no special meaning NodeSet result = new ExtArrayNodeSet(); Item item; Sequence v; for (SequenceIterator i = contextSequence.iterate(); i.hasNext(); ) { item = i.nextItem(); v = inner.eval(context, docs, contextSequence, item); if (((BooleanValue) v.convertTo(Type.BOOLEAN)).getValue()) result.add(item); } return result; } else if (Type.subTypeOf(type, Type.NUMBER)) { NodeProxy p; NodeProxy n; NodeSet set; int level; int count; int pos; long pid; long last_pid = 0; long f_gid; long e_gid; DocumentImpl doc; DocumentImpl last_doc = null; NodeSet contextSet = (NodeSet) contextSequence; NodeSet result = new ExtArrayNodeSet(); // evaluate predicate expression for each context node for (Iterator i = contextSet.iterator(); i.hasNext();) { p = (NodeProxy) i.next(); pos = ((NumericValue) inner .eval(context, docs, contextSet, p) .convertTo(Type.NUMBER)) .getInt(); doc = (DocumentImpl) p.getDoc(); level = doc.getTreeLevel(p.getGID()); pid = (p.getGID() - doc.getLevelStartPoint(level)) / doc.getTreeLevelOrder(level) + doc.getLevelStartPoint(level - 1); if (pid == last_pid && last_doc != null && doc.getDocId() == last_doc.getDocId()) continue; last_pid = pid; last_doc = doc; f_gid = (pid - doc.getLevelStartPoint(level - 1)) * doc.getTreeLevelOrder(level) + doc.getLevelStartPoint(level); e_gid = f_gid + doc.getTreeLevelOrder(level); count = 1; set = contextSet.getRange(doc, f_gid, e_gid); for (Iterator j = set.iterator(); j.hasNext(); count++) { n = (NodeProxy) j.next(); if (count == pos) { result.add(n); break; } } } return result; } else LOG.debug("unable to determine return type of predicate expression"); return Sequence.EMPTY_SEQUENCE; } | 2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/991914fac6d8ec32704e1e021ab6bf8707ee56ec/Predicate.java/clean/src/org/exist/xpath/Predicate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8370,
5302,
12,
202,
202,
5788,
1042,
819,
16,
202,
202,
2519,
694,
3270,
16,
202,
202,
4021,
819,
4021,
16,
202,
202,
1180,
819,
1180,
13,
202,
202,
15069,
10172,
503,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8370,
5302,
12,
202,
202,
5788,
1042,
819,
16,
202,
202,
2519,
694,
3270,
16,
202,
202,
4021,
819,
4021,
16,
202,
202,
1180,
819,
1180,
13,
202,
202,
15069,
10172,
503,
288,
... |
IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); | IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null); | public void testDoStatement1() throws Exception { if (true) { return; } IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null); StringBuffer buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append(" public void foo() {\n"); buf.append(" do {\n"); buf.append(" foo();\n"); buf.append(" } while (true);\n"); buf.append(" do\n"); buf.append(" foo();\n"); buf.append(" while (true);\n"); buf.append(" do {\n"); buf.append(" foo();\n"); buf.append(" } while (true);\n"); buf.append(" do\n"); buf.append(" foo();\n"); buf.append(" while (true);\n"); buf.append(" }\n"); buf.append("}\n"); ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null); CompilationUnit astRoot= createAST(cu); ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST()); AST ast= astRoot.getAST(); TypeDeclaration type= findTypeDeclaration(astRoot, "E"); MethodDeclaration methodDecl= findMethodDeclaration(type, "foo"); Block block= methodDecl.getBody(); assertTrue("Parse errors", (block.getFlags() & ASTNode.MALFORMED) == 0); List statements= block.statements(); assertTrue("Number of statements not 4", statements.size() == 4); { // replace body block with statement DoStatement doStatement= (DoStatement) statements.get(0); TryStatement newTry= ast.newTryStatement(); newTry.getBody().statements().add(ast.newReturnStatement()); CatchClause newCatchClause= ast.newCatchClause(); SingleVariableDeclaration varDecl= ast.newSingleVariableDeclaration(); varDecl.setType(ast.newSimpleType(ast.newSimpleName("Exception"))); varDecl.setName(ast.newSimpleName("e")); newCatchClause.setException(varDecl); newTry.catchClauses().add(newCatchClause); rewrite.replace(doStatement.getBody(), newTry, null); } { // replace body statement with block DoStatement doStatement= (DoStatement) statements.get(1); Block newBody= ast.newBlock(); MethodInvocation invocation= ast.newMethodInvocation(); invocation.setName(ast.newSimpleName("hoo")); invocation.arguments().add(ast.newNumberLiteral("11")); newBody.statements().add(ast.newExpressionStatement(invocation)); rewrite.replace(doStatement.getBody(), newBody, null); } { // replace body block with block DoStatement doStatement= (DoStatement) statements.get(2); Block newBody= ast.newBlock(); MethodInvocation invocation= ast.newMethodInvocation(); invocation.setName(ast.newSimpleName("hoo")); invocation.arguments().add(ast.newNumberLiteral("11")); newBody.statements().add(ast.newExpressionStatement(invocation)); rewrite.replace(doStatement.getBody(), newBody, null); } { // replace body statement with body DoStatement doStatement= (DoStatement) statements.get(3); TryStatement newTry= ast.newTryStatement(); newTry.getBody().statements().add(ast.newReturnStatement()); CatchClause newCatchClause= ast.newCatchClause(); SingleVariableDeclaration varDecl= ast.newSingleVariableDeclaration(); varDecl.setType(ast.newSimpleType(ast.newSimpleName("Exception"))); varDecl.setName(ast.newSimpleName("e")); newCatchClause.setException(varDecl); newTry.catchClauses().add(newCatchClause); rewrite.replace(doStatement.getBody(), newTry, null); } String preview= evaluateRewrite(cu, rewrite); buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E {\n"); buf.append(" public void foo() {\n"); buf.append(" do\n"); buf.append(" try {\n"); buf.append(" return;\n"); buf.append(" } catch (Exception e) {\n"); buf.append(" }\n"); buf.append(" while (true);\n"); buf.append(" do {\n"); buf.append(" hoo(11);\n"); buf.append(" } while (true);\n"); buf.append(" do {\n"); buf.append(" hoo(11);\n"); buf.append(" } while (true);\n"); buf.append(" do\n"); buf.append(" try {\n"); buf.append(" return;\n"); buf.append(" } catch (Exception e) {\n"); buf.append(" }\n"); buf.append(" while (true);\n"); buf.append(" }\n"); buf.append("}\n"); assertEqualString(preview, buf.toString()); } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/40ace06b6f9aaa2f71ebf049ffa37ed745fa6ef3/ASTRewritingStatementsTest.java/clean/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3244,
3406,
21,
1435,
1216,
1185,
288,
202,
202,
430,
261,
3767,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
45,
2261,
7456,
2298,
21,
33,
284,
1830,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3244,
3406,
21,
1435,
1216,
1185,
288,
202,
202,
430,
261,
3767,
13,
288,
1082,
202,
2463,
31,
202,
202,
97,
9506,
202,
45,
2261,
7456,
2298,
21,
33,
284,
1830,
3... |
assert(RubySymbol.nilSymbol(ruby).isNil()); | assertTrue(RubySymbol.nilSymbol(ruby).isNil()); | public void testNilSymbol() throws Exception { assert(RubySymbol.nilSymbol(ruby).isNil()); assertSame(RubySymbol.nilSymbol(ruby), RubySymbol.nilSymbol(ruby)); } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/1d7a03bf28c697f2c006eafab8faa91982894617/TestRubySymbol.java/buggy/org/jruby/test/TestRubySymbol.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
12616,
5335,
1435,
1216,
1185,
288,
3639,
1815,
5510,
12,
54,
10340,
5335,
18,
20154,
5335,
12,
27768,
2934,
291,
12616,
10663,
3639,
1815,
8650,
12,
54,
10340,
5335,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
12616,
5335,
1435,
1216,
1185,
288,
3639,
1815,
5510,
12,
54,
10340,
5335,
18,
20154,
5335,
12,
27768,
2934,
291,
12616,
10663,
3639,
1815,
8650,
12,
54,
10340,
5335,
18,
... |
void setMessagePart(String partName, Content content); | void setMessagePart(String partName, Element content); | void setMessagePart(String partName, Content content); | 45373 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45373/3d5d00371b775dabb3a8e74de457bb4956027a11/Message.java/clean/bpel-api/src/main/java/com/fs/pxe/bpel/iapi/Message.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
15227,
1988,
12,
780,
1087,
461,
16,
3697,
913,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
918,
15227,
1988,
12,
780,
1087,
461,
16,
3697,
913,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
String rootClass = (String)e.nextElement(); | String rootClass = (String) e.nextElement(); | public void scan() throws IllegalStateException { included = new Vector(); String analyzerClassName = DEFAULT_ANALYZER_CLASS; DependencyAnalyzer analyzer = null; try { Class analyzerClass = Class.forName(analyzerClassName); analyzer = (DependencyAnalyzer)analyzerClass.newInstance(); } catch (Exception e) { throw new BuildException("Unable to load dependency analyzer: " + analyzerClassName, e); } analyzer.addClassPath(new Path(null, basedir.getPath())); for (Enumeration e = rootClasses.elements(); e.hasMoreElements();) { String rootClass = (String)e.nextElement(); analyzer.addRootClass(rootClass); } Enumeration e = analyzer.getClassDependencies(); String[] parentFiles = parentScanner.getIncludedFiles(); Hashtable parentSet = new Hashtable(); for (int i = 0; i < parentFiles.length; ++i) { parentSet.put(parentFiles[i], parentFiles[i]); } while (e.hasMoreElements()) { String classname = (String)e.nextElement(); String filename = classname.replace('.', File.separatorChar); filename = filename + ".class"; File depFile = new File(basedir, filename); if (depFile.exists() && parentSet.containsKey(filename)) { // This is included included.addElement(filename); } } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/6154080061f869b4e425d608da3bd61fad967564/DependScanner.java/clean/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4135,
1435,
1216,
5477,
288,
3639,
5849,
273,
394,
5589,
5621,
3639,
514,
15116,
3834,
273,
3331,
67,
1258,
19448,
62,
654,
67,
5237,
31,
3639,
11993,
12803,
15116,
273,
446,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4135,
1435,
1216,
5477,
288,
3639,
5849,
273,
394,
5589,
5621,
3639,
514,
15116,
3834,
273,
3331,
67,
1258,
19448,
62,
654,
67,
5237,
31,
3639,
11993,
12803,
15116,
273,
446,
3... |
for ( int x = 0; x < array.length; x++) array[ x] = ( short) headers.get( x).getMode(); | int x = 0; for ( CpioHeader header : headers) { array[ x] = ( short) header.getMode(); ++x; } | public short[] getModes() { short[] array = new short[ headers.size()]; for ( int x = 0; x < array.length; x++) array[ x] = ( short) headers.get( x).getMode(); return array; } | 4819 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4819/be3f9a73f71fb2ce971ea9c2025c268413a0ac36/Contents.java/buggy/source/main/org/freecompany/redline/payload/Contents.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3025,
8526,
2108,
1145,
1435,
288,
202,
202,
6620,
8526,
526,
273,
394,
3025,
63,
1607,
18,
1467,
1435,
15533,
202,
202,
1884,
261,
509,
619,
273,
374,
31,
619,
411,
526,
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,
3025,
8526,
2108,
1145,
1435,
288,
202,
202,
6620,
8526,
526,
273,
394,
3025,
63,
1607,
18,
1467,
1435,
15533,
202,
202,
1884,
261,
509,
619,
273,
374,
31,
619,
411,
526,
18,
... |
d.date = ScriptRuntime.NaN; return d.date; | this.date = ScriptRuntime.NaN; return this.date; | private static double makeDate(Scriptable dateObj, Object[] args, int maxargs, boolean local, Function funObj) { int i; double conv[] = new double[3]; double year, month, day; double lorutime; /* local or UTC version of date */ double result; NativeDate d = checkInstance(dateObj, funObj); double date = d.date; /* See arg padding comment in makeTime.*/ if (args.length == 0) args = ScriptRuntime.padArguments(args, 1); for (i = 0; i < args.length && i < maxargs; i++) { conv[i] = ScriptRuntime.toNumber(args[i]); // limit checks that happen in MakeDate in ECMA. if (conv[i] != conv[i] || Double.isInfinite(conv[i])) { d.date = ScriptRuntime.NaN; return d.date; } conv[i] = ScriptRuntime.toInteger(conv[i]); } /* return NaN if date is NaN and we're not setting the year, * If we are, use 0 as the time. */ if (date != date) { if (args.length < 3) { return ScriptRuntime.NaN; } else { lorutime = 0; } } else { if (local) lorutime = LocalTime(date); else lorutime = date; } i = 0; int stop = args.length; if (maxargs >= 3 && i < stop) year = conv[i++]; else year = YearFromTime(lorutime); if (maxargs >= 2 && i < stop) month = conv[i++]; else month = MonthFromTime(lorutime); if (maxargs >= 1 && i < stop) day = conv[i++]; else day = DateFromTime(lorutime); day = MakeDay(year, month, day); /* day within year */ result = MakeDate(day, TimeWithinDay(lorutime)); if (local) result = internalUTC(result); date = TimeClip(result); d.date = date; return date; } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/5af1999afa2517f3fdd455bd42c304be785b5b59/NativeDate.java/clean/org/mozilla/javascript/NativeDate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1645,
1221,
1626,
12,
3651,
429,
1509,
2675,
16,
1033,
8526,
833,
16,
4766,
282,
509,
943,
1968,
16,
1250,
1191,
16,
4766,
282,
4284,
9831,
2675,
13,
565,
288,
3639,
509,
277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1645,
1221,
1626,
12,
3651,
429,
1509,
2675,
16,
1033,
8526,
833,
16,
4766,
282,
509,
943,
1968,
16,
1250,
1191,
16,
4766,
282,
4284,
9831,
2675,
13,
565,
288,
3639,
509,
277... |
private static void removeChildrenAndAdjustWhiteSpaces(final ASTNode first, final ASTNode last, final CompositeElement parent) { | private static void removeChildrenAndAdjustWhiteSpaces(final ASTNode first, final ASTNode last, final CompositeElement parent, final PsiFile file) { | private static void removeChildrenAndAdjustWhiteSpaces(final ASTNode first, final ASTNode last, final CompositeElement parent) { ASTNode lastChild = findLastChild(last); final ASTNode prevElement = TreeUtil.prevLeaf(first); ASTNode nextElement = findElementAfter(last == null ? parent : last, false); final ArrayList<PsiElement> dirtyElements = new ArrayList<PsiElement>(); if (nextElement != null) { saveIndents(nextElement, dirtyElements); } try { boolean adjustWSBefore = containLineBreaks(first, lastChild); if (!mustKeepFirstIndent(prevElement, parent)) { adjustWSBefore = true; } parent.removeRange(first, lastChild); if (nextElement != null && !nextElement.getPsi().isValid()) { nextElement = findElementAfter(last == null ? parent : last, false); } if (!adjustWSBefore && parent.getTextLength() == 0 && prevElement != null && isWS(prevElement) && !prevElement.textContains('\n')) { adjustWSBefore = true; } final PsiFile file = parent.getPsi().getContainingFile(); final CodeStyleSettings.IndentOptions options = CodeStyleSettingsManager.getSettings(file.getProject()) .getIndentOptions(file.getFileType()); if (nextElement != null) { adjustSpacePositions(nextElement, prevElement, options); if (prevElement != null) { FormatterUtil.join(prevElement, TreeUtil.nextLeaf(prevElement)); } if (!nextElement.getPsi().isValid()) { nextElement = findElementAfter(last == null ? parent : last, false); } if (nextElement != null && adjustWSBefore) { adjustWhiteSpaceBefore(nextElement, true, true, true, false); } } else { final ASTNode fileNode = TreeUtil.getFileElement(parent); ASTNode lastLeaf = TreeUtil.findLastLeaf(fileNode); if (isWS(lastLeaf)) { delete(lastLeaf); } } } finally { clearIndentInfo(dirtyElements); } } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/1275ec977ca41eba8dc854de6acbbbf9b282a5dd/CodeEditUtil.java/buggy/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1206,
4212,
1876,
10952,
13407,
12077,
12,
6385,
9183,
907,
1122,
16,
727,
9183,
907,
1142,
16,
727,
14728,
1046,
982,
16,
727,
453,
7722,
812,
585,
13,
288,
565,
9183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
4212,
1876,
10952,
13407,
12077,
12,
6385,
9183,
907,
1122,
16,
727,
9183,
907,
1142,
16,
727,
14728,
1046,
982,
16,
727,
453,
7722,
812,
585,
13,
288,
565,
9183,
... |
baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); | baseDir = PrefsPropsUtil.getString( PropsUtil.AUTO_DEPLOY_DEPLOY_DIR); destDir = PrefsPropsUtil.getString(PropsUtil.AUTO_DEPLOY_DEST_DIR); | public AutoPortletDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); portletTaglibDTD = DeployUtil.getResourcePath( "liferay-portlet.tld"); unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); tomcatLibDir = OmniadminUtil.getAutoDeployTomcatLibDir(); List jars = new ArrayList(); jars.add(DeployUtil.getResourcePath("util-java.jar")); jars.add(DeployUtil.getResourcePath("util-jsf.jar")); jars.add(DeployUtil.getResourcePath("util-taglib.jar")); this.jars = jars; checkArguments(); } catch (Exception e) { _log.error(e); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/58a5501f2dec858b085420e7613b08c0cdc7f24d/AutoPortletDeployer.java/clean/portal-ejb/src/com/liferay/portal/deploy/AutoPortletDeployer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
8064,
18566,
10015,
264,
1435,
288,
202,
202,
698,
288,
1082,
202,
1969,
1621,
273,
531,
13607,
77,
3666,
1304,
18,
588,
4965,
10015,
10015,
1621,
5621,
1082,
202,
10488,
1621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8064,
18566,
10015,
264,
1435,
288,
202,
202,
698,
288,
1082,
202,
1969,
1621,
273,
531,
13607,
77,
3666,
1304,
18,
588,
4965,
10015,
10015,
1621,
5621,
1082,
202,
10488,
1621,
... |
_regionManager.clearRegions(); _model.disposeFindResultsManager(_regionManager); for (Pair<Option<Color>, OptionListener<Color>> p: _colorOptionListeners) { DrJava.getConfig().removeOptionListener(p.getFirst(), p.getSecond()); } if (_lastIndex<OptionConstants.FIND_RESULTS_COLORS.length) { --DefinitionsPane.FIND_RESULTS_PAINTERS_USAGE[_lastIndex]; } | freeResources(); | public void _close() { super._close(); _regionManager.clearRegions(); _model.disposeFindResultsManager(_regionManager); for (Pair<Option<Color>, OptionListener<Color>> p: _colorOptionListeners) { DrJava.getConfig().removeOptionListener(p.getFirst(), p.getSecond()); } if (_lastIndex<OptionConstants.FIND_RESULTS_COLORS.length) { --DefinitionsPane.FIND_RESULTS_PAINTERS_USAGE[_lastIndex]; } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/e38424ed07a882ee616fdf02e69d28f304b8294c/FindResultsPanel.java/buggy/drjava/src/edu/rice/cs/drjava/ui/FindResultsPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
389,
4412,
1435,
288,
565,
2240,
6315,
4412,
5621,
565,
389,
6858,
1318,
18,
8507,
17344,
5621,
565,
389,
2284,
18,
2251,
4150,
3125,
3447,
1318,
24899,
6858,
1318,
1769,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
389,
4412,
1435,
288,
565,
2240,
6315,
4412,
5621,
565,
389,
6858,
1318,
18,
8507,
17344,
5621,
565,
389,
2284,
18,
2251,
4150,
3125,
3447,
1318,
24899,
6858,
1318,
1769,
565,
... |
}else{ | } else { | public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DynaActionForm criarAulaForm = (DynaActionForm) form; HttpSession sessao = request.getSession(false); if (sessao != null) { IUserView userView = (IUserView) sessao.getAttribute(SessionConstants.U_VIEW); Calendar inicio = Calendar.getInstance(); inicio.set( Calendar.HOUR_OF_DAY, Integer.parseInt((String)criarAulaForm.get("horaInicio"))); inicio.set( Calendar.MINUTE, Integer.parseInt((String)criarAulaForm.get("minutosInicio"))); inicio.set(Calendar.SECOND, 0); Calendar fim = Calendar.getInstance(); fim.set( Calendar.HOUR_OF_DAY, Integer.parseInt((String)criarAulaForm.get("horaFim"))); fim.set( Calendar.MINUTE, Integer.parseInt((String)criarAulaForm.get("minutosFim"))); fim.set(Calendar.SECOND, 0); String initials = (String) criarAulaForm.get("courseInitials"); InfoExecutionCourse courseView = RequestUtils.getExecutionCourseBySigla(request, initials); if (courseView==null){ return mapping.getInputForward(); } InfoRoom infoSala = new InfoRoom(); infoSala.setNome((String) criarAulaForm.get("nomeSala")); Object argsCriarAula[] = { new InfoLesson( new DiaSemana(new Integer((String)criarAulaForm.get("diaSemana"))), inicio, fim, new TipoAula(new Integer((String) criarAulaForm.get("tipoAula"))), infoSala, courseView) }; InfoLessonServiceResult result = null; try { result = (InfoLessonServiceResult) ServiceUtils.executeService( userView, "CriarAula", argsCriarAula); } catch (ExistingServiceException ex) { throw new ExistingActionException("A aula", ex); } catch (InterceptingServiceException ex) { throw new InterceptingActionException(infoSala.getNome(), ex); } ActionErrors actionErrors = getActionErrors(result, inicio, fim); if (actionErrors.isEmpty()){ return mapping.findForward("Sucesso"); }else{ saveErrors(request, actionErrors); return mapping.getInputForward(); } } else throw new Exception(); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/43b10ab96e7c463405c6aabae856e27b218bcc22/CriarAulaFormAction.java/clean/src/ServidorApresentacao/Action/sop/CriarAulaFormAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
8514,
1836,
12,
202,
202,
1803,
3233,
2874,
16,
202,
202,
1803,
1204,
646,
16,
202,
202,
2940,
18572,
590,
16,
202,
202,
2940,
29910,
766,
13,
202,
202,
15069,
1185,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
8514,
1836,
12,
202,
202,
1803,
3233,
2874,
16,
202,
202,
1803,
1204,
646,
16,
202,
202,
2940,
18572,
590,
16,
202,
202,
2940,
29910,
766,
13,
202,
202,
15069,
1185,
288... |
dimensions[4] = sizeT; | dimensions[4] = tSize; | private void setDimensions(int[][] dims) throws FormatException, IOException { // first set X and Y // this is relatively easy - we can just take the maximum value int maxX = 0; int maxY = 0; for (int i=0; i<dims.length; i++) { if (dims[i][0] > maxX) { maxX = dims[i][0]; } if (dims[i][1] > maxY) { maxY = dims[i][1]; } } for (int i=0; i<dimensions.length; i++) { if (dimensions[i] == 0) dimensions[i]++; } // now the tricky part - setting Z, C and T // first we'll get a list of the prefix blocks Vector prefixes = new Vector(); int i = 0; String prefix = fp.getPrefix(i); while (prefix != null) { prefixes.add(prefix); i++; prefix = fp.getPrefix(i); } int[] counts = fp.getCount(); int sizeZ = 1; int sizeC = 1; int sizeT = 1; String ordering = ""; for (int j=0; j<counts.length; j++) { // which dimension is this? int zndx = -1; int cndx = -1; int tndx = -1; String p = (String) prefixes.get(j); for (int k=0; k<Z.length; k++) { if (p.indexOf(Z[k]) != -1) { zndx = k; } } if (counts[j] <= 4) { for (int k=0; k<C.length; k++) { if (p.indexOf(C[k]) != -1) { cndx = k; } } } for (int k=0; k<T.length; k++) { if (p.indexOf(T[k]) != -1) { tndx = k; } } if (zndx != -1 || cndx != -1 || tndx != -1) { // the largest of these three is the dimension we will choose int zpos = zndx == -1 ? -1 : p.indexOf(Z[zndx]); int cpos = cndx == -1 ? -1 : p.indexOf(C[cndx]); int tpos = tndx == -1 ? -1 : p.indexOf(T[tndx]); int max = zpos; if (cpos > max) max = cpos; if (tpos > max) max = tpos; if (max == zpos) { ordering += "Z"; sizeZ = counts[j]; } else if (max == cpos) { if (sizeC == 1 && !isRGB(currentId)) { ordering += "C"; sizeC = counts[j]; } else { if (sizeZ == 1) { ordering += "Z"; sizeZ = counts[j]; } else if (sizeT == 1) { ordering += "T"; sizeT = counts[j]; } else sizeC *= counts[j]; } } else { ordering += "T"; sizeT = counts[j]; } } else { // our simple check failed, so let's try some more complex stuff // if the count is 2 or 3, it's probably a C size if (counts[j] == 2 || counts[j] == 3) { if (!varyZ && !varyC && !varyT) { if (counts[j] != 1) { // we already set this dimension if (sizeZ == 1) { sizeZ = sizeC; ordering += "Z"; } else if (sizeT == 1) { sizeT = sizeC; ordering += "T"; } } if (ordering.indexOf("C") == -1) ordering += "C"; sizeC = counts[j]; } } else { // the most likely choice is whichever dimension is currently set to 1 if (dimensions[2] == 1) { ordering += "Z"; sizeZ = counts[j]; } else if (dimensions[4] == 1) { ordering += "T"; sizeT = counts[j]; } } } } // reset the dimensions, preserving internal sizes dimensions[3] *= sizeC; if (sizeZ > 1 && dimensions[2] > 1) { if (dimensions[4] == 1) { dimensions[4] = dimensions[2]; dimensions[2] = sizeZ; } else dimensions[2] *= sizeZ; } else dimensions[2] *= sizeZ; if (sizeT > 1 && dimensions[4] > 1) { if (dimensions[2] == 1) { dimensions[2] = dimensions[4]; dimensions[4] = sizeT; } else dimensions[4] *= sizeT; } else dimensions[4] *= sizeT; // make sure ordering is right String begin = ""; String readerOrder = reader.getDimensionOrder(currentId); for (int j=0; j<readerOrder.length(); j++) { if (ordering.indexOf(readerOrder.substring(j, j+1)) == -1) { begin += readerOrder.substring(j, j+1); } } ordering = begin + ordering; order = ordering.substring(0, 5); } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/054bd26b1432b6733cf1a54342b04ae97fa3a07c/FileStitcher.java/clean/loci/formats/FileStitcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
444,
10796,
12,
474,
63,
6362,
65,
9914,
13,
1216,
4077,
503,
16,
1860,
288,
565,
368,
1122,
444,
1139,
471,
1624,
565,
368,
333,
353,
1279,
17526,
12779,
300,
732,
848,
2537... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
10796,
12,
474,
63,
6362,
65,
9914,
13,
1216,
4077,
503,
16,
1860,
288,
565,
368,
1122,
444,
1139,
471,
1624,
565,
368,
333,
353,
1279,
17526,
12779,
300,
732,
848,
2537... |
FileUtil.fullyDelete(fs, systemDir); | fs.delete(systemDir); | JobTracker(Configuration conf) throws IOException { // // Grab some static constants // maxCurrentTasks = conf.getInt("mapred.tasktracker.tasks.maximum", 2); RETIRE_JOB_INTERVAL = conf.getLong("mapred.jobtracker.retirejob.interval", 24 * 60 * 60 * 1000); RETIRE_JOB_CHECK_INTERVAL = conf.getLong("mapred.jobtracker.retirejob.check", 60 * 1000); TASK_ALLOC_EPSILON = conf.getFloat("mapred.jobtracker.taskalloc.loadbalance.epsilon", 0.2f); PAD_FRACTION = conf.getFloat("mapred.jobtracker.taskalloc.capacitypad", 0.1f); MIN_SLOTS_FOR_PADDING = 3 * maxCurrentTasks; // This is a directory of temporary submission files. We delete it // on startup, and can delete any files that we're done with this.conf = conf; JobConf jobConf = new JobConf(conf); this.systemDir = jobConf.getSystemDir(); this.fs = FileSystem.get(conf); FileUtil.fullyDelete(fs, systemDir); fs.mkdirs(systemDir); // Same with 'localDir' except it's always on the local disk. jobConf.deleteLocalFiles(SUBDIR); // Set ports, start RPC servers, etc. InetSocketAddress addr = getAddress(conf); this.localMachine = addr.getHostName(); this.port = addr.getPort(); this.interTrackerServer = RPC.getServer(this, addr.getPort(), 10, false, conf); this.interTrackerServer.start(); Properties p = System.getProperties(); for (Iterator it = p.keySet().iterator(); it.hasNext(); ) { String key = (String) it.next(); String val = (String) p.getProperty(key); LOG.info("Property '" + key + "' is " + val); } this.infoPort = conf.getInt("mapred.job.tracker.info.port", 50030); this.infoServer = new JobTrackerInfoServer(this, infoPort); this.infoServer.start(); this.startTime = System.currentTimeMillis(); new Thread(this.expireTrackers).start(); new Thread(this.retireJobs).start(); new Thread(this.initJobs).start(); } | 53958 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53958/ee01fef4b4fb82c7492a4a747793839a4d14cd39/JobTracker.java/buggy/src/java/org/apache/hadoop/mapred/JobTracker.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3956,
8135,
12,
1750,
2195,
13,
1216,
1860,
288,
3639,
368,
3639,
368,
17150,
2690,
760,
6810,
3639,
368,
3639,
943,
3935,
6685,
273,
2195,
18,
588,
1702,
2932,
1458,
1118,
18,
4146,
1654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3956,
8135,
12,
1750,
2195,
13,
1216,
1860,
288,
3639,
368,
3639,
368,
17150,
2690,
760,
6810,
3639,
368,
3639,
943,
3935,
6685,
273,
2195,
18,
588,
1702,
2932,
1458,
1118,
18,
4146,
1654... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.