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
short columnNumber = buffer.getShort(); Byte flags = new Byte(buffer.get());
short columnNumber = tableBuffer.getShort(); Byte flags = new Byte(tableBuffer.get());
public void read(ByteBuffer buffer, List<Column> availableColumns) throws IOException { for (int i = 0; i < MAX_COLUMNS; i++) { short columnNumber = buffer.getShort(); Byte flags = new Byte(buffer.get()); if (columnNumber != COLUMN_UNUSED) { _columns.put(availableColumns.get(columnNumber), flags); } } buffer.getInt(); //Forward past Unknown _pageNumber = buffer.getInt(); buffer.position(buffer.position() + 10); //Forward past other stuff ByteBuffer indexPage = _pageChannel.createPageBuffer(); _pageChannel.readPage(indexPage, _pageNumber); indexPage.position(_format.OFFSET_INDEX_ENTRY_MASK); byte[] entryMask = new byte[_format.SIZE_INDEX_ENTRY_MASK]; indexPage.get(entryMask); int lastStart = 0; int nextEntryIndex = 0; for (int i = 0; i < entryMask.length; i++) { for (int j = 0; j < 8; j++) { if ((entryMask[i] & (1 << j)) != 0) { int length = i * 8 + j - lastStart; Entry e = new Entry(indexPage, nextEntryIndex++); _entries.add(e); lastStart += length; } } } }
5639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5639/0fbd0d45ecfcb310452b246824883e74241de39f/Index.java/buggy/src/java/com/healthmarketscience/jackcess/Index.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 855, 12, 12242, 1613, 16, 987, 32, 1494, 34, 2319, 3380, 13, 225, 1216, 1860, 225, 288, 565, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4552, 67, 25936, 31, 277, 27245, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 855, 12, 12242, 1613, 16, 987, 32, 1494, 34, 2319, 3380, 13, 225, 1216, 1860, 225, 288, 565, 364, 261, 474, 277, 273, 374, 31, 277, 411, 4552, 67, 25936, 31, 277, 27245, 28...
if (themeColorRegistry != null) return themeColorRegistry; else return WorkbenchThemeManager.getInstance() .getDefaultThemeColorRegistry(); }
if (themeColorRegistry != null) return themeColorRegistry; return WorkbenchThemeManager.getInstance() .getDefaultThemeColorRegistry(); }
public ColorRegistry getColorRegistry() { if (themeColorRegistry != null) return themeColorRegistry; else return WorkbenchThemeManager.getInstance() .getDefaultThemeColorRegistry(); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/1b0a69e7963ebacaa9f64fbc43413113a4714018/Theme.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/Theme.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5563, 4243, 15672, 4243, 1435, 288, 3639, 309, 261, 7997, 2957, 4243, 480, 446, 13, 5411, 327, 5006, 2957, 4243, 31, 3639, 469, 5411, 327, 4147, 22144, 8335, 1318, 18, 588, 1442, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 5563, 4243, 15672, 4243, 1435, 288, 3639, 309, 261, 7997, 2957, 4243, 480, 446, 13, 5411, 327, 5006, 2957, 4243, 31, 3639, 469, 5411, 327, 4147, 22144, 8335, 1318, 18, 588, 1442, 14...
importTarget = validator.getNodeState((NodeId) id);
importTarget = (NodeState) itemState;
public ImporterImpl(Path parentPath, SessionImpl session, HierarchyManager hierManager, SessionItemStateManager stateManager, ItemStateValidator validator, IdFactory idFactory, int uuidBehavior, boolean isWspImport) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException { this.validator = validator; this.session = session; this.hierMgr = hierManager; this.stateMgr = stateManager; this.idFactory = idFactory; this.uuidBehavior = uuidBehavior; this.isWspImport = isWspImport; // perform preliminary checks try { ItemId id = hierMgr.getItemId(parentPath); if (!id.denotesNode()) { throw new PathNotFoundException(hierMgr.safeGetJCRPath(parentPath)); } importTarget = validator.getNodeState((NodeId) id); refTracker = new ReferenceChangeTracker(); parents = new Stack(); parents.push(importTarget); } catch (ItemNotFoundException infe) { throw new PathNotFoundException(hierMgr.safeGetJCRPath(parentPath)); } // DIFF JR: remove check for overall writability on target-node. }
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/225b0a8914928975a7c9c42574c1fa2778136c47/ImporterImpl.java/buggy/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/xml/ImporterImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9457, 4975, 2828, 12, 743, 17743, 16, 3877, 2828, 1339, 16, 670, 6000, 1318, 366, 2453, 1318, 16, 5397, 3877, 1180, 1119, 1318, 919, 1318, 16, 4342, 1119, 5126, 4213, 16, 5397, 3124...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9457, 4975, 2828, 12, 743, 17743, 16, 3877, 2828, 1339, 16, 670, 6000, 1318, 366, 2453, 1318, 16, 5397, 3877, 1180, 1119, 1318, 919, 1318, 16, 4342, 1119, 5126, 4213, 16, 5397, 3124...
} else if (labelMatches(labelIdentifier)) {
} else if(labelMatches(labelIdentifier)){
public void visitContinueStatement(PsiContinueStatement statement) { super.visitContinueStatement(statement); final PsiIdentifier labelIdentifier = statement.getLabelIdentifier(); if (m_nestingDepth == 1 && labelIdentifier == null) { m_found = true; } else if (labelMatches(labelIdentifier)) { m_found = true; } }
17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ControlFlowUtils.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/ControlFlowUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 3757, 12378, 3406, 12, 52, 7722, 12378, 3406, 3021, 13, 288, 5411, 2240, 18, 11658, 12378, 3406, 12, 11516, 1769, 5411, 727, 453, 7722, 3004, 1433, 3004, 273, 3021, 18, 588, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 12378, 3406, 12, 52, 7722, 12378, 3406, 3021, 13, 288, 5411, 2240, 18, 11658, 12378, 3406, 12, 11516, 1769, 5411, 727, 453, 7722, 3004, 1433, 3004, 273, 3021, 18, 588, 22...
private static Specification getSpecification( final String section, final Attributes attributes ) throws ParseException {
private static Specification getSpecification(final String section, final Attributes attributes) throws ParseException {
private static Specification getSpecification( final String section, final Attributes attributes ) throws ParseException { //WARNING: We trim the values of all the attributes because //Some extension declarations are badly defined (ie have spaces //after version or vendor) final String name = getTrimmedString( attributes.getValue( SPECIFICATION_TITLE ) ); if( null == name ) { return null; } final String specVendor = getTrimmedString( attributes.getValue( SPECIFICATION_VENDOR ) ); if( null == specVendor ) { throw new ParseException( "Missing " + SPECIFICATION_VENDOR, 0 ); } final String specVersion = getTrimmedString( attributes.getValue( SPECIFICATION_VERSION ) ); if( null == specVersion ) { throw new ParseException( "Missing " + SPECIFICATION_VERSION, 0 ); } final String impTitle = getTrimmedString( attributes.getValue( IMPLEMENTATION_TITLE ) ); if( null == impTitle ) { throw new ParseException( "Missing " + IMPLEMENTATION_TITLE, 0 ); } final String impVersion = getTrimmedString( attributes.getValue( IMPLEMENTATION_VERSION ) ); if( null == impVersion ) { throw new ParseException( "Missing " + IMPLEMENTATION_VERSION, 0 ); } final String impVendor = getTrimmedString( attributes.getValue( IMPLEMENTATION_VENDOR ) ); if( null == impVendor ) { throw new ParseException( "Missing " + IMPLEMENTATION_VENDOR, 0 ); } return new Specification( name, specVersion, specVendor, impTitle, impVersion, impVendor, new String[]{section} ); }
639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/12d6c01879b76774bb1cb969f3081301b96dab32/Specification.java/clean/src/main/org/apache/tools/ant/taskdefs/optional/extension/Specification.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 20000, 20189, 1480, 12, 727, 514, 2442, 16, 4766, 10402, 727, 9055, 1677, 262, 3639, 1216, 10616, 565, 288, 3639, 368, 9511, 30, 1660, 2209, 326, 924, 434, 777, 326, 1677, 2724...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20000, 20189, 1480, 12, 727, 514, 2442, 16, 4766, 10402, 727, 9055, 1677, 262, 3639, 1216, 10616, 565, 288, 3639, 368, 9511, 30, 1660, 2209, 326, 924, 434, 777, 326, 1677, 2724...
} else if (localname.equals("body") && uri.equals("")) { Context context = getContext(pipelineContext); if (context.bodyFileItem == null) { final FileItem fileItem = new DefaultFileItemFactory(getMaxMemorySizeProperty(), SystemUtils.getTemporaryDirectory()).createItem("dummy", "dummy", false, null); pipelineContext.addContextListener(new PipelineContext.ContextListenerAdapter() { public void contextDestroyed(boolean success) { fileItem.delete(); } }); try { OutputStream outputStream = fileItem.getOutputStream(); NetUtils.copyStream(getRequest(pipelineContext).getInputStream(), outputStream); outputStream.close(); } catch (IOException e) { throw new OXFException(e); } context.bodyFileItem = fileItem; } AttributesImpl newAttributes = new AttributesImpl(); super.startPrefixMapping(XMLConstants.XSI_PREFIX, XMLConstants.XSI_URI); super.startPrefixMapping(XMLConstants.XSD_PREFIX, XMLConstants.XSD_URI); newAttributes.addAttribute(XMLConstants.XSI_URI, "type", "xsi:type", "CDATA", useBase64(pipelineContext, context.bodyFileItem) ? XMLConstants.XS_BASE64BINARY_QNAME.getQualifiedName(): XMLConstants.XS_ANYURI_QNAME.getQualifiedName()); super.startElement(uri, localname, qName, newAttributes); writeFileItem(pipelineContext, context.bodyFileItem, getContentHandler()); super.endElement(uri, localname, qName); super.endPrefixMapping(XMLConstants.XSD_PREFIX); super.endPrefixMapping(XMLConstants.XSI_PREFIX); } else { super.startElement(uri, localname, qName, attributes);
} catch (IOException e) { throw new OXFException(e);
public void startElement(String uri, String localname, String qName, Attributes attributes) throws SAXException { if (REQUEST_PRIVATE_NAMESPACE_URI.equals(uri)) { // Special treatment for this element if (FILE_ITEM_ELEMENT.equals(qName)) { // Marker for file item String parameterName = attributes.getValue(PARAMETER_NAME_ATTRIBUTE); FileItem fileItem = (FileItem) getRequest(pipelineContext).getParameterMap().get(parameterName); AttributesImpl newAttributes = new AttributesImpl(); super.startPrefixMapping(XMLConstants.XSI_PREFIX, XMLConstants.XSI_URI); super.startPrefixMapping(XMLConstants.XSD_PREFIX, XMLConstants.XSD_URI); newAttributes.addAttribute(XMLConstants.XSI_URI, "type", "xsi:type", "CDATA", useBase64(pipelineContext, fileItem) ? XMLConstants.XS_BASE64BINARY_QNAME.getQualifiedName(): XMLConstants.XS_ANYURI_QNAME.getQualifiedName()); super.startElement("", "value", "value", newAttributes); writeFileItem(pipelineContext, fileItem, getContentHandler()); super.endElement("", "value", "value"); super.endPrefixMapping(XMLConstants.XSD_PREFIX); super.endPrefixMapping(XMLConstants.XSI_PREFIX); } } else if (localname.equals("body") && uri.equals("")) { // Marker for request body // Read InputStream into FileItem object, if not already present // We do this so we can read the body multiple times, if needed. // For large files, there will be a performance hit. If we knew // we didn't need to read it multiple times, we could avoid // saving the stream, but practically, it can happen, and it is // convenient. Context context = getContext(pipelineContext); if (context.bodyFileItem == null) { final FileItem fileItem = new DefaultFileItemFactory(getMaxMemorySizeProperty(), SystemUtils.getTemporaryDirectory()).createItem("dummy", "dummy", false, null); pipelineContext.addContextListener(new PipelineContext.ContextListenerAdapter() { public void contextDestroyed(boolean success) { fileItem.delete(); } }); try { OutputStream outputStream = fileItem.getOutputStream(); NetUtils.copyStream(getRequest(pipelineContext).getInputStream(), outputStream); outputStream.close(); } catch (IOException e) { throw new OXFException(e); } context.bodyFileItem = fileItem; } // Serialize the stream into the body element AttributesImpl newAttributes = new AttributesImpl(); super.startPrefixMapping(XMLConstants.XSI_PREFIX, XMLConstants.XSI_URI); super.startPrefixMapping(XMLConstants.XSD_PREFIX, XMLConstants.XSD_URI); newAttributes.addAttribute(XMLConstants.XSI_URI, "type", "xsi:type", "CDATA", useBase64(pipelineContext, context.bodyFileItem) ? XMLConstants.XS_BASE64BINARY_QNAME.getQualifiedName(): XMLConstants.XS_ANYURI_QNAME.getQualifiedName()); super.startElement(uri, localname, qName, newAttributes); writeFileItem(pipelineContext, context.bodyFileItem, getContentHandler()); super.endElement(uri, localname, qName); super.endPrefixMapping(XMLConstants.XSD_PREFIX); super.endPrefixMapping(XMLConstants.XSI_PREFIX); } else { super.startElement(uri, localname, qName, attributes); } }
10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/c1c221e5a3175bfc6f89626217996fa94bce4e37/RequestGenerator.java/buggy/src/java/org/orbeon/oxf/processor/generator/RequestGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 7682, 1071, 918, 13591, 12, 780, 2003, 16, 514, 1191, 529, 16, 514, 22914, 16, 9055, 1677, 13, 1216, 14366, 288, 18701, 309, 261, 5519, 67, 20055, 67, 11368, 67, 3098, 18, 14963, 12, 1650, 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, 7682, 1071, 918, 13591, 12, 780, 2003, 16, 514, 1191, 529, 16, 514, 22914, 16, 9055, 1677, 13, 1216, 14366, 288, 18701, 309, 261, 5519, 67, 20055, 67, 11368, 67, 3098, 18, 14963, 12, 1650, 3...
cms.unlockResource(filename); session.removeValue(C_PARA_FILE);
try { cms.unlockResource(filename); session.removeValue(C_PARA_FILE); } catch (CmsException e) { if (e.getType()==CmsException.C_NO_ACCESS) { template="erroraccessdenied"; CmsXmlWpTemplateFile xmlTemplateDocument = new CmsXmlWpTemplateFile(cms,templateFile); xmlTemplateDocument.setData("details",file.getName()); return startProcessing(cms,xmlTemplateDocument,"",parameters,template); } else { throw e; } }
public byte[] getContent(A_CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) throws CmsException { HttpSession session= ((HttpServletRequest)cms.getRequestContext().getRequest().getOriginalRequest()).getSession(true); // the template to be displayed String template=null; // clear session values on first load String initial=(String)parameters.get(C_PARA_INITIAL); if (initial!= null) { // remove all session values session.removeValue(C_PARA_FILE); session.removeValue("lasturl"); } // get the lasturl parameter String lasturl = getLastUrl(cms, parameters); String unlock=(String)parameters.get(C_PARA_UNLOCK); String filename=(String)parameters.get(C_PARA_FILE); if (filename != null) { session.putValue(C_PARA_FILE,filename); } //check if the unlock parameter was included in the request // if not, the unlock page is shown for the first time filename=(String)session.getValue(C_PARA_FILE); A_CmsResource file=(A_CmsResource)cms.readFileHeader(filename); // select the template to be displayed if (file.isFile()) { template="file"; } else { template="folder"; } if(unlock == null && checkJavaProperty("opencms.dialog", "hide")) { unlock = "true"; } if (unlock != null) { if (unlock.equals("true")) { if( (cms.getResourceType(file.getType()).getResourceName()).equals(C_TYPE_PAGE_NAME) ){ String bodyPath = getBodyPath(cms, (CmsFile)file); try { CmsFile bodyFile=(CmsFile)cms.readFileHeader(bodyPath); if(bodyFile.isLocked() && (bodyFile.isLockedBy()==file.isLockedBy())){ cms.unlockResource(bodyPath); } }catch (CmsException e){ //TODO: ErrorHandling } } else if((cms.getResourceType(file.getType()).getResourceName()).equals(C_TYPE_NEWSPAGE_NAME) ){ String newsContentPath = getNewsContentPath(cms, (CmsFile)file); try { CmsFile newsContentFile=(CmsFile)cms.readFileHeader(newsContentPath); if(newsContentFile.isLocked() && (newsContentFile.isLockedBy()==file.isLockedBy())){ cms.unlockResource(newsContentPath); } }catch (CmsException e){ //TODO: ErrorHandling } } else if((cms.getResourceType(file.getType()).getResourceName()).equals(C_TYPE_FOLDER_NAME) ){ try { cms.unlockResource(C_CONTENTBODYPATH+filename.substring(1)); } catch (CmsException e) { } } cms.unlockResource(filename); session.removeValue(C_PARA_FILE); } // TODO: ErrorHandling // return to filelist try { if(lasturl == null || "".equals(lasturl)) { cms.getRequestContext().getResponse().sendCmsRedirect( getConfigFile(cms).getWorkplaceActionPath()+C_WP_EXPLORER_FILELIST); } else { ((HttpServletResponse)(cms.getRequestContext().getResponse().getOriginalResponse())).sendRedirect(lasturl); } } catch (Exception e) { throw new CmsException("Redirect fails :"+ getConfigFile(cms).getWorkplaceActionPath()+C_WP_EXPLORER_FILELIST,CmsException.C_UNKNOWN_EXCEPTION,e); } return null; } CmsXmlWpTemplateFile xmlTemplateDocument = new CmsXmlWpTemplateFile(cms,templateFile); xmlTemplateDocument.setData("FILENAME",file.getName()); // process the selected template return startProcessing(cms,xmlTemplateDocument,"",parameters,template); }
51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/0cc25399e54bfbc26318634272f652d2afa9905d/CmsUnlock.java/clean/src/com/opencms/workplace/CmsUnlock.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1160, 8526, 5154, 12, 37, 67, 4747, 921, 6166, 16, 514, 28215, 16, 514, 14453, 16, 17311, 18559, 1472, 16, 514, 1542, 4320, 13, 3639, 1216, 11228, 288, 3639, 26166, 1339, 33, 14015,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1160, 8526, 5154, 12, 37, 67, 4747, 921, 6166, 16, 514, 28215, 16, 514, 14453, 16, 17311, 18559, 1472, 16, 514, 1542, 4320, 13, 3639, 1216, 11228, 288, 3639, 26166, 1339, 33, 14015,...
String jDataStore = _buildTemplate(fileName, _JDATASTORE);
String jDataStore = _buildTemplate(fileName, _JDATASTORE, "jdatastore");
private void _buildSQL(String fileName) throws IOException { File file = new File("../sql/" + fileName + ".sql"); if (!file.exists()) { return; } // DB2 String db2 = _buildTemplate(fileName, _DB2); db2 = _rewordDb2(db2); db2 = _removeLongInserts(db2); db2 = _removeNull(db2); db2 = StringUtil.replace( db2, new String[] {"\\'"}, new String[] {"''"}); FileUtil.write("../sql/" + fileName + "/" + fileName + "-db2.sql", db2); // Firebird String firebird = _buildTemplate(fileName, _FIREBIRD); firebird = _rewordFirebird(firebird); firebird = _removeInserts(firebird); firebird = _removeNull(firebird); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-firebird.sql", firebird); // Hypersonic String hypersonic = _buildTemplate(fileName, _HYPERSONIC); hypersonic = _rewordHypersonic(hypersonic); hypersonic = StringUtil.replace(hypersonic, "\\'", "''"); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-hypersonic.sql", hypersonic); // InterBase FileUtil.write( "../sql/" + fileName + "/" + fileName + "-interbase.sql", firebird); // JDataStore String jDataStore = _buildTemplate(fileName, _JDATASTORE); jDataStore = _rewordFirebird(jDataStore); jDataStore = StringUtil.replace( jDataStore, new String[] {"\\'", "\\\"","\\\\", "\\n", "\\r"}, new String[] {"''", "\"", "\\", "\n", "\r"}); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-jdatastore.sql", jDataStore); // MySQL String mysql = _buildTemplate(fileName, _MYSQL, true); mysql = _rewordMysql(mysql); mysql = StringUtil.replace( mysql, new String[] {"\\'"}, new String[] {"''"}); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-mysql.sql", mysql); // Oracle String oracle = _buildTemplate(fileName, _ORACLE); oracle = _rewordOracle(oracle); oracle = StringUtil.replace( oracle, new String[] {"\\\\", "\\'", "\\\""}, new String[] {"\\", "''", "\""}); BufferedReader br = new BufferedReader(new StringReader(oracle)); StringBuffer imageSB = new StringBuffer(); StringBuffer journalArticleSB = new StringBuffer(); StringBuffer journalStructureSB = new StringBuffer(); StringBuffer journalTemplateSB = new StringBuffer(); StringBuffer shoppingItemSB = new StringBuffer(); String line = null; while ((line = br.readLine()) != null) { if (line.startsWith("insert into Image")) { _convertToOracleCSV(line, imageSB); } else if (line.startsWith("insert into JournalArticle")) { _convertToOracleCSV(line, journalArticleSB); } else if (line.startsWith("insert into JournalStructure")) { _convertToOracleCSV(line, journalStructureSB); } else if (line.startsWith("insert into JournalTemplate")) { _convertToOracleCSV(line, journalTemplateSB); } else if (line.startsWith("insert into ShoppingItem")) { _convertToOracleCSV(line, shoppingItemSB); } } br.close(); if (imageSB.length() > 0) { FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle-image.csv", imageSB.toString()); } if (journalArticleSB.length() > 0) { FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle-journalarticle.csv", journalArticleSB.toString()); } if (journalStructureSB.length() > 0) { FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle-journalstructure.csv", journalStructureSB.toString()); } if (journalTemplateSB.length() > 0) { FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle-journaltemplate.csv", journalTemplateSB.toString()); } if (shoppingItemSB.length() > 0) { FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle-shoppingitem.csv", shoppingItemSB.toString()); } oracle = _removeLongInserts(oracle); /*oracle = StringUtil.replace( oracle, new String[] {"\\'", "\\n", "\\r"}, new String[] {"''", "\n", "\r"});*/ oracle = StringUtil.replace(oracle, "\\n", "'||CHR(10)||'"); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-oracle.sql", oracle); // PostgreSQL String postgresql = _buildTemplate(fileName, _POSTGRESQL); postgresql = _rewordPostgreSQL(postgresql); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-postgresql.sql", postgresql); // SAP String sap = _buildTemplate(fileName, _SAP); sap = _rewordSAP(sap); //sap = StringUtil.replace(sap, "varchar(100)", "varchar(75)"); FileUtil.write("../sql/" + fileName + "/" + fileName + "-sap.sql", sap); // SQL Server String sqlServer = _buildTemplate(fileName, _SQL_SERVER); sqlServer = _rewordSQLServer(sqlServer); sqlServer = StringUtil.replace( sqlServer, new String[] {"\\\\", "\\'", "\\\"", "\\n", "\\r"}, new String[] {"\\", "''", "\"", "\n", "\r"}); FileUtil.write( "../sql/" + fileName + "/" + fileName + "-sql-server.sql", sqlServer); }
57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/61b222d5d08c68d321787beb26e96e9c611825c7/DBBuilder.java/buggy/portal-ejb/src/com/liferay/portal/tools/DBBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 389, 3510, 3997, 12, 780, 3968, 13, 1216, 1860, 288, 202, 202, 812, 585, 273, 394, 1387, 2932, 6216, 4669, 4898, 397, 3968, 397, 3552, 4669, 8863, 202, 202, 430, 16051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 3510, 3997, 12, 780, 3968, 13, 1216, 1860, 288, 202, 202, 812, 585, 273, 394, 1387, 2932, 6216, 4669, 4898, 397, 3968, 397, 3552, 4669, 8863, 202, 202, 430, 16051, ...
MessageDialog.openInformation(shell, errorTitle, errorMessage);
String invalidSelectionMessage= CompareMessages.getString("CompareWithHistory.invalidSelectionMessage"); MessageDialog.openInformation(shell, errorTitle, invalidSelectionMessage);
public void run(IAction action) { String errorTitle= CompareMessages.getString("ReplaceFromHistory.title"); //$NON-NLS-1$ String errorMessage= CompareMessages.getString("ReplaceFromHistory.internalErrorMessage"); //$NON-NLS-1$ Shell shell= JavaPlugin.getActiveWorkbenchShell(); // shell can be null; as a result error dialogs won't be parented ISelection selection= getSelection(); IMember input= getEditionElement(selection); if (input == null) { // shouldn't happen because Action should not be enabled in the first place MessageDialog.openInformation(shell, errorTitle, errorMessage); return; } IFile file= getFile(input); if (file == null) { MessageDialog.openError(shell, errorTitle, errorMessage); return; } boolean inEditor= beingEdited(file); if (inEditor) input= (IMember) getWorkingCopy(input); // get a TextBuffer where to insert the text TextBuffer buffer= null; try { buffer= TextBuffer.acquire(file); ITypedElement target= new JavaTextBufferNode(buffer, inEditor); ITypedElement[] editions= buildEditions(target, file); ResourceBundle bundle= ResourceBundle.getBundle(BUNDLE_NAME); EditionSelectionDialog d= new EditionSelectionDialog(shell, bundle); d.setHelpContextId(IJavaHelpContextIds.COMPARE_ELEMENT_WITH_HISTORY_DIALOG); d.setCompareMode(true); d.setEditionTitleImage(JavaCompareUtilities.getImage(input)); d.selectEdition(target, editions, input); } catch(CoreException ex) { ExceptionHandler.handle(ex, shell, errorTitle, errorMessage); } finally { if (buffer != null) TextBuffer.release(buffer); } }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/deb3882f548e0f661de364e34b4e9c94c881b4c3/JavaCompareWithEditionAction.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaCompareWithEditionAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 12, 45, 1803, 1301, 13, 288, 9506, 202, 780, 555, 4247, 33, 11051, 5058, 18, 588, 780, 2932, 5729, 1265, 5623, 18, 2649, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 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, 918, 1086, 12, 45, 1803, 1301, 13, 288, 9506, 202, 780, 555, 4247, 33, 11051, 5058, 18, 588, 780, 2932, 5729, 1265, 5623, 18, 2649, 8863, 4329, 3993, 17, 5106, 17, 21, 8, 20...
prop = new ViewModel();
prop = new ViewModel(this);
public ViewModel getViewModel(AbstractAsset node) { ViewModel prop = (ViewModel)propertyByModelId.get(node.getId()); if (prop == null) { prop = new ViewModel(); propertyByModelId.put(node.getId(), prop); } return prop; }
9773 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9773/0afe93887d7c4bdf8420ea978f1a14475c8393ec/ViewModelContainer.java/clean/kobold/src/kobold.client.plam/src/kobold/client/plam/editor/model/ViewModelContainer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4441, 1488, 8893, 1488, 12, 7469, 6672, 756, 13, 288, 3639, 4441, 1488, 2270, 273, 261, 1767, 1488, 13, 4468, 858, 1488, 548, 18, 588, 12, 2159, 18, 26321, 10663, 3639, 309, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4441, 1488, 8893, 1488, 12, 7469, 6672, 756, 13, 288, 3639, 4441, 1488, 2270, 273, 261, 1767, 1488, 13, 4468, 858, 1488, 548, 18, 588, 12, 2159, 18, 26321, 10663, 3639, 309, 261, ...
((RubyString) filename).getValue(),
((RubyString) filename).toString(),
public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).getValue(), RubyNumeric.fix2int(lineNumber)); }
47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/buggy/src/org/jruby/RubyObject.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 15908, 10340, 921, 1836, 12, 7937, 10340, 921, 365, 16, 15908, 10340, 921, 8526, 833, 13, 288, 7734, 15908, 10340, 921, 1084, 273, 833, 63, 21, 15533, 7734, 15908, 10340, 921, 1544, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 15908, 10340, 921, 1836, 12, 7937, 10340, 921, 365, 16, 15908, 10340, 921, 8526, 833, 13, 288, 7734, 15908, 10340, 921, 1084, 273, 833, 63, 21, 15533, 7734, 15908, 10340, 921, 1544, ...
flagsBuf.append('g');
addToString('g');
public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') if ((flags & TSF_NEWLINES) != 0) break; } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') isUnicodeEscapeStart = true; else c = '\\'; // always unread the 'u' or whatever, we need // to start the string below at the <backslash>. in.unread(); } if (isUnicodeEscapeStart || Character.isJavaIdentifierStart((char)c)) { in.startString(); boolean containsEscape = isUnicodeEscapeStart; do { c = in.read(); if (c == '\\') { c = in.read(); containsEscape = (c == 'u'); } } while (Character.isJavaIdentifierPart((char)c)); in.unread(); int result; String str = in.getString(); // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence after an identifier, we can report // an error here. if (containsEscape) { char ca[] = str.toCharArray(); int L = str.length(); int destination = 0; for (int i = 0; i != L;) { c = ca[i]; ++i; if (c == '\\' && i != L && ca[i] == 'u') { boolean goodEscape = false; if (i + 4 < L) { int val = xDigitToInt(ca[i + 1]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 2]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 3]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 4]); if (val >= 0) { c = (char)val; i += 5; goodEscape = true; } } } } } if (!goodEscape) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } } ca[destination] = (char)c; ++destination; } str = new String(ca, 0, destination); } else { // Return the corresponding token if it's a keyword result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); result = EOF; } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { int base = 10; in.startString(); if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { c = in.read(); base = 16; // restart the string, losing leading 0x in.startString(); } else if (isDigit(c)) { base = 8; } } while (0 <= xDigitToInt(c)) { if (base < 16) { if (isAlpha(c)) break; /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } } c = in.read(); } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { c = in.read(); if (c == '+' || c == '-') { c = in.read(); } if (!isDigit(c)) { in.getString(); // throw away string in progress reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = in.getString(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. StringBuffer stringBuf = null; int quoteChar = c; int val = 0; c = in.read(); in.startString(); // start after the first " while(c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); in.getString(); // throw away the string in progress reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character; revert to the // slow method of building a string. if (stringBuf == null) { // Don't include the backslash in.unread(); stringBuf = new StringBuffer(in.getString()); in.read(); } switch (c = in.read()) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\u000B'; break; // \v a late addition to the ECMA spec. // '\v' doesn't seem to be valid Java. default: if (isDigit(c) && c < '8') { val = c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); } } in.unread(); if (val > 0377) { reportSyntaxError("msg.oct.esc.too.large", null); return ERROR; } c = val; } else if (c == 'u') { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. Do some manual * match (OK because we're in a string) to avoid * multi-char match on the underlying stream. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'u'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('u'); c = c1; } else { int c3 = in.read(); c = (c << 4) | xDigitToInt(c3); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); c = c2; } else { int c4 = in.read(); c = (c << 4) | xDigitToInt(c4); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); stringBuf.append((char)c2); c = c3; } else { // got 4 hex digits! Woo Hoo! } } } } } else if (c == 'x') { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'x'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('x'); c = c1; } else { // got 2 hex digits } } } } } if (stringBuf != null) stringBuf.append((char) c); c = in.read(); } if (stringBuf != null) this.string = stringBuf.toString(); else { in.unread(); // miss the trailing " this.string = in.getString(); in.read(); } return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { // We don't try to use the in.startString/in.getString // approach, because escaped characters (which break it) // seem likely to be common. StringBuffer re = new StringBuffer(); while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { re.append((char) c); c = in.read(); } re.append((char) c); } StringBuffer flagsBuf = new StringBuffer(); while (true) { if (in.match('g')) flagsBuf.append('g'); else if (in.match('i')) flagsBuf.append('i'); else if (in.match('m')) flagsBuf.append('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = re.toString(); this.regExpFlags = flagsBuf.toString(); return OBJECT; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': case '-': if (in.match('=')) { if (c == '+') { this.op = ADD; return ASSIGN; } else { this.op = SUB; return ASSIGN; } } else if (in.match((char) c)) { if (c == '+') { return INC; } else { return DEC; } } else if (c == '-') { return SUB; } else { return ADD; } default: reportSyntaxError("msg.illegal.character", null); return ERROR; } }
11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/307d75e3128a24e2aa23ad77cc0eb8945c47d57c/TokenStream.java/buggy/js/rhino/src/org/mozilla/javascript/TokenStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
int trueTarget = acquireLabel(); int falseTarget = acquireLabel(); int beyond = acquireLabel();
int trueTarget = cfw.acquireLabel(); int falseTarget = cfw.acquireLabel(); int beyond = cfw.acquireLabel();
private void generateCodeFromNode(Node node, Node parent) { // System.out.println("gen code for " + node.toString()); int type = node.getType(); Node child = node.getFirstChild(); switch (type) { case Token.LOOP: case Token.WITH: case Token.LABEL: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.CASE: case Token.DEFAULT: // XXX shouldn't these be StatementNodes? case Token.SCRIPT: case Token.BLOCK: case Token.EMPTY: case Token.NOP: // no-ops. visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } break; case Token.FUNCTION: if (inFunction || parent.getType() != Token.SCRIPT) { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); OptFunctionNode fn; fn = (OptFunctionNode)scriptOrFn.getFunctionNode(fnIndex); int t = fn.getFunctionType(); if (t != FunctionNode.FUNCTION_STATEMENT) { visitFunction(fn, t); } } break; case Token.NAME: visitName(node); break; case Token.NEW: case Token.CALL: visitCall(node, type, child); break; case Token.NUMBER: case Token.STRING: visitLiteral(node); break; case Token.THIS: aload(thisObjLocal); break; case Token.THISFN: classFile.add(ByteCode.ALOAD_0); break; case Token.NULL: addByteCode(ByteCode.ACONST_NULL); break; case Token.TRUE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); break; case Token.FALSE: classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); break; case Token.UNDEFINED: pushUndefined(); break; case Token.REGEXP: visitObject(node); break; case Token.TRY: visitTryCatchFinally(node, child); break; case Token.THROW: visitThrow(node, child); break; case Token.RETURN: visitReturn(node, child); break; case Token.SWITCH: visitSwitch(node, child); break; case Token.COMMA: { Node next = child.getNext(); while (next != null) { generateCodeFromNode(child, node); addByteCode(ByteCode.POP); child = next; next = next.getNext(); } generateCodeFromNode(child, node); break; } case Token.NEWSCOPE: addScriptRuntimeInvoke("newScope", "()Lorg/mozilla/javascript/Scriptable;"); break; case Token.ENTERWITH: visitEnterWith(node, child); break; case Token.LEAVEWITH: visitLeaveWith(node, child); break; case Token.ENUMINIT: visitEnumInit(node, child); break; case Token.ENUMNEXT: visitEnumNext(node, child); break; case Token.ENUMDONE: visitEnumDone(node, child); break; case Token.POP: visitStatement(node); if (child.getType() == Token.SETVAR) { /* special case this so as to avoid unnecessary load's & pop's */ visitSetVar(child, child.getFirstChild(), false); } else { while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) addByteCode(ByteCode.POP2); else addByteCode(ByteCode.POP); } break; case Token.POPV: visitStatement(node); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } astore(scriptResultLocal); break; case Token.TARGET: visitTarget(node); break; case Token.JSR: case Token.GOTO: case Token.IFEQ: case Token.IFNE: visitGOTO(node, type, child); break; case Token.NOT: { int trueTarget = acquireLabel(); int falseTarget = acquireLabel(); int beyond = acquireLabel(); generateIfJump(child, node, trueTarget, falseTarget); markLabel(trueTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "FALSE", "Ljava/lang/Boolean;"); addByteCode(ByteCode.GOTO, beyond); markLabel(falseTarget); classFile.add(ByteCode.GETSTATIC, "java/lang/Boolean", "TRUE", "Ljava/lang/Boolean;"); markLabel(beyond); classFile.adjustStackTop(-1); break; } case Token.BITNOT: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toInt32", "(Ljava/lang/Object;)I"); push(-1); // implement ~a as (a ^ -1) addByteCode(ByteCode.IXOR); addByteCode(ByteCode.I2D); addDoubleConstructor(); break; case Token.VOID: generateCodeFromNode(child, node); addByteCode(ByteCode.POP); pushUndefined(); break; case Token.TYPEOF: generateCodeFromNode(child, node); addScriptRuntimeInvoke("typeof", "(Ljava/lang/Object;" +")Ljava/lang/String;"); break; case Token.TYPEOFNAME: visitTypeofname(node); break; case Token.INC: visitIncDec(node, true); break; case Token.DEC: visitIncDec(node, false); break; case Token.OR: case Token.AND: { generateCodeFromNode(child, node); addByteCode(ByteCode.DUP); addScriptRuntimeInvoke("toBoolean", "(Ljava/lang/Object;)Z"); int falseTarget = acquireLabel(); if (type == Token.AND) addByteCode(ByteCode.IFEQ, falseTarget); else addByteCode(ByteCode.IFNE, falseTarget); addByteCode(ByteCode.POP); generateCodeFromNode(child.getNext(), node); markLabel(falseTarget); } break; case Token.ADD: { generateCodeFromNode(child, node); generateCodeFromNode(child.getNext(), node); switch (node.getIntProp(Node.ISNUMBER_PROP, -1)) { case Node.BOTH: addByteCode(ByteCode.DADD); break; case Node.LEFT: addOptRuntimeInvoke("add", "(DLjava/lang/Object;)Ljava/lang/Object;"); break; case Node.RIGHT: addOptRuntimeInvoke("add", "(Ljava/lang/Object;D)Ljava/lang/Object;"); break; default: addScriptRuntimeInvoke("add", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); } } break; case Token.MUL: visitArithmetic(node, ByteCode.DMUL, child, parent); break; case Token.SUB: visitArithmetic(node, ByteCode.DSUB, child, parent); break; case Token.DIV: case Token.MOD: visitArithmetic(node, type == Token.DIV ? ByteCode.DDIV : ByteCode.DREM, child, parent); break; case Token.BITOR: case Token.BITXOR: case Token.BITAND: case Token.LSH: case Token.RSH: case Token.URSH: visitBitOp(node, type, child); break; case Token.POS: case Token.NEG: addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); if (type == Token.NEG) { addByteCode(ByteCode.DNEG); } addDoubleConstructor(); break; case Optimizer.TO_DOUBLE: // cnvt to double (not Double) generateCodeFromNode(child, node); addScriptRuntimeInvoke("toNumber", "(Ljava/lang/Object;)D"); break; case Optimizer.TO_OBJECT: { // convert from double int prop = -1; if (child.getType() == Token.NUMBER) { prop = child.getIntProp(Node.ISNUMBER_PROP, -1); } if (prop != -1) { child.removeProp(Node.ISNUMBER_PROP); generateCodeFromNode(child, node); child.putIntProp(Node.ISNUMBER_PROP, prop); } else { addByteCode(ByteCode.NEW, "java/lang/Double"); addByteCode(ByteCode.DUP); generateCodeFromNode(child, node); addDoubleConstructor(); } break; } case Token.IN: case Token.INSTANCEOF: case Token.LE: case Token.LT: case Token.GE: case Token.GT: // need a result Object visitRelOp(node, child); break; case Token.EQ: case Token.NE: case Token.SHEQ: case Token.SHNE: visitEqOp(node, child); break; case Token.GETPROP: visitGetProp(node, child); break; case Token.GETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "getElem", "(Ljava/lang/Object;D" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "getElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.GETVAR: { OptLocalVariable lVar = (OptLocalVariable)(node.getProp(Node.VARIABLE_PROP)); visitGetVar(lVar, node.getIntProp(Node.ISNUMBER_PROP, -1) != -1, node.getString()); } break; case Token.SETVAR: visitSetVar(node, child, true); break; case Token.SETNAME: visitSetName(node, child); break; case Token.SETPROP: visitSetProp(node, child); break; case Token.SETELEM: while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } aload(variableObjectLocal); if (node.getIntProp(Node.ISNUMBER_PROP, -1) != -1) { addOptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"D" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } else { addScriptRuntimeInvoke( "setElem", "(Ljava/lang/Object;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +"Lorg/mozilla/javascript/Scriptable;" +")Ljava/lang/Object;"); } break; case Token.DELPROP: aload(contextLocal); aload(variableObjectLocal); while (child != null) { generateCodeFromNode(child, node); child = child.getNext(); } addScriptRuntimeInvoke("delete", "(Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Ljava/lang/Object;" +"Ljava/lang/Object;" +")Ljava/lang/Object;"); break; case Token.BINDNAME: case Token.GETBASE: visitBind(node, type, child); break; case Token.GETTHIS: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getThis", "(Lorg/mozilla/javascript/Scriptable;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.PARENT: generateCodeFromNode(child, node); addScriptRuntimeInvoke("getParent", "(Ljava/lang/Object;" +")Lorg/mozilla/javascript/Scriptable;"); break; case Token.NEWTEMP: visitNewTemp(node, child); break; case Token.USETEMP: visitUseTemp(node, child); break; case Token.NEWLOCAL: visitNewLocal(node, child); break; case Token.USELOCAL: visitUseLocal(node, child); break; default: throw new RuntimeException("Unexpected node type "+type); } }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/bd2594e6ebd6d8099b587934641c8f7650d87761/Codegen.java/clean/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 1085, 28570, 12, 907, 756, 16, 2029, 982, 13, 565, 288, 3639, 368, 2332, 18, 659, 18, 8222, 2932, 4507, 981, 364, 315, 397, 756, 18, 10492, 10663, 3639, 509, 618, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 1085, 28570, 12, 907, 756, 16, 2029, 982, 13, 565, 288, 3639, 368, 2332, 18, 659, 18, 8222, 2932, 4507, 981, 364, 315, 397, 756, 18, 10492, 10663, 3639, 509, 618, 273, ...
setColourIndex(prefC);
m_ColourCombo.setSelectedIndex(prefC);
public void setUpComboBoxes(Instances inst) { setProperties(inst.relationName()); int prefX = -1; int prefY = -1; int prefC = -1; String [] XNames = new String [inst.numAttributes()]; String [] YNames = new String [inst.numAttributes()]; String [] CNames = new String [inst.numAttributes()]; String [] SNames = new String [4]; for (int i = 0; i < XNames.length; i++) { String type = ""; switch (inst.attribute(i).type()) { case Attribute.NOMINAL: type = " (Nom)"; break; case Attribute.NUMERIC: type = " (Num)"; break; case Attribute.STRING: type = " (Str)"; break; default: type = " (???)"; } XNames[i] = "X: "+ inst.attribute(i).name()+type; YNames[i] = "Y: "+ inst.attribute(i).name()+type; CNames[i] = "Colour: "+ inst.attribute(i).name()+type; if (m_preferredXDimension != null) { if (m_preferredXDimension.compareTo(inst.attribute(i).name()) == 0) { prefX = i; System.err.println("Found preferred X dimension"); } } if (m_preferredYDimension != null) { if (m_preferredYDimension.compareTo(inst.attribute(i).name()) == 0) { prefY = i; System.err.println("Found preferred Y dimension"); } } if (m_preferredColourDimension != null) { if (m_preferredColourDimension. compareTo(inst.attribute(i).name()) == 0) { prefC = i; System.err.println("Found preferred Colour dimension"); } } } m_XCombo.setModel(new DefaultComboBoxModel(XNames)); m_YCombo.setModel(new DefaultComboBoxModel(YNames)); m_ColourCombo.setModel(new DefaultComboBoxModel(CNames)); //m_ShapeCombo.setModel(new DefaultComboBoxModel(SNames)); //m_ShapeCombo.setEnabled(true); m_XCombo.setEnabled(true); m_YCombo.setEnabled(true); if (m_splitListener == null) { m_ColourCombo.setEnabled(true); m_ColourCombo.setSelectedIndex(inst.numAttributes()-1); } m_plotSurround.setBorder((BorderFactory.createTitledBorder("Plot: " +inst.relationName()))); try { if (prefX != -1) { setXIndex(prefX); } if (prefY != -1) { setYIndex(prefY); } if (prefC != -1) { setColourIndex(prefC); } } catch (Exception ex) { System.err.println("Problem setting preferred Visualization dimensions"); } }
4179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4179/6d6c162f05f43e880e4f7a58476752da3b0033f8/VisualizePanel.java/clean/trunk/weka/gui/visualize/VisualizePanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 24292, 22199, 281, 12, 5361, 1804, 13, 288, 565, 23126, 12, 8591, 18, 5488, 461, 10663, 565, 509, 11307, 60, 273, 300, 21, 31, 565, 509, 11307, 61, 273, 300, 21, 31, 565, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 24292, 22199, 281, 12, 5361, 1804, 13, 288, 565, 23126, 12, 8591, 18, 5488, 461, 10663, 565, 509, 11307, 60, 273, 300, 21, 31, 565, 509, 11307, 61, 273, 300, 21, 31, 565, 5...
sql.append(" and a.attname like \'" + columnNamePattern + "\'");
sql.append(" and a.attname like \'" + columnNamePattern + "\'");
public java.sql.ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { Vector v = new Vector(); // The new ResultSet tuple stuff Field f[] = new Field[18]; // The field descriptors for the new ResultSet f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[5] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); f[6] = new Field(connection, "COLUMN_SIZE", iInt4Oid, 4); f[7] = new Field(connection, "BUFFER_LENGTH", iVarcharOid, 32); f[8] = new Field(connection, "DECIMAL_DIGITS", iInt4Oid, 4); f[9] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); f[10] = new Field(connection, "NULLABLE", iInt4Oid, 4); f[11] = new Field(connection, "REMARKS", iVarcharOid, 32); f[12] = new Field(connection, "COLUMN_DEF", iVarcharOid, 32); f[13] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[14] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[15] = new Field(connection, "CHAR_OCTET_LENGTH", iVarcharOid, 32); f[16] = new Field(connection, "ORDINAL_POSITION", iInt4Oid, 4); f[17] = new Field(connection, "IS_NULLABLE", iVarcharOid, 32); StringBuffer sql = new StringBuffer(512); /* Build a >= 7.1 SQL statement to list all columns */ sql.append("select " + (connection.haveMinimumServerVersion("7.2") ? "a.attrelid, " : "a.oid, ") + " c.relname, " + " a.attname, " + " a.atttypid, " + " a.attnum, " + " a.attnotnull, " + " a.attlen, " + " a.atttypmod, " + " d.adsrc, " + " t.typname, " + /* Use the new col_description in 7.2 or an additional outer join in 7.1 */ (connection.haveMinimumServerVersion("7.2") ? "col_description(a.attrelid, a.attnum) " : "e.description ") + "from" + " (" + " (pg_class c inner join pg_attribute a on" + " (" + " a.attrelid=c.oid"); if ((tableNamePattern != null) && ! tableNamePattern.equals("%")) { sql.append(" and c.relname like \'" + tableNamePattern + "\'"); } if ((columnNamePattern != null) && ! columnNamePattern.equals("%")) { sql.append(" and a.attname like \'" + columnNamePattern + "\'"); } sql.append( " and a.attnum > 0" + " )" + " ) inner join pg_type t on" + " (" + " t.oid = a.atttypid" + " )" + " )" + " left outer join pg_attrdef d on" + " (" + " c.oid = d.adrelid" + " and a.attnum = d.adnum" + " ) "); if (!connection.haveMinimumServerVersion("7.2")) { /* Only for 7.1 */ sql.append( " left outer join pg_description e on" + " (" + " e.objoid = a.oid" + " ) "); } sql.append("order by" + " c.relname, a.attnum"); java.sql.ResultSet r = connection.ExecSQL(sql.toString()); while (r.next()) { byte[][] tuple = new byte[18][0]; String nullFlag = r.getString(6); String typname = r.getString(10); tuple[0] = null; // Catalog name, not supported tuple[1] = null; // Schema name, not supported tuple[2] = r.getBytes(2); // Table name tuple[3] = r.getBytes(3); // Column name tuple[4] = Integer.toString(connection.getSQLType(typname)).getBytes(); // Data type tuple[5] = typname.getBytes(); // Type name // Column size // Looking at the psql source, // I think the length of a varchar as specified when the table was created // should be extracted from atttypmod which contains this length + sizeof(int32) if (typname.equals("bpchar") || typname.equals("varchar")) { int atttypmod = r.getInt(8); tuple[6] = Integer.toString(atttypmod != -1 ? atttypmod - VARHDRSZ : 0).getBytes(); } else { tuple[6] = r.getBytes(7); } tuple[7] = null; // Buffer length // Decimal digits = scale // From the source (see e.g. backend/utils/adt/numeric.c, // function numeric()) the scale and precision can be calculated // from the typmod value. if (typname.equals("numeric") || typname.equals("decimal")) { int attypmod = r.getInt(8); tuple[8] = Integer.toString((attypmod - VARHDRSZ) & 0xffff).getBytes(); } else tuple[8] = "0".getBytes(); tuple[9] = "10".getBytes(); // Num Prec Radix - assume decimal tuple[10] = Integer.toString(nullFlag.equals("f") ? java.sql.DatabaseMetaData.columnNullable : java.sql.DatabaseMetaData.columnNoNulls).getBytes(); // Nullable tuple[11] = r.getBytes(11); // Description (if any) tuple[12] = r.getBytes(9); // Column default tuple[13] = null; // sql data type (unused) tuple[14] = null; // sql datetime sub (unused) tuple[15] = tuple[6]; // char octet length tuple[16] = r.getBytes(5); // ordinal position tuple[17] = (nullFlag.equals("f") ? "YES" : "NO").getBytes(); // Is nullable v.addElement(tuple); } r.close(); return new ResultSet(connection, f, v, "OK", 1); }
45534 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45534/521017c5d090f18278b0fa9e8b949f7e57e6e050/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 2252, 18, 4669, 18, 13198, 14226, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 4775, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 202, 95, 202, 202, 5018, 331, 273, 394, 5589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2252, 18, 4669, 18, 13198, 14226, 12, 780, 6222, 16, 514, 1963, 3234, 16, 514, 4775, 3234, 16, 514, 7578, 3234, 13, 1216, 6483, 202, 95, 202, 202, 5018, 331, 273, 394, 5589, ...
if (_keepStats) { long time = Clock.getInstance().now() - _state.getWhenStarted(); StatManager.getInstance().addRateData("netDb.successTime", time, 0); StatManager.getInstance().addRateData("netDb.successPeers", _state.getAttempted().size(), time); } if (_onSuccess != null) JobQueue.getInstance().addJob(_onSuccess);
if (_keepStats) { long time = Clock.getInstance().now() - _state.getWhenStarted(); StatManager.getInstance().addRateData("netDb.successTime", time, 0); StatManager.getInstance().addRateData("netDb.successPeers", _state.getAttempted().size(), time); } if (_onSuccess != null) JobQueue.getInstance().addJob(_onSuccess);
protected void succeed() { if (_log.shouldLog(Log.INFO)) _log.info(getJobId() + ": Succeeded search for key " + _state.getTarget()); if (_log.shouldLog(Log.DEBUG)) _log.debug(getJobId() + ": State of successful search: " + _state); if (_keepStats) { long time = Clock.getInstance().now() - _state.getWhenStarted(); StatManager.getInstance().addRateData("netDb.successTime", time, 0); StatManager.getInstance().addRateData("netDb.successPeers", _state.getAttempted().size(), time); } if (_onSuccess != null) JobQueue.getInstance().addJob(_onSuccess); }
27437 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27437/86759d2f9c63d203488c7e8b34e64be162a16ce9/SearchJob.java/clean/router/java/src/net/i2p/router/networkdb/kademlia/SearchJob.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 12897, 1435, 288, 202, 430, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 5923, 3719, 202, 565, 389, 1330, 18, 1376, 12, 588, 23378, 1435, 397, 6398, 348, 20983, 1623, 364, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 12897, 1435, 288, 202, 430, 261, 67, 1330, 18, 13139, 1343, 12, 1343, 18, 5923, 3719, 202, 565, 389, 1330, 18, 1376, 12, 588, 23378, 1435, 397, 6398, 348, 20983, 1623, 364, 4...
public Object getStream() { return fileAppender.getFileOutputStream();
public Object getStream() { if (fileAppender != null) return fileAppender.getFileOutputStream(); return null;
public Object getStream() { return fileAppender.getFileOutputStream(); }
58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/c8bc2e5f3487baee94dbb30026505c0e2eb3d5e8/LogWriter.java/clean/kettle/src/be/ibridge/kettle/core/LogWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 13741, 1435, 202, 95, 3639, 327, 585, 17302, 18, 29925, 4632, 5621, 202, 97, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1033, 13741, 1435, 202, 95, 3639, 327, 585, 17302, 18, 29925, 4632, 5621, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
rem, rem, 0, isReadOnly());
rem, rem, 0); else return new DirectByteBufferImpl.ReadWrite (this, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0);
public ByteBuffer slice() { int rem = remaining(); return new DirectByteBufferImpl (this, VMDirectByteBuffer.adjustAddress(address, position()), rem, rem, 0, isReadOnly()); }
25352 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25352/21b083dc05539f8f6730b5e5d961c31c78c9f00f/MappedByteBufferImpl.java/clean/libjava/java/nio/MappedByteBufferImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 7400, 2788, 1435, 225, 288, 565, 509, 849, 273, 4463, 5621, 565, 327, 394, 9908, 12242, 2828, 1377, 261, 2211, 16, 8251, 5368, 12242, 18, 13362, 1887, 12, 2867, 16, 1754, 1435, 3631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 7400, 2788, 1435, 225, 288, 565, 509, 849, 273, 4463, 5621, 565, 327, 394, 9908, 12242, 2828, 1377, 261, 2211, 16, 8251, 5368, 12242, 18, 13362, 1887, 12, 2867, 16, 1754, 1435, 3631...
int orientation, int direction) { return 1; }
int orientation, int direction) { return 1; }
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { return 1; }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/0788b89b7368770a1157f825d60dd8c5a9df183e/JList.java/clean/core/src/classpath/javax/javax/swing/JList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 11971, 30453, 1768, 10798, 12, 19463, 6021, 6120, 16, 25083, 282, 509, 9820, 16, 25083, 282, 509, 4068, 13, 565, 288, 202, 2463, 404, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 11971, 30453, 1768, 10798, 12, 19463, 6021, 6120, 16, 25083, 282, 509, 9820, 16, 25083, 282, 509, 4068, 13, 565, 288, 202, 2463, 404, 31, 565, 289, 2, -100, -100, -100, -100, ...
public static void init() {// if (mappedKeys != null)// return;//// init("keymap");//// }//// public static void init(String map) { if (mappedKeys != null) return;// keyMapName = map; mappedKeys = new HashMap(60); workStroke = new KeyStroker(0, false, false, false,false);// Properties keys = new Properties(); Properties keys = ConfigureFactory.getInstance().getProperties( GlobalConfigure.KEYMAP); if (!loadKeyStrokes(keys)) { // keycode shift control alternate // Key <-> Keycode , isShiftDown , isControlDown , isAlternateDown // my personal preference mappedKeys.put(new KeyStroker(10, false, false, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(17, false, true, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, false, false, false),"[enter]");// mappedKeys.put(new KeyStroker(10, true, false, false),"[fldext]"); mappedKeys.put(new KeyStroker(8, false, false, false, false),"[backspace]"); mappedKeys.put(new KeyStroker(9, false, false, false, false),"[tab]"); mappedKeys.put(new KeyStroker(9, true, false, false, false),"[backtab]"); mappedKeys.put(new KeyStroker(127, false, false, false, false),"[delete]"); mappedKeys.put(new KeyStroker(155, false, false, false, false),"[insert]"); mappedKeys.put(new KeyStroker(19, false, false, false, false),"[clear]"); mappedKeys.put(new KeyStroker(27, false, false, false, false),"[reset]"); mappedKeys.put(new KeyStroker(27, true, false, false, false),"[sysreq]"); mappedKeys.put(new KeyStroker(35, false, false, false, false),"[eof]"); mappedKeys.put(new KeyStroker(36, false, false, false, false),"[home]"); mappedKeys.put(new KeyStroker(39, false, false, false, false),"[right]"); mappedKeys.put(new KeyStroker(39, false, false, true, false),"[nextword]"); mappedKeys.put(new KeyStroker(37, false, false, false, false),"[left]"); mappedKeys.put(new KeyStroker(37, false, false, true, false),"[prevword]"); mappedKeys.put(new KeyStroker(38, false, false, false, false),"[up]"); mappedKeys.put(new KeyStroker(40, false, false, false, false),"[down]"); mappedKeys.put(new KeyStroker(34, false, false, false, false),"[pgdown]"); mappedKeys.put(new KeyStroker(33, false, false, false, false),"[pgup]"); mappedKeys.put(new KeyStroker(96, false, false, false, false),"[keypad0]"); mappedKeys.put(new KeyStroker(97, false, false, false, false),"[keypad1]"); mappedKeys.put(new KeyStroker(98, false, false, false, false),"[keypad2]"); mappedKeys.put(new KeyStroker(99, false, false, false, false),"[keypad3]"); mappedKeys.put(new KeyStroker(100, false, false, false, false),"[keypad4]"); mappedKeys.put(new KeyStroker(101, false, false, false, false),"[keypad5]"); mappedKeys.put(new KeyStroker(102, false, false, false, false),"[keypad6]"); mappedKeys.put(new KeyStroker(103, false, false, false, false),"[keypad7]"); mappedKeys.put(new KeyStroker(104, false, false, false, false),"[keypad8]"); mappedKeys.put(new KeyStroker(105, false, false, false, false),"[keypad9]"); mappedKeys.put(new KeyStroker(109, false, false, false, false),"[field-]"); mappedKeys.put(new KeyStroker(107, false, false, false, false),"[field+]"); mappedKeys.put(new KeyStroker(112, false, false, false, false),"[pf1]"); mappedKeys.put(new KeyStroker(113, false, false, false, false),"[pf2]"); mappedKeys.put(new KeyStroker(114, false, false, false, false),"[pf3]"); mappedKeys.put(new KeyStroker(115, false, false, false, false),"[pf4]"); mappedKeys.put(new KeyStroker(116, false, false, false, false),"[pf5]"); mappedKeys.put(new KeyStroker(117, false, false, false, false),"[pf6]"); mappedKeys.put(new KeyStroker(118, false, false, false, false),"[pf7]"); mappedKeys.put(new KeyStroker(119, false, false, false, false),"[pf8]"); mappedKeys.put(new KeyStroker(120, false, false, false, false),"[pf9]"); mappedKeys.put(new KeyStroker(121, false, false, false, false),"[pf10]"); mappedKeys.put(new KeyStroker(122, false, false, false, false),"[pf11]"); mappedKeys.put(new KeyStroker(123, false, false, false, false),"[pf12]"); mappedKeys.put(new KeyStroker(112, true, false, false, false),"[pf13]"); mappedKeys.put(new KeyStroker(113, true, false, false, false),"[pf14]"); mappedKeys.put(new KeyStroker(114, true, false, false, false),"[pf15]"); mappedKeys.put(new KeyStroker(115, true, false, false, false),"[pf16]"); mappedKeys.put(new KeyStroker(116, true, false, false, false),"[pf17]"); mappedKeys.put(new KeyStroker(117, true, false, false, false),"[pf18]"); mappedKeys.put(new KeyStroker(118, true, false, false, false),"[pf19]"); mappedKeys.put(new KeyStroker(119, true, false, false, false),"[pf20]"); mappedKeys.put(new KeyStroker(120, true, false, false, false),"[pf21]"); mappedKeys.put(new KeyStroker(121, true, false, false, false),"[pf22]"); mappedKeys.put(new KeyStroker(122, true, false, false, false),"[pf23]"); mappedKeys.put(new KeyStroker(123, true, false, false, false),"[pf24]"); mappedKeys.put(new KeyStroker(112, false, false, true, false),"[help]"); mappedKeys.put(new KeyStroker(72, false, false, true, false),"[hostprint]"); mappedKeys.put(new KeyStroker(67, false, false, true, false),"[copy]"); mappedKeys.put(new KeyStroker(86, false, false, true, false),"[paste]"); mappedKeys.put(new KeyStroker(39, true, false, false, false),"[markright]"); mappedKeys.put(new KeyStroker(37, true, false, false, false),"[markleft]"); mappedKeys.put(new KeyStroker(38, true, false, false, false),"[markup]"); mappedKeys.put(new KeyStroker(40, true, false, false, false),"[markdown]"); mappedKeys.put(new KeyStroker(155, true, false, false, false),"[dupfield]"); mappedKeys.put(new KeyStroker(17, true, true, false, false),"[newline]"); mappedKeys.put(new KeyStroker(34, false, false, true, false),"[jumpnext]"); mappedKeys.put(new KeyStroker(33, false, false, true, false),"[jumpprev]"); saveKeyMap(); } else { setKeyMap(keys); } }
4212 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4212/9c471ce0ce50de11122e79d30a96e6a663d336e5/KeyMapper.java/buggy/src/org/tn5250j/keyboard/KeyMapper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 760, 918, 1208, 1435, 288, 759, 1377, 309, 261, 13654, 2396, 480, 446, 13, 759, 540, 327, 31, 1307, 1377, 1208, 2932, 856, 1458, 8863, 1307, 282, 289, 1307, 282, 1071, 760, 918, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 760, 918, 1208, 1435, 288, 759, 1377, 309, 261, 13654, 2396, 480, 446, 13, 759, 540, 327, 31, 1307, 1377, 1208, 2932, 856, 1458, 8863, 1307, 282, 289, 1307, 282, 1071, 760, 918, 1...
startOffset = consume(IToken.t_switch).getOffset();
startOffset = consume().getOffset();
protected IASTStatement parseSwitchStatement() throws EndOfFileException, BacktrackException { int startOffset; startOffset = consume(IToken.t_switch).getOffset(); consume(IToken.tLPAREN); IASTExpression switch_condition = condition(); consume(IToken.tRPAREN); IASTStatement switch_body = statement(); IASTSwitchStatement switch_statement = createSwitchStatement(); ((ASTNode) switch_statement).setOffsetAndLength(startOffset, calculateEndOffset(switch_body) - startOffset); switch_statement.setControllerExpression(switch_condition); switch_condition.setParent(switch_statement); switch_condition.setPropertyInParent(IASTSwitchStatement.CONTROLLER_EXP); switch_statement.setBody(switch_body); switch_body.setParent(switch_statement); switch_body.setPropertyInParent(IASTSwitchStatement.BODY); return switch_statement; }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/c69e46df852e8daf1a898f5f2d8f0b9d9f957df1/GNUCSourceParser.java/clean/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 467, 9053, 3406, 1109, 10200, 3406, 1435, 1216, 4403, 951, 812, 503, 16, 4297, 4101, 503, 288, 3639, 509, 18245, 31, 3639, 18245, 273, 7865, 7675, 588, 2335, 5621, 3639, 7865, 12, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 467, 9053, 3406, 1109, 10200, 3406, 1435, 1216, 4403, 951, 812, 503, 16, 4297, 4101, 503, 288, 3639, 509, 18245, 31, 3639, 18245, 273, 7865, 7675, 588, 2335, 5621, 3639, 7865, 12, 1...
log.debug("Installing view at " + localAddress + " view is " + currentView);
if(log.isDebugEnabled()) log.debug("Installing view at " + localAddress + " view is " + currentView);
private void onViewChange(View view) { Vector members = view.getMembers(); //Am I the only member? If yes, unblock me so I can send messages if((members!= null && members.size()==1)&& localAddress.equals(members.get(0))) { isBlockState=false; } synchronized (sharedLock) { suspected.retainAll(view.getMembers()); currentView = view; //If coordinator leaves, its STOP FLUSH message will be discarded by //other members at NAKACK layer. Remaining members will be hung, waiting //for STOP_FLUSH message. If I am new coordinator I will complete the //FLUSH and send STOP_FLUSH on flush callers behalf. if (flushCaller != null && !view.getMembers().contains(flushCaller) && localAddress.equals(view.getMembers().get(0))) { log.debug("Coordinator left, " + localAddress + " will complete flush"); onResume(); } } log.debug("Installing view at " + localAddress + " view is " + currentView); }
47927 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47927/546d91912f1d4c8f7da7955bcfd8bb18d230fa15/FLUSH.java/clean/src/org/jgroups/protocols/pbcast/FLUSH.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 603, 1767, 3043, 12, 1767, 1476, 13, 202, 95, 202, 202, 5018, 4833, 273, 1476, 18, 588, 6918, 5621, 202, 202, 759, 9864, 467, 326, 1338, 3140, 35, 971, 12465, 16, 640, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 1767, 3043, 12, 1767, 1476, 13, 202, 95, 202, 202, 5018, 4833, 273, 1476, 18, 588, 6918, 5621, 202, 202, 759, 9864, 467, 326, 1338, 3140, 35, 971, 12465, 16, 640, ...
PrintStream output = new PrintStream(client.getOutputStream()); output.println(node.getStatus()); output.close(); client.close(); }
client.close();
public void run() { // Set up client socket try { //thread loop while(true){ if ( node != null) { client = new Socket("sleon.dyndns.org", 23415); PrintStream output = new PrintStream(client.getOutputStream()); output.println(node.getStatus()); output.close(); client.close(); } try{ Thread.sleep(updateInterval); //how i love java }catch (InterruptedException e){ return; } } }catch (IOException e){ Logger.error(this, "Could not open connection to the uploadhost"); System.err.println("Could not open connection to the uploadhost"); return; } }
56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/ab15665f55c48ad12df9d173f89ecb13d357eb27/TestnetStatusUploader.java/clean/src/freenet/node/TestnetStatusUploader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 759, 1000, 731, 1004, 2987, 202, 202, 698, 202, 202, 95, 1082, 202, 759, 5930, 2798, 25083, 202, 17523, 12, 3767, 15329, 9506, 202, 430, 261, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 759, 1000, 731, 1004, 2987, 202, 202, 698, 202, 202, 95, 1082, 202, 759, 5930, 2798, 25083, 202, 17523, 12, 3767, 15329, 9506, 202, 430, 261, 7...
addInput(new ASTInput("config", new ASTHrefId(content)));
addInput(new ASTInput("config", new ASTHrefId(contentXIncluded)));
private StepProcessorContext(final Object controllerValidity) { this.pipelineConfig = PipelineProcessor.createConfigFromAST(new ASTPipeline() {{ setValidity(controllerValidity); final ASTParam stepURLInput = addParam(new ASTParam(ASTParam.INPUT, "step-url")); final ASTParam stepTypeInput = addParam(new ASTParam(ASTParam.INPUT, "step-type")); final ASTParam dataInput = addParam(new ASTParam(ASTParam.INPUT, "data")); final ASTParam instanceInput = addParam(new ASTParam(ASTParam.INPUT, "instance")); final ASTParam xformsModelInput = addParam(new ASTParam(ASTParam.INPUT, "xforms-model")); final ASTParam matcherInput = addParam(new ASTParam(ASTParam.INPUT, "matcher")); final ASTParam dataOutput = addParam(new ASTParam(ASTParam.OUTPUT, "data")); final ASTParam instanceOutput = addParam(new ASTParam(ASTParam.OUTPUT, "instance")); // Rewrite the URL if needed final ASTOutput rewroteStepURL = new ASTOutput(null, "rewrote-step-url"); addStatement(new ASTChoose(new ASTHrefId(stepURLInput)) {{ addWhen(new ASTWhen("contains(/config, '${')") {{ addStatement(new ASTProcessorCall(XMLConstants.XSLT_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefAggregate("root", new ASTHrefId(stepURLInput), new ASTHrefId(matcherInput)))); addInput(new ASTInput("config", new ASTHrefURL(REWRITE_XSL))); addOutput(new ASTOutput("data", rewroteStepURL)); }}); }}); addWhen(new ASTWhen() {{ addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(stepURLInput))); addOutput(new ASTOutput("data", rewroteStepURL)); }}); }}); }}); // Read file to "execute" final ASTOutput content = new ASTOutput("data", "content"); addStatement(new ASTProcessorCall(XMLConstants.URL_GENERATOR_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefId(rewroteStepURL))); addOutput(content); }}); final ASTOutput resultData = new ASTOutput(null, "result-data"); final ASTOutput resultInstance = new ASTOutput(null, "result-instance"); // Perform verifications on input/output of XPL addStatement(new ASTChoose(new ASTHrefId(stepTypeInput)) {{ addWhen(new ASTWhen("/step-type = 'view'") {{ // We are dealing with a view addStatement(new ASTChoose(new ASTHrefId(content)) {{ addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.orbeon.com/oxf/pipeline' " + "and count(/*/*[local-name() = 'param' and @type = 'output' and @name = 'data']) = 0") {{ // The XPL has not data output addStatement(new ASTProcessorCall(XMLConstants.ERROR_PROCESSOR_QNAME) {{ final Document errorDocument = new NonLazyUserDataDocument(new NonLazyUserDataElement("error")); errorDocument.getRootElement().addText("XPL view must have a 'data' output"); addInput(new ASTInput("config", errorDocument)); }}); }}); }}); }}); }}); addStatement(new ASTChoose(new ASTHrefId(content)) {{ // XPL file with instance & data output addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.orbeon.com/oxf/pipeline' " + "and /*/*[local-name() = 'param' and @type = 'output' and @name = 'data'] " + "and /*/*[local-name() = 'param' and @type = 'output' and @name = 'instance']") {{ addStatement(new ASTProcessorCall(XMLConstants.PIPELINE_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefId(content))); addInput(new ASTInput("data", new ASTHrefId(dataInput))); addInput(new ASTInput("instance", new ASTHrefId(instanceInput))); addInput(new ASTInput("xforms-model", new ASTHrefId(xformsModelInput))); final ASTOutput datOut = new ASTOutput( "data", resultData ); addOutput( datOut ); final ASTOutput instOut = new ASTOutput( "instance", resultInstance ); addOutput( instOut ); }}); }}); // XPL file with only data output addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.orbeon.com/oxf/pipeline' " + "and /*/*[local-name() = 'param' and @type = 'output' and @name = 'data']") {{ addStatement(new ASTProcessorCall(XMLConstants.PIPELINE_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefId(content))); addInput(new ASTInput("data", new ASTHrefId(dataInput))); addInput(new ASTInput("instance", new ASTHrefId(instanceInput))); addInput(new ASTInput("xforms-model", new ASTHrefId(xformsModelInput))); final ASTOutput datOut = new ASTOutput( "data", resultData ); addOutput( datOut ); }}); addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(instanceInput))); final ASTOutput datOut = new ASTOutput( "data", resultInstance ); addOutput( datOut ); }}); }}); // XPL file with only instance output addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.orbeon.com/oxf/pipeline' " + "and /*/*[local-name() = 'param' and @type = 'output' and @name = 'instance']") {{ addStatement(new ASTProcessorCall(XMLConstants.PIPELINE_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefId(content))); addInput(new ASTInput("data", new ASTHrefId(dataInput))); addInput(new ASTInput("instance", new ASTHrefId(instanceInput))); addInput(new ASTInput("xforms-model", new ASTHrefId(xformsModelInput))); final ASTOutput instOut = new ASTOutput( "instance", resultInstance ); addOutput( instOut ); }}); addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(dataInput))); final ASTOutput resDatOut = new ASTOutput( "data", resultData ); addOutput( resDatOut ); }}); }}); // XPL file with no output addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.orbeon.com/oxf/pipeline'") {{ addStatement(new ASTProcessorCall(XMLConstants.PIPELINE_PROCESSOR_QNAME) {{ addInput(new ASTInput("config", new ASTHrefId(content))); addInput(new ASTInput("data", new ASTHrefId(dataInput))); addInput(new ASTInput("instance", new ASTHrefId(instanceInput))); addInput(new ASTInput("xforms-model", new ASTHrefId(xformsModelInput))); }}); addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(dataInput))); final ASTOutput resDatOut = new ASTOutput( "data", resultData ); addOutput( resDatOut ); }}); addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(instanceInput))); final ASTOutput resInstOut = new ASTOutput( "data", resultInstance ); addOutput( resInstOut ); }}); }}); // XSLT file (including XSLT 2.0 "Simplified Stylesheet Modules") addWhen(new ASTWhen("namespace-uri(/*) = 'http://www.w3.org/1999/XSL/Transform' or /*/@xsl:version = '2.0'") {{ setNamespaces(NAMESPACES_WITH_XSI_AND_XSLT); // Copy the instance as is addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(instanceInput))); final ASTOutput resInstOut = new ASTOutput( "data", resultInstance ); addOutput( resInstOut ); }}); addStatement(new ASTChoose(new ASTHrefId(content)) { private void addXSLTWhen(final String condition, final QName processorQName) { addWhen(new ASTWhen(condition) {{ setNamespaces(NAMESPACES_WITH_XSI_AND_XSLT); // Changed from <= 2.8 behavior addStatement(new ASTProcessorCall(processorQName) {{ addInput(new ASTInput("config", new ASTHrefId(content))); addInput(new ASTInput("data", new ASTHrefId(dataInput))); addInput(new ASTInput("instance", new ASTHrefId(instanceInput))); final ASTOutput resDatOut = new ASTOutput( "data", resultData ); addOutput( resDatOut ); }}); }}); } { // XSLT 1.0: There is no xsl:version = '2.0' attribute (therefore the namespace of the // root element is xsl as per the condition above) and the version attribute // is exactly '1.0' addXSLTWhen("not(/*/@xsl:version = '2.0') and /*/@version = '1.0'", XMLConstants.PFC_XSLT10_PROCESSOR_QNAME); // XSLT 2.0: There is an xsl:version = '2.0' attribute or the namespace or the root // element is xsl and the version is different from '1.0' addXSLTWhen(null, XMLConstants.PFC_XSLT20_PROCESSOR_QNAME); }}); }}); // XML file addWhen(new ASTWhen() {{ // Copy the instance as is addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(instanceInput))); final ASTOutput resInstOut = new ASTOutput( "data", resultInstance ); addOutput( resInstOut ); }}); // Copy XML file as is addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(content))); final ASTOutput resDatOut = new ASTOutput( "data", resultData ); addOutput( resDatOut ); }}); }}); }}); // Connect results addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(resultData))); addOutput(new ASTOutput("data", dataOutput)); }}); addStatement(new ASTProcessorCall(XMLConstants.IDENTITY_PROCESSOR_QNAME) {{ addInput(new ASTInput("data", new ASTHrefId(resultInstance))); final ASTOutput resDatOut = new ASTOutput( "data", instanceOutput ); addOutput( resDatOut ); }}); }}); }
57229 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57229/c92faea3770d68e915964a3102a4873b3279f0cd/PageFlowControllerProcessor.java/buggy/src/java/org/orbeon/oxf/processor/PageFlowControllerProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 3238, 8693, 5164, 1042, 12, 6385, 1033, 2596, 19678, 13, 288, 5411, 333, 18, 14511, 809, 273, 13671, 5164, 18, 2640, 23852, 9053, 12, 2704, 9183, 8798, 1435, 225, 10179, 7734, 444, 19678, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3238, 8693, 5164, 1042, 12, 6385, 1033, 2596, 19678, 13, 288, 5411, 333, 18, 14511, 809, 273, 13671, 5164, 18, 2640, 23852, 9053, 12, 2704, 9183, 8798, 1435, 225, 10179, 7734, 444, 19678, ...
public org.quickfix.field.ClOrdID get(org.quickfix.field.ClOrdID value)
public quickfix.field.ClOrdID get(quickfix.field.ClOrdID value)
public org.quickfix.field.ClOrdID get(org.quickfix.field.ClOrdID value) throws FieldNotFound { getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/ListStatus.java/buggy/src/java/src/quickfix/fix40/ListStatus.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 9549, 904, 18, 1518, 18, 2009, 15383, 734, 336, 12, 19525, 904, 18, 1518, 18, 2009, 15383, 734, 225, 460, 13, 565, 1216, 2286, 2768, 225, 288, 5031, 12, 1132, 1769, 327, 460, 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, 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, 9549, 904, 18, 1518, 18, 2009, 15383, 734, 336, 12, 19525, 904, 18, 1518, 18, 2009, 15383, 734, 225, 460, 13, 565, 1216, 2286, 2768, 225, 288, 5031, 12, 1132, 1769, 327, 460, 31, ...
public void unregisterIOHandler(int fileno) { getRuntime().ioHandlers.remove(new Integer(fileno));
public void unregisterIOHandler(int aFileno) { getRuntime().ioHandlers.remove(new Integer(aFileno));
public void unregisterIOHandler(int fileno) { getRuntime().ioHandlers.remove(new Integer(fileno)); }
49687 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49687/ca6b16e996ea9af83ce593594b9c69b9364a9924/RubyIO.java/buggy/src/org/jruby/RubyIO.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 10232, 4294, 1503, 12, 474, 24256, 13, 288, 3639, 18814, 7675, 1594, 6919, 18, 4479, 12, 2704, 2144, 12, 7540, 5764, 10019, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 10232, 4294, 1503, 12, 474, 24256, 13, 288, 3639, 18814, 7675, 1594, 6919, 18, 4479, 12, 2704, 2144, 12, 7540, 5764, 10019, 565, 289, 2, -100, -100, -100, -100, -100, -100, -10...
setCode((Integer) table.getValueAt(getRow(), getColumnIndex("\u043d\u043e\u043c\u0435\u0440")));
setCode((Integer) table.getValueAt(getRow(), getColumnIndex("\u041d\u043e\u043c\u0435\u0440")));
private void setAllVariables() { setId((Integer) table.getValueAt(getRow(), getColumnIndex("id"))); setCode((Integer) table.getValueAt(getRow(), getColumnIndex("\u043d\u043e\u043c\u0435\u0440"))); setIn_in_sl_mop((Integer) table.getValueAt(getRow(), getColumnIndex("id_casa"))); in_code_casa= (Integer) table.getValueAt(getRow(), getColumnIndex( "\u043a\u043e\u0434 \u043a\u0430\u0441\u0430")); try{ setIn_outsl_mop((Integer) table.getValueAt(getRow(), getColumnIndex("id_contragent"))); } catch(Exception e) { setIn_outsl_mop(-1); } try{ setContragent_cod((Integer) table.getValueAt(getRow(), getColumnIndex("\u043a\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442"))); } catch(Exception e) { setContragent_cod(0); } try{ setContragent_name((String)table.getValueAt(getRow(), getColumnIndex( "\u0438\u043c\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442"))); } catch(Exception e) { setContragent_name(""); } setIn_id_order_spec((Integer) table.getValueAt(getRow(), getColumnIndex("id_df"))); setIn_id_order_doc((Integer) table.getValueAt(getRow(), getColumnIndex("id_order_doc"))); setIn_DATE((String)table.getValueAt(getRow(), getColumnIndex("\u0414\u0430\u0442\u0430 \u0438\u0437\u0434\u0430\u0432\u0430\u043d\u0435")).toString()); setIn_id_n_money((Integer) table.getValueAt(getRow(), getColumnIndex("id_n_money"))); in_code_lat = (String)table.getValueAt(getRow(), getColumnIndex("\u043f\u0430\u0440\u0438\u0447\u0435\u043d \u043a\u043e\u0434")); setIn_exchange_rate((Double)table.getValueAt(getRow(), getColumnIndex("\u043a\u0443\u0440\u0441"))); setIn_sum_sl_mop((Double)table.getValueAt(getRow(), getColumnIndex("\u0441\u0443\u043c\u0430"))); setIn_sum_os_val_sl_mop((Double)table.getValueAt(getRow(), getColumnIndex("\u0441\u0443\u043c\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430 \u0432\u0430\u043b\u0443\u0442\u0430"))); setUser_name((String)table.getValueAt(getRow(), getColumnIndex("\u0438\u0437\u0434\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430"))); setIn_id_sdtn((Integer) table.getValueAt(getRow(), getColumnIndex("id_sdtn"))); setComment((String) table.getValueAt(getRow(), getColumnIndex("\u041a\u043e\u043c\u0435\u043d\u0442\u0430\u0440"))); }
12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/0d9040fa0247ee16e33e2269782f7563a63380ab/FrmCaseOperation.java/buggy/src/imakante/sales/FrmCaseOperation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 30213, 6158, 1435, 288, 3639, 10446, 12443, 4522, 13, 1014, 18, 24805, 861, 12, 588, 1999, 9334, 6716, 1016, 2932, 350, 6, 3719, 1769, 3639, 24724, 12443, 4522, 13, 1014, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 30213, 6158, 1435, 288, 3639, 10446, 12443, 4522, 13, 1014, 18, 24805, 861, 12, 588, 1999, 9334, 6716, 1016, 2932, 350, 6, 3719, 1769, 3639, 24724, 12443, 4522, 13, 1014, 18, 2...
(new InputStreamReader(globalState.getIn()));
(new InputStreamReader(global.getIn()));
public static void processSource(Context cx, String filename) { if (filename == null || filename.equals("-")) { // Use the interpreter for interactive input cx.setOptimizationLevel(-1); BufferedReader in = new BufferedReader (new InputStreamReader(globalState.getIn())); int lineno = 1; boolean hitEOF = false; while (!hitEOF) { int startline = lineno; if (filename == null) globalState.getErr().print("js> "); globalState.getErr().flush(); String source = ""; // Collect lines of source to compile. while (true) { String newline; try { newline = in.readLine(); } catch (IOException ioe) { globalState.getErr().println(ioe.toString()); break; } if (newline == null) { hitEOF = true; break; } source = source + newline + "\n"; lineno++; if (cx.stringIsCompilableUnit(source)) break; } Reader reader = new StringReader(source); Object result = evaluateReader(cx, scope, reader, "<stdin>", startline); if (result != cx.getUndefinedValue()) { try { globalState.getErr().println(cx.toString(result)); } catch (EcmaError ee) { String msg = ToolErrorReporter.getMessage( "msg.uncaughtJSException", ee.toString()); exitCode = EXITCODE_RUNTIME_ERROR; if (ee.getSourceName() != null) { Context.reportError(msg, ee.getSourceName(), ee.getLineNumber(), ee.getLineSource(), ee.getColumnNumber()); } else { Context.reportError(msg); } } } NativeArray h = globalState.history; h.put((int)h.jsGet_length(), h, source); } globalState.getErr().println(); } else processFile(cx, scope, filename); System.gc(); }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/dcc50b2477b2063c90c140b044bec59ee39d93a0/Main.java/clean/toolsrc/org/mozilla/javascript/tools/shell/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 1207, 1830, 12, 1042, 9494, 16, 514, 1544, 13, 288, 3639, 309, 261, 3459, 422, 446, 747, 1544, 18, 14963, 2932, 10951, 3719, 288, 5411, 368, 2672, 326, 16048, 364, 12625, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 1830, 12, 1042, 9494, 16, 514, 1544, 13, 288, 3639, 309, 261, 3459, 422, 446, 747, 1544, 18, 14963, 2932, 10951, 3719, 288, 5411, 368, 2672, 326, 16048, 364, 12625, ...
else if ("advanced".equals(cmd)) { String[] stuff = {}; MetadataViewer mdv = new MetadataViewer(stuff); mdv.openFile(currentFile); }
public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if ("new".equals(cmd)) { setTitle("OME Metadata Notebook"); currentFile = null; metadata.setupTabs(); } if ("open".equals(cmd)) { if (metadata.getState()) { Object[] options = {"Yes, do it!", "No thanks."}; int n = JOptionPane.showOptionDialog(this, "Are you sure you want to open\n" + "a new file without saving your\n" + "changes to the current file?", "Current File Not Saved", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, //don't use a custom Icon options, //the titles of buttons options[0]); //default button title if (n == JOptionPane.YES_OPTION) { chooser.setDialogTitle("Open"); chooser.setApproveButtonText("Open"); chooser.setApproveButtonToolTipText("Open selected file."); opening = true; int rval = chooser.showOpenDialog(this); if (rval == JFileChooser.APPROVE_OPTION) { new Thread(this, "MetadataNotebook-Opener").start(); } } } else { chooser.setDialogTitle("Open"); chooser.setApproveButtonText("Open"); chooser.setApproveButtonToolTipText("Open selected file."); opening = true; int rval = chooser.showOpenDialog(this); if (rval == JFileChooser.APPROVE_OPTION) { new Thread(this, "MetadataNotebook-Opener").start(); } } } else if ("saveAs".equals(cmd) || ("save".equals(cmd) && currentFile == null)) { opening = false; chooser.setDialogTitle("Save"); chooser.setApproveButtonText("Save"); chooser.setApproveButtonToolTipText("Save to selected file."); int rval = chooser.showOpenDialog(this); if (rval == JFileChooser.APPROVE_OPTION) { new Thread(this, "MetadataNotebook-Saver").start(); metadata.stateChanged(false); } } else if ("save".equals(cmd) && currentFile != null) { saveFile(currentFile); metadata.stateChanged(false); } else if ("exit".equals(cmd)) System.exit(0); else if ("about".equals(cmd)) About.show(); else if ("advanced".equals(cmd)) { String[] stuff = {}; MetadataViewer mdv = new MetadataViewer(stuff); mdv.openFile(currentFile); } else if(cmd.startsWith("tabChange")) { metadata.tabChange( Integer.parseInt(cmd.substring(9)) ); } }
55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/6298bc44d12f634ef846a5bb08de557962763ff0/MetadataNotebook.java/buggy/loci/ome/notebook/MetadataNotebook.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 565, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 565, 309, 7566, 2704, 9654, 14963, 12, 4172, 3719, 288, 1377, 14109, 2932, 51, 958, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26100, 12, 1803, 1133, 425, 13, 288, 565, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 565, 309, 7566, 2704, 9654, 14963, 12, 4172, 3719, 288, 1377, 14109, 2932, 51, 958, ...
ToHitData toHit = Compute.toHitPush(game, paa);
private void resolvePushAttack(PushAttackAction paa, int lastEntityId) { final Entity ae = game.getEntity(paa.getEntityId()); // PLEASE NOTE: buildings are *never* the target of a "push". final Entity te = game.getEntity(paa.getTargetId()); if (lastEntityId != paa.getEntityId()) { phaseReport.append("\nPhysical attacks for " ).append( ae.getDisplayName() ).append( "\n"); } phaseReport.append(" Pushing " ).append( te.getDisplayName());// // should we even bother?// if (te.isDestroyed() || te.isDoomed() || te.crew.isDead()) {// phaseReport.append(" but the target is already destroyed!\n");// return;// } // compute to-hit ToHitData toHit = Compute.toHitPush(game, paa); if (toHit.getValue() == ToHitData.IMPOSSIBLE) { phaseReport.append(", but the push is impossible (" ).append( toHit.getDesc() ).append( ")\n"); return; } phaseReport.append("; needs " ).append( toHit.getValue() ).append( ", "); // roll int roll = Compute.d6(2); phaseReport.append("rolls " ).append( roll ).append( " : "); // do we hit? if (roll < toHit.getValue()) { phaseReport.append("misses.\n"); return; } // we hit... int direction = ae.getFacing(); Coords src = te.getPosition(); Coords dest = src.translated(direction); PilotingRollData pushPRD = new PilotingRollData(te.getId(), getKickPushPSRMod(ae, te, 0), "was pushed"); pushPRD.setCumulative(false); // see Bug# 811987 for more info if (Compute.isValidDisplacement(game, te.getId(), te.getPosition(), direction)) { phaseReport.append("succeeds: target is pushed into hex " ).append( dest.getBoardNum() ).append( "\n"); doEntityDisplacement(te, src, dest, pushPRD); // if push actually moved the target, attacker follows thru if (!te.getPosition().equals(src)) { ae.setPosition(src); } } else { if (game.getOptions().booleanOption("push_off_board") && !game.board.contains(dest)) { game.removeEntity(te.getId(), Entity.REMOVE_PUSHED); send(createRemoveEntityPacket(te.getId(), Entity.REMOVE_PUSHED)); phaseReport.append("\n*** " ).append( te.getDisplayName() ).append( " has been forced from the field. ***\n"); // TODO: remove passengers and swarmers. ae.setPosition(src); } else { phaseReport.append("succeeds, but target can't be moved.\n"); game.addPSR(pushPRD); } } phaseReport.append("\n"); }
4135 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4135/961e5884a395494eba8632c89e8a4642931ee310/Server.java/clean/megamek/src/megamek/server/Server.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2245, 7621, 3075, 484, 12, 7621, 3075, 484, 1803, 6790, 69, 16, 509, 1142, 18029, 13, 288, 3639, 727, 3887, 14221, 273, 7920, 18, 588, 1943, 12, 84, 7598, 18, 588, 18029, 106...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2245, 7621, 3075, 484, 12, 7621, 3075, 484, 1803, 6790, 69, 16, 509, 1142, 18029, 13, 288, 3639, 727, 3887, 14221, 273, 7920, 18, 588, 1943, 12, 84, 7598, 18, 588, 18029, 106...
RedundantBranch redundantBranch = new RedundantBranch(lastHandle, lineNumber, redundantNullCheck);
RedundantBranch redundantBranch = new RedundantBranch(location, lineNumber, redundantNullCheck);
private void analyzeIfNullBranch(Method method, IsNullValueDataflow invDataflow, BasicBlock basicBlock, InstructionHandle lastHandle) throws DataflowAnalysisException { IsNullValueFrame frame = invDataflow.getFactAtLocation(new Location(lastHandle, basicBlock)); if (!frame.isValid()) { // This is probably dead code due to an infeasible exception edge. return; } IsNullValue top = frame.getTopValue(); // Find the line number. int lineNumber = getLineNumber(method, lastHandle); if (lineNumber < 0) return; if (!(top.isDefinitelyNull() || top.isDefinitelyNotNull())) { if (DEBUG) System.out.println("Line " + lineNumber + " undetermined"); undeterminedBranchSet.set(lineNumber); return; } // Figure out if the branch is always taken // or always not taken. short opcode = lastHandle.getInstruction().getOpcode(); boolean definitelySame = top.isDefinitelyNull(); if (opcode != Constants.IFNULL) definitelySame = !definitelySame; if (definitelySame) { if (DEBUG) System.out.println("Line " + lineNumber + " always same"); definitelySameBranchSet.set(lineNumber); } else { if (DEBUG) System.out.println("Line " + lineNumber + " always different"); definitelyDifferentBranchSet.set(lineNumber); } // Is this a null check made redundant by an earlier check? // Such code is not as likely to be an error // as when a check is done after an explicit dereference. boolean redundantNullCheck = top.isChecked(); RedundantBranch redundantBranch = new RedundantBranch(lastHandle, lineNumber, redundantNullCheck); if (DEBUG) System.out.println("Adding redundant branch: " + redundantBranch); redundantBranchList.add(redundantBranch); }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/03154e2700b9445cf9396da2da14973d19b3deee/FindNullDeref.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 12375, 2047, 2041, 7108, 12, 1305, 707, 16, 30230, 620, 751, 2426, 2198, 751, 2426, 16, 7651, 1768, 5337, 1768, 16, 202, 4766, 24605, 3259, 1142, 3259, 13, 1216, 1910, 242...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12375, 2047, 2041, 7108, 12, 1305, 707, 16, 30230, 620, 751, 2426, 2198, 751, 2426, 16, 7651, 1768, 5337, 1768, 16, 202, 4766, 24605, 3259, 1142, 3259, 13, 1216, 1910, 242...
node_setPrefix( a, prefix );
public static void element_setAttributeNS ( Dom e, String uri, String qName, String value ) { QName name = e.locale().makeQualifiedQName( uri, qName ); String local = name.getLocalPart(); Dom a = attributes_getNamedItemNS( e, uri, local ); if (a == null) { String prefix = validatePrefix( name.getPrefix(), uri, local, true ); a = document_createAttributeNS( node_getOwnerDocument( e ), uri, local ); node_setPrefix( a, prefix ); attributes_setNamedItemNS( e, a ); } node_setNodeValue( a, value ); }
3520 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3520/e20123e0be9f336c9164ccbcc76b15b1357665a7/DomImpl.java/buggy/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 930, 67, 542, 1499, 3156, 261, 12965, 425, 16, 514, 2003, 16, 514, 22914, 16, 514, 460, 262, 565, 288, 3639, 16723, 508, 273, 425, 18, 6339, 7675, 6540, 8708, 13688, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 930, 67, 542, 1499, 3156, 261, 12965, 425, 16, 514, 2003, 16, 514, 22914, 16, 514, 460, 262, 565, 288, 3639, 16723, 508, 273, 425, 18, 6339, 7675, 6540, 8708, 13688, 12,...
return reportParam.getReportDefinitionParam().getType() == ReportDefinitionParam.TYPE_DATE;
return reportParam.getReportDefinitionParam().getType().equals(ReportDefinitionParam.TYPE_DATE);
public boolean getIsDate() { return reportParam.getReportDefinitionParam().getType() == ReportDefinitionParam.TYPE_DATE; }
48996 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48996/0cf4e1d45deadfe5cb474f8dddff9f58e1de5911/DecoratedReportParam.java/buggy/reports/reports-app/src/java/org/theospi/tool/reports/DecoratedReportParam.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 14279, 1626, 1435, 202, 95, 202, 202, 2463, 2605, 786, 18, 588, 4820, 1852, 786, 7675, 588, 559, 1435, 422, 8706, 1852, 786, 18, 2399, 67, 4594, 31, 202, 97, 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, 225, 202, 482, 1250, 14279, 1626, 1435, 202, 95, 202, 202, 2463, 2605, 786, 18, 588, 4820, 1852, 786, 7675, 588, 559, 1435, 422, 8706, 1852, 786, 18, 2399, 67, 4594, 31, 202, 97, 2, -100, ...
private void addScannerInfo(ScannerInfoTypes type, Object object) {
private void addScannerInfo(Integer commandId, Map scannerInfo) { CCommandDSC cmd = (CCommandDSC) commandIdCommandMap.get(commandId); if (cmd != null) { List symbols = (List) scannerInfo.get(ScannerInfoTypes.SYMBOL_DEFINITIONS); List includes = (List) scannerInfo.get(ScannerInfoTypes.INCLUDE_PATHS); cmd.setSymbols(symbols); cmd.setIncludes(includes); cmd.setDiscovered(true); }
private void addScannerInfo(ScannerInfoTypes type, Object object) { // TODO Auto-generated method stub }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/1af4417856bbdfe5e25fa599b676c4ded521b9b1/PerFileSICollector.java/buggy/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 527, 11338, 966, 12, 4522, 1296, 548, 16, 1635, 7683, 966, 13, 288, 385, 2189, 40, 2312, 1797, 273, 261, 39, 2189, 40, 2312, 13, 1296, 548, 2189, 863, 18, 588, 12, 3076, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 527, 11338, 966, 12, 4522, 1296, 548, 16, 1635, 7683, 966, 13, 288, 385, 2189, 40, 2312, 1797, 273, 261, 39, 2189, 40, 2312, 13, 1296, 548, 2189, 863, 18, 588, 12, 3076, 54...
String templateFolderPath = ReportPlugin.getDefault( ) .getDefaultTemplatePreference( );
String templateFolderPath = ReportPlugin.getDefault( ).getTemplatePreference();
public boolean performFinish( ) { // copy to template folder String templateFolderPath = ReportPlugin.getDefault( ) .getDefaultTemplatePreference( ); String filePath = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ).getFileName( ); String fileName = filePath.substring( filePath .lastIndexOf( File.separator ) ); try { copyFile( filePath, templateFolderPath + fileName ); } catch ( IOException e ) { ExceptionHandler.handle( e ); } try { setDesignFile( templateFolderPath + fileName ); } catch ( DesignFileException e ) { ExceptionHandler.handle( e ); return false; } catch ( SemanticException e ) { ExceptionHandler.handle( e ); return false; } catch ( IOException e ) { ExceptionHandler.handle( e ); return false; } return true; }
15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/0ad18b6a7d70c7993dba24588ef8e6e6370e4ae3/PublishTemplateAction.java/buggy/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/actions/PublishTemplateAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 3073, 11641, 12, 262, 202, 95, 202, 202, 759, 1610, 358, 1542, 3009, 202, 202, 780, 1542, 28785, 273, 8706, 3773, 18, 588, 1868, 12, 262, 9506, 202, 18, 588, 1868, 2283,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 3073, 11641, 12, 262, 202, 95, 202, 202, 759, 1610, 358, 1542, 3009, 202, 202, 780, 1542, 28785, 273, 8706, 3773, 18, 588, 1868, 12, 262, 9506, 202, 18, 588, 1868, 2283,...
relDesc = getDescriptor( fields[ i ].getFieldType() ); if ( relDesc == NoDescriptor ) { } else if ( relDesc != null && relDesc instanceof XMLClassDescriptor && fields[ i ] instanceof XMLFieldDescriptorImpl ) { ( (XMLFieldDescriptorImpl) fields[ i ] ).setClassDescriptor( (XMLClassDescriptor) relDesc );
Class fieldType = fields[i].getFieldType(); if (fieldType != null) { relDesc = getDescriptor(fieldType); if ( relDesc == NoDescriptor ) { } else if ( relDesc != null && relDesc instanceof XMLClassDescriptor && fields[ i ] instanceof XMLFieldDescriptorImpl ) { ( (XMLFieldDescriptorImpl) fields[ i ] ).setClassDescriptor( (XMLClassDescriptor) relDesc ); }
protected void resolveRelations( ClassDescriptor clsDesc ) throws MappingException { FieldDescriptor[] fields; fields = clsDesc.getFields(); for ( int i = 0 ; i < fields.length ; ++i ) { if (fields[i].getClassDescriptor() != null) continue; ClassDescriptor relDesc; relDesc = getDescriptor( fields[ i ].getFieldType() ); if ( relDesc == NoDescriptor ) { // XXX Error message should come here } else if ( relDesc != null && relDesc instanceof XMLClassDescriptor && fields[ i ] instanceof XMLFieldDescriptorImpl ) { ( (XMLFieldDescriptorImpl) fields[ i ] ).setClassDescriptor( (XMLClassDescriptor) relDesc ); //-- removed kvisco 20010814 // ( (XMLFieldDescriptorImpl) fields[ i ] ).setNodeType( NodeType.Element ); } } if ( clsDesc instanceof XMLClassDescriptorImpl ) ( (XMLClassDescriptorImpl) clsDesc ).sortDescriptors(); }
57307 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57307/37d313172ad6e2de2ac68ad6c7bca848dc9e97ad/XMLMappingLoader.java/buggy/src/main/java/org/exolab/castor/xml/XMLMappingLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 2245, 10666, 12, 26641, 2028, 4217, 262, 3639, 1216, 30896, 565, 288, 3639, 13965, 8526, 1466, 31, 3639, 1466, 273, 2028, 4217, 18, 588, 2314, 5621, 3639, 364, 261, 509, 277, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 2245, 10666, 12, 26641, 2028, 4217, 262, 3639, 1216, 30896, 565, 288, 3639, 13965, 8526, 1466, 31, 3639, 1466, 273, 2028, 4217, 18, 588, 2314, 5621, 3639, 364, 261, 509, 277, 2...
panel.add( "Center", app ); panel.validate(); context.showStatus("Initializing Applet ..."); Main.debug("Initializing Applet................"); initApplet(); show(); app.setVisible( true ); Thread.yield(); panel.doLayout(); app.resize( appletSize ); context.showStatus("Starting Applet \"" + appletName + "\" ...");
remove(panel); add( "Center", app ); invalidate(); setVisible(true); context.showStatus("Initializing Applet: " + appletName + " ..."); app.init(); setVisible(true); context.showStatus("Starting Applet: " + appletName + " ...");
public void createApplet() { panel = new KJASAppletPanel( appletSize ); add( "Center", panel ); pack(); synchronized( loader ) { try { appletClass = loader.loadClass( className ); } catch (Exception e) { Main.kjas_err("Class could not be loaded " + className, e); } } if( appletClass == null ) { panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) ); return; } try { app = (Applet) appletClass.newInstance(); app.setStub( me ); } catch( InstantiationException e ) { Main.kjas_err( "Could not instantiate applet", e ); panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) ); return; } catch( IllegalAccessException e ) { Main.kjas_err( "Could not instantiate applet", e ); panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) ); return; } runThread = new Thread ( new Runnable() { public void run() { //this order is very important and took a long time //to figure out- don't modify it unless there are //real bug fixes active = true; //app.setVisible( false ); // with the preceding line, IllegalArgumentExceptions occur // with certain applets (eg. Animator applet from 1.4 demos) // so, don't do this! panel.add( "Center", app ); panel.validate(); context.showStatus("Initializing Applet ..."); Main.debug("Initializing Applet................"); initApplet(); //context.showStatus("Applet \"" + appletName + "\" initialized."); show(); app.setVisible( true ); Thread.yield(); // panel.validate(); panel.doLayout(); app.resize( appletSize ); context.showStatus("Starting Applet \"" + appletName + "\" ..."); // Main.info("Starting Applet................"); app.start(); //We're already in a thread, so don't create a new one panel.validate(); app.setVisible( true ); } } , "KJAS-Applet-" + appletID + "(" + appletName + ")"); // Main.debug("starting runThread................"); runThread.setContextClassLoader(loader); runThread.start(); }
1818 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1818/397ccd4b913f7bee55cbf0bc78c6405a5b64556e/KJASAppletStub.java/buggy/khtml/java/org/kde/kjas/server/KJASAppletStub.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 752, 23696, 1435, 288, 3639, 6594, 273, 394, 1475, 46, 3033, 23696, 5537, 12, 21853, 1225, 11272, 3639, 527, 12, 315, 8449, 3113, 6594, 11272, 3639, 2298, 5621, 3639, 3852, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 752, 23696, 1435, 288, 3639, 6594, 273, 394, 1475, 46, 3033, 23696, 5537, 12, 21853, 1225, 11272, 3639, 527, 12, 315, 8449, 3113, 6594, 11272, 3639, 2298, 5621, 3639, 3852, 12, ...
if (exp instanceof PsiNewExpression) {
if(exp instanceof PsiReferenceExpression){ return removeParensFromReferenceExpression((PsiReferenceExpression) exp); } if(exp instanceof PsiNewExpression){
public static String removeParentheses(PsiExpression exp) { if (exp instanceof PsiMethodCallExpression) { return removeParensFromMethodCallExpression((PsiMethodCallExpression) exp); } if (exp instanceof PsiNewExpression) { return removeParensFromNewExpression((PsiNewExpression) exp); } if (exp instanceof PsiAssignmentExpression) { return removeParensFromAssignmentExpression((PsiAssignmentExpression) exp); } if (exp instanceof PsiArrayInitializerExpression) { return removeParensFromArrayInitializerExpression((PsiArrayInitializerExpression) exp); } if (exp instanceof PsiTypeCastExpression) { return removeParensFromTypeCastExpression((PsiTypeCastExpression) exp); } if (exp instanceof PsiArrayAccessExpression) { return removeParensFromArrayAccessExpression((PsiArrayAccessExpression) exp); } if (exp instanceof PsiPrefixExpression) { return removeParensFromPrefixExpression((PsiPrefixExpression) exp); } if (exp instanceof PsiPostfixExpression) { return removeParensFromPostfixExpression((PsiPostfixExpression) exp); } if (exp instanceof PsiBinaryExpression) { return removeParensFromBinaryExpression((PsiBinaryExpression) exp); } if (exp instanceof PsiInstanceOfExpression) { return removeParensFromInstanceOfExpression((PsiInstanceOfExpression) exp); } if (exp instanceof PsiConditionalExpression) { return removeParensFromConditionalExpression((PsiConditionalExpression) exp); } if (exp instanceof PsiParenthesizedExpression) { return removeParensFromParenthesizedExpression((PsiParenthesizedExpression) exp); } return exp.getText(); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/4dac7d77e908a20a1e98b321a920e69147be84ad/ParenthesesUtils.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/psiutils/ParenthesesUtils.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 514, 1206, 17880, 281, 12, 52, 7722, 2300, 1329, 13, 288, 3639, 309, 261, 2749, 1276, 453, 7722, 12592, 2300, 13, 288, 5411, 327, 1206, 52, 21660, 1265, 12592, 2300, 12443, 52,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 514, 1206, 17880, 281, 12, 52, 7722, 2300, 1329, 13, 288, 3639, 309, 261, 2749, 1276, 453, 7722, 12592, 2300, 13, 288, 5411, 327, 1206, 52, 21660, 1265, 12592, 2300, 12443, 52,...
throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_REF, modulename.getLocalPart()));
throw new PhaseException(Messages.getMessage( DeploymentErrorMsgs.INVALID_MODULE_REF, modulename.getLocalPart()));
private void buildExcutionChains(int type, OperationDescription operation) throws AxisFault, PhaseException { ArrayList allHandlers = new ArrayList(); ModuleDescription module; Flow flow = null; /////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// Handlers from axis2.xml from modules///////////////////////// ArrayList modulqnames = (ArrayList) ((AxisConfigurationImpl) axisConfig).getEngadgedModules(); for (int i = 0; i < modulqnames.size(); i++) { QName modulename = (QName) modulqnames.get(i); module = axisConfig.getModule(modulename); if (module != null) { switch (type) { case PhaseMetadata.IN_FLOW: { flow = module.getInFlow(); break; } case PhaseMetadata.OUT_FLOW: { flow = module.getOutFlow(); break; } case PhaseMetadata.FAULT_IN_FLOW: { flow = module.getFaultInFlow(); break; } case PhaseMetadata.FAULT_OUT_FLOW: { flow = module.getFaultOutFlow(); break; } } axisService.addToEngagModuleList(module); operation.addToEngageModuleList(module); } else { throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_REF, modulename.getLocalPart())); } if (flow != null) { for (int j = 0; j < flow.getHandlerCount(); j++) { HandlerDescription metadata = flow.getHandler(j); if (!PhaseValidator.isSystemPhases(metadata.getRules().getPhaseName())) { allHandlers.add(metadata); } else { /** *This handler is trying to added to system pre defined phases , but those handlers * are already added to global chain which run irrespective of the service * */ } } } } /////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// SERVICE HANDLERS /////////////////////////////////////////////// switch (type) { case PhaseMetadata.IN_FLOW: { flow = axisService.getInFlow(); break; } case PhaseMetadata.OUT_FLOW: { flow = axisService.getOutFlow(); break; } case PhaseMetadata.FAULT_IN_FLOW: { flow = axisService.getFaultInFlow(); break; } case PhaseMetadata.FAULT_OUT_FLOW: { flow = axisService.getFaultOutFlow(); break; } } if (flow != null) { for (int j = 0; j < flow.getHandlerCount(); j++) { HandlerDescription metadata = flow.getHandler(j); // todo change this in properway if (metadata.getRules().getPhaseName().equals("")) { throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.PHASE_DOES_NOT_SPECIFED, metadata.getName().getLocalPart())); } allHandlers.add(metadata); } } switch (type) { case PhaseMetadata.IN_FLOW: { phaseHolder = new PhaseHolder(operation.getRemainingPhasesInFlow()); break; } case PhaseMetadata.OUT_FLOW: { phaseHolder = new PhaseHolder(operation.getPhasesOutFlow()); break; } case PhaseMetadata.FAULT_IN_FLOW: { phaseHolder = new PhaseHolder(operation.getPhasesInFaultFlow()); break; } case PhaseMetadata.FAULT_OUT_FLOW: { phaseHolder = new PhaseHolder(operation.getPhasesOutFaultFlow()); break; } } for (int i = 0; i < allHandlers.size(); i++) { HandlerDescription handlerMetaData = (HandlerDescription) allHandlers.get(i); phaseHolder.addHandler(handlerMetaData); } }
49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/ddff83d04abb3b7ae94c859a119c30dc509353fa/PhaseResolver.java/clean/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 1361, 29924, 1421, 15945, 12, 474, 618, 16, 4189, 3291, 1674, 13, 5411, 1216, 15509, 7083, 16, 19459, 503, 288, 3639, 2407, 777, 6919, 273, 394, 2407, 5621, 3639, 5924, 3291, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1361, 29924, 1421, 15945, 12, 474, 618, 16, 4189, 3291, 1674, 13, 5411, 1216, 15509, 7083, 16, 19459, 503, 288, 3639, 2407, 777, 6919, 273, 394, 2407, 5621, 3639, 5924, 3291, 1...
IRunnableWithProgress r= createSaveEditorOperation(dialog.getResult(), elements, unsavedEditors);
IEditorPart[] unsavedEditorArray= (IEditorPart[]) unsavedEditors.toArray(new IEditorPart[unsavedEditors.size()]); IRunnableWithProgress r= createSaveEditorOperation(dialog.getResult(), unsavedEditorArray);
private static boolean ensureSaved(List elements, String actionName) { List unsavedEditors= new ArrayList(); List unsavedElements= new ArrayList(); collectUnsavedEditors(elements, unsavedEditors, unsavedElements); if (unsavedEditors.isEmpty()) return true; ListSelectionDialog dialog = createUnsavedEditorDialog(unsavedElements); if (dialog.open() != dialog.OK) return false; IRunnableWithProgress r= createSaveEditorOperation(dialog.getResult(), elements, unsavedEditors); try { new ProgressMonitorDialog(JavaPlugin.getActiveWorkbenchShell()).run(false, false, r); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, actionName, ReorgMessages.getString("ReorgAction.exception.saving")); //$NON-NLS-1$ return false; } catch (InterruptedException e) { } return true; }
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/a7cff8c167f47eeb350d9a9e65086e145f927233/ReorgDestinationAction.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1250, 3387, 16776, 12, 682, 2186, 16, 514, 15451, 13, 288, 202, 202, 682, 640, 14077, 4666, 1383, 33, 394, 2407, 5621, 202, 202, 682, 640, 14077, 3471, 33, 394, 2407, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 1250, 3387, 16776, 12, 682, 2186, 16, 514, 15451, 13, 288, 202, 202, 682, 640, 14077, 4666, 1383, 33, 394, 2407, 5621, 202, 202, 682, 640, 14077, 3471, 33, 394, 2407, 56...
if (resource.getType() == IResource.FILE) writeFile((IFile) resource, destinationPath); else {
if (resource.getType() == IResource.FILE) { writeFile((IFile) resource, destinationPath); } else {
protected void writeResource(IResource resource, IPath destinationPath) throws CoreException, IOException { if (resource.getType() == IResource.FILE) writeFile((IFile) resource, destinationPath); else { createFolder(destinationPath); writeChildren((IContainer) resource, destinationPath); } }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/FileSystemExporter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/FileSystemExporter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1045, 1420, 12, 45, 1420, 1058, 16, 467, 743, 30617, 13, 5411, 1216, 30015, 16, 1860, 288, 3639, 309, 261, 3146, 18, 588, 559, 1435, 422, 467, 1420, 18, 3776, 13, 5411, 13286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 1420, 12, 45, 1420, 1058, 16, 467, 743, 30617, 13, 5411, 1216, 30015, 16, 1860, 288, 3639, 309, 261, 3146, 18, 588, 559, 1435, 422, 467, 1420, 18, 3776, 13, 5411, 13286...
target = (WikiWord)getViewer().getInput();
target = (WikiWord) getViewer().getInput();
public boolean performDrop( Object obj ) { WikiWord target = (WikiWord)getCurrentTarget(); if( target != null ) { int loc = getCurrentLocation(); if( loc == LOCATION_BEFORE || loc == LOCATION_AFTER ) { log.debug( "Inserting object, getting parent word" ); target = target.getParent(); } } if( target == null ) { target = (WikiWord)getViewer().getInput(); } log.debug( "Target is : " + target.getName() ); WikiWord[] toDrop = (WikiWord[])obj; TreeViewer viewer = (TreeViewer)getViewer(); for( int i = 0; i < toDrop.length; ++i ) { if( toDrop[i].equals( target ) || target.hasParent( toDrop[i] ) ) { return false; } } for( int i = 0; i < toDrop.length; ++i ) { log.debug( "Processing word : " + toDrop[i].getName() ); log.debug( "Adding new word (" + toDrop[i].getName() + ") to word : " + target.getName() ); int index = determineIndex(); if( index == -1 ) { log.debug( "Adding word" ); target.addWikiWord( toDrop[i] ); } else { log.debug( "Adding word at index : " + index ); target.addWikiWord( toDrop[i], index ); } viewer.reveal( toDrop[i] ); } return true; }
12748 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12748/0d5f2da32438c01e3eb65780f8b3ce95cf079c38/WikiWordTreeDropAdapter.java/buggy/trunk/src/java/org/outerrim/snippad/ui/swt/dnd/WikiWordTreeDropAdapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 3073, 7544, 12, 1033, 1081, 262, 288, 3639, 28268, 3944, 1018, 273, 261, 25438, 3944, 13, 588, 3935, 2326, 5621, 3639, 309, 12, 1018, 480, 446, 262, 288, 5411, 509, 1515, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 3073, 7544, 12, 1033, 1081, 262, 288, 3639, 28268, 3944, 1018, 273, 261, 25438, 3944, 13, 588, 3935, 2326, 5621, 3639, 309, 12, 1018, 480, 446, 262, 288, 5411, 509, 1515, 273,...
_t = __t1067; _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp917_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case FONT: { AST __t1068 = _t;
_t = __t1072; _t = _t.getNextSibling(); break; } case IMAGEDOWN: { AST __t1073 = _t;
public final void definebuttonstate(AST _t) throws RecognitionException { AST definebuttonstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1063 = _t; AST tmp910_AST_in = (AST)_t; match(_t,DEFINE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case NEW: case SHARED: { def_shared(_t); _t = _retTree; break; } case BUTTON: case PRIVATE: case PUBLIC: case PROTECTED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case PRIVATE: case PUBLIC: case PROTECTED: { def_visib(_t); _t = _retTree; break; } case BUTTON: { break; } default: { throw new NoViableAltException(_t); } } } AST tmp911_AST_in = (AST)_t; match(_t,BUTTON); _t = _t.getNextSibling(); AST tmp912_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); { _loop1087: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case AUTOGO: { AST tmp913_AST_in = (AST)_t; match(_t,AUTOGO); _t = _t.getNextSibling(); break; } case AUTOENDKEY: { AST tmp914_AST_in = (AST)_t; match(_t,AUTOENDKEY); _t = _t.getNextSibling(); break; } case DEFAULT: { AST tmp915_AST_in = (AST)_t; match(_t,DEFAULT); _t = _t.getNextSibling(); break; } case BGCOLOR: case DCOLOR: case FGCOLOR: case PFCOLOR: { color_expr(_t); _t = _retTree; break; } case CONTEXTHELPID: { AST __t1067 = _t; AST tmp916_AST_in = (AST)_t; match(_t,CONTEXTHELPID); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1067; _t = _t.getNextSibling(); break; } case DROPTARGET: { AST tmp917_AST_in = (AST)_t; match(_t,DROPTARGET); _t = _t.getNextSibling(); break; } case FONT: { AST __t1068 = _t; AST tmp918_AST_in = (AST)_t; match(_t,FONT); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1068; _t = _t.getNextSibling(); break; } case IMAGEDOWN: { AST __t1069 = _t; AST tmp919_AST_in = (AST)_t; match(_t,IMAGEDOWN); _t = _t.getFirstChild(); { int _cnt1071=0; _loop1071: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_14.member(_t.getType()))) { imagephrase_opt(_t); _t = _retTree; } else { if ( _cnt1071>=1 ) { break _loop1071; } else {throw new NoViableAltException(_t);} } _cnt1071++; } while (true); } _t = __t1069; _t = _t.getNextSibling(); break; } case IMAGE: { AST __t1072 = _t; AST tmp920_AST_in = (AST)_t; match(_t,IMAGE); _t = _t.getFirstChild(); { int _cnt1074=0; _loop1074: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_14.member(_t.getType()))) { imagephrase_opt(_t); _t = _retTree; } else { if ( _cnt1074>=1 ) { break _loop1074; } else {throw new NoViableAltException(_t);} } _cnt1074++; } while (true); } _t = __t1072; _t = _t.getNextSibling(); break; } case IMAGEUP: { AST __t1075 = _t; AST tmp921_AST_in = (AST)_t; match(_t,IMAGEUP); _t = _t.getFirstChild(); { int _cnt1077=0; _loop1077: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_14.member(_t.getType()))) { imagephrase_opt(_t); _t = _retTree; } else { if ( _cnt1077>=1 ) { break _loop1077; } else {throw new NoViableAltException(_t);} } _cnt1077++; } while (true); } _t = __t1075; _t = _t.getNextSibling(); break; } case IMAGEINSENSITIVE: { AST __t1078 = _t; AST tmp922_AST_in = (AST)_t; match(_t,IMAGEINSENSITIVE); _t = _t.getFirstChild(); { int _cnt1080=0; _loop1080: do { if (_t==null) _t=ASTNULL; if ((_tokenSet_14.member(_t.getType()))) { imagephrase_opt(_t); _t = _retTree; } else { if ( _cnt1080>=1 ) { break _loop1080; } else {throw new NoViableAltException(_t);} } _cnt1080++; } while (true); } _t = __t1078; _t = _t.getNextSibling(); break; } case MOUSEPOINTER: { AST __t1081 = _t; AST tmp923_AST_in = (AST)_t; match(_t,MOUSEPOINTER); _t = _t.getFirstChild(); expression(_t); _t = _retTree; _t = __t1081; _t = _t.getNextSibling(); break; } case COLUMNLABEL: case LABEL: { label_constant(_t); _t = _retTree; break; } case LIKE: { AST __t1082 = _t; AST tmp924_AST_in = (AST)_t; match(_t,LIKE); _t = _t.getFirstChild(); field(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case VALIDATE: { AST tmp925_AST_in = (AST)_t; match(_t,VALIDATE); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1082; _t = _t.getNextSibling(); break; } case FLATBUTTON: { AST tmp926_AST_in = (AST)_t; match(_t,FLATBUTTON); _t = _t.getNextSibling(); break; } case NOFOCUS: { AST __t1084 = _t; AST tmp927_AST_in = (AST)_t; match(_t,NOFOCUS); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case FLATBUTTON: { AST tmp928_AST_in = (AST)_t; match(_t,FLATBUTTON); _t = _t.getNextSibling(); break; } case 3: { break; } default: { throw new NoViableAltException(_t); } } } _t = __t1084; _t = _t.getNextSibling(); break; } case NOCONVERT3DCOLORS: { AST tmp929_AST_in = (AST)_t; match(_t,NOCONVERT3DCOLORS); _t = _t.getNextSibling(); break; } case TOOLTIP: { tooltip_expr(_t); _t = _retTree; break; } case SIZE: case SIZECHARS: case SIZEPIXELS: { sizephrase(_t); _t = _retTree; { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case MARGINEXTRA: { AST tmp930_AST_in = (AST)_t; match(_t,MARGINEXTRA); _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case AUTOENDKEY: case AUTOGO: case BGCOLOR: case COLUMNLABEL: case CONTEXTHELPID: case DCOLOR: case DEFAULT: case DROPTARGET: case FGCOLOR: case FLATBUTTON: case FONT: case IMAGE: case IMAGEDOWN: case IMAGEINSENSITIVE: case IMAGEUP: case LABEL: case LIKE: case MOUSEPOINTER: case NOCONVERT3DCOLORS: case NOFOCUS: case PFCOLOR: case SIZE: case SIZECHARS: case SIZEPIXELS: case TOOLTIP: case TRIGGERS: { break; } default: { throw new NoViableAltException(_t); } } } break; } default: { break _loop1087; } } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case TRIGGERS: { triggerphrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1063; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 4426, 5391, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 4426, 5391, 2019, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 4426, 5391, 2019, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 4426, 5391, 2019, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 29...
if (titleLabel == null) return; String title = newTitle; if (title == null) title = ""; titleLabel.setText(title); }
if (titleLabel == null) return; String title = newTitle; if (title == null) title = ""; titleLabel.setText(title); }
public void setTitle(String newTitle) { if (titleLabel == null) return; String title = newTitle; if (title == null) title = "";//$NON-NLS-1$ titleLabel.setText(title);}
58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/b55db1f8df03ebade4e59f55f97c8c3917057362/TitleAreaDialog.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 918, 14109, 12, 780, 394, 4247, 13, 288, 202, 430, 261, 2649, 2224, 422, 446, 13, 202, 202, 2463, 31, 202, 780, 2077, 273, 394, 4247, 31, 202, 430, 261, 2649, 422, 446, 13, 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, 1071, 918, 14109, 12, 780, 394, 4247, 13, 288, 202, 430, 261, 2649, 2224, 422, 446, 13, 202, 202, 2463, 31, 202, 780, 2077, 273, 394, 4247, 31, 202, 430, 261, 2649, 422, 446, 13, 202, 202,...
if (obj == null || obj == Undefined.instance) { String property = (s != null) ? s : Integer.toString(index); throw NativeGlobal.undefWriteError(obj, property, value, scope); }
public static Object setElem(Object obj, Object id, Object value, Scriptable scope) { int index; String s; if (id instanceof Number) { double d = ((Number) id).doubleValue(); index = (int) d; s = ((double) index) == d ? null : toString(id); } else { s = (id instanceof String) ? (String)id : toString(id); long indexTest = indexFromString(s); if (indexTest >= 0) { index = (int)indexTest; s = null; } else { index = 0; } } Scriptable start; try { start = (Scriptable) obj; } catch (ClassCastException e) { start = toObject(scope, obj); } if (s != null) { return setStrIdElem(start, s, value, scope); } else { return setElem(start, index, value); } }
19042 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19042/c4dd782ec5125211722e4c90cdb02970d9fa9f6a/ScriptRuntime.java/clean/src/org/mozilla/javascript/ScriptRuntime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 2603, 422, 446, 747, 1081, 422, 22243, 18, 1336, 13, 288, 514, 1272, 273, 261, 87, 480, 446, 13, 692, 272, 294, 2144, 18, 10492, 12, 1615, 1769, 604, 16717, 5160, 18, 318, 536, 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, 309, 261, 2603, 422, 446, 747, 1081, 422, 22243, 18, 1336, 13, 288, 514, 1272, 273, 261, 87, 480, 446, 13, 692, 272, 294, 2144, 18, 10492, 12, 1615, 1769, 604, 16717, 5160, 18, 318, 536, 3...
public boolean process( IResultObject resultObject, int rowIndex ) throws DataException { logger.entering( ComputedColumnHelper.class.getName( ), "process" ); assert resultObject != null; IResultClass resultClass = resultObject.getResultClass( ); if ( isPrepared == false ) prepare( resultClass ); if ( columnExprArray.length == 0 ) { logger.exiting( ComputedColumnHelper.class.getName( ), "process" ); return true; } dataSet.setRowObject( resultObject, true ); dataSet.setCurrentRowIndex( rowIndex ); Context cx = Context.enter( ); try { for ( int i = 0; i < columnExprArray.length; i++ ) { if ( columnExprArray[i] != null ) { Object value = null; if ( columnExprArray[i].getHandle() != null) value = ((CompiledExpression)columnExprArray[i].getHandle()).evaluate(cx, dataSet.getScriptScope() ); else value = ScriptEvalUtil.evaluateJSAsExpr( cx, dataSet.getJSDataSetObject(), ((IScriptExpression)columnExprArray[i]).getText(), "ComputedColumn", 0 ); try { value = DataTypeUtil.convert( value, resultClass.getFieldValueClass( columnIndexArray[i] ) ); } catch ( BirtException e ) { String fieldName = resultClass.getFieldName( columnIndexArray[i] ); if( fieldName != null && fieldName.startsWith("_{$TEMP_")) { throw new DataException( ResourceConstants.WRONG_DATA_TYPE_SCRIPT_RESULT, new Object[]{ resultClass.getFieldValueClass( columnIndexArray[i] ).getName( ), value.toString( ), } ); } throw new DataException( ResourceConstants.WRONG_DATA_TYPE_COMPUTED_COLUMN, new Object[]{ resultClass.getFieldName( columnIndexArray[i] ), resultClass.getFieldValueClass( columnIndexArray[i] ) .getName( ), value.toString( ), } ); } resultObject.setCustomFieldValue( columnIndexArray[i], value ); } else { throw new DataException( ResourceConstants.EXPR_INVALID_COMPUTED_COLUMN, resultObject.getResultClass( ) .getFieldName( columnIndexArray[i] ) ); } } } finally { Context.exit( ); } logger.exiting( ComputedColumnHelper.class.getName( ), "process" ); return true;
public boolean process(IResultObject resultObject, int rowIndex) throws DataException { if( this.getCurrentInstance()!=null) return this.getCurrentInstance().process(resultObject, rowIndex); else return true;
public boolean process( IResultObject resultObject, int rowIndex ) throws DataException { logger.entering( ComputedColumnHelper.class.getName( ), "process" ); assert resultObject != null; IResultClass resultClass = resultObject.getResultClass( ); if ( isPrepared == false ) prepare( resultClass ); // check if no computed columns are found as custom fields in the result // set if ( columnExprArray.length == 0 ) { logger.exiting( ComputedColumnHelper.class.getName( ), "process" ); return true; // done } // bind new object to row script object dataSet.setRowObject( resultObject, true ); dataSet.setCurrentRowIndex( rowIndex ); // now assign the computed value to each of its projected computed // columns Context cx = Context.enter( ); try { // iterate through each projected computed column, // and assign it the computed value for ( int i = 0; i < columnExprArray.length; i++ ) { if ( columnExprArray[i] != null ) { Object value = null; if ( columnExprArray[i].getHandle() != null) value = ((CompiledExpression)columnExprArray[i].getHandle()).evaluate(cx, dataSet.getScriptScope() ); else value = ScriptEvalUtil.evaluateJSAsExpr( cx, dataSet.getJSDataSetObject(), ((IScriptExpression)columnExprArray[i]).getText(), "ComputedColumn", 0 ); try { value = DataTypeUtil.convert( value, resultClass.getFieldValueClass( columnIndexArray[i] ) ); } catch ( BirtException e ) { String fieldName = resultClass.getFieldName( columnIndexArray[i] ); if( fieldName != null && fieldName.startsWith("_{$TEMP_")) {// Data Type of computed column is not correct throw new DataException( ResourceConstants.WRONG_DATA_TYPE_SCRIPT_RESULT, new Object[]{ resultClass.getFieldValueClass( columnIndexArray[i] ).getName( ), value.toString( ), } ); } // Data Type of computed column is not correct throw new DataException( ResourceConstants.WRONG_DATA_TYPE_COMPUTED_COLUMN, new Object[]{ resultClass.getFieldName( columnIndexArray[i] ), resultClass.getFieldValueClass( columnIndexArray[i] ) .getName( ), value.toString( ), } ); } resultObject.setCustomFieldValue( columnIndexArray[i], value ); } else { throw new DataException( ResourceConstants.EXPR_INVALID_COMPUTED_COLUMN, resultObject.getResultClass( ) .getFieldName( columnIndexArray[i] ) ); } } } finally { Context.exit( ); } logger.exiting( ComputedColumnHelper.class.getName( ), "process" ); return true; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/83c61e18ec014b0a0d7683b4196d0a84fb37ac77/ComputedColumnHelper.java/clean/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ComputedColumnHelper.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1207, 12, 467, 1253, 921, 563, 921, 16, 509, 15361, 262, 1216, 1910, 503, 202, 95, 1082, 202, 4901, 18, 2328, 310, 12, 14169, 329, 1494, 2276, 18, 1106, 18, 17994, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 1207, 12, 467, 1253, 921, 563, 921, 16, 509, 15361, 262, 1216, 1910, 503, 202, 95, 1082, 202, 4901, 18, 2328, 310, 12, 14169, 329, 1494, 2276, 18, 1106, 18, 17994, 12, ...
java.sql.ResultSet rs = connection.ExecSQL("select typname from pg_type");
java.sql.ResultSet rs = connection.ExecSQL(null, "select typname from pg_type");
public java.sql.ResultSet getTypeInfo() throws SQLException { java.sql.ResultSet rs = connection.ExecSQL("select typname from pg_type"); if(rs!=null) { Field f[] = new Field[18]; ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); f[1] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); f[2] = new Field(connection, "PRECISION", iInt4Oid, 4); f[3] = new Field(connection, "LITERAL_PREFIX", iVarcharOid, 32); f[4] = new Field(connection, "LITERAL_SUFFIX", iVarcharOid, 32); f[5] = new Field(connection, "CREATE_PARAMS", iVarcharOid, 32); f[6] = new Field(connection, "NULLABLE", iInt2Oid, 2); f[7] = new Field(connection, "CASE_SENSITIVE", iBoolOid, 1); f[8] = new Field(connection, "SEARCHABLE", iInt2Oid, 2); f[9] = new Field(connection, "UNSIGNED_ATTRIBUTE", iBoolOid, 1); f[10] = new Field(connection, "FIXED_PREC_SCALE", iBoolOid, 1); f[11] = new Field(connection, "AUTO_INCREMENT", iBoolOid, 1); f[12] = new Field(connection, "LOCAL_TYPE_NAME", iVarcharOid, 32); f[13] = new Field(connection, "MINIMUM_SCALE", iInt2Oid, 2); f[14] = new Field(connection, "MAXIMUM_SCALE", iInt2Oid, 2); f[15] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); f[16] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); f[17] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); // cache some results, this will keep memory useage down, and speed // things up a little. byte b9[] = "9".getBytes(); byte b10[] = "10".getBytes(); byte bf[] = "f".getBytes(); byte bnn[] = Integer.toString(typeNoNulls).getBytes(); byte bts[] = Integer.toString(typeSearchable).getBytes(); while(rs.next()) { byte[][] tuple = new byte[18][]; String typname=rs.getString(1); tuple[0] = typname.getBytes(); tuple[1] = Integer.toString(Field.getSQLType(typname)).getBytes(); tuple[2] = b9; // for now tuple[6] = bnn; // for now tuple[7] = bf; // false for now - not case sensitive tuple[8] = bts; tuple[9] = bf; // false for now - it's signed tuple[10] = bf; // false for now - must handle money tuple[11] = bf; // false for now - handle autoincrement // 12 - LOCAL_TYPE_NAME is null // 13 & 14 ? // 15 & 16 are unused so we return null tuple[17] = b10; // everything is base 10 v.addElement(tuple); } rs.close(); return new ResultSet(connection, f, v, "OK", 1); } return null; }
46563 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46563/5383b5d8ed6da5c90bcbdb63401b7d1d75db563d/DatabaseMetaData.java/clean/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2252, 18, 4669, 18, 13198, 3130, 966, 1435, 1216, 6483, 225, 288, 565, 2252, 18, 4669, 18, 13198, 3597, 273, 1459, 18, 1905, 3997, 12, 2011, 16, 315, 4025, 3815, 529, 628, 7184, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2252, 18, 4669, 18, 13198, 3130, 966, 1435, 1216, 6483, 225, 288, 565, 2252, 18, 4669, 18, 13198, 3597, 273, 1459, 18, 1905, 3997, 12, 2011, 16, 315, 4025, 3815, 529, 628, 7184, 6...
assertEquals(expMeasuredBioAssayToMicroArrayAssay, translator.measuredBioAssayToMicroArrayAssay); System.out.println("assert4 expMeasuredBioAssayToMicroArrayAssay " + translator.measuredBioAssayToMicroArrayAssay);
public void testTranslateMicroArrayAssay() throws Exception{ Item srcItem1 = createSrcItem("DerivedBioAssay", "57_709", ""); srcItem1.addCollection(new ReferenceList("derivedBioAssayData", new ArrayList(Arrays.asList(new Object[]{"58_710"})))); srcItem1.addCollection(new ReferenceList("derivedBioAssayMap", new ArrayList(Arrays.asList(new Object[]{"1_1"})))); Item srcItem2 = createSrcItem("DerivedBioAssayData", "58_710", ""); srcItem2.addReference(new Reference("bioDataValues", "58_739")); Item srcItem3= createSrcItem("BioDataTuples", "58_739", ""); srcItem3.addCollection(new ReferenceList("bioAssayTupleData", new ArrayList(Arrays.asList(new Object[]{"58_740", "58_744"})))); Item srcItem4 = createSrcItem("Experiment", "61_748", ""); srcItem4.addCollection(new ReferenceList("bioAssays", new ArrayList(Arrays.asList(new Object[] {"57_709", "2_1", "2_2"})))); //{"57_709"})))); Item srcItem5 = createSrcItem("BioAssayMap", "1_1", ""); srcItem5.addCollection(new ReferenceList("sourceBioAssays", new ArrayList(Arrays.asList(new Object[]{"2_1", "2_2"})))); Item srcItem6 = createSrcItem("MeasuredBioAssay", "2_1", ""); Item srcItem61 = createSrcItem("MeasuredBioAssay", "2_2", ""); Set src = new HashSet(Arrays.asList(new Object[] {srcItem1, srcItem2, srcItem3, srcItem4, srcItem5, srcItem6, srcItem61})); Map srcMap = writeItems(src); MageDataTranslator translator = new MageDataTranslator(new MockItemReader(srcMap), mapping, srcModel, getTargetModel(tgtNs)); Item expItem1 = createTgtItem("MicroArrayAssay", "2_1", ""); expItem1.setReference("experiment", "-1_1"); Item expItem11 = createTgtItem("MicroArrayAssay", "2_2", ""); expItem11.setReference("experiment", "-1_1"); Item expItem2 = createTgtItem("MicroArrayExperiment", "-1_1", ""); HashSet expected=new HashSet(Arrays.asList(new Object[]{expItem1, expItem11, expItem2})); MockItemWriter tgtIw = new MockItemWriter(new LinkedHashMap()); translator.translate(tgtIw); assertEquals(expected, tgtIw.getItems()); System.out.println("assert1 tgtIw.getItems() " + tgtIw.getItems()); Set expAssays = new HashSet(); expAssays.add(expItem1); expAssays.add(expItem11); assertEquals(expAssays, translator.assays); System.out.println("assert2 expAssays " + translator.assays); // mage:BioAssayDatum to genomic:MicroArrayAssay Map expBioAssayDataToAssay = new HashMap(); expBioAssayDataToAssay.put("58_710", "57_709"); System.out.println("assert3 expBioAssayDataToAssay " + translator.bioAssayDataToAssay); assertEquals(expBioAssayDataToAssay, translator.bioAssayDataToAssay); Map expMeasuredBioAssayToMicroArrayAssay = new HashMap(); expMeasuredBioAssayToMicroArrayAssay.put("2_1", "57_709"); expMeasuredBioAssayToMicroArrayAssay.put("2_2", "57_709"); assertEquals(expMeasuredBioAssayToMicroArrayAssay, translator.measuredBioAssayToMicroArrayAssay); System.out.println("assert4 expMeasuredBioAssayToMicroArrayAssay " + translator.measuredBioAssayToMicroArrayAssay); }
7196 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7196/6ef2d89027f3ff144d8973382610259b8e6cdeec/MageDataTranslatorTest.java/clean/flymine/model/mage/src/test/org/flymine/dataconversion/MageDataTranslatorTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 12818, 13617, 1076, 2610, 528, 1435, 1216, 1185, 95, 3639, 4342, 1705, 1180, 21, 273, 752, 7740, 1180, 2932, 21007, 38, 1594, 2610, 528, 3113, 315, 10321, 67, 27, 5908, 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, 1842, 12818, 13617, 1076, 2610, 528, 1435, 1216, 1185, 95, 3639, 4342, 1705, 1180, 21, 273, 752, 7740, 1180, 2932, 21007, 38, 1594, 2610, 528, 3113, 315, 10321, 67, 27, 5908, 3...
1, M_INFERNO_IV ) );
1, M_INFERNO_IV, TechConstants.T_IS_LEVEL_2 ) );
public static void initializeTypes() { // Save copies of the SRM and LRM ammos to use to create munitions. Vector srmAmmos = new Vector(11); Vector clanSrmAmmos = new Vector(); Vector lrmAmmos = new Vector(26); Vector clanLrmAmmos = new Vector(); Vector acAmmos = new Vector(4); Vector arrowAmmos = new Vector(4); Vector artyAmmos = new Vector(6); Vector munitions = new Vector(); Enumeration baseTypes = null; Enumeration mutators = null; AmmoType base = null; MunitionMutator mutator = null; // all level 1 ammo EquipmentType.addType(createISVehicleFlamerAmmo()); EquipmentType.addType(createISMGAmmo()); EquipmentType.addType(createISMGAmmoHalf()); base = createISAC2Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC5Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC10Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISAC20Ammo(); acAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM5Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM10Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM15Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISLRM20Ammo(); lrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM2Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM4Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSRM6Ammo(); srmAmmos.addElement( base ); EquipmentType.addType( base ); // Start of Level2 Ammo EquipmentType.addType(createISLB2XAmmo()); EquipmentType.addType(createISLB5XAmmo()); EquipmentType.addType(createISLB10XAmmo()); EquipmentType.addType(createISLB20XAmmo()); EquipmentType.addType(createISLB2XClusterAmmo()); EquipmentType.addType(createISLB5XClusterAmmo()); EquipmentType.addType(createISLB10XClusterAmmo()); EquipmentType.addType(createISLB20XClusterAmmo()); EquipmentType.addType(createISUltra2Ammo()); EquipmentType.addType(createISUltra5Ammo()); EquipmentType.addType(createISUltra10Ammo()); EquipmentType.addType(createISUltra20Ammo()); EquipmentType.addType(createISRotary2Ammo()); EquipmentType.addType(createISRotary5Ammo()); EquipmentType.addType(createISGaussAmmo()); EquipmentType.addType(createISLTGaussAmmo()); EquipmentType.addType(createISHVGaussAmmo()); EquipmentType.addType(createISStreakSRM2Ammo()); EquipmentType.addType(createISStreakSRM4Ammo()); EquipmentType.addType(createISStreakSRM6Ammo()); EquipmentType.addType(createISMRM10Ammo()); EquipmentType.addType(createISMRM20Ammo()); EquipmentType.addType(createISMRM30Ammo()); EquipmentType.addType(createISMRM40Ammo()); EquipmentType.addType(createISRL10Ammo()); EquipmentType.addType(createISRL15Ammo()); EquipmentType.addType(createISRL20Ammo()); EquipmentType.addType(createISAMSAmmo()); EquipmentType.addType(createISNarcAmmo()); EquipmentType.addType(createISNarcExplosiveAmmo()); EquipmentType.addType(createISiNarcAmmo()); EquipmentType.addType(createISiNarcECMAmmo()); EquipmentType.addType(createISiNarcExplosiveAmmo()); EquipmentType.addType(createISiNarcHaywireAmmo()); EquipmentType.addType(createISiNarcNemesisAmmo()); base = createISLongTomAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createISSniperAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createISThumperAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createISArrowIVAmmo(); arrowAmmos.addElement( base ); EquipmentType.addType( base ); EquipmentType.addType(createCLLB2XAmmo()); EquipmentType.addType(createCLLB5XAmmo()); EquipmentType.addType(createCLLB10XAmmo()); EquipmentType.addType(createCLLB20XAmmo()); EquipmentType.addType(createCLLB2XClusterAmmo()); EquipmentType.addType(createCLLB5XClusterAmmo()); EquipmentType.addType(createCLLB10XClusterAmmo()); EquipmentType.addType(createCLLB20XClusterAmmo()); EquipmentType.addType(createCLUltra2Ammo()); EquipmentType.addType(createCLUltra5Ammo()); EquipmentType.addType(createCLUltra10Ammo()); EquipmentType.addType(createCLUltra20Ammo()); EquipmentType.addType(createCLRotary2Ammo()); EquipmentType.addType(createCLRotary5Ammo()); EquipmentType.addType(createCLRotary10Ammo()); EquipmentType.addType(createCLRotary20Ammo()); EquipmentType.addType(createCLGaussAmmo()); EquipmentType.addType(createCLStreakSRM1Ammo()); EquipmentType.addType(createCLStreakSRM2Ammo()); EquipmentType.addType(createCLStreakSRM3Ammo()); EquipmentType.addType(createCLStreakSRM4Ammo()); EquipmentType.addType(createCLStreakSRM5Ammo()); EquipmentType.addType(createCLStreakSRM6Ammo()); EquipmentType.addType(createCLVehicleFlamerAmmo()); EquipmentType.addType(createCLMGAmmo()); EquipmentType.addType(createCLMGAmmoHalf()); EquipmentType.addType(createCLHeavyMGAmmo()); EquipmentType.addType(createCLHeavyMGAmmoHalf()); EquipmentType.addType(createCLLightMGAmmo()); EquipmentType.addType(createCLLightMGAmmoHalf()); EquipmentType.addType(createCLAMSAmmo()); EquipmentType.addType(createCLNarcAmmo()); EquipmentType.addType(createCLNarcExplosiveAmmo()); EquipmentType.addType(createCLATM3Ammo()); EquipmentType.addType(createCLATM3ERAmmo()); EquipmentType.addType(createCLATM3HEAmmo()); EquipmentType.addType(createCLATM6Ammo()); EquipmentType.addType(createCLATM6ERAmmo()); EquipmentType.addType(createCLATM6HEAmmo()); EquipmentType.addType(createCLATM9Ammo()); EquipmentType.addType(createCLATM9ERAmmo()); EquipmentType.addType(createCLATM9HEAmmo()); EquipmentType.addType(createCLATM12Ammo()); EquipmentType.addType(createCLATM12ERAmmo()); EquipmentType.addType(createCLATM12HEAmmo()); EquipmentType.addType(createCLStreakLRM5Ammo()); EquipmentType.addType(createCLStreakLRM10Ammo()); EquipmentType.addType(createCLStreakLRM15Ammo()); EquipmentType.addType(createCLStreakLRM20Ammo()); base = createCLLongTomAmmo(); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSniperAmmo(); artyAmmos.addElement( base ); base = createCLThumperAmmo(); EquipmentType.addType( base ); artyAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLArrowIVAmmo(); arrowAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM1Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM2Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM3Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM4Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM5Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLSRM6Ammo(); clanSrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM1Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM2Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM3Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM4Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM5Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM6Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM7Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM8Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM9Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM10Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM11Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM12Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM13Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM14Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM15Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM16Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM17Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM18Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM19Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); base = createCLLRM20Ammo(); clanLrmAmmos.addElement( base ); EquipmentType.addType( base ); // Start of BattleArmor ammo EquipmentType.addType( createBASRM2Ammo() ); EquipmentType.addType( createBASRM2OSAmmo() ); EquipmentType.addType( createBAInfernoSRMAmmo() ); EquipmentType.addType( createBAAdvancedSRM2Ammo() ); EquipmentType.addType( createBAAdvancedSRM5Ammo() ); EquipmentType.addType( createBAMicroBombAmmo() ); EquipmentType.addType( createCLTorpedoLRM5Ammo() ); EquipmentType.addType( createFenrirSRM4Ammo() ); EquipmentType.addType( createBACompactNarcAmmo() ); EquipmentType.addType( createBAMineLauncherAmmo() ); EquipmentType.addType( createBALRM5Ammo() ); EquipmentType.addType( createPhalanxSRM4Ammo() ); EquipmentType.addType( createGrenadierSRM4Ammo() ); // Protomech-specific ammo EquipmentType.addType(createCLPROHeavyMGAmmo()); EquipmentType.addType(createCLPROMGAmmo()); EquipmentType.addType(createCLPROLightMGAmmo()); // Create the munition types for IS SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Inferno", 1, M_INFERNO, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc capable", 1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Acid", 1, M_AX_HEAD, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = srmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan SRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Inferno", 1, M_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Acid", 1, M_AX_HEAD, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanSrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for IS LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder", 1, M_THUNDER, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc capable", 1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm", 1, M_SWARM, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm-I", 1, M_SWARM_I, TechConstants.T_IS_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = lrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Clan LRM launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Fragmentation", 1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder", 1, M_THUNDER, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Augmented", 2, M_THUNDER_AUGMENTED, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Inferno", 2, M_THUNDER_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Active", 2, M_THUNDER_ACTIVE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb", 2, M_THUNDER_VIBRABOMB, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Narc capable", 1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm", 1, M_SWARM, TechConstants.T_CLAN_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Swarm-I", 1, M_SWARM_I, TechConstants.T_CLAN_LEVEL_2) ); munitions.addElement( new MunitionMutator( "Listen-Kill", 1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) ); munitions.addElement( new MunitionMutator( "Anti-TSM", 1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = clanLrmAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for AC rounds. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Precision", 2, M_PRECISION, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Armor-Piercing", 2, M_ARMOR_PIERCING, TechConstants.T_IS_LEVEL_2 ) ); munitions.addElement( new MunitionMutator( "Flechette", 1, M_FLECHETTE, TechConstants.T_IS_LEVEL_2 ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = acAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Arrow IV launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Homing", 1, M_HOMING ) ); munitions.addElement( new MunitionMutator( "FASCAM", 1, M_FASCAM ) ); munitions.addElement( new MunitionMutator( "Inferno-IV", 1, M_INFERNO_IV ) ); munitions.addElement( new MunitionMutator( "Vibrabomb-IV", 1, M_VIBRABOMB_IV ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = arrowAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // Create the munition types for Artillery launchers. munitions.removeAllElements(); munitions.addElement( new MunitionMutator( "Smoke", 1, M_SMOKE ) ); // Walk through both the base types and the // mutators, and create munition types. baseTypes = artyAmmos.elements(); while ( baseTypes.hasMoreElements() ) { base = (AmmoType) baseTypes.nextElement(); mutators = munitions.elements(); while ( mutators.hasMoreElements() ) { mutator = (MunitionMutator) mutators.nextElement(); EquipmentType.addType( mutator.createMunitionType( base ) ); } } // cache types that share a launcher for loadout purposes for (Enumeration e = EquipmentType.getAllTypes(); e.hasMoreElements(); ) { EquipmentType et = (EquipmentType)e.nextElement(); if (! (et instanceof AmmoType)) { continue; } AmmoType at = (AmmoType)et; int nType = at.getAmmoType(); if (m_vaMunitions[nType] == null) { m_vaMunitions[nType] = new Vector(); } m_vaMunitions[nType].addElement(at); } }
3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/bcbe03772fe4dc019c518be88169909b9a9baf4c/AmmoType.java/clean/megamek/src/megamek/common/AmmoType.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 4046, 2016, 1435, 288, 3639, 368, 7074, 13200, 434, 326, 348, 8717, 471, 511, 8717, 2125, 26719, 358, 999, 358, 752, 312, 318, 5029, 18, 3639, 5589, 272, 8864, 37, 7020, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4046, 2016, 1435, 288, 3639, 368, 7074, 13200, 434, 326, 348, 8717, 471, 511, 8717, 2125, 26719, 358, 999, 358, 752, 312, 318, 5029, 18, 3639, 5589, 272, 8864, 37, 7020, ...
public void testOASISMicrosoftConformanceSuite() throws IOException, ParsingException, XSLException { Builder builder = new Builder(); File base = new File("data/oasis-xslt-testsuite/TESTS/"); File catalog = new File(base, "catalog.xml"); // The test suite need to be installed separately. If we can't // find the catalog, we just don't run these tests. if (catalog.exists()) { Document doc = builder.build(catalog); Element testsuite = doc.getRootElement(); Elements submitters = testsuite.getChildElements("test-catalog"); Element submitter = submitters.get(1); Elements testcases = submitter.getChildElements("test-case"); for (int j = 0; j < testcases.size(); j++) { Element testcase = testcases.get(j); String id = testcase.getAttributeValue("id"); File root = new File(base, "MSFT_Conformance_Tests"); root = new File(root, testcase.getFirstChildElement("file-path").getValue()); File input = null; File style = null; File output = null; Element scenario = testcase.getFirstChildElement("scenario"); Elements inputs = scenario.getChildElements("input-file"); for (int k = 0; k < inputs.size(); k++) { Element file = inputs.get(k); String role = file.getAttributeValue("role"); if ("principal-data".equals(role)) { input = new File(root, file.getValue()); } else if ("principal-stylesheet".equals(role)) { style = new File(root, file.getValue()); } } // end for Elements outputs = scenario.getChildElements("output-file"); for (int k = 0; k < outputs.size(); k++) { Element file = outputs.get(k); String role = file.getAttributeValue("role"); if ("principal".equals(role)) { // Fix up OASIS catalog bugs File parent = new File(root.getParent()); parent = new File(parent, "REF_OUT"); parent = new File(parent, root.getName()); String outputFileName = file.getValue(); output = new File(parent, outputFileName); } } // end for try { Document styleDoc = builder.build(style); // XXX For the moment let's just skip all tests // that specify indent="yes" for the output; // we can fix this with special comparison later. if (indentYes(styleDoc)) continue; else if ("BVTs_bvt002".equals(id)) { // Xalan bug report????; continue; } else if ("BVTs_bvt041".equals(id) || "BVTs_bvt063".equals(id) || "BVTs_bvt070".equals(id)) { // Xalan does not recover from this error involving multiple // conflicting xsl:output at same import precedence continue; } Document inputDoc = builder.build(input); XSLTransform xform = new XSLTransform(styleDoc); Nodes result = xform.transform(inputDoc); if (output == null) { if ("Attributes__89463".equals(id) || "Attributes__89465".equals(id)) { // Processors are allowed to recover from // this problem. assertEquals(0, result.size()); } else if ("Attributes__89464".equals(id)) { // Processors are allowed to recover from // this problem. assertEquals(0, ((Element) result.get(0)).getAttributeCount()); } else if (id.startsWith("Errors_")) { // Processors are allowed to recover from // most of these problems. } else if (id.startsWith("FormatNumber")) { // Processors are allowed to recover from // most of these problems. } else if ("BVTs_bvt074".equals(id)) { // Processors are allowed to recover from // this problem. assertEquals(0, result.get(0).getChildCount()); } else if ("Attributes_Attribute_UseXmlnsNsAsNamespaceForAttribute".equals(id) || "Attributes_Attribute_UseXmlnsAsNamespaceForAttributeImplicitly".equals(id) || "Elements_Element_UseXslElementWithNameSpaceAttrEqualToXmlnsUri".equalsIgnoreCase(id) || "Elements_Element_UseXslElementWithNameSpaceEqualToXmlnsUri".equalsIgnoreCase(id) ) { // test follows namespace errata we don't accept } else if ("AttributeSets_RefToUndefinedAttributeSet".equals(id) || "Namespace__77665".equals(id) || "Namespace__77675".equals(id) ) { // I think the test case is wrong; I see // nothing in the spec that says this is // an error // XXX Verify and report } else if ("Variables__84633".equals(id) || "Variables__84634".equals(id) || "Variables__84697".equals(id) || "Variables__84710".equals(id) ) { // And error. See 11.4 // but are processors allowed to recover? // Hmm acording to section 17, the processor may signal these errors // and may but need not recover from them. // XXX Verify and report } else if ("Output__78176".equals(id) ) { // I think the test case is wrong; I see // nothing in the spec that says this is // an error // XXX Verify and report } else if (id.startsWith("XSLTFunctions__100")) { // I think the test case is wrong; I see // nothing in the spec that says this is // an error. These are all about the unparsed entity // function. // XXX Verify and report } else if ("Namespace__78027".equals(id)) { // XXX Possible Xalan bug; Verify and report } else if ("Output_Output_UseStandAloneAttributeWithMultipleRoots".equals(id)) { // Error only appears when document is serialized; // not before } else { // transform should have failed fail("Transformed " + style + "\n id: " + testcase.getAttributeValue("id")); } } else { try { if ("Attributes_xsl_attribute_dup_attr_with_namespace_conflict".equals(id)) { // I think this test case is wrong; // XXX document and report } else if ("BVTs_bvt041".equals(id)) { // I think this test case output is wrong; // XXX document and report } else if ("Comment_DisableOutputEscaping_XslTextInXslComment".equals(id)) { // I think this test case output is wrong; // XXX document and report } else if ("Output__77927".equals(id) || "Output__77927".equals(id) || "Output__77928".equals(id) || "Output__84304".equals(id) || "Output__84305".equals(id) || "Output__84312".equals(id) || "Output__84619".equals(id) || "Output__84620".equals(id) || "Output_EntityRefInAttribHtml".equals(id) ) { // I think this test case output is wrong; // XXX document and report } else if ("BVTs_bvt057".equals(id)) { // I think this test case requires remapping prefixes // so output isn't quite identical // XXX verify continue; } else if ("Output_DoctypePublicAndSystemAttribute".equals(id)) { // This test case uses non-URI system identifier // XXX possible Xerces bug and test suite bug; report verify continue; } else if ("Output_Modified84433".equals(id)) { // This test case uses disable output escaping // so the results don't match up continue; } else if ("Sorting_Sort_SortTextWithNonTextCharacters".equals(id)) { // Xalan and MSXML don't sort non alphabetic characters // exactly the same, but that's legal continue; } else if ("Text_DoeWithCdataInText".equals(id)) { // XXX explore further but I think this is an issue // with consecutive text nodes in result tree vs. // parsed tree continue; } else if ("Whitespaces__91434".equals(id) || "Whitespaces__91436".equals(id) || "Whitespaces__91442".equals(id) || "Whitespaces__91444".equals(id) || "Whitespaces__91446".equals(id) || "Whitespaces__91450".equals(id) ) { // XXX explore further; may be a Xalan bug continue; } else if ("AVTs__77591".equals(id) || "Copying_ResultTreeFragmentWithEscapedText".equals(id) || "Keys_MultipltKeysInclude".equals(id) || "Keys_PerfRepro3".equals(id) || "Number__84683".equals(id) || "Number__84687".equals(id) || "Number__84692".equals(id) || "Number__84694".equals(id) || "Number__84699".equals(id) || "Number__84700".equals(id) || "Number__84716".equals(id) || "Number__84717".equals(id) || "Number__84722".equals(id) || "Number__84723".equals(id) || "Number__84724".equals(id) || "Number__84725".equals(id) || "Number_NaNOrInvalidValue".equals(id) || "Number_ValueAsNodesetTest1".equals(id) || "Number_ValueAsEmptyNodeset".equals(id) ) { // XXX I don't understand what fails in these cases; figure it out // a lot of these are probably just differences in locales supported } else if (id.equals("XSLTFunctions_BooleanFunction")) { // I think the test case is wrong; or perhaps unspecified // XXX Verify and report } else if (id.equals("XSLTFunctions_TestIdFuncInComplexStruct")) { // I think the test case output white space is wrong; // XXX Verify and report } else { Document expectedResult = builder.build(output); Document actualResult = XSLTransform.toDocument(result); assertEquals("Mismatch with " + id, expectedResult, actualResult); } } // end try catch (ParsingException ex) { // a few of the test cases generate // text or HTML output rather than // well-formed XML. For the moment, I // just skip these; but could I compare // the raw text to the value of the // document object instead???? continue; } catch (IllegalAddException ex) { // A few of the test cases generate // incomplete documents so we can't // compare output. Perhaps I could // wrap in an element, then get children // to build a Node object rather than a // Document???? i.e. a fragment parser? // Could use a SequenceInputStream to hack this } } // end else } // end try catch (MalformedURIException ex) { // several stylesheets use relative namespace URIs XOM // does not support; skip the test } catch (FileNotFoundException ex) { // The catalog doesn't always match what's on disk } catch (UnknownHostException ex) { // A few tests like ProcessingInstruction__78197 // point to external DTD subsets that can't be loaded } catch (ParsingException ex) { String operation = scenario.getAttributeValue("operation"); if (!"execution-error".equals(operation)) { if ("Namespace_XPath_PredefinedPrefix_XML".equals(id)) { // XXX double check // uses relative namespace URIs } else if ("Sorting__78191".equals(id) || "Text__78245".equals(id) || "Text__78273".equals(id) || "Text__78281".equals(id) ) { // binds XML namespace to prefix other than xml } else { System.err.println(id + ": " + ex.getMessage()); throw ex; } } } catch (XSLException ex) { // If the output was null the transformation // was expected to fail if (output != null) { Throwable cause = ex.getCause(); if ("Attributes__81487".equals(id) || "Attributes__81551".equals(id)) { // spec inconsistency; see // http://lists.w3.org/Archives/Public/xsl-editors/2004JulSep/0003.html continue; } else if (cause instanceof MissingResourceException) { // XXX Number__84705 is either a Xalan bug or a problem with your Xalan jar file // fix either way } else if ("Include_Include_IncludedStylesheetShouldHaveDifferentBaseUri".equals(id) || "Include_RelUriTest1".equals(id) || "Include_RelUriTest2".equals(id) || "Include_RelUriTest3".equals(id) || "Include_RelUriTest4".equals(id) || "Include_RelUriTest5".equals(id) || "Include_RelUriTest6".equals(id) ) { // I think this test case is wrong; Uses backslash in URI // XXX verify, document and report } else if ("Elements__89070".equals(id)) { // bug fixed in later versions of Xalan } else if ("Namespace-alias_Namespace-Alias_NSAliasForDefaultWithExcludeResPref".equals(id)) { // I think this test case is wrong; // XXX verify, document and report } else if ("Variables_VariableWithinVariable".equals(id) ) { // Xalan does not recover from this one } else if ("BVTs_bvt054".equals(id) || "BVTs_bvt094".equals(id)) { // I think this test case output is wrong; // XXX document and report continue; } else if ("Output__78177".equals(id) || "Output__84009".equals(id)) { // Xalan does not recover from this error // which involves duplicate and possibly conflicting xsl:output elements continue; } else if ("Comment_Comment_CDATAWithSingleHyphen".equals(id) || "Comment_Comment_DoubleHypenEntitywithDelCharacter".equals(id) || "Comment_Comment_LineOfAllHyphens".equals(id) || "Comment_Comment_SingleHyphenOnly".equals(id) || "Comment_Comment_DoubleHyphenONLY".equals(id)) { // Begins comment data with hyphen, which XOM doesn't allow continue; } else if ("ProcessingInstruction_ValueOfandTextWithDoeInProcInstr".equals(id)) { // Begins processing instruction data with white space, which XOM doesn't allow continue; } else if ("Elements__89716".equals(id) || "Elements__89717".equals(id) || "Elements__89718".equals(id) || "Output__84309".equals(id) || "Namespace__77670".equals(id)) { // Xalan doesn't recover from these, though recovery is allowed continue; } else if ("Output__84306".equals(id)) { // XXX I think this one's a Xalan bug; report it continue; } else if (cause != null && cause instanceof MalformedURIException) { // Some of the tests generate relative namespace URIs // XOM doesn't support continue; } else { System.err.println(id + ": " + ex.getMessage()); System.err.println("in " + style); if (cause != null) { System.err.println("cause: " + cause.getMessage()); } throw ex; } } } // end catch catch (XMLException ex) { if ("Text_modified78309".equals(id)) { // output is not a full document } else { System.err.println(id); throw ex; } } } // end for } // end if }
626 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/626/627001233580f0d13f1ba7ec0e7d617a2ba2af30/XSLTransformTest.java/clean/src/nu/xom/tests/XSLTransformTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 28202, 2320, 7303, 4616, 9269, 442, 687, 1359, 13587, 1435, 3639, 1216, 1860, 16, 19761, 503, 16, 17243, 503, 288, 7734, 5008, 2089, 273, 394, 5008, 5621, 3639, 1387, 1026,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 28202, 2320, 7303, 4616, 9269, 442, 687, 1359, 13587, 1435, 3639, 1216, 1860, 16, 19761, 503, 16, 17243, 503, 288, 7734, 5008, 2089, 273, 394, 5008, 5621, 3639, 1387, 1026,...
if(shell != null && shell.isDisposed())
if(shell != null && shell.isDisposed()) {
private void runAsync(final Runnable runnable) { if (alreadyClosed) return; Shell currentShell = getShell(); Display display; if (currentShell == null) display = Display.getDefault(); else display = currentShell.getDisplay(); display.asyncExec(new Runnable(){ /* (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { if (alreadyClosed) return;//Check again as the async may come too late Shell shell = getShell(); if(shell != null && shell.isDisposed()) return; runnable.run(); } }); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/ProgressMonitorFocusJobDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressMonitorFocusJobDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1875, 202, 1152, 918, 1086, 2771, 12, 6385, 10254, 14685, 13, 288, 9506, 202, 430, 261, 17583, 7395, 13, 6862, 202, 2463, 31, 9506, 202, 13220, 783, 13220, 273, 7932, 1165, 5621, 9506, 202, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1152, 918, 1086, 2771, 12, 6385, 10254, 14685, 13, 288, 9506, 202, 430, 261, 17583, 7395, 13, 6862, 202, 2463, 31, 9506, 202, 13220, 783, 13220, 273, 7932, 1165, 5621, 9506, 202, 42...
default: passDown(evt); break;
default: passDown(evt); break;
public void down(Event evt) { Message msg; long time_to_wait, start_time; switch(evt.getType()) { case Event.FIND_INITIAL_MBRS: // sent by GMS layer, pass up a GET_MBRS_OK event initial_members.removeAllElements(); msg=new Message(null, null, null); msg.putHeader(getName(), new PingHeader(PingHeader.GET_MBRS_REQ, null)); synchronized(members) { for(Iterator it=initial_hosts.iterator(); it.hasNext();) { Address addr=(Address)it.next(); if(members.contains(addr)) { ; // continue; // changed as suggested by Mark Kopec } msg.setDest(addr); if(log.isTraceEnabled()) log.trace("[FIND_INITIAL_MBRS] sending PING request to " + msg.getDest()); passDown(new Event(Event.MSG, msg.copy())); } } // 2. Wait 'timeout' ms or until 'num_initial_members' have been retrieved synchronized(initial_members) { start_time=System.currentTimeMillis(); time_to_wait=timeout; while(initial_members.size() < num_initial_members && time_to_wait > 0) { try { initial_members.wait(time_to_wait); } catch(Exception e) { } time_to_wait-=System.currentTimeMillis() - start_time; } } if(log.isTraceEnabled()) log.trace("[FIND_INITIAL_MBRS] initial members are " + initial_members); // 3. Send response passUp(new Event(Event.FIND_INITIAL_MBRS_OK, initial_members)); break; case Event.TMP_VIEW: case Event.VIEW_CHANGE: Vector tmp; if((tmp=((View)evt.getArg()).getMembers()) != null) { synchronized(members) { members.clear(); members.addAll(tmp); members_set.clear(); members_set.addAll(tmp); } } passDown(evt); break; case Event.BECOME_SERVER: // called after client has joined and is fully working group member passDown(evt); is_server=true; break; case Event.CONNECT: group_addr=(String) evt.getArg(); passDown(evt); break; case Event.DISCONNECT: passDown(evt); break; default: passDown(evt); // Pass on to the layer below us break; } }
50160 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50160/ed05366cfa88294bcc8bfb8d8526d444ee01d3fb/TCPPING.java/buggy/src/org/jgroups/protocols/TCPPING.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 2588, 12, 1133, 6324, 13, 288, 3639, 2350, 1234, 31, 3639, 1525, 813, 67, 869, 67, 7048, 16, 787, 67, 957, 31, 3639, 1620, 12, 73, 11734, 18, 588, 559, 10756, 288, 5411, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2588, 12, 1133, 6324, 13, 288, 3639, 2350, 1234, 31, 3639, 1525, 813, 67, 869, 67, 7048, 16, 787, 67, 957, 31, 3639, 1620, 12, 73, 11734, 18, 588, 559, 10756, 288, 5411, 64...
return IDREFDatatypeValidator.IDREF_STORE; }
return IDREFDatatypeValidator.IDREF_STORE; }
public int getDatatypeState(){ return IDREFDatatypeValidator.IDREF_STORE; }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/b36768aae85d6d13bc8c8289ca78efb212c8fb8f/XMLValidator.java/buggy/src/org/apache/xerces/validators/common/XMLValidator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 509, 565, 24211, 6361, 1119, 1435, 95, 5411, 327, 1599, 10771, 20228, 5126, 18, 734, 10771, 67, 13651, 31, 3639, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 509, 565, 24211, 6361, 1119, 1435, 95, 5411, 327, 1599, 10771, 20228, 5126, 18, 734, 10771, 67, 13651, 31, 3639, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if (pageName == null)
if (pageName == null) {
private IStatus unableToRestorePage(IMemento pageMem) { String pageName = pageMem.getString(IWorkbenchConstants.TAG_LABEL); if (pageName == null) pageName = ""; //$NON-NLS-1$ return new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, NLS.bind( WorkbenchMessages.WorkbenchWindow_unableToRestorePerspective, pageName), null); }
57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/WorkbenchWindow.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 467, 1482, 13496, 774, 10874, 1964, 12, 3445, 820, 83, 1363, 3545, 13, 288, 202, 202, 780, 30398, 273, 1363, 3545, 18, 588, 780, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 1354...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 1482, 13496, 774, 10874, 1964, 12, 3445, 820, 83, 1363, 3545, 13, 288, 202, 202, 780, 30398, 273, 1363, 3545, 18, 588, 780, 12, 45, 2421, 22144, 2918, 18, 7927, 67, 1354...
log.debug("print directly");
log.info("print directly");
private void dumpConfiguration() { log.debug("Input mode: "); switch (inputmode) { case NOT_SET: log.debug("not set"); break; case FO_INPUT: log.debug("FO "); log.debug("fo input file: " + fofile.toString()); break; case XSLT_INPUT: log.debug("xslt transformation"); log.debug("xml input file: " + xmlfile.toString()); log.debug("xslt stylesheet: " + xsltfile.toString()); break; default: log.debug("unknown input type"); } log.debug("Output mode: "); switch (outputmode) { case NOT_SET: log.debug("not set"); break; case PDF_OUTPUT: log.debug("pdf"); log.debug("output file: " + outfile.toString()); break; case AWT_OUTPUT: log.debug("awt on screen"); if (outfile != null) { log.error("awt mode, but outfile is set:"); log.debug("out file: " + outfile.toString()); } break; case MIF_OUTPUT: log.debug("mif"); log.debug("output file: " + outfile.toString()); break; case RTF_OUTPUT: log.debug("rtf"); log.debug("output file: " + outfile.toString()); break; case PRINT_OUTPUT: log.debug("print directly"); if (outfile != null) { log.error("print mode, but outfile is set:"); log.error("out file: " + outfile.toString()); } break; case PCL_OUTPUT: log.debug("pcl"); log.debug("output file: " + outfile.toString()); break; case PS_OUTPUT: log.debug("PostScript"); log.debug("output file: " + outfile.toString()); break; case TXT_OUTPUT: log.debug("txt"); log.debug("output file: " + outfile.toString()); break; case SVG_OUTPUT: log.debug("svg"); log.debug("output file: " + outfile.toString()); break; default: log.debug("unknown input type"); } log.debug("OPTIONS"); if (userConfigFile != null) { log.debug("user configuration file: " + userConfigFile.toString()); } else { log.debug("no user configuration file is used [default]"); } if (quiet == Boolean.TRUE) { log.debug("quiet mode off [default]"); } else { log.debug("quiet mode on"); } }
5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/9e1f79f57cf867595e42484d522727945c4fd158/CommandLineOptions.java/buggy/src/java/org/apache/fop/apps/CommandLineOptions.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 4657, 1750, 1435, 288, 3639, 613, 18, 4148, 2932, 1210, 1965, 30, 315, 1769, 3639, 1620, 261, 2630, 3188, 13, 288, 3639, 648, 4269, 67, 4043, 30, 5411, 613, 18, 4148, 2932, 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, 377, 3238, 918, 4657, 1750, 1435, 288, 3639, 613, 18, 4148, 2932, 1210, 1965, 30, 315, 1769, 3639, 1620, 261, 2630, 3188, 13, 288, 3639, 648, 4269, 67, 4043, 30, 5411, 613, 18, 4148, 2932, 9...
doc.saveFile(new FileSelector(file));
doc.saveFile(new WarningFileSelector(file));
public void testFileMovedWhenTriedToSave() throws BadLocationException, IOException { OpenDefinitionsDocument doc = setupDocument(FOO_TEXT); final File file = tempFile(); doc.saveFile(new FileSelector(file)); TestListener listener = new TestListener(); _model.addListener(listener); file.delete(); changeDocumentText(BAR_TEXT, doc); try { doc.saveFile(new FileSelector(file)); fail("Save file should have thrown an exception"); } catch (FileMovedException fme) { //this is expected to occur } assertModified(true, doc); assertContents(BAR_TEXT, doc); }
11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/b2adcf09a03ba6f772e2f3c91188d15851dd508c/GlobalModelIOTest.java/buggy/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 812, 25317, 9434, 29847, 774, 4755, 1435, 565, 1216, 6107, 2735, 503, 16, 1860, 288, 565, 3502, 7130, 2519, 997, 273, 3875, 2519, 12, 3313, 51, 67, 5151, 1769, 565, 727, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1842, 812, 25317, 9434, 29847, 774, 4755, 1435, 565, 1216, 6107, 2735, 503, 16, 1860, 288, 565, 3502, 7130, 2519, 997, 273, 3875, 2519, 12, 3313, 51, 67, 5151, 1769, 565, 727, ...
throws SQLException, IOException {
throws SQLException, IOException {
public int updateBlobTrigger(Connection conn, Trigger trigger) throws SQLException, IOException { PreparedStatement ps = null; ByteArrayOutputStream os = null; try { // update the blob os = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(os); oos.writeObject(trigger); oos.close(); byte[] buf = os.toByteArray(); ByteArrayInputStream is = new ByteArrayInputStream(buf); ps = conn.prepareStatement(rtp(UPDATE_BLOB_TRIGGER)); ps.setBinaryStream(1, is, buf.length); ps.setString(2, trigger.getName()); ps.setString(3, trigger.getGroup()); return ps.executeUpdate(); } finally { closeStatement(ps); if (os != null) os.close(); } }
15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/f6eeea5a952e67d6b7fc8b54ae64d0b9e7098a98/StdJDBCDelegate.java/buggy/src/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1089, 9405, 6518, 12, 1952, 1487, 16, 11321, 3080, 13, 5411, 1216, 6483, 16, 1860, 288, 3639, 16913, 4250, 273, 446, 31, 3639, 11559, 1140, 273, 446, 31, 3639, 775, 288, 5411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 1089, 9405, 6518, 12, 1952, 1487, 16, 11321, 3080, 13, 5411, 1216, 6483, 16, 1860, 288, 3639, 16913, 4250, 273, 446, 31, 3639, 11559, 1140, 273, 446, 31, 3639, 775, 288, 5411, ...
} else if (name instanceof File) { File file = (File)name; if (file.exists()) {
} else if (name instanceof Path) { Path file = (Path)name; FileSystem fs = FileSystem.getNamed("local", this); if (fs.exists(file)) {
private void loadResource(Properties properties, Object name, boolean quiet) { try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = null; if (name instanceof String) { // a CLASSPATH resource URL url = getResource((String)name); if (url != null) { LOG.info("parsing " + url); doc = builder.parse(url.toString()); } } else if (name instanceof File) { // a file resource File file = (File)name; if (file.exists()) { LOG.info("parsing " + file); doc = builder.parse(file); } } if (doc == null) { if (quiet) return; throw new RuntimeException(name + " not found"); } Element root = doc.getDocumentElement(); if (!"configuration".equals(root.getTagName())) LOG.severe("bad conf file: top-level element not <configuration>"); NodeList props = root.getChildNodes(); for (int i = 0; i < props.getLength(); i++) { Node propNode = props.item(i); if (!(propNode instanceof Element)) continue; Element prop = (Element)propNode; if (!"property".equals(prop.getTagName())) LOG.warning("bad conf file: element not <property>"); NodeList fields = prop.getChildNodes(); String attr = null; String value = null; for (int j = 0; j < fields.getLength(); j++) { Node fieldNode = fields.item(j); if (!(fieldNode instanceof Element)) continue; Element field = (Element)fieldNode; if ("name".equals(field.getTagName())) attr = ((Text)field.getFirstChild()).getData(); if ("value".equals(field.getTagName()) && field.hasChildNodes()) value = ((Text)field.getFirstChild()).getData(); } if (attr != null && value != null) properties.setProperty(attr, value); } } catch (Exception e) { LOG.severe("error parsing conf file: " + e); throw new RuntimeException(e); } }
55137 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55137/ee01fef4b4fb82c7492a4a747793839a4d14cd39/Configuration.java/buggy/src/java/org/apache/hadoop/conf/Configuration.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 1262, 1420, 12, 2297, 1790, 16, 1033, 508, 16, 1250, 10902, 13, 288, 565, 775, 288, 1377, 4319, 1263, 2089, 273, 3639, 30236, 18, 2704, 1442, 7675, 2704, 2519, 1263, 5621, 1377...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1262, 1420, 12, 2297, 1790, 16, 1033, 508, 16, 1250, 10902, 13, 288, 565, 775, 288, 1377, 4319, 1263, 2089, 273, 3639, 30236, 18, 2704, 1442, 7675, 2704, 2519, 1263, 5621, 1377...
hide();
setVisible(false);
public void actionPerformed(ActionEvent e) { update(); ida.writePrefs(); hide(); dispose(); }
7555 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7555/3cd6e9d81112e3ab17a910eaef36b9e56b2a8b6a/Identities.java/clean/grendel/sources/grendel/prefs/ui/Identities.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 377, 202, 1377, 1089, 5621, 1377, 612, 69, 18, 2626, 1386, 2556, 5621, 1377, 16697, 12, 5743, 1769, 1377, 15825, 5621, 377, 202, 565, 289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 26100, 12, 1803, 1133, 425, 13, 288, 377, 202, 1377, 1089, 5621, 1377, 612, 69, 18, 2626, 1386, 2556, 5621, 1377, 16697, 12, 5743, 1769, 1377, 15825, 5621, 377, 202, 565, 289, ...
public org.quickfix.field.LegSecurityID getLegSecurityID() throws FieldNotFound { org.quickfix.field.LegSecurityID value = new org.quickfix.field.LegSecurityID();
public quickfix.field.LegSecurityID getLegSecurityID() throws FieldNotFound { quickfix.field.LegSecurityID value = new quickfix.field.LegSecurityID();
public org.quickfix.field.LegSecurityID getLegSecurityID() throws FieldNotFound { org.quickfix.field.LegSecurityID value = new org.quickfix.field.LegSecurityID(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SecurityDefinitionRequest.java/clean/src/java/src/quickfix/fix43/SecurityDefinitionRequest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 4368, 734, 336, 8329, 4368, 734, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 4368, 734, 460, 273, 394, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8329, 4368, 734, 336, 8329, 4368, 734, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 8329, 4368, 734, 460, 273, 394, 23...
private static void testDebugError() { Properties props = new Properties(); ByteArrayOutputStream out1 = new ByteArrayOutputStream(); ByteArrayOutputStream err1 = new ByteArrayOutputStream(); PrintStream out2 = new PrintStream(out1); PrintStream err2 = new PrintStream(err1); props.put("log4testng.debug", "unknown"); props.put("log4testng.rootLogger", "WARN"); try { testInitialize(props, out2, err2); throw new RuntimeException("failure"); } catch(IllegalArgumentException pEx) { Assert.assertEquals(out1.toString(), ""); Assert.assertEquals(err1.toString(), ""); }
private static void testDebugError() { Properties props= new Properties(); ByteArrayOutputStream out1= new ByteArrayOutputStream(); ByteArrayOutputStream err1= new ByteArrayOutputStream(); PrintStream out2= new PrintStream(out1); PrintStream err2= new PrintStream(err1); props.put("log4testng.debug", "unknown"); props.put("log4testng.rootLogger", "WARN"); try { testInitialize(props, out2, err2); throw new RuntimeException("failure"); } catch(IllegalArgumentException pEx) { Assert.assertEquals(out1.toString(), ""); Assert.assertEquals(err1.toString(), ""); }
private static void testDebugError() { Properties props = new Properties(); ByteArrayOutputStream out1 = new ByteArrayOutputStream(); ByteArrayOutputStream err1 = new ByteArrayOutputStream(); PrintStream out2 = new PrintStream(out1); PrintStream err2 = new PrintStream(err1); props.put("log4testng.debug", "unknown"); props.put("log4testng.rootLogger", "WARN"); try { testInitialize(props, out2, err2); throw new RuntimeException("failure"); } catch(IllegalArgumentException pEx) { // Normal case Assert.assertEquals(out1.toString(), ""); Assert.assertEquals(err1.toString(), ""); } }
46166 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46166/96769faec3ab62f18300a49b416f1c5e2f108496/Logger.java/clean/src/main/org/testng/log4testng/Logger.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 1842, 2829, 668, 1435, 225, 288, 1377, 6183, 3458, 273, 394, 6183, 5621, 1377, 11559, 596, 21, 273, 394, 11559, 5621, 3639, 11559, 393, 21, 273, 394, 11559, 5621, 3639, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 760, 918, 1842, 2829, 668, 1435, 225, 288, 1377, 6183, 3458, 273, 394, 6183, 5621, 1377, 11559, 596, 21, 273, 394, 11559, 5621, 3639, 11559, 393, 21, 273, 394, 11559, 5621, 3639, 21...
writeMessage(new LDAPMessage(new RfcUnbindRequest(), reqCtls));
bound = false; try { LDAPMessage msg = new LDAPMessage( new RfcUnbindRequest(),null); byte[] ber = msg.getASN1Object().getEncoding(encoder); synchronized(this) { out.write(ber, 0, ber.length); out.flush(); } } catch( IOException ex) { ; }
public synchronized void shutdown(LDAPControl[] reqCtls) { if(socket != null) { try { // abandonOutstandingReqs(reqCtls); if(bound) { writeMessage(new LDAPMessage(new RfcUnbindRequest(), reqCtls)); } } catch(IOException ioe) { } finally { try { out.flush(); socket.close(); } catch(java.io.IOException ie) { // problem closing socket } // make sure no thread is left doing a wait()!!! // notify each object that may be waiting.... socket = null; } } }
9947 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9947/1b6354a51fb799d6c41e8c8c1279c8af99f3265f/Connection.java/clean/com/novell/ldap/client/Connection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 3852, 918, 5731, 12, 15496, 3367, 8526, 1111, 39, 17116, 13, 288, 1377, 309, 12, 7814, 480, 446, 13, 288, 540, 775, 288, 5411, 368, 1223, 464, 265, 1182, 15167, 6113, 87, 12, 3658...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3852, 918, 5731, 12, 15496, 3367, 8526, 1111, 39, 17116, 13, 288, 1377, 309, 12, 7814, 480, 446, 13, 288, 540, 775, 288, 5411, 368, 1223, 464, 265, 1182, 15167, 6113, 87, 12, 3658...
public final void decRC(VM_Address object, SimpleRCAllocator allocator, Plan plan)
public final void decRC(VM_Address object)
public final void decRC(VM_Address object, SimpleRCAllocator allocator, Plan plan) throws VM_PragmaInline { if (SimpleRCHeader.decRC(object)) { // this object is now dead, scan it for recursive decrement// VM.sysWrite(object); VM.sysWrite(" k\n"); ScanObject.scan(object); if (!(Plan.refCountCycleDetection && phase == DECREMENT && SimpleRCHeader.isBuffered(object))) free(object, allocator); } else if (Plan.refCountCycleDetection && phase == DECREMENT) { if (SimpleRCHeader.makePurple(object)) plan.addToCycleBuf(VM_Magic.objectAsAddress(object)); } }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/b2e40b30ffbf80745d30b43e920d664d22aeb6da/SimpleRCCollector.java/buggy/rvm/src/vm/memoryManagers/JMTk/policy/SimpleRCCollector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 918, 2109, 11529, 12, 7397, 67, 1887, 733, 16, 4477, 11529, 21156, 26673, 16, 9506, 225, 12540, 4995, 13, 377, 1216, 8251, 67, 2050, 9454, 10870, 288, 565, 309, 261, 5784, 1152...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 727, 918, 2109, 11529, 12, 7397, 67, 1887, 733, 16, 4477, 11529, 21156, 26673, 16, 9506, 225, 12540, 4995, 13, 377, 1216, 8251, 67, 2050, 9454, 10870, 288, 565, 309, 261, 5784, 1152...
throw new BirtException( pluginId, ResourceConstants.CONVERT_FAILS, "Integer", resourceBundle );
{ throw new BirtException( pluginId, ResourceConstants.CONVERT_FAILS, new Object[]{ source.toString( ), "Integer" }, resourceBundle ); }
public static Integer toInteger( Object source ) throws BirtException { if ( source == null ) return null; else if ( source instanceof Integer ) { return (Integer) source; } else if ( source instanceof BigDecimal ) { int intValue = ( (BigDecimal) source ).intValue( ); return new Integer( intValue ); } else if ( source instanceof Boolean ) { if ( true == ( (Boolean) source ).booleanValue( ) ) return new Integer( 1 ); return new Integer( 0 ); } else if ( source instanceof Date ) { long longValue = ( (Date) source ).getTime( ); return new Integer( (int) longValue ); } else if ( source instanceof Double ) { int intValue = ( (Double) source ).intValue( ); return new Integer( intValue ); } else if ( source instanceof String ) { try { return Integer.valueOf( (String) source ); } catch ( NumberFormatException e ) { throw new BirtException( pluginId, ResourceConstants.CONVERT_FAILS, "Integer", resourceBundle ); } } else throw new BirtException( pluginId, ResourceConstants.CONVERT_FAILS, "Integer", resourceBundle ); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/e5c6ee08813e7796d482748531aa65b4d8499deb/DataTypeUtil.java/buggy/core/org.eclipse.birt.core/src/org/eclipse/birt/core/data/DataTypeUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 2144, 358, 4522, 12, 1033, 1084, 262, 1216, 605, 2714, 503, 202, 95, 202, 202, 430, 261, 1084, 422, 446, 262, 1082, 202, 2463, 446, 31, 202, 202, 12107, 309, 261, 1084, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2144, 358, 4522, 12, 1033, 1084, 262, 1216, 605, 2714, 503, 202, 95, 202, 202, 430, 261, 1084, 422, 446, 262, 1082, 202, 2463, 446, 31, 202, 202, 12107, 309, 261, 1084, ...
if ( versionBuffer.length() < 1 && classifier != null ) { avceTokenList.addFirst( classifier ); } break; } if ( inFirstToken ) { inFirstToken = false; } it.remove(); }
firstVersionTokenEncountered = true; bufferToUpdate = versionBuffer; } if ( firstToken ) { firstToken = false; } else { bufferToUpdate.insert( 0, '-' ); } bufferToUpdate.insert( 0, token ); tokensIterated++; } getLogger().debug("After parsing loop, state of buffers:\no Version Buffer: \'" + versionBuffer + "\'\no Classifier Buffer: \'" + classifierBuffer + "\'\no Number of Tokens Iterated: " + tokensIterated);
private Artifact buildArtifact( String path, FileReporter reporter ) throws Exception { StringTokenizer tokens = new StringTokenizer( path, "/\\" ); int numberOfTokens = tokens.countTokens(); if ( numberOfTokens != 3 ) { reporter.warn( "Artifact path: \'" + path + "\' does not match naming convention. Cannot reliably extract artifact information from path." ); return null; } String groupId = tokens.nextToken(); String type = tokens.nextToken(); if ( type.endsWith( "s" ) ) { type = type.substring( 0, type.length() - 1 ); } // contains artifactId, version, classifier, and extension. String avceGlob = tokens.nextToken(); LinkedList avceTokenList = new LinkedList(); StringTokenizer avceTokenizer = new StringTokenizer( avceGlob, "-" ); while ( avceTokenizer.hasMoreTokens() ) { avceTokenList.addLast( avceTokenizer.nextToken() ); } String lastAvceToken = (String) avceTokenList.removeLast(); if ( lastAvceToken.endsWith( ".tar.gz" ) ) { type = "distribution-tgz"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".tar.gz".length() ); avceTokenList.addLast( lastAvceToken ); } else if ( lastAvceToken.endsWith( ".zip" ) ) { type = "distribution-zip"; lastAvceToken = lastAvceToken.substring( 0, lastAvceToken.length() - ".zip".length() ); avceTokenList.addLast( lastAvceToken ); } else { int extPos = lastAvceToken.lastIndexOf( '.' ); if ( extPos > 0 ) { String ext = lastAvceToken.substring( extPos + 1 ); if ( type.equals( ext ) ) { lastAvceToken = lastAvceToken.substring( 0, extPos ); avceTokenList.addLast( lastAvceToken ); } else { reporter .warn( "Artifact path: \'" + path + "\' does not match naming convention. Cannot reliably extract artifact information from path." ); return null; } } } String validVersionParts = "([Dd][Ee][Vv][_.0-9]*)|" + "([Ss][Nn][Aa][Pp][Ss][Hh][Oo][Tt])|" + "([0-9][_.0-9a-zA-Z]*)|" + "([Gg]?[_.0-9ab]*([Pp][Rr][Ee]|[Rr][Cc]|[Gg]|[Mm])[_.0-9]*)|" + "([Aa][Ll][Pp][Hh][Aa][_.0-9]*)|" + "([Bb][Ee][Tt][Aa][_.0-9]*)|" + "([Rr][Cc][_.0-9]*)|" + "([Tt][Ee][Ss][Tt][_.0-9]*)|" + "([Dd][Ee][Bb][Uu][Gg][_.0-9]*)|" + "([Uu][Nn][Oo][Ff][Ff][Ii][Cc][Ii][Aa][Ll][_.0-9]*)|" + "([Cc][Uu][Rr][Rr][Ee][Nn][Tt])|" + "([Ll][Aa][Tt][Ee][Ss][Tt])|" + "([Ff][Cc][Ss])|" + "([Rr][Ee][Ll][Ee][Aa][Ss][Ee][_.0-9]*)|" + "([Nn][Ii][Gg][Hh][Tt][Ll][Yy])"; // let's discover the version, and whatever's leftover will be either // a classifier, or part of the artifactId, depending on position. // Since version is at the end, we have to move in from the back. Collections.reverse( avceTokenList ); String classifier = null; StringBuffer versionBuffer = new StringBuffer(); boolean inFirstToken = true; for ( Iterator it = avceTokenList.iterator(); it.hasNext(); ) { String token = (String) it.next(); boolean tokenIsVersionPart = token.matches( validVersionParts ); if ( inFirstToken && !tokenIsVersionPart ) { classifier = token; } else if ( tokenIsVersionPart ) { if ( !inFirstToken ) { versionBuffer.insert( 0, '-' ); } versionBuffer.insert( 0, token ); } else { // if we didn't find a version, but we did find a 'classifier', // then push that classifier back onto the list...chances are, // it doesn't have a version or a classifier if this is the case. if ( versionBuffer.length() < 1 && classifier != null ) { avceTokenList.addFirst( classifier ); } // we've discovered all the version parts. break the loop. break; } if ( inFirstToken ) { inFirstToken = false; } // pop the token off the list so it doesn't appear in the // artifactId. it.remove(); } // Now, restore the proper ordering so we can build the artifactId. Collections.reverse( avceTokenList ); StringBuffer artifactIdBuffer = new StringBuffer(); inFirstToken = true; for ( Iterator it = avceTokenList.iterator(); it.hasNext(); ) { String token = (String) it.next(); if ( inFirstToken ) { inFirstToken = false; } else { artifactIdBuffer.append( '-' ); } artifactIdBuffer.append( token ); } String artifactId = artifactIdBuffer.toString(); int lastVersionCharIdx = versionBuffer.length() - 1; if ( lastVersionCharIdx > -1 && versionBuffer.charAt( lastVersionCharIdx ) == '-' ) { versionBuffer.setLength( lastVersionCharIdx ); } String version = versionBuffer.toString(); if ( version.length() < 1 ) { version = null; } getLogger().debug( "Extracted artifact information from path:\n" + "groupId: \'" + groupId + "\'\n" + "artifactId: \'" + artifactId + "\'\n" + "type: \'" + type + "\'\n" + "version: \'" + version + "\'\n" + "classifier: \'" + classifier + "\'" ); if ( classifier != null ) { return artifactConstructionSupport.createArtifactWithClassifier( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, type, classifier ); } else { return artifactConstructionSupport.createArtifact( groupId, artifactId, version, Artifact.SCOPE_RUNTIME, type ); } }
50542 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50542/0e5b4e565cfb49ab956d80f647c76be045e9a0fa/LegacyArtifactDiscoverer.java/buggy/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 14022, 1361, 7581, 12, 514, 589, 16, 1387, 13289, 11528, 262, 3639, 1216, 1185, 565, 288, 3639, 16370, 2430, 273, 394, 16370, 12, 589, 16, 2206, 27576, 11272, 3639, 509, 7922, 5157, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14022, 1361, 7581, 12, 514, 589, 16, 1387, 13289, 11528, 262, 3639, 1216, 1185, 565, 288, 3639, 16370, 2430, 273, 394, 16370, 12, 589, 16, 2206, 27576, 11272, 3639, 509, 7922, 5157, ...
public void setCompression(UntarCompressionMethod method)
public void setCompression( UntarCompressionMethod method )
public void setCompression(UntarCompressionMethod method) { compression = method; }
55907 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55907/4da7a225ba9c01ca94805923e06e3fb2d46bf201/TarUnArchiver.java/buggy/plexus-archiver/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 444, 15270, 12, 23931, 297, 15270, 1305, 707, 262, 565, 288, 3639, 9154, 273, 707, 31, 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, 918, 444, 15270, 12, 23931, 297, 15270, 1305, 707, 262, 565, 288, 3639, 9154, 273, 707, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (_textChanged) { try { if ((_oldPropertyValue == null || _oldPropertyValue.length() == 0) || (_oldPropertyValue != null && !(_oldPropertyValue.equals(getText())))) { _property.setProperty(_container, _oldPropertyValue); _property.setProperty(_container, getText(), true); _oldPropertyValue = getText(); } } catch (PropertyVetoException pv) { try { setText(_oldPropertyValue); } catch (IllegalStateException i) {} try { _property.setProperty(_container, _oldPropertyValue); } catch (Exception ex) { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(ex); System.exit(-1); } showException(pv); } catch (Exception ex) { showException(ex); if (_firstException) { try { _property.setProperty(_container, _oldPropertyValue); setText(_oldPropertyValue); } catch (Exception e) { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(e); System.exit(-1); } _firstException = false; } else { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(ex); } } finally { _textChanged = false; } }
handleEvent(); _viaUserInput = false; _textChanged = false;
public void focusLost(FocusEvent arg0) { if (_textChanged) { try { // check if the new property is legal if ((_oldPropertyValue == null || _oldPropertyValue.length() == 0) || (_oldPropertyValue != null && !(_oldPropertyValue.equals(getText())))) { // next line dirty hack to enable the continuous updating // of the textfields in the figs and in the navigator _property.setProperty(_container, _oldPropertyValue); _property.setProperty(_container, getText(), true); _oldPropertyValue = getText(); } } catch (PropertyVetoException pv) { try { setText(_oldPropertyValue); } catch (IllegalStateException i) {} // will allways throw but set the text correctly try { _property.setProperty(_container, _oldPropertyValue); } catch (Exception ex) { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(ex); System.exit(-1); } showException(pv); } catch (Exception ex) { // a setProperty method throws a PropertyVetoException if it is an illegal change showException(ex); if (_firstException) { try { _property.setProperty(_container, _oldPropertyValue); setText(_oldPropertyValue); } catch (Exception e) { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(e); System.exit(-1); } _firstException = false; } else { Argo.log.fatal("FATAL: Repeating exception"); Argo.log.fatal(ex); } } finally { _textChanged = false; } } // update(); // _oldPropertyValue = null; }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/e880c0ae8a43aa3e3fdd70cec0416ad6de1f956a/UMLTextField.java/buggy/src_new/org/argouml/uml/ui/UMLTextField.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 7155, 19024, 12, 9233, 1133, 1501, 20, 13, 288, 377, 202, 430, 261, 67, 955, 5033, 13, 288, 377, 202, 202, 698, 288, 377, 202, 3196, 202, 759, 866, 309, 326, 394, 1272, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7155, 19024, 12, 9233, 1133, 1501, 20, 13, 288, 377, 202, 430, 261, 67, 955, 5033, 13, 288, 377, 202, 202, 698, 288, 377, 202, 3196, 202, 759, 866, 309, 326, 394, 1272, 353...
public ImporterTopLevel(Context cx) { cx.initStandardObjects(this);
public ImporterTopLevel() {
public ImporterTopLevel(Context cx) { cx.initStandardObjects(this); init(); }
12376 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12376/11d0e9760b6cc948ff81b5f2f26bc7e7e6c13b86/ImporterTopLevel.java/buggy/js/rhino/src/org/mozilla/javascript/ImporterTopLevel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9457, 4975, 27046, 12, 1042, 9494, 13, 288, 3639, 9494, 18, 2738, 8336, 4710, 12, 2211, 1769, 3639, 1208, 5621, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 9457, 4975, 27046, 12, 1042, 9494, 13, 288, 3639, 9494, 18, 2738, 8336, 4710, 12, 2211, 1769, 3639, 1208, 5621, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
assert ! ( name != null && resolved != null );
assert !( name != null && resolved != null );
public boolean isResolved( ) { assert ! ( name != null && resolved != null ); return resolved != null; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/d39de560bfa6ce1732278e0b5a2a0255c03947db/StructRefValue.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/StructRefValue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1250, 353, 12793, 12, 262, 202, 95, 202, 202, 11231, 401, 261, 508, 480, 446, 225, 597, 225, 4640, 480, 446, 11272, 202, 202, 2463, 4640, 480, 446, 31, 202, 97, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 225, 202, 482, 1250, 353, 12793, 12, 262, 202, 95, 202, 202, 11231, 401, 261, 508, 480, 446, 225, 597, 225, 4640, 480, 446, 11272, 202, 202, 2463, 4640, 480, 446, 31, 202, 97, 2, -100, -10...
public void testUnmarshalsObjectFromXml() {
public void testUnmarshalsObjectFromXml() {
public void testUnmarshalsObjectFromXml() { String xml = "<x>" + " <aStr>joe</aStr>" + " <anInt>8</anInt>" + " <innerObj>" + " <yField>walnes</yField>" + " </innerObj>" + "</x>"; X x = (X) xstream.fromXML( xml ); assertEquals( "joe", x.aStr ); assertEquals( 8, x.anInt ); assertEquals( "walnes", x.innerObj.yField ); }
5142 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5142/790283a8969cb471512fd48b68d3e2149234270a/Xpp3XStreamTest.java/clean/xstream/src/test/com/thoughtworks/xstream/xml/xpp3/Xpp3XStreamTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 984, 81, 20087, 921, 1265, 4432, 1435, 565, 288, 3639, 514, 2025, 273, 5411, 3532, 92, 2984, 397, 5411, 315, 225, 411, 69, 1585, 34, 78, 15548, 1757, 69, 1585, 2984, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 984, 81, 20087, 921, 1265, 4432, 1435, 565, 288, 3639, 514, 2025, 273, 5411, 3532, 92, 2984, 397, 5411, 315, 225, 411, 69, 1585, 34, 78, 15548, 1757, 69, 1585, 2984, 39...
int larger = (child2<nextIndex && counts[child2]>counts[child1]) ? child2 : child1;
int larger = (child2<nextIndex && counts[child2]>counts[child1]) ? child2 : child1;
private void heapifyDown(int index) { int current = index; int child1 = current * 2; while (child1<nextIndex) { int child2 = current * 2 + 1; int larger = (child2<nextIndex && counts[child2]>counts[child1]) ? child2 : child1; if (counts[current] >= counts[larger]) break; // done swap(current, larger); current = larger; child1 = current * 2; } }
5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/a1f6a81625dc69eddb30f0667a5cde3e8fbe67f3/VM_MethodCountData.java/buggy/rvm/src/vm/adaptive/database/methodSamples/VM_MethodCountData.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 10500, 1164, 4164, 12, 474, 770, 13, 288, 565, 509, 783, 273, 770, 31, 565, 509, 1151, 21, 273, 783, 380, 576, 31, 565, 1323, 261, 3624, 21, 32, 4285, 1016, 13, 288, 1377, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10500, 1164, 4164, 12, 474, 770, 13, 288, 565, 509, 783, 273, 770, 31, 565, 509, 1151, 21, 273, 783, 380, 576, 31, 565, 1323, 261, 3624, 21, 32, 4285, 1016, 13, 288, 1377, ...
new File(outputFileName).exists( ) );
new File( outputFileName ).exists( ) );
protected void renderReportlet( String docName, InstanceID iid, String type ) { if ( iid == null ) { assertFalse( "Failed to find instance id of " + type, true ); } else { report_document = inputPath + docName + ".rptdocument"; IRenderTask task; // create directories to deposit output files createDir( docName ); try { reportDoc = engine.openReportDocument( report_document ); task = engine.createRenderTask( reportDoc ); IRenderOption htmlRenderOptions = new HTMLRenderOption( ); HTMLRenderContext renderContext = new HTMLRenderContext( ); renderContext.setImageDirectory( "image" ); HashMap appContext = new HashMap( ); appContext.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT, renderContext ); task.setAppContext( appContext ); outputFileName = outputPath + docName + "/html/" + type + ".html"; htmlRenderOptions.setOutputFileName( outputFileName ); htmlRenderOptions.setOutputFormat( "html" ); task.setRenderOption( htmlRenderOptions ); task.setInstanceID( iid ); task.render( ); assertTrue( "Render reportlet-" + docName + " to html failed. ", new File(outputFileName).exists( ) ); outputFileName = outputPath + docName + "/pdf/" + type + ".pdf"; htmlRenderOptions.setOutputFileName( outputFileName ); htmlRenderOptions.setOutputFormat( "pdf" ); task.setRenderOption( htmlRenderOptions ); task.setInstanceID( iid ); task.render( ); task.close( ); assertTrue( "Render reportlet-" + docName + " to pdf failed. ", new File(outputFileName).exists( ) ); } catch ( Exception e ) { e.printStackTrace( ); assertTrue( "Render reportlet " + type + "from" + docName + " failed. " + e.getLocalizedMessage( ), false ); } } }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/3d7502d5c8108135c6c10a5dd6deaab12120cb14/RenderTaskTest.java/clean/testsuites/org.eclipse.birt.report.tests.engine/src/org/eclipse/birt/report/tests/engine/api/RenderTaskTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1743, 4820, 1810, 12, 514, 997, 461, 16, 29390, 22819, 16, 514, 618, 262, 202, 95, 202, 202, 430, 261, 22819, 422, 446, 262, 202, 202, 95, 1082, 202, 11231, 8381, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1743, 4820, 1810, 12, 514, 997, 461, 16, 29390, 22819, 16, 514, 618, 262, 202, 95, 202, 202, 430, 261, 22819, 422, 446, 262, 202, 202, 95, 1082, 202, 11231, 8381, 12, ...
public static void stripWhitespace( Context c, Node node, Element containing_block ) { String white_space = c.css.getStringProperty( containing_block, "white-space" ); // if doing preformatted whitespace if ( white_space != null && white_space.equals( "pre" ) ) { return; } if ( node == null ) { return; } if ( node.getNodeType() != node.TEXT_NODE ) { return; } String text = node.getNodeValue(); //text = text.trim(); /* * if(text.indexOf("\n") > 0) { * u.p("before text = " + text); * StringBuffer sb = new StringBuffer(); * int m = 0; * int n = 0; * while((n = text.indexOf("\n",m)) > 0) { * String span = text.substring(m,n); * u.p("span = " + span); * sb.append(span); * // add a space to replace the \n * sb.append(" "); * m = n+1; * } * sb.append(text.substring(m)); * text = sb.toString(); * u.p("after text = " + text); * } */ // spaces at the start of the string -> nothing text = text.replaceAll( "^\\s+", "" ); // spaces at the start of lines -> "" //text = text.replaceAll("\n(\\s*)",""); // all \n -> a single space text = text.replaceAll( "\n", " " ); // all extra spaces -> single space text = text.replaceAll( "\\s+", " " ); // add one space to the end //text = text+" "; //u.p(text); node.setNodeValue( text ); }
8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/buggy/src/java/org/xhtmlrenderer/layout/TextUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1071, 3845, 6459, 6406, 9431, 12, 1042, 71, 16, 50, 369, 20680, 16, 1046, 1213, 3280, 67, 2629, 15329, 780, 14739, 67, 2981, 33, 71, 18, 5212, 18, 588, 780, 1396, 12, 1213, 3280, 67, 2629, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3845, 6459, 6406, 9431, 12, 1042, 71, 16, 50, 369, 20680, 16, 1046, 1213, 3280, 67, 2629, 15329, 780, 14739, 67, 2981, 33, 71, 18, 5212, 18, 588, 780, 1396, 12, 1213, 3280, 67, 2629, ...
final MethodReferenceVisitor visitor = new MethodReferenceVisitor(method);
final MethodReferenceVisitor visitor = new MethodReferenceVisitor( method);
public void visitMethod(@NotNull PsiMethod method) { super.visitMethod(method); if (method.hasModifierProperty(PsiModifier.STATIC)) { return; } if (method.isConstructor()) { return; } if (method.hasModifierProperty(PsiModifier.ABSTRACT)) { return; } if (m_ignoreEmptyMethods) { final PsiCodeBlock methodBody = method.getBody(); if (methodBody == null) { return; } final PsiStatement[] methodStatements = methodBody.getStatements(); if (methodStatements.length == 0) { return; } } final PsiClass containingClass = ClassUtils.getContainingClass(method); if(containingClass == null) { return; } final PsiElement scope = containingClass.getScope(); if (!(scope instanceof PsiJavaFile) && !containingClass.hasModifierProperty(PsiModifier.STATIC)) { return; } if (m_onlyPrivateOrFinal && !method.hasModifierProperty(PsiModifier.FINAL) && !method.hasModifierProperty(PsiModifier.PRIVATE)) { return; } final String methodName = method.getName(); if(methodName!=null && methodName.startsWith("test") && ClassUtils.isSubclass(containingClass, "junit.framework.TestCase")){ return; } final PsiMethod[] superMethods = method.findSuperMethods(); if (superMethods.length > 0) { return; } // ignore overridden methods final PsiElementProcessor.FindElement<PsiMethod> processor = new PsiElementProcessor.FindElement<PsiMethod>(); final PsiManager manager = method.getManager(); final PsiSearchHelper helper = manager.getSearchHelper(); helper.processOverridingMethods(processor, method, GlobalSearchScope.projectScope(manager.getProject()), true); if(processor.isFound()) return; final MethodReferenceVisitor visitor = new MethodReferenceVisitor(method); method.accept(visitor); if (!visitor.areReferencesStaticallyAccessible()) { return; } registerMethodError(method); }
12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/bd57f07c33c419f20715b114b71a7e93425b34c9/MethodMayBeStaticInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/performance/MethodMayBeStaticInspection.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 25138, 26964, 5962, 453, 7722, 1305, 707, 13, 288, 5411, 2240, 18, 11658, 1305, 12, 2039, 1769, 5411, 309, 261, 2039, 18, 5332, 9829, 1396, 12, 52, 7722, 9829, 18, 22741, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 918, 25138, 26964, 5962, 453, 7722, 1305, 707, 13, 288, 5411, 2240, 18, 11658, 1305, 12, 2039, 1769, 5411, 309, 261, 2039, 18, 5332, 9829, 1396, 12, 52, 7722, 9829, 18, 22741, 3719,...
if (existing != null) { canCopy = delete(existing, subMonitor);
if (existing != null) { canCopy = !copyExisting(source, existing, subMonitor); if (canCopy) { canCopy = delete(existing, subMonitor); }
protected void copy(IResource[] resources, IPath destination, IProgressMonitor subMonitor) throws CoreException { for (int i = 0; i < resources.length; i++) { IResource source = resources[i]; IPath destinationPath = destination.append(source.getName()); IWorkspace workspace = source.getWorkspace(); IWorkspaceRoot workspaceRoot = workspace.getRoot(); if (source.getType() == IResource.FOLDER && workspaceRoot.exists(destinationPath)) { // the resource is a folder and it exists in the destination, copy the // children of the folder IResource[] children = ((IContainer) source).members(); copy(children, destinationPath, subMonitor); } else { // if we're merging folders, we could be overwriting an existing file IResource existing = workspaceRoot.findMember(destinationPath); boolean canCopy = true; if (existing != null) { canCopy = delete(existing, subMonitor); } // was the resource deleted successfully or was there no existing resource to delete? if (canCopy) { source.copy(destinationPath, IResource.SHALLOW, new SubProgressMonitor(subMonitor, 0)); } subMonitor.worked(1); if (subMonitor.isCanceled()) { throw new OperationCanceledException(); } } } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/ac488d6b8188cda19603ace04637da48b7897fe0/CopyFilesAndFoldersOperation.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1610, 12, 45, 1420, 8526, 2703, 16, 467, 743, 2929, 16, 467, 5491, 7187, 720, 7187, 13, 1216, 30015, 288, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 2703, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1610, 12, 45, 1420, 8526, 2703, 16, 467, 743, 2929, 16, 467, 5491, 7187, 720, 7187, 13, 1216, 30015, 288, 202, 202, 1884, 261, 474, 277, 273, 374, 31, 277, 411, 2703, ...
if (endPath != null) { str.append(endPath.toOSString()); } str.append(" - (");
private void addBaseString(IPath endPath, CPElement cpentry, StringBuffer str) { IPath baseRef = (IPath)cpentry.getAttribute(CPElement.BASE_REF); if (!baseRef.isEmpty()) { if (endPath != null) { str.append(endPath.toOSString()); } str.append(" - ("); //$NON-NLS-1$ if (baseRef.isAbsolute()) { // str.append("From project "); str.append(baseRef); } else { // str.append("From contribution "); IPathEntryContainer container; try { container = CoreModel.getPathEntryContainer(baseRef, cpentry.getCProject()); if (container != null) { str.append(container.getDescription()); } } catch (CModelException e1) { } } str.append(')'); } else { IPath path = (IPath)cpentry.getAttribute(CPElement.BASE); if (!path.isEmpty()) { if (endPath != null) { path = path.append(endPath); } str.insert(0, path.toOSString()); } else if (endPath != null) { str.insert(0, endPath.toOSString()); } } }
6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/35fa250ecef211f87dff6e1a4e2f0d6a4a181075/CPElementLabelProvider.java/buggy/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 527, 2171, 780, 12, 45, 743, 679, 743, 16, 5181, 1046, 276, 1907, 698, 16, 6674, 609, 13, 288, 202, 202, 45, 743, 1026, 1957, 273, 261, 45, 743, 13, 71, 1907, 698, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 527, 2171, 780, 12, 45, 743, 679, 743, 16, 5181, 1046, 276, 1907, 698, 16, 6674, 609, 13, 288, 202, 202, 45, 743, 1026, 1957, 273, 261, 45, 743, 13, 71, 1907, 698, 1...
sTitle = sPrefix + "Series Definition";
sTitle = sPrefix + Messages.getString("BarSeriesUIProvider.Lbl.SeriesDefinition");
public Composite getSeriesDataSheet(Composite parent, SeriesDefinition seriesdefinition, IUIServiceProvider builder, Object oContext) { Query query = null; if (seriesdefinition.getDesignTimeSeries().getDataDefinition().size() > 0) { query = ((Query) seriesdefinition.getDesignTimeSeries().getDataDefinition().get(0)); } else { query = QueryImpl.create(""); seriesdefinition.getDesignTimeSeries().getDataDefinition().add(query); } String sPrefix = ""; // If container of container is chart, it is a base series if (seriesdefinition.eContainer().eContainer() instanceof Chart) { sPrefix = "X "; } else { sPrefix = "Y "; } String sTitle = query.getDefinition(); if (sTitle == null || "".equals(sTitle)) { sTitle = sPrefix + "Series Definition"; } else { sTitle = sPrefix + "Series Definition (" + sTitle + ")"; } return new DataDefinitionComposite(parent, SWT.NONE, query, seriesdefinition, builder, oContext, sTitle); }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/7793e94b4d7fab5891f226c6c937e37d85bebad8/BarSeriesUIProvider.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/series/BarSeriesUIProvider.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 14728, 336, 6485, 751, 8229, 12, 9400, 982, 16, 9225, 1852, 4166, 6907, 16, 3639, 467, 5370, 16300, 2089, 16, 1033, 320, 1042, 13, 565, 288, 3639, 2770, 843, 273, 446, 31, 3639, 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, 14728, 336, 6485, 751, 8229, 12, 9400, 982, 16, 9225, 1852, 4166, 6907, 16, 3639, 467, 5370, 16300, 2089, 16, 1033, 320, 1042, 13, 565, 288, 3639, 2770, 843, 273, 446, 31, 3639, 3...
static private final void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); }
static private final void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); }
static private final void jjCheckNAddTwoStates(int state1, int state2) { jjCheckNAdd(state1); jjCheckNAdd(state2); }
7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/fcfd72e089ab163c5f4883bd2ffb60888a5d7900/AnnotationParserTokenManager.java/buggy/aspectwerkz3/src/main/org/codehaus/aspectwerkz/annotation/expression/ast/AnnotationParserTokenManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 3238, 727, 918, 10684, 1564, 50, 986, 11710, 7629, 12, 474, 919, 21, 16, 509, 919, 22, 13, 288, 3639, 10684, 1564, 50, 986, 12, 2019, 21, 1769, 3639, 10684, 1564, 50, 986, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 760, 3238, 727, 918, 10684, 1564, 50, 986, 11710, 7629, 12, 474, 919, 21, 16, 509, 919, 22, 13, 288, 3639, 10684, 1564, 50, 986, 12, 2019, 21, 1769, 3639, 10684, 1564, 50, 986, 12, 20...
public void setSource(Object source) {
public void setSource(String source) {
public void setSource(Object source) { this.source = source; }
54569 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54569/700ff896500184264268c8065776ca5322ca80f4/AlertInfo.java/clean/jmanage/alerts/src/main/java/org/jmanage/core/alert/AlertInfo.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 18913, 12, 780, 1084, 13, 288, 3639, 333, 18, 3168, 273, 1084, 31, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 18913, 12, 780, 1084, 13, 288, 3639, 333, 18, 3168, 273, 1084, 31, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
break _loop1920;
break _loop1923;
public final void recordphrase(AST _t) throws RecognitionException { AST recordphrase_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1908 = _t; AST tmp1711_AST_in = (AST)_t; match(_t,RECORD_NAME); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: case FIELDS: { record_fields(_t); _t = _retTree; break; } case 3: case LEXDATE: case NUMBER: case QSTRING: case BIGENDIAN: case EXCLUSIVELOCK: case FALSE_KW: case FINDCASESENSITIVE: case FINDGLOBAL: case FINDNEXTOCCURRENCE: case FINDPREVOCCURRENCE: case FINDSELECT: case FINDWRAPAROUND: case HOSTBYTEORDER: case LEFT: case LITTLEENDIAN: case NO: case NOERROR_KW: case NOLOCK: case NOPREFETCH: case NOWAIT: case NULL_KW: case OF: case OUTERJOIN: case READAVAILABLE: case READEXACTNUM: case SEARCHSELF: case SEARCHTARGET: case SHARELOCK: case TODAY: case TRUE_KW: case USEINDEX: case USING: case WHERE: case WINDOWDELAYEDMINIMIZE: case WINDOWMAXIMIZED: case WINDOWMINIMIZED: case WINDOWNORMAL: case YES: case UNKNOWNVALUE: case FUNCTIONCALLTYPE: case GETATTRCALLTYPE: case PROCEDURECALLTYPE: case SAXCOMPLETE: case SAXPARSERERROR: case SAXRUNNING: case SAXUNINITIALIZED: case SETATTRCALLTYPE: case ROWUNMODIFIED: case ROWDELETED: case ROWMODIFIED: case ROWCREATED: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; if ((_t.getType()==TODAY)) { AST tmp1712_AST_in = (AST)_t; match(_t,TODAY); _t = _t.getNextSibling(); } else if ((_tokenSet_30.member(_t.getType()))) { constant(_t); _t = _retTree; } else if ((_tokenSet_31.member(_t.getType()))) { } else { throw new NoViableAltException(_t); } } { _loop1920: do { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case LEFT: { AST __t1912 = _t; AST tmp1713_AST_in = (AST)_t; match(_t,LEFT); _t = _t.getFirstChild(); AST tmp1714_AST_in = (AST)_t; match(_t,OUTERJOIN); _t = _t.getNextSibling(); _t = __t1912; _t = _t.getNextSibling(); break; } case OUTERJOIN: { AST tmp1715_AST_in = (AST)_t; match(_t,OUTERJOIN); _t = _t.getNextSibling(); break; } case OF: { AST __t1913 = _t; AST tmp1716_AST_in = (AST)_t; match(_t,OF); _t = _t.getFirstChild(); AST tmp1717_AST_in = (AST)_t; match(_t,RECORD_NAME); _t = _t.getNextSibling(); _t = __t1913; _t = _t.getNextSibling(); break; } case WHERE: { AST __t1914 = _t; AST tmp1718_AST_in = (AST)_t; match(_t,WHERE); _t = _t.getFirstChild(); { if (_t==null) _t=ASTNULL; if ((_tokenSet_3.member(_t.getType()))) { expression(_t); _t = _retTree; } else if ((_t.getType()==3)) { } else { throw new NoViableAltException(_t); } } _t = __t1914; _t = _t.getNextSibling(); break; } case USEINDEX: { AST __t1916 = _t; AST tmp1719_AST_in = (AST)_t; match(_t,USEINDEX); _t = _t.getFirstChild(); AST tmp1720_AST_in = (AST)_t; match(_t,ID); _t = _t.getNextSibling(); _t = __t1916; _t = _t.getNextSibling(); break; } case USING: { AST __t1917 = _t; AST tmp1721_AST_in = (AST)_t; match(_t,USING); _t = _t.getFirstChild(); field(_t); _t = _retTree; { _loop1919: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==AND)) { AST tmp1722_AST_in = (AST)_t; match(_t,AND); _t = _t.getNextSibling(); field(_t); _t = _retTree; } else { break _loop1919; } } while (true); } _t = __t1917; _t = _t.getNextSibling(); break; } case EXCLUSIVELOCK: case NOLOCK: case SHARELOCK: { lockhow(_t); _t = _retTree; break; } case NOWAIT: { AST tmp1723_AST_in = (AST)_t; match(_t,NOWAIT); _t = _t.getNextSibling(); break; } case NOPREFETCH: { AST tmp1724_AST_in = (AST)_t; match(_t,NOPREFETCH); _t = _t.getNextSibling(); break; } case NOERROR_KW: { AST tmp1725_AST_in = (AST)_t; match(_t,NOERROR_KW); _t = _t.getNextSibling(); break; } default: { break _loop1920; } } } while (true); } _t = __t1908; _t = _t.getNextSibling(); _retTree = _t; }
13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/daa15e07422d3491bbbb4d0060450c81983332a4/TreeParser03.java/clean/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 1409, 9429, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 1409, 9429, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1409, 9429, 12, 9053, 389, 88, 13, 1216, 9539, 288, 9506, 202, 9053, 1409, 9429, 67, 9053, 67, 267, 273, 261, 67, 88, 422, 9183, 8560, 13, 692, 446, 294, 261, 9053...
public void eSet( EStructuralFeature eFeature, Object newValue )
public void eSet( int featureID, Object newValue )
public void eSet( EStructuralFeature eFeature, Object newValue ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case DataPackage.NUMBER_DATA_ELEMENT__VALUE : setValue( ( (Double) newValue ).doubleValue( ) ); return; } eDynamicSet( eFeature, newValue ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/NumberDataElementImpl.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/impl/NumberDataElementImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 20199, 12, 512, 14372, 4595, 425, 4595, 16, 1033, 6129, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 20199, 12, 512, 14372, 4595, 425, 4595, 16, 1033, 6129, 262, 202, 95, 202, 202, 9610, 261, 425, 21007, 14372, 4595, 734, 12, 425, 4595, 262, 262, 202, 202, 95, 1082, 202,...
final Iterator params = m_params.iterator();
final Iterator params = m_registered.iterator();
void writeXML(final PrintWriter out) { Assert.exists(out, PrintWriter.class); out.write("<record>"); field(out, "name", m_name); final Iterator params = m_params.iterator(); while (params.hasNext()) { final Parameter param = (Parameter) params.next(); out.write("<parameter>"); field(out, "name", param.getName()); if (param.isRequired()) { out.write("<required/>"); } final Object defaalt = param.getDefaultValue(); if (defaalt != null) { if (defaalt instanceof Object[]) { final Object[] elems = (Object[]) defaalt; final StringBuffer buffer = new StringBuffer(); for (int i = 0; i < elems.length; i++) { buffer.append(elems[i].toString()); buffer.append(", "); } final int len = buffer.length(); if (len > 2) { field(out, "default", buffer.substring(0, len - 2)); } } else { field(out, "default", defaalt.toString()); } } final ParameterInfo info = param.getInfo(); field(out, "title", info.getTitle()); field(out, "purpose", info.getPurpose()); field(out, "example", info.getExample()); field(out, "format", info.getFormat()); out.write("</parameter>"); } out.write("</record>"); }
12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/268844826e8dccbbd124ef1c654daeeae385fed4/ParameterRecord.java/clean/archive/packaging/src/com/arsdigita/util/parameter/ParameterRecord.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1045, 4201, 12, 6385, 14071, 596, 13, 288, 3639, 5452, 18, 1808, 12, 659, 16, 14071, 18, 1106, 1769, 3639, 596, 18, 2626, 2932, 32, 3366, 2984, 1769, 3639, 652, 12, 659, 16, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1045, 4201, 12, 6385, 14071, 596, 13, 288, 3639, 5452, 18, 1808, 12, 659, 16, 14071, 18, 1106, 1769, 3639, 596, 18, 2626, 2932, 32, 3366, 2984, 1769, 3639, 652, 12, 659, 16, 315, ...
registry.getUserNotifier().notifyError("Thumbnail Retrieval Failure", s, exc);
public void handleException(Throwable exc) { String s = "Thumbnail Retrieval Failure: "; registry.getLogger().error(this, s+exc); registry.getUserNotifier().notifyError("Thumbnail Retrieval Failure", s, exc); viewer.setThumbnail(null); }
13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/ThumbnailLoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/ThumbnailLoader.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 20879, 12, 15155, 3533, 13, 377, 288, 3639, 514, 272, 273, 315, 16270, 8803, 1125, 13436, 30, 13636, 3639, 4023, 18, 588, 3328, 7675, 1636, 12, 2211, 16, 272, 15, 10075, 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, 918, 20879, 12, 15155, 3533, 13, 377, 288, 3639, 514, 272, 273, 315, 16270, 8803, 1125, 13436, 30, 13636, 3639, 4023, 18, 588, 3328, 7675, 1636, 12, 2211, 16, 272, 15, 10075, 1769, ...
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp, XSAttributeGroupDecl toAttrGrp, String typeName, boolean extension) throws ComplexTypeRecoverableError { XSAttributeUse[] attrUseS = fromAttrGrp.getAttributeUses(); XSAttributeUse existingAttrUse, duplicateAttrUse = null; for (int i=0; i<attrUseS.length; i++) { existingAttrUse = toAttrGrp.getAttributeUse(attrUseS[i].fAttrDecl.fTargetNamespace, attrUseS[i].fAttrDecl.fName); if (existingAttrUse == null) { toAttrGrp.addAttributeUse(attrUseS[i]); } else { if (extension) { //REVISIT - should create a msg in properties file reportGenericSchemaError("ComplexType " + typeName + ": " + "Duplicate attribute use " + existingAttrUse.fAttrDecl.fName ); throw new ComplexTypeRecoverableError(); } } } // For extension, the wildcard must be formed by doing a union of the wildcards if (extension) { if (toAttrGrp.fAttributeWC==null) { toAttrGrp.fAttributeWC = fromAttrGrp.fAttributeWC; } else { toAttrGrp.fAttributeWC.performUnionWith(fromAttrGrp.fAttributeWC); } } }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/7d23b0f822620b832b611e0946e73bb880886a98/XSDComplexTypeTraverser.java/clean/src/org/apache/xerces/impl/v2/XSDComplexTypeTraverser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2691, 2498, 12, 60, 55, 1499, 1114, 3456, 628, 3843, 43, 13832, 16, 21394, 1139, 55, 1499, 1114, 3456, 358, 3843, 43, 13832, 16, 4766, 514, 8173, 16, 4766, 1250, 2710, 13, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2691, 2498, 12, 60, 55, 1499, 1114, 3456, 628, 3843, 43, 13832, 16, 21394, 1139, 55, 1499, 1114, 3456, 358, 3843, 43, 13832, 16, 4766, 514, 8173, 16, 4766, 1250, 2710, 13, 47...
}
}
public Class getColumnClass(int col) { switch(col) { case 0: case 1: return String.class; default: throw new InternalError(); } }
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/070a2aff60b9817ccdad0400810e0272f480e71f/DockingOptionPane.java/buggy/org/gjt/sp/jedit/options/DockingOptionPane.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1659, 6716, 797, 12, 474, 645, 13, 202, 95, 202, 202, 9610, 12, 1293, 13, 202, 202, 95, 202, 202, 3593, 374, 30, 202, 202, 3593, 404, 30, 1082, 202, 2463, 514, 18, 1106, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1659, 6716, 797, 12, 474, 645, 13, 202, 95, 202, 202, 9610, 12, 1293, 13, 202, 202, 95, 202, 202, 3593, 374, 30, 202, 202, 3593, 404, 30, 1082, 202, 2463, 514, 18, 1106, 3...
new org.apache.bcel.generic.Type[3];
new org.apache.bcel.generic.Type[4];
public void compileApplyImports(ClassGenerator classGen, int min, int max) { final XSLTC xsltc = classGen.getParser().getXSLTC(); final ConstantPoolGen cpg = classGen.getConstantPool(); final Vector names = xsltc.getNamesIndex(); // Clear some datastructures _namedTemplates = new Hashtable(); _neededTemplates = new Hashtable(); _templateIHs = new Hashtable(); _templateILs = new Hashtable(); _patternGroups = new Vector[32]; _rootPattern = null; // IMPORTANT: Save orignal & complete set of templates!!!! Vector oldTemplates = _templates; // Gather templates that are within the scope of this import _templates = new Vector(); final Enumeration templates = oldTemplates.elements(); while (templates.hasMoreElements()) { final Template template = (Template)templates.nextElement(); final int prec = template.getImportPrecedence(); if ((prec >= min) && (prec < max)) addTemplate(template); } // Process all patterns from those templates processPatterns(_keys); // Create the applyTemplates() method final org.apache.bcel.generic.Type[] argTypes = new org.apache.bcel.generic.Type[3]; argTypes[0] = Util.getJCRefType(DOM_INTF_SIG); argTypes[1] = Util.getJCRefType(NODE_ITERATOR_SIG); argTypes[2] = Util.getJCRefType(TRANSLET_OUTPUT_SIG); final String[] argNames = new String[3]; argNames[0] = DOCUMENT_PNAME; argNames[1] = ITERATOR_PNAME; argNames[2] = TRANSLET_OUTPUT_PNAME; final InstructionList mainIL = new InstructionList(); final MethodGenerator methodGen = new MethodGenerator(ACC_PUBLIC | ACC_FINAL, org.apache.bcel.generic.Type.VOID, argTypes, argNames, functionName()+'_'+max, getClassName(), mainIL, classGen.getConstantPool()); methodGen.addException("org.apache.xalan.xsltc.TransletException"); // Create the local variable to hold the current node final LocalVariableGen current; current = methodGen.addLocalVariable2("current", org.apache.bcel.generic.Type.INT, mainIL.getEnd()); _currentIndex = current.getIndex(); // Create the "body" instruction list that will eventually hold the // code for the entire method (other ILs will be appended). final InstructionList body = new InstructionList(); body.append(NOP); // Create an instruction list that contains the default next-node // iteration final InstructionList ilLoop = new InstructionList(); ilLoop.append(methodGen.loadIterator()); ilLoop.append(methodGen.nextNode()); ilLoop.append(DUP); ilLoop.append(new ISTORE(_currentIndex)); // The body of this code can get very large - large than can be handled // by a single IFNE(body.getStart()) instruction - need workaround: final BranchHandle ifeq = ilLoop.append(new IFLT(null)); final BranchHandle loop = ilLoop.append(new GOTO_W(null)); ifeq.setTarget(ilLoop.append(RETURN)); // applyTemplates() ends here! final InstructionHandle ihLoop = ilLoop.getStart(); // Compile default handling of elements (traverse children) InstructionList ilRecurse = compileDefaultRecursion(classGen, methodGen, ihLoop); InstructionHandle ihRecurse = ilRecurse.getStart(); // Compile default handling of text/attribute nodes (output text) InstructionList ilText = compileDefaultText(classGen, methodGen, ihLoop); InstructionHandle ihText = ilText.getStart(); // Distinguish attribute/element/namespace tests for further processing final int[] types = new int[DTM.NTYPES + names.size()]; for (int i = 0; i < types.length; i++) { types[i] = i; } final boolean[] isAttribute = new boolean[types.length]; final boolean[] isNamespace = new boolean[types.length]; for (int i = 0; i < names.size(); i++) { final String name = (String)names.elementAt(i); isAttribute[i+DTM.NTYPES] = isAttributeName(name); isNamespace[i+DTM.NTYPES] = isNamespaceName(name); } // Compile all templates - regardless of pattern type compileTemplateCalls(classGen, methodGen, ihLoop, min, max); // Handle template with explicit "*" pattern final TestSeq elemTest = _testSeq[DTM.ELEMENT_NODE]; InstructionHandle ihElem = ihRecurse; if (elemTest != null) { ihElem = elemTest.compile(classGen, methodGen, ihLoop); } // Handle template with explicit "@*" pattern final TestSeq attrTest = _testSeq[DTM.ATTRIBUTE_NODE]; InstructionHandle ihAttr = ihLoop; if (attrTest != null) { ihAttr = attrTest.compile(classGen, methodGen, ihAttr); } // Do tests for id() and key() patterns first InstructionList ilKey = null; if (_idxTestSeq != null) { loop.setTarget(_idxTestSeq.compile(classGen, methodGen, body.getStart())); ilKey = _idxTestSeq.getInstructionList(); } else { loop.setTarget(body.getStart()); } // If there is a match on node() we need to replace ihElem // and ihText if the priority of node() is higher if (_childNodeTestSeq != null) { // Compare priorities of node() and "*" double nodePrio = _childNodeTestSeq.getPriority(); int nodePos = _childNodeTestSeq.getPosition(); double elemPrio = (0 - Double.MAX_VALUE); int elemPos = Integer.MIN_VALUE; if (elemTest != null) { elemPrio = elemTest.getPriority(); elemPos = elemTest.getPosition(); } if (elemPrio == Double.NaN || elemPrio < nodePrio || (elemPrio == nodePrio && elemPos < nodePos)) { ihElem = _childNodeTestSeq.compile(classGen, methodGen, ihLoop); } // Compare priorities of node() and text() final TestSeq textTest = _testSeq[DTM.TEXT_NODE]; double textPrio = (0 - Double.MAX_VALUE); int textPos = Integer.MIN_VALUE; if (textTest != null) { textPrio = textTest.getPriority(); textPos = textTest.getPosition(); } if (textPrio == Double.NaN || textPrio < nodePrio || (textPrio == nodePrio && textPos < nodePos)) { ihText = _childNodeTestSeq.compile(classGen, methodGen, ihLoop); _testSeq[DTM.TEXT_NODE] = _childNodeTestSeq; } } // Handle templates with "ns:*" pattern InstructionHandle elemNamespaceHandle = ihElem; InstructionList nsElem = compileNamespaces(classGen, methodGen, isNamespace, isAttribute, false, ihElem); if (nsElem != null) elemNamespaceHandle = nsElem.getStart(); // Handle templates with "ns:@*" pattern InstructionList nsAttr = compileNamespaces(classGen, methodGen, isNamespace, isAttribute, true, ihAttr); InstructionHandle attrNamespaceHandle = ihAttr; if (nsAttr != null) attrNamespaceHandle = nsAttr.getStart(); // Handle templates with "ns:elem" or "ns:@attr" pattern final InstructionHandle[] targets = new InstructionHandle[types.length]; for (int i = DTM.NTYPES; i < targets.length; i++) { final TestSeq testSeq = _testSeq[i]; // Jump straight to namespace tests ? if (isNamespace[i]) { if (isAttribute[i]) targets[i] = attrNamespaceHandle; else targets[i] = elemNamespaceHandle; } // Test first, then jump to namespace tests else if (testSeq != null) { if (isAttribute[i]) targets[i] = testSeq.compile(classGen, methodGen, attrNamespaceHandle); else targets[i] = testSeq.compile(classGen, methodGen, elemNamespaceHandle); } else { targets[i] = ihLoop; } } // Handle pattern with match on root node - default: traverse children targets[DTM.ROOT_NODE] = _rootPattern != null ? getTemplateInstructionHandle(_rootPattern.getTemplate()) : ihRecurse; // Handle pattern with match on root node - default: traverse children targets[DTM.DOCUMENT_NODE] = _rootPattern != null ? getTemplateInstructionHandle(_rootPattern.getTemplate()) : ihRecurse; // %HZ%: Was ihLoop in XSLTC_DTM branch // Handle any pattern with match on text nodes - default: loop targets[DTM.TEXT_NODE] = _testSeq[DTM.TEXT_NODE] != null ? _testSeq[DTM.TEXT_NODE].compile(classGen, methodGen, ihText) : ihText; // This DOM-type is not in use - default: process next node targets[DTM.NAMESPACE_NODE] = ihLoop; // Match unknown element in DOM - default: check for namespace match targets[DTM.ELEMENT_NODE] = elemNamespaceHandle; // Match unknown attribute in DOM - default: check for namespace match targets[DTM.ATTRIBUTE_NODE] = attrNamespaceHandle; // Match on processing instruction - default: loop InstructionHandle ihPI = ihLoop; if (_childNodeTestSeq != null) ihPI = ihElem; if (_testSeq[DTM.PROCESSING_INSTRUCTION_NODE] != null) { targets[DTM.PROCESSING_INSTRUCTION_NODE] = _testSeq[DTM.PROCESSING_INSTRUCTION_NODE]. compile(classGen, methodGen, ihPI); } else { targets[DTM.PROCESSING_INSTRUCTION_NODE] = ihPI; } // Match on comments - default: process next node InstructionHandle ihComment = ihLoop; if (_childNodeTestSeq != null) ihComment = ihElem; targets[DTM.COMMENT_NODE] = _testSeq[DTM.COMMENT_NODE] != null ? _testSeq[DTM.COMMENT_NODE].compile(classGen, methodGen, ihComment) : ihComment; // This DOM-type is not in use - default: process next node targets[DTM.CDATA_SECTION_NODE] = ihLoop; // This DOM-type is not in use - default: process next node targets[DTM.DOCUMENT_FRAGMENT_NODE] = ihLoop; // This DOM-type is not in use - default: process next node targets[DTM.DOCUMENT_TYPE_NODE] = ihLoop; // This DOM-type is not in use - default: process next node targets[DTM.ENTITY_NODE] = ihLoop; // This DOM-type is not in use - default: process next node targets[DTM.ENTITY_REFERENCE_NODE] = ihLoop; // This DOM-type is not in use - default: process next node targets[DTM.NOTATION_NODE] = ihLoop; // Now compile test sequences for various match patterns: for (int i = DTM.NTYPES; i < targets.length; i++) { final TestSeq testSeq = _testSeq[i]; // Jump straight to namespace tests ? if ((testSeq == null) || (isNamespace[i])) { if (isAttribute[i]) targets[i] = attrNamespaceHandle; else targets[i] = elemNamespaceHandle; } // Match on node type else { if (isAttribute[i]) targets[i] = testSeq.compile(classGen, methodGen, attrNamespaceHandle); else targets[i] = testSeq.compile(classGen, methodGen, elemNamespaceHandle); } } if (ilKey != null) body.insert(ilKey); // Append first code in applyTemplates() - get type of current node final int getType = cpg.addInterfaceMethodref(DOM_INTF, "getExpandedTypeID", "(I)I"); body.append(methodGen.loadDOM()); body.append(new ILOAD(_currentIndex)); body.append(new INVOKEINTERFACE(getType, 2)); // Append switch() statement - main dispatch loop in applyTemplates() InstructionHandle disp = body.append(new SWITCH(types,targets,ihLoop)); // Append all the "case:" statements appendTestSequences(body); // Append the actual template code appendTemplateCode(body); // Append NS:* node tests (if any) if (nsElem != null) body.append(nsElem); // Append NS:@* node tests (if any) if (nsAttr != null) body.append(nsAttr); // Append default action for element and root nodes body.append(ilRecurse); // Append default action for text and attribute nodes body.append(ilText); // putting together constituent instruction lists mainIL.append(new GOTO_W(ihLoop)); mainIL.append(body); // fall through to ilLoop mainIL.append(ilLoop); peepHoleOptimization(methodGen); methodGen.stripAttributes(true); methodGen.setMaxLocals(); methodGen.setMaxStack(); methodGen.removeNOPs(); classGen.addMethod(methodGen.getMethod()); // Restore original (complete) set of templates for this transformation _templates = oldTemplates; }
2723 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2723/5e32b6859ae6e947331cfccd543d67bba0374ba6/Mode.java/clean/src/org/apache/xalan/xsltc/compiler/Mode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 4074, 7001, 13347, 12, 797, 3908, 667, 7642, 16, 509, 1131, 16, 509, 943, 13, 288, 202, 6385, 17243, 15988, 20791, 5111, 273, 667, 7642, 18, 588, 2678, 7675, 588, 60, 4559, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 7001, 13347, 12, 797, 3908, 667, 7642, 16, 509, 1131, 16, 509, 943, 13, 288, 202, 6385, 17243, 15988, 20791, 5111, 273, 667, 7642, 18, 588, 2678, 7675, 588, 60, 4559, 1...
m_messageManager.send(msg, (m_diceRollerPlayer1.getName() + "RandomDest"));
m_messageManager.send(msg, (m_remotePlayer.getName() + "RandomDest"));
private void startRandomGen(int max) { Message msg = new RandomNumberMessage(RandomNumberMessage.SEND_TRIPLET, new Integer(max)); // Send maximum value, request triplet msg = m_messageManager.send(msg, (m_diceRollerPlayer1.getName() + "RandomDest")); // send triplet, request triplet ((RandomNumberMessage)msg).m_request = RandomNumberMessage.SEND_TRIPLET; msg = m_messageManager.send(msg, (m_diceRollerPlayer2.getName() + "RandomDest")); // send triplet, request key ((RandomNumberMessage)msg).m_request = RandomNumberMessage.SEND_KEY; msg = m_messageManager.send(msg, (m_diceRollerPlayer1.getName() + "RandomDest")); // send key, request key ((RandomNumberMessage)msg).m_request = RandomNumberMessage.SEND_KEY; msg = m_messageManager.send(msg, (m_diceRollerPlayer2.getName() + "RandomDest")); // send key, request nothing ((RandomNumberMessage)msg).m_request = RandomNumberMessage.NO_REQUEST; m_messageManager.send(msg, (m_diceRollerPlayer1.getName() + "RandomDest")); }
8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/926b26d87cea0c3eea5a5d28fc85f16a6e973f4b/CryptoRandomSource.java/buggy/src/games/strategy/engine/random/CryptoRandomSource.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 3238, 918, 787, 8529, 7642, 12, 474, 943, 13, 282, 288, 377, 2350, 1234, 273, 394, 8072, 1854, 1079, 12, 8529, 1854, 1079, 18, 21675, 67, 6566, 52, 15146, 16, 4766, 6647, 394, 2144, 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, 565, 3238, 918, 787, 8529, 7642, 12, 474, 943, 13, 282, 288, 377, 2350, 1234, 273, 394, 8072, 1854, 1079, 12, 8529, 1854, 1079, 18, 21675, 67, 6566, 52, 15146, 16, 4766, 6647, 394, 2144, 12,...
if (!rep.connect(APP_NAME))
try { rep.connect(APP_NAME); } catch(KettleException ke)
public void openRepository() { int perms[] = new int[] { PermissionMeta.TYPE_PERMISSION_TRANSFORMATION }; RepositoriesDialog rd = new RepositoriesDialog(disp, SWT.NONE, perms, APP_NAME); rd.getShell().setImage(GUIResource.getInstance().getImageSpoon()); if (rd.open()) { // Close previous repository... if (rep!=null) { rep.disconnect(); } rep = new Repository(log, rd.getRepository(), rd.getUser()); if (!rep.connect(APP_NAME)) { rep=null; MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR ); mb.setMessage(Messages.getString("Spoon.Dialog.ErrorConnectingRepository.Message",Const.CR));//"An error occured connecting to the repository!"+Const.CR+"See the log for more information." mb.setText(Messages.getString("Spoon.Dialog.ErrorConnectingRepository.Title")); mb.open(); } // Set for the existing databases, the ID's at -1! for (int i=0;i<transMeta.nrDatabases();i++) { transMeta.getDatabase(i).setID(-1L); } // Set for the existing transformation the ID at -1! transMeta.setID(-1L); // Keep track of the old databases for now. ArrayList oldDatabases = transMeta.getDatabases(); // In order to re-match the databases on name (not content), we need to load the databases from the new repository. // NOTE: for purposes such as DEVELOP - TEST - PRODUCTION sycles. // first clear the list of databases. transMeta.setDatabases(new ArrayList()); // Read them from the new repository. readDatabases(); /* for (int i=0;i<transMeta.nrDatabases();i++) { System.out.println("NEW REP: ["+transMeta.getDatabase(i).getName()+"]"); } */ // Then we need to re-match the databases at save time... for (int i=0;i<oldDatabases.size();i++) { DatabaseMeta oldDatabase = (DatabaseMeta) oldDatabases.get(i); DatabaseMeta newDatabase = Const.findDatabase(transMeta.getDatabases(), oldDatabase.getName()); // If it exists, change the settings... if (newDatabase!=null) { // System.out.println("Found the new database in the repository ["+oldDatabase.getName()+"]"); // A database connection with the same name exists in the new repository. // Change the old connections to reflect the settings in the new repository oldDatabase.setDatabaseInterface(newDatabase.getDatabaseInterface()); } else { // System.out.println("Couldn't find the new database in the repository ["+oldDatabase.getName()+"]"); // The old database is not present in the new repository: simply add it to the list. // When the transformation gets saved, it will be added to the repository. transMeta.addDatabase(oldDatabase); } } // For the existing transformation, change the directory too: // Try to find the same directory in the new repository... RepositoryDirectory redi = rep.getDirectoryTree().findDirectory(transMeta.getDirectory().getPath()); if (redi!=null) { transMeta.setDirectory(redi); } else { transMeta.setDirectory(rep.getDirectoryTree()); // the root is the default! } refreshTree(true); setShellText(); } else { // Not cancelled? --> Clear repository... if (!rd.isCancelled()) { closeRepository(); } } }
9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/3a2df5a023141b1c36f88750aac89ca168a7c491/Spoon.java/buggy/src/be/ibridge/kettle/spoon/Spoon.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1696, 3305, 1435, 565, 288, 3639, 509, 13793, 8526, 273, 394, 509, 8526, 288, 8509, 2781, 18, 2399, 67, 23330, 67, 16596, 23805, 289, 31, 3639, 30111, 6353, 9437, 273, 394, 301...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1696, 3305, 1435, 565, 288, 3639, 509, 13793, 8526, 273, 394, 509, 8526, 288, 8509, 2781, 18, 2399, 67, 23330, 67, 16596, 23805, 289, 31, 3639, 30111, 6353, 9437, 273, 394, 301...
String re ="Re:"; int index = subj.indexOf(re); while(index > -1){ subj = subj.substring(0, index) + "RE:" + subj.substring(index + re.length() + 1); index = subj.indexOf(re); } re ="RE:"; index = subj.indexOf(re,re.length()); while(index > 0){ subj = subj.substring(0, index) + subj.substring(index + re.length() + 1); index = subj.indexOf(re,1); } index = subj.indexOf(prefix); if (index > -1) { if (index == 0) { subj = prefix + subj.substring(index + prefix.length()); } else { subj = prefix + subj.substring(0, index) + subj.substring(index + prefix.length()); } } else { subj = prefix + subj; }
subj = normalizeSubject(subj, prefix);
public final void service(Mail mail) throws MessagingException { try { Collection members = new Vector(); members.addAll(getMembers()); //Check for members only flag.... if (isMembersOnly() && !members.contains(mail.getSender())) { //Need to bounce the message to say they can't send to this list getMailetContext().bounce(mail, "Only members of this listserv are allowed to send a message to this address."); mail.setState(Mail.GHOST); return; } //Check for no attachments if (!isAttachmentsAllowed() && mail.getMessage().getContent() instanceof MimeMultipart) { getMailetContext().bounce(mail, "You cannot send attachments to this listserv."); mail.setState(Mail.GHOST); return; } //Create a copy of this message to send out MimeMessage message = new MimeMessage(mail.getMessage()); //We need to remove this header from the copy we're sending around message.removeHeader(RFC2822Headers.RETURN_PATH); //Figure out the listserv address. MailAddress listservAddr = getListservAddress(); if (listservAddr == null) { //Use the recipient listservAddr = (MailAddress)mail.getRecipients().iterator().next(); } //Check if the X-been-there header is set to the listserv's name // (the address). If it has, this means it's a message from this // listserv that's getting bounced back, so we need to swallow it if (listservAddr.equals(message.getHeader("X-been-there"))) { mail.setState(Mail.GHOST); return; } //Set the subject if set String prefix = getSubjectPrefix(); if (prefix != null) { if (isPrefixAutoBracketed()) { StringBuffer prefixBuffer = new StringBuffer(64) .append("[") .append(prefix) .append("]"); prefix = prefixBuffer.toString(); } String subj = message.getSubject(); if (subj == null) { subj = ""; } //replace Re: with RE: String re ="Re:"; int index = subj.indexOf(re); while(index > -1){ subj = subj.substring(0, index) + "RE:" + subj.substring(index + re.length() + 1); index = subj.indexOf(re); } //reduce them to one at the beginning re ="RE:"; index = subj.indexOf(re,re.length()); while(index > 0){ subj = subj.substring(0, index) + subj.substring(index + re.length() + 1); index = subj.indexOf(re,1); } //If the "prefix" is in the subject line, remove it and everything before it index = subj.indexOf(prefix); if (index > -1) { if (index == 0) { subj = prefix + subj.substring(index + prefix.length()); } else { subj = prefix + subj.substring(0, index) + subj.substring(index + prefix.length()); } } else { subj = prefix + subj; } message.setSubject(subj); } //If replies should go to this list, we need to set the header if (isReplyToList()) { message.setHeader(RFC2822Headers.REPLY_TO, listservAddr.toString()); } //We're going to set this special header to avoid bounces // getting sent back out to the list message.setHeader("X-been-there", listservAddr.toString()); //Send the message to the list members //We set the postmaster as the sender for now so bounces go to him/her getMailetContext().sendMail(getMailetContext().getPostmaster(), members, message); //Kill the old message mail.setState(Mail.GHOST); } catch (IOException ioe) { throw new MailetException("Error creating listserv message", ioe); } }
47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/c26700239f2e90a5a5b9cf38bc479e9bd3587d7a/GenericListserv.java/clean/trunk/src/java/org/apache/james/transport/mailets/GenericListserv.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 727, 918, 1156, 12, 6759, 4791, 13, 1216, 23794, 503, 288, 3639, 775, 288, 5411, 2200, 4833, 273, 394, 5589, 5621, 5411, 4833, 18, 1289, 1595, 12, 588, 6918, 10663, 5411, 368, 1564,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 727, 918, 1156, 12, 6759, 4791, 13, 1216, 23794, 503, 288, 3639, 775, 288, 5411, 2200, 4833, 273, 394, 5589, 5621, 5411, 4833, 18, 1289, 1595, 12, 588, 6918, 10663, 5411, 368, 1564,...
return valid;
return (invalidReason == null);
private boolean isValid(GarlicClove clove) { boolean valid = _context.messageValidator().validateMessage(clove.getCloveId(), clove.getExpiration().getTime()); if (!valid) { String howLongAgo = DataHelper.formatDuration(_context.clock().now()-clove.getExpiration().getTime()); if (_log.shouldLog(Log.ERROR)) _log.error("Clove is NOT valid: id=" + clove.getCloveId() + " expiration " + howLongAgo + " ago"); if (_log.shouldLog(Log.WARN)) _log.warn("Clove is NOT valid: id=" + clove.getCloveId() + " expiration " + howLongAgo + " ago", new Exception("Invalid within...")); _context.messageHistory().messageProcessingError(clove.getCloveId(), clove.getData().getClass().getName(), "Clove is not valid (expiration " + howLongAgo + " ago)"); } return valid; }
3808 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3808/d74aa6e53db101dcab9bf76b9279dc44df63637d/GarlicMessageReceiver.java/buggy/router/java/src/net/i2p/router/message/GarlicMessageReceiver.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 4908, 12, 43, 13007, 335, 4082, 537, 1219, 537, 13, 288, 3639, 1250, 923, 273, 389, 2472, 18, 2150, 5126, 7675, 5662, 1079, 12, 7550, 537, 18, 588, 4082, 537, 548, 9334, 476...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 1250, 4908, 12, 43, 13007, 335, 4082, 537, 1219, 537, 13, 288, 3639, 1250, 923, 273, 389, 2472, 18, 2150, 5126, 7675, 5662, 1079, 12, 7550, 537, 18, 588, 4082, 537, 548, 9334, 476...
LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_redo); action.setToolTipText(WorkbenchMessages.Workbench_redoToolTip); window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.edit.redo"); ISharedImages sharedImages = window.getWorkbench() .getSharedImages(); action.setImageDescriptor(sharedImages .getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); action.setDisabledImageDescriptor(sharedImages .getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED));
IWorkbenchAction action = new QuitAction(window); action.setId(getId());
public IWorkbenchAction create(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } LabelRetargetAction action = new LabelRetargetAction(getId(),WorkbenchMessages.Workbench_redo); action.setToolTipText(WorkbenchMessages.Workbench_redoToolTip); window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.edit.redo"); //$NON-NLS-1$ ISharedImages sharedImages = window.getWorkbench() .getSharedImages(); action.setImageDescriptor(sharedImages .getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); action.setDisabledImageDescriptor(sharedImages .getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED)); return action; }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/dde25e2c5d25803300d3e725ba305dd0140f61ea/ActionFactory.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 467, 2421, 22144, 1803, 752, 12, 45, 2421, 22144, 3829, 2742, 13, 288, 5411, 309, 261, 5668, 422, 446, 13, 288, 7734, 604, 394, 2754, 5621, 5411, 289, 5411, 5287, 7055, 826, 1803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 467, 2421, 22144, 1803, 752, 12, 45, 2421, 22144, 3829, 2742, 13, 288, 5411, 309, 261, 5668, 422, 446, 13, 288, 7734, 604, 394, 2754, 5621, 5411, 289, 5411, 5287, 7055, 826, 1803, ...
declarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, declarations, declaration );
if (declaration != null) { declarationsPos++; declarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, declarations, declaration ); }
public void addMemberDeclaration(IASTDeclaration declaration) { declarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, declarations, declaration ); }
54911 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54911/8a37c61a8cf7ad9a8e5afee104a5b301a0555dbb/CASTCompositeTypeSpecifier.java/buggy/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 4419, 6094, 12, 45, 9053, 6094, 8266, 13, 288, 3639, 309, 261, 22448, 480, 446, 13, 288, 12312, 1616, 9904, 31, 12312, 273, 261, 45, 9053, 6094, 63, 5717, 27207, 18, 692...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 4419, 6094, 12, 45, 9053, 6094, 8266, 13, 288, 3639, 309, 261, 22448, 480, 446, 13, 288, 12312, 1616, 9904, 31, 12312, 273, 261, 45, 9053, 6094, 63, 5717, 27207, 18, 692...
if (PreferencesEntry.CONFIG_SHOW_PREVIEW_PANEL.getValueBoolean(getController())) { PreviewPanel previewPanel = new PreviewPanel(getController(), selectionModel, this); FormLayout layout = new FormLayout("pref, fill:pref:grow", "3dlu, pref, fill:pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(null, cc.xy(1, 2)); builder.add(fileDetailsPanel.getEmbeddedPanel(), cc.xy(1, 3)); builder.add(previewPanel.getUIComponent(), cc.xy(2, 3)); builder.addSeparator(null, cc.xy(1, 4)); return builder.getPanel(); }
if (PreferencesEntry.CONFIG_SHOW_PREVIEW_PANEL .getValueBoolean(getController())) { PreviewPanel previewPanel = new PreviewPanel(getController(), selectionModel, this); FormLayout layout = new FormLayout("pref, fill:pref:grow", "3dlu, pref, fill:pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(null, cc.xy(1, 2)); builder.add(fileDetailsPanel.getEmbeddedPanel(), cc.xy(1, 3)); builder.add(previewPanel.getUIComponent(), cc.xy(2, 3)); builder.addSeparator(null, cc.xy(1, 4)); return builder.getPanel(); }
private JComponent createFileDetailsPanel() { FileDetailsPanel fileDetailsPanel = new FileDetailsPanel( getController(), selectionModel); Preferences pref = getController().getPreferences(); // check property to enable preview // preview of images is memory hungry // may cause OutOfMemoryErrors if (PreferencesEntry.CONFIG_SHOW_PREVIEW_PANEL.getValueBoolean(getController())) { PreviewPanel previewPanel = new PreviewPanel(getController(), selectionModel, this); FormLayout layout = new FormLayout("pref, fill:pref:grow", "3dlu, pref, fill:pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(null, cc.xy(1, 2)); builder.add(fileDetailsPanel.getEmbeddedPanel(), cc.xy(1, 3)); builder.add(previewPanel.getUIComponent(), cc.xy(2, 3)); builder.addSeparator(null, cc.xy(1, 4)); return builder.getPanel(); } FormLayout layout = new FormLayout("fill:pref:grow", "3dlu, pref, fill:pref, pref"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(null, cc.xy(1, 2)); builder.add(fileDetailsPanel.getEmbeddedPanel(), cc.xy(1, 3)); builder.addSeparator(null, cc.xy(1, 4)); return builder.getPanel(); }
51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/f498372715e78e2b8c03090a0989446405501447/DirectoryPanel.java/buggy/src/main/de/dal33t/powerfolder/ui/folder/DirectoryPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 29058, 21266, 3790, 5537, 1435, 288, 3639, 1387, 3790, 5537, 585, 3790, 5537, 273, 394, 1387, 3790, 5537, 12, 5411, 13455, 9334, 4421, 1488, 1769, 3639, 28310, 11307, 273, 13455, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 29058, 21266, 3790, 5537, 1435, 288, 3639, 1387, 3790, 5537, 585, 3790, 5537, 273, 394, 1387, 3790, 5537, 12, 5411, 13455, 9334, 4421, 1488, 1769, 3639, 28310, 11307, 273, 13455, 7675, ...
return Preferences.getString(Preferences.PREF_EOGENERATOR_JAVA_TEMPLATE); }
return Preferences .getString(Preferences.PREF_EOGENERATOR_JAVA_TEMPLATE); }
public static String getEOGeneratorJavaTemplate() { return Preferences.getString(Preferences.PREF_EOGENERATOR_JAVA_TEMPLATE); }
50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/9ab4eab0b7578467e879dfd3177e4e214e2053fe/Preferences.java/clean/wolips/plugins/org.objectstyle.wolips.preferences/java/org/objectstyle/wolips/preferences/Preferences.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 760, 514, 4774, 51, 3908, 5852, 2283, 1435, 288, 565, 327, 28310, 18, 588, 780, 12, 12377, 18, 3670, 42, 67, 41, 13369, 8196, 3575, 67, 27264, 67, 12205, 1769, 225, 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, 282, 1071, 760, 514, 4774, 51, 3908, 5852, 2283, 1435, 288, 565, 327, 28310, 18, 588, 780, 12, 12377, 18, 3670, 42, 67, 41, 13369, 8196, 3575, 67, 27264, 67, 12205, 1769, 225, 289, 2, -100, ...
} else if(cmd.equals("Step Over")) {
} else if (cmd.equals("Step Over")) {
void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); int returnValue = -1; if(cmd.equals("Cut") || cmd.equals("Copy") || cmd.equals("Paste")) { JInternalFrame f = getSelectedFrame(); if(f != null && f instanceof ActionListener) { ((ActionListener)f).actionPerformed(e); } } else if(cmd.equals("Step Over")) { returnValue = STEP_OVER; } else if(cmd.equals("Step Into")) { returnValue = STEP_INTO; } else if(cmd.equals("Step Out")) { returnValue = STEP_OUT; } else if(cmd.equals("Go")) { returnValue = GO; } else if(cmd.equals("Break")) { doBreak(); } else if(cmd.equals("Run to Cursor")) { returnValue = RUN_TO_CURSOR; } else if(cmd.equals("Exit")) { Exit(); } else if(cmd.equals("Open")) { Scriptable scope = getScope(); if(scope == null) { MessageDialogWrapper.showMessageDialog(this, "Can't compile scripts: no scope available", "Open", JOptionPane.ERROR_MESSAGE); } else { String fileName = chooseFile("Select a file to compile"); if(fileName != null) { new Thread(new OpenFile(this, scope, fileName)).start(); } } } else if(cmd.equals("Load")) { Scriptable scope = getScope(); if(scope == null) { MessageDialogWrapper.showMessageDialog(this, "Can't run scripts: no scope available", "Run", JOptionPane.ERROR_MESSAGE); } else { String fileName = chooseFile("Select a file to execute"); if(fileName != null) { new Thread(new LoadFile(this, scope, fileName)).start(); } } } else if(cmd.equals("More Windows...")) { MoreWindows dlg = new MoreWindows(this, fileWindows, "Window", "Files"); dlg.showDialog(this); } else if(cmd.equals("Console")) { if(console.isIcon()) { desk.getDesktopManager().deiconifyFrame(console); } console.show(); desk.getDesktopManager().activateFrame(console); console.consoleTextArea.requestFocus(); } else if(cmd.equals("Cut")) { } else if(cmd.equals("Copy")) { } else if(cmd.equals("Paste")) { } else if(cmd.equals("Go to function...")) { FindFunction dlg = new FindFunction(this, functionMap, "Go to function", "Function"); dlg.showDialog(this); } else if(cmd.equals("Tile")) { JInternalFrame[] frames = desk.getAllFrames(); int count = frames.length; int rows, cols; rows = cols = (int)Math.sqrt(count); if(rows*cols < count) { cols++; if(rows * cols < count) { rows++; } } Dimension size = desk.getSize(); int w = size.width/cols; int h = size.height/rows; int x = 0; int y = 0; for(int i = 0; i < rows; i++) { for(int j = 0; j < cols; j++) { int index = (i*cols) + j; if(index >= frames.length) { break; } JInternalFrame f = frames[index]; try { f.setIcon(false); f.setMaximum(false); } catch (Exception exc) { } desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h); x += w; } y += h; x = 0; } } else if(cmd.equals("Cascade")) { JInternalFrame[] frames = desk.getAllFrames(); int count = frames.length; int x, y, w, h; x = y = 0; h = desk.getHeight(); int d = h / count; if(d > 30) d = 30; for(int i = count -1; i >= 0; i--, x += d, y += d) { JInternalFrame f = frames[i]; try { f.setIcon(false); f.setMaximum(false); } catch (Exception exc) { } Dimension dimen = f.getPreferredSize(); w = dimen.width; h = dimen.height; desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h); } } else { Object obj = getFileWindow(cmd); if(obj != null) { FileWindow w = (FileWindow)obj; try { if(w.isIcon()) { w.setIcon(false); } w.setVisible(true); w.moveToFront(); w.setSelected(true); } catch(Exception exc) { } } } if(returnValue != -1) { if(currentWindow != null) currentWindow.setPosition(-1); synchronized(monitor) { this.returnValue = returnValue; monitor.notify(); } } }
19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/bebd557da53b74c60ab8525aa96904d4cee6224c/Main.java/buggy/toolsrc/org/mozilla/javascript/tools/debugger/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 26100, 12, 1803, 1133, 425, 13, 288, 3639, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 3639, 509, 7750, 273, 300, 21, 31, 3639, 309, 12, 4172, 18, 14963, 2932, 15812, 7923, 747...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 26100, 12, 1803, 1133, 425, 13, 288, 3639, 514, 1797, 273, 425, 18, 588, 1803, 2189, 5621, 3639, 509, 7750, 273, 300, 21, 31, 3639, 309, 12, 4172, 18, 14963, 2932, 15812, 7923, 747...
if (restriction && content != null) { fFacetInfo fi = traverseFacets(content, contentAttrs,nameProperty, baseValidator, schemaDoc, grammar);
XSFacets facetData = null; short presentFacets = 0; short fixedFacets = 0 ; if (restriction && content != null) { FacetInfo fi = traverseFacets(content, contentAttrs,nameProperty, baseValidator, schemaDoc, grammar);
private DatatypeValidator traverseSimpleTypeDecl(Element simpleTypeDecl, Object[] attrValues, XSDocumentInfo schemaDoc, SchemaGrammar grammar, boolean isGlobal) { String nameProperty = (String)attrValues[XSAttributeChecker.ATTIDX_NAME]; String qualifiedName = nameProperty; Hashtable fFacetData = null; //--------------------------------------------------- // set qualified name //--------------------------------------------------- if (nameProperty == null) { // anonymous simpleType qualifiedName = schemaDoc.fTargetNamespace == null? ",#s#"+(fSimpleTypeAnonCount++): schemaDoc.fTargetNamespace+",#S#"+(fSimpleTypeAnonCount++); //REVISIT: // add to symbol table? } else { qualifiedName = schemaDoc.fTargetNamespace == null? ","+nameProperty: schemaDoc.fTargetNamespace+","+nameProperty; //REVISIT: // add to symbol table? } //---------------------------------------------------------- // REVISIT! // update _final_ registry //---------------------------------------------------------- XInt finalAttr = (XInt)attrValues[XSAttributeChecker.ATTIDX_FINAL]; int finalProperty = finalAttr == null ? schemaDoc.fFinalDefault : finalAttr.intValue(); //---------------------------------------------------------------------- //annotation?,(list|restriction|union) //---------------------------------------------------------------------- Element content = DOMUtil.getFirstChildElement(simpleTypeDecl); if (content != null) { // traverse annotation if any if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(content, attrValues, false, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } } if (content == null) { reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"}); return null; } // General Attribute Checking Object[] contentAttrs = fAttrChecker.checkAttributes(content, false, schemaDoc); // REVISIT: when to return the array fAttrChecker.returnAttrArray(contentAttrs, schemaDoc); //---------------------------------------------------------------------- //use content.getLocalName for the cases there "xsd:" is a prefix, ei. "xsd:list" //---------------------------------------------------------------------- String varietyProperty = DOMUtil.getLocalName(content); //content.getLocalName(); QName baseTypeName = null; Vector memberTypes = null; Vector dTValidators = null; int size = 0; boolean list = false; boolean union = false; boolean restriction = false; int numOfTypes = 0; //list/restriction = 1, union = "+" if (varietyProperty.equals(SchemaSymbols.ELT_LIST)) { //traverse List baseTypeName = (QName)contentAttrs[XSAttributeChecker.ATTIDX_ITEMTYPE]; list = true; if (fListName.length() != 0) { // parent is <list> datatype reportCosListOfAtomic(nameProperty); return null; } else { fListName = qualifiedName; } } else if (varietyProperty.equals(SchemaSymbols.ELT_RESTRICTION)) { //traverse Restriction baseTypeName = (QName)contentAttrs[XSAttributeChecker.ATTIDX_BASE]; //content.getAttribute( SchemaSymbols.ATT_BASE ); restriction= true; } else if (varietyProperty.equals(SchemaSymbols.ELT_UNION)) { //traverse union union = true; memberTypes = (Vector)contentAttrs[XSAttributeChecker.ATTIDX_MEMBERTYPES]; //content.getAttribute( SchemaSymbols.ATT_MEMBERTYPES); if (memberTypes != null) { size = memberTypes.size(); } else { size = 1; //at least one must be seen as <simpleType> decl } dTValidators = new Vector (size, 2); } else { Object[] args = { varietyProperty}; reportSchemaError("dt-unsupported-derivation", args); } if (DOMUtil.getNextSiblingElement(content) != null) { reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"}); } DatatypeValidator baseValidator = null; if (baseTypeName == null && memberTypes == null) { //--------------------------- //must 'see' <simpleType> //--------------------------- //content = {annotation?,simpleType?...} content = DOMUtil.getFirstChildElement(content); //check content (annotation?, ...) if (content != null) { // traverse annotation if any if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(content, attrValues, false, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } } if (content == null) { reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"}); return null; } if (DOMUtil.getLocalName(content).equals( SchemaSymbols.ELT_SIMPLETYPE )) { baseValidator = traverseLocal(content, schemaDoc, grammar); if (baseValidator != null && union) { dTValidators.addElement((DatatypeValidator)baseValidator); } if (baseValidator == null) { Object[] args = {content.getAttribute( SchemaSymbols.ATT_BASE )}; reportSchemaError("dt-unknown-basetype", args); return (DatatypeValidator)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_STRING); } } else { Object[] args = { simpleTypeDecl.getAttribute( SchemaSymbols.ATT_NAME )}; reportSchemaError("dt-simpleType",new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"}); return (DatatypeValidator)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_STRING); } } //end - must see simpleType? else { //----------------------------- //base was provided - get proper validator. //----------------------------- numOfTypes = 1; if (union) { numOfTypes= size; } //-------------------------------------------------------------------- // this loop is also where we need to find out whether the type being used as // a base (or itemType or whatever) allows such things. //-------------------------------------------------------------------- int baseRefContext = (restriction? SchemaSymbols.RESTRICTION:0); baseRefContext = baseRefContext | (union? SchemaSymbols.UNION:0); baseRefContext = baseRefContext | (list ? SchemaSymbols.LIST:0); for (int i=0; i<numOfTypes; i++) { //find all validators if (union) { baseTypeName = (QName)memberTypes.elementAt(i); } baseValidator = findDTValidator ( simpleTypeDecl, baseTypeName, baseRefContext, schemaDoc); if (baseValidator == null) { Object[] args = { content.getAttribute( SchemaSymbols.ATT_BASE ), nameProperty}; reportSchemaError("dt-unknown-basetype", args); baseValidator = (DatatypeValidator)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_STRING); } // ------------------------------ // (variety is list)cos-list-of-atomic // ------------------------------ if (fListName.length() != 0) { if (baseValidator instanceof ListDatatypeValidator) { reportCosListOfAtomic(nameProperty); return null; } //----------------------------------------------------- // if baseValidator is of type (union) need to look // at Union validators to make sure that List is not one of them //----------------------------------------------------- if (isListDatatype(baseValidator)) { reportCosListOfAtomic(nameProperty); return null; } } if (union) { dTValidators.addElement((DatatypeValidator)baseValidator); //add validator to structure } } } //end - base is available // ------------------------------------------ // move to next child // <base==empty)->[simpleType]->[facets] OR // <base!=empty)->[facets] // ------------------------------------------ if (baseTypeName == null) { content = DOMUtil.getNextSiblingElement( content ); } else { content = DOMUtil.getFirstChildElement(content); if (content != null) { // traverse annotation if any if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(content, attrValues, false, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } } } // ------------------------------------------ //get more types for union if any // ------------------------------------------ if (union) { int index=size; if (memberTypes != null) { if (content != null) { // traverse annotation if any if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(content, attrValues, false, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } } if (content !=null) { if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { Object[] args = {nameProperty}; reportSchemaError("dt-union-memberType", args); } } } while (content!=null) { baseValidator = traverseLocal(content, schemaDoc, grammar); if (baseValidator != null) { if (fListName.length() != 0 && baseValidator instanceof ListDatatypeValidator) { reportCosListOfAtomic(nameProperty); return null; } dTValidators.addElement((DatatypeValidator)baseValidator); } if (baseValidator == null) { Object[] args = { content.getAttribute( SchemaSymbols.ATT_BASE ), nameProperty}; reportSchemaError("dt-unknown-basetype", args); baseValidator = (DatatypeValidator)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_STRING); } content = DOMUtil.getNextSiblingElement( content ); } } // end - traverse Union if (fListName.length() != 0) { // reset fListName, meaning that we are done with // traversing <list> and its itemType resolves to atomic value if (fListName.equals(qualifiedName)) { fListName = SchemaSymbols.EMPTY_STRING; } } if (restriction && content != null) { fFacetInfo fi = traverseFacets(content, contentAttrs,nameProperty, baseValidator, schemaDoc, grammar); content = fi.nodeAfterFacets; if (content != null) { content = null; reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_RESTRICTION, "(annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*))"}); } fFacetData = fi.facetdata; } else if (list && content!=null) { // report error - must not have any children! if (baseTypeName !=null) { // traverse annotation if any if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) { traverseAnnotationDecl(content, attrValues, false, schemaDoc); content = DOMUtil.getNextSiblingElement(content); } if (content !=null) { Object[] args = {nameProperty}; reportSchemaError("dt-list-itemType", args); } } else { reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_LIST, "(annotation?, (simpleType?))"}); } } else if (union && content!=null) { //report error - must not have any children! reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_UNION, "(annotation?, (simpleType?))"}); } // REVISIT: constructors in the datatypes rely on the fact that facets hashtable is not null. // (see inheriting base type facets). if (fFacetData== null) { fFacetData = new Hashtable(); } DatatypeValidator newDV = null; if (list) { newDV = new ListDatatypeValidator(baseValidator, fFacetData, true, fErrorReporter); } else if (restriction) { fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport); // REVISIT: after using the new simpleType interfaces, should be: //stype = dvFactory.create(...); //stype.applyFacets(..., fValidationState); newDV = createRestrictedValidator(baseValidator, fFacetData, fErrorReporter); } else { //union newDV = new UnionDatatypeValidator(dTValidators, fErrorReporter); } // don't add global components without name to the grammar if (nameProperty == null && isGlobal) { return null; } if (newDV != null && isGlobal) { newDV.setFinalSet(finalProperty); ((AbstractDatatypeValidator)newDV).fLocalName = nameProperty; grammar.addGlobalTypeDecl(newDV); } return newDV; }
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/71823bb76fbbe51476f8c4f76984133133ae289e/XSDSimpleTypeTraverser.java/buggy/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 21168, 5126, 10080, 5784, 559, 3456, 12, 1046, 4143, 559, 3456, 16, 1033, 8526, 1604, 1972, 16, 4766, 5397, 1139, 55, 2519, 966, 1963, 1759, 16, 4766, 5397, 4611, 18576, 6473, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 21168, 5126, 10080, 5784, 559, 3456, 12, 1046, 4143, 559, 3456, 16, 1033, 8526, 1604, 1972, 16, 4766, 5397, 1139, 55, 2519, 966, 1963, 1759, 16, 4766, 5397, 4611, 18576, 6473, 16, 1...
private static Node getParsedScript(IRuby runtime, Reader reader, String filename) {
private Node getParsedScript(IRuby runtime, Reader reader, String filename) {
private static Node getParsedScript(IRuby runtime, Reader reader, String filename) { Node result = runtime.parse(reader, filename); if (commandline.isAssumePrinting()) { result = new ParserSupport().appendPrintToBlock(result); } if (commandline.isAssumeLoop()) { result = new ParserSupport().appendWhileLoopToBlock(result, commandline.isProcessLineEnds(), commandline.isSplit()); } return result; }
52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/b4a189a27604d62c317938f16a124fb9dab1e94a/Main.java/clean/src/org/jruby/Main.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 2029, 25406, 3651, 12, 7937, 10340, 3099, 16, 5393, 2949, 16, 514, 1544, 13, 288, 3639, 2029, 563, 273, 3099, 18, 2670, 12, 10530, 16, 1544, 1769, 3639, 309, 261, 3076, 1369, 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, 2029, 25406, 3651, 12, 7937, 10340, 3099, 16, 5393, 2949, 16, 514, 1544, 13, 288, 3639, 2029, 563, 273, 3099, 18, 2670, 12, 10530, 16, 1544, 1769, 3639, 309, 261, 3076, 1369, 18, ...
public List getTextRuns(TextNode node, AttributedCharacterIterator aci) { List textRuns = node.getTextRuns(); if (textRuns != null) { return textRuns; } AttributedCharacterIterator[] chunkACIs = getTextChunkACIs(aci); int [][] chunkCharMaps = new int[chunkACIs.length][]; // long t0, t1; // t0 = System.currentTimeMillis(); // reorder each chunk ACI for bidi text int chunkStart = aci.getBeginIndex(); for (int i = 0; i < chunkACIs.length; i++) { BidiAttributedCharacterIterator iter; iter = new BidiAttributedCharacterIterator (chunkACIs[i], fontRenderContext, chunkStart); chunkACIs [i] = iter; chunkCharMaps[i] = iter.getCharMap(); // t1 = System.currentTimeMillis(); // reorderTime += t1-t0; // t0=t1; chunkACIs [i] = createModifiedACIForFontMatching (node, chunkACIs[i]); chunkStart += (chunkACIs[i].getEndIndex()- chunkACIs[i].getBeginIndex()); // t1 = System.currentTimeMillis(); // fontMatchingTime += t1-t0; // t0 = t1; } // create text runs for each chunk and add them to the list textRuns = new ArrayList(); TextChunk chunk, prevChunk=null; int currentChunk = 0; do { // Text Chunks contain one or more TextRuns, which they // create from the ACI. chunkACIs[currentChunk].first(); chunk = getTextChunk(node, chunkACIs[currentChunk], chunkCharMaps[currentChunk], textRuns, prevChunk); // Adjust according to text-anchor property value chunkACIs[currentChunk].first(); if (chunk != null) { adjustChunkOffsets(textRuns, chunk); } prevChunk = chunk; currentChunk++; } while (chunk != null && currentChunk < chunkACIs.length); aci.first(); List rgns = (List)aci.getAttribute(FLOW_REGIONS); if (rgns != null) { Iterator i = textRuns.iterator(); List chunkLayouts = new ArrayList(); TextRun tr = (TextRun)i.next(); List layouts = new ArrayList(); chunkLayouts.add(layouts); layouts.add(tr.getLayout()); while (i.hasNext()) { tr = (TextRun)i.next(); if (tr.isFirstRunInChunk()) { layouts = new ArrayList(); chunkLayouts.add(layouts); } layouts.add(tr.getLayout()); } org.apache.batik.gvt.text.GlyphLayout.textWrapTextChunk (chunkACIs, chunkLayouts, rgns); } // t1 = System.currentTimeMillis(); // layoutTime += t1-t0; // System.out.println("Reorder: " + reorderTime + " FontMatching: " + fontMatchingTime + " Layout: " + layoutTime); // cache the textRuns so don't need to recalculate node.setTextRuns(textRuns); return textRuns; }
46680 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46680/d0b373b9189c2fc768cafd826c1a27953f50e773/StrokingTextPainter.java/clean/sources/org/apache/batik/gvt/renderer/StrokingTextPainter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 6701, 9361, 12, 17299, 756, 16, 2380, 11050, 7069, 3198, 1721, 77, 13, 288, 3639, 987, 977, 9361, 273, 756, 18, 588, 1528, 9361, 5621, 3639, 309, 261, 955, 9361, 480, 446, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 987, 6701, 9361, 12, 17299, 756, 16, 2380, 11050, 7069, 3198, 1721, 77, 13, 288, 3639, 987, 977, 9361, 273, 756, 18, 588, 1528, 9361, 5621, 3639, 309, 261, 955, 9361, 480, 446, 13...
{ this.header = header; }
{ this.header = header; }
public void setHeader(HeaderFooter header) { this.header = header; }
6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/b6d172650252a29b1839b8b75ad53cb3c71312db/RtfWriter.java/buggy/src/com/lowagie/text/rtf/RtfWriter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 10859, 12, 1864, 13787, 1446, 13, 225, 288, 565, 333, 18, 3374, 273, 1446, 31, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 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, 282, 1071, 918, 10859, 12, 1864, 13787, 1446, 13, 225, 288, 565, 333, 18, 3374, 273, 1446, 31, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
appendString(message, (Color) colorMapping.get(entry.getLevel()));
appendString(message, (Color) colorMapping.get(""+entry.getLevel()));
public void logged(final LogEntry entry) { PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { public void run() { String message = entry.getMessage(); try { if (goodMessage(message)) { appendString(message, (Color) colorMapping.get(entry.getLevel())); } } catch (Throwable e) { e.printStackTrace(); } } }); }
47624 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47624/8103c851eb3f5c468f34760f4804c9f30ce61b98/LogView.java/clean/clients/gui/org.cishell.reference.gui.log/src/org/cishell/reference/gui/log/LogView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 7545, 12, 6385, 30039, 1241, 13, 288, 2398, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 4236, 7675, 8389, 1905, 12, 2704, 10254, 1435, 288, 1082, 202, 482, 918, 1086, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7545, 12, 6385, 30039, 1241, 13, 288, 2398, 202, 8201, 5370, 18, 588, 2421, 22144, 7675, 588, 4236, 7675, 8389, 1905, 12, 2704, 10254, 1435, 288, 1082, 202, 482, 918, 1086, 143...