rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
public TablePanel(Element e, TabPanel tp, OMEXMLNode on) { isTopLevel = false; //check if this TablePanel is "top level" if (tp.oNode == null) { Vector foundEles = DOMUtil.getChildElements("OMEElement", tParse.getRoot()); for (int i = 0;i < foundEles.size();i++) { Element thisNode = (Element) foundEles.get(i); if (thisNode == e) isTopLevel = true; } } else if (tp.oNode != null && tp.oNode == on) isTopLevel = true; el = e; oNode = on; tPanel = tp; id = null; JComboBox comboBox = null; if (on != null) name = getTreePathName(e,on); else name = getTreePathName(e); String thisName = name; panelList.add(this); //for debuging this simple parser final boolean debug = false; //Check which "types" the various template attributes are and //group them into Vectors. Vector fullList = DOMUtil.getChildElements("OMEAttribute",e); attrList = new Vector(); refList = new Vector(); for (int i = 0;i<fullList.size();i++) { Element thisE = (Element) fullList.get(i); if (thisE.hasAttribute("Type") ) { if (thisE.getAttribute("Type").equals("Ref")) { if (oNode != null) { String value = oNode.getAttribute(thisE.getAttribute("XMLName")); if (value != null && !value.equals("")) { if ( addItems.indexOf("(External) " + value) < 0) { addItems.add("(External) " + value); } } } refList.add(thisE); } else if (thisE.getAttribute("Type").equals("ID") && oNode != null && !showIDs) { if (oNode.getDOMElement().hasAttribute("ID")) { id = oNode.getAttribute("ID"); panelsWithID.add(this); } } else if (thisE.getAttribute("Type").equals("ID") && oNode != null && showIDs) { if (oNode.getDOMElement().hasAttribute("ID")) { id = oNode.getAttribute("ID"); panelsWithID.add(this); attrList.add(thisE); } } else attrList.add(thisE); } else attrList.add(thisE); } //Set up the details for internal reference names refDetails = e.getAttribute("RefVars"); if(debug) System.out.println(); if(debug) System.out.println(name + " - " + refDetails); boolean noDetails = true; int openIndex = refDetails.indexOf('%'); while(openIndex >= 0) { if(debug) System.out.println(openIndex + " " + refDetails.charAt(openIndex)); int closeIndex = refDetails.indexOf('%',openIndex + 1); if(debug) System.out.println(closeIndex + " " + refDetails.charAt(closeIndex)); String thisCommand = refDetails.substring(openIndex + 1,closeIndex); if(debug) System.out.println("Command: " + thisCommand); String processed = refDetails.substring(0,openIndex); if(debug) System.out.println("Processed: " + processed); String remnants = refDetails.substring(closeIndex+1,refDetails.length()); if(debug) System.out.println("Remnants: " + remnants); boolean addThisCommand = false; int varIndex = thisCommand.indexOf('$'); while(varIndex >=0) { if(debug) System.out.println("varIndex: " + varIndex + " " + thisCommand.charAt(varIndex)); int endIndex = thisCommand.indexOf(' ', varIndex + 1); if (endIndex < 0) endIndex = thisCommand.length(); if(debug) System.out.println("endIndex: " + endIndex); String prefix = thisCommand.substring(0,varIndex); if(debug) System.out.println("Prefix: " + prefix); String thisVar = thisCommand.substring(varIndex+1,endIndex); if(debug) System.out.println("thisVar: " + thisVar); String suffix; if(endIndex != thisCommand.length()) suffix = thisCommand.substring(endIndex + 1,thisCommand.length()); else suffix = ""; if(debug) System.out.println("Suffix: " + suffix); String value = null; if (oNode != null) { value = oNode.getAttribute(thisVar); } if (value != null) { if (!value.equals("")) { addThisCommand = true; } } else value = ""; if(debug) System.out.println("Value: " + value); thisCommand = prefix + value + suffix; if(debug) System.out.println("thisCommand: " + thisCommand); varIndex = thisCommand.indexOf('$'); } if (addThisCommand) { noDetails = false; refDetails = processed + " (" + thisCommand + ")" + remnants; } else refDetails = processed + remnants; if(debug) System.out.println("refDetails: " + refDetails); openIndex = refDetails.indexOf('%'); } if(debug) System.out.println(name + " - " + refDetails); if(showIDs) refDetails = refDetails + " (ID: " + id + ")"; Element cDataEl = DOMUtil.getChildElement("CData",e); if (cDataEl != null) attrList.add(0,cDataEl); tableName = null; if (oNode == null) tableName = new JLabel(thisName, NO_DATA_BULLET, JLabel.LEFT); else tableName = new JLabel(thisName, DATA_BULLET, JLabel.LEFT); Font thisFont = tableName.getFont(); thisFont = new Font(thisFont.getFontName(), Font.BOLD,12); tableName.setFont(thisFont); if (el.hasAttribute("ShortDesc")) tableName.setToolTipText(el.getAttribute("ShortDesc")); else if (el.hasAttribute("Description")) tableName.setToolTipText(el.getAttribute("Description")); tableName.setForeground(TEXT_COLOR); noteButton = new JButton("Notes");// noteButton.setPreferredSize(new Dimension(85,17)); noteButton.addActionListener(this); noteButton.setActionCommand("getNotes"); noteButton.setToolTipText( "Display or hide the notes associated with this " + name + "."); noteButton.setForeground(TEXT_COLOR); imageLabel = null; if (name.endsWith("Pixels") || name.endsWith("Pixels (1)")) { if (thumb != null) { imageLabel = new JLabel(new ImageIcon(thumb)); imageLabel.setToolTipText("The first image of these pixels." + " Click for full sized image."); imageLabel.addMouseListener(this); } } DefaultTableModel myTableModel = new DefaultTableModel(TREE_COLUMNS, 0) { public boolean isCellEditable(int row, int col) { if(editable) { if (col < 1) return false; else return true; } else { if (col < 2) return false; else return true; } } }; VariableComboEditor vcEdit = new VariableComboEditor(panelsWithID, addItems, this, internalDefs); table = new ClickableTable(myTableModel, this, vcEdit);// table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF ); table.getColumnModel().getColumn(0).setPreferredWidth(125); table.getColumnModel().getColumn(1).setPreferredWidth(430); table.getColumnModel().getColumn(2).setPreferredWidth(70); table.getColumnModel().getColumn(2).setMaxWidth(70); table.getColumnModel().getColumn(2).setMinWidth(70); tHead = table.getTableHeader(); tHead.setResizingAllowed(true); tHead.setReorderingAllowed(false);// tHead.setBackground(NotePanel.BACK_COLOR);// tHead.setOpaque(false); myTableModel.setRowCount(attrList.size() + refList.size()); String clippedName = name; if (name.endsWith(")")) clippedName = name.substring(0,name.length() - 4); addButton = new JButton("New Table");// addButton.setPreferredSize(new Dimension(130,17)); addButton.addActionListener(table); addButton.setActionCommand("bigAdd"); addButton.setToolTipText("Create a new " + clippedName + " table."); if ( !isTopLevel && tPanel.oNode == null) addButton.setEnabled(false); if ( !editable) addButton.setEnabled(false); addButton.setForeground(ADD_COLOR); delButton = new JButton("Delete Table");// delButton.setPreferredSize(new Dimension(130,17)); delButton.addActionListener(table); delButton.setActionCommand("bigRem"); delButton.setToolTipText("Delete this " + clippedName + " table."); if ( oNode == null) delButton.setVisible(false); if ( !editable) delButton.setEnabled(false); delButton.setForeground(DELETE_COLOR); noteP = new NotePanel(this); setNumNotes(noteP.getNumNotes()); FormLayout layout = new FormLayout( "pref, 10dlu, pref, 10dlu, pref, pref:grow:right, 5dlu, pref", "pref,2dlu,pref,pref,3dlu,pref,3dlu"); setLayout(layout); CellConstraints cc = new CellConstraints(); add(tableName, cc.xy(1,1)); add(noteButton, cc.xy(3,1, "left,center")); if (imageLabel != null) { add(imageLabel, cc.xy(5,1, "center,top")); } add(addButton, cc.xy(6,1, "right,center")); add(delButton, cc.xy(8,1, "right,center")); add(tHead, cc.xyw(1,3,8, "fill, center")); add(table, cc.xyw(1,4,8, "fill, center")); add(noteP, cc.xyw(1,6,8, "fill,center")); if (oNode == null) { tHead.setVisible(false); noteButton.setVisible(false); table.setVisible(false); } if (attrList.size() != 0) { // update OME-XML attributes table for (int i=0; i<attrList.size(); i++) { Element thisEle = null; if (attrList.get(i) instanceof Element) { thisEle = (Element) attrList.get(i); } if (thisEle != null) { String attrName = thisEle.getAttribute("XMLName"); if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i, 0); if (oNode != null) { if (oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else if (!thisEle.hasAttribute("Name") && thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i, 0); if (oNode != null) { if (oNode.getDOMElement().hasAttribute(attrName)) { myTableModel.setValueAt(oNode.getAttribute(attrName), i, 1); } } } else { if (e.hasAttribute("Name")) { myTableModel.setValueAt(e.getAttribute("Name") + " CharData", i, 0); } else { myTableModel.setValueAt(e.getAttribute("XMLName") + " CharData", i, 0); } if (oNode != null) { if (DOMUtil.getCharacterData(oNode.getDOMElement()) != null) { myTableModel.setValueAt( DOMUtil.getCharacterData(oNode.getDOMElement() ), i, 1); } } } } } } if (refList.size() > 0) { for (int i=0; i<refList.size(); i++) { Element thisEle = null; if (refList.get(i) instanceof Element) { thisEle = (Element) refList.get(i); } if (thisEle != null) { if (thisEle.hasAttribute("Name")) { myTableModel.setValueAt(thisEle.getAttribute("Name"), i + attrList.size(), 0); } else if (thisEle.hasAttribute("XMLName")) { myTableModel.setValueAt(thisEle.getAttribute("XMLName"), i + attrList.size(), 0); } } } } } | 55303 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55303/557a93a201e2f0530cb2de2bc8c33b83b9b8b97f/MetadataPane.java/buggy/loci/ome/notebook/MetadataPane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3555,
5537,
12,
1046,
425,
16,
9483,
5537,
8071,
16,
531,
958,
4201,
907,
603,
13,
288,
1377,
353,
27046,
273,
629,
31,
1377,
368,
1893,
309,
333,
3555,
5537,
353,
315,
3669,
1801... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3555,
5537,
12,
1046,
425,
16,
9483,
5537,
8071,
16,
531,
958,
4201,
907,
603,
13,
288,
1377,
353,
27046,
273,
629,
31,
1377,
368,
1893,
309,
333,
3555,
5537,
353,
315,
3669,
1801... | ||
public final void setWidthOfCellSoFar(int aWidth) { widthOfCellSoFar = aWidth; } | public final void setWidthOfCellSoFar(int aWidth) { widthOfCellSoFar = aWidth; } | public final void setWidthOfCellSoFar(int aWidth) { widthOfCellSoFar = aWidth; } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/3e881dc2bb1a0610015db662ac9773ce88a1c177/TableRow.java/buggy/src/org/apache/fop/fo/flow/TableRow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
225,
1071,
727,
918,
20855,
951,
4020,
26619,
12,
474,
279,
2384,
13,
3196,
225,
288,
1835,
951,
4020,
26619,
273,
279,
2384,
31,
289,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
225,
1071,
727,
918,
20855,
951,
4020,
26619,
12,
474,
279,
2384,
13,
3196,
225,
288,
1835,
951,
4020,
26619,
273,
279,
2384,
31,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
try | BookmarkFormEx form = (BookmarkFormEx)actionForm; RollerRequest rreq = RollerRequest.getRollerRequest(request); BookmarkManager bmgr = RollerFactory.getRoller().getBookmarkManager(); BookmarkData bd = null; if (null != form.getId() && !form.getId().trim().equals("")) | public ActionForward execute( ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = mapping.findForward("Bookmarks"); try { BookmarkFormEx form = (BookmarkFormEx)actionForm; RollerRequest rreq = RollerRequest.getRollerRequest(request); BookmarkManager bmgr = RollerFactory.getRoller().getBookmarkManager(); BookmarkData bd = null; if (null != form.getId() && !form.getId().trim().equals("")) { bd = bmgr.retrieveBookmark(form.getId()); bd.startEditing(); // should throw if save not permitted } else { bd = bmgr.createBookmark(); // Existing bookmarks already have folders, but this is a new one. FolderData fd = bmgr.retrieveFolder( request.getParameter(RollerRequest.FOLDERID_KEY)); bd.setFolder(fd); } form.copyTo(bd, request.getLocale()); bd.save(); RollerFactory.getRoller().commit(); request.setAttribute( RollerRequest.FOLDERID_KEY,bd.getFolder().getId()); } catch (RollerPermissionsException e) { ActionErrors errors = new ActionErrors(); errors.add(null, new ActionError("error.permissions.deniedSave")); saveErrors(request, errors); forward = mapping.findForward("access-denied"); } return forward; } | 46431 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46431/aab8c702ee307bb904a20c030af31ae8e6975887/BookmarkSaveAction.java/clean/src/org/roller/presentation/bookmarks/actions/BookmarkSaveAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
4382,
8514,
1836,
12,
3639,
4382,
3233,
4202,
2874,
16,
3639,
4382,
1204,
1850,
1301,
1204,
16,
3639,
9984,
225,
590,
16,
3639,
12446,
766,
13,
3639,
1216,
1185,
565,
288,
3639,
438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4382,
8514,
1836,
12,
3639,
4382,
3233,
4202,
2874,
16,
3639,
4382,
1204,
1850,
1301,
1204,
16,
3639,
9984,
225,
590,
16,
3639,
12446,
766,
13,
3639,
1216,
1185,
565,
288,
3639,
438... |
String workspaceName = getResourceName(updateInfo.getWorkspaceHref(), true); | String workspaceName = getLocatorFromHref(updateInfo.getWorkspaceHref()).getWorkspaceName(); | public MultiStatus update(UpdateInfo updateInfo) throws DavException { if (updateInfo == null) { throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Valid update request body required."); } if (!exists()) { throw new DavException(DavServletResponse.SC_NOT_FOUND); } MultiStatus ms = new MultiStatus(); try { Node node = (Node)item; boolean removeExisting = updateInfo.getUpdateElement().getChild(XML_REMOVEEXISTING, NAMESPACE) != null; // register eventListener in order to be able to report the modified resources. EventListener el = new EListener(updateInfo.getPropertyNameSet(), ms); registerEventListener(el, node.getPath()); // perform the update/restore according to the update info if (updateInfo.getVersionHref() != null) { VersionHistory vh = node.getVersionHistory(); String[] hrefs = updateInfo.getVersionHref(); Version[] versions = new Version[hrefs.length]; for (int i = 0; i < hrefs.length; i++) { versions[i] = vh.getVersion(getResourceName(hrefs[i], true)); } if (versions.length == 1) { String relPath = updateInfo.getUpdateElement().getChildText(XML_RELPATH, NAMESPACE); if (relPath == null) { node.restore(versions[0], removeExisting); } else { node.restore(versions[0], relPath, removeExisting); } } else { getRepositorySession().getWorkspace().restore(versions, removeExisting); } } else if (updateInfo.getLabelName() != null) { String[] labels = updateInfo.getLabelName(); if (labels.length == 1) { node.restoreByLabel(labels[0], removeExisting); } else { Version[] vs = new Version[labels.length]; VersionHistory vh = node.getVersionHistory(); for (int i = 0; i < labels.length; i++) { vs[i] = vh.getVersionByLabel(labels[i]); } getRepositorySession().getWorkspace().restore(vs, removeExisting); } } else if (updateInfo.getWorkspaceHref() != null) { String workspaceName = getResourceName(updateInfo.getWorkspaceHref(), true); node.update(workspaceName); } else { throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid update request body."); } // unregister the event listener again unregisterEventListener(el); } catch (RepositoryException e) { throw new JcrDavException(e); } return ms; } | 49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/b0e3d7b222175ed2e2045a93d3d9f6d46130152d/VersionControlledItemCollection.java/buggy/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/VersionControlledItemCollection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5991,
1482,
1089,
12,
1891,
966,
1089,
966,
13,
1216,
463,
842,
503,
288,
3639,
309,
261,
2725,
966,
422,
446,
13,
288,
5411,
604,
394,
463,
842,
503,
12,
40,
842,
29910,
18,
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,
377,
1071,
5991,
1482,
1089,
12,
1891,
966,
1089,
966,
13,
1216,
463,
842,
503,
288,
3639,
309,
261,
2725,
966,
422,
446,
13,
288,
5411,
604,
394,
463,
842,
503,
12,
40,
842,
29910,
18,
23... |
g.drawImage( imgChart, r.x, r.y ); | if ( imgChart != null ) { g.drawImage( imgChart, r.x, r.y ); } | public final void paintClientArea( Graphics g ) { if ( bPainting ) // PREVENT RE-ENTRANCY { return; } final Rectangle r = getClientArea( ).getCopy( ); if ( r.width <= 0 || r.height <= 0 ) { return; } bPainting = true; if ( bDirty ) { bDirty = false; // GET THE MODEL WRAPPED INSIDE THE REPORT ITEM IMPL final Chart cm = (Chart) crii.getProperty( "chart.instance" ); //$NON-NLS-1$ if ( cm == null ) { bPainting = false; logger.log( ILogger.ERROR, Messages.getString( "DesignerRepresentation.log.UnableToFind" ) ); //$NON-NLS-1$ return; } final Display d = Display.getCurrent( ); Dimension dSize = r.getSize( ); // OFFSCREEN IMAGE CREATION STRATEGY if ( imgChart == null || imgChart.getImageData( ).width != dSize.width || imgChart.getImageData( ).height != dSize.height ) { if ( gc != null ) { gc.dispose( ); } if ( imgChart != null ) { imgChart.dispose( ); } bDirty = true; // FILL IMAGE WITH TRANSPARENCY final ImageData ida = new ImageData( dSize.width, dSize.height, 32, PALETTE_DATA ); ida.transparentPixel = TRANSPARENT_COLOR; /* * for (int i = 0; i < ida.width; i++) { for (int j = 0; j < * ida.height; j++) { ida.setPixel(i, j, TRANSPARENT_COLOR); } } */ imgChart = new Image( d, ida ); gc = new GC( imgChart ); } final Color clrBG = new Color( d, 0x12, 0x34, 0x56 ); // TRANSPARENT // COLOR INDEX // (REVISIT?) final Color clrPreviousBG = gc.getBackground( ); gc.setBackground( clrBG ); gc.fillRectangle( 0, 0, imgChart.getImageData( ).width, imgChart.getImageData( ).height ); clrBG.dispose( ); // DISPOSE gc.setBackground( clrPreviousBG ); // RESTORE // SETUP THE RENDERING CONTEXT Bounds bo = BoundsImpl.create( 0, 0, dSize.width, dSize.height ); bo.scale( 72d / idr.getDisplayServer( ).getDpiResolution( ) ); idr.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT, gc ); Generator gr = Generator.instance( ); cm.clearSections( IConstants.RUN_TIME ); // REMOVE OLD TRANSIENT // RUNTIME SERIES cm.createSampleRuntimeSeries( ); // USING SAMPLE DATA STORED IN // MODEL try { RunTimeContext rtc = new RunTimeContext( ); rtc.setScriptingEnabled( false ); rtc.setMessageLookup( new BIRTDesignerMessageLookup(crii.getHandle())); gr.render( idr, gr.build( idr.getDisplayServer( ), cm, bo, null, rtc, new ChartReportStyleProcessor( crii.getHandle( ), true ) ) ); } catch ( ChartException gex ) { showException( gc, gex ); } } g.drawImage( imgChart, r.x, r.y ); bPainting = false; } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/560f255af45b45046252f034a9b330f54c6a3732/DesignerRepresentation.java/buggy/chart/org.eclipse.birt.chart.reportitem.ui/src/org/eclipse/birt/chart/reportitem/ui/DesignerRepresentation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
12574,
1227,
5484,
12,
16830,
314,
262,
202,
95,
202,
202,
430,
261,
324,
12699,
310,
262,
368,
7071,
6465,
2438,
17,
2222,
54,
1258,
16068,
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,
727,
918,
12574,
1227,
5484,
12,
16830,
314,
262,
202,
95,
202,
202,
430,
261,
324,
12699,
310,
262,
368,
7071,
6465,
2438,
17,
2222,
54,
1258,
16068,
202,
202,
95,
1082,
202,... |
public void testAnonStruct() throws Exception { StringBuffer buffer = new StringBuffer("typedef struct { } X;\n"); //$NON-NLS-1$ buffer.append("int f( X x );"); //$NON-NLS-1$ IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.C); // test tu.getDeclarations(IBinding) IASTSimpleDeclaration decl1 = (IASTSimpleDeclaration) tu .getDeclarations()[0]; IASTSimpleDeclaration decl2 = (IASTSimpleDeclaration) tu .getDeclarations()[1]; IASTName name_X1 = decl1.getDeclarators()[0].getName(); IASTName name_f = decl2.getDeclarators()[0].getName(); IASTName name_X2 = ((IASTNamedTypeSpecifier) ((IASTStandardFunctionDeclarator) decl2 .getDeclarators()[0]).getParameters()[0].getDeclSpecifier()) .getName(); IASTName name_x = ((IASTStandardFunctionDeclarator) decl2 .getDeclarators()[0]).getParameters()[0].getDeclarator() .getName(); IASTName[] decls = tu.getDeclarations(name_X1.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_X1); decls = tu.getDeclarations(name_f.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_f); decls = tu.getDeclarations(name_X2.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_X1); decls = tu.getDeclarations(name_x.resolveBinding()); assertEquals(decls.length, 1); assertEquals(decls[0], name_x); } | 6192 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6192/75cbff035e927043ff1116bbd1e33e89ab93b9cb/AST2Tests.java/clean/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
979,
265,
3823,
1435,
1216,
1185,
288,
3639,
6674,
1613,
273,
394,
6674,
2932,
723,
536,
1958,
288,
289,
1139,
9747,
82,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
979,
265,
3823,
1435,
1216,
1185,
288,
3639,
6674,
1613,
273,
394,
6674,
2932,
723,
536,
1958,
288,
289,
1139,
9747,
82,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
3639,
16... | ||
assertTrue(_filter.match(testPerson_)); | assertTrue(filter_.match(testPerson_)); | public void testMatchModify() throws Exception { Filter _filter = factory_.create_filter("EXTENDED_TCL"); // add a filter ConstraintExp[] _constraintExp = new ConstraintExp[1]; EventType[] _eventType = new EventType[1]; _eventType[0] = new EventType("*", "*"); _constraintExp[0] = new ConstraintExp(_eventType, "$.first_name == 'something'"); ConstraintInfo[] _info = _filter.add_constraints(_constraintExp); // oops wrong assertTrue(!_filter.match(testPerson_)); // modify the filter _info[0].constraint_expression.constraint_expr = "$.first_name == 'firstname'"; _filter.modify_constraints(new int[0], _info); // this one should match assertTrue(_filter.match(testPerson_)); } | 46355 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46355/2401fa83750c7cff1c7b24748d4a8b04bf0c8677/FilterTest.java/buggy/test/regression/src/org/jacorb/test/notification/FilterTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2060,
11047,
1435,
1216,
1185,
288,
3639,
4008,
389,
2188,
273,
3272,
27799,
2640,
67,
2188,
2932,
4142,
22088,
67,
56,
5017,
8863,
3639,
368,
527,
279,
1034,
3639,
10770,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2060,
11047,
1435,
1216,
1185,
288,
3639,
4008,
389,
2188,
273,
3272,
27799,
2640,
67,
2188,
2932,
4142,
22088,
67,
56,
5017,
8863,
3639,
368,
527,
279,
1034,
3639,
10770,
... |
client.debug("<findCertificatesByType()"); | adapter.debug("<findCertificatesByType()"); | public static Collection findCertificatesByType(Admin admin, int type, String issuerDN, CertificateDataLocalHome certHome, Client client) { client.debug(">findCertificatesByType()"); if (null == admin || type <= 0 || type > CertificateDataBean.CERTTYPE_SUBCA + CertificateDataBean.CERTTYPE_ENDENTITY + CertificateDataBean.CERTTYPE_ROOTCA) { throw new IllegalArgumentException(); } StringBuffer ctypes = new StringBuffer(); if ((type & CertificateDataBean.CERTTYPE_SUBCA) > 0) { ctypes.append(CertificateDataBean.CERTTYPE_SUBCA); } if ((type & CertificateDataBean.CERTTYPE_ENDENTITY) > 0) { if (ctypes.length() > 0) { ctypes.append(", "); } ctypes.append(CertificateDataBean.CERTTYPE_ENDENTITY); } if ((type & CertificateDataBean.CERTTYPE_ROOTCA) > 0) { if (ctypes.length() > 0) { ctypes.append(", "); } ctypes.append(CertificateDataBean.CERTTYPE_ROOTCA); } Connection con = null; PreparedStatement ps = null; ResultSet result = null; try { ArrayList vect;// Status 20 = CertificateDataBean.CERT_ACTIVE StringBuffer stmt = new StringBuffer("SELECT DISTINCT fingerprint FROM CertificateData WHERE status = 20 AND "); stmt.append(" type IN ("); stmt.append(ctypes.toString()); stmt.append(')'); if (null != issuerDN && issuerDN.length() > 0) { String dn = CertTools.stringToBCDNString(issuerDN); dn = StringTools.strip(dn); if (client.getLogger().isDebugEnabled()) { client.debug("findCertificatesByType() : Looking for cert with (transformed)DN: " + dn); } stmt.append(" AND issuerDN = '"); stmt.append(dn); stmt.append('\''); } if (client.getLogger().isDebugEnabled()) { client.debug("findCertificatesByType() : executing SQL statement\n" + stmt.toString()); } con = JDBCUtil.getDBConnection(JNDINames.DATASOURCE); ps = con.prepareStatement(stmt.toString()); result = ps.executeQuery(); vect = new ArrayList(); while (result.next()) { Certificate cert = findCertificateByFingerprint(admin, result.getString(1), certHome, client); if (cert != null) { vect.add(cert); } } client.debug("<findCertificatesByType()"); return vect; } catch (Exception e) { throw new EJBException(e); } finally { JDBCUtil.close(con, ps, result); } } // findCertificatesByType | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/ee181ef7c16884551f56cc0164b58a3ca647c4e9/CertificateDataUtil.java/clean/src/java/org/ejbca/core/ejb/ca/store/CertificateDataUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
2200,
1104,
14133,
14145,
12,
4446,
3981,
16,
509,
618,
16,
514,
9715,
8609,
16,
4766,
10792,
6660,
751,
2042,
8684,
3320,
8684,
16,
4766,
10792,
2445,
1004,
13,
288,
3639,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2200,
1104,
14133,
14145,
12,
4446,
3981,
16,
509,
618,
16,
514,
9715,
8609,
16,
4766,
10792,
6660,
751,
2042,
8684,
3320,
8684,
16,
4766,
10792,
2445,
1004,
13,
288,
3639,
100... |
change.setTopic(topic); | change.setTopic(topicName); | private void save(HttpServletRequest request, ModelAndView next) throws Exception { // a save request has been made WikiBase.removeCachedContents(); String topic = request.getParameter(JAMController.PARAMETER_TOPIC); String virtualWiki = JAMController.getVirtualWikiFromURI(request); String user = request.getRemoteAddr(); if (Utilities.getUserFromRequest(request) != null) { user = Utilities.getUserFromRequest(request); } if (topic == null) { logger.warn("Attempt to save null topic"); // FIXME - hard coding throw new Exception("Topic must be specified"); } Topic t = new Topic(topic); if (t.isReadOnlyTopic(virtualWiki)) { logger.warn("The topic " + topic + " is read only and cannot be saved"); // FIXME - hard coding throw new Exception("The topic " + topic + " is read only and cannot be saved"); } String key = request.getSession().getId(); if (!WikiBase.getInstance().holdsLock(virtualWiki, topic, key)) { logger.warn("The lock on " + topic + " has timed out"); // FIXME - hard coding throw new Exception("The lock on " + topic + " has timed out"); } String contents = request.getParameter("contents"); if (contents == null) { logger.warn("The topic " + topic + " has no content"); // FIXME - hard coding throw new Exception("The topic " + topic + " has no content"); } WikiBase.getInstance().write(virtualWiki, contents, topic, user, request.getRemoteAddr()); if (request.getParameter("minorEdit") == null) { Change change = new Change(); change.setTopic(topic); change.setUser(user); change.setTime(new java.util.Date()); change.setVirtualWiki(virtualWiki); ChangeLog cl = WikiBase.getInstance().getChangeLogInstance(); cl.logChange(change, request); } SearchEngine sedb = WikiBase.getInstance().getSearchEngineInstance(); sedb.indexText(virtualWiki, topic, request.getParameter("contents")); WikiBase.getInstance().unlockTopic(virtualWiki, topic); view(request, next); } | 50517 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50517/fc58637c46a65eba14240f763d9d99ce0720df2d/EditServlet.java/buggy/src/java/org/jamwiki/servlets/EditServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1923,
12,
2940,
18572,
590,
16,
3164,
1876,
1767,
1024,
13,
1216,
1185,
288,
202,
202,
759,
279,
1923,
590,
711,
2118,
7165,
202,
202,
25438,
2171,
18,
4479,
9839,
6323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1923,
12,
2940,
18572,
590,
16,
3164,
1876,
1767,
1024,
13,
1216,
1185,
288,
202,
202,
759,
279,
1923,
590,
711,
2118,
7165,
202,
202,
25438,
2171,
18,
4479,
9839,
6323,
... |
Box mainPanel = Box.createVerticalBox(); mainPanel.add(createInfoText()); mainPanel.add(createLogPanel("Application Log", new Dimension(200, 200))); mainPanel.add(createUserListPanel()); mainPanel.add(createEnginePanel()); | JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(createInfoText(), BorderLayout.NORTH); mainPanel.add(createLogPanel("Application Log", new Dimension(200, 200)), BorderLayout.CENTER); JPanel extraPanel = new JPanel(); extraPanel.setLayout(new GridLayout(2, 1)); extraPanel.add(createUserListPanel()); extraPanel.add(createEnginePanel()); mainPanel.add(extraPanel, BorderLayout.SOUTH); | private JComponent createMainPanel() { Box mainPanel = Box.createVerticalBox(); mainPanel.add(createInfoText()); mainPanel.add(createLogPanel("Application Log", new Dimension(200, 200))); mainPanel.add(createUserListPanel()); mainPanel.add(createEnginePanel()); return mainPanel; } | 50951 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50951/b5abd8fd04d285a1b80a4816863d054b8bf79db3/DispatcherGUI.java/clean/src/org/objectweb/proactive/examples/c3d/gui/DispatcherGUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
29058,
752,
6376,
5537,
1435,
288,
3639,
8549,
2774,
5537,
273,
8549,
18,
2640,
15704,
3514,
5621,
3639,
2774,
5537,
18,
1289,
12,
2640,
966,
1528,
10663,
3639,
2774,
5537,
18,
1289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
752,
6376,
5537,
1435,
288,
3639,
8549,
2774,
5537,
273,
8549,
18,
2640,
15704,
3514,
5621,
3639,
2774,
5537,
18,
1289,
12,
2640,
966,
1528,
10663,
3639,
2774,
5537,
18,
1289,
... |
for (int i = 0; i < alternatives.length; i++) { | for (int i = 0; i < alternatives.length; i++) | private static void setContent(MimeMessage mm, Multipart mmp, Element elem, MimeBodyPart[] alternatives) throws MessagingException { String type = elem.getAttribute(MailService.A_CONTENT_TYPE, Mime.CT_DEFAULT).trim(); int slash = type.indexOf('/'); boolean invalidCT = (slash <= 0 || slash == type.length() - 1); // is the client passing us a multipart? if (type.startsWith(Mime.CT_MULTIPART_PREFIX)) { // yes! Find out what the subtype is (assume "mixed" if none or invalid one is specified) String subType = invalidCT ? "mixed" : type.substring(slash + 1); // do we need to add a multipart/alternative for the alternatives? if (alternatives==null || subType.equals("alternative")) { // no need to add an extra multipart/alternative! // create the MimeMultipart and attach it to the existing structure: MimeMultipart mmpNew = new MimeMultipart(subType); if (mmp == null) { // there were no multiparts at all, we need to create one mm.setContent(mmpNew); } else { // there was already a multipart/mixed at the top of the mm MimeBodyPart mbpWrapper = new MimeBodyPart(); mbpWrapper.setContent(mmpNew); mmp.addBodyPart(mbpWrapper); } // add each part in turn (recursively) for (Iterator it = elem.elementIterator(); it.hasNext(); ) { // the alternatives will be placed below setContent(mm, mmpNew, (Element) it.next(), null); } // finally, add the alternatives if there are any... if (alternatives != null) { for (int i = 0; i < alternatives.length; i++) { mmpNew.addBodyPart(alternatives[i]); } } } else { // create a multipart/alternative to hold all the client's struct + the alternatives MimeMultipart mmpNew = new MimeMultipart("alternative"); if (mmp == null) { mm.setContent(mmpNew); } else { MimeBodyPart mbpWrapper = new MimeBodyPart(); mbpWrapper.setContent(mmpNew); mmp.addBodyPart(mbpWrapper); } mmp = mmpNew; // add the entire client's multipart/whatever here inside our multipart/alternative setContent(mm, mmp, elem, null); // add all the alternatives for (int i = 0; i < alternatives.length; i++) { mmp.addBodyPart(alternatives[i]); } } } else { // a single part from the client...we might still have to create a multipart/alternative if // there are alternatives[] passed-in, but still this is fairly straightforward... if (alternatives != null) { // create a multipart/alternative to hold all the alternatives MimeMultipart mmpNew = new MimeMultipart("alternative"); if (mmp == null) { mm.setContent(mmpNew); } else { MimeBodyPart mbpWrapper = new MimeBodyPart(); mbpWrapper.setContent(mmpNew); mmp.addBodyPart(mbpWrapper); } mmp = mmpNew; } // once we get here, mmp is either NULL, a multipart/mixed from the toplevel, // or a multipart/alternative created just above....either way we are safe to stick // the client's nice and simple body right here ContentType ct = new ContentType(); ct.setPrimaryType(invalidCT ? "text" : type.substring(0, slash)); ct.setSubType(invalidCT ? "plain" : type.substring(slash + 1)); ct.setParameter(Mime.P_CHARSET, Mime.P_CHARSET_UTF8); Element contentElem = elem.getOptionalElement(MailService.E_CONTENT); String data = (contentElem == null ? "" : contentElem.getText()); if (mmp != null) { MimeBodyPart mbp = new MimeBodyPart(); mbp.setText(data, Mime.P_CHARSET_UTF8); mbp.setHeader("Content-Type", ct.toString()); mmp.addBodyPart(mbp); } else { mm.setText(data, Mime.P_CHARSET_UTF8); mm.setHeader("Content-Type", ct.toString()); } if (alternatives != null) { for (int i = 0; i < alternatives.length; i++) { mmp.addBodyPart(alternatives[i]); } } } } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/545a47e80f124ea231945f86e3fb9cb62048b4e8/ParseMimeMessage.java/buggy/ZimbraServer/src/java/com/zimbra/cs/service/mail/ParseMimeMessage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
10651,
12,
13320,
1079,
9740,
16,
19919,
312,
1291,
16,
3010,
3659,
16,
22059,
2250,
1988,
8526,
20699,
13,
377,
1216,
23794,
503,
288,
3639,
514,
618,
273,
3659,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
10651,
12,
13320,
1079,
9740,
16,
19919,
312,
1291,
16,
3010,
3659,
16,
22059,
2250,
1988,
8526,
20699,
13,
377,
1216,
23794,
503,
288,
3639,
514,
618,
273,
3659,
18,
588,... |
jarViewer.setInput(jarMap); | jarViewer.setInput( null ); jarViewer.setInput( jarMap ); | private void refreshJarViewer( ) { jarViewer.setInput(jarMap); for ( int i = 0; i < jarViewer.getTable( ).getItemCount( ); i++ ) { TableItem ti = jarViewer.getTable( ).getItem( i ); Object element = ti.getData( ); String c0 = "", c1 = "", c2 = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if ( element instanceof Map.Entry ) { Map.Entry entry = (Map.Entry) element; c1 = (String) entry.getKey( ); JarFile jarInfo = (JarFile) entry.getValue( ); c2 = jarInfo.getFilePath( ); c0 = jarInfo.getState( ); } ti.setText( 0, c0 ); ti.setText( 1, c1 ); ti.setText( 2, c2 ); } } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/fe1af9eacfc05c05b3aa5044677994cd00759dff/JdbcDriverManagerDialog.java/clean/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/dialogs/JdbcDriverManagerDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4460,
10813,
18415,
12,
262,
202,
95,
202,
202,
11930,
18415,
18,
542,
1210,
12,
11930,
863,
1769,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
7334,
18415,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
4460,
10813,
18415,
12,
262,
202,
95,
202,
202,
11930,
18415,
18,
542,
1210,
12,
11930,
863,
1769,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
7334,
18415,
18... |
private void convertSampleOnPlatformVectors( ExpressionExperiment expExp, List<GeoSample> datasetSamples, GeoPlatform geoPlatform ) { assert datasetSamples.size() > 0 : "No samples in dataset"; log.info( "Converting vectors for " + geoPlatform.getGeoAccession() + ", " + datasetSamples.size() + " samples." ); BioAssayDimension bioAssayDimension = convertGeoSampleList( datasetSamples, expExp ); if ( bioAssayDimension.getBioAssays().size() == 0 ) throw new IllegalStateException( "No bioAssays in the BioAssayDimension" ); sanityCheckQuantitationTypes( datasetSamples ); List<String> quantitationTypes = datasetSamples.iterator().next().getColumnNames(); List<String> quantitationTypeDescriptions = datasetSamples.iterator().next().getColumnDescriptions(); boolean first = true; /* * For the data that are put in 'datasets' (GDS), we know the type of data, but it can be misleading (e.g., Affy * data is 'counts'). For others we just have free text in the column descriptions */ int quantitationTypeIndex = 0; for ( String quantitationType : quantitationTypes ) { // skip the first quantitationType, it's the ID or ID_REF. if ( first ) { first = false; quantitationTypeIndex++; continue; } /* * We get the data by index, not quantitation type name, because the column names often do not match up * among the samples. The first quantitation type is in column 0 (the zeroth column is the ID_REF) */ Map<String, List<Object>> dataVectors = makeDataVectors( datasetSamples, quantitationTypeIndex ); if ( dataVectors == null ) { log.debug( "No data for " + quantitationType ); quantitationTypeIndex++; continue; } else { log.debug( "Got " + dataVectors.size() + " data vectors for " + quantitationType ); } QuantitationType qt = QuantitationType.Factory.newInstance(); qt.setName( quantitationType ); String description = quantitationTypeDescriptions.get( quantitationTypeIndex ); qt.setDescription( description ); QuantitationTypeParameterGuesser.guessQuantitationTypeParameters( qt, quantitationType, description ); int count = 0; for ( String designElementName : dataVectors.keySet() ) { List<Object> dataVector = dataVectors.get( designElementName ); assert dataVector != null && dataVector.size() != 0; DesignElementDataVector vector = convertDesignElementDataVector( geoPlatform, expExp, bioAssayDimension, designElementName, dataVector, qt ); if ( vector == null ) { continue; } if ( log.isTraceEnabled() ) { log.trace( designElementName + " " + qt.getName() + " " + qt.getRepresentation() + " " + dataVector.size() + " elements in vector" ); } expExp.getDesignElementDataVectors().add( vector ); if ( log.isInfoEnabled() && ++count % LOGGING_VECTOR_COUNT_UPDATE == 0 ) { log.info( count + " Data vectors added" ); } } if ( log.isDebugEnabled() ) { log.debug( count + " Data vectors added for '" + quantitationType + "'" ); } quantitationTypeIndex++; } log.info( "Total of " + expExp.getDesignElementDataVectors().size() + " vectors so far..." ); } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/71d023ff940a83104d33a0ec7a241d4b25474a37/GeoConverter.java/buggy/gemma-core/src/main/java/ubic/gemma/loader/expression/geo/GeoConverter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
6283,
8504,
1398,
8201,
21680,
12,
2300,
22338,
2749,
2966,
16,
682,
32,
12447,
8504,
34,
8682,
13239,
16,
12447,
8201,
12376,
8201,
15329,
11231,
8682,
13239,
18,
1467,
1435,
34,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
6459,
6283,
8504,
1398,
8201,
21680,
12,
2300,
22338,
2749,
2966,
16,
682,
32,
12447,
8504,
34,
8682,
13239,
16,
12447,
8201,
12376,
8201,
15329,
11231,
8682,
13239,
18,
1467,
1435,
34,
20... | ||
am.setHandlerContaxt(((RuntimeContext)rtc).getHandlerContext()); | am.setHandlerContaxt(((RuntimeContext) rtc).getHandlerContext()); | protected void setAttachmentsMap(MessageInfo mi, InternalMessage im){ Object rtc = mi.getMetaData(BindingProviderProperties.JAXWS_RUNTIME_CONTEXT); if(rtc != null){ BridgeContext bc = ((RuntimeContext)rtc).getBridgeContext(); if(bc == null) return; JAXWSAttachmentMarshaller am = (JAXWSAttachmentMarshaller)((RuntimeContext)rtc).getBridgeContext().getAttachmentMarshaller(); am.setAttachments(im.getAttachments()); am.setHandlerContaxt(((RuntimeContext)rtc).getHandlerContext()); HandlerContext hc = ((RuntimeContext)rtc).getHandlerContext(); Object mtomThreshold; if(hc == null){ //to be removed when client guarantees handlerContext mtomThreshold = mi.getMetaData(JAXWSProperties.MTOM_THRESHOLOD_VALUE); }else{ mtomThreshold = hc.getMessageContext().get(JAXWSProperties.MTOM_THRESHOLOD_VALUE); } if(mtomThreshold != null) am.setMtomThresholdValue((Integer)mtomThreshold); } } | 9667 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9667/ce96346d5ca4eea83baf52a7392c41134ccfb8c7/SOAPEncoder.java/clean/jaxws-ri/rt/src/com/sun/xml/ws/encoding/soap/SOAPEncoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
444,
12961,
863,
12,
1079,
966,
12837,
16,
3186,
1079,
709,
15329,
3639,
1033,
436,
5111,
273,
12837,
18,
588,
6998,
12,
5250,
2249,
2297,
18,
17368,
2651,
67,
54,
25375,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
444,
12961,
863,
12,
1079,
966,
12837,
16,
3186,
1079,
709,
15329,
3639,
1033,
436,
5111,
273,
12837,
18,
588,
6998,
12,
5250,
2249,
2297,
18,
17368,
2651,
67,
54,
25375,
67,
... |
public void testWriteProductionRulte() throws Exception { Object orig = m_dataSource.getProductionRuleList().getProductionRule("infForSilver"); Object read = serialize(orig); Object local = m_dataSink.getProductionRuleList().getProductionRule("infForSilver"); assertTrue(local == read); } | 8339 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8339/65dc97c8bd1d73da6a21d79d5ad468e6bb971a9b/SerializationTest.java/buggy/src/games/strategy/engine/data/SerializationTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3067,
31590,
54,
406,
73,
1435,
1216,
1185,
202,
95,
9506,
202,
921,
1647,
273,
312,
67,
892,
1830,
18,
588,
31590,
2175,
682,
7675,
588,
31590,
2175,
2932,
10625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3067,
31590,
54,
406,
73,
1435,
1216,
1185,
202,
95,
9506,
202,
921,
1647,
273,
312,
67,
892,
1830,
18,
588,
31590,
2175,
682,
7675,
588,
31590,
2175,
2932,
10625,
... | ||
scope.getWorld().getLint().invalidAbsoluteTypeName.signal(cleanName, getSourceLocation()); | scope.getWorld().getLint().invalidAbsoluteTypeName.signal(originalName, getSourceLocation()); | public TypePattern resolveBindings(IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) { if (isStar()) { return TypePattern.ANY; //??? loses source location } String simpleName = maybeGetSimpleName(); if (simpleName != null) { FormalBinding formalBinding = scope.lookupFormal(simpleName); if (formalBinding != null) { if (bindings == null) { scope.message(IMessage.ERROR, this, "negation doesn't allow binding"); return this; } if (!allowBinding) { scope.message(IMessage.ERROR, this, "name binding only allowed in target, this, and args pcds"); return this; } BindingTypePattern binding = new BindingTypePattern(formalBinding); binding.copyLocationFrom(this); bindings.register(binding, scope); return binding; } } String cleanName = maybeGetCleanName(); if (cleanName != null) { TypeX type; //System.out.println("resolve: " + cleanName); //??? this loop has too many inefficiencies to count while ((type = scope.lookupType(cleanName, this)) == ResolvedTypeX.MISSING) { int lastDot = cleanName.lastIndexOf('.'); if (lastDot == -1) break; cleanName = cleanName.substring(0, lastDot) + '$' + cleanName.substring(lastDot+1); } if (type == ResolvedTypeX.MISSING) { if (requireExactType) { if (!allowBinding) { scope.getWorld().getMessageHandler().handleMessage( MessageUtil.error("can't bind type name '" + cleanName + "'", getSourceLocation())); } else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) { scope.getWorld().getLint().invalidAbsoluteTypeName.signal(cleanName, getSourceLocation()); } return NO; } else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) { scope.getWorld().getLint().invalidAbsoluteTypeName.signal(cleanName, getSourceLocation()); } } else { if (dim != 0) type = TypeX.makeArray(type, dim); TypePattern ret = new ExactTypePattern(type, includeSubtypes); ret.copyLocationFrom(this); return ret; } } else { if (requireExactType) { scope.getWorld().getMessageHandler().handleMessage( MessageUtil.error("wildcard type pattern not allowed, must use type name", getSourceLocation())); return NO; } //XXX need to implement behavior for Lint.invalidWildcardTypeName } importedPrefixes = scope.getImportedPrefixes(); knownMatches = preMatch(scope.getImportedNames()); return this; } | 53148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53148/936459c28229321deb0b09d076193be32cd9754e/WildTypePattern.java/clean/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1412,
3234,
2245,
10497,
12,
45,
3876,
2146,
16,
6936,
899,
7394,
16,
1377,
6862,
9506,
202,
6494,
1699,
5250,
16,
1250,
2583,
14332,
559,
13,
565,
288,
1875,
377,
202,
430,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1412,
3234,
2245,
10497,
12,
45,
3876,
2146,
16,
6936,
899,
7394,
16,
1377,
6862,
9506,
202,
6494,
1699,
5250,
16,
1250,
2583,
14332,
559,
13,
565,
288,
1875,
377,
202,
430,
2... |
public TablePane(SQLTable m, PlayPen parentPP) { super(parentPP.getPlayPenContentPane()); setModel(m); setOpaque(true); setInsertionPoint(COLUMN_INDEX_NONE); | public TablePane(TablePane tp, PlayPenContentPane parent) { super(parent); this.model = tp.model; this.selectionListeners = new ArrayList<SelectionListener>(); this.dtl = new TablePaneDropListener(this); this.margin = (Insets) tp.margin.clone(); this.columnSelection = new ArrayList<Boolean>(tp.columnSelection); this.columnHighlight = new HashMap<SQLColumn,List<Color>>(tp.columnHighlight); try { | public TablePane(SQLTable m, PlayPen parentPP) { super(parentPP.getPlayPenContentPane()); setModel(m); setOpaque(true); setInsertionPoint(COLUMN_INDEX_NONE); //dt = new DropTarget(parentPP, new TablePaneDropListener(this)); dtl = new TablePaneDropListener(this); updateUI(); } | 53257 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53257/0c7a5fde218441cc8cd060c897154023b86850a0/TablePane.java/buggy/src/ca/sqlpower/architect/swingui/TablePane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3555,
8485,
12,
3997,
1388,
312,
16,
19592,
24251,
982,
6584,
13,
288,
202,
540,
202,
202,
9565,
12,
2938,
6584,
18,
588,
11765,
24251,
1350,
8485,
10663,
202,
202,
542,
1488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3555,
8485,
12,
3997,
1388,
312,
16,
19592,
24251,
982,
6584,
13,
288,
202,
540,
202,
202,
9565,
12,
2938,
6584,
18,
588,
11765,
24251,
1350,
8485,
10663,
202,
202,
542,
1488,
... |
public static SortedMap availableCharsets () | public static SortedMap availableCharsets() | public static SortedMap availableCharsets () { TreeMap charsets = new TreeMap (String.CASE_INSENSITIVE_ORDER); CharsetProvider[] providers = providers (); for (int j = 0; j < providers.length; j++) { for (Iterator i = providers[j].charsets (); i.hasNext (); ) { Charset cs = (Charset) i.next (); charsets.put (cs.name (), cs); } } return Collections.unmodifiableSortedMap (charsets); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/bf560a8779969d6eebd32b5498963954b9cbe3cc/Charset.java/clean/libraries/javalib/java/nio/charset/Charset.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
31205,
2319,
19329,
1435,
225,
288,
565,
16381,
1149,
4424,
273,
394,
16381,
261,
780,
18,
13415,
67,
706,
26753,
16325,
67,
7954,
1769,
565,
12080,
2249,
8526,
9165,
273,
9165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
31205,
2319,
19329,
1435,
225,
288,
565,
16381,
1149,
4424,
273,
394,
16381,
261,
780,
18,
13415,
67,
706,
26753,
16325,
67,
7954,
1769,
565,
12080,
2249,
8526,
9165,
273,
9165,
... |
if(classArray.length != 1) { | if (classArray.length != 1) { | public int canContainComponent(String name) { String cName = capitalizeFirstLetter(name); Method method = getMethod("add" + cName); if (method != null) { //getLogger().debug( // "Found add {} method in class {}", cName, objClass.getName()); return AS_COLLECTION; } String dName = Introspector.decapitalize(name); PropertyDescriptor propertyDescriptor = getPropertyDescriptor(dName); if (propertyDescriptor != null) { Method setterMethod = propertyDescriptor.getWriteMethod(); if (setterMethod != null) { //getLogger().debug( // "Found setter method for property [{}] in class {}", name, // objClass.getName()); Class[] classArray = setterMethod.getParameterTypes(); if(classArray.length != 1) { return NOT_FOUND; } else { Class clazz = classArray[0]; Package p = clazz.getPackage(); if(clazz.isPrimitive()) { return AS_PROPERTY; } else if("java.lang".equals(p.getName())) { return AS_PROPERTY; } else { return AS_COMPONENT; } } } } // we have failed return NOT_FOUND; } | 53733 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53733/d3806b8259a72fed9836fbf64e5ec69286d504ac/PropertySetter.java/buggy/logback-core/src/main/java/ch/qos/logback/core/util/PropertySetter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
848,
22928,
1841,
12,
780,
508,
13,
288,
565,
514,
276,
461,
273,
17451,
3759,
13938,
12,
529,
1769,
565,
2985,
707,
273,
6272,
2932,
1289,
6,
397,
276,
461,
1769,
565,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
848,
22928,
1841,
12,
780,
508,
13,
288,
565,
514,
276,
461,
273,
17451,
3759,
13938,
12,
529,
1769,
565,
2985,
707,
273,
6272,
2932,
1289,
6,
397,
276,
461,
1769,
565,
309,
... |
children.add(new LibraryGroupNode(getProject(), new LibraryGroupElement(getValue()), getSettings())); | if (getSettings().isShowLibraryContents()) { children.add(new LibraryGroupNode(getProject(), new LibraryGroupElement(getValue()), getSettings())); } | public Collection<AbstractTreeNode> getChildren() { ModuleRootManager rootManager = ModuleRootManager.getInstance(getValue()); ModuleFileIndex moduleFileIndex = rootManager.getFileIndex(); final VirtualFile[] contentRoots = rootManager.getContentRoots(); final List<AbstractTreeNode> children = new ArrayList<AbstractTreeNode>(contentRoots.length + 1); final PsiManager psiManager = PsiManager.getInstance(getProject()); for (int idx = 0; idx < contentRoots.length; idx++) { final VirtualFile contentRoot = contentRoots[idx]; LOG.assertTrue(contentRoot.isDirectory()); if (!moduleFileIndex.isInContent(contentRoot)) continue; final PsiDirectory psiDirectory = psiManager.findDirectory(contentRoot); LOG.assertTrue(psiDirectory != null); children.add(new PsiDirectoryNode(getProject(), psiDirectory, getSettings())); } children.add(new LibraryGroupNode(getProject(), new LibraryGroupElement(getValue()), getSettings())); return children; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/5241675c21ba2049d65ccb1cafc4aab102487ff4/ProjectViewModuleNode.java/buggy/source/com/intellij/ide/projectView/impl/nodes/ProjectViewModuleNode.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2200,
32,
7469,
12513,
34,
10268,
1435,
288,
565,
5924,
2375,
1318,
1365,
1318,
273,
5924,
2375,
1318,
18,
588,
1442,
12,
24805,
10663,
565,
5924,
812,
1016,
1605,
812,
1016,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2200,
32,
7469,
12513,
34,
10268,
1435,
288,
565,
5924,
2375,
1318,
1365,
1318,
273,
5924,
2375,
1318,
18,
588,
1442,
12,
24805,
10663,
565,
5924,
812,
1016,
1605,
812,
1016,
273,
1... |
public org.quickfix.field.CardHolderName getCardHolderName() throws FieldNotFound { org.quickfix.field.CardHolderName value = new org.quickfix.field.CardHolderName(); | public quickfix.field.CardHolderName getCardHolderName() throws FieldNotFound { quickfix.field.CardHolderName value = new quickfix.field.CardHolderName(); | public org.quickfix.field.CardHolderName getCardHolderName() throws FieldNotFound { org.quickfix.field.CardHolderName value = new org.quickfix.field.CardHolderName(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/SettlementInstructions.java/buggy/src/java/src/quickfix/fix43/SettlementInstructions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
6415,
6064,
461,
26776,
6064,
461,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
6415,
6064,
461,
460,
273,
394,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
6415,
6064,
461,
26776,
6064,
461,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
6415,
6064,
461,
460,
273,
394,
2358,
... |
"," + right +"]@" + pos + " " + getProbability(); | "," + right +"]@" + pos + " " + getProbability() + "{" + wordSequence + "}" ; | public String toString() { String pos = central == null ? "" : central.getPosition().toString(); Unit left = hmmPool.getUnit(leftID); return central + "[" + left + "," + right +"]@" + pos + " " + getProbability(); } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/4c3dde157ae1a91919f5ca24d623526e50d28194/LexTreeLinguist.java/clean/edu/cmu/sphinx/decoder/linguist/lextree/LexTreeLinguist.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
1762,
1435,
288,
5411,
514,
949,
273,
18291,
422,
446,
692,
1408,
1171,
294,
18291,
18,
588,
2555,
7675,
10492,
5621,
5411,
8380,
2002,
273,
366,
7020,
2864,
18,
588,
2802,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
514,
1762,
1435,
288,
5411,
514,
949,
273,
18291,
422,
446,
692,
1408,
1171,
294,
18291,
18,
588,
2555,
7675,
10492,
5621,
5411,
8380,
2002,
273,
366,
7020,
2864,
18,
588,
2802,
12,... |
public String toString() { return super.toString() + ", "+noComponents + " components"; } | public String toString() { return super.toString() + ", " + noComponents + " components"; } | public String toString() { return super.toString() + ", "+noComponents + " components"; } | 57341 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57341/f1a2e8bd347e294e5391728379b76d4500a7093d/TTFGlyfTable.java/clean/freehep-graphicsio/src/main/java/org/freehep/graphicsio/font/truetype/TTFGlyfTable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
3196,
565,
327,
2240,
18,
10492,
1435,
397,
3104,
13773,
2135,
7171,
397,
315,
4085,
14432,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
1762,
1435,
288,
3196,
565,
327,
2240,
18,
10492,
1435,
397,
3104,
13773,
2135,
7171,
397,
315,
4085,
14432,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
counter++; } } | counter++; } } | static IPath getAutoNewNameFor(IPath originalName, IWorkspace workspace) { int counter = 1; String resourceName = originalName.lastSegment(); IPath leadupSegment = originalName.removeLastSegments(1); while (true) { String nameSegment; if (counter > 1) nameSegment = NLS.bind(IDEWorkbenchMessages.CopyFilesAndFoldersOperation_copyNameTwoArgs, new Integer(counter), resourceName); else nameSegment = NLS.bind(IDEWorkbenchMessages.CopyFilesAndFoldersOperation_copyNameOneArg, resourceName); IPath pathToTry = leadupSegment.append(nameSegment); if (!workspace.getRoot().exists(pathToTry)) return pathToTry; counter++; } } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/48cbfd568805d8302ff76e177e1533df1b92a834/CopyFilesAndFoldersOperation.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
467,
743,
26707,
1908,
461,
1290,
12,
45,
743,
2282,
461,
16,
467,
8241,
6003,
13,
288,
3639,
509,
3895,
273,
404,
31,
3639,
514,
9546,
273,
2282,
461,
18,
2722,
4131,
5621,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
467,
743,
26707,
1908,
461,
1290,
12,
45,
743,
2282,
461,
16,
467,
8241,
6003,
13,
288,
3639,
509,
3895,
273,
404,
31,
3639,
514,
9546,
273,
2282,
461,
18,
2722,
4131,
5621,
3639,
... |
if (newValue instanceof BigDecimal && !isDecimalNumber() && attribute().valueType().equals("i")) { | if (newValue instanceof BigDecimal && !isDecimalNumber() && attribute().valueType() != null && attribute().valueType().equals("i")) { | public Object convertNumber(Object anObject) { Number newValue=null; if (anObject!=null && anObject instanceof Number) { newValue=(Number)anObject; if (newValue instanceof BigDecimal && !isDecimalNumber() && attribute().valueType().equals("i")) { // we are getting a BigDecimal from WOTextField even though we asked for an Integer! newValue=ERXConstant.integerForInt(newValue.intValue()); } } return newValue; } | 810 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/810/370d52c1e060229e7c3374b5b17eda83b7aec80d/ERD2WEditNumber.java/clean/Wonder/Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/ERD2WEditNumber.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
1854,
12,
921,
392,
921,
13,
288,
3639,
3588,
6129,
33,
2011,
31,
3639,
309,
261,
304,
921,
5,
33,
2011,
597,
392,
921,
1276,
3588,
13,
288,
5411,
6129,
28657,
1854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1033,
1765,
1854,
12,
921,
392,
921,
13,
288,
3639,
3588,
6129,
33,
2011,
31,
3639,
309,
261,
304,
921,
5,
33,
2011,
597,
392,
921,
1276,
3588,
13,
288,
5411,
6129,
28657,
1854,
... |
markLockedIfNecessary( iobj, null ); | secSys.markLockedIfNecessary( iobj ); | public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types) { debug("Intercepted save."); if ( entity instanceof IObject ) { IObject iobj = (IObject) entity; int idx = detailsIndex( propertyNames ); // New instances don't inherently need to be locked // as they have no trustedDetails markLockedIfNecessary( iobj, null ); // Get a new details based on the current context Details d = secSys.transientDetails( iobj ); state[idx] = d; } return true; // transferDetails ALWAYS edits the new entity. } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9c53370b3f7a88f29e38673527398c205d19f7d6/OmeroInterceptor.java/buggy/components/server/src/ome/tools/hibernate/OmeroInterceptor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
603,
4755,
12,
921,
1522,
16,
13687,
612,
16,
1377,
202,
202,
921,
8526,
919,
16,
1377,
202,
202,
780,
8526,
26570,
16,
1412,
8526,
1953,
13,
565,
288,
377,
202,
4148,
2932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
4755,
12,
921,
1522,
16,
13687,
612,
16,
1377,
202,
202,
921,
8526,
919,
16,
1377,
202,
202,
780,
8526,
26570,
16,
1412,
8526,
1953,
13,
565,
288,
377,
202,
4148,
2932,... |
cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy); | rotation = reader.getPageRotation(i); if (rotation == 90 || rotation == 270) { cb.addTemplate(page, 0, -factor, factor, 0, x1 + dx, y2[p] + dy + rect.height() * factor); } else { cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy); } | public static void main (String args[]) { if (args.length != 3) { System.err.println("This tools needs 3 parameters:\njava Handout srcfile destfile pages"); } else { try { int pages = Integer.parseInt(args[2]); if (pages < 2 || pages > 8) { throw new DocumentException("You can't have " + pages + " pages on one page (minimum 2; maximum 8)."); } float x1 = 30f; float x2 = 280f; float x3 = 320f; float x4 = 565f; float[] y1 = new float[pages]; float[] y2 = new float[pages]; float height = (778f - (20f * (pages - 1))) / pages; y1[0] = 812f; y2[0] = 812f - height; for (int i = 1; i < pages; i++) { y1[i] = y2[i - 1] - 20f; y2[i] = y1[i] - height; } // we create a reader for a certain document PdfReader reader = new PdfReader(args[0]); // we retrieve the total number of pages int n = reader.getNumberOfPages(); System.out.println("There are " + n + " pages in the original file."); // step 1: creation of a document-object Document document = new Document(PageSize.A4); // step 2: we create a writer that listens to the document PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(args[1])); // step 3: we open the document document.open(); PdfContentByte cb = writer.getDirectContent(); PdfImportedPage page; int i = 0; int p = 0; // step 4: we add content while (i < n) { i++; Rectangle rect = reader.getPageSize(i); float factorx = (x2 - x1) / rect.width(); float factory = (y1[p] - y2[p]) / rect.height(); float factor = (factorx < factory ? factorx : factory); float dx = (factorx == factor ? 0f : ((x2 - x1) - rect.width() * factor) / 2f); float dy = (factory == factor ? 0f : ((y1[p] - y2[p]) - rect.height() * factor) / 2f); page = writer.getImportedPage(reader, i); cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy); cb.setRGBColorStroke(0xC0, 0xC0, 0xC0); cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f); for (float l = y1[p] - 19; l > y2[p]; l -= 16) { cb.moveTo(x3, l); cb.lineTo(x4, l); } cb.rectangle(x1 + dx, y2[p] + dy, rect.width() * factor, rect.height() * factor); cb.stroke(); System.out.println("Processed page " + i); p++; if (p == pages) { p = 0; document.newPage(); } } // step 5: we close the document document.close(); } catch(Exception e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); } } } | 4174 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4174/51a71004b2c701ba34190ff6986d33d751bb02c5/Handout.java/clean/www/examples/Handout.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
261,
780,
833,
63,
5717,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
2503,
8513,
4260,
890,
1472,
5581,
82,
6290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2774,
261,
780,
833,
63,
5717,
288,
3639,
309,
261,
1968,
18,
2469,
480,
890,
13,
288,
5411,
2332,
18,
370,
18,
8222,
2932,
2503,
8513,
4260,
890,
1472,
5581,
82,
6290,
... |
if (manager == null) | if (manager == null) { | public BindingManagerEvent(final BindingManager manager, final boolean activeBindingsChanged, final Map previousTriggersByParameterizedCommand, final boolean activeSchemeChanged, final Scheme scheme, final boolean schemeDefined, final boolean localeChanged, final boolean platformChanged) { if (manager == null) throw new NullPointerException( "A binding manager event needs a binding manager"); //$NON-NLS-1$ this.manager = manager; if (schemeDefined && (scheme == null)) { throw new NullPointerException( "If a scheme changed defined state, then there should be a scheme identifier"); //$NON-NLS-1$ } this.scheme = scheme; this.previousTriggersByParameterizedCommand = previousTriggersByParameterizedCommand; if (activeBindingsChanged) { changedValues |= CHANGED_ACTIVE_BINDINGS; } if (activeSchemeChanged) { changedValues |= CHANGED_ACTIVE_SCHEME; } if (localeChanged) { changedValues |= CHANGED_LOCALE; } if (platformChanged) { changedValues |= CHANGED_PLATFORM; } if (schemeDefined) { changedValues |= CHANGED_SCHEME_DEFINED; } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/391f2606b4ea2c1fb5052d938ca90877ee7631f6/BindingManagerEvent.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManagerEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
15689,
1318,
1133,
12,
6385,
15689,
1318,
3301,
16,
1082,
202,
6385,
1250,
2695,
10497,
5033,
16,
1082,
202,
6385,
1635,
2416,
15114,
858,
15696,
2189,
16,
1082,
202,
6385,
1250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15689,
1318,
1133,
12,
6385,
15689,
1318,
3301,
16,
1082,
202,
6385,
1250,
2695,
10497,
5033,
16,
1082,
202,
6385,
1635,
2416,
15114,
858,
15696,
2189,
16,
1082,
202,
6385,
1250,
... |
/* (non-Javadoc) | /* * (non-Javadoc) * | public ScopedPreferenceStore(IScopeContext context, String qualifier) { storeContext = context; nodeQualifier = qualifier; preferencesListener = new IEclipsePreferences.IPreferenceChangeListener() { /* (non-Javadoc) * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent) */ public void preferenceChange(PreferenceChangeEvent event) { if (silentRunning) return; Object oldValue = event.getOldValue(); Object newValue = event.getNewValue(); String key = event.getKey(); if (newValue == null) newValue = getDefault(key, oldValue); else if (oldValue == null) oldValue = getDefault(key, newValue); firePropertyChangeEvent(event.getKey(), oldValue, newValue); } }; getStorePreferences().addPreferenceChangeListener(preferencesListener); ((IEclipsePreferences) getStorePreferences().parent()).addNodeChangeListener( getNodeChangeListener()); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/5b436d4cc24bfdb1855540d7aa2e847064fe2450/ScopedPreferenceStore.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences/ScopedPreferenceStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2850,
8889,
9624,
2257,
12,
45,
3876,
1042,
819,
16,
514,
12327,
13,
288,
202,
202,
2233,
1042,
273,
819,
31,
202,
202,
2159,
16185,
273,
12327,
31,
202,
202,
23219,
2223,
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,
225,
202,
482,
2850,
8889,
9624,
2257,
12,
45,
3876,
1042,
819,
16,
514,
12327,
13,
288,
202,
202,
2233,
1042,
273,
819,
31,
202,
202,
2159,
16185,
273,
12327,
31,
202,
202,
23219,
2223,
273... |
log.error(e); | System.err.println(e); | public void start() throws Exception { Object obj; Message msg; View view; Vector tmp; UnicastTest2Info info, myinfo; Object sender; channel=new JChannel(props); channel.connect(groupname); System.out.println("[ready]"); while(true) { try { obj=channel.receive(0); if(obj instanceof View) { view=(View)obj; tmp=view.getMembers(); mbrs.removeAllElements(); for(int i=0; i < tmp.size(); i++) mbrs.addElement(tmp.elementAt(i)); for(Enumeration e=senders.keys(); e.hasMoreElements();) { sender=e.nextElement(); if(!mbrs.contains(sender)) { mbrs.removeElement(sender); } } if(mbrs.size() > 1) { if(writer == null) { writer=new Thread(this, "WriterThread"); writer.start(); } } else { if(writer != null) { running=false; writer.interrupt(); } writer=null; } } else if(obj instanceof Message) { msg=(Message)obj; info=(UnicastTest2Info)msg.getObject(); System.out.println("Received msg: " + info); myinfo=(UnicastTest2Info)senders.get(info.sender); if(myinfo == null) { // first msg if(info.msgno == 1) { // must be 1 senders.put(info.sender, info); } else { // error log.error("UnicastTest2.start(): first seqno must be 1"); } } else { if(info.msgno -1 != myinfo.msgno) { log.error("UnicastTest2.start(): received msg " + info.sender + ':' + info.msgno + ", but last received was " + myinfo.sender + ':' + myinfo.msgno); } else { System.out.println("UnicastTest2.start(): OK received " + info.sender + ':' + info.msgno + ", prev seqno=" + myinfo.sender + ':' + myinfo.msgno); myinfo.msgno++; } } } else ; } catch(ChannelClosedException closed) { log.error("Channel closed"); break; } catch(ChannelNotConnectedException not_conn) { log.error("Channel not connected"); break; } catch(Exception e) { log.error(e); } } } | 3550 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3550/13de68466e3cf7fde6ee0bde0cee09a33e837e89/UnicastTest2.java/clean/tests/other/org/jgroups/tests/UnicastTest2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
787,
1435,
1216,
1185,
288,
202,
921,
5411,
1081,
31,
202,
1079,
6647,
1234,
31,
202,
1767,
2868,
1476,
31,
202,
5018,
5411,
1853,
31,
202,
984,
12544,
4709,
22,
966,
225,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
1435,
1216,
1185,
288,
202,
921,
5411,
1081,
31,
202,
1079,
6647,
1234,
31,
202,
1767,
2868,
1476,
31,
202,
5018,
5411,
1853,
31,
202,
984,
12544,
4709,
22,
966,
225,
11... |
public void main(IWContext iwc) { //isStaff = com.idega.core.accesscontrol.business.AccessControl control(iwc); } | 57001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57001/33e5c85ca31478329116ab80b95fd07320394530/TariffEditor.java/clean/src/java/com/idega/block/finance/presentation/TariffEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2774,
12,
45,
59,
1042,
25522,
71,
13,
288,
202,
202,
759,
291,
510,
7329,
273,
532,
18,
831,
15833,
18,
3644,
18,
3860,
7098,
18,
24510,
18,
16541,
202,
202,
7098,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2774,
12,
45,
59,
1042,
25522,
71,
13,
288,
202,
202,
759,
291,
510,
7329,
273,
532,
18,
831,
15833,
18,
3644,
18,
3860,
7098,
18,
24510,
18,
16541,
202,
202,
7098,
12,... | ||
list.set( i + sdIndex, al.get( i - 1) ); ( ( OrthogonalSampleData ) list.get( i + sdIndex ) ).setSeriesDefinitionIndex( i | list.set( i + sdIndex, al.get( i - 1 ) ); ( (OrthogonalSampleData) list.get( i + sdIndex ) ).setSeriesDefinitionIndex( i | protected void addNewSeriesDefinition( ) { // Create a series definition without data definition SeriesDefinition sdTmp = SeriesDefinitionImpl.create( ); sdTmp.getSeriesPalette( ).update( -seriesDefns.size( ) ); sdTmp.getSeries( ) .add( EcoreUtil.copy( ( (SeriesDefinition) seriesDefns.get( 0 ) ).getDesignTimeSeries( ) ) ); // Add grouping query of the first series definition sdTmp.setQuery( (Query) EcoreUtil.copy( ( (SeriesDefinition) seriesDefns.get( 0 ) ).getQuery( ) ) ); cleanDataDefinition( sdTmp ); sdTmp.eAdapters( ) .addAll( ( (SeriesDefinition) seriesDefns.get( 0 ) ).eAdapters( ) ); int firstIndex = getFirstIndexOfSameAxis( ); EList list = getChart( ).getSampleData( ).getOrthogonalSampleData( ); // Create a new OrthogonalSampleData instance from the existing one OrthogonalSampleData sdOrthogonal = (OrthogonalSampleData) EcoreUtil.copy( (EObject) list.get( firstIndex ) ); sdOrthogonal.setSeriesDefinitionIndex( ChartUIUtil.getLastSeriesIndexWithinAxis( getChart( ), axisIndex ) + 1 ); sdOrthogonal.eAdapters( ).addAll( getChart( ).getSampleData( ) .eAdapters( ) ); // Update the Sample Data without event fired. boolean isNotificaionIgnored = ChartAdapter.isNotificationIgnored( ); ChartAdapter.ignoreNotifications( true ); int sdIndex = sdOrthogonal.getSeriesDefinitionIndex( ); ArrayList al = new ArrayList( ); if ( sdIndex >= list.size( ) ) { list.add( sdOrthogonal ); } else { for ( int i = sdIndex; i < list.size( ); i++ ) { al.add( list.get( i ) ); } list.set( sdIndex, sdOrthogonal ); for ( int i = 1; i < al.size( ); i++ ) { list.set( i + sdIndex, al.get( i - 1) ); ( ( OrthogonalSampleData ) list.get( i + sdIndex ) ).setSeriesDefinitionIndex( i + sdIndex ); } list.add( al.get( al.size( ) - 1 ) ); ( (OrthogonalSampleData) list.get( list.size( ) - 1 ) ).setSeriesDefinitionIndex( list.size( ) - 1 ); } ChartAdapter.ignoreNotifications( isNotificaionIgnored ); seriesDefns.add( sdTmp ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/4ce1e97aa23d1fe4046bd76743f3c5f90658bab6/DataDefinitionSelector.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/data/DataDefinitionSelector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
20973,
6485,
1852,
12,
262,
202,
95,
202,
202,
759,
1788,
279,
4166,
2379,
2887,
501,
2379,
202,
202,
6485,
1852,
8349,
9161,
273,
9225,
1852,
2828,
18,
2640,
12,
11272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
20973,
6485,
1852,
12,
262,
202,
95,
202,
202,
759,
1788,
279,
4166,
2379,
2887,
501,
2379,
202,
202,
6485,
1852,
8349,
9161,
273,
9225,
1852,
2828,
18,
2640,
12,
11272,
... |
return encode.nextByte() + (encode.nextByte() << 8); } | return encode.nextByte() + (encode.nextByte() << 8); } | private static int decodeShortUnsignedLittleEndian(PtrList encode) { return encode.nextByte() + (encode.nextByte() << 8); } | 52337 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52337/415b1e0db282c02d672a7e34a34a2bea0f69ccb2/Pack.java/clean/src/org/jruby/util/Pack.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
2495,
4897,
13290,
48,
10609,
12,
5263,
682,
2017,
13,
288,
202,
202,
2463,
2017,
18,
4285,
3216,
1435,
397,
261,
3015,
18,
4285,
3216,
1435,
2296,
1725,
1769,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1152,
760,
509,
2495,
4897,
13290,
48,
10609,
12,
5263,
682,
2017,
13,
288,
202,
202,
2463,
2017,
18,
4285,
3216,
1435,
397,
261,
3015,
18,
4285,
3216,
1435,
2296,
1725,
1769,
202,
... |
}catch(javax.ejb.FinderException fe){} catch(java.io.UnsupportedEncodingException e){} return returnval; | }catch(javax.ejb.FinderException fe){} catch(java.io.UnsupportedEncodingException e){} return returnval; | public boolean exitsCertificateProfileInCAs(Admin admin, int certificateprofileid){ boolean returnval = false; try{ Collection result = cadatahome.findAll(); Iterator iter = result.iterator(); while(iter.hasNext()){ CADataLocal cadata = (CADataLocal) iter.next(); returnval = returnval || (cadata.getCA().getCertificateProfileId() == certificateprofileid); } }catch(javax.ejb.FinderException fe){} catch(java.io.UnsupportedEncodingException e){} return returnval; } // exitsCertificateProfileInCAs | 4109 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4109/6f27459e8db7a9efb8cf0588695ad6fd28539506/CAAdminSessionBean.java/clean/src/java/se/anatom/ejbca/ca/caadmin/CAAdminSessionBean.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
19526,
4719,
4029,
382,
24900,
12,
4446,
3981,
16,
509,
4944,
5040,
350,
15329,
1377,
1250,
327,
1125,
273,
629,
31,
1377,
775,
95,
3639,
2200,
563,
273,
28451,
396,
8712,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
19526,
4719,
4029,
382,
24900,
12,
4446,
3981,
16,
509,
4944,
5040,
350,
15329,
1377,
1250,
327,
1125,
273,
629,
31,
1377,
775,
95,
3639,
2200,
563,
273,
28451,
396,
8712,
18,... |
else walkPath (s.getPathIterator (null), false); cairoFill (); if (isBufferedImageGraphics ()) updateBufferedImage(); | else walkPath(s.getPathIterator(null), false); cairoFill(); | public void fill (Shape s) { cairoNewPath (); if (s instanceof Rectangle2D) { Rectangle2D r = (Rectangle2D)s; cairoRectangle (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); } else walkPath (s.getPathIterator (null), false); cairoFill (); if (isBufferedImageGraphics ()) updateBufferedImage(); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/bef34bda2204726d6cecbf5422e100bc663abc3e/GdkGraphics2D.java/buggy/libraries/javalib/gnu/java/awt/peer/gtk/GdkGraphics2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3636,
261,
8500,
272,
13,
225,
288,
565,
14503,
1908,
743,
261,
1769,
565,
309,
261,
87,
1276,
13264,
22,
40,
13,
1377,
288,
3639,
13264,
22,
40,
436,
273,
261,
19463,
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,
282,
1071,
918,
3636,
261,
8500,
272,
13,
225,
288,
565,
14503,
1908,
743,
261,
1769,
565,
309,
261,
87,
1276,
13264,
22,
40,
13,
1377,
288,
3639,
13264,
22,
40,
436,
273,
261,
19463,
22,
... |
if (lmodel instanceof GroupItemsListModel) ((GroupItemsListModel)lmodel).update(); | if (lmodel instanceof GroupItemsListModel) { ((GroupItemsListModel)lmodel).setGroup((BundleGroup)jComboBoxGroup.getSelectedItem()); } | public void updateComponents() { // Initialize components if (bundle != null) { jLabelGroupTitle.setText(bundle.name); topDim.width = getSize().width; rightDim.width = getSize().width - leftDim.width; box2.removeAll(); box3.removeAll(); boxGroupInfo.remove(jScrollPaneGroupTable); String selName = null; try { selName = ((BundleGroup)jComboBoxGroup.getSelectedItem()).getName(); } catch (Exception e) {} jComboBoxGroup = new JComboBox(new GroupComboBoxModel(bundle));//bundle.getGroupsAsVector()); for (int i = 0; i < jComboBoxGroup.getItemCount(); i++) { BundleGroup bg = (BundleGroup)jComboBoxGroup.getItemAt(i); if (bg.getName().equals(selName)) jComboBoxGroup.setSelectedIndex(i); } ((GroupItemsTableModel)jTableGroupTable.getModel()).setGroup((BundleGroup)jComboBoxGroup.getSelectedItem()); jScrollPaneGroupTable = new JScrollPane(jTableGroupTable); jLabelGroupComment.setText(((BundleGroup)jComboBoxGroup.getSelectedItem()).getComment()); jTableGroupTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jComboBoxGroup.addActionListener(new GroupComboActionListener(jTableGroupTable)); // Update the group comment jLabelGroupComment.setText(((BundleGroup)jComboBoxGroup.getSelectedItem()).getComment()); // Update the display jComboBoxGroup.setPreferredSize(rightDim); box2.add(Box.createHorizontalGlue()); box2.add(jLabelGroupNameTitle); box2.add(jComboBoxGroup); box3.add(Box.createHorizontalGlue()); box3.add(jLabelGroupCommentTitle); box3.add(jLabelGroupComment); boxGroupInfo.add(jScrollPaneGroupTable); } else if (rbm != null) { // Update the list of groups try {((GroupComboBoxModel)jComboBoxGroup.getModel()).update();} catch (Exception e) {} // Update the group comment if ((BundleGroup)jComboBoxGroup.getSelectedItem() != null) jLabelGroupComment.setText(((BundleGroup)jComboBoxGroup.getSelectedItem()).getComment()); else jLabelGroupComment.setText(""); // Update the list of resources ListModel lmodel = jListGroup.getModel(); if (lmodel instanceof GroupItemsListModel) ((GroupItemsListModel)lmodel).update(); else { GroupItemsListModel newModel = new GroupItemsListModel((BundleGroup)jComboBoxGroup.getSelectedItem()); RBManagerGUI.debugMsg("List Model not as anticipated: " + lmodel.getClass().getName()); jListGroup.setModel(newModel); newModel.update(); } /* try {GroupItemsListModel mod = (GroupItemsListModel) lmodel; } catch (Exception e) { e.printStackTrace(System.err); } */ if (lmodel instanceof AbstractListModel) { RBManagerGUI.debugMsg("List Model is an AbstractListModel"); } else { RBManagerGUI.debugMsg("List Model is not an AbstractListModel"); } } else { removeAll(); } //validate(); } | 5620 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5620/e348109e648550415ca1fcd1dc341a10f3c11436/RBGroupPanel.java/buggy/tools/unicodetools/com/ibm/rbm/gui/RBGroupPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
7171,
1435,
288,
202,
202,
759,
9190,
4085,
202,
202,
430,
261,
9991,
480,
446,
13,
288,
1082,
202,
78,
2224,
1114,
4247,
18,
542,
1528,
12,
9991,
18,
529,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1089,
7171,
1435,
288,
202,
202,
759,
9190,
4085,
202,
202,
430,
261,
9991,
480,
446,
13,
288,
1082,
202,
78,
2224,
1114,
4247,
18,
542,
1528,
12,
9991,
18,
529,
1769,
... |
this.string = str; | this.string = (String)allStrings.intern(str); | 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') { flags &= ~TSF_DIRTYLINE; if ((flags & TSF_NEWLINES) != 0) break; } } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; if (c != '-' && c != '\n') flags |= TSF_DIRTYLINE; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean identifierStart; boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') { identifierStart = true; isUnicodeEscapeStart = true; stringBufferTop = 0; } else { identifierStart = false; c = '\\'; in.unread(); } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); } } if (identifierStart) { boolean containsEscape = isUnicodeEscapeStart; for (;;) { if (isUnicodeEscapeStart) { // 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 in an identifier, we can report // an error here. int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); // Next check takes care about c < 0 and bad escape if (escapeVal < 0) { break; } } if (escapeVal < 0) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } addToString(escapeVal); isUnicodeEscapeStart = false; } else { c = in.read(); if (c == '\\') { c = in.read(); if (c == 'u') { isUnicodeEscapeStart = true; containsEscape = true; } else { reportSyntaxError("msg.illegal.character", null); return ERROR; } } else { if (!Character.isJavaIdentifierPart((char)c)) { break; } addToString(c); } } } in.unread(); String str = getStringFromBuffer(); if (!containsEscape) { // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // Return the corresponding token if it's a keyword int 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); } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { stringBufferTop = 0; int base = 10; if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { base = 16; c = in.read(); } else if (isDigit(c)) { base = 8; } else { addToString('0'); } } if (base == 16) { while (0 <= xDigitToInt(c)) { addToString(c); c = in.read(); } } else { while ('0' <= c && c <= '9') { /* * 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; } addToString(c); c = in.read(); } } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { addToString(c); c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { addToString(c); c = in.read(); if (c == '+' || c == '-') { addToString(c); c = in.read(); } if (!isDigit(c)) { reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { addToString(c); c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = getStringFromBuffer(); 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. int quoteChar = c; int val = 0; stringBufferTop = 0; c = in.read(); strLoop: while (c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character c = in.read(); switch (c) { 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; // \v a late addition to the ECMA spec, // it is not in Java, so use 0xb case 'v': c = 0xb; break; case 'u': { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. */ int escapeStart = stringBufferTop; addToString('u'); int escapeVal = 0; for (int i = 0; i != 4; ++i) { c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { continue strLoop; } addToString(c); } // prepare for replace of stored 'u' sequence // by escape value stringBufferTop = escapeStart; c = escapeVal; } break; case 'x': { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ c = in.read(); int escapeVal = xDigitToInt(c); if (escapeVal < 0) { addToString('x'); continue strLoop; } else { int c1 = c; c = in.read(); escapeVal = (escapeVal << 4) | xDigitToInt(c); if (escapeVal < 0) { addToString('x'); addToString(c1); continue strLoop; } else { // got 2 hex digits c = escapeVal; } } } break; default: if ('0' <= c && c < '8') { val = c - '0'; c = in.read(); if ('0' <= c && c < '8') { val = 8 * val + c - '0'; c = in.read(); if ('0' <= c && c < '8' && val <= 037) { // c is 3rd char of octal sequence only if // the resulting val <= 0377 val = 8 * val + c - '0'; c = in.read(); } } in.unread(); c = val; } } } addToString(c); c = in.read(); } this.string = getStringFromBuffer(); 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('-')) { skipLine(); 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('/')) { skipLine(); 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) { stringBufferTop = 0; while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { addToString(c); c = in.read(); } addToString(c); } int reEnd = stringBufferTop; while (true) { if (in.match('g')) addToString('g'); else if (in.match('i')) addToString('i'); else if (in.match('m')) addToString('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = new String(stringBuffer, 0, reEnd); this.regExpFlags = new String(stringBuffer, reEnd, stringBufferTop - reEnd); return REGEXP; } 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 '+': if (in.match('=')) { this.op = ADD; return ASSIGN; } else if (in.match('+')) { return INC; } else { return ADD; } case '-': if (in.match('=')) { this.op = SUB; c = ASSIGN; } else if (in.match('-')) { if (0 == (flags & TSF_DIRTYLINE)) { // treat HTML end-comment after possible whitespace // after line start as comment-utill-eol if (in.match('>')) { skipLine(); return getToken(); } } c = DEC; } else { c = SUB; } flags |= TSF_DIRTYLINE; return c; default: reportSyntaxError("msg.illegal.character", null); return ERROR; } } | 12564 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12564/5739d875ab983543fdf729f70a15773fdbe9b1bd/TokenStream.java/buggy/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,
... |
sorter.setCriteria(sortCriteria); navigator.setSorter(sorter); | comparator.setCriteria(sortCriteria); navigator.setComparator(comparator); | public void run() { IResourceNavigator navigator = getNavigator(); ResourceSorter sorter = navigator.getSorter(); if (sorter == null) { navigator.setSorter(new ResourceSorter(sortCriteria)); } else { sorter.setCriteria(sortCriteria); navigator.setSorter(sorter); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/68c41e379434a8eae3b5d319a3f3c306cf97926f/SortViewAction.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/SortViewAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
467,
1420,
22817,
19796,
273,
11069,
13061,
5621,
3639,
2591,
24952,
19867,
273,
19796,
18,
588,
24952,
5621,
3639,
309,
261,
2467,
387,
422,
446,
13,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1086,
1435,
288,
3639,
467,
1420,
22817,
19796,
273,
11069,
13061,
5621,
3639,
2591,
24952,
19867,
273,
19796,
18,
588,
24952,
5621,
3639,
309,
261,
2467,
387,
422,
446,
13,
288,... |
private void storeSnmpCollection(Connection dbConn, Timestamp now) throws SQLException, UnknownHostException { Category log = ThreadCategory.getInstance(getClass()); Iterator ite = null; int nodeid = m_node.getNodeId(); if (m_snmpcoll.hasIpNetToMediaTable()) { ite = m_snmpcoll.getIpNetToMediaTable() .getEntries().iterator(); if (log.isDebugEnabled()) log .debug("store: saving IpNetToMediaTable to atinterface table in DB"); // the AtInterfaces used by LinkableNode where to save info java.util.List<AtInterface> atInterfaces = new java.util.ArrayList<AtInterface>(); while (ite.hasNext()) { IpNetToMediaTableEntry ent = (IpNetToMediaTableEntry) ite .next(); int ifindex = ent .getInt32(IpNetToMediaTableEntry.INTM_INDEX); InetAddress ipaddress = ent .getIPAddress(IpNetToMediaTableEntry.INTM_NETADDR); if (ipaddress.isLoopbackAddress() || ipaddress.getHostAddress().equals("0.0.0.0")) { log.warn("store: invalid ip " + ipaddress.getHostAddress()); continue; } String physAddr = ent .getHexString(IpNetToMediaTableEntry.INTM_PHYSADDR); if (physAddr.equals("000000000000") || physAddr.equalsIgnoreCase("ffffffffffff")) { log.warn("store: invalid mac address " + physAddr + " for ip " + ipaddress.getHostAddress()); continue; } if (log.isDebugEnabled()) log.debug("store: trying save info for ipaddr " + ipaddress.getHostName() + " mac address " + physAddr + " found on ifindex " + ifindex); // get an At interface but without setting mac address AtInterface at = getNodeidIfindexFromIp(dbConn, ipaddress); if (at == null) { log.warn("getNodeidIfindexFromIp: no nodeid found for ipaddress " + ipaddress + "."); continue; //TODO here is a good place for autodiscovery } //set the mac address at.setMacAddress(physAddr); // add At Inteface to list of valid interfaces atInterfaces.add(at); // Save in DB DbAtInterfaceEntry atInterfaceEntry = DbAtInterfaceEntry.get( dbConn, at.getNodeId(), ipaddress.getHostAddress()); if (atInterfaceEntry == null) { atInterfaceEntry = DbAtInterfaceEntry.create(at.getNodeId(), ipaddress.getHostAddress()); } // update object atInterfaceEntry.updateAtPhysAddr(physAddr); atInterfaceEntry.updateSourceNodeId(nodeid); atInterfaceEntry.updateIfIndex(ifindex); atInterfaceEntry.updateStatus(DbAtInterfaceEntry.STATUS_ACTIVE); atInterfaceEntry.set_lastpolltime(now); // store object in database atInterfaceEntry.store(dbConn); } // set AtInterfaces in LinkableNode m_node.setAtInterfaces(atInterfaces); } if (m_snmpcoll.hasCdpCacheTable()) { if (log.isDebugEnabled()) log .debug("store: saving CdpCacheTable into SnmpLinkableNode"); java.util.List<CdpInterface> cdpInterfaces = new java.util.ArrayList<CdpInterface>(); ite = m_snmpcoll.getCdpCacheTable() .getEntries().iterator(); while (ite.hasNext()) { CdpCacheTableEntry cdpEntry = (CdpCacheTableEntry) ite.next(); int cdpAddrType = cdpEntry.getInt32(CdpCacheTableEntry.CDP_ADDRESS_TYPE); if (cdpAddrType != 1) continue; String cdptargetipaddress = cdpEntry.getHexString(CdpCacheTableEntry.CDP_ADDRESS); if (log.isDebugEnabled()) log.debug(" cdp ip address octet string is " + cdptargetipaddress); long ipAddr = Long.parseLong(cdptargetipaddress, 16); byte[] bytes = new byte[4]; bytes[3] = (byte) (ipAddr & 0xff); bytes[2] = (byte) ((ipAddr >> 8) & 0xff); bytes[1] = (byte) ((ipAddr >> 16) & 0xff); bytes[0] = (byte) ((ipAddr >> 24) & 0xff); InetAddress cdpTargetIpAddr = InetAddress.getByAddress(bytes); if (log.isDebugEnabled()) log.debug(" cdp ip address after parsing is " + cdpTargetIpAddr.getHostAddress()); int cdpIfIndex = cdpEntry.getInt32(CdpCacheTableEntry.CDP_IFINDEX); if (log.isDebugEnabled()) log.debug(" cdp ifindex is " + cdpIfIndex); String cdpTargetDevicePort = cdpEntry.getDisplayString(CdpCacheTableEntry.CDP_DEVICEPORT); if (log.isDebugEnabled()) log.debug(" cdp Target device port name is " + cdpTargetDevicePort); CdpInterface cdpIface = new CdpInterface(cdpIfIndex); int targetCdpNodeId = getNodeidFromIp(dbConn, cdpTargetIpAddr); cdpIface.setCdpTargetNodeId(targetCdpNodeId); cdpIface.setCdpTargetIpAddr(cdpTargetIpAddr); int cdpTargetIfindex = getIfIndexByName( dbConn, targetCdpNodeId, cdpTargetDevicePort); if (targetCdpNodeId == -1 || cdpTargetIfindex == -1) { log.warn("No nodeid found: cdp interface not added to Linkable Snmp Node"); //TODO Good place for autodiscovery } else { cdpIface.setCdpTargetIfIndex(cdpTargetIfindex); cdpInterfaces.add(cdpIface); } } m_node.setCdpInterfaces(cdpInterfaces); } if (m_snmpcoll.hasRouteTable()) { java.util.List<RouterInterface> routeInterfaces = new java.util.ArrayList<RouterInterface>(); ite = m_snmpcoll.getIpRouteTable().getEntries() .iterator(); if (log.isDebugEnabled()) log .debug("store: saving ipRouteTable to iprouteinterface table in DB"); while (ite.hasNext()) { IpRouteTableEntry ent = (IpRouteTableEntry) ite.next(); log.debug("storeSnmpCollection: ent="+ent); InetAddress routedest = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_DEST); log.debug("storeSnmpCollection: routedest is: "+ (routedest == null ? "null" : routedest)+"; IP_ROUTE_DEST: "+IpRouteTableEntry.IP_ROUTE_DEST); InetAddress routemask = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_MASK); log.debug("storeSnmpCollection: routemask is: "+ (routemask == null ? "null" : routemask)+"; IP_ROUTE_MASK: "+IpRouteTableEntry.IP_ROUTE_MASK); InetAddress nexthop = ent.getIPAddress(IpRouteTableEntry.IP_ROUTE_NXTHOP); log.debug("storeSnmpCollection: nexthop is: "+ (nexthop == null ? "null" : nexthop)+"; IP_ROUTE_NXTHOP: "+IpRouteTableEntry.IP_ROUTE_NXTHOP); int ifindex = ent.getInt32(IpRouteTableEntry.IP_ROUTE_IFINDEX); log.debug("storeSnmpCollection: ifindex is: "+ (ifindex < 1 ? "less than 1" : ifindex)+"; IP_ROUTE_IFINDEX: "+IpRouteTableEntry.IP_ROUTE_IFINDEX); if (ifindex < 0) { log.warn("store: NNot valid ifindex" + ifindex + " Skipping..."); continue; } int routemetric1 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC1); log.debug("storeSnmpCollection: routemetric1 is: "+ (routemetric1 < 1 ? "less than 1" : routemetric1)+"; IP_ROUTE_METRIC1: "+IpRouteTableEntry.IP_ROUTE_METRIC1); log.debug("storeSnmpCollection: ent="+ent); log.debug("storeSnmpCollection: IP_ROUTE_METRIC2="+IpRouteTableEntry.IP_ROUTE_METRIC2); int routemetric2 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC2); log.debug("storeSnmpCollection: routemetric2 is: "+ (routemetric2 < 1 ? "less than 1" : routemetric2)+"; IP_ROUTE_METRIC2: "+IpRouteTableEntry.IP_ROUTE_METRIC2); int routemetric3 =ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC3); log.debug("storeSnmpCollection: routemetric3 is: "+ (routemetric3 < 1 ? "less than 1" : routemetric3)+"; IP_ROUTE_METRIC3: "+IpRouteTableEntry.IP_ROUTE_METRIC3); int routemetric4 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC4); log.debug("storeSnmpCollection: routemetric4 is: "+ (routemetric4 < 1 ? "less than 1" : routemetric4)+"; IP_ROUTE_METRIC4: "+IpRouteTableEntry.IP_ROUTE_METRIC4); int routemetric5 = ent.getInt32(IpRouteTableEntry.IP_ROUTE_METRIC5); log.debug("storeSnmpCollection: routemetric5 is: "+ (routemetric5 < 1 ? "less than 1" : routemetric5)+"; IP_ROUTE_METRIC5: "+IpRouteTableEntry.IP_ROUTE_METRIC5); int routetype = ent.getInt32(IpRouteTableEntry.IP_ROUTE_TYPE); log.debug("storeSnmpCollection: routetype is: "+ (routetype < 1 ? "less than 1" : routetype)+"; IP_ROUTE_TYPE: "+IpRouteTableEntry.IP_ROUTE_TYPE); int routeproto = ent.getInt32(IpRouteTableEntry.IP_ROUTE_PROTO); log.debug("storeSnmpCollection: routeproto is: "+ (routeproto < 1 ? "less than 1" : routeproto)+"; IP_ROUTE_PROTO: "+IpRouteTableEntry.IP_ROUTE_PROTO); // info used for Discovery Link RouterInterface routeIface = null; routeIface = getNodeidMaskFromIp(dbConn,nexthop); // if target node is not snmp node try to save info if (routeIface == null) { routeIface = getNodeFromIp(dbConn, nexthop); } if (routeIface == null) { //TODO here is a good point for autodiscovery log.warn("store: No nodeid found for next hop ip" + nexthop + " Skipping ip route interface add to Linkable Snmp Node"); // try to find it in ipinterface } else { int snmpiftype = -2; if (ifindex > 0) snmpiftype = getSnmpIfType(dbConn, nodeid, ifindex); // no processing ethernet type if (log.isDebugEnabled()) log.debug("store: interface has snmpiftype " + snmpiftype + " . Adding to DiscoverLink "); routeIface.setSnmpiftype(snmpiftype); routeIface.setIfindex(ifindex); routeIface.setMetric(routemetric1); routeIface.setNextHop(nexthop); routeInterfaces.add(routeIface); } // save info to DB DbIpRouteInterfaceEntry iprouteInterfaceEntry = DbIpRouteInterfaceEntry .get(dbConn, nodeid, routedest.getHostAddress()); if (iprouteInterfaceEntry == null) { // Create a new entry iprouteInterfaceEntry = DbIpRouteInterfaceEntry.create( m_node.getNodeId(), routedest.getHostAddress()); } // update object iprouteInterfaceEntry.updateRouteMask(routemask.getHostAddress()); iprouteInterfaceEntry.updateRouteNextHop(nexthop.getHostAddress()); iprouteInterfaceEntry.updateIfIndex(ifindex); if (routemetric1 != -1) iprouteInterfaceEntry.updateRouteMetric1(routemetric1); if (routemetric2 != -1) iprouteInterfaceEntry.updateRouteMetric2(routemetric2); if (routemetric3 != -1) iprouteInterfaceEntry.updateRouteMetric3(routemetric3); if (routemetric4 != -1) iprouteInterfaceEntry.updateRouteMetric4(routemetric4); if (routemetric5 != -1) iprouteInterfaceEntry.updateRouteMetric5(routemetric5); if (routetype != -1) iprouteInterfaceEntry.updateRouteType(routetype); if (routeproto != -1) iprouteInterfaceEntry.updateRouteProto(routeproto); iprouteInterfaceEntry .updateStatus(DbAtInterfaceEntry.STATUS_ACTIVE); iprouteInterfaceEntry.set_lastpolltime(now); // store object in database iprouteInterfaceEntry.store(dbConn); } m_node.setRouteInterfaces(routeInterfaces); } // STARTS loop on vlans if (m_snmpcoll.hasVlanTable()) { if (log.isDebugEnabled()) log .debug("store: saving SnmpVlanCollection in DB"); ite = m_snmpcoll.getSnmpVlanCollections() .iterator(); while (ite.hasNext()) { SnmpVlanCollection snmpVlanColl = (SnmpVlanCollection) ite .next(); String vlanindex = snmpVlanColl.getVlanIndex(); int vlan = Integer.parseInt(vlanindex); String vlanname = snmpVlanColl.getVlanName(); if (log.isDebugEnabled()) log .debug("store: parsing VLAN " + vlanindex + " VLAN_NAME " + vlanname); if (snmpVlanColl.hasDot1dBase()) { if (log.isDebugEnabled()) log .debug("store: saving Dot1dBaseGroup in stpnode table"); Dot1dBaseGroup dod1db = (Dot1dBaseGroup) snmpVlanColl.getDot1dBase(); String baseBridgeAddress = dod1db.getBridgeAddress(); int basenumports = dod1db.getNumberOfPorts(); int bridgetype = dod1db.getBridgeType(); if (baseBridgeAddress == "000000000000") { log.warn("store: base bridge address " + baseBridgeAddress + " is invalid for ipaddress " ); } else { m_node.addBridgeIdentifier(baseBridgeAddress,vlanindex); DbStpNodeEntry dbStpNodeEntry = DbStpNodeEntry.get(dbConn, m_node.getNodeId(), vlan); if (dbStpNodeEntry == null) { // Create a new entry dbStpNodeEntry = DbStpNodeEntry.create(m_node .getNodeId(), vlan); } // update object dbStpNodeEntry.updateBaseBridgeAddress(baseBridgeAddress); dbStpNodeEntry.updateBaseNumPorts(basenumports); dbStpNodeEntry.updateBaseType(bridgetype); dbStpNodeEntry.updateBaseVlanName(vlanname); if (snmpVlanColl.hasDot1dStp()) { if (log.isDebugEnabled()) log .debug("store: adding Dot1dStpGroup in stpnode table"); Dot1dStpGroup dod1stp = (Dot1dStpGroup) snmpVlanColl .getDot1dStp(); int protospec = dod1stp.getStpProtocolSpecification(); int stppriority = dod1stp.getStpPriority(); String stpDesignatedRoot = dod1stp.getStpDesignatedRoot(); int stprootcost = dod1stp.getStpRootCost(); int stprootport = dod1stp.getStpRootPort(); if (stpDesignatedRoot != "0000000000000000") { m_node.setVlanStpRoot(vlanindex,stpDesignatedRoot); } dbStpNodeEntry.updateStpProtocolSpecification(protospec); dbStpNodeEntry.updateStpPriority(stppriority); dbStpNodeEntry.updateStpDesignatedRoot(stpDesignatedRoot); dbStpNodeEntry.updateStpRootCost(stprootcost); dbStpNodeEntry.updateStpRootPort(stprootport); } // store object in database dbStpNodeEntry.updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpNodeEntry.set_lastpolltime(now); dbStpNodeEntry.store(dbConn); if (snmpVlanColl.hasDot1dBasePortTable()) { Iterator sub_ite = snmpVlanColl.getDot1dBasePortTable() .getEntries().iterator(); if (log.isDebugEnabled()) log .debug("store: saving Dot1dBasePortTable in stpinterface table"); while (sub_ite.hasNext()) { Dot1dBasePortTableEntry dot1dbaseptentry = (Dot1dBasePortTableEntry) sub_ite .next(); int baseport = dot1dbaseptentry.getInt32(Dot1dBasePortTableEntry.BASE_PORT); int ifindex = dot1dbaseptentry.getInt32(Dot1dBasePortTableEntry.BASE_IFINDEX); m_node.setIfIndexBridgePort(ifindex,baseport); DbStpInterfaceEntry dbStpIntEntry = DbStpInterfaceEntry .get(dbConn, m_node.getNodeId(), baseport, vlan); if (dbStpIntEntry == null) { // Create a new entry dbStpIntEntry = DbStpInterfaceEntry.create( m_node.getNodeId(), baseport, vlan); } dbStpIntEntry.updateIfIndex(ifindex); dbStpIntEntry .updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpIntEntry.set_lastpolltime(now); dbStpIntEntry.store(dbConn); } } if (snmpVlanColl.hasDot1dStpPortTable()) { if (log.isDebugEnabled()) log .debug(" store: adding Dot1dStpPortTable in stpinterface table"); Iterator sub_ite = snmpVlanColl.getDot1dStpPortTable() .getEntries().iterator(); while (sub_ite.hasNext()) { Dot1dStpPortTableEntry dot1dstpptentry = (Dot1dStpPortTableEntry) sub_ite .next(); int stpport = dot1dstpptentry.getInt32(Dot1dStpPortTableEntry.STP_PORT); DbStpInterfaceEntry dbStpIntEntry = DbStpInterfaceEntry .get(dbConn, m_node.getNodeId(), stpport, vlan); if (dbStpIntEntry == null) { // Cannot create the object becouse must exists the dot1dbase // object!!!!! log .warn("store StpInterface: when storing STP info" + " for bridge node with nodeid " + m_node.getNodeId() + " bridgeport number " + stpport + " and vlan index " + vlanindex + " info not found in database, ERROR skipping....."); } else { int stpportstate = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_STATE); int stpportpathcost = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_PATH_COST); String stpPortDesignatedBridge = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_BRIDGE); String stpPortDesignatedRoot = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_ROOT); int stpportdesignatedcost = dot1dstpptentry .getInt32(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_COST); String stpPortDesignatedPort = dot1dstpptentry .getHexString(Dot1dStpPortTableEntry.STP_PORT_DESIGNATED_PORT); if (stpPortDesignatedBridge.equals("0000000000000000")) { log.warn("storeSnmpCollection: designated bridge is invalid not adding to discoveryLink"); } else if (stpPortDesignatedPort.equals("0000")) { log.warn("storeSnmpCollection: designated port is invalid not adding to discoveryLink"); } else { BridgeStpInterface stpIface = new BridgeStpInterface(stpport,vlanindex); stpIface.setStpPortDesignatedBridge(stpPortDesignatedBridge); stpIface.setStpPortDesignatedPort(stpPortDesignatedPort); m_node.addStpInterface(stpIface); } dbStpIntEntry.updateStpPortState(stpportstate); dbStpIntEntry.updateStpPortPathCost(stpportpathcost); dbStpIntEntry.updateStpportDesignatedBridge(stpPortDesignatedBridge); dbStpIntEntry.updateStpportDesignatedRoot(stpPortDesignatedRoot); dbStpIntEntry.updateStpPortDesignatedCost(stpportdesignatedcost); dbStpIntEntry.updateStpportDesignatedPort(stpPortDesignatedPort); dbStpIntEntry.updateStatus(DbStpNodeEntry.STATUS_ACTIVE); dbStpIntEntry.set_lastpolltime(now); dbStpIntEntry.store(dbConn); } } } if (snmpVlanColl.hasDot1dTpFdbTable()) { if (log.isDebugEnabled()) log .debug("store: parsing Dot1dTpFdbTable"); Iterator subite = snmpVlanColl.getDot1dFdbTable() .getEntries().iterator(); while (subite.hasNext()) { Dot1dTpFdbTableEntry dot1dfdbentry = (Dot1dTpFdbTableEntry) subite .next(); String curMacAddress = dot1dfdbentry .getHexString(Dot1dTpFdbTableEntry.FDB_ADDRESS); int fdbport = dot1dfdbentry.getInt32(Dot1dTpFdbTableEntry.FDB_PORT); if (fdbport == 0) { if (log.isDebugEnabled()) log.debug("populateBridge: macaddress " + curMacAddress + " learned on invalid port " + fdbport + " . Skipping"); continue; } int curfdbstatus = dot1dfdbentry.getInt32(Dot1dTpFdbTableEntry.FDB_STATUS); if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_LEARNED) { m_node.addMacAddress(fdbport, curMacAddress, vlanindex); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found learned mac address " + curMacAddress + " on bridge port " + fdbport + " for VLAN " + snmpVlanColl.getVlanIndex()); } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_SELF) { m_node.addBridgeIdentifier(curMacAddress); if (log.isDebugEnabled()) log .debug("storeSnmpCollection: found bridge identifier " + curMacAddress + " for VLAN " + snmpVlanColl.getVlanIndex() + " and bridge port " + fdbport); } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_INVALID) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has INVALID status on port " + fdbport + " . Skipping"); continue; } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_MGMT) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has MGMT status on port " + fdbport + " . Skipping"); continue; } if (curfdbstatus == SNMP_DOT1D_FDB_STATUS_OTHER) { if (log.isDebugEnabled()) log.debug("storeSnmpCollection: macaddress " + curMacAddress + " has OTHER status on port " + fdbport + " . Skipping"); continue; } } } //now adding bridge identifier mac addresses of switch from snmpinterface setBridgeIdentifierFromSnmpInterface(dbConn); } } } } update(dbConn, now); } | 11849 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11849/e319df126ad7c3fa072524816b89f48558626710/DbEventWriter.java/buggy/opennms-services/src/main/java/org/opennms/netmgt/linkd/DbEventWriter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
10461,
1291,
2532,
12,
1952,
30795,
16,
8159,
2037,
13,
1216,
6483,
16,
1082,
202,
4874,
29776,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1707,
10461,
1291,
2532,
12,
1952,
30795,
16,
8159,
2037,
13,
1216,
6483,
16,
1082,
202,
4874,
29776,
288,
202,
202,
4457,
613,
273,
4884,
4457,
18,
588,
1442,
12,
588,
... | ||
public void testConfigReloadingWithXmlInclude() throws IOException, CruiseControlException { MyListener listener = new MyListener(); ccController = new CruiseControlController() { protected Project configureProject(String projectName) { final Project project = new Project(); project.setSchedule(new Schedule()); project.setName(projectName); project.setConfigFile(configFile); return project; } }; ccController.addListener(listener); FileWriter configOut2 = new FileWriter(configFile2); writeProjectDetails(configOut2, "testProject1"); writeProjectDetails(configOut2, "testProject2"); configOut2.close(); FileWriter wrapperConfigOut = new FileWriter(configFile); wrapperConfigOut.write("<?xml version=\"1.0\" ?>\n"); wrapperConfigOut.write("<!DOCTYPE cruisecontrol [ \n"); wrapperConfigOut.write("<!ENTITY projects SYSTEM \"" + configFile2.getName() + "\"> \n"); wrapperConfigOut.write("]> \n"); wrapperConfigOut.write("<cruisecontrol>\n"); wrapperConfigOut.write("&projects;"); writeFooterAndClose(wrapperConfigOut); ccController.setConfigFile(configFile); assertEquals(configFile, ccController.getConfigFile()); assertEquals(2, ccController.getProjects().size()); assertEquals(2, listener.added.size()); assertEquals(0, listener.removed.size()); listener.clear(); // no change - no reload ccController.parseConfigFileIfNecessary(); // nothing happened assertEquals(0, listener.added.size()); assertEquals(0, listener.removed.size()); // add a project: listener.clear(); sleep(1200); configOut2 = new FileWriter(configFile2); writeProjectDetails(configOut2, "testProject1"); writeProjectDetails(configOut2, "testProject2"); writeProjectDetails(configOut2, "testProject3"); configOut2.close(); ccController.parseConfigFileIfNecessary(); assertEquals(3, ccController.getProjects().size()); assertEquals(1, listener.added.size()); assertEquals(0, listener.removed.size()); // remove 2 projects listener.clear(); sleep(1200); configOut2 = new FileWriter(configFile2); writeProjectDetails(configOut2, "testProject3"); configOut2.close(); ccController.reloadConfigFile(); assertEquals(1, ccController.getProjects().size()); assertEquals(0, listener.added.size()); assertEquals(2, listener.removed.size()); } | 52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/c683ed78c6d4cb9c2cd81b8ad2f9a4d344b39fe4/CruiseControlControllerTest.java/clean/main/test/net/sourceforge/cruisecontrol/CruiseControlControllerTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
809,
13013,
310,
1190,
4432,
8752,
1435,
1216,
1860,
16,
385,
8653,
784,
3367,
503,
288,
3639,
8005,
2223,
2991,
273,
394,
8005,
2223,
5621,
3639,
4946,
2933,
273,
394,
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,
809,
13013,
310,
1190,
4432,
8752,
1435,
1216,
1860,
16,
385,
8653,
784,
3367,
503,
288,
3639,
8005,
2223,
2991,
273,
394,
8005,
2223,
5621,
3639,
4946,
2933,
273,
394,
3... | ||
long pos = num2long(other); | long pos = other.convertToInteger().getLongValue(); | public RubyFixnum aref(IRubyObject other) { long pos = num2long(other); boolean isSet = getValue().testBit((int) pos); return getRuntime().newFixnum(isSet ? 1 : 0); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/803c66ee682936beecc8a43fe2cfc90fe5645b22/RubyBignum.java/clean/src/org/jruby/RubyBignum.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
854,
74,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
949,
273,
1308,
18,
6283,
774,
4522,
7675,
588,
3708,
620,
5621,
3639,
1250,
13532,
273,
2366,
7675,
381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
8585,
2107,
854,
74,
12,
7937,
10340,
921,
1308,
13,
288,
3639,
1525,
949,
273,
1308,
18,
6283,
774,
4522,
7675,
588,
3708,
620,
5621,
3639,
1250,
13532,
273,
2366,
7675,
381... |
BugzillaTask newTask = new BugzillaTask(AbstractRepositoryTask.getHandle(repository.getUrl().toExternalForm(), | BugzillaTask newTask = new BugzillaTask(AbstractRepositoryTask.getHandle(repository.getUrl(), | public ITask createTaskFromExistingId(TaskRepository repository, String id) { int bugId = -1; try { if (id != null) { bugId = Integer.parseInt(id); } else { return null; } } catch (NumberFormatException nfe) { if (!forceSyncExecForTesting) { MessageDialog.openInformation(null, MylarTaskListPlugin.TITLE_DIALOG, "Invalid report id: " + id); } return null; } BugzillaTask newTask = new BugzillaTask(AbstractRepositoryTask.getHandle(repository.getUrl().toExternalForm(), bugId), DESCRIPTION_DEFAULT, true); MylarTaskListPlugin.getTaskListManager().getTaskList().addTaskToArchive(newTask); synchronize(newTask, true, null); return newTask; } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/5b50d3afe01b1820190de900979c9823401a70e1/BugzillaRepositoryConnector.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositoryConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2174,
752,
2174,
1265,
9895,
548,
12,
2174,
3305,
3352,
16,
514,
612,
13,
288,
202,
202,
474,
7934,
548,
273,
300,
21,
31,
202,
202,
698,
288,
1082,
202,
430,
261,
350,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
2174,
752,
2174,
1265,
9895,
548,
12,
2174,
3305,
3352,
16,
514,
612,
13,
288,
202,
202,
474,
7934,
548,
273,
300,
21,
31,
202,
202,
698,
288,
1082,
202,
430,
261,
350,... |
final PseudoTextBuilder pseudoTextBuilder = fileType.getPseudoTextBuilder(); | final PseudoTextBuilder pseudoTextBuilder = fileType.getLanguage().getFormatter(); | public static String getWhiteSpaceBetweenTokens(ASTNode first, ASTNode second) { final PsiElement firstAsPsiElement = SourceTreeToPsiMap.treeElementToPsi(first); LOG.assertTrue(firstAsPsiElement != null); final PsiFile file = firstAsPsiElement.getContainingFile(); final FileType fileType = file.getVirtualFile().getFileType(); final PseudoTextBuilder pseudoTextBuilder = fileType.getPseudoTextBuilder(); LOG.assertTrue(pseudoTextBuilder != null); final Project project = firstAsPsiElement.getProject(); final CodeStyleSettings settings = CodeStyleSettingsManager.getInstance(project).getCurrentSettings(); final int startOffset = first.getStartOffset(); final int endOffset = second.getStartOffset(); final boolean oldValue = settings.XML_KEEP_LINE_BREAKS; settings.XML_KEEP_LINE_BREAKS = false; try { final PseudoText pseudoText = pseudoTextBuilder.build(project, settings, file); return GeneralCodeFormatter.getWhiteSpaceBetweenTokens(pseudoText, settings, fileType, startOffset, endOffset); } finally { settings.XML_KEEP_LINE_BREAKS = oldValue; } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/e4f15175c76e6a9999690f4eb5ec34928a2d9370/CodeEditUtil.java/clean/source/com/intellij/psi/impl/source/codeStyle/CodeEditUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
336,
23108,
11831,
5157,
12,
9053,
907,
1122,
16,
9183,
907,
2205,
13,
288,
565,
727,
453,
7722,
1046,
1122,
1463,
52,
7722,
1046,
273,
4998,
2471,
774,
52,
7722,
863,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
514,
336,
23108,
11831,
5157,
12,
9053,
907,
1122,
16,
9183,
907,
2205,
13,
288,
565,
727,
453,
7722,
1046,
1122,
1463,
52,
7722,
1046,
273,
4998,
2471,
774,
52,
7722,
863,
1... |
String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath() ); | String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath() ); | public void testGetCommandLineWithWorkingDirectoryAsAbsolutePath() throws Exception{ File workDir = new File("target"); String workDirAbsolutePath= StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath() ); testCommandLine( "scm:starteam:myusername:mypassword@myhost:1234/projecturl", workDir.getAbsoluteFile(), "myTag", "stcmd co -x -nologo -stop -p myusername:mypassword@myhost:1234/projecturl " + "-fp " + workDirAbsolutePath + " -vl myTag -is" );} | 48502 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48502/6d4c8e561e2374e92ab133bc80f0c79d2fb6b048/StarteamCheckOutCommandTest.java/buggy/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
967,
21391,
1190,
14836,
2853,
1463,
10368,
743,
1435,
565,
1216,
1185,
95,
202,
812,
1440,
1621,
273,
394,
1387,
2932,
3299,
8863,
565,
514,
1440,
1621,
10368,
743,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
21391,
1190,
14836,
2853,
1463,
10368,
743,
1435,
565,
1216,
1185,
95,
202,
812,
1440,
1621,
273,
394,
1387,
2932,
3299,
8863,
565,
514,
1440,
1621,
10368,
743,
33,
... |
private void ensureVisible(int index) { if (index == 1 || !getControl().isVisible()) return; | private void ensureVisible(PerspectiveBarContributionItem contribItem) { PerspectiveBarContributionItem newItem = new PerspectiveBarContributionItem(contribItem.getPerspective(), contribItem.getPage()); | private void ensureVisible(int index) { if (index == 1 || !getControl().isVisible()) return; ToolItem current = getControl().getItems()[index]; Rectangle barBounds = getControl().getBounds(); while (!barBounds.intersects(current.getBounds()) && index > 1) { index = relocateLRU(index); if (index == -1) break; // relocateLRU can affect the items so we need to update the // variable here current = getControl().getItems()[index]; } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/ea619abee4d91cdef043c8b11d5a852ef2afe695/PerspectiveBarManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveBarManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
3387,
6207,
12,
474,
770,
13,
288,
202,
202,
430,
261,
1615,
422,
404,
747,
401,
588,
3367,
7675,
291,
6207,
10756,
1082,
202,
2463,
31,
9506,
202,
6364,
1180,
783,
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,
225,
202,
1152,
918,
3387,
6207,
12,
474,
770,
13,
288,
202,
202,
430,
261,
1615,
422,
404,
747,
401,
588,
3367,
7675,
291,
6207,
10756,
1082,
202,
2463,
31,
9506,
202,
6364,
1180,
783,
273,... |
public IWorkbenchPage openPage(IAdaptable input) throws WorkbenchException; | public IWorkbenchPage openPage(String perspectiveId, IAdaptable input) throws WorkbenchException; | public IWorkbenchPage openPage(IAdaptable input) throws WorkbenchException; | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/3103abf96a04624190b8b498725406acd3fcdf53/IWorkbenchWindow.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
2421,
22144,
1964,
1696,
1964,
12,
45,
13716,
429,
810,
13,
1216,
4147,
22144,
503,
31,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
467,
2421,
22144,
1964,
1696,
1964,
12,
45,
13716,
429,
810,
13,
1216,
4147,
22144,
503,
31,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
getEmailAddresses().add(emailAddress); | emailAddresses.add(emailAddress); | public void addToEmailAddresses(EmailAddress emailAddress) { getEmailAddresses().add(emailAddress); } | 13434 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13434/438111483ce9161cee6f32d417dc29b21ef1e790/Customer.java/buggy/trunk/workspace/de.berlios.rcpviewer.domain.runtime/aspectsrc/de/berlios/rcpviewer/progmodel/standard/aspects/Customer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9604,
4134,
7148,
12,
23590,
28748,
13,
288,
202,
202,
588,
4134,
7148,
7675,
1289,
12,
3652,
1887,
1769,
202,
97,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
9604,
4134,
7148,
12,
23590,
28748,
13,
288,
202,
202,
588,
4134,
7148,
7675,
1289,
12,
3652,
1887,
1769,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return (Node)u3; } | return (Node) u3; } | public Node getIterNode() { return (Node)u3; } | 47134 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47134/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/buggy/org/jruby/nodes/Node.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2029,
336,
2360,
907,
1435,
288,
202,
202,
2463,
261,
907,
13,
89,
23,
31,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
225,
202,
482,
2029,
336,
2360,
907,
1435,
288,
202,
202,
2463,
261,
907,
13,
89,
23,
31,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
BasicOptionPaneUI() { } | public BasicOptionPaneUI() { } | BasicOptionPaneUI() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/49e488b8530051383b90b1357fa767c87c9ff7f5/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
7651,
1895,
8485,
5370,
1435,
565,
288,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
7651,
1895,
8485,
5370,
1435,
565,
288,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
double leftEdge; double centerFreq; double centerFreqMel; double rightEdge; double rightEdgeMel; | double[] leftEdge = new double[numberFilters]; double[] centerFreq = new double[numberFilters]; double[] rightEdge = new double[numberFilters]; double nextEdgeMel; double nextEdge; | private void buildFilterbank(int NPoint, int numberFilters, double minFreq, double maxFreq) { double minFreqMel; double maxFreqMel; double deltaFreqMel; double leftEdge; double centerFreq; double centerFreqMel; double rightEdge; double rightEdgeMel; double initialFreqBin; double deltaFreq; this.filter = new MelFilter[numberFilters]; minFreqMel = linToMelFreq(minFreq); maxFreqMel = linToMelFreq(maxFreq); deltaFreqMel = (maxFreqMel - minFreqMel) / (numberFilters + 1); /** * In fact, the ratio should be between <code>sampleRate / * 2</code> and <code>NPoint / 2</code> since the number of * points in the power spectrum is half of the number of FFT * points - the other half would be symmetrical for a real * sequence -, and these points cover up to the Nyquist * frequency, which is half of the sampling rate. The two * "divide by 2" get canceled out. */ deltaFreq = (double)sampleRate / NPoint; /** * Initialize edges and center freq. These variables will be * updated so that the center frequency of a filter is the * right edge of the filter to its left, and the left edge of * the filter to its right. */ leftEdge = minFreq; centerFreqMel = minFreqMel + deltaFreqMel; centerFreq = melToLinFreq(centerFreqMel); for (int i = 0; i < numberFilters; i++) { initialFreqBin = Math.round((leftEdge / deltaFreq)) * deltaFreq; rightEdgeMel = centerFreqMel + deltaFreqMel; rightEdge = melToLinFreq(rightEdgeMel); /** * Create the filter. The filter will need the frequencies * in the linear domain. */ this.filter[i] = new MelFilter(); this.filter[i].createMelFilter(leftEdge, centerFreq, rightEdge, initialFreqBin, deltaFreq, (sampleRate >> 1)); leftEdge = centerFreq; centerFreq = rightEdge; centerFreqMel = rightEdgeMel; } } | 8350 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8350/0f99f9b4c3e2ac9bb213dfaba539e3355e104cee/MelFilterbank.java/buggy/edu/cmu/sphinx/frontend/MelFilterbank.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1361,
1586,
10546,
12,
474,
423,
2148,
16,
4405,
509,
1300,
5422,
16,
4405,
1645,
1131,
14485,
16,
4405,
1645,
943,
14485,
13,
288,
202,
9056,
1131,
14485,
49,
292,
31,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1361,
1586,
10546,
12,
474,
423,
2148,
16,
4405,
509,
1300,
5422,
16,
4405,
1645,
1131,
14485,
16,
4405,
1645,
943,
14485,
13,
288,
202,
9056,
1131,
14485,
49,
292,
31,
202,
... |
} String name = (String)ruby.getSymbolReverseTable().get(this); if (name != null) { return name; | public String toName() { if (value < Token.LAST_TOKEN) { RubyOperatorEntry[] opTable = ruby.getOperatorTable(); for (int i = 0; i < opTable.length; i++) { if (this.equals(opTable[i].token)) { return opTable[i].name; } } } String name = (String)ruby.getSymbolReverseTable().get(this); if (name != null) { return name; } if (isAttrSetId()) { RubyId id2 = newId(ruby, (value & ~ID_SCOPE_MASK) | ID_LOCAL); while (true) { name = id2.toName(); if (name != null) { return ruby.intern(name + "=").toName(); } if (id2.isLocalId()) { id2 = new RubyId(ruby, (value & ~ID_SCOPE_MASK) | ID_CONST); continue; } break; } } return null; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyId.java/buggy/org/jruby/RubyId.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
358,
461,
1435,
288,
3639,
309,
261,
1132,
411,
3155,
18,
14378,
67,
8412,
13,
288,
5411,
19817,
5592,
1622,
8526,
1061,
1388,
273,
22155,
18,
588,
5592,
1388,
5621,
5411,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
358,
461,
1435,
288,
3639,
309,
261,
1132,
411,
3155,
18,
14378,
67,
8412,
13,
288,
5411,
19817,
5592,
1622,
8526,
1061,
1388,
273,
22155,
18,
588,
5592,
1388,
5621,
5411,
364,... | |
String dbEncoding = null; if(initrset.next()) { | protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if(info.getProperty("user")==null) throw new PSQLException("postgresql.con.user"); if(info.getProperty("password")==null) throw new PSQLException("postgresql.con.pass"); this_driver = d; this_url = url; PG_DATABASE = database; PG_PASSWORD = info.getProperty("password"); PG_USER = info.getProperty("user"); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed",e); } // Now we need to construct and send a startup packet try { // Ver 6.3 code pg_stream.SendInteger(4+4+SM_DATABASE+SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY,4); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MAJOR,2); pg_stream.SendInteger(PG_PROTOCOL_LATEST_MINOR,2); pg_stream.Send(database.getBytes(),SM_DATABASE); // This last send includes the unused fields pg_stream.Send(PG_USER.getBytes(),SM_USER+SM_OPTIONS+SM_UNUSED+SM_TTY); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new SQLException(pg_stream.ReceiveString(getEncoding())); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the password salt if there is one if(areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst,0,2); DriverManager.println("Salt="+salt); } // now send the auth packet switch(areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5+PG_PASSWORD.length(),4); pg_stream.Send(PG_PASSWORD.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt,PG_PASSWORD); pg_stream.SendInteger(5+crypted.length(),4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0,1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth",new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while(areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed",e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'K': pid = pg_stream.ReceiveInteger(4); ckey = pg_stream.ReceiveInteger(4); break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch(beresp) { case 'Z': break; case 'E': case 'N': throw new SQLException(pg_stream.ReceiveString(getEncoding())); default: throw new PSQLException("postgresql.con.setup"); } // Originally we issued a SHOW DATESTYLE statement to find the databases default // datestyle. However, this caused some problems with timestamps, so in 6.5, we // went the way of ODBC, and set the connection to ISO. // // This may cause some clients to break when they assume anything other than ISO, // but then - they should be using the proper methods ;-) // // We also ask the DB for certain properties (i.e. DatabaseEncoding at this time) // firstWarning = null; java.sql.ResultSet initrset = ExecSQL("set datestyle to 'ISO'; " + "select case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"); String dbEncoding = null; //retrieve DB properties if(initrset.next()) { //handle DatabaseEncoding dbEncoding = initrset.getString(1); //convert from the PostgreSQL name to the Java name if (dbEncoding.equals("SQL_ASCII")) { dbEncoding = "ASCII"; } else if (dbEncoding.equals("UNICODE")) { dbEncoding = "UTF8"; } else if (dbEncoding.equals("LATIN1")) { dbEncoding = "ISO8859_1"; } else if (dbEncoding.equals("LATIN2")) { dbEncoding = "ISO8859_2"; } else if (dbEncoding.equals("LATIN3")) { dbEncoding = "ISO8859_3"; } else if (dbEncoding.equals("LATIN4")) { dbEncoding = "ISO8859_4"; } else if (dbEncoding.equals("LATIN5")) { dbEncoding = "ISO8859_5"; } else if (dbEncoding.equals("LATIN6")) { dbEncoding = "ISO8859_6"; } else if (dbEncoding.equals("LATIN7")) { dbEncoding = "ISO8859_7"; } else if (dbEncoding.equals("LATIN8")) { dbEncoding = "ISO8859_8"; } else if (dbEncoding.equals("LATIN9")) { dbEncoding = "ISO8859_9"; } else if (dbEncoding.equals("EUC_JP")) { dbEncoding = "EUC_JP"; } else if (dbEncoding.equals("EUC_CN")) { dbEncoding = "EUC_CN"; } else if (dbEncoding.equals("EUC_KR")) { dbEncoding = "EUC_KR"; } else if (dbEncoding.equals("EUC_TW")) { dbEncoding = "EUC_TW"; } else if (dbEncoding.equals("KOI8")) { // try first if KOI8_U is present, it's a superset of KOI8_R try { dbEncoding = "KOI8_U"; "test".getBytes(dbEncoding); } catch(UnsupportedEncodingException uee) { // well, KOI8_U is still not in standard JDK, falling back to KOI8_R :( dbEncoding = "KOI8_R"; } } else if (dbEncoding.equals("WIN")) { dbEncoding = "Cp1252"; } else if (dbEncoding.equals("UNKNOWN")) { //This isn't a multibyte database so we don't have an encoding to use //We leave dbEncoding null which will cause the default encoding for the //JVM to be used dbEncoding = null; } else { dbEncoding = null; } } //Set the encoding for this connection //Since the encoding could be specified or obtained from the DB we use the //following order: // 1. passed as a property // 2. value from DB if supported by current JVM // 3. default for JVM (leave encoding null) String passedEncoding = info.getProperty("charSet"); // could be null if (passedEncoding != null) { encoding = passedEncoding; } else { if (dbEncoding != null) { //test DB encoding try { "TEST".getBytes(dbEncoding); //no error the encoding is supported by the current JVM encoding = dbEncoding; } catch (UnsupportedEncodingException uee) { //dbEncoding is not supported by the current JVM encoding = null; } } else { encoding = null; } } // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup firstWarning = null; PG_STATUS = CONNECTION_OK; } | 47293 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47293/ff21a8e5c86457e205ff7c598b930efd711cb2dc/Connection.java/clean/src/interfaces/jdbc/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
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,
377,
4750,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
565,
288,
565,
368,
3743,
392,
1520,
309,
326,
729,
578,
22... | |
UndoableEdit edit = new ChangeChargeEdit(atomInRange, formerCharge, atomInRange.getCharge()); | UndoableEdit edit = new ChangeChargeEdit(atomInRange, formerCharge, atomInRange.getFormalCharge()); | public void mouseReleased(MouseEvent event) { isUndoableChange = false; logger.debug("MouseReleased Event Props: mode=", c2dm.getDrawModeString()); if (logger.isDebugEnabled()) { logger.debug(" trigger=" + event.isPopupTrigger(), ", Click count: " + event.getClickCount()); } if ((event.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) { int[] screenCoords = {event.getX(), event.getY()}; int[] mouseCoords = getWorldCoordinates(screenCoords); int mouseX = mouseCoords[0]; int mouseY = mouseCoords[1]; if (c2dm.getDrawMode() == Controller2DModel.SYMBOL) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { if (currentCommonElement.get(atomInRange) == null) { currentCommonElement.put(atomInRange, new Integer(1)); } int oldCommonElement = ((Integer) currentCommonElement.get(atomInRange)).intValue(); String symbol = (String) commonElements.elementAt(oldCommonElement); if (!(atomInRange.getSymbol().equals(symbol))) { // only change symbol if needed String formerSymbol = atomInRange.getSymbol(); atomInRange.setSymbol(symbol); // configure the atom, so that the atomic number matches the symbol try { IsotopeFactory.getInstance().configure(atomInRange); } catch (Exception exception) { logger.error("Error while configuring atom"); logger.debug(exception); } // update atom AtomContainer container = getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ UndoableEdit edit = new ChangeAtomSymbolEdit(atomInRange, formerSymbol, symbol); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } oldCommonElement++; if (oldCommonElement == commonElements.size()) { oldCommonElement = 0; } currentCommonElement.put(atomInRange, new Integer(oldCommonElement)); } } if (c2dm.getDrawMode() == Controller2DModel.ELEMENT) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { String symbol = c2dm.getDrawElement(); if (!(atomInRange.getSymbol().equals(symbol))) { // only change symbol if needed String formerSymbol = atomInRange.getSymbol(); atomInRange.setSymbol(symbol); // configure the atom, so that the atomic number matches the symbol try { IsotopeFactory.getInstance().configure(atomInRange); } catch (Exception exception) { logger.error("Error while configuring atom"); logger.debug(exception); } // update atom AtomContainer container = getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */// isUndoableChange = true; /* * --- */ // undoredo support System.out.println("hier"); UndoableEdit edit = new ChangeAtomSymbolEdit(atomInRange, formerSymbol, symbol); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } } } if (c2dm.getDrawMode() == Controller2DModel.INCCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { double formerCharge = atomInRange.getCharge(); atomInRange.setFormalCharge(atomInRange.getFormalCharge() + 1); // update atom AtomContainer container = getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); //undoredo support UndoableEdit edit = new ChangeChargeEdit(atomInRange, formerCharge, atomInRange.getCharge()); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == Controller2DModel.DECCHARGE) { Atom atomInRange = r2dm.getHighlightedAtom(); if (atomInRange != null) { double formerCharge = atomInRange.getCharge(); atomInRange.setFormalCharge(atomInRange.getFormalCharge() - 1); // update atom AtomContainer container = getRelevantAtomContainer(chemModel, atomInRange); updateAtom(container, atomInRange); //undoredo support UndoableEdit edit = new ChangeChargeEdit(atomInRange, formerCharge, atomInRange.getCharge()); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } } if (c2dm.getDrawMode() == Controller2DModel.MAPATOMATOM) { handleMapping(wasDragged, r2dm); } if (c2dm.getDrawMode() == Controller2DModel.DRAWBOND || c2dm.getDrawMode() == Controller2DModel.DOWN_BOND || c2dm.getDrawMode() == Controller2DModel.UP_BOND) { logger.debug("mouseReleased->drawbond"); Atom atomInRange; Atom newAtom1 = null; Atom newAtom2 = null; Bond newBond = null; int startX = r2dm.getPointerVectorStart().x; int startY = r2dm.getPointerVectorStart().y; Bond bondInRange = r2dm.getHighlightedBond(); //atomInRange = r2dm.getHighlightedAtom(); //Bond bondInRange = getBondInRange(mouseX, mouseY); /* * IMPORTANT: I don't use getHighlighteAtom() * here because of the special case of * only one atom on the screen. * In this case, this atom will not detected * if the mouse hasn't moved after it's creation */ atomInRange = getAtomInRange(mouseX, mouseY); if (bondInRange != null) { Bond formerBond = (Bond) bondInRange.clone(); if (c2dm.getDrawMode() == Controller2DModel.DRAWBOND){ // increase Bond order double order = bondInRange.getOrder(); if (order >= CDKConstants.BONDORDER_TRIPLE) { bondInRange.setOrder(CDKConstants.BONDORDER_SINGLE); } else { bondInRange.setOrder(order + 1.0); // this is tricky as it depends on the fact that the // constants are unidistant, i.e. {1.0, 2.0, 3.0}. } ; // update atoms org.openscience.cdk.interfaces.Atom[] atoms = bondInRange.getAtoms(); AtomContainer container = getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); }else if(c2dm.getDrawMode() == Controller2DModel.DOWN_BOND){ // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_DOWN) { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN_INV); } else if (stereo == CDKConstants.STEREO_BOND_DOWN_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_DOWN); } }else{ // toggle bond stereo double stereo = bondInRange.getStereo(); if (stereo == CDKConstants.STEREO_BOND_UP) { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP_INV); } else if (stereo == CDKConstants.STEREO_BOND_UP_INV) { bondInRange.setStereo(CDKConstants.STEREO_BOND_NONE); } else { bondInRange.setStereo(CDKConstants.STEREO_BOND_UP); } } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ UndoableEdit edit = new BondChangeEdit(chemModel, formerBond, bondInRange); c2dm.getUndoSupport().postEdit(edit); } else { AtomContainer undoRedoContainer = new org.openscience.cdk.AtomContainer(); if (atomInRange != null) { logger.debug("We had an atom in range"); newAtom1 = atomInRange; } else if (!wasDragged) { // create a new molecule logger.debug("We make a new molecule"); newAtom1 = new org.openscience.cdk.Atom(c2dm.getDrawElement(), new Point2d(startX, startY)); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.addAtom(newAtom1); // update atoms updateAtom(atomCon, newAtom1); undoRedoContainer.add(atomCon); } if (wasDragged) { if (dragMode == DRAG_DRAWING_PROPOSED_BOND) { int endX = r2dm.getPointerVectorEnd().x; int endY = r2dm.getPointerVectorEnd().y; atomInRange = getAtomInRange(endX, endY); AtomContainer atomCon = getAllInOneContainer(chemModel); if (atomInRange != null) { logger.debug("*** atom in range"); newAtom2 = atomInRange; logger.debug("atomCon.getAtomCount() " + atomCon.getAtomCount()); } else { logger.debug("*** new atom"); newAtom2 = new org.openscience.cdk.Atom(c2dm.getDrawElement(), new Point2d(endX, endY)); atomCon.addAtom(newAtom2); undoRedoContainer.addAtom(newAtom2); } newAtom1 = lastAtomInRange; if (newAtom1 == null) { newAtom1 = new org.openscience.cdk.Atom(c2dm.getDrawElement(), new Point2d(r2dm.getPointerVectorStart().x, r2dm.getPointerVectorStart().y)); undoRedoContainer.addAtom(newAtom1); } if (newAtom1 != newAtom2) { newBond = new org.openscience.cdk.Bond(newAtom1, newAtom2, 1); if(c2dm.getDrawMode() == Controller2DModel.UP_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_UP); if(c2dm.getDrawMode() == Controller2DModel.DOWN_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_DOWN); logger.debug(newAtom1 + " - " + newAtom2); atomCon.addBond(newBond); undoRedoContainer.addBond(newBond); } try { SetOfMolecules setOfMolecules = ConnectivityChecker.partitionIntoMolecules(atomCon); chemModel.setSetOfMolecules(setOfMolecules); logger.debug("We have " + setOfMolecules.getAtomContainerCount() + " molecules on screen"); } catch (Exception exception) { logger.warn("Could not partition molecule: ", exception.getMessage()); logger.debug(exception); return; } // update atoms updateAtom(atomCon, newAtom2); /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ } } else if (atomInRange != null) { // add a new atom to the current atom in some random // direction AtomContainer atomCon = getRelevantAtomContainer(chemModel, atomInRange); newAtom2 = new org.openscience.cdk.Atom(c2dm.getDrawElement(), atomInRange.getPoint2d()); // now create 2D coords for new atom double bondLength = r2dm.getBondLength(); Atom[] connectedAtoms = atomCon.getConnectedAtoms(atomInRange); logger.debug("connectedAtoms.length: " + connectedAtoms.length); AtomContainer placedAtoms = new org.openscience.cdk.AtomContainer(); //placedAtoms.addAtom(atomInRange); for (int i = 0; i < connectedAtoms.length; i++) { placedAtoms.addAtom(connectedAtoms[i]); } AtomContainer unplacedAtoms = new org.openscience.cdk.AtomContainer(); unplacedAtoms.addAtom(newAtom2); AtomPlacer atomPlacer = new AtomPlacer(); atomPlacer.setMolecule(new org.openscience.cdk.Molecule(atomCon)); Point2d center2D = GeometryTools.get2DCenter(placedAtoms); logger.debug("placedAtoms.getAtomCount(): " + placedAtoms.getAtomCount()); logger.debug("unplacedAtoms.getAtomCount(): " + unplacedAtoms.getAtomCount()); if (placedAtoms.getAtomCount() == 1) { Vector2d bondVector = atomPlacer.getNextBondVector( atomInRange, placedAtoms.getAtomAt(0), GeometryTools.get2DCenter(new org.openscience.cdk.Molecule(atomCon)) ); Point2d atomPoint = new Point2d(atomInRange.getPoint2d()); bondVector.normalize(); bondVector.scale(bondLength); atomPoint.add(bondVector); newAtom2.setPoint2d(atomPoint); } else { atomPlacer.distributePartners(atomInRange, placedAtoms, center2D, unplacedAtoms, bondLength); } // now add the new atom atomCon.addAtom(newAtom2); undoRedoContainer.addAtom(newAtom2); newBond=new org.openscience.cdk.Bond(atomInRange, newAtom2, 1.0); atomCon.addBond(newBond); undoRedoContainer.addBond(newBond); if(c2dm.getDrawMode() == Controller2DModel.UP_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_UP); if(c2dm.getDrawMode() == Controller2DModel.DOWN_BOND) newBond.setStereo(CDKConstants.STEREO_BOND_DOWN); // update atoms updateAtom(atomCon, atomInRange); updateAtom(atomCon, newAtom2); } UndoableEdit edit = new AddAtomsAndBondsEdit(chemModel, undoRedoContainer, "Add Bond"); c2dm.getUndoSupport().postEdit(edit); } r2dm.fireChange(); fireChange(); centerAtom(newAtom1); centerAtom(newAtom2); } if (c2dm.getDrawMode() == Controller2DModel.SELECT && wasDragged) { logger.info("User asks to selected atoms"); AtomContainer selectedPart = new org.openscience.cdk.AtomContainer(); r2dm.setSelectedPart(selectedPart); r2dm.setSelectedPart(getContainedAtoms(r2dm.getSelectRect())); r2dm.setSelectRect(null); logger.debug("selected stuff ", selectedPart); } if (c2dm.getDrawMode() == Controller2DModel.ERASER) { AtomContainer undoRedoContainer = new org.openscience.cdk.AtomContainer(); String type = null; Atom highlightedAtom = r2dm.getHighlightedAtom(); Bond highlightedBond = r2dm.getHighlightedBond(); if (highlightedAtom != null) { logger.info("User asks to delete an Atom"); AtomContainer container = getAllInOneContainer(chemModel); logger.debug("Atoms before delete: ", container.getAtomCount()); ChemModelManipulator.removeAtomAndConnectedElectronContainers(chemModel, highlightedAtom); undoRedoContainer.addAtom(highlightedAtom); if (type == null) { type = "Remove Atom"; } else { type = "Remove Substructure"; } container = getAllInOneContainer(chemModel); logger.debug("Atoms before delete: ", container.getAtomCount()); // update atoms Atom[] atoms = container.getConnectedAtoms(highlightedAtom); if (atoms.length > 0) { AtomContainer atomCon = getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(atomCon, atoms); } } else if (highlightedBond != null) { logger.info("User asks to delete a Bond"); ChemModelManipulator.removeElectronContainer(chemModel, highlightedBond); undoRedoContainer.addBond(highlightedBond); if (type == null) { type = "Remove Bond"; } else { type = "Remove Substructure"; } // update atoms org.openscience.cdk.interfaces.Atom[] atoms = highlightedBond.getAtoms(); AtomContainer container = getRelevantAtomContainer(chemModel, atoms[0]); updateAtoms(container, atoms); } else { logger.warn("Cannot deleted if nothing is highlighted"); return; } /* * PRESERVE THIS. This notifies the * the listener responsible for * undo and redo storage that it * should store this change of an atom symbol */ isUndoableChange = true; /* * --- */ UndoableEdit edit = new RemoveAtomsAndBondsEdit(chemModel, undoRedoContainer, type); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == Controller2DModel.RING || c2dm.getDrawMode() == Controller2DModel.BENZENERING) { AtomContainer undoRedoContainer = new org.openscience.cdk.AtomContainer(); Ring newRing = null; Point2d sharedAtomsCenter; Vector2d ringCenterVector; double bondLength; int pointerMarkX; int pointerMarkY; double ringRadius; double angle; double xDiff; double yDiff; double distance1 = 0; double distance2 = 0; Atom firstAtom; Atom secondAtom; Atom spiroAtom; Point2d conAtomsCenter = null; Point2d newPoint1; Point2d newPoint2; RingPlacer ringPlacer = new RingPlacer(); int ringSize = c2dm.getRingSize(); String symbol = c2dm.getDrawElement(); AtomContainer sharedAtoms = getHighlighted(); if (sharedAtoms.getAtomCount() == 0) { sharedAtoms = new org.openscience.cdk.AtomContainer(); newRing = new org.openscience.cdk.Ring(ringSize, symbol); if (c2dm.getDrawMode() == Controller2DModel.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); ringRadius = (bondLength / 2) / Math.sin(Math.PI / c2dm.getRingSize()); sharedAtomsCenter = new Point2d(mouseX, mouseY - ringRadius); firstAtom = newRing.getAtomAt(0); firstAtom.setPoint2d(sharedAtomsCenter); sharedAtoms.addAtom(firstAtom); ringCenterVector = new Vector2d(new Point2d(mouseX, mouseY)); ringCenterVector.sub(sharedAtomsCenter); ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); AtomContainer atomCon = ChemModelManipulator.createNewMolecule(chemModel); atomCon.add(newRing); undoRedoContainer.add(newRing); } else if (sharedAtoms.getAtomCount() == 1) { spiroAtom = sharedAtoms.getAtomAt(0); sharedAtomsCenter = GeometryTools.get2DCenter(sharedAtoms); newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == Controller2DModel.BENZENERING) { // make newRing a benzene ring Bond[] bonds = newRing.getBonds(); bonds[0].setOrder(2.0); bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); makeRingAromatic(newRing); } bondLength = r2dm.getBondLength(); conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); if (conAtomsCenter.equals(spiroAtom.getPoint2d())) { ringCenterVector = new Vector2d(0, 1); } else { ringCenterVector = new Vector2d(sharedAtomsCenter); ringCenterVector.sub(conAtomsCenter); } ringPlacer.placeSpiroRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed atom from the ring to add only the new placed // atoms to the AtomContainer. try { newRing.removeAtom(spiroAtom); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } AtomContainer atomCon = getRelevantAtomContainer(chemModel, spiroAtom); atomCon.add(newRing); undoRedoContainer.add(newRing); } else if (sharedAtoms.getAtomCount() == 2) { sharedAtomsCenter = GeometryTools.get2DCenter(sharedAtoms); // calculate two points that are perpendicular to the highlighted bond // and have a certain distance from the bondcenter firstAtom = sharedAtoms.getAtomAt(0); secondAtom = sharedAtoms.getAtomAt(1); xDiff = secondAtom.getX2d() - firstAtom.getX2d(); yDiff = secondAtom.getY2d() - firstAtom.getY2d(); bondLength = Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)); angle = GeometryTools.getAngle(xDiff, yDiff); newPoint1 = new Point2d((Math.cos(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle + (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); newPoint2 = new Point2d((Math.cos(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.x, (Math.sin(angle - (Math.PI / 2)) * bondLength / 4) + sharedAtomsCenter.y); if (wasDragged) { // check which one of the two points is nearest to the endpoint of the pointer // vector that was dragged to make the ringCenterVector point into the right direction. pointerMarkX = r2dm.getPointerVectorEnd().x; pointerMarkY = r2dm.getPointerVectorEnd().y; distance1 = -1 * (Math.sqrt(Math.pow(newPoint1.x - pointerMarkX, 2) + Math.pow(newPoint1.y - pointerMarkY, 2))); distance2 = -1 * (Math.sqrt(Math.pow(newPoint2.x - pointerMarkX, 2) + Math.pow(newPoint2.y - pointerMarkY, 2))); r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); } else { // check which one of the two points is nearest to the center of the // connected atoms to make the ringCenterVector point into the right direction. conAtomsCenter = getConnectedAtomsCenter(sharedAtoms); distance1 = Math.sqrt(Math.pow(newPoint1.x - conAtomsCenter.x, 2) + Math.pow(newPoint1.y - conAtomsCenter.y, 2)); distance2 = Math.sqrt(Math.pow(newPoint2.x - conAtomsCenter.x, 2) + Math.pow(newPoint2.y - conAtomsCenter.y, 2)); } ringCenterVector = new Vector2d(sharedAtomsCenter); // no ring is attached if the two ditances are equal if (distance1 == distance2) { logger.warn("don't know where to draw the new Ring"); } else { if (distance1 < distance2) { ringCenterVector.sub(newPoint1); } else if (distance2 < distance1) { ringCenterVector.sub(newPoint2); } AtomContainer atomCon = getRelevantAtomContainer(chemModel, firstAtom); // construct a new Ring that contains the highlighted bond an its two atoms newRing = createAttachRing(sharedAtoms, ringSize, symbol); if (c2dm.getDrawMode() == Controller2DModel.BENZENERING) { // make newRing a benzene ring Bond existingBond = atomCon.getBond(firstAtom, secondAtom); Bond[] bonds = newRing.getBonds(); if (existingBond.getOrder() == 1.0) { if (existingBond.getFlag(CDKConstants.ISAROMATIC)) { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } else { bonds[1].setOrder(2.0); bonds[3].setOrder(2.0); bonds[5].setOrder(2.0); } } else { bonds[2].setOrder(2.0); bonds[4].setOrder(2.0); } makeRingAromatic(newRing); } // place the new atoms of the new ring to the right position ringPlacer.placeFusedRing(newRing, sharedAtoms, sharedAtomsCenter, ringCenterVector, bondLength); // removes the highlighed bond and its atoms from the ring to add only // the new placed atoms to the AtomContainer. try { newRing.remove(sharedAtoms); } catch (Exception exc) { logger.error("Could not remove atom from ring"); logger.debug(exc); } atomCon.add(newRing); } } for (int i = 0; i < newRing.getAtomCount(); i++) { centerAtom(newRing.getAtomAt(i)); } undoRedoContainer.add(newRing); UndoableEdit edit = new AddAtomsAndBondsEdit(chemModel, undoRedoContainer, "Added Benzene"); c2dm.getUndoSupport().postEdit(edit); r2dm.fireChange(); fireChange(); } if (c2dm.getDrawMode() == Controller2DModel.LASSO) { // first deselect all atoms r2dm.setSelectedPart(new org.openscience.cdk.AtomContainer()); // now select new atoms if (wasDragged) { Vector lassoPoints = r2dm.getLassoPoints(); r2dm.addLassoPoint(new Point((Point) lassoPoints.elementAt(0))); int number = lassoPoints.size(); logger.debug("# lasso points: ", number); int[] screenLassoCoords = new int[number * 2]; Point currentPoint; for (int i = 0; i < number; i++) { currentPoint = (Point) lassoPoints.elementAt(i); screenLassoCoords[i * 2] = currentPoint.x; screenLassoCoords[i * 2 + 1] = currentPoint.y; logger.debug("ScreenLasso.x = ", screenLassoCoords[i * 2]); logger.debug("ScreenLasso.y = ", screenLassoCoords[i * 2 + 1]); } /* * Convert points to world coordinates as they are * in screen coordinates in the vector */ int[] worldCoords = getWorldCoordinates(screenLassoCoords); logger.debug("Returned coords: ", worldCoords.length); logger.debug(" # points: ", number); int[] xPoints = new int[number]; int[] yPoints = new int[number]; for (int i = 0; i < number; i++) { xPoints[i] = worldCoords[i * 2]; yPoints[i] = worldCoords[i * 2 + 1]; logger.debug("WorldCoords.x = ", worldCoords[i * 2]); logger.debug("WorldCoords.y = ", worldCoords[i * 2 + 1]); logger.debug("Polygon.x = ", xPoints[i]); logger.debug("Polygon.y = ", yPoints[i]); } Polygon polygon = new Polygon(xPoints, yPoints, number); r2dm.setSelectedPart(getContainedAtoms(polygon)); r2dm.getLassoPoints().removeAllElements(); r2dm.fireChange(); } else { // one atom clicked or one bond clicked ChemObject chemObj = getChemObjectInRange(mouseX, mouseY); AtomContainer container = new org.openscience.cdk.AtomContainer(); if (chemObj instanceof Atom) { container.addAtom((Atom) chemObj); logger.debug("selected one atom in lasso mode"); r2dm.setSelectedPart(container); } else if (chemObj instanceof org.openscience.cdk.interfaces.Bond) { Bond bond = (Bond) chemObj; container.addBond(bond); logger.debug("selected one bond in lasso mode"); org.openscience.cdk.interfaces.Atom[] atoms = bond.getAtoms(); for (int i = 0; i < atoms.length; i++) { container.addAtom(atoms[i]); } r2dm.setSelectedPart(container); } } fireChange(); } if (c2dm.getDrawMode() == Controller2DModel.MOVE) { if (draggingSelected == false) { // then it was dragging nearest Bond or Atom r2dm.setSelectedPart(new org.openscience.cdk.AtomContainer()); } } if (wasDragged) { prevDragCoordX = 0; prevDragCoordY = 0; wasDragged = false; } dragMode = DRAG_UNSET; r2dm.setPointerVectorStart(null); r2dm.setPointerVectorEnd(null); } if (shiftX != 0 || shiftY != 0) { for (int i = 0; i < chemModel.getSetOfMolecules().getMoleculeCount(); i++) { Molecule mol = chemModel.getSetOfMolecules().getMolecules()[i]; for (int k = 0; k < mol.getAtomCount(); k++) { mol.getAtomAt(k).setX2d(mol.getAtomAt(k).getX2d() - shiftX); mol.getAtomAt(k).setY2d(mol.getAtomAt(k).getY2d() - shiftY); } } r2dm.fireChange(); fireChange(); } shiftX = 0; shiftY = 0; } | 1306 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1306/17811f5949958f1eb24c0b5946c69fb6d934fb4e/AbstractController2D.java/clean/src/org/openscience/cdk/controller/AbstractController2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
7644,
26363,
12,
9186,
1133,
871,
13,
202,
95,
202,
202,
291,
31224,
429,
3043,
273,
629,
31,
202,
202,
4901,
18,
4148,
2932,
9186,
26363,
2587,
1186,
1121,
30,
1965,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7644,
26363,
12,
9186,
1133,
871,
13,
202,
95,
202,
202,
291,
31224,
429,
3043,
273,
629,
31,
202,
202,
4901,
18,
4148,
2932,
9186,
26363,
2587,
1186,
1121,
30,
1965,
154... |
suite.addTest(TestTimeoutBuffer.suite()); | public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(TestBoundedFifoBuffer.suite()); suite.addTest(TestBoundedFifoBuffer2.suite()); suite.addTest(TestCircularFifoBuffer.suite()); suite.addTest(TestPriorityBuffer.suite()); suite.addTest(TestUnboundedFifoBuffer.suite()); suite.addTest(TestBlockingBuffer.suite()); suite.addTest(TestPredicatedBuffer.suite()); suite.addTest(TestSynchronizedBuffer.suite()); suite.addTest(TestTransformedBuffer.suite()); suite.addTest(TestUnmodifiableBuffer.suite()); return suite; } | 55609 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55609/8e3968cd11c98e0c8db30b225164474d00d2b32e/TestAll.java/buggy/src/test/org/apache/commons/collections/buffer/TestAll.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371,
18,
1289,
4709,
12,
4709,
2694,
1892,
18,
30676,
10663,
11371... | |
protected void edit(ExecutionPeriod beginExecutionPeriod, ExecutionPeriod endExecutionPeriod) { checkExecutionPeriods(beginExecutionPeriod, endExecutionPeriod); setBeginExecutionPeriod(beginExecutionPeriod); setEndExecutionPeriod(endExecutionPeriod); | public void edit(CourseGroup parentCourseGroup, DegreeModule degreeModule, CurricularPeriod curricularPeriod, ExecutionPeriod beginExecutionPeriod, ExecutionPeriod endExecutionPeriod) { edit(beginExecutionPeriod, endExecutionPeriod); setParentCourseGroup(parentCourseGroup); setChildDegreeModule(degreeModule); setCurricularPeriod(curricularPeriod); | protected void edit(ExecutionPeriod beginExecutionPeriod, ExecutionPeriod endExecutionPeriod) { checkExecutionPeriods(beginExecutionPeriod, endExecutionPeriod); setBeginExecutionPeriod(beginExecutionPeriod); setEndExecutionPeriod(endExecutionPeriod); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/0925531387e8a6504ad767949ae0e098dd34b1cf/Context.java/buggy/src/net/sourceforge/fenixedu/domain/degreeStructure/Context.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3874,
12,
3210,
5027,
2376,
3210,
5027,
16,
8687,
5027,
679,
3210,
5027,
13,
288,
3639,
866,
3210,
30807,
12,
10086,
3210,
5027,
16,
679,
3210,
5027,
1769,
3639,
444,
8149,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3874,
12,
3210,
5027,
2376,
3210,
5027,
16,
8687,
5027,
679,
3210,
5027,
13,
288,
3639,
866,
3210,
30807,
12,
10086,
3210,
5027,
16,
679,
3210,
5027,
1769,
3639,
444,
8149,
321... |
if (consumer != null) { | if (producer != null) { | public void closeQuietly(MessageConsumer consumer) { if (consumer != null) { try { consumer.close(); } catch (JMSException e) { logger.error("Failed to close jms message consumer", e); } } } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/2929964406d410abddab5bec21d93f4f72b47a7f/JmsConnector.java/buggy/providers/jms/src/java/org/mule/providers/jms/JmsConnector.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
21767,
12,
1079,
5869,
4765,
13,
565,
288,
3639,
309,
261,
11776,
2750,
480,
446,
13,
288,
5411,
775,
288,
7734,
4765,
18,
4412,
5621,
5411,
289,
1044,
261,
46,
3537,
503,
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,
377,
1071,
918,
21767,
12,
1079,
5869,
4765,
13,
565,
288,
3639,
309,
261,
11776,
2750,
480,
446,
13,
288,
5411,
775,
288,
7734,
4765,
18,
4412,
5621,
5411,
289,
1044,
261,
46,
3537,
503,
42... |
} | }*/ | public void xtestFile() { try { ChemObjectReader reader; System.out.println("Loading: " + inFile); reader = new ZMatrixReader(new FileReader(inFile)); System.out.println("Expecting ZMatrix format..."); ChemFile chemFile = (ChemFile)reader.read((ChemObject)new ChemFile()); ChemSequence[] chemSequence = chemFile.getChemSequences(); ChemModel[] chemModels = chemSequence[0].getChemModels(); AtomContainer atomContainer = ChemModelManipulator.getAllInOneContainer(chemModels[0]); RebondTool rebonder = new RebondTool(2.0, 0.5, 0.5); rebonder.rebond(atomContainer); if (standAlone) { JFrame frame = new JFrame("ZMatrixReaderTest"); frame.getContentPane().setLayout(new BorderLayout()); AcceleratedRenderer3D renderer = new AcceleratedRenderer3D( new AcceleratedRenderer3DModel(atomContainer)); frame.getContentPane().add(renderer, BorderLayout.CENTER); //frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.setSize(500,500); frame.setVisible(true); } } catch(Exception exc) { exc.printStackTrace(); } } | 45254 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45254/b26a7336f19d2669cc404aabf392e4fc14a8d7ad/ZMatrixReaderTest.java/clean/src/org/openscience/cdk/test/io/ZMatrixReaderTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
619,
3813,
812,
1435,
288,
3639,
775,
288,
10792,
26542,
921,
2514,
2949,
31,
5411,
2332,
18,
659,
18,
8222,
2932,
10515,
30,
315,
397,
316,
812,
1769,
5411,
2949,
273,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
619,
3813,
812,
1435,
288,
3639,
775,
288,
10792,
26542,
921,
2514,
2949,
31,
5411,
2332,
18,
659,
18,
8222,
2932,
10515,
30,
315,
397,
316,
812,
1769,
5411,
2949,
273,
394,
... |
private static void mapToPartitionZero(SIRStream str, final HashMap<SIROperator,Integer> partitionMap) { | private static void mapToPartitionZero(SIRStream str, final Map<SIROperator,Integer> partitionMap) { | private static void mapToPartitionZero(SIRStream str, final HashMap<SIROperator,Integer> partitionMap) { IterFactory.createFactory().createIter(str).accept(new EmptyStreamVisitor() { public void preVisitStream(SIRStream self, SIRIterator iter) { partitionMap.put(self, new Integer(0)); if (self instanceof SIRSplitJoin) { partitionMap.put(((SIRSplitJoin)self).getSplitter(), new Integer(0)); partitionMap.put(((SIRSplitJoin)self).getJoiner(), new Integer(0)); } else if (self instanceof SIRFeedbackLoop) { partitionMap.put(((SIRFeedbackLoop)self).getSplitter(), new Integer(0)); partitionMap.put(((SIRFeedbackLoop)self).getJoiner(), new Integer(0)); } } }); } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/54a857daae87891b7e50da087f760e893bbeec4b/ClusterBackend.java/buggy/streams/src/at/dms/kjc/cluster/ClusterBackend.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
21178,
7003,
7170,
12,
2320,
54,
1228,
609,
16,
727,
1635,
32,
2320,
1457,
457,
639,
16,
4522,
34,
3590,
863,
13,
288,
3639,
3016,
1733,
18,
2640,
1733,
7675,
2640,
2360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
21178,
7003,
7170,
12,
2320,
54,
1228,
609,
16,
727,
1635,
32,
2320,
1457,
457,
639,
16,
4522,
34,
3590,
863,
13,
288,
3639,
3016,
1733,
18,
2640,
1733,
7675,
2640,
2360... |
public boolean select(Viewer viewer, Object parentElement, Object element) { if (element instanceof ITask) { return !((ITask)element).isCompleted(); } return false; // XXX refactored// else if (element instanceof BugzillaHit){// BugzillaHit hit = (BugzillaHit)element;// BugzillaTask task = hit.getAssociatedTask();// if (task != null) {// return !task.isCompleted();// }// return true;// } else {// return true;// } } | 51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/792f9199babba524f290b6e9545531d9e5ecdec1/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
2027,
12,
18415,
14157,
16,
1033,
30363,
16,
1033,
930,
13,
288,
1082,
202,
430,
261,
2956,
1276,
467,
2174,
13,
288,
9506,
202,
2463,
401,
12443,
1285,
835,
13,
2956,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1250,
2027,
12,
18415,
14157,
16,
1033,
30363,
16,
1033,
930,
13,
288,
1082,
202,
430,
261,
2956,
1276,
467,
2174,
13,
288,
9506,
202,
2463,
401,
12443,
1285,
835,
13,
2956,
... | ||
connectionURL = (String) options.get(CONNECTION_URL); properties = new Properties(); properties.put("user", options.get(USER)); properties.put("password", options.get(PASSWORD)); | public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { this.subject = subject; this.handler = callbackHandler; connectionURL = (String) options.get(CONNECTION_URL); properties = new Properties(); properties.put("user", options.get(USER)); properties.put("password", options.get(PASSWORD)); userSelect = (String) options.get(USER_SELECT); groupSelect = (String) options.get(GROUP_SELECT); ClassLoader cl = (ClassLoader) options.get(JaasLoginModuleUse.CLASSLOADER_LM_OPTION); try { this.driver = (Driver) cl.loadClass((String) options.get(DRIVER)).newInstance(); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Driver class " + driver + " is not available. Perhaps you need to add it as a dependency in your deployment plan?"); } catch (Exception e) { throw new IllegalArgumentException("Unable to load, instantiate, register driver " + driver + ": " + e.getMessage()); } } | 12474 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12474/21beeafb947e9b115b33568fb8ce26f68d435e48/SQLLoginModule.java/buggy/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
12,
6638,
3221,
16,
8444,
1503,
1348,
1503,
16,
1635,
5116,
1119,
16,
1635,
702,
13,
288,
3639,
333,
18,
7857,
273,
3221,
31,
3639,
333,
18,
4176,
273,
1348,
1503,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4046,
12,
6638,
3221,
16,
8444,
1503,
1348,
1503,
16,
1635,
5116,
1119,
16,
1635,
702,
13,
288,
3639,
333,
18,
7857,
273,
3221,
31,
3639,
333,
18,
4176,
273,
1348,
1503,
31,
... | |
return innerResolve(target); | final PropertyList resolved = innerResolve(target); boolean isProto=parseContext.hasPrototypeNamed(target.getQName()); if(isProto) { parseContext.prototypeUpdate(resolved); } return resolved; | private PropertyList resolveToplevelTemplate(PropertyList target) throws CdlException { QName name = target.getQName(); assert name != null; stack.enter(name); try { return innerResolve(target); } finally { stack.exit(name); } } | 4987 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4987/9dd7cac3fcf8b6a445f0f8c0368db293acfc3fef/ExtendsResolver.java/buggy/core/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/resolving/ExtendsResolver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
4276,
682,
2245,
3401,
2815,
2283,
12,
1396,
682,
1018,
13,
1216,
385,
5761,
503,
288,
3639,
16723,
508,
273,
1018,
18,
588,
13688,
5621,
3639,
1815,
508,
480,
446,
31,
3639,
2110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4276,
682,
2245,
3401,
2815,
2283,
12,
1396,
682,
1018,
13,
1216,
385,
5761,
503,
288,
3639,
16723,
508,
273,
1018,
18,
588,
13688,
5621,
3639,
1815,
508,
480,
446,
31,
3639,
2110,
... |
for (int i = 0; i < l.size(); i++) { | for (int i = 0; i < length; i++) { | public static final Sequence generateSequence(String name, Distribution d, int length){ if(d instanceof OrderNDistribution){ return generateOrderNSequence(name, (OrderNDistribution)d, length); } SymbolList sl = null; List l = new ArrayList(length); for (int i = 0; i < l.size(); i++) { l.add(d.sampleSymbol()); } try { sl = new SimpleSymbolList(d.getAlphabet(),l); } catch (IllegalSymbolException ex) { //shouldn't happen but... throw new BioError("Distribution emitting Symbols not from its Alphabet?"); } return new SimpleSequence(sl,name,name,Annotation.EMPTY_ANNOTATION); } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/51fae81ea9f2a9933561f6b110fbee780d15ec48/DistributionTools.java/buggy/src/org/biojava/bio/dist/DistributionTools.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
760,
727,
8370,
2103,
4021,
12,
780,
508,
16,
17547,
302,
16,
509,
769,
15329,
565,
309,
12,
72,
1276,
4347,
50,
9003,
15329,
1377,
327,
2103,
2448,
50,
4021,
12,
529,
16,
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,
282,
1071,
760,
727,
8370,
2103,
4021,
12,
780,
508,
16,
17547,
302,
16,
509,
769,
15329,
565,
309,
12,
72,
1276,
4347,
50,
9003,
15329,
1377,
327,
2103,
2448,
50,
4021,
12,
529,
16,
261,
... |
if(logMINOR) Logger.minor(this, "Completed "+uid+" overload="+hasReceivedRejectedOverload+" "+is.getStatusString()); | if(logMINOR) Logger.minor(this, "Completed "+uid+" overload="+hasReceivedRejectedOverload+ ' ' +is.getStatusString()); | public void realPutCHK(CHKBlock block, boolean cache) throws LowLevelPutException { logMINOR = Logger.shouldLog(Logger.MINOR, this); byte[] data = block.getData(); byte[] headers = block.getHeaders(); PartiallyReceivedBlock prb = new PartiallyReceivedBlock(Node.PACKETS_IN_BLOCK, Node.PACKET_SIZE, data); CHKInsertSender is; long uid = random.nextLong(); if(!node.lockUID(uid)) { Logger.error(this, "Could not lock UID just randomly generated: "+uid+" - probably indicates broken PRNG"); throw new LowLevelPutException(LowLevelPutException.INTERNAL_ERROR); } long startTime = System.currentTimeMillis(); if(cache) { node.store(block); } is = node.makeInsertSender((NodeCHK)block.getKey(), Node.MAX_HTL, uid, null, headers, prb, false, node.getLocation(), cache); boolean hasReceivedRejectedOverload = false; // Wait for status while(true) { synchronized(is) { if(is.getStatus() == CHKInsertSender.NOT_FINISHED) { try { is.wait(5*1000); } catch (InterruptedException e) { // Ignore } } if(is.getStatus() != CHKInsertSender.NOT_FINISHED) break; } if((!hasReceivedRejectedOverload) && is.receivedRejectedOverload()) { hasReceivedRejectedOverload = true; requestStarters.throttleWindow.rejectedOverload(); } } // Wait for completion while(true) { synchronized(is) { if(is.completed()) break; try { is.wait(10*1000); } catch (InterruptedException e) { // Go around again } } if(is.anyTransfersFailed() && (!hasReceivedRejectedOverload)) { hasReceivedRejectedOverload = true; // not strictly true but same effect requestStarters.throttleWindow.rejectedOverload(); } } if(logMINOR) Logger.minor(this, "Completed "+uid+" overload="+hasReceivedRejectedOverload+" "+is.getStatusString()); // Finished? if(!hasReceivedRejectedOverload) { // Is it ours? Did we send a request? if(is.sentRequest() && (is.uid == uid) && ((is.getStatus() == CHKInsertSender.ROUTE_NOT_FOUND) || (is.getStatus() == CHKInsertSender.SUCCESS))) { // It worked! long endTime = System.currentTimeMillis(); long len = endTime - startTime; requestStarters.chkInsertThrottle.successfulCompletion(len); if(!hasReceivedRejectedOverload) requestStarters.throttleWindow.requestCompleted(); } } int status = is.getStatus(); if(status != CHKInsertSender.TIMED_OUT && status != CHKInsertSender.GENERATED_REJECTED_OVERLOAD && status != CHKInsertSender.INTERNAL_ERROR && status != CHKInsertSender.ROUTE_REALLY_NOT_FOUND) { int sent = is.getTotalSentBytes(); int received = is.getTotalReceivedBytes(); if(logMINOR) Logger.minor(this, "Local CHK insert cost "+sent+"/"+received+" bytes ("+status+")"); node.localChkInsertBytesSentAverage.report(sent); node.localChkInsertBytesReceivedAverage.report(received); } if(status == CHKInsertSender.SUCCESS) { Logger.normal(this, "Succeeded inserting "+block); return; } else { String msg = "Failed inserting "+block+" : "+is.getStatusString(); if(status == CHKInsertSender.ROUTE_NOT_FOUND) msg += " - this is normal on small networks; the data will still be propagated, but it can't find the 20+ nodes needed for full success"; if(is.getStatus() != CHKInsertSender.ROUTE_NOT_FOUND) Logger.error(this, msg); else Logger.normal(this, msg); switch(is.getStatus()) { case CHKInsertSender.NOT_FINISHED: Logger.error(this, "IS still running in putCHK!: "+is); throw new LowLevelPutException(LowLevelPutException.INTERNAL_ERROR); case CHKInsertSender.GENERATED_REJECTED_OVERLOAD: case CHKInsertSender.TIMED_OUT: throw new LowLevelPutException(LowLevelPutException.REJECTED_OVERLOAD); case CHKInsertSender.ROUTE_NOT_FOUND: throw new LowLevelPutException(LowLevelPutException.ROUTE_NOT_FOUND); case CHKInsertSender.ROUTE_REALLY_NOT_FOUND: throw new LowLevelPutException(LowLevelPutException.ROUTE_REALLY_NOT_FOUND); case CHKInsertSender.INTERNAL_ERROR: throw new LowLevelPutException(LowLevelPutException.INTERNAL_ERROR); default: Logger.error(this, "Unknown CHKInsertSender code in putCHK: "+is.getStatus()+" on "+is); throw new LowLevelPutException(LowLevelPutException.INTERNAL_ERROR); } } } | 45341 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45341/62fd59041864b4ed1f43adc676de6bfb5ea977f3/NodeClientCore.java/clean/src/freenet/node/NodeClientCore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2863,
6426,
1792,
47,
12,
1792,
47,
1768,
1203,
16,
1250,
1247,
13,
1216,
23629,
2355,
6426,
503,
288,
202,
202,
1330,
6236,
916,
273,
4242,
18,
13139,
1343,
12,
3328,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2863,
6426,
1792,
47,
12,
1792,
47,
1768,
1203,
16,
1250,
1247,
13,
1216,
23629,
2355,
6426,
503,
288,
202,
202,
1330,
6236,
916,
273,
4242,
18,
13139,
1343,
12,
3328,
18... |
Class.forName(driverClass); con = DriverManager.getConnection(dburl); stmt = con.createStatement(); stmt.executeUpdate("INSERT INTO "+ table + makeSQLInsert(pack) +";"); | stmt = makeSQLInsert(pack); stmt.executeUpdate(); | public void handlePacket(UsageMonitorPacket pack) { Connection con = null; Statement stmt; try { log.debug("Will write this packet to database table" + table + ": "); log.info(pack.toString()); Class.forName(driverClass); con = DriverManager.getConnection(dburl); stmt = con.createStatement(); stmt.executeUpdate("INSERT INTO "+ table + makeSQLInsert(pack) +";"); stmt.close(); } catch( SQLException e ) { e.printStackTrace( ); } catch(ClassNotFoundException e) { log.error("Can't find driver class " + driverClass); } finally { if( con != null ) { try { con.close( ); } catch( Exception e ) { } } } } | 8754 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8754/0cf8afb463a23155b7b8c389685c15849174eeea/DefaultPacketHandler.java/buggy/usage/java/receiver/source/src/org/globus/usage/receiver/handlers/DefaultPacketHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1640,
6667,
12,
5357,
7187,
6667,
2298,
13,
288,
3639,
4050,
356,
273,
446,
31,
3639,
8056,
3480,
31,
3639,
775,
288,
13491,
613,
18,
4148,
2932,
13670,
1045,
333,
4414,
358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1640,
6667,
12,
5357,
7187,
6667,
2298,
13,
288,
3639,
4050,
356,
273,
446,
31,
3639,
8056,
3480,
31,
3639,
775,
288,
13491,
613,
18,
4148,
2932,
13670,
1045,
333,
4414,
358,
... |
super(); | super(); | public NotePane() { super(); tPanels = null; titlePanel = new JPanel(); titlePanel.setLayout(new GridLayout(2,1)); JLabel title = new JLabel(); Font thisFont = title.getFont(); Font newFont = new Font(thisFont.getFontName(),Font.BOLD,18); title.setFont(newFont); title.setText(" Note List:"); title.setForeground(new Color(255,255,255)); JButton saveButton = new JButton("Export Notes"); saveButton.setPreferredSize(new Dimension(120,17)); saveButton.setActionCommand("save"); saveButton.addActionListener(this); saveButton.setOpaque(false); saveButton.setForeground(TEXT_COLOR); Color aColor = getBackground(); JTextArea descrip = new JTextArea(); descrip.setEditable(false); descrip.setLineWrap(true); descrip.setWrapStyleWord(true); descrip.setBackground(aColor); newFont = new Font(thisFont.getFontName(), Font.ITALIC,thisFont.getSize()); descrip.setFont(newFont); descrip.setText(" " + "A comprehensive list of all notes in this file."); FormLayout myLayout = new FormLayout( "pref, 5dlu, pref:grow:right, 5dlu", "5dlu, pref, 5dlu, pref"); PanelBuilder build = new PanelBuilder(myLayout); CellConstraints cellC = new CellConstraints(); build.add( title, cellC.xy(1, 2, "left,center")); build.add( saveButton, cellC.xy(3, 2, "right,center")); build.add( descrip, cellC.xyw(1, 4, 4, "fill,center")); titlePanel = build.getPanel(); titlePanel.setBackground(TEXT_COLOR); chooser = new JFileChooser(System.getProperty("user.dir")); chooser.setDialogTitle("Export Notes to Text File"); chooser.setApproveButtonText("Save"); chooser.setApproveButtonToolTipText("Export notes to " + "selected file."); chooser.setFileFilter(new TextFileFilter()); } | 49800 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49800/e012aa1ea2f2c9a799228cc0728fbc62df3c71ab/NotePane.java/clean/loci/ome/notebook/NotePane.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3609,
8485,
1435,
288,
282,
202,
9565,
5621,
282,
202,
88,
5537,
87,
273,
446,
31,
282,
202,
2649,
5537,
273,
394,
24048,
5621,
565,
2077,
5537,
18,
542,
3744,
12,
2704,
7145,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
3609,
8485,
1435,
288,
282,
202,
9565,
5621,
282,
202,
88,
5537,
87,
273,
446,
31,
282,
202,
2649,
5537,
273,
394,
24048,
5621,
565,
2077,
5537,
18,
542,
3744,
12,
2704,
7145,
374... |
public void parse() throws IOException, SAXException { if (_dom != null) { boolean isIncomplete = (_dom.getNodeType() != org.w3c.dom.Node.DOCUMENT_NODE); if (isIncomplete) { _handler.startDocument(); parse(_dom); _handler.endDocument(); } else { parse(_dom); } } | public void parse(InputSource unused) throws IOException, SAXException { parse(_dom); | public void parse() throws IOException, SAXException { if (_dom != null) { boolean isIncomplete = (_dom.getNodeType() != org.w3c.dom.Node.DOCUMENT_NODE); if (isIncomplete) { _handler.startDocument(); parse(_dom); _handler.endDocument(); } else { parse(_dom); } } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/5c7fdbb3b4dc93184b12c1c7b429cb699c2d70e8/DOM2TO.java/buggy/src/org/apache/xalan/xsltc/trax/DOM2TO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1109,
1435,
1216,
1860,
16,
14366,
288,
202,
430,
261,
67,
9859,
480,
446,
13,
288,
202,
565,
1250,
8048,
6226,
273,
3196,
202,
24899,
9859,
18,
588,
15101,
1435,
480,
2358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
1435,
1216,
1860,
16,
14366,
288,
202,
430,
261,
67,
9859,
480,
446,
13,
288,
202,
565,
1250,
8048,
6226,
273,
3196,
202,
24899,
9859,
18,
588,
15101,
1435,
480,
2358,
... |
if (pItems.size() > 0) { | if (pItems.size() > 0) { | select(int index){ if ((index < 0) || (index >= getItemCount())) throw new IllegalArgumentException("Bad index: " + index); if (pItems.size() > 0) { selectedIndex = index; ChoicePeer cp = (ChoicePeer) peer; if (cp != null) { cp.select(index); } }} | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/fbcab5251aa8d5256e1493cab1cd4ebf909b9395/Choice.java/clean/java/awt/Choice.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2027,
12,
474,
770,
15329,
225,
309,
14015,
1615,
411,
374,
13,
747,
261,
1615,
1545,
8143,
1380,
1435,
3719,
565,
604,
394,
2754,
2932,
6434,
770,
30,
315,
397,
770,
1769,
225,
309,
261,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2027,
12,
474,
770,
15329,
225,
309,
14015,
1615,
411,
374,
13,
747,
261,
1615,
1545,
8143,
1380,
1435,
3719,
565,
604,
394,
2754,
2932,
6434,
770,
30,
315,
397,
770,
1769,
225,
309,
261,
84... |
instanceDocument = TransformerUtils.readTinyTree(connectionResult.resultInputStream, connectionResult.resourceURI); | instanceDocument = TransformerUtils.readTinyTree(connectionResult.getResultInputStream(), connectionResult.resourceURI); | public void performDefaultAction(final PipelineContext pipelineContext, XFormsEvent event) { final String eventName = event.getEventName(); if (XFormsEvents.XFORMS_MODEL_CONSTRUCT.equals(eventName)) { // 4.2.1 The xforms-model-construct Event // Bubbles: Yes / Cancelable: No / Context Info: None final Element modelElement = modelDocument.getRootElement(); // 1. All XML Schemas loaded (throws xforms-link-exception) // TODO: support multiple schemas // Get schema URI loadSchemasIfNeeded(pipelineContext); // TODO: throw exception event // 2. Create XPath data model from instance (inline or external) (throws xforms-link-exception) // Instance may not be specified.// if (instances == null) { if (instances == null) { instances = Arrays.asList(new XFormsInstance[instanceIds.size()]); instancesMap = new HashMap(instanceIds.size()); } { // Build initial instance document final List instanceContainers = modelElement.elements(new QName("instance", XFormsConstants.XFORMS_NAMESPACE)); if (instanceContainers.size() > 0) { // Iterate through all instances int instancePosition = 0; for (Iterator i = instanceContainers.iterator(); i.hasNext(); instancePosition++) { final Element instanceContainerElement = (Element) i.next(); final boolean isReadonlyHint = "true".equals(instanceContainerElement.attributeValue(XFormsConstants.XXFORMS_READONLY_ATTRIBUTE_QNAME)); // Skip processing in case somebody has already set this particular instance if (instances.get(instancePosition) != null) continue; final String srcAttribute = instanceContainerElement.attributeValue("src"); final Object instanceDocument;// Document or DocumentInfo final String instanceSourceURI; final String xxformsUsername; final String xxformsPassword; if (srcAttribute == null) { // Inline instance final List children = instanceContainerElement.elements(); if (children == null || children.size() == 0) throw new OXFException("xforms:instance element must contain exactly one child element");// TODO: Throw XForms event? instanceDocument = Dom4jUtils.createDocumentCopyParentNamespaces((Element) children.get(0)); // TODO: support DocumentInfo (easier once static state is done with TinyTree as well) instanceSourceURI = null; xxformsUsername = null; xxformsPassword = null; } else { // External instance final ExternalContext externalContext = (ExternalContext) pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT); // NOTE: Optimizing with include() for servlets doesn't allow detecting errors caused by // the included resource, so we don't allow this for now. Furthermore, we are forced to // "optimize" for portlet access.// final boolean optimize = !NetUtils.urlHasProtocol(srcAttribute)// && (externalContext.getRequest().getContainerType().equals("portlet")// || (externalContext.getRequest().getContainerType().equals("servlet")// && XFormsUtils.isOptimizeLocalInstanceLoads())); final boolean optimizeForPortlets = !NetUtils.urlHasProtocol(srcAttribute) && externalContext.getRequest().getContainerType().equals("portlet"); final XFormsModelSubmission.ConnectionResult connectionResult; if (optimizeForPortlets) { // Use optimized local mode final URI resolvedURI = XFormsUtils.resolveURI(instanceContainerElement, srcAttribute); connectionResult = XFormsSubmissionUtils.doOptimized(pipelineContext, externalContext, null, "get", resolvedURI.toString(), null, false, null, null); instanceSourceURI = resolvedURI.toString(); xxformsUsername = null; xxformsPassword = null; try { // Handle connection errors if (connectionResult.resultCode != 200) throw new OXFException("Got invalid return code while loading instance: " + srcAttribute + ", " + connectionResult.resultCode); // Read result as XML if (!isReadonlyHint) { instanceDocument = TransformerUtils.readDom4j(connectionResult.resultInputStream, connectionResult.resourceURI); } else { instanceDocument = TransformerUtils.readTinyTree(connectionResult.resultInputStream, connectionResult.resourceURI); } } catch (Exception e) { throw new OXFException(e); } finally { // Clean-up if (connectionResult != null) connectionResult.close(); } } else { // Connect using external protocol // Extension: username and password // NOTE: Those don't use AVTs for now, because XPath expressions in those could access // instances that haven't been loaded yet. xxformsUsername = instanceContainerElement.attributeValue(XFormsConstants.XXFORMS_USERNAME_QNAME); xxformsPassword = instanceContainerElement.attributeValue(XFormsConstants.XXFORMS_PASSWORD_QNAME); final String resolvedURL = XFormsUtils.resolveURL(containingDocument, pipelineContext, instanceContainerElement, false, srcAttribute); if (containingDocument.getURIResolver() == null) { // We connect directly connectionResult = XFormsSubmissionUtils.doRegular(externalContext, "get", resolvedURL, xxformsUsername, xxformsPassword, null, null, null); try { // Handle connection errors if (connectionResult.resultCode != 200) throw new OXFException("Got invalid return code while loading instance: " + srcAttribute + ", " + connectionResult.resultCode); // Read result as XML if (!isReadonlyHint) { instanceDocument = TransformerUtils.readDom4j(connectionResult.resultInputStream, connectionResult.resourceURI); } else { instanceDocument = TransformerUtils.readTinyTree(connectionResult.resultInputStream, connectionResult.resourceURI); } } catch (Exception e) { if (connectionResult != null && connectionResult.resourceURI != null) throw new ValidationException(e, new ExtendedLocationData(new LocationData(connectionResult.resourceURI, -1, -1), "reading external instance", instanceContainerElement)); else throw new OXFException(e); } finally { // Clean-up if (connectionResult != null) connectionResult.close(); } instanceSourceURI = connectionResult.resourceURI; } else { // Optimized case that uses the provided resolver final String inputName = ProcessorImpl.getProcessorInputSchemeInputName(resolvedURL); final String urlString; if (inputName != null) { // URL is input:*, keep it as is urlString = resolvedURL; } else { // URL is regular URL, make sure it is absolute final URL finalURL = XFormsSubmissionUtils.createAbsoluteURL(resolvedURL, null, externalContext); urlString = finalURL.toExternalForm(); } if (XFormsServer.logger.isDebugEnabled()) XFormsServer.logger.debug("XForms - getting document from resolver for: " + urlString); try { if (!isReadonlyHint) { instanceDocument = containingDocument.getURIResolver().readURLAsDocument(urlString, xxformsUsername, xxformsPassword); } else { instanceDocument = containingDocument.getURIResolver().readURLAsDocumentInfo(urlString, xxformsUsername, xxformsPassword); } instanceSourceURI = urlString; } catch (Exception e) { throw new ValidationException(e, new ExtendedLocationData(new LocationData(urlString, -1, -1), "reading external instance", instanceContainerElement)); } } } } // Set instance and associated information setInstanceDocument(pipelineContext, instancePosition, instanceDocument, instanceSourceURI, xxformsUsername, xxformsPassword); } } } // TODO: throw exception event // Call special listener to update instance if (instanceConstructListener != null) { int position = 0; for (Iterator i = getInstances().iterator(); i.hasNext(); position++) { instanceConstructListener.updateInstance(position, (XFormsInstance) i.next()); } } // 3. P3P (N/A) // 4. Instance data is constructed. Evaluate binds: // a. Evaluate nodeset // b. Apply model item properties on nodes // c. Throws xforms-binding-exception if the node has already model item property with same name // TODO: a, b, c xxx // 5. xforms-rebuild, xforms-recalculate, xforms-revalidate doRebuild(pipelineContext); doRecalculate(pipelineContext); doRevalidate(pipelineContext); synchronizeInstanceDataEventState(); } else if (XFormsEvents.XFORMS_MODEL_CONSTRUCT_DONE.equals(eventName)) { // 4.2.2 The xforms-model-construct-done Event // Bubbles: Yes / Cancelable: No / Context Info: None // TODO: implicit lazy instance construction } else if (XFormsEvents.XFORMS_REBUILD.equals(eventName)) { // 4.3.7 The xforms-rebuild Event // Bubbles: Yes / Cancelable: Yes / Context Info: None doRebuild(pipelineContext); } else if (XFormsEvents.XFORMS_RECALCULATE.equals(eventName)) { // 4.3.6 The xforms-recalculate Event // Bubbles: Yes / Cancelable: Yes / Context Info: None doRecalculate(pipelineContext); } else if (XFormsEvents.XFORMS_REVALIDATE.equals(eventName)) { // 4.3.5 The xforms-revalidate Event // Bubbles: Yes / Cancelable: Yes / Context Info: None doRevalidate(pipelineContext); } else if (XFormsEvents.XFORMS_REFRESH.equals(eventName)) { // 4.3.4 The xforms-refresh Event // Bubbles: Yes / Cancelable: Yes / Context Info: None doRefresh(pipelineContext); } else if (XFormsEvents.XFORMS_RESET.equals(eventName)) { // 4.3.8 The xforms-reset Event // Bubbles: Yes / Cancelable: Yes / Context Info: None // TODO // "The instance data is reset to the tree structure and values it had immediately // after having processed the xforms-ready event." // "Then, the events xforms-rebuild, xforms-recalculate, xforms-revalidate and // xforms-refresh are dispatched to the model element in sequence." containingDocument.dispatchEvent(pipelineContext, new XFormsRebuildEvent(XFormsModel.this)); containingDocument.dispatchEvent(pipelineContext, new XFormsRecalculateEvent(XFormsModel.this)); containingDocument.dispatchEvent(pipelineContext, new XFormsRevalidateEvent(XFormsModel.this)); containingDocument.dispatchEvent(pipelineContext, new XFormsRefreshEvent(XFormsModel.this)); } else if (XFormsEvents.XFORMS_COMPUTE_EXCEPTION.equals(eventName)) { // 4.5.4 The xforms-compute-exception Event // Bubbles: Yes / Cancelable: No / Context Info: Implementation-specific error string. // The default action for this event results in the following: Fatal error. // TODO } } | 10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/45a8c27d534f029fb2eaa493fdf32ce699b72d68/XFormsModel.java/clean/src/java/org/orbeon/oxf/xforms/XFormsModel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
3073,
1868,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
1139,
18529,
1133,
871,
13,
288,
3639,
727,
514,
7933,
273,
871,
18,
588,
24320,
5621,
3639,
309,
261,
60,
18529,
3783,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3073,
1868,
1803,
12,
6385,
13671,
1042,
5873,
1042,
16,
1139,
18529,
1133,
871,
13,
288,
3639,
727,
514,
7933,
273,
871,
18,
588,
24320,
5621,
3639,
309,
261,
60,
18529,
3783,... |
ToolCommand cmd = ( ToolCommand ) getCommands().get( command ); | ToolCommand cmd = (ToolCommand) getCommands().get( command ); | public void helpOnCommand( String command ) { if ( command.equals( "help" ) ) { printUsage(); System.exit( 0 ); } if ( getCommands().containsKey( command ) ) { ToolCommand cmd = ( ToolCommand ) getCommands().get( command ); HelpFormatter formatter = new HelpFormatter(); formatter.printHelp( getProductCommand() + " " + cmd + " [options]", cmd.getOptions() ); } else { System.err.println( command + ": unknown command" ); System.exit( 1 ); } } | 17035 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17035/685d64c45dff6e9f5c14bbe749c559238c771876/BaseCommand.java/buggy/server-tools/src/main/java/org/apache/directory/server/tools/BaseCommand.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2809,
1398,
2189,
12,
514,
1296,
262,
565,
288,
3639,
309,
261,
1296,
18,
14963,
12,
315,
5201,
6,
262,
262,
3639,
288,
5411,
1172,
5357,
5621,
5411,
2332,
18,
8593,
12,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2809,
1398,
2189,
12,
514,
1296,
262,
565,
288,
3639,
309,
261,
1296,
18,
14963,
12,
315,
5201,
6,
262,
262,
3639,
288,
5411,
1172,
5357,
5621,
5411,
2332,
18,
8593,
12,
374,... |
.addCalledMethod(this) | .addCalledMethod(lastCallClass, lastCallMethod, lastCallSig) | public void sawOpcode(int seen) { if ((seen == INVOKEVIRTUAL || seen == INVOKEINTERFACE) && nameConstant.equals("available") && sigConstant.equals("()I") || (seen == INVOKEVIRTUAL || seen == INVOKEINTERFACE) && nameConstant.startsWith("get") && nameConstant.endsWith("Length") && sigConstant.equals("()I") || (seen == INVOKEVIRTUAL || seen == INVOKEINTERFACE) && classConstant.equals("java/io/File") && nameConstant.equals("length") && sigConstant.equals("()J")) { sawAvailable = 70; return; } sawAvailable--; if ((seen == INVOKEVIRTUAL || seen == INVOKEINTERFACE) && !classConstant.equals("ByteArrayInputStream") && nameConstant.equals("read") && (sigConstant.startsWith("([B") || sigConstant.startsWith("([C")) && sawAvailable <= 0) { /* System.out.println("Saw invocation of " + nameConstant + "(" +sigConstant +")"); */ sawRead = true; readPC = PC; return; } if (seen == POP && sawRead) { bugReporter.reportBug(new BugInstance("RR_NOT_CHECKED", NORMAL_PRIORITY) .addClassAndMethod(this) .addCalledMethod(this) .addSourceLine(this, readPC)); } sawRead = false; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/576aefec1a0617bbdee3170c52071027f9fe03db/ReadReturnShouldBeChecked.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/detect/ReadReturnShouldBeChecked.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
430,
14015,
15156,
422,
29666,
26854,
747,
5881,
422,
29666,
18865,
13,
202,
202,
10,
10,
508,
6902,
18,
14963,
2932,
5699,
7923,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
19821,
22808,
12,
474,
5881,
13,
288,
202,
430,
14015,
15156,
422,
29666,
26854,
747,
5881,
422,
29666,
18865,
13,
202,
202,
10,
10,
508,
6902,
18,
14963,
2932,
5699,
7923,
202... |
assertTrue(token1.authenticate(token2)); | assertTrue(token1.authenticate(token2, null)); | public void testMD5Token(){ try{ properties.clear(); properties.put("auth_value", "chris"); properties.put("token_hash", "MD5"); MD5Token token1 = new MD5Token(); token1.setValue(properties); properties.put("auth_value", "chris"); properties.put("token_hash", "MD5"); MD5Token token2 = new MD5Token(); token2.setValue(properties); assertTrue(token1.authenticate(token2)); }catch(Exception failException){ fail(failException.getMessage()); } } | 48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/00009177ae09a0e763e35d49dfcdfc4da0a63f99/AUTHTest.java/clean/tests/junit/org/jgroups/protocols/AUTHTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
6188,
25,
1345,
1435,
95,
3639,
775,
95,
5411,
1790,
18,
8507,
5621,
5411,
1790,
18,
458,
2932,
1944,
67,
1132,
3113,
315,
15182,
291,
8863,
5411,
1790,
18,
458,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6188,
25,
1345,
1435,
95,
3639,
775,
95,
5411,
1790,
18,
8507,
5621,
5411,
1790,
18,
458,
2932,
1944,
67,
1132,
3113,
315,
15182,
291,
8863,
5411,
1790,
18,
458,
2932,
... |
public byte[] getContent() { | public byte[] getContent() { | public byte[] getContent() { return m_content; } | 52245 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52245/6790c31b218662dcae2d5f71c25a8356c682a9e2/ResourcesAction.java/clean/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
1160,
8526,
5154,
1435,
288,
1082,
202,
2463,
312,
67,
1745,
31,
202,
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,
3196,
202,
482,
1160,
8526,
5154,
1435,
288,
1082,
202,
2463,
312,
67,
1745,
31,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return buffer.append("<link type=\"text/css\" href=\"" + URL + "\" rel=\"stylesheet\" " + (!markup.equals(HTML) ? "/" : "") + ">\n"); | return buffer.append("<link type=\"text/css\" href=\"" + URL + "\" rel=\"stylesheet\" " + (!markup.equals(HTML) ? "/" : "") + ">\n"); | private StringBuffer addStyleSheet(StringBuffer buffer, String markup, String URL) { return buffer.append("<link type=\"text/css\" href=\"" + URL + "\" rel=\"stylesheet\" " + (!markup.equals(HTML) ? "/" : "") + ">\n"); } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/676ebb37c7cd996bcfbaebc15d17741fa4f6b50a/Page.java/clean/src/java/com/idega/presentation/Page.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
6674,
23990,
8229,
12,
780,
1892,
1613,
16,
514,
9813,
16,
514,
1976,
13,
288,
202,
202,
2463,
1613,
18,
6923,
2932,
32,
1232,
618,
5189,
955,
19,
5212,
2412,
3897,
13186,
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,
225,
202,
1152,
6674,
23990,
8229,
12,
780,
1892,
1613,
16,
514,
9813,
16,
514,
1976,
13,
288,
202,
202,
2463,
1613,
18,
6923,
2932,
32,
1232,
618,
5189,
955,
19,
5212,
2412,
3897,
13186,
39... |
org.jruby.RubyClass stringClass = ruby.defineClass("String", ruby.getObjectClass()); | RubyClass stringClass = ruby.defineClass("String", ruby.getObjectClass()); | public static RubyClass createStringClass(Ruby ruby) { org.jruby.RubyClass stringClass = ruby.defineClass("String", ruby.getObjectClass()); // stringClass.includeModule(ruby.getModules().getComparable()); // stringClass.includeModule(ruby.getModules().getEnumerable()); stringClass.defineSingletonMethod("new", getSingletonMethodNew()); stringClass.defineMethod("initialize", getMethodInitialize());/* rb_define_method(rb_cString, "clone", rb_str_clone, 0); rb_define_method(rb_cString, "dup", rb_str_dup, 0); rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1); rb_define_method(rb_cString, "==", rb_str_equal, 1); rb_define_method(rb_cString, "===", rb_str_equal, 1); rb_define_method(rb_cString, "eql?", rb_str_equal, 1); rb_define_method(rb_cString, "hash", rb_str_hash_m, 0); rb_define_method(rb_cString, "+", rb_str_plus, 1); rb_define_method(rb_cString, "*", rb_str_times, 1); rb_define_method(rb_cString, "%", rb_str_format, 1); */ stringClass.defineMethod("[]", getMethodSlice()); /*rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1); rb_define_method(rb_cString, "length", rb_str_length, 0); rb_define_method(rb_cString, "size", rb_str_length, 0); rb_define_method(rb_cString, "empty?", rb_str_empty, 0); rb_define_method(rb_cString, "=~", rb_str_match, 1); rb_define_method(rb_cString, "~", rb_str_match2, 0); rb_define_method(rb_cString, "succ", rb_str_succ, 0); rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0); rb_define_method(rb_cString, "next", rb_str_succ, 0); rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0); rb_define_method(rb_cString, "upto", rb_str_upto_m, 1); rb_define_method(rb_cString, "index", rb_str_index_m, -1); rb_define_method(rb_cString, "rindex", rb_str_rindex, -1); rb_define_method(rb_cString, "replace", rb_str_replace_m, 1); rb_define_method(rb_cString, "to_i", rb_str_to_i, 0); rb_define_method(rb_cString, "to_f", rb_str_to_f, 0); rb_define_method(rb_cString, "to_s", rb_str_to_s, 0); rb_define_method(rb_cString, "to_str", rb_str_to_s, 0); rb_define_method(rb_cString, "inspect", rb_str_inspect, 0); rb_define_method(rb_cString, "dump", rb_str_dump, 0); rb_define_method(rb_cString, "upcase", rb_str_upcase, 0); rb_define_method(rb_cString, "downcase", rb_str_downcase, 0); rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0); rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0); rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0); rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0); rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0); rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0); rb_define_method(rb_cString, "hex", rb_str_hex, 0); rb_define_method(rb_cString, "oct", rb_str_oct, 0); rb_define_method(rb_cString, "split", rb_str_split_m, -1);*/ stringClass.defineMethod("reverse", getMethodReverse()); /*rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0); rb_define_method(rb_cString, "concat", rb_str_concat, 1); rb_define_method(rb_cString, "<<", rb_str_concat, 1); rb_define_method(rb_cString, "crypt", rb_str_crypt, 1); rb_define_method(rb_cString, "intern", rb_str_intern, 0); rb_define_method(rb_cString, "include?", rb_str_include, 1); rb_define_method(rb_cString, "scan", rb_str_scan, 1); rb_define_method(rb_cString, "ljust", rb_str_ljust, 1); rb_define_method(rb_cString, "rjust", rb_str_rjust, 1); rb_define_method(rb_cString, "center", rb_str_center, 1); rb_define_method(rb_cString, "sub", rb_str_sub, -1); rb_define_method(rb_cString, "gsub", rb_str_gsub, -1); rb_define_method(rb_cString, "chop", rb_str_chop, 0); rb_define_method(rb_cString, "chomp", rb_str_chomp, -1); rb_define_method(rb_cString, "strip", rb_str_strip, 0); rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1); rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1); rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0); rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0); rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1); rb_define_method(rb_cString, "tr", rb_str_tr, 2); rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2); rb_define_method(rb_cString, "delete", rb_str_delete, -1); rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1); rb_define_method(rb_cString, "count", rb_str_count, -1); rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2); rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2); rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1); rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1); rb_define_method(rb_cString, "each_line", rb_str_each_line, -1); rb_define_method(rb_cString, "each", rb_str_each_line, -1); rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0); rb_define_method(rb_cString, "sum", rb_str_sum, -1); rb_define_global_function("sub", rb_f_sub, -1); rb_define_global_function("gsub", rb_f_gsub, -1); rb_define_global_function("sub!", rb_f_sub_bang, -1); rb_define_global_function("gsub!", rb_f_gsub_bang, -1); rb_define_global_function("chop", rb_f_chop, 0); rb_define_global_function("chop!", rb_f_chop_bang, 0); rb_define_global_function("chomp", rb_f_chomp, -1); rb_define_global_function("chomp!", rb_f_chomp_bang, -1); rb_define_global_function("split", rb_f_split, -1); rb_define_global_function("scan", rb_f_scan, 1);*/ stringClass.defineMethod("slice", getMethodSlice()); /*rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1); id_to_s = rb_intern("to_s"); rb_fs = Qnil; rb_define_hooked_variable("$;", &rb_fs, 0, rb_str_setter); rb_define_hooked_variable("$-F", &rb_fs, 0, rb_str_setter);*/ return stringClass; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/12847c6fd28fea4e223d132ced46eb1b4cb9de9a/RbString.java/buggy/org/jruby/core/RbString.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
780,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
533,
797,
273,
22155,
18,
11255,
797,
2932,
780,
3113,
22155,
18,
588,
921,
797,
10663,
7734,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
19817,
797,
752,
780,
797,
12,
54,
10340,
22155,
13,
288,
3639,
19817,
797,
533,
797,
273,
22155,
18,
11255,
797,
2932,
780,
3113,
22155,
18,
588,
921,
797,
10663,
7734,
368,
... |
if(charSetEnc == null) { | if (charSetEnc == null) { | public void invoke(MessageContext msgContext) throws AxisFault { try { String charSetEnc = (String) msgContext.getProperty( MessageContext.CHARACTER_SET_ENCODING); if (charSetEnc != null) { omOutput.setCharSetEncoding(charSetEnc); } else { OperationContext opctx = msgContext.getOperationContext(); if(opctx != null) { charSetEnc = (String)opctx.getProperty(MessageContext.CHARACTER_SET_ENCODING); } } /** * If the char set enc is still not found use the default */ if(charSetEnc == null) { charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING; } msgContext.setDoingMTOM(HTTPTransportUtils.doWriteMTOM(msgContext)); omOutput.setSoap11(msgContext.isSOAP11()); omOutput.setDoOptimize(msgContext.isDoingMTOM()); omOutput.setCharSetEncoding(charSetEnc); //Check for the REST behaviour, if you desire rest beahaviour //put a <parameter name="doREST" value="true"/> at the // server.xml/client.xml file EndpointReference epr = null; if (msgContext.getTo() != null && !AddressingConstants.Submission.WSA_ANONYMOUS_URL.equals( msgContext.getTo().getAddress()) && !AddressingConstants.Final.WSA_ANONYMOUS_URL.equals( msgContext.getTo().getAddress())) { epr = msgContext.getTo(); } OMElement dataOut; if (msgContext.isDoingREST()) { dataOut = msgContext.getEnvelope().getBody().getFirstElement(); } else { dataOut = msgContext.getEnvelope(); } //TODO timeout, configuration if (epr != null) { writeMessageWithCommons(msgContext, epr, dataOut); } else { OutputStream out = (OutputStream) msgContext.getProperty( MessageContext.TRANSPORT_OUT); if (msgContext.isServerSide()) { HTTPOutTransportInfo transportInfo = (HTTPOutTransportInfo) msgContext.getProperty( HTTPConstants.HTTPOutTransportInfo); if (transportInfo != null) { omOutput.setSoap11(msgContext.isSOAP11()); transportInfo.setCharacterEncoding(omOutput.getCharSetEncoding()); transportInfo.setContentType(omOutput.getContentType()); }else{ throw new AxisFault(HTTPConstants.HTTPOutTransportInfo + " does not set"); } } omOutput.setOutputStream(out, msgContext.isDoingMTOM()); dataOut.serialize(omOutput); omOutput.flush(); } if(msgContext.getOperationContext() != null){ msgContext.getOperationContext().setProperty( Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE); } } catch (XMLStreamException e) { throw new AxisFault(e); } catch (FactoryConfigurationError e) { throw new AxisFault(e); } catch (IOException e) { throw new AxisFault(e); } } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/f335d6f73d73a36b4bee452ec3b9427b084ce380/CommonsHTTPTransportSender.java/buggy/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4356,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
775,
288,
5411,
514,
1149,
694,
4280,
273,
10792,
261,
780,
13,
1234,
1042,
18,
588,
1396,
12,
18701,
2350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4356,
12,
1079,
1042,
1234,
1042,
13,
1216,
15509,
7083,
288,
3639,
775,
288,
5411,
514,
1149,
694,
4280,
273,
10792,
261,
780,
13,
1234,
1042,
18,
588,
1396,
12,
18701,
2350,
... |
usedDefault = false; | usedDefault = false; | protected void revalidate() { usedDefault = false; super.revalidate(); // Since the default value can change w/o notice // always recompute it. if (usedDefault) valid = false; } | 45946 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45946/6cd7a6a45cf75920b5149201c434a76d795b3b89/SVGOMTextContentElement.java/clean/sources/org/apache/batik/dom/svg/SVGOMTextContentElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
4750,
918,
283,
5662,
1435,
288,
18701,
1399,
1868,
273,
629,
31,
18701,
2240,
18,
266,
5662,
5621,
18701,
368,
7897,
326,
805,
460,
848,
2549,
341,
19,
83,
11690,
18701,
368,
3712,
3006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
7682,
4750,
918,
283,
5662,
1435,
288,
18701,
1399,
1868,
273,
629,
31,
18701,
2240,
18,
266,
5662,
5621,
18701,
368,
7897,
326,
805,
460,
848,
2549,
341,
19,
83,
11690,
18701,
368,
3712,
3006... |
} finally { monitor.done(); } } }; try { new ProgressMonitorJobsDialog(getShell()) .run(true, true, operation); } catch (InterruptedException exception) { return null; } catch (InvocationTargetException exception) { if (exception.getTargetException() instanceof CoreException) { ErrorDialog.openError(getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, null, ((CoreException) exception.getTargetException()) .getStatus()); } else { IDEWorkbenchPlugin.log(getClass(), "createNewFolder", exception.getTargetException()); MessageDialog.openError(getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, NLS.bind(IDEWorkbenchMessages.NewFolderDialog_internalError, exception.getTargetException().getMessage())); } return null; } return folderHandle; } | } finally { monitor.done(); } } }; try { PlatformUI.getWorkbench().getProgressService().busyCursorWhile( operation); } catch (InterruptedException exception) { return null; } catch (InvocationTargetException exception) { if (exception.getTargetException() instanceof CoreException) { ErrorDialog.openError(getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, null, ((CoreException) exception.getTargetException()) .getStatus()); } else { IDEWorkbenchPlugin.log(getClass(), "createNewFolder", exception.getTargetException()); MessageDialog .openError( getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, NLS .bind( IDEWorkbenchMessages.NewFolderDialog_internalError, exception.getTargetException() .getMessage())); } return null; } return folderHandle; } | private IFolder createNewFolder(String folderName, final String linkTargetName) { final IFolder folderHandle = createFolderHandle(folderName); WorkspaceModifyOperation operation = new WorkspaceModifyOperation() { public void execute(IProgressMonitor monitor) throws CoreException { try { monitor.beginTask(IDEWorkbenchMessages.NewFolderDialog_progress, 2000); if (monitor.isCanceled()) { throw new OperationCanceledException(); } if (linkTargetName == null) { folderHandle.create(false, true, monitor); } else { folderHandle.createLink(new Path(linkTargetName), IResource.ALLOW_MISSING_LOCAL, monitor); } if (monitor.isCanceled()) { throw new OperationCanceledException(); } } finally { monitor.done(); } } }; try { new ProgressMonitorJobsDialog(getShell()) .run(true, true, operation); } catch (InterruptedException exception) { return null; } catch (InvocationTargetException exception) { if (exception.getTargetException() instanceof CoreException) { ErrorDialog.openError(getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, null, // no special message ((CoreException) exception.getTargetException()) .getStatus()); } else { // CoreExceptions are handled above, but unexpected runtime exceptions and errors may still occur. IDEWorkbenchPlugin.log(getClass(), "createNewFolder", exception.getTargetException()); //$NON-NLS-1$ MessageDialog.openError(getShell(), IDEWorkbenchMessages.NewFolderDialog_errorTitle, NLS.bind(IDEWorkbenchMessages.NewFolderDialog_internalError, exception.getTargetException().getMessage())); } return null; } return folderHandle; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/f21a158e540a7a992bc7c1d5732d5d6926ff4f2c/NewFolderDialog.java/clean/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
467,
3899,
15291,
3899,
12,
780,
31814,
16,
5411,
727,
514,
1692,
2326,
461,
13,
288,
3639,
727,
467,
3899,
3009,
3259,
273,
752,
3899,
3259,
12,
5609,
461,
1769,
3639,
14396,
11047... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
3899,
15291,
3899,
12,
780,
31814,
16,
5411,
727,
514,
1692,
2326,
461,
13,
288,
3639,
727,
467,
3899,
3009,
3259,
273,
752,
3899,
3259,
12,
5609,
461,
1769,
3639,
14396,
11047... |
public Set<PsiElement> getInappropriatelyAccessedFields(){ final Set<PsiElement> out = new HashSet<PsiElement>( m_synchronizedAccesses); | public Set<PsiField> getInappropriatelyAccessedFields(){ final Set<PsiField> out = new HashSet<PsiField>(m_synchronizedAccesses); | public Set<PsiElement> getInappropriatelyAccessedFields(){ final Set<PsiElement> out = new HashSet<PsiElement>( m_synchronizedAccesses); out.retainAll(m_unsynchronizedAccesses); return out; } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/18423a09276a9225f16a2a3cc03c316686298217/VariableAccessVisitor.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/threading/VariableAccessVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1000,
32,
52,
7722,
1046,
34,
7854,
438,
5986,
566,
5173,
27762,
2314,
1435,
95,
3639,
727,
1000,
32,
52,
7722,
1046,
34,
596,
273,
394,
6847,
32,
52,
7722,
1046,
34,
12,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1000,
32,
52,
7722,
1046,
34,
7854,
438,
5986,
566,
5173,
27762,
2314,
1435,
95,
3639,
727,
1000,
32,
52,
7722,
1046,
34,
596,
273,
394,
6847,
32,
52,
7722,
1046,
34,
12,
7734,
... |
assertTrue("Value not set", df.getGroupingSize() == 2); | assertEquals("Value not set", 2, df.getGroupingSize()); | public void test_setGroupingSizeI() { DecimalFormat df = new DecimalFormat("###0.##", new DecimalFormatSymbols(Locale.ENGLISH)); df.setGroupingUsed(true); df.setGroupingSize(2); assertTrue("Value not set", df.getGroupingSize() == 2); String result = df.format(123); assertTrue("Invalid format:" + result, result.equals("1,23")); } | 54769 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54769/aa7f5ac38085143bcf2542c95a675411434e9ae6/DecimalFormatTest.java/buggy/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
542,
21014,
1225,
45,
1435,
288,
3639,
29665,
3013,
273,
394,
29665,
2932,
13151,
20,
18,
1189,
3113,
7734,
394,
29665,
14821,
12,
3916,
18,
16324,
13462,
10019,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
67,
542,
21014,
1225,
45,
1435,
288,
3639,
29665,
3013,
273,
394,
29665,
2932,
13151,
20,
18,
1189,
3113,
7734,
394,
29665,
14821,
12,
3916,
18,
16324,
13462,
10019,
3639,
... |
/** * The transformed mean vector is given by: * * <p><b>M = A * m + B</b></p> * * where <b>M</b> and <b>m</b> are the mean vector after and * before transformation, respectively, and <b>A</b> and * <b>B</b> are the transformation matrix and vector, * respectively. */ meanTransformed = new float[this.mean.length]; for (i = 0; i < this.meanTransformationVector.length; i++) { float tmpMean = 0.0f; for (j = 0; j < this.meanTransformationMatrix[i].length; j++) { tmpMean += this.mean[j] * this.meanTransformationMatrix[i][j]; } this.meanTransformed[i] = tmpMean + this.meanTransformationVector[i]; } /** * We do analogously with the variance. In this case, we also * invert the variance, and work with precision instead of * variance. */ precisionTransformed = new float[this.variance.length]; for (i = 0; i < this.varianceTransformationVector.length; i++) { float tmpVariance = 0.0f; for (j = 0; j < this.varianceTransformationMatrix[i].length; j++) { tmpVariance += this.variance[j] * this.varianceTransformationMatrix[i][j]; } tmpVariance += this.varianceTransformationVector[i]; if (tmpVariance < varianceFloor) { tmpVariance = varianceFloor; } precisionTransformed[i] = 1.0f / (-2.0f * tmpVariance); } | if (meanTransformationVector != null) for (int k = 0; k < featDim; k++) meanTransformed[k] += meanTransformationVector[k]; /** * We do analogously with the variance. In this case, we also * invert the variance, and work with precision instead of * variance. */ precisionTransformed = new float[variance.length]; if (varianceTransformationMatrix != null) for (int i = 0; i < featDim; i++) for (int j = 0; j < featDim; j++) precisionTransformed[i] += variance[j] * varianceTransformationMatrix[i][j]; else precisionTransformed = variance.clone(); if (varianceTransformationVector != null) for (int k = 0; k < featDim; k++) precisionTransformed[k] += varianceTransformationVector[k]; for (int k = 0; k < featDim; k++) { float flooredPrecision = (precisionTransformed[k] < varianceFloor ? varianceFloor : precisionTransformed[k]); precisionTransformed[k] = 1.0f / (-2.0f * flooredPrecision); } | private void transformStats() { int i, j; // indices for the matrices /** * The transformed mean vector is given by: * * <p><b>M = A * m + B</b></p> * * where <b>M</b> and <b>m</b> are the mean vector after and * before transformation, respectively, and <b>A</b> and * <b>B</b> are the transformation matrix and vector, * respectively. */ meanTransformed = new float[this.mean.length]; for (i = 0; i < this.meanTransformationVector.length; i++) { float tmpMean = 0.0f; for (j = 0; j < this.meanTransformationMatrix[i].length; j++) { tmpMean += this.mean[j] * this.meanTransformationMatrix[i][j]; } this.meanTransformed[i] = tmpMean + this.meanTransformationVector[i]; } /** * We do analogously with the variance. In this case, we also * invert the variance, and work with precision instead of * variance. */ precisionTransformed = new float[this.variance.length]; for (i = 0; i < this.varianceTransformationVector.length; i++) { float tmpVariance = 0.0f; for (j = 0; j < this.varianceTransformationMatrix[i].length; j++) { tmpVariance += this.variance[j] * this.varianceTransformationMatrix[i][j]; } tmpVariance += this.varianceTransformationVector[i]; if (tmpVariance < varianceFloor) { tmpVariance = varianceFloor; } precisionTransformed[i] = 1.0f / (-2.0f * tmpVariance); } } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/156880aaf0c82a19b5684f1f0cc86f9eae3207e2/MixtureComponent.java/buggy/src/sphinx4/edu/cmu/sphinx/linguist/acoustic/tiedstate/MixtureComponent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2510,
4195,
1435,
288,
202,
474,
277,
16,
525,
31,
368,
4295,
364,
326,
16415,
202,
26873,
202,
380,
1021,
10220,
3722,
3806,
353,
864,
635,
30,
202,
380,
202,
380,
411,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2510,
4195,
1435,
288,
202,
474,
277,
16,
525,
31,
368,
4295,
364,
326,
16415,
202,
26873,
202,
380,
1021,
10220,
3722,
3806,
353,
864,
635,
30,
202,
380,
202,
380,
411,
84,
... |
performDeletion(selection, pm); | JavaCore.run(createDeleteRunnable(selection), pm); | private IRunnableWithProgress createDeleteOperation(final IStructuredSelection selection){ return new IRunnableWithProgress(){ public void run(IProgressMonitor pm) throws InvocationTargetException, InterruptedException { try { performDeletion(selection, pm); } catch (CoreException e) { throw new InvocationTargetException(e); } finally { pm.done(); } } }; } | 9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/2c3692eadb2d0fae979d1a2a89f7c082d0a33bda/DeleteSourceReferencesAction.java/clean/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/DeleteSourceReferencesAction.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
467,
20013,
1190,
5491,
752,
2613,
2988,
12,
6385,
467,
30733,
6233,
4421,
15329,
202,
202,
2463,
394,
467,
20013,
1190,
5491,
1435,
95,
5411,
1071,
918,
1086,
12,
45,
5491,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20013,
1190,
5491,
752,
2613,
2988,
12,
6385,
467,
30733,
6233,
4421,
15329,
202,
202,
2463,
394,
467,
20013,
1190,
5491,
1435,
95,
5411,
1071,
918,
1086,
12,
45,
5491,
71... |
return parentMgr.getOverrides().getAccelerator(item); | return getParentMenuManager().getOverrides().getAccelerator(item); | public Integer getAccelerator(IContributionItem item) { if (getEnabled(item) == null) return parentMgr.getOverrides().getAccelerator(item); else // no acclerator if the item is disabled return new Integer(0); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/5ddde0e384bac44f41aeb754525f7bdab6a04e11/EditorMenuManager.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorMenuManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
2144,
4506,
952,
292,
7385,
12,
45,
442,
4027,
1180,
761,
13,
288,
1082,
202,
430,
261,
588,
1526,
12,
1726,
13,
422,
446,
13,
9506,
202,
2463,
982,
9455,
18,
588,
13084,
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,
3196,
202,
482,
2144,
4506,
952,
292,
7385,
12,
45,
442,
4027,
1180,
761,
13,
288,
1082,
202,
430,
261,
588,
1526,
12,
1726,
13,
422,
446,
13,
9506,
202,
2463,
982,
9455,
18,
588,
13084,
7... |
Assert.assert(nickname!=null); | Assert._assert(nickname!=null); | findCertByNickname(String nickname) throws ObjectNotFoundException, TokenException { Assert.assert(nickname!=null); return findCertByNicknameNative(nickname); } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/6ddc297e30f1af6609057abe4502eaa3ba3bb664/CryptoManager.java/clean/security/jss/org/mozilla/jss/CryptoManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
4720,
5461,
858,
29756,
529,
12,
780,
19570,
13,
3639,
1216,
1033,
3990,
16,
3155,
503,
202,
95,
3639,
5452,
18,
11231,
12,
17091,
529,
5,
33,
2011,
1769,
202,
202,
2463,
1104,
546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
4720,
5461,
858,
29756,
529,
12,
780,
19570,
13,
3639,
1216,
1033,
3990,
16,
3155,
503,
202,
95,
3639,
5452,
18,
11231,
12,
17091,
529,
5,
33,
2011,
1769,
202,
202,
2463,
1104,
546... |
responseQueue.add(c); | if (null != c && Chunk.EMPTY != c) { responseQueue.add(c); } | private TokenResult doHandleServerToken(Token token) throws TokenException { serverState = nextServerState(token); switch (serverState) { case RESP_STATUS_LINE_STATE: responseMode = Mode.QUEUEING; statusLine = (StatusLine)token; int sc = statusLine.getStatusCode(); if (100 != sc && 408 != sc) { /* not continue or request timed out */ if (0 == requests.size()) { if (4 != sc / 100) { logger.warn("requests is empty, code: " + sc); } } else { responseRequest = requests.remove(0); responseResponse = outstandingResponses.remove(0); } } if (null == responseResponse) { statusLine = doStatusLine(statusLine); } switch (responseMode) { case QUEUEING: responseQueue.add(statusLine); return TokenResult.NONE; case RELEASED: assert 0 == responseQueue.size(); return new TokenResult(new Token[] { statusLine }, null); case BLOCKED: assert 0 == responseQueue.size(); TokenResult tr = new TokenResult(responseResponse, null); responseResponse = null; return tr; default: throw new IllegalStateException("programmer malfunction"); } case RESP_HEADER_STATE: if (Mode.BLOCKED != responseMode) { Header h = (Header)token; responsePersistent = isPersistent(h); h = doResponseHeader(h); switch (responseMode) { case QUEUEING: responseQueue.add(h); return TokenResult.NONE; case RELEASED: responseQueue.add(h); Token[] toks = new Token[responseQueue.size()]; toks = responseQueue.toArray(toks); responseQueue.clear(); return new TokenResult(toks, null); case BLOCKED: responseQueue.clear(); TokenResult tr = new TokenResult(responseResponse, null); responseResponse = null; return tr; default: throw new IllegalStateException("programmer malfunction"); } } else { return TokenResult.NONE; } case RESP_BODY_STATE: if (Mode.BLOCKED != responseMode) { Chunk c = (Chunk)token; c = doResponseBody(c); switch (responseMode) { case QUEUEING: responseQueue.add(c); return TokenResult.NONE; case RELEASED: responseQueue.add(c); Token[] toks = new Token[responseQueue.size()]; toks = responseQueue.toArray(toks); responseQueue.clear(); return new TokenResult(toks, null); case BLOCKED: responseQueue.clear(); TokenResult tr = new TokenResult(responseResponse, null); responseResponse = null; return tr; default: throw new IllegalStateException("programmer malfunction"); } } else { return TokenResult.NONE; } case RESP_BODY_END_STATE: if (Mode.BLOCKED != responseMode) { EndMarker em = (EndMarker)token; doResponseBodyEnd(); if (100 != statusLine.getStatusCode()) { hosts.remove(responseRequest); } switch (responseMode) { case QUEUEING: throw new IllegalStateException("queueing after EndMarker"); case RELEASED: responseQueue.add(em); Token[] toks = new Token[responseQueue.size()]; toks = responseQueue.toArray(toks); responseQueue.clear(); return new TokenResult(toks, null); case BLOCKED: responseQueue.clear(); TokenResult tr = new TokenResult(responseResponse, null); responseResponse = null; return tr; default: throw new IllegalStateException("programmer malfunction"); } } else { return TokenResult.NONE; } default: throw new IllegalStateException("programmer malfunction"); } } | 49954 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49954/c8a606747edeb0ad9a117de19d837d983be79dfd/HttpStateMachine.java/buggy/tran/http/main/com/metavize/tran/http/HttpStateMachine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3155,
1253,
741,
3259,
2081,
1345,
12,
1345,
1147,
13,
1216,
3155,
503,
565,
288,
3639,
1438,
1119,
273,
1024,
2081,
1119,
12,
2316,
1769,
3639,
1620,
261,
3567,
1119,
13,
288,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3155,
1253,
741,
3259,
2081,
1345,
12,
1345,
1147,
13,
1216,
3155,
503,
565,
288,
3639,
1438,
1119,
273,
1024,
2081,
1119,
12,
2316,
1769,
3639,
1620,
261,
3567,
1119,
13,
288,
3639... |
jq_Type type = constructor.getDeclaringClass(); | jq_Type type = constructor.getDeclaringClass(); | public boolean bindReflection(){ BDD t1 = actual.restrict(Z.ithVar(0)); // IxV2 if (USE_VCONTEXT) t1.andWith(V2cdomain.id()); // IxV2cxV2 BDD t2 = t1.replaceWith(V2toV1); // IxV1cxV1 BDD t11 = IE.restrict(M.ithVar(Mmap.get(javaLangClass_newInstance))); // I if(t11.isZero()){ // no calls to newInstance() t11.free(); return false; } if(REFLECTION_STAT){ System.out.println("There are " + (int)t11.satCount(Iset) + " calls to Class.newInstance"); } BDD t3 = t2.relprod(t11, bdd.zero()); // IxV1 t11.free(); t1.free(); BDD t31 = t3.replace(ItoI2); // I2xV1 if(TRACE_REFLECTION && TRACE) out.println("t31: " + t31.toStringWithDomains(TS)); BDD t4; if (CS_CALLGRAPH) { // We keep track of where a call goes under different contexts. t4 = t31.relprod(vP, V1.set()); } else { // By quantifying out V1c, we merge all contexts. t4 = t31.relprod(vP, V1set); // I2xV1 x V1cxV1xH1 = V1cxI2xH1 } //t4.exist(Iset); if(TRACE_REFLECTION && TRACE) out.println("t4: " + t4.toStringWithDomains(TS) + " of size " + t4.satCount(Iset)); BDD t41 = t4.relprod(forNameMap, Nset); // V1cxI2xH1 x H1xI = IxH1cxH1 t4.free(); if(TRACE_REFLECTION && TRACE) out.println("t41: " + t41.toStringWithDomains(TS) + " of size " + t41.satCount(Iset)); BDD t6 = t41.relprod(actual, Iset.and(H1set)); // V2xI2xZ if(TRACE_REFLECTION_DOMAINS) out.println("t6: " + getBDDDomains(t6)); t41.free(); BDD t7 = t6.restrict(Z.ithVar(1)); // V2xI2 if(TRACE_REFLECTION_DOMAINS) out.println("t7: " + getBDDDomains(t7)); t6.free(); if(TRACE_REFLECTION && TRACE) out.println("t7: " + t7.toStringWithDomains(TS) + " of size " + t7.satCount(Iset)); BDD t8 = t7.replace(V2toV1); // V1xI2 if(TRACE_REFLECTION_DOMAINS) out.println("t8: " + getBDDDomains(t8)); t7.free(); BDD t9 = t8.relprod(vP, V1set); // V1xI2 x V1xH1 = I2xH1 t8.free(); if(TRACE_REFLECTION && TRACE) out.println("t9: " + t9.toStringWithDomains(TS) + " of size " + t9.satCount(Iset)); if(TRACE_REFLECTION_DOMAINS) { out.println("vP: " + getBDDDomains(vP)); out.println("t9: " + getBDDDomains(t9)); } BDD constructorIE = bdd.zero(); for(Iterator iter = t9.iterator(H1set.and(I2set)); iter.hasNext();){ BDD h = (BDD) iter.next(); //if(TRACE_REFLECTION_DOMAINS) out.println("h: " + getBDDDomains(h)); int h_i = h.scanVar(H1).intValue(); Object node = Hmap.get(h_i); if(!(node instanceof ConcreteTypeNode)) { //System.err.println("Can't cast " + node + " to ConcreteTypeNode for " + h.toStringWithDomains(TS)); continue; } MethodSummary.ConcreteTypeNode n = (ConcreteTypeNode) node; String stringConst = (String) MethodSummary.stringNodes2Values.get(n); if(stringConst == null){ if(missingConst.get(stringConst) == null){ if(TRACE_REFLECTION) System.err.println("No constant string for " + n + " at " + h.toStringWithDomains(TS)); missingConst.put(stringConst, new Integer(0)); } continue; } jq_Class c = null; try { if(!isWellFormed(stringConst)) { if(wellFormedClasses.get(stringConst) == null){ if(TRACE_REFLECTION) out.println(stringConst + " is not well-formed."); wellFormedClasses.put(stringConst, new Integer(0)); } continue; } jq_Type clazz = jq_Type.parseType(stringConst); if( clazz instanceof jq_Class && clazz != null){ c = (jq_Class) clazz; if(TRACE_REFLECTION) out.println("Calling class by name: " + stringConst); c.load(); c.prepare(); Assert._assert(c != null); }else{ if(cantCastTypes.get(clazz) == null){ if(TRACE_REFLECTION) System.err.println("Can't cast " + clazz + " to jq_Class at " + h.toStringWithDomains(TS) + " -- stringConst: " + stringConst); cantCastTypes.put(clazz, new Integer(0)); } continue; } } catch(NoClassDefFoundError e) { if(missingClasses.get(stringConst) == null){ if(TRACE_REFLECTION) System.err.println("Resolving reflection: unable to load " + stringConst + " at " + h.toStringWithDomains(TS)); missingClasses.put(stringConst, new Integer(0)); } continue; } catch(java.lang.ClassCircularityError e) { if(circularClasses.get(stringConst) == null){ if(TRACE_REFLECTION) System.err.println("Resolving reflection: circularity error " + stringConst + " at " + h.toStringWithDomains(TS)); circularClasses.put(stringConst, new Integer(0)); } continue; } Assert._assert(c != null); jq_Method constructor = (jq_Method) c.getDeclaredMember( new jq_NameAndDesc( Utf8.get("<init>"), Utf8.get("()V"))); Assert._assert(constructor != null, "No default constructor in class " + c); if(constructor == null){ if(noConstrClasses.get(c) == null){ if(TRACE_REFLECTION) System.err.println("No constructor in class " + c); noConstrClasses.put(c, new Integer(0)); } continue; } // add the relation to IE BDD constructorCall = M.ithVar(Mmap.get(constructor)).and(h); constructorIE.orWith(constructorCall); } BDD old_reflectiveCalls = reflectiveCalls.id(); reflectiveCalls = constructorIE.exist(H1set).replace(I2toI); constructorIE.free(); if(REFLECTION_STAT && !reflectiveCalls.isZero()){ out.println("reflectiveCalls: " + reflectiveCalls.toStringWithDomains(TS) + " of size " + reflectiveCalls.satCount(Iset.and(Mset))); } BDD new_reflectiveCalls = reflectiveCalls.apply(old_reflectiveCalls, BDDFactory.diff); old_reflectiveCalls.free(); if(!new_reflectiveCalls.isZero()){ if(TRACE_REFLECTION) { out.println("Discovered new_reflectiveCalls: " + new_reflectiveCalls.toStringWithDomains(TS) + " of size " + new_reflectiveCalls.satCount(Iset.and(H1set))); } // add the new points-to for reflective calls for(Iterator iter = new_reflectiveCalls.iterator(Iset.and(Mset)); iter.hasNext();){ BDD i_bdd = (BDD) iter.next(); int I_i = i_bdd.scanVar(I).intValue(); ProgramLocation mc = (ProgramLocation) Imap.get(I_i); int M_i = new_reflectiveCalls.relprod(i_bdd, Iset).scanVar(M).intValue(); jq_Method target = (jq_Method) Mmap.get(M_i); jq_Initializer constructor = (jq_Initializer) target; jq_Type type = constructor.getDeclaringClass(); visitMethod(target); MethodSummary ms = MethodSummary.getSummary(mc.getMethod()); Node node = ms.getRVN(mc); if (node != null) { MethodSummary.ConcreteTypeNode h = ConcreteTypeNode.get((jq_Reference) type, mc); int H_i = Hmap.get(h); int V_i = Vmap.get(node); BDD V_arg = V1.ithVar(V_i); if(TRACE_REFLECTION_DOMAINS) { out.println("V_arg: " + getBDDDomains(V_arg)); } addToVP(V_arg, h); } } if (CS_CALLGRAPH){ IE.orWith(new_reflectiveCalls.exist(V1cset)); } else { IE.orWith(new_reflectiveCalls); if (TRACE_SOLVER) { out.println("Call graph edges after: "+IE.satCount(IMset)); } } if(TRACE_REFLECTION) out.println("Call graph edges after: "+IE.satCount(IMset)); return true; } else { return false; } } | 3029 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3029/02b589f209e8b67f18883cfce0a804fd5165f47a/PA.java/clean/joeq_core/joeq/Compiler/Analysis/IPA/PA.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
1993,
9801,
1435,
95,
3639,
605,
5698,
268,
21,
273,
3214,
18,
30604,
12,
62,
18,
483,
1537,
12,
20,
10019,
1850,
368,
467,
92,
58,
22,
3639,
309,
261,
8001,
67,
58,
13181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1993,
9801,
1435,
95,
3639,
605,
5698,
268,
21,
273,
3214,
18,
30604,
12,
62,
18,
483,
1537,
12,
20,
10019,
1850,
368,
467,
92,
58,
22,
3639,
309,
261,
8001,
67,
58,
13181... |
bgDrawers.add(new BackGroundDrawer (tile,b)); | bgDrawers.addElement(new BackGroundDrawer (tile,b)); | private void setBackGround(){ Image tile = comp.getToolkit().getImage("data/widgets/tile.gif"); PMUtil.setImage(tile,comp); int b = BackGroundDrawer.TILING_BOTH; bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.TILING_HORIZONTAL | BackGroundDrawer.VALIGN_TOP; tile = comp.getToolkit().getImage("data/widgets/h_line.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.TILING_HORIZONTAL | BackGroundDrawer.VALIGN_BOTTOM; tile = comp.getToolkit().getImage("data/widgets/h_line.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.TILING_VERTICAL | BackGroundDrawer.HALIGN_LEFT; tile = comp.getToolkit().getImage("data/widgets/v_line.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.TILING_VERTICAL | BackGroundDrawer.HALIGN_RIGHT; tile = comp.getToolkit().getImage("data/widgets/v_line.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.NO_TILING | BackGroundDrawer.VALIGN_TOP | BackGroundDrawer.HALIGN_LEFT; tile = comp.getToolkit().getImage("data/widgets/tl_corner.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.NO_TILING | BackGroundDrawer.VALIGN_BOTTOM | BackGroundDrawer.HALIGN_LEFT; tile = comp.getToolkit().getImage("data/widgets/bl_corner.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.NO_TILING | BackGroundDrawer.VALIGN_TOP | BackGroundDrawer.HALIGN_RIGHT; tile = comp.getToolkit().getImage("data/widgets/tr_corner.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); b = BackGroundDrawer.NO_TILING | BackGroundDrawer.VALIGN_BOTTOM | BackGroundDrawer.HALIGN_RIGHT; tile = comp.getToolkit().getImage("data/widgets/br_corner.gif"); PMUtil.setImage(tile,comp); bgDrawers.add(new BackGroundDrawer (tile,b)); } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/8c32e789c3204358c7b2394bf2327b99b74e24be/GeneralInfoMapSet.java/clean/megamek/src/megamek/client/ui/AWT/widget/GeneralInfoMapSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
2711,
43,
2260,
1435,
95,
3639,
3421,
4769,
273,
1161,
18,
588,
6364,
8691,
7675,
588,
2040,
2932,
892,
19,
18148,
19,
15368,
18,
13905,
8863,
3639,
23544,
1304,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
444,
2711,
43,
2260,
1435,
95,
3639,
3421,
4769,
273,
1161,
18,
588,
6364,
8691,
7675,
588,
2040,
2932,
892,
19,
18148,
19,
15368,
18,
13905,
8863,
3639,
23544,
1304,
18,
... |
temp.putProp(Node.USES_PROP, new Integer(i)); | private void visitUseTemp(Node node, Node child) { while (child != null) { generateCodeFromNode(child, node, -1, -1); child = child.getNextSibling(); } Node temp = (Node) node.getProp(Node.TEMP_PROP); short local = getLocalFromNode(temp); // if the temp node has a magic TARGET property, // treat it as a RET to that temp. if (node.getProp(Node.TARGET_PROP) != null) addByteCode(ByteCode.RET, local); else aload(local); Integer n = (Integer) temp.getProp(Node.USES_PROP); if (n == null) { releaseWordLocal(local); } else { if (n.intValue() < Integer.MAX_VALUE) { int i = n.intValue() - 1; if (i == 0) releaseWordLocal(local); temp.putProp(Node.USES_PROP, new Integer(i)); } } } | 47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/7f850f6162d49fce5f2a418eb4b32ba1cf9d58bf/Codegen.java/clean/src/org/mozilla/javascript/optimizer/Codegen.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3757,
3727,
7185,
12,
907,
756,
16,
2029,
1151,
13,
288,
3639,
1323,
261,
3624,
480,
446,
13,
288,
5411,
2103,
1085,
28570,
12,
3624,
16,
756,
16,
300,
21,
16,
300,
21,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3757,
3727,
7185,
12,
907,
756,
16,
2029,
1151,
13,
288,
3639,
1323,
261,
3624,
480,
446,
13,
288,
5411,
2103,
1085,
28570,
12,
3624,
16,
756,
16,
300,
21,
16,
300,
21,
176... | |
getTxMngr( ).resume( context.currentTx ); | getTxMngr( ).resume( context.clientTx ); | public void afterInvoke(EnterpriseBean instance, TransactionContext context) throws org.openejb.ApplicationException, org.openejb.SystemException{ if ( context.clientTx != null ) { try{ getTxMngr( ).resume( context.currentTx ); }catch(javax.transaction.InvalidTransactionException ite){ // TODO:3: Localize the message; add to Messages.java logger.error("Could not resume the client's transaction, the transaction is no longer valid: "+ite.getMessage()); }catch(IllegalStateException e){ // TODO:3: Localize the message; add to Messages.java logger.error("Could not resume the client's transaction: "+e.getMessage()); }catch(javax.transaction.SystemException e){ // TODO:3: Localize the message; add to Messages.java logger.error("Could not resume the client's transaction: The transaction reported a system exception: "+e.getMessage()); } } } | 47052 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47052/19aa7d637588faf59e70fa62be271b75e2301d72/TxNotSupported.java/clean/openejb0/src/main/org/openejb/core/transaction/TxNotSupported.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1839,
10969,
12,
30699,
3381,
791,
16,
5947,
1042,
819,
13,
1216,
2358,
18,
3190,
73,
10649,
18,
3208,
503,
16,
2358,
18,
3190,
73,
10649,
18,
3163,
503,
95,
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,
918,
1839,
10969,
12,
30699,
3381,
791,
16,
5947,
1042,
819,
13,
1216,
2358,
18,
3190,
73,
10649,
18,
3208,
503,
16,
2358,
18,
3190,
73,
10649,
18,
3163,
503,
95,
3639,
309,
261,
... |
return null; | return new AccessibleJTree(); | public AccessibleContext getAccessibleContext() { return null; } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ae9ec43c5570a0f69e3d8c8b733283719f52a770/JTree.java/clean/core/src/classpath/javax/javax/swing/JTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5016,
1523,
1042,
336,
10451,
1042,
1435,
225,
288,
565,
327,
394,
5016,
1523,
46,
2471,
5621,
225,
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,
282,
1071,
5016,
1523,
1042,
336,
10451,
1042,
1435,
225,
288,
565,
327,
394,
5016,
1523,
46,
2471,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
try { tracker.waitForID(1); | try{ tracker.waitForID( 1 ); | private Image getScaledImage(Image base) { if (base == null) { return null; } if (zoomIndex == BASE_ZOOM_INDEX) { return base; } Image scaled = scaledImageCache.get(base); if (scaled == null) { Dimension d = getImageBounds(base).getSize(); d.width *= scale; d.height *= scale; scaled = scale(base, d.width, d.height); MediaTracker tracker = new MediaTracker(this); tracker.addImage(scaled, 1); // Wait for image to load try { tracker.waitForID(1); } catch (InterruptedException e) { e.printStackTrace(); } tracker.removeImage(scaled); scaledImageCache.put(base, scaled); } return scaled; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/704b54fa8dbc125a1cd59c2df719cf1ca76af972/BoardView1.java/clean/megamek/src/megamek/client/ui/swing/BoardView1.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3421,
1322,
12825,
2040,
12,
2040,
1026,
13,
288,
3639,
309,
261,
1969,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
309,
261,
14932,
1016,
422,
10250,
67,
62,
51,
1872... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3421,
1322,
12825,
2040,
12,
2040,
1026,
13,
288,
3639,
309,
261,
1969,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
309,
261,
14932,
1016,
422,
10250,
67,
62,
51,
1872... |
Color cBlack = new Color(this.getDisplay(), 0, 0, 0); gc.setForeground(cBlack); | Color cText = new Color(this.getDisplay(), 0, 0, 0); gc.setForeground(cText); | public void paintControl(PaintEvent pe) { Color cBackground = null; Color clrTransparencyBackground = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND); GC gc = pe.gc; if (!this.isEnabled()) { gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y); } else { if (fCurrent == null) { gc.setBackground(clrTransparencyBackground); gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y); Color cBlack = new Color(this.getDisplay(), 0, 0, 0); gc.setForeground(cBlack); gc.drawText(Messages.getString("FillCanvas.Transparent"), 2, 2); //$NON-NLS-1$ cBlack.dispose(); } else { if (fCurrent instanceof ColorDefinition) { if (((ColorDefinition) fCurrent).getTransparency() == 0) { gc.setBackground(clrTransparencyBackground); gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y); Color cBlack = new Color(this.getDisplay(), 0, 0, 0); gc.setForeground(cBlack); gc.drawText(Messages.getString("FillCanvas.Transparent"), 2, 2); cBlack.dispose(); } else { cBackground = new Color(Display.getDefault(), ((ColorDefinition) fCurrent).getRed(), ((ColorDefinition) fCurrent).getGreen(), ((ColorDefinition) fCurrent).getBlue()); gc.setBackground(cBackground); gc.fillRectangle(2, 2, this.getSize().x - 4, this.getSize().y - 4); } } else if (fCurrent instanceof Image) { gc.fillRectangle(2, 2, getSize().x - 4, this.getSize().y - 4); gc.drawImage(getSWTImage((Image) fCurrent), 2, 2); } else if (fCurrent instanceof Gradient) { if (((Gradient) fCurrent).getStartColor() == null && ((Gradient) fCurrent).getEndColor() == null) { return; } Color clrStart = null; Color clrEnd = null; if (((Gradient) fCurrent).getStartColor() != null) { clrStart = new Color(Display.getDefault(), ((Gradient) fCurrent).getStartColor().getRed(), ((Gradient) fCurrent).getStartColor().getGreen(), ((Gradient) fCurrent).getStartColor() .getBlue()); gc.setForeground(clrStart); } if (((Gradient) fCurrent).getEndColor() != null) { clrEnd = new Color(Display.getDefault(), ((Gradient) fCurrent).getEndColor().getRed(), ((Gradient) fCurrent).getEndColor().getGreen(), ((Gradient) fCurrent).getEndColor() .getBlue()); gc.setBackground(clrEnd); } gc.fillGradientRectangle(2, 2, this.getSize().x - 4, this.getSize().y - 4, false); } } } if (cBackground != null) { cBackground.dispose(); } } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7051b6d9f8f3feb50f84a6b8bb469bfa6ecce293/FillCanvas.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/FillCanvas.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
3367,
12,
12699,
1133,
2804,
13,
565,
288,
3639,
5563,
276,
8199,
273,
446,
31,
3639,
5563,
927,
86,
1429,
18258,
8199,
273,
9311,
18,
588,
3935,
7675,
588,
3163,
2957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
12574,
3367,
12,
12699,
1133,
2804,
13,
565,
288,
3639,
5563,
276,
8199,
273,
446,
31,
3639,
5563,
927,
86,
1429,
18258,
8199,
273,
9311,
18,
588,
3935,
7675,
588,
3163,
2957,
... |
ExceptionHandler.showException( null, "title", "msg", e ); | ExceptionHandler.showException( PlatformUI.getWorkbench( ) .getDisplay( ) .getActiveShell( ), JdbcPlugin.getResourceString( "exceptionHandler.title.error" ), e.getLocalizedMessage( ), e ); | public static List getDriverFiles( ) { try { // can not use filefilter,since the input is not a directory List fileList; fileList = OdaJdbcDriver.getDriverFileList( ); Map deletedJars = Utility.getPreferenceStoredMap( JdbcPlugin.DELETED_JAR_MAP_PREFERENCE_KEY ); List filteredFileList = new java.util.ArrayList( ); for ( int i = 0; i < fileList.size( ); i++ ) { File f = (File) fileList.get( i ); if ( !deletedJars.containsKey( f.getName( ) ) ) { filteredFileList.add( f ); } } return filteredFileList; } catch ( OdaException e ) { //TODO ExceptionHandler.showException( null, "title", "msg", e ); } catch ( IOException e ) { //TODO ExceptionHandler.showException( null, "title", "msg", e ); } return null; } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/020856efadddb7bd3bd0b968de0e7cadf12a1568/JdbcDriverConfigUtil.java/buggy/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcDriverConfigUtil.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
987,
15885,
2697,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
759,
848,
486,
999,
585,
2188,
16,
9256,
326,
810,
353,
486,
279,
1867,
1082,
202,
682,
1864... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
987,
15885,
2697,
12,
262,
202,
95,
202,
202,
698,
202,
202,
95,
1082,
202,
759,
848,
486,
999,
585,
2188,
16,
9256,
326,
810,
353,
486,
279,
1867,
1082,
202,
682,
1864... |
timeTriggers.remove(ttw); | if (!timeTriggers.remove(ttw)) queueTriggers.remove(ttw); | public TriggerFiredBundle triggerFired(SchedulingContext ctxt, Trigger trigger) { synchronized (triggerLock) { TriggerWrapper tw = (TriggerWrapper) triggersByFQN.get(TriggerWrapper .getTriggerNameKey(trigger)); // was the trigger deleted since being acquired? if (tw == null || tw.trigger == null) return null; // was the trigger completed since being acquired? if (tw.state == TriggerWrapper.STATE_COMPLETE) return null; // was the trigger paused since being acquired? if (tw.state == TriggerWrapper.STATE_PAUSED) return null; // was the trigger blocked since being acquired? if (tw.state == TriggerWrapper.STATE_BLOCKED) return null; // was the trigger paused and blocked since being acquired? if (tw.state == TriggerWrapper.STATE_PAUSED_BLOCKED) return null; Calendar cal = null; if (tw.trigger.getCalendarName() != null) cal = retrieveCalendar(ctxt, tw.trigger.getCalendarName()); Date prevFireTime = trigger.getPreviousFireTime(); // call triggered on our copy, and the scheduler's copy tw.trigger.triggered(cal); trigger.triggered(cal); //tw.state = TriggerWrapper.STATE_EXECUTING; tw.state = TriggerWrapper.STATE_WAITING; TriggerFiredBundle bndle = new TriggerFiredBundle(retrieveJob(ctxt, trigger.getJobName(), trigger.getJobGroup()), trigger, cal, false, new Date(), trigger.getPreviousFireTime(), prevFireTime, trigger.getNextFireTime()); JobDetail job = bndle.getJobDetail(); if (job.isStateful()) { ArrayList trigs = getTriggerWrappersForJob(job.getName(), job .getGroup()); Iterator itr = trigs.iterator(); while (itr.hasNext()) { TriggerWrapper ttw = (TriggerWrapper) itr.next(); if(ttw.state == TriggerWrapper.STATE_WAITING) ttw.state = TriggerWrapper.STATE_BLOCKED; if(ttw.state == TriggerWrapper.STATE_PAUSED) ttw.state = TriggerWrapper.STATE_PAUSED_BLOCKED; timeTriggers.remove(ttw); } blockedJobs.add(JobWrapper.getJobNameKey(job)); } else if (tw.trigger.getNextFireTime() != null) { synchronized (triggerLock) { timeTriggers.add(tw); } } return bndle; } } | 15562 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15562/7f068ed4db64bf2e8c44b1449b271943d9b46934/RAMJobStore.java/clean/src/java/org/quartz/simpl/RAMJobStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
11321,
42,
2921,
3405,
3080,
42,
2921,
12,
25401,
1042,
14286,
16,
5411,
11321,
3080,
13,
288,
3639,
3852,
261,
10668,
2531,
13,
288,
3639,
11321,
3611,
2339,
273,
261,
6518,
3611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11321,
42,
2921,
3405,
3080,
42,
2921,
12,
25401,
1042,
14286,
16,
5411,
11321,
3080,
13,
288,
3639,
3852,
261,
10668,
2531,
13,
288,
3639,
11321,
3611,
2339,
273,
261,
6518,
3611,
... |
if (!methods[i].getName().equals(methodName)) continue; | if (!methods[i].getName().equals(methodName)) continue; | final Object doExecute() throws Exception { Class klazz = (target instanceof Class) ? (Class) target : target.getClass(); Object args[] = (arguments == null) ? new Object[0] : arguments; Class argTypes[] = new Class[args.length]; for (int i = 0; i < args.length; i++) argTypes[i] = args[i].getClass(); if (target.getClass().isArray()) { // FIXME: invoke may have to be used. For now, cast to Number // and hope for the best. If caller didn't behave, we go boom // and throw the exception. if (methodName.equals("get") && argTypes.length == 1) return Array.get(target, ((Number)args[0]).intValue()); if (methodName.equals("set") && argTypes.length == 2) { Object obj = Array.get(target, ((Number)args[0]).intValue()); Array.set(target, ((Number)args[0]).intValue(), args[1]); return obj; } throw new NoSuchMethodException("No matching method for statement " + toString()); } // If we already cached the method, just use it. if (method != null) return method.invoke(target, args); else if (ctor != null) return ctor.newInstance(args); // Find a matching method to call. JDK seems to go through all // this to find the method to call. // if method name or length don't match, skip // Need to go through each arg // If arg is wrapper - check if method arg is matchable builtin // or same type or super // - check that method arg is same or super if (methodName.equals("new") && target instanceof Class) { Constructor ctors[] = klazz.getConstructors(); for (int i = 0; i < ctors.length; i++) { // Skip methods with wrong number of args. Class ptypes[] = ctors[i].getParameterTypes(); System.out.println("ptypeslen = " + ptypes.length); System.out.println("ptypes = " + ptypes); System.out.println("ctor = " + ctors[i].getName()); for (int j=0; j < ptypes.length; j++) { System.out.println("param = " + ptypes[i].getName()); } if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (ctor == null) { ctor = ctors[i]; continue; } Class mptypes[] = ctor.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) ctor = ctors[i]; } if (ctor == null) throw new InstantiationException("No matching constructor for statement " + toString()); return ctor.newInstance(args); } Method methods[] = klazz.getMethods(); for (int i = 0; i < methods.length; i++) { // Skip methods with wrong name or number of args. if (!methods[i].getName().equals(methodName)) continue; Class ptypes[] = methods[i].getParameterTypes(); if (ptypes.length != args.length) continue; // Check if method matches if (!compatible(ptypes, argTypes)) continue; // Use method[i] if it is more specific. // FIXME: should this check both directions and throw if // neither is more specific? if (method == null) { method = methods[i]; continue; } Class mptypes[] = method.getParameterTypes(); if (moreSpecific(ptypes, mptypes)) method = methods[i]; } if (method == null) throw new NoSuchMethodException("No matching method for statement " + toString()); return method.invoke(target, args); } | 5916 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5916/2fadb29aa19625852934eb92cd7a6fc23f0f316b/Statement.java/clean/libjava/java/beans/Statement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1033,
741,
5289,
1435,
1216,
1185,
225,
288,
565,
1659,
15290,
3638,
273,
261,
3299,
1276,
1659,
13,
202,
35,
261,
797,
13,
1018,
294,
1018,
18,
588,
797,
5621,
565,
1033,
833,
852... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
727,
1033,
741,
5289,
1435,
1216,
1185,
225,
288,
565,
1659,
15290,
3638,
273,
261,
3299,
1276,
1659,
13,
202,
35,
261,
797,
13,
1018,
294,
1018,
18,
588,
797,
5621,
565,
1033,
833,
852... |
if (atIndex + 1 > XMPPAddress.length() || atIndex < 0) { | if (atIndex + 1 > XMPPAddress.length()) { | public static String parseServer(String XMPPAddress) { if (XMPPAddress == null) { return null; } int atIndex = XMPPAddress.indexOf("@"); // If the String ends with '@', return the empty string. if (atIndex + 1 > XMPPAddress.length() || atIndex < 0) { return ""; } int slashIndex = XMPPAddress.indexOf("/"); if (slashIndex > 0) { return XMPPAddress.substring(atIndex + 1, slashIndex); } else { return XMPPAddress.substring(atIndex + 1); } } | 1538 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1538/31103288f1e91bfe2862b4711633e75d54ed1bde/StringUtils.java/buggy/source/org/jivesoftware/smack/util/StringUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1109,
2081,
12,
780,
23216,
1887,
13,
288,
3639,
309,
261,
60,
19388,
1887,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
509,
622,
1016,
273,
23216,
1887,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
1109,
2081,
12,
780,
23216,
1887,
13,
288,
3639,
309,
261,
60,
19388,
1887,
422,
446,
13,
288,
5411,
327,
446,
31,
3639,
289,
3639,
509,
622,
1016,
273,
23216,
1887,
18,... |
String constraintString = productSearchConstraint.prettyPrintConstraint(delegator, detailed); | String constraintString = productSearchConstraint.prettyPrintConstraint(delegator, detailed, locale); | public List searchGetConstraintStrings(boolean detailed, GenericDelegator delegator) { List productSearchConstraintList = this.getConstraintList(); List constraintStrings = new ArrayList(); if (productSearchConstraintList == null) { return constraintStrings; } Iterator productSearchConstraintIter = productSearchConstraintList.iterator(); while (productSearchConstraintIter.hasNext()) { ProductSearchConstraint productSearchConstraint = (ProductSearchConstraint) productSearchConstraintIter.next(); if (productSearchConstraint == null) continue; String constraintString = productSearchConstraint.prettyPrintConstraint(delegator, detailed); if (UtilValidate.isNotEmpty(constraintString)) { constraintStrings.add(constraintString); } else { constraintStrings.add("Description not available"); } } return constraintStrings; } | 55411 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55411/2eaa7fbca1e270b0698e944910315b5844f2b250/ProductSearchSession.java/buggy/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
987,
1623,
967,
5806,
7957,
12,
6494,
6864,
16,
7928,
15608,
639,
11158,
639,
13,
288,
5411,
987,
3017,
2979,
5806,
682,
273,
333,
18,
588,
5806,
682,
5621,
5411,
987,
4954,
7957,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
987,
1623,
967,
5806,
7957,
12,
6494,
6864,
16,
7928,
15608,
639,
11158,
639,
13,
288,
5411,
987,
3017,
2979,
5806,
682,
273,
333,
18,
588,
5806,
682,
5621,
5411,
987,
4954,
7957,
... |
public String getFormatString( ) { if ( category == null && pattern == null ) { return null; } if ( category == null ) { category = ""; //$NON-NLS-1$ } if ( pattern == null ) { pattern = ""; //$NON-NLS-1$ } // special case: when pattern equals category, omits(eliminatess) the // pattern, only returns the category.-----> for parameter dialog use. if ( category.equals( pattern ) ) { return category; } return category + ":" + pattern; //$NON-NLS-1$ } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/68e6e831ed1a7d01155ecde63d74c89397dae569/FormatDateTimePage.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/FormatDateTimePage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
10959,
780,
12,
262,
202,
95,
202,
202,
430,
261,
3150,
422,
446,
597,
1936,
422,
446,
262,
202,
202,
95,
1082,
202,
2463,
446,
31,
202,
202,
97,
202,
202,
430,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
514,
10959,
780,
12,
262,
202,
95,
202,
202,
430,
261,
3150,
422,
446,
597,
1936,
422,
446,
262,
202,
202,
95,
1082,
202,
2463,
446,
31,
202,
202,
97,
202,
202,
430,
261,
... | ||
FoldRegion next = myRegions.get(j); | final FoldRegion next = myRegions.get(j); | public boolean addRegion(FoldRegion range) { for (int i = 0; i < myRegions.size(); i++) { FoldRegion region = myRegions.get(i); if (region.isValid() && intersects(region, range)) { return false; } if (range.getStartOffset() < region.getStartOffset() || (range.getStartOffset() == region.getStartOffset() && range.getEndOffset() > region.getEndOffset())) { for (int j = i + 1; j < myRegions.size(); j++) { FoldRegion next = myRegions.get(j); if (next.getEndOffset() >= range.getEndOffset() && next.isValid()) { if (next.getStartOffset() < range.getStartOffset()) { return false; } else { break; } } } myRegions.add(i, range); return true; } } myRegions.addLast(range); return true; } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/2a2ea0c9eb4e271b9c0425e31566c34a56000d4d/FoldingModelImpl.java/clean/source/com/intellij/openapi/editor/impl/FoldingModelImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
527,
5165,
12,
15592,
5165,
1048,
13,
288,
1377,
364,
261,
474,
277,
273,
374,
31,
277,
411,
3399,
17344,
18,
1467,
5621,
277,
27245,
288,
3639,
478,
1673,
5165,
3020,
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,
527,
5165,
12,
15592,
5165,
1048,
13,
288,
1377,
364,
261,
474,
277,
273,
374,
31,
277,
411,
3399,
17344,
18,
1467,
5621,
277,
27245,
288,
3639,
478,
1673,
5165,
3020,
273,
... |
while (!getRecording()) { | while (!getClosed() && !getRecording()) { | private synchronized void waitToRecord() { synchronized(this) { while (!getRecording()) { try { System.out.println("waiting to record"); wait(); } catch (InterruptedException ie) { ie.printStackTrace(); } } System.out.println("finished waiting"); } } | 48839 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48839/65adf391d941ee3133d8d81d96ddfe3f1cd069dd/Microphone.java/clean/sphinx4/edu/cmu/sphinx/frontend/Microphone.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
3852,
918,
2529,
774,
2115,
1435,
288,
3639,
3852,
12,
2211,
13,
288,
5411,
1323,
16051,
588,
7395,
1435,
597,
401,
588,
21037,
10756,
288,
7734,
775,
288,
10792,
2332,
18,
659,
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,
3852,
918,
2529,
774,
2115,
1435,
288,
3639,
3852,
12,
2211,
13,
288,
5411,
1323,
16051,
588,
7395,
1435,
597,
401,
588,
21037,
10756,
288,
7734,
775,
288,
10792,
2332,
18,
659,
18,... |
public LCObject getRawHit() { return rawHit; } | public LCObject getRawHit() { return rawHit; } | public LCObject getRawHit() { return rawHit;} | 1716 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1716/c981b170f1c94cbcfd8bac8c2da34ea4623b48e2/ICalorimeterHit.java/buggy/src/java/hep/lcio/implementation/event/ICalorimeterHit.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
27727,
921,
10547,
13616,
1435,
288,
202,
2463,
1831,
13616,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
27727,
921,
10547,
13616,
1435,
288,
202,
2463,
1831,
13616,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.