rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
XZPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) | XZPlane(PlaneDef pDef, Pixels pixels, MappedByteBuffer data) | XZPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) { super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/XZPlane.java/buggy/components/rendering/src/omeis/providers/re/data/XZPlane.java |
super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); | super(pDef, pixels, data); | XZPlane(byte[] data, PlaneDef pDef, int sizeX, int sizeY, int bytesPerPixel, BytesConverter strategy) { super(data, pDef, sizeX, sizeY, bytesPerPixel, strategy); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/XZPlane.java/buggy/components/rendering/src/omeis/providers/re/data/XZPlane.java |
if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); | Rectangle r; Segment vLeft, vRight, hTop, hBottom; PlanePoint topLeftCorner, topRightCorner, bottomLeftCorner, bottomRightCorner; PlanePoint cPoint; | private void handleMousePressed(Point p, int clickCount) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; Iterator i = listROI.iterator(); ROIShape roi; Shape s; if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); if (s.contains(p)) { currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); if (clickCount == 2) { dragging = false; control.annotateROI(roi); } } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); if (clickCount == 2) { dragging = false; control.annotateROI(roi); } | setHandlePressedValues(roi, s, r.x, r.y); cPoint = new PlanePoint(p.x, p.y); if (vLeft.lies(cPoint)) resizeZone = LEFT; else if (vRight.lies(cPoint)) resizeZone = RIGHT; else if (hTop.lies(cPoint)) resizeZone = TOP; else if (hBottom.lies(cPoint)) resizeZone = BOTTOM; else handlePressedIn(roi, clickCount); | private void handleMousePressed(Point p, int clickCount) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; Iterator i = listROI.iterator(); ROIShape roi; Shape s; if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); if (s.contains(p)) { currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); if (clickCount == 2) { dragging = false; control.annotateROI(roi); } } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); | private void handleMousePressed(Point p, int clickCount) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; Iterator i = listROI.iterator(); ROIShape roi; Shape s; if (state == ROIAgt.MOVING) setCursor(HAND_CURSOR); else setCursor(DEFAULT_CURSOR); while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); if (s.contains(p)) { currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); if (clickCount == 2) { dragging = false; control.annotateROI(roi); } } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
|
state = ROIAgt.CONSTRUCTING; | public void mouseReleased(MouseEvent e) { dragging = false; moving = false; setCursor(DEFAULT_CURSOR); switch (state) { case ROIAgt.CONSTRUCTING: if (!pressed) saveROI(); break; case ROIAgt.MOVING: case ROIAgt.RESIZING: if (currentShape != null) saveShape(); } pressed = false; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
|
private void move(Point p) { int diffX = p.x-anchor.x, diffY = p.y-anchor.y; Rectangle r = currentShape.getBounds(); int x = xControl+diffX, y = yControl+diffY, w = r.width, h = r.height; if (areaValid(x, y, w, h)) { ROIFactory.setShapeBounds(currentShape, currentROI.getShapeType(), x , y, w, h); moving = true; view.moveAndDraw(currentShape); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
||
Rectangle r = currentShape.getBounds(); int width = Math.abs(r.x-p.x), height = Math.abs(r.y-p.y); ROIFactory.setShapeBounds(currentShape, currentROI.getShapeType(), r.x, r.y, width, height); moving = true; view.draw(currentShape); | Rectangle r = currentROI.getShape().getBounds(); int x = r.x, y = r.y, w = r.width, h = r.height; switch (resizeZone) { case LEFT: x = p.x; w += anchor.x-p.x; break; case RIGHT: w += p.x-anchor.x; break; case TOP: y = p.y; h += anchor.y-p.y; break; case BOTTOM: h += p.y-anchor.y; } if (areaValid(x, y, w, h)) { currentShape = ROIFactory.makeShape(currentROI.getShapeType(), x, y, w, h); view.draw(currentShape); moving = true; } | private void resize(Point p) { Rectangle r = currentShape.getBounds(); int width = Math.abs(r.x-p.x), height = Math.abs(r.y-p.y); ROIFactory.setShapeBounds(currentShape, currentROI.getShapeType(), r.x, r.y, width, height); moving = true; view.draw(currentShape); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cfc52b7b8d32ef4ef75453a2e435f5fb84e45290/DrawingCanvasMng.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java |
JViewport port = view.getViewport(); int x = (int) port.getViewPosition().getX(); int y = (int) port.getViewPosition().getY(); | int x = (int) view.getViewport().getViewPosition().getX(); int y = (int) view.getViewport().getViewPosition().getY(); | public void paintComponent(Graphics g) { super.paintComponent(g); BufferedImage img = model.getDisplayedImage(); if (img == null) return; Graphics2D g2D = (Graphics2D) g; ImagePaintingFactory.setGraphicRenderingSettings(g2D); g2D.drawImage(img, null, 0, 0); if (model.isUnitBar()) { String value = model.getUnitBarValue(); if (value != null) { int size = (int) (model.getUnitBarSize()); Rectangle imgRect = new Rectangle(0, 0, img.getWidth(), img.getHeight()); Rectangle viewRect = view.getViewport().getBounds(); JViewport port = view.getViewport(); int x = (int) port.getViewPosition().getX(); int y = (int) port.getViewPosition().getY(); int width = Math.min(x+viewRect.width, img.getWidth()); int height = Math.min(y+viewRect.height, img.getHeight()); if (imgRect.contains(viewRect)) { width = x+port.getWidth(); height = y+port.getHeight(); } ImagePaintingFactory.paintScaleBar(g2D, width-size-10, height-10, size, value); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0af43dc49a2e6662a80042d1022f4e7ae68cf56/BrowserCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserCanvas.java |
width = x+port.getWidth(); height = y+port.getHeight(); | width = x+viewRect.width; height = y+viewRect.height; | public void paintComponent(Graphics g) { super.paintComponent(g); BufferedImage img = model.getDisplayedImage(); if (img == null) return; Graphics2D g2D = (Graphics2D) g; ImagePaintingFactory.setGraphicRenderingSettings(g2D); g2D.drawImage(img, null, 0, 0); if (model.isUnitBar()) { String value = model.getUnitBarValue(); if (value != null) { int size = (int) (model.getUnitBarSize()); Rectangle imgRect = new Rectangle(0, 0, img.getWidth(), img.getHeight()); Rectangle viewRect = view.getViewport().getBounds(); JViewport port = view.getViewport(); int x = (int) port.getViewPosition().getX(); int y = (int) port.getViewPosition().getY(); int width = Math.min(x+viewRect.width, img.getWidth()); int height = Math.min(y+viewRect.height, img.getHeight()); if (imgRect.contains(viewRect)) { width = x+port.getWidth(); height = y+port.getHeight(); } ImagePaintingFactory.paintScaleBar(g2D, width-size-10, height-10, size, value); } } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0af43dc49a2e6662a80042d1022f4e7ae68cf56/BrowserCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserCanvas.java |
if (nodes == null) return; | void refreshDatasetInTree(DatasetSummary ds) { List nodes = (List) cDNodes.get(new Integer(ds.getID())); Iterator i = nodes.iterator(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode node, childNode; List images = agentCtrl.getImages(ds.getID()); while (i.hasNext()) { node = (DefaultMutableTreeNode) i.next(); node.removeAllChildren(); if (images.size() != 0) addImagesToDataset(images, node); else { childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8346dcfd4a71ead4cbd9bb453665f371260214ed/ExplorerPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java |
|
Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); | Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); | public static RubyObject each_object( Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObjectSpace.java/clean/org/jruby/RubyObjectSpace.java |
while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); | while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); | public static RubyObject each_object( Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObjectSpace.java/clean/org/jruby/RubyObjectSpace.java |
while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } } | while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } } | public static RubyObject each_object( Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length == 1) { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { if (obj.m_kind_of((RubyModule)args[0]).isTrue()) { ruby.yield(obj); } } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } else { Iterator iter = new LinkedList(ruby.objectSpace).iterator(); while (iter.hasNext()) { SoftReference ref = (SoftReference) iter.next(); RubyObject obj = (RubyObject) ref.get(); if (obj != null) { if (obj instanceof RubyModule && (((RubyModule) obj).isIncluded() || ((RubyModule) obj).isSingleton())) { continue; } else { ruby.yield(obj); } } else { ruby.objectSpace.remove(ref); } } return ruby.getNil(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyObjectSpace.java/clean/org/jruby/RubyObjectSpace.java |
return RubyArray.create(ruby, null, items); | return RubyArray.newArray(ruby, items); | public static RubyObject convertJavaToRuby(Ruby ruby, Object object) { if (object == null) { return ruby.getNil(); } Class javaClass = object.getClass(); if (javaClass.isPrimitive()) { String cName = javaClass.getName(); if (cName == "boolean") { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (cName == "float" || cName == "double") { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (cName == "char") { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else { // else it's one of the integral types return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } } else if (javaClass == Boolean.class) { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (javaClass == Float.class || javaClass == Double.class) { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (javaClass == Character.class) { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else if (Number.class.isAssignableFrom(javaClass)) { return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } else if (javaClass == String.class) { return RubyString.newString(ruby, object.toString()); } else if (javaClass.isArray()) { Class arrayClass = javaClass.getComponentType(); int len = Array.getLength(object); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, Array.get(object, i)); } return RubyArray.create(ruby, null, items); } else if (List.class.isAssignableFrom(javaClass)) { int len = ((List) object).size(); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, ((List) object).get(i)); } return RubyArray.create(ruby, null, items); } else if (Map.class.isAssignableFrom(javaClass)) { int len = ((Map) object).size(); RubyObject[] items = new RubyObject[len * 2]; Iterator iter = ((Map) object).entrySet().iterator(); for (int i = 0; i < len; i++) { Map.Entry entry = (Map.Entry) iter.next(); items[2 * i] = convertJavaToRuby(ruby, entry.getKey()); items[2 * i + 1] = convertJavaToRuby(ruby, entry.getValue()); } return RubyHash.create(ruby, null, items); } else { return new RubyJavaObject(ruby, (RubyClass)ruby.getJavaSupport().loadClass(javaClass, null), object); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a753ba8b7044ff0fda700232a1845d0df24f37b/JavaUtil.java/clean/org/jruby/javasupport/JavaUtil.java |
return RubyArray.create(ruby, null, items); | return RubyArray.newArray(ruby, items); | public static RubyObject convertJavaToRuby(Ruby ruby, Object object) { if (object == null) { return ruby.getNil(); } Class javaClass = object.getClass(); if (javaClass.isPrimitive()) { String cName = javaClass.getName(); if (cName == "boolean") { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (cName == "float" || cName == "double") { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (cName == "char") { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else { // else it's one of the integral types return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } } else if (javaClass == Boolean.class) { return RubyBoolean.newBoolean(ruby, ((Boolean) object).booleanValue()); } else if (javaClass == Float.class || javaClass == Double.class) { return RubyFloat.newFloat(ruby, ((Number) object).doubleValue()); } else if (javaClass == Character.class) { return RubyFixnum.newFixnum(ruby, ((Character) object).charValue()); } else if (Number.class.isAssignableFrom(javaClass)) { return RubyFixnum.newFixnum(ruby, ((Number) object).longValue()); } else if (javaClass == String.class) { return RubyString.newString(ruby, object.toString()); } else if (javaClass.isArray()) { Class arrayClass = javaClass.getComponentType(); int len = Array.getLength(object); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, Array.get(object, i)); } return RubyArray.create(ruby, null, items); } else if (List.class.isAssignableFrom(javaClass)) { int len = ((List) object).size(); RubyObject[] items = new RubyObject[len]; for (int i = 0; i < len; i++) { items[i] = convertJavaToRuby(ruby, ((List) object).get(i)); } return RubyArray.create(ruby, null, items); } else if (Map.class.isAssignableFrom(javaClass)) { int len = ((Map) object).size(); RubyObject[] items = new RubyObject[len * 2]; Iterator iter = ((Map) object).entrySet().iterator(); for (int i = 0; i < len; i++) { Map.Entry entry = (Map.Entry) iter.next(); items[2 * i] = convertJavaToRuby(ruby, entry.getKey()); items[2 * i + 1] = convertJavaToRuby(ruby, entry.getValue()); } return RubyHash.create(ruby, null, items); } else { return new RubyJavaObject(ruby, (RubyClass)ruby.getJavaSupport().loadClass(javaClass, null), object); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a753ba8b7044ff0fda700232a1845d0df24f37b/JavaUtil.java/clean/org/jruby/javasupport/JavaUtil.java |
return "SemanticTypeOutput"+(semanticTypeOutputId==null ? ":Hash"+this.hashCode() : ":"+semanticTypeOutputId); | return "SemanticTypeOutput"+(semanticTypeOutputId==null ? ":Hash_"+this.hashCode() : ":Id_"+semanticTypeOutputId); | public String toString(){ return "SemanticTypeOutput"+(semanticTypeOutputId==null ? ":Hash"+this.hashCode() : ":"+semanticTypeOutputId); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/SemanticTypeOutput.java/clean/components/common/src/ome/model/SemanticTypeOutput.java |
if ( from.getDetails().filteredSize() > 0 ) | if ( from.getDetails() != null && from.getDetails().filteredSize() > 0 ) | protected void propagateHiddenValues(IObject from, IObject to) { secSys.copyToken(from,to); if ( from.getDetails().filteredSize() > 0 ) { to.getDetails().addFiltered(from.getDetails().filteredSet()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/MergeEventListener.java/clean/components/server/src/ome/tools/hibernate/MergeEventListener.java |
if ( logger.isDebugEnabled() ) logger.debug( " Post-save cleanup. " ); | private void afterSave( Object argument, UpdateFilter filter) { // Save all that and go back to AUTO flush. getHibernateTemplate().flush(); // TODO performance? currentSession().setFlushMode(FlushMode.AUTO); // Let's save the event again using a temporary event. Event currentEvent = CurrentDetails.getCreationEvent(); EventType internal = (EventType) getHibernateTemplate().execute( new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Criteria c = session.createCriteria(EventType.class) .add( Restrictions.like( "value", "Internal" )); return c.uniqueResult(); } } ); CurrentDetails.newEvent( internal ); internalSave( currentEvent, filter ); // Checks. List logs = CurrentDetails.getCreationEvent().collectLogs( null ); if (logs.size() > 0) log.error("New logs created on update.afterSave:\n"+logs); // FIXME we shouldn't be updating experimenter etc. here. // Return the previous event. CurrentDetails.setCreationEvent( currentEvent ); // Clean up filter.unloadReplacedObjects(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5455b73a435a252c2c058cc4c625f039b667cd2f/UpdateImpl.java/clean/components/server/src/ome/logic/UpdateImpl.java |
|
if ( logger.isDebugEnabled() ) logger.debug( " Saving event before merge. " ); | private void beforeSave( Object argument, UpdateFilter filter ) { if ( argument == null ) throw new IllegalArgumentException( "Argument to save cannot be null."); // Save event before we enter. Event currentEvent = CurrentDetails.getCreationEvent(); Event mergedEvent = (Event) internalSave( currentEvent, filter );// FIXME ERROR HERE: // internalSave is replacing details of Event even though it should be// persistent. CurrentDetails.setCreationEvent( mergedEvent ); // Don't flush until we're done. currentSession().setFlushMode(FlushMode.COMMIT); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5455b73a435a252c2c058cc4c625f039b667cd2f/UpdateImpl.java/clean/components/server/src/ome/logic/UpdateImpl.java |
|
if ( logger.isDebugEnabled() ) logger.debug( " Internal save. " ); | private IObject internalSave (IObject obj, UpdateFilter filter ) { IObject result = (IObject) filter.filter(null,obj); return (IObject) getHibernateTemplate().merge(result); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5455b73a435a252c2c058cc4c625f039b667cd2f/UpdateImpl.java/clean/components/server/src/ome/logic/UpdateImpl.java |
|
f.p(value.getName().replace('$', '.')); f.p(".class"); } | f.t(owner.ref(value.getDeclaringClass())).p('.').p(value.name()); } | public void generate(JFormatter f) { f.p(value.getName().replace('$', '.')); f.p(".class"); } | 53231 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53231/b4e947c77517c73db921d02a7471df7db67e53da/JAnnotationArrayMember.java/clean/branches/lexi-19102006/codemodel/codemodel/src/main/java/com/sun/codemodel/JAnnotationArrayMember.java |
return PropertyOperator.setProperty(this,_bean,names,value); | return PropertyOperator.setProperty(this,_bean,names,value) || setTool(names, value); | final public boolean setProperty(final Object[] names, final Object value) throws PropertyException, ContextException { if (names.length == 0) { return false; } else if (_bean == null) { return setLocal(names, value) || setTool(names, value); } else { return PropertyOperator.setProperty(this,_bean,names,value); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/3141e834a766e01cfac3f247ab8837db8d52e153/Context.java/buggy/webmacro/src/org/webmacro/Context.java |
model.onDataObjectSave((List) pce.getNewValue()); | if (pce.getNewValue() != null) { Set set = (Set) pce.getNewValue(); List l = new ArrayList(set.size()); Iterator i = set.iterator(); while (i.hasNext()) l.add( i.next()); model.onDataObjectSave(l); } | public void propertyChange(PropertyChangeEvent pce) { String propName = pce.getPropertyName(); if (Browser.POPUP_POINT_PROPERTY.equals(propName)) { Browser browser = model.getBrowser(); if (browser == null) return; ImageDisplay d = browser.getLastSelectedDisplay(); Point p = browser.getPopupPoint(); if (d != null && p != null) view.showPopup(d, p); } else if (Browser.THUMB_SELECTED_PROPERTY.equals(propName)) { ImageNode d = (ImageNode) pce.getNewValue(); if (d != null) ThumbWinManager.display(d, model); } else if (Browser.SELECTED_DISPLAY_PROPERTY.equals(propName)) { TreeView treeView = model.getTreeView(); if (treeView == null) return; Browser browser = model.getBrowser(); if (browser == null) return; ImageDisplay d = browser.getLastSelectedDisplay(); treeView.accept(new SelectedNodeVisitor(treeView, d)); } else if (TreeView.TREE_POPUP_POINT_PROPERTY.equals(propName)) { TreeView treeView = model.getTreeView(); if (treeView == null) return; //tree shouldn't be null Point p = treeView.getPopupPoint(); if (p != null) view.showPopup(((JComponent) pce.getNewValue()), p); } else if (TreeView.CLOSE_PROPERTY.equals(propName)) { model.showTreeView(false); } else if (TreeView.TREE_SELECTED_DISPLAY_PROPERTY.equals(propName)) { TreeView treeView = model.getTreeView(); if (treeView == null) return; //tree shouldn't be null Browser browser = model.getBrowser(); ImageDisplay img = (ImageDisplay) pce.getNewValue(); if (img != null) { if (!(img.equals(browser.getLastSelectedDisplay()))) browser.setSelectedDisplay(img); } else browser.setSelectedDisplay(img); } else if (HiViewer.SCROLL_TO_NODE_PROPERTY.equals(propName)) { scrollToNode((ImageDisplay) pce.getNewValue()); } else if (Browser.ANNOTATED_NODE_PROPERTY.equals(propName)) { ImageDisplay n = (ImageDisplay) pce.getNewValue(); model.getClipBoard().setSelectedPane(ClipBoard.ANNOTATION_PANE, n); model.getBrowser().setSelectedDisplay(n); } else if (Browser.CLASSIFIED_NODE_PROPERTY.equals(propName)) { ImageDisplay n = (ImageDisplay) pce.getNewValue(); model.getClipBoard().setSelectedPane(ClipBoard.CLASSIFICATION_PANE, n); model.getBrowser().setSelectedDisplay(n); } else if (Browser.ROLL_OVER_PROPERTY.equals(propName)) { if (model.isRollOver()) { ImageDisplay n = (ImageDisplay) pce.getNewValue(); if (n instanceof ImageNode) ThumbWinManager.rollOverDisplay((ImageNode) n, model.getBrowser()); else ThumbWinManager.rollOverDisplay(null, model.getBrowser()); } } else if (TreeView.REMOVE_ROLL_OVER_PROPERTY.equals(propName) || ClipBoard.REMOVE_ROLL_OVER_PROPERTY.equals(propName)) { if (model.isRollOver()) { ThumbWinManager.rollOverDisplay(null, model.getBrowser()); } } else if (propName.equals(DataHandler.ANNOTATED_PROPERTY)) { if (view.getDataHandler() == null) return; model.onDataObjectSave((List) pce.getNewValue()); view.discardDataHandler(); } else if (propName.equals(DataHandler.CLASSIFIED_PROPERTY)) { if (view.getDataHandler() == null) return; model.onDataObjectSave((List) pce.getNewValue()); view.discardDataHandler(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8df0e21913b16d22e51803e352e307bb06fd0a0f/HiViewerControl.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerControl.java |
"cannot convert " + getMetaClass().getName() + " into " + targetType); | "can't convert " + trueFalseNil(getMetaClass().getName()) + " into " + trueFalseNil(targetType)); | public IRubyObject convertToType(String targetType, String convertMethod, boolean raise) { // No need to convert something already of the correct type. // XXXEnebo - Could this pass actual class reference instead of String? if (targetType.equals(getMetaClass().getName())) { return this; } if (!respondsTo(convertMethod)) { if (raise) { throw getRuntime().newTypeError( "cannot convert " + getMetaClass().getName() + " into " + targetType); // FIXME nil, true and false instead of NilClass, TrueClass, FalseClass; } return getRuntime().getNil(); } return callMethod(getRuntime().getCurrentContext(), convertMethod); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/418c30d7568bd7f3d82ef1d3a011ee39d958b8f6/RubyObject.java/clean/src/org/jruby/RubyObject.java |
public RubyClass newSubClass(String name, RubyModule parent) { return new HashMetaClass(name, this, parent); | public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { return new HashMetaClass(name, this, parentCRef); | public RubyClass newSubClass(String name, RubyModule parent) { return new HashMetaClass(name, this, parent); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/HashMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/HashMetaClass.java |
names.add(getRuntime().newString((String)iter.next())); | String name = (String) iter.next(); if (!Character.isUpperCase(name.charAt(0))) { names.add(getRuntime().newString(name)); } | public RubyArray instance_variables() { ArrayList names = new ArrayList(); for(Iterator iter = getInstanceVariablesSnapshot().keySet().iterator();iter.hasNext();) { names.add(getRuntime().newString((String)iter.next())); } return getRuntime().newArray(names); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7c963d58934e0c3fff5d96f4808e44c786fd3a2c/RubyObject.java/buggy/src/org/jruby/RubyObject.java |
LOGGER.debug("ProjectData.addClassData: " + classData.getName()); | public void addClassData(ClassData classData) { LOGGER.debug("ProjectData.addClassData: " + classData.getName()); String packageName = classData.getPackageName(); PackageData packageData = (PackageData)children.get(packageName); if (packageData == null) { packageData = new PackageData(packageName); // Each key is a package name, stored as an String object. // Each value is information about the package, stored as a PackageData object. this.children.put(packageName, packageData); } packageData.addClassData(classData); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/2d04adc2554406c41824d5b965907076ecdceb80/ProjectData.java/clean/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
|
this.classes.put(classData.getName(), classData); | public void addClassData(ClassData classData) { LOGGER.debug("ProjectData.addClassData: " + classData.getName()); String packageName = classData.getPackageName(); PackageData packageData = (PackageData)children.get(packageName); if (packageData == null) { packageData = new PackageData(packageName); // Each key is a package name, stored as an String object. // Each value is information about the package, stored as a PackageData object. this.children.put(packageName, packageData); } packageData.addClassData(classData); } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/2d04adc2554406c41824d5b965907076ecdceb80/ProjectData.java/clean/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
|
for (Iterator it = children.values().iterator(); it.hasNext(); ) { PackageData packageData = (PackageData) it.next(); ClassData classData = packageData.getClassData(name); if (classData != null) { return classData; } } return null; | return (ClassData)this.classes.get(name); | public ClassData getClassData(String name) { for (Iterator it = children.values().iterator(); it.hasNext(); ) { PackageData packageData = (PackageData) it.next(); ClassData classData = packageData.getClassData(name); if (classData != null) { return classData; } } return null; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/2d04adc2554406c41824d5b965907076ecdceb80/ProjectData.java/clean/cobertura/src/net/sourceforge/cobertura/coveragedata/ProjectData.java |
/* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameActivated(javax.swing.event.InternalFrameEvent) */ public void internalFrameActivated(InternalFrameEvent arg0) { env.getBrowserManager().setActiveBrowser(refCopy); } | public BrowserInternalFrame(BrowserController theController) { setSize(600,600); setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE); if(theController != null) { this.controller = theController; String title = controller.getName(); setTitle("Image Browser: "+title); this.embeddedView = controller.getView(); embeddedView.setZoomToScale(true); this.env = BrowserEnvironment.getInstance(); } setJMenuBar(new BrowserMenuBar(theController.getBrowserModel())); JPanel toolbarPanel = new JPanel(); toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); IconManager manager = env.getIconManager(); ZoomButtonPanel panel = new ZoomButtonPanel(embeddedView); toolbarPanel.add(panel); Container container = getContentPane(); container.setLayout(new BorderLayout()); final JScrollBar horizontalBar = new JScrollBar(JScrollBar.HORIZONTAL); final JScrollBar verticalBar = new JScrollBar(JScrollBar.VERTICAL); embeddedView.getViewCamera().addCameraListener(new CameraListener() { /* (non-Javadoc) * @see org.openmicroscopy.shoola.agents.browser.ui.CameraListener#cameraBoundsChanged(double, double, double, double, double, double) */ public void cameraBoundsChanged(double valueX, double valueY, double extentX, double extentY, double width, double height) { int iX = (int)Math.round(valueX); int iY = (int)Math.round(valueY); int iEX = (int)Math.round(extentX); int iEY = (int)Math.round(extentY); int iW = (int)Math.round(width); int iH = (int)Math.round(height); BoundedRangeModel horizModel = horizontalBar.getModel(); BoundedRangeModel vertModel = verticalBar.getModel(); if(iEX+iX > iW) horizontalBar.setEnabled(false); else { horizontalBar.setEnabled(true); if(iW != horizModel.getMaximum() || iEX != horizModel.getExtent()) { try { BoundedRangeModel hModel = new DefaultBoundedRangeModel(iX,iEX,0,iW); horizontalBar.setModel(hModel); } catch(IllegalArgumentException iae) { System.err.println("illegal width:["+iX+","+iEX+",0," +iW+"]"); iae.printStackTrace(); } } else { horizModel.setValue(iX); } } if(iEY+iY > iH) verticalBar.setEnabled(false); else { verticalBar.setEnabled(true); if(iH != vertModel.getMaximum() || iEY != vertModel.getExtent()) { try { BoundedRangeModel vModel = new DefaultBoundedRangeModel(iY,iEY,0,iH); verticalBar.setModel(vModel); } catch(IllegalArgumentException iae) { System.err.println("illegal height:["+iY+","+iEY+",0," +iH+"]"); iae.printStackTrace(); } } else { vertModel.setValue(iY); } } } }); horizontalBar.setEnabled(false); horizontalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); horizontalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setX(value); } }); verticalBar.setEnabled(false); verticalBar.setModel(new DefaultBoundedRangeModel(0,0,0,0)); verticalBar.addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { int value = e.getValue(); embeddedView.getViewCamera().setY(value); } }); JPanel fakeScrollPane = new JPanel(); JPanel verticalPanel = new JPanel(); verticalPanel.setLayout(new BorderLayout()); verticalPanel.add(embeddedView,BorderLayout.CENTER); verticalPanel.add(verticalBar,BorderLayout.EAST); JPanel horizontalPanel = new JPanel(); horizontalPanel.setLayout(new BorderLayout()); horizontalPanel.add(horizontalBar,BorderLayout.CENTER); horizontalPanel.add(Box.createHorizontalStrut(verticalBar.getPreferredSize().width), BorderLayout.EAST); verticalPanel.add(horizontalPanel,BorderLayout.SOUTH); fakeScrollPane.setLayout(new BorderLayout()); fakeScrollPane.add(verticalPanel,BorderLayout.CENTER); container.add(fakeScrollPane,BorderLayout.CENTER); container.add(toolbarPanel,BorderLayout.NORTH); if(controller.getStatusView() != null) { container.add(controller.getStatusView(),BorderLayout.SOUTH); } this.addFocusListener(new CommonFocusAdapter(this)); final UIWrapper refCopy = this; this.addInternalFrameListener(new InternalFrameAdapter() { /* (non-Javadoc) * @see javax.swing.event.InternalFrameAdapter#internalFrameClosing(javax.swing.event.InternalFrameEvent) */ public void internalFrameClosing(InternalFrameEvent arg0) { env.getBrowserManager().removeBrowser(refCopy); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e83036080b3a8ade884eca150f3f3c2004b556c9/BrowserInternalFrame.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserInternalFrame.java |
|
public ArgsNode(ISourcePosition position, int argsCount, ListNode optArgs, int restArg, BlockArgNode blockArgNode) { | public ArgsNode(ISourcePosition position, ListNode arguments, ListNode optionalArguments, int restArguments, BlockArgNode blockArgNode) { | public ArgsNode(ISourcePosition position, int argsCount, ListNode optArgs, int restArg, BlockArgNode blockArgNode) { super(position); this.argsCount = argsCount; this.optArgs = optArgs; this.restArg = restArg; this.blockArgNode = blockArgNode; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ArgsNode.java/clean/src/org/jruby/ast/ArgsNode.java |
this.argsCount = argsCount; this.optArgs = optArgs; this.restArg = restArg; | this.arguments = arguments; this.optArgs = optionalArguments; this.restArg = restArguments; | public ArgsNode(ISourcePosition position, int argsCount, ListNode optArgs, int restArg, BlockArgNode blockArgNode) { super(position); this.argsCount = argsCount; this.optArgs = optArgs; this.restArg = restArg; this.blockArgNode = blockArgNode; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ArgsNode.java/clean/src/org/jruby/ast/ArgsNode.java |
return Node.createList(optArgs, blockArgNode); | return Node.createList(arguments, optArgs, blockArgNode); | public List childNodes() { return Node.createList(optArgs, blockArgNode); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/ArgsNode.java/clean/src/org/jruby/ast/ArgsNode.java |
browserW = 7*(screenSize.width/10); | browserW = 8*(screenSize.width/10); System.out.println("browser: "+browserW); | private void setBrowserSize() { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); browserW = 7*(screenSize.width/10); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/065de4db36a699e3b3ab35f5d61441de670c7432/SquaryLayout.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/layout/SquaryLayout.java |
y += maxY; | if (maxY == 0) y += d.height; else y += maxY; | private void visitContainerNode(ImageSet node) { //Then figure out the number of columns, which is the same as the //number of rows. int n = node.getChildrenDisplay().size(); if (n == 0) { //node with no child node.getInternalDesktop().setPreferredSize( node.getTitleBar().getMinimumSize()); node.setVisible(true); return; } //Finally do layout. ImageDisplay[] children = LayoutUtils.sortChildrenByPrefWidth(node, false); Dimension d; int maxY = 0; int x = 0, y = 0; for (int i = 0; i < children.length; i++) { d = children[i].getPreferredSize(); children[i].setBounds(x, y, d.width, d.height); children[i].setVisible(true); children[i].setCollapsed(false); if (x+d.width <= browserW) { x += d.width; maxY = Math.max(maxY, d.height); } else { x = 0; y += maxY; maxY = 0; } } Rectangle bounds = node.getContentsBounds(); d = bounds.getSize(); node.getInternalDesktop().setPreferredSize(d); node.setCollapsed(false); node.setVisible(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/065de4db36a699e3b3ab35f5d61441de670c7432/SquaryLayout.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/layout/SquaryLayout.java |
String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); | Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); presence = roster.getPresence(bareJID); if (presence == null) { String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); } | public void initialize() { soundPreference = new SoundPreference(); SparkManager.getPreferenceManager().addPreference(soundPreference); SparkManager.getChatManager().addChatRoomListener(this); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence != null && presence.getType() == Presence.Type.unavailable) { SoundPreferences preferences = soundPreference.getPreferences(); if (preferences != null && preferences.isPlayOfflineSound()) { String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); } } } }, new PacketTypeFilter(Presence.class)); Thread thread = new Thread(new Runnable() { public void run() { soundPreference.loadFromFile(); } }); thread.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/caf8563cc06ab68f1c251d173654deb6b4b1a77c/SoundPlugin.java/clean/src/java/org/jivesoftware/sparkimpl/preference/sounds/SoundPlugin.java |
String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); | Roster roster = SparkManager.getConnection().getRoster(); final String bareJID = StringUtils.parseBareAddress(presence.getFrom()); presence = roster.getPresence(bareJID); if (presence == null) { String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); } | public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence != null && presence.getType() == Presence.Type.unavailable) { SoundPreferences preferences = soundPreference.getPreferences(); if (preferences != null && preferences.isPlayOfflineSound()) { String offline = preferences.getOfflineSound(); File offlineFile = new File(offline); SparkManager.getSoundManager().playClip(offlineFile); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/caf8563cc06ab68f1c251d173654deb6b4b1a77c/SoundPlugin.java/clean/src/java/org/jivesoftware/sparkimpl/preference/sounds/SoundPlugin.java |
reloadRoot = true; | void clearTree() { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.removeAllChildrenDisplay(); buildEmptyNode(root); dtm.reload(); collapsePath(root); if (!model.isMainTree()) loadGoIntoTree(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6158b89ffc0a0235798c87ed50465f985892ae5/BrowserUI.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java |
|
reloadRoot = true; | void selectFoundNode(TreeImageDisplay node) { TreePath path = new TreePath(node.getPath()); treeDisplay.setSelectionPath(path); TreeCellRenderer renderer = (TreeCellRenderer) treeDisplay.getCellRenderer(); treeDisplay.requestFocus(); renderer.getTreeCellRendererComponent(treeDisplay, node, treeDisplay.isPathSelected(path), false, true, 0, false); if (!model.isMainTree()) { loadGoIntoTree(); selectGoIntoTreeFoundNode(node); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6158b89ffc0a0235798c87ed50465f985892ae5/BrowserUI.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java |
|
reloadRoot = true; | void setSortedNodes(List nodes, TreeImageDisplay parentNode) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); parentNode.removeAllChildren(); Iterator i = nodes.iterator(); boolean b = (parentNode.equals(dtm.getRoot())); TreeImageDisplay child; while (i.hasNext()) { child = (TreeImageDisplay) i.next(); if (b) parentNode.addChildDisplay(child); dtm.insertNodeInto(child, parentNode, parentNode.getChildCount()); } dtm.reload(parentNode); expandNode(parentNode); if (!model.isMainTree()) { i = nodes.iterator(); List copies = new ArrayList(nodes.size()); while (i.hasNext()) { copies.add(((TreeImageDisplay) i.next()).copy()); } dtm = (DefaultTreeModel) goIntoTree.getModel(); DefaultMutableTreeNode r = (DefaultMutableTreeNode) dtm.getRoot(); TreeImageDisplay d = model.getLastSelectedDisplay(); r.removeAllChildren(); TreeImageDisplay copy = d.copy(); dtm.insertNodeInto(copy, r, r.getChildCount()); buildTreeNode(copy, copies, dtm); reloadRoot = true; dtm.reload(r); if (copy.isChildrenLoaded()) expandGoIntoTreeNode(copy); scrollPane.getViewport().removeAll(); scrollPane.getViewport().add(goIntoTree); repaint(); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6158b89ffc0a0235798c87ed50465f985892ae5/BrowserUI.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java |
|
reloadRoot = true; | void setViews(Set nodes, boolean reload) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); if (!reload) reload = reloadRoot; reloadRoot = true; } else buildEmptyNode(root); if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6158b89ffc0a0235798c87ed50465f985892ae5/BrowserUI.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java |
|
reloadRoot = true; | void setViews(Set nodes, boolean reload) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); TreeImageDisplay root = (TreeImageDisplay) dtm.getRoot(); root.removeAllChildren(); root.setChildrenLoaded(Boolean.TRUE); dtm.reload(); if (nodes.size() != 0) { Iterator i = nodes.iterator(); while (i.hasNext()) root.addChildDisplay((TreeImageDisplay) i.next()) ; buildTreeNode(root, sorter.sort(nodes), (DefaultTreeModel) treeDisplay.getModel()); if (!reload) reload = reloadRoot; reloadRoot = true; } else buildEmptyNode(root); if (reload) dtm.reload(root); if (!model.isMainTree()) loadGoIntoTree(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d6158b89ffc0a0235798c87ed50465f985892ae5/BrowserUI.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java |
|
if (((EvaluateMethod)method).getNode() instanceof AttrSetNode) { | if (((EvaluateMethod) method).getNode() instanceof AttrSetNode) { | public RubyFixnum arity() { if (method instanceof EvaluateMethod) { if (((EvaluateMethod)method).getNode() instanceof AttrSetNode) { return RubyFixnum.one(getRuby()); } else if (((EvaluateMethod)method).getNode() instanceof InstVarNode) { return RubyFixnum.zero(getRuby()); }/* } else if (method instanceof RubyMethod) { // FIXME INode body = bodyNode.getNextNode(); if (body instanceof BlockNode) { body = body.getHeadNode(); } if (body == null) { return RubyFixnum.zero(getRuby()); } int n = body.getCount(); if (body.getOptNode() != null || body.getRest() != -1) { n = -n-1; } return RubyFixnum.newFixnum(getRuby(), n); */ } return RubyFixnum.newFixnum(getRuby(), -1); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
} else if (((EvaluateMethod)method).getNode() instanceof InstVarNode) { | } else if (((EvaluateMethod) method).getNode() instanceof InstVarNode) { | public RubyFixnum arity() { if (method instanceof EvaluateMethod) { if (((EvaluateMethod)method).getNode() instanceof AttrSetNode) { return RubyFixnum.one(getRuby()); } else if (((EvaluateMethod)method).getNode() instanceof InstVarNode) { return RubyFixnum.zero(getRuby()); }/* } else if (method instanceof RubyMethod) { // FIXME INode body = bodyNode.getNextNode(); if (body instanceof BlockNode) { body = body.getHeadNode(); } if (body == null) { return RubyFixnum.zero(getRuby()); } int n = body.getCount(); if (body.getOptNode() != null || body.getRest() != -1) { n = -n-1; } return RubyFixnum.newFixnum(getRuby(), n); */ } return RubyFixnum.newFixnum(getRuby(), -1); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
/* } else if (method instanceof RubyMethod) { INode body = bodyNode.getNextNode(); if (body instanceof BlockNode) { body = body.getHeadNode(); } if (body == null) { return RubyFixnum.zero(getRuby()); } int n = body.getCount(); if (body.getOptNode() != null || body.getRest() != -1) { n = -n-1; } return RubyFixnum.newFixnum(getRuby(), n); */ | } else if (method instanceof DefaultMethod) { ArgsNode args = ((DefaultMethod) method).getArgsNode(); if (args == null) { return RubyFixnum.zero(getRuby()); } int n = args.getArgsCount(); if (args.getOptArgs() != null || args.getRestArg() >= 0) { n = -n - 1; } return RubyFixnum.newFixnum(getRuby(), n); } else if (method instanceof CallbackMethod) { return RubyFixnum.newFixnum(getRuby(), ((CallbackMethod) method).getCallback().getArity()); | public RubyFixnum arity() { if (method instanceof EvaluateMethod) { if (((EvaluateMethod)method).getNode() instanceof AttrSetNode) { return RubyFixnum.one(getRuby()); } else if (((EvaluateMethod)method).getNode() instanceof InstVarNode) { return RubyFixnum.zero(getRuby()); }/* } else if (method instanceof RubyMethod) { // FIXME INode body = bodyNode.getNextNode(); if (body instanceof BlockNode) { body = body.getHeadNode(); } if (body == null) { return RubyFixnum.zero(getRuby()); } int n = body.getCount(); if (body.getOptNode() != null || body.getRest() != -1) { n = -n-1; } return RubyFixnum.newFixnum(getRuby(), n); */ } return RubyFixnum.newFixnum(getRuby(), -1); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
public RubyFixnum arity() { if (method instanceof EvaluateMethod) { if (((EvaluateMethod)method).getNode() instanceof AttrSetNode) { return RubyFixnum.one(getRuby()); } else if (((EvaluateMethod)method).getNode() instanceof InstVarNode) { return RubyFixnum.zero(getRuby()); }/* } else if (method instanceof RubyMethod) { // FIXME INode body = bodyNode.getNextNode(); if (body instanceof BlockNode) { body = body.getHeadNode(); } if (body == null) { return RubyFixnum.zero(getRuby()); } int n = body.getCount(); if (body.getOptNode() != null || body.getRest() != -1) { n = -n-1; } return RubyFixnum.newFixnum(getRuby(), n); */ } return RubyFixnum.newFixnum(getRuby(), -1); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
||
getRuby().getIterStack().push( getRuby().isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); RubyObject result = getReceiverClass().call0( getReceiver(), getMethodId(), new RubyPointer(args), getMethod(), false); | getRuby().getIterStack().push(getRuby().isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); RubyObject result = getReceiverClass().call0(getReceiver(), getMethodId(), new RubyPointer(args), getMethod(), false); | public RubyObject call(RubyObject[] args) { getRuby().getIterStack().push( getRuby().isBlockGiven() ? Iter.ITER_PRE : Iter.ITER_NOT); RubyObject result = getReceiverClass().call0( getReceiver(), getMethodId(), new RubyPointer(args), getMethod(), false); getRuby().getIterStack().pop(); return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
Callback arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); Callback call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); | RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); | public static RubyClass createMethodClass(Ruby ruby) { Callback arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); Callback call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); | methodClass.defineMethod("arity", CallbackFactory.getMethod(RubyMethod.class, "arity")); methodClass.defineMethod("[]", CallbackFactory.getOptMethod(RubyMethod.class, "call")); methodClass.defineMethod("call", CallbackFactory.getOptMethod(RubyMethod.class, "call")); methodClass.defineMethod("to_proc", CallbackFactory.getMethod(RubyMethod.class, "to_proc")); | public static RubyClass createMethodClass(Ruby ruby) { Callback arity = new ReflectionCallbackMethod(RubyMethod.class, "arity"); Callback call = new ReflectionCallbackMethod(RubyMethod.class, "call", true); RubyClass methodClass = ruby.defineClass("Method", ruby.getClasses().getObjectClass()); methodClass.defineMethod("arity", arity); methodClass.defineMethod("[]", call); methodClass.defineMethod("call", call); return methodClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyMethod.java/clean/org/jruby/RubyMethod.java |
super(parameters); | super( defs, parameters ); | public CollectionCountQueryDefinition(QueryParameter...parameters) { super(parameters); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f990a7d35ce265e182121d562725175896db41f4/CollectionCountQueryDefinition.java/buggy/components/server/src/ome/services/query/CollectionCountQueryDefinition.java |
.showErrorMessage("Please select the group you wish add to user."); | .showErrorMessage("Please select the group you " + "wish add to user."); | public void addUser() { try { String selectedUser = view.getSelectedUser(); if (selectedUser == null) { view.showErrorMessage("Please select a user to add."); return; } if (!model.findUserByName(selectedUser)) { return; } String groupSelected = view.getSelectedGroup(); if (groupSelected == null) { view .showErrorMessage("Please select the group you wish add to user."); return; } if (!model.findGroupByName(groupSelected)) { return; } model.addGroupToUser(model.getCurrentGroupID()); view.setGroupDetails(model.getCurrentGroup()); // view.refresh(); view.refreshMembershipList(); } catch (Exception e) { handleException(e, "add user to a group"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e816110341e2f84a3681405f6c01dc8e685db8b4/GroupsTabController.java/clean/components/tools/admin/src/adminTool/groupPanel/GroupsTabController.java |
.showErrorMessage("Please select a group to remove from user."); | .showErrorMessage("Please select a group to remove " + "from user."); | public void removeUser() { try { String selectedUser = view.getSelectedMember(); if (selectedUser == null) { view.showErrorMessage("Please select a user to remove."); return; } if (!model.findUserByName(selectedUser)) { return; } String groupSelected = view.getSelectedGroup(); if (groupSelected == null) { view .showErrorMessage("Please select a group to remove from user."); return; } if (!model.findGroupByName(groupSelected)) { return; } model.removeGroupFromUser(model.getCurrentGroupID()); view.setGroupDetails(model.getCurrentGroup()); view.refreshMembershipList(); } catch (Exception e) { handleException(e, "save current group"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e816110341e2f84a3681405f6c01dc8e685db8b4/GroupsTabController.java/clean/components/tools/admin/src/adminTool/groupPanel/GroupsTabController.java |
} if(model.isDefaultGroup(model.getCurrentGroupID())) { view.showErrorMessage("Cannot remove user from group when it " + "is user\'s default group."); return; | public void removeUser() { try { String selectedUser = view.getSelectedMember(); if (selectedUser == null) { view.showErrorMessage("Please select a user to remove."); return; } if (!model.findUserByName(selectedUser)) { return; } String groupSelected = view.getSelectedGroup(); if (groupSelected == null) { view .showErrorMessage("Please select a group to remove from user."); return; } if (!model.findGroupByName(groupSelected)) { return; } model.removeGroupFromUser(model.getCurrentGroupID()); view.setGroupDetails(model.getCurrentGroup()); view.refreshMembershipList(); } catch (Exception e) { handleException(e, "save current group"); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e816110341e2f84a3681405f6c01dc8e685db8b4/GroupsTabController.java/clean/components/tools/admin/src/adminTool/groupPanel/GroupsTabController.java |
|
RubyClass fixnumClass = ruby.defineClass("Fixnum", (RubyClass)ruby.getRubyClass("Numeric")); | RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getIntegerClass()); | public static RubyClass createFixnum(Ruby ruby) { // HACK +++ // todo: change Numeric to Integer RubyClass fixnumClass = ruby.defineClass("Fixnum", (RubyClass)ruby.getRubyClass("Numeric")); // HACK --- fixnumClass.defineMethod("to_i", getMethodToI()); fixnumClass.defineMethod("to_s", getMethodToS()); fixnumClass.defineMethod("+", getMethodPlus()); fixnumClass.defineMethod("-", getMethodMinus()); fixnumClass.defineMethod("*", getMethodMul()); fixnumClass.defineMethod("/", getMethodDiv()); fixnumClass.defineMethod("%", getMethodMod()); fixnumClass.defineMethod("**", getMethodPow()); fixnumClass.defineMethod("==", getMethodEqual()); fixnumClass.defineMethod("<=>", getMethodCmp()); fixnumClass.defineMethod(">", getMethodGt()); fixnumClass.defineMethod(">=", getMethodGe()); fixnumClass.defineMethod("<", getMethodLt()); fixnumClass.defineMethod("<=", getMethodLe()); return fixnumClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f1e2c45b99e6f9a2be3f15f5fd7ad91c7e086a2c/RbFixnum.java/clean/org/jruby/core/RbFixnum.java |
BookmarkUI bookmarkUI = new BookmarkUI(); | final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); | public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } }; bookmarkThreadWorker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); | Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); | public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } }; bookmarkThreadWorker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); | public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } }; bookmarkThreadWorker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
|
Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); | final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); | public void initialize() { final SwingWorker bookmarkThreadWorker = new SwingWorker() { public Object construct() { // Register own provider for simpler implementation. PrivateDataManager.addPrivateDataProvider("storage", "storage:bookmarks", new Bookmarks.Provider()); PrivateDataManager manager = new PrivateDataManager(SparkManager.getConnection()); Bookmarks bookmarks = null; try { bookmarks = (Bookmarks)manager.getPrivateData("storage", "storage:bookmarks"); } catch (XMPPException e) { Log.error(e); } return bookmarks; } public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } }; bookmarkThreadWorker.start(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
BookmarkUI bookmarkUI = new BookmarkUI(); | final Iterator bookmarkLinks = bookmarkedLinks.iterator(); while (bookmarkLinks.hasNext()) { final BookmarkedURL link = (BookmarkedURL)bookmarkLinks.next(); | public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); | Action urlAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { try { BrowserLauncher.openURL(link.getURL()); } catch (IOException e) { Log.error(e); } } }; urlAction.putValue(Action.NAME, link.getName()); urlAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.LINK_16x16)); popup.add(urlAction); | public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); | public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
|
Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); | final Iterator bookmarkConferences = bookmarkedConferences.iterator(); while (bookmarkConferences.hasNext()) { final BookmarkedConference conferences = (BookmarkedConference)bookmarkConferences.next(); Action conferenceAction = new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(10); } catch (InterruptedException e1) { Log.error(e1); } return "ok"; } public void finished() { ConferenceUtils.autoJoinConferenceRoom(conferences.getName(), conferences.getJid(), conferences.getPassword()); } }; worker.start(); } }; conferenceAction.putValue(Action.NAME, conferences.getName()); conferenceAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.CONFERENCE_IMAGE_16x16)); popup.add(conferenceAction); | public void finished() { final Bookmarks bookmarks = (Bookmarks)get(); if (bookmarks != null) { Collection bookmarkedConferences = bookmarks.getBookmarkedConferences(); final Collection bookmarkedLinks = bookmarks.getBookmarkedURLS(); BookmarkUI bookmarkUI = new BookmarkUI(); Iterator links = bookmarkedLinks.iterator(); while (links.hasNext()) { final BookmarkedURL bookmarkedLink = (BookmarkedURL)links.next(); bookmarkUI.addURL(bookmarkedLink); } ContactList contactList = SparkManager.getWorkspace().getContactList(); contactList.getMainPanel().add(bookmarkUI); Iterator conferences = bookmarkedConferences.iterator(); while (conferences.hasNext()) { final BookmarkedConference bookmarkedConference = (BookmarkedConference)conferences.next(); bookmarkUI.addConference(bookmarkedConference); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/BookmarkPlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/bookmarks/BookmarkPlugin.java |
private void drawBorder(Graphics2D g) { Color borderColour; borderColour = gradientStartRGB.brighter(); // Set the colour of the top, left bevels to be a lighter colour // than the gradient at that same corner. g.setPaint(borderColour); // Draw the bevel, it is drawn as four line from: topleft to // topright, and topleft to bottom left. g.drawLine(0, 0, 0, (int) buttonRect.getHeight()); g.drawLine(0, 0, (int) buttonRect.getWidth(), 0); g.drawLine(1, 1, 1, (int) buttonRect.getHeight()-1); g.drawLine(1, 1, (int) buttonRect.getWidth()-1, 1); borderColour = gradientEndRGB.darker(); // Set the colour of the top, left bevels to be a lighter colour // than the gradient at that same corner. g.setPaint(borderColour); // Draw the bevel, it is drawn as four line from: bottomleft to // bottom right, and bottomright to top left. g.drawLine((int) buttonRect.getWidth()-1, 0, (int) buttonRect.getWidth()-1, (int) buttonRect.getHeight()-1); g.drawLine(0, (int) buttonRect.getHeight()-1, (int) buttonRect.getWidth()-1, (int) buttonRect.getHeight()-1); g.drawLine((int) buttonRect.getWidth()-2, 2, (int) buttonRect.getWidth()-2, (int) buttonRect.getHeight()-2); g.drawLine(1, (int) buttonRect.getHeight()-2, (int) buttonRect.getWidth()-1, (int) buttonRect.getHeight()-2); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
||
private void paintSquareButton(Graphics2D g) { // Calculate the colours to use to the extreme ends of the gradient. setGradientColours(); // If the button is selected draw selected button face. // Check to see if it's greyed out, if not draw border else // draw mask and draw the grey mask selected border. if (button.isSelected()) { drawSelectedButtonFace(g); if (!greyedOut) drawSelectedBorder(g); else { drawGreyMask(g); drawGreySelectedBorder(g); } } else { // If the button is not selected draw unselected button face. // Check to see if it's greyed out, if not draw border else // draw mask and draw the grey mask unselected border. drawButtonFace(g); if (!greyedOut) drawBorder(g); else { drawGreyMask(g); drawGreyBorder(g); } } // Draw text in centre of button. drawText(g); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
||
private void setGradientColours() { HSV col = new HSV(colour); // top gradient value from HSV model. float topGradientValue = col.getValue(); // bottom gradient value from HSV model. float bottomGradientValue = col.getValue(); // top and bottom gradient saturation from HSV model. float topGradientSaturation, bottomGradientSaturation; // if colour greyscale(achromatic) don't touch saturation if (col.getSaturation() == 0) { topGradientSaturation = bottomGradientSaturation = col.getSaturation(); // A check to see what gives greatest increase, +0.3 or *1.3 // and set topGradientValue to that. topGradientValue = col.getValue()+0.3f; if (col.getValue()*1.3f > topGradientValue) topGradientValue = col.getValue()*1.3f; if (topGradientValue>1) topGradientValue = 1; // Set bottomGradientValue to 75% of colour value. bottomGradientValue = col.getValue()*0.75f; } else { // We're in a colour space. // Increase topGradientValue to 1.5 * value of colour face. topGradientValue = col.getValue()*1.5f; if(topGradientValue>1) topGradientValue = 1; topGradientSaturation = col.getSaturation()*0.3f; bottomGradientSaturation = col.getSaturation(); } gradientStartHSV = new HSV(col.getHue(), topGradientSaturation, topGradientValue, 0.7f); gradientStartRGB = gradientStartHSV.toColorA(); gradientEndHSV = new HSV(col.getHue(), bottomGradientSaturation, bottomGradientValue, 0.7f); gradientEndRGB = gradientEndHSV.toColorA(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
||
if(topGradientValue>1) topGradientValue = 1; | if (topGradientValue>1) topGradientValue = 1; | private void setGradientColours() { HSV col = new HSV(colour); // top gradient value from HSV model. float topGradientValue = col.getValue(); // bottom gradient value from HSV model. float bottomGradientValue = col.getValue(); // top and bottom gradient saturation from HSV model. float topGradientSaturation, bottomGradientSaturation; // if colour greyscale(achromatic) don't touch saturation if (col.getSaturation() == 0) { topGradientSaturation = bottomGradientSaturation = col.getSaturation(); // A check to see what gives greatest increase, +0.3 or *1.3 // and set topGradientValue to that. topGradientValue = col.getValue()+0.3f; if (col.getValue()*1.3f > topGradientValue) topGradientValue = col.getValue()*1.3f; if (topGradientValue>1) topGradientValue = 1; // Set bottomGradientValue to 75% of colour value. bottomGradientValue = col.getValue()*0.75f; } else { // We're in a colour space. // Increase topGradientValue to 1.5 * value of colour face. topGradientValue = col.getValue()*1.5f; if(topGradientValue>1) topGradientValue = 1; topGradientSaturation = col.getSaturation()*0.3f; bottomGradientSaturation = col.getSaturation(); } gradientStartHSV = new HSV(col.getHue(), topGradientSaturation, topGradientValue, 0.7f); gradientStartRGB = gradientStartHSV.toColorA(); gradientEndHSV = new HSV(col.getHue(), bottomGradientSaturation, bottomGradientValue, 0.7f); gradientEndRGB = gradientEndHSV.toColorA(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
topGradientValue, 0.7f); | topGradientValue, 1.0f); | private void setGradientColours() { HSV col = new HSV(colour); // top gradient value from HSV model. float topGradientValue = col.getValue(); // bottom gradient value from HSV model. float bottomGradientValue = col.getValue(); // top and bottom gradient saturation from HSV model. float topGradientSaturation, bottomGradientSaturation; // if colour greyscale(achromatic) don't touch saturation if (col.getSaturation() == 0) { topGradientSaturation = bottomGradientSaturation = col.getSaturation(); // A check to see what gives greatest increase, +0.3 or *1.3 // and set topGradientValue to that. topGradientValue = col.getValue()+0.3f; if (col.getValue()*1.3f > topGradientValue) topGradientValue = col.getValue()*1.3f; if (topGradientValue>1) topGradientValue = 1; // Set bottomGradientValue to 75% of colour value. bottomGradientValue = col.getValue()*0.75f; } else { // We're in a colour space. // Increase topGradientValue to 1.5 * value of colour face. topGradientValue = col.getValue()*1.5f; if(topGradientValue>1) topGradientValue = 1; topGradientSaturation = col.getSaturation()*0.3f; bottomGradientSaturation = col.getSaturation(); } gradientStartHSV = new HSV(col.getHue(), topGradientSaturation, topGradientValue, 0.7f); gradientStartRGB = gradientStartHSV.toColorA(); gradientEndHSV = new HSV(col.getHue(), bottomGradientSaturation, bottomGradientValue, 0.7f); gradientEndRGB = gradientEndHSV.toColorA(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
bottomGradientSaturation, bottomGradientValue, 0.7f); | bottomGradientSaturation, bottomGradientValue, 1.0f); | private void setGradientColours() { HSV col = new HSV(colour); // top gradient value from HSV model. float topGradientValue = col.getValue(); // bottom gradient value from HSV model. float bottomGradientValue = col.getValue(); // top and bottom gradient saturation from HSV model. float topGradientSaturation, bottomGradientSaturation; // if colour greyscale(achromatic) don't touch saturation if (col.getSaturation() == 0) { topGradientSaturation = bottomGradientSaturation = col.getSaturation(); // A check to see what gives greatest increase, +0.3 or *1.3 // and set topGradientValue to that. topGradientValue = col.getValue()+0.3f; if (col.getValue()*1.3f > topGradientValue) topGradientValue = col.getValue()*1.3f; if (topGradientValue>1) topGradientValue = 1; // Set bottomGradientValue to 75% of colour value. bottomGradientValue = col.getValue()*0.75f; } else { // We're in a colour space. // Increase topGradientValue to 1.5 * value of colour face. topGradientValue = col.getValue()*1.5f; if(topGradientValue>1) topGradientValue = 1; topGradientSaturation = col.getSaturation()*0.3f; bottomGradientSaturation = col.getSaturation(); } gradientStartHSV = new HSV(col.getHue(), topGradientSaturation, topGradientValue, 0.7f); gradientStartRGB = gradientStartHSV.toColorA(); gradientEndHSV = new HSV(col.getHue(), bottomGradientSaturation, bottomGradientValue, 0.7f); gradientEndRGB = gradientEndHSV.toColorA(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/433c96375a2c22df2c564662eb3c018f9fd5a124/ColouredButtonUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/ColouredButtonUI.java |
public Node logop(/*node_type*/ int type, Node left, Node right) { | public Node logop(int type, Node left, Node right) { | public Node logop(/*node_type*/ int type, Node left, Node right) { value_expr(left); // return nf.newDefaultNode(type, cond1(left, 1), cond1(right, 1), null); throw new RuntimeException("[BUG] ParserHelper#logop: Nodetype=" + type); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9fd6d1b2b629d2c29cb2dc7346da08720e95598c/ParserHelper.java/buggy/org/jruby/parser/ParserHelper.java |
throw new RuntimeException("[BUG] ParserHelper#logop: Nodetype=" + type); | public Node logop(/*node_type*/ int type, Node left, Node right) { value_expr(left); // return nf.newDefaultNode(type, cond1(left, 1), cond1(right, 1), null); throw new RuntimeException("[BUG] ParserHelper#logop: Nodetype=" + type); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9fd6d1b2b629d2c29cb2dc7346da08720e95598c/ParserHelper.java/buggy/org/jruby/parser/ParserHelper.java |
|
if ( user == null ) { user = new Experimenter(); user.setOmeName(UUID.randomUUID().toString()); user.setFirstName("Get"); user.setLastName("Images"); user = iAdmin.createUser(user); } | public void test_createObjects() throws Exception { // Forcing setup once now. adaptSetUp(); // ~ ALL ROOT OBJECTS // ===================================================================== loginRoot(); Project p1 = createProject(); Dataset d1 = createDataset(); Dataset d2 = createDataset(); Image i_d1 = createImage(); Image i_d2 = createImage(); p1.linkDataset( d1 ); p1.linkDataset( d2 ); d1.linkImage( i_d1 ); d2.linkImage( i_d2 ); rootOnlyMap.put(p1,i_d1); rootOnlyMap.put(d1,i_d1); rootOnlyMap.put(p1,i_d2); rootOnlyMap.put(d2,i_d2); CategoryGroup cg1 = createCategoryGroup(); Category c1 = createCategory(); Category c2 = createCategory(); Image i_c1 = createImage(); Image i_c2 = createImage(); cg1.linkCategory(c1); cg1.linkCategory(c2); c1.linkImage(i_c1); c2.linkImage(i_c2); rootOnlyMap.put(cg1,i_c1); rootOnlyMap.put(c1,i_c1); rootOnlyMap.put(cg1,i_c2); rootOnlyMap.put(c2,i_c2); // Saving the newly created links. iUpdate.saveArray(new IObject[]{p1,d1,d2,i_d1,i_d2,cg1,c1,c2,i_c1,i_c2}); // ~ USER FILTER // ===================================================================== // TODO submit bug. leaving out the e of "Experimenter e" throws a // null pointer exception in org.hibernate.hql.ast.* user = (Experimenter) iQuery.findByQuery( "select e from Experimenter e " + "where e.id != 0", new Parameters( new Filter().unique().page(0,1))); userPO = new PojoOptions().exp( user.getId() ); filterForUser = new Parameters().addOptions( userPO.map() ); noFilter = new Parameters().addOptions( null ); // ~ MIXED ROOT/USER ITEMS // ===================================================================== loginRoot(); Project p1_root = createProject(); Dataset d1_root = createDataset(); Dataset d2_root = createDataset(); Image i_d1_root = createImage(); Image i_d2_root = createImage(); p1_root.linkDataset( d1_root ); p1_root.linkDataset( d2_root ); d1_root.linkImage( i_d1_root ); d2_root.linkImage( i_d2_root ); rootProjectMap.put(p1_root,i_d1_root); rootProjectMap.put(d1_root,i_d1_root); rootProjectMap.put(p1_root,i_d2_root); rootProjectMap.put(d2_root,i_d2_root); loginUser(user.getOmeName()); Image i_d1_user = createImage(); Image i_d2_user = createImage(); p1_root.linkDataset( d1_root ); p1_root.linkDataset( d2_root ); d1_root.linkImage( i_d1_user ); d2_root.linkImage( i_d2_user ); userImageRootProjectMap.put(p1_root,i_d1_user); userImageRootProjectMap.put(d1_root,i_d1_user); userImageRootProjectMap.put(p1_root,i_d2_user); userImageRootProjectMap.put(d2_root,i_d2_user); Project p11_user = createProject(); Dataset d11_user = createDataset(); Dataset d22_user = createDataset(); Image i_d11_user = createImage(); Image i_d22_user = createImage(); p11_user.linkDataset( d11_user ); p11_user.linkDataset( d22_user ); d11_user.linkImage( i_d11_user ); d22_user.linkImage( i_d22_user ); userProjectMap.put(p11_user,i_d11_user); userProjectMap.put(d11_user,i_d11_user); userProjectMap.put(p11_user,i_d22_user); userProjectMap.put(d22_user,i_d22_user); // TODO not working.// setUser( user, // i_d1_user,i_d2_user,// p11_user,d11_user,d22_user,i_d11_user,i_d22_user); // omitting CGC for now since this is only testing "enableFilters" loginRoot(); // Saving the newly created links. iUpdate.saveArray( new IObject[]{ p1_root,d1_root,d2_root,i_d1_root,i_d2_root, i_d1_user,i_d2_user, p11_user,d11_user,d22_user,i_d11_user,i_d22_user}); adaptTearDown(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/975967c2ebf5a196f315cce5d47f2ae779d574fc/GetImagesQueryTest.java/clean/components/server/test/ome/server/itests/query/GetImagesQueryTest.java |
|
controller.getAction(ClassifierControl.FINISH).setEnabled(false); | public void finish() { if (model.getState() != READY) throw new IllegalStateException("This method can only be " + "invoked in the READY state."); Set categories = view.getSelectedPaths(); if (categories == null) { UserNotifier un = ClassifierFactory.getRegistry().getUserNotifier(); un.notifyInfo("Categorisation", "No category selected."); return; } view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); model.fireClassificationsSaving(categories); fireStateChange(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9794ffbd035a4de717ee211573b4844dd0eb3371/ClassifierComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/util/classifier/view/ClassifierComponent.java |
|
FindRegExAnnotationVisitor(HiViewer viewer, String regEx) | FindRegExAnnotationVisitor(HiViewer viewer, Pattern pattern) | FindRegExAnnotationVisitor(HiViewer viewer, String regEx) { super(viewer, regEx); colors = Colors.getInstance(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExAnnotationVisitor.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExAnnotationVisitor.java |
super(viewer, regEx); | super(viewer, pattern); | FindRegExAnnotationVisitor(HiViewer viewer, String regEx) { super(viewer, regEx); colors = Colors.getInstance(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExAnnotationVisitor.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExAnnotationVisitor.java |
public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { | public ReflectionCallback(Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { | public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { super(type, methodName, argumentTypes, isRestArgs, isStaticMethod, arity); if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { this.method = type.getMethod(methodName, argumentTypes); } catch (NoSuchMethodException e) { throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } catch (SecurityException e) { throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java |
if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { | if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { | public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { super(type, methodName, argumentTypes, isRestArgs, isStaticMethod, arity); if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { this.method = type.getMethod(methodName, argumentTypes); } catch (NoSuchMethodException e) { throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } catch (SecurityException e) { throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java |
throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); | throw new RuntimeException("NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); | public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { super(type, methodName, argumentTypes, isRestArgs, isStaticMethod, arity); if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { this.method = type.getMethod(methodName, argumentTypes); } catch (NoSuchMethodException e) { throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } catch (SecurityException e) { throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java |
throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); | throw new RuntimeException("SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); | public ReflectionCallback( Class type, String methodName, Class[] argumentTypes, boolean isRestArgs, boolean isStaticMethod, Arity arity) { super(type, methodName, argumentTypes, isRestArgs, isStaticMethod, arity); if (isStaticMethod) { Class[] types = new Class[argumentTypes.length + 1]; System.arraycopy(argumentTypes, 0, types, 1, argumentTypes.length); types[0] = IRubyObject.class; argumentTypes = types; } try { this.method = type.getMethod(methodName, argumentTypes); } catch (NoSuchMethodException e) { throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } catch (SecurityException e) { throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + type.getName() + "\" by Reflection."); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java |
throws IllegalAccessException, InvocationTargetException { if (isStaticMethod) { Object[] args = new Object[methodArgs.length + 1]; System.arraycopy(methodArgs, 0, args, 1, methodArgs.length); args[0] = recv; recv = null; methodArgs = args; } return (IRubyObject) method.invoke(recv, methodArgs); } | throws IllegalAccessException, InvocationTargetException { if (isStaticMethod) { Object[] args = new Object[methodArgs.length + 1]; System.arraycopy(methodArgs, 0, args, 1, methodArgs.length); args[0] = recv; recv = null; methodArgs = args; } return (IRubyObject) method.invoke(recv, methodArgs); } | protected IRubyObject invokeMethod0(IRubyObject recv, Object[] methodArgs) throws IllegalAccessException, InvocationTargetException { if (isStaticMethod) { Object[] args = new Object[methodArgs.length + 1]; System.arraycopy(methodArgs, 0, args, 1, methodArgs.length); args[0] = recv; recv = null; methodArgs = args; } return (IRubyObject) method.invoke(recv, methodArgs); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/765ab8f2eeed4e7c0c131b35b7ecadb0ee2855fd/ReflectionCallback.java/buggy/src/org/jruby/runtime/callback/ReflectionCallback.java |
int size = RubyFixnum.fix2int(getInstanceVariable(getRubyClass(), "__size___")); | int size = RubyFixnum.fix2int(getInstanceVariable(getRubyClass(), "__size__")); | public RubyObject initialize(RubyObject[] args) { modify(); int size = RubyFixnum.fix2int(getInstanceVariable(getRubyClass(), "__size___")); if (args.length > size) { throw new ArgumentError(ruby, "struct size differs"); } for (int i = 0; i < args.length; i++) { values[i] = args[i]; } for (int i = args.length; i < size; i++) { values[i] = ruby.getNil(); } return ruby.getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a3a14c0a68f0036a9a25b161b3023eb829eeac7b/RubyStruct.java/clean/org/jruby/RubyStruct.java |
newStruct.defineMethod(args[i].toId(), CallbackFactory.getMethod(RubyStruct.class, "get", RubyObject.class)); | newStruct.defineMethod(args[i].toId(), CallbackFactory.getMethod(RubyStruct.class, "get")); | public static RubyClass newInstance(Ruby ruby, RubyObject recv, RubyObject[] args) { String name = null; if (args.length > 0 && args[0] instanceof RubyString) { name = args[0].toString(); } RubyArray member = RubyArray.newArray(ruby); for (int i = name == null ? 0 : 1; i < args.length; i++) { member.push(RubySymbol.newSymbol(ruby, args[i].toId())); } RubyClass newStruct; if (name == null) { newStruct = RubyClass.newClass(ruby, (RubyClass) recv); } else { if (!IdUtil.isConstant(name)) { throw new NameError(ruby, "identifier " + name + " needs to be constant"); } newStruct = ((RubyClass) recv).defineClassUnder(name, ((RubyClass) recv)); } newStruct.setInstanceVar("__size__", member.length()); newStruct.setInstanceVar("__member__", member); newStruct.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyStruct.class, "newStruct")); newStruct.defineSingletonMethod("[]", CallbackFactory.getOptSingletonMethod(RubyStruct.class, "newStruct")); newStruct.defineSingletonMethod("members", CallbackFactory.getSingletonMethod(RubyStruct.class, "members")); // define access methods. for (int i = name == null ? 0 : 1; i < args.length; i++) { newStruct.defineMethod(args[i].toId(), CallbackFactory.getMethod(RubyStruct.class, "get", RubyObject.class)); newStruct.defineMethod(args[i].toId() + "=", CallbackFactory.getMethod(RubyStruct.class, "set", RubyObject.class)); } return newStruct; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a3a14c0a68f0036a9a25b161b3023eb829eeac7b/RubyStruct.java/clean/org/jruby/RubyStruct.java |
int size = RubyFixnum.fix2int(getInstanceVariable((RubyClass) recv, "__size___")); | int size = RubyFixnum.fix2int(getInstanceVariable((RubyClass) recv, "__size__")); | public static RubyStruct newStruct(Ruby ruby, RubyObject recv, RubyObject[] args) { RubyStruct struct = new RubyStruct(ruby, (RubyClass) recv); int size = RubyFixnum.fix2int(getInstanceVariable((RubyClass) recv, "__size___")); struct.values = new RubyObject[size]; struct.callInit(args); return struct; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a3a14c0a68f0036a9a25b161b3023eb829eeac7b/RubyStruct.java/clean/org/jruby/RubyStruct.java |
if (name.endsWith("=")) { name = name.substring(0, name.length() - 1); } | public RubyObject set(RubyObject value) { String name = ruby.getActFrame().getLastFunc(); RubyArray member = (RubyArray) getInstanceVariable(classOf(), "__member__"); if (member.isNil()) { throw new RubyBugException("uninitialized struct"); } modify(); for (int i = 0; i < member.getLength(); i++) { if (member.entry(i).toId().equals(name)) { return values[i] = value; } } throw new NameError(ruby, name + " is not struct member"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a3a14c0a68f0036a9a25b161b3023eb829eeac7b/RubyStruct.java/clean/org/jruby/RubyStruct.java |
|
System.setProperty("org.webmacro.LogLevel", "DEBUG"); | public TestIf (String name) { super (name); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2a732af6347caef331bbf5ad7353790dce990292/TestIf.java/clean/webmacro/test/unit/org/webmacro/template/TestIf.java |
|
for (int j=0; j<arg.subordinateArgs; j++) { ArgDescriptor child = args[arg.children[j]]; if (lookahead_keyword(args[child.children[0]].keyword)) parse_arg_group(descriptor, args, arg.children[j], da); | for (boolean more=true; more; ) { for (int j=0; j<arg.subordinateArgs; j++) { more = false; ArgDescriptor child = args[arg.children[j]]; if (lookahead_keyword(args[child.children[0]].keyword)) { parse_arg_group(descriptor, args, arg.children[j], da); more = true; break; } } | void parse_args(DirectiveDescriptor descriptor, ArgDescriptor[] args, DirectiveArgs da) throws ParseException { try { for (int i=0; i < args.length; ) { ArgDescriptor arg = args[i]; if (arg.type == Directive.ArgType_GROUP) parse_arg_group(descriptor, args, i, da); else if (arg.type == Directive.ArgType_CHOICE) { for (int j=0; j<arg.subordinateArgs; j++) { // Each child is a GROUP, so we want to look at child's first child ArgDescriptor child = args[arg.children[j]]; if (lookahead_keyword(args[child.children[0]].keyword)) parse_arg_group(descriptor, args, arg.children[j], da); } } else { Object o = parse_arg(descriptor, arg); da.setArg(arg.id, o); } i = arg.nextArg; } } catch (BuildException e) { throw new ParseException("BuildException", e); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/872f3324da5d0c1edb1a058e60a31f1288863768/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java |
QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE, new File[] { new File("src/test")}); | String basedir = System.getProperties().getProperty("basedir", "."); QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE, new File[] { new File(basedir, "/src/test")}); | public void testQdox() throws Exception{ QdoxMappingLoader mappingLoader = new QdoxMappingLoader(DEFAULT_NAMESPACE, new File[] { new File("src/test")}); Set namespaces = mappingLoader.loadNamespaces(); validateModel(namespaces); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/c06ecd608700a5a1d16363b667e5a08286b3438a/ModelTest.java/clean/spring/src/test/org/xbean/spring/generator/ModelTest.java |
popupTrigger = false; | BrowserControl(BrowserModel model, RootDisplay view) { if (model == null) throw new NullPointerException("No model."); if (view == null) throw new NullPointerException("No view."); this.model = model; this.view = view; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba643a543a290e184174463508394d02f40a6f27/BrowserControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/browser/BrowserControl.java |
|
if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); | if (me.isPopupTrigger()) popupTrigger = true; | public void mousePressed(MouseEvent me) { ImageDisplay d = findParentDisplay(me.getSource()); d.moveToFront(); model.setSelectedDisplay(d); view.setTitle(model.currentPathString()); if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba643a543a290e184174463508394d02f40a6f27/BrowserControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/browser/BrowserControl.java |
if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); | if (popupTrigger || me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); | public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); else { Object src = me.getSource(); ImageDisplay d = findParentDisplay(src); if (d instanceof ImageNode && !(d.getTitleBar() == src)) model.setThumbSelected(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba643a543a290e184174463508394d02f40a6f27/BrowserControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/browser/BrowserControl.java |
model.setThumbSelected(true); | model.setThumbSelected(true); | public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); else { Object src = me.getSource(); ImageDisplay d = findParentDisplay(src); if (d instanceof ImageNode && !(d.getTitleBar() == src)) model.setThumbSelected(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba643a543a290e184174463508394d02f40a6f27/BrowserControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/browser/BrowserControl.java |
popupTrigger = false; | public void mouseReleased(MouseEvent me) { if (me.isPopupTrigger()) model.setPopupPoint(me.getPoint()); else { Object src = me.getSource(); ImageDisplay d = findParentDisplay(src); if (d instanceof ImageNode && !(d.getTitleBar() == src)) model.setThumbSelected(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ba643a543a290e184174463508394d02f40a6f27/BrowserControl.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/browser/BrowserControl.java |
|
newData(); _currentData.setType (WikiDataTypes.INDENT); _currentData.setData (""+many); | if (!_list) { newData(); _currentData.setType (WikiDataTypes.INDENT); _currentData.setData (""+many); } | public void indent(int many) { newData(); _currentData.setType (WikiDataTypes.INDENT); _currentData.setData (""+many); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2e6a5e583cccdc19c543caf9a1fb259181c98cb6/DefaultPageBuilder.java/buggy/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
if (_list) { newData(); _currentData.setType(WikiDataTypes.END_LIST); _list = false; } | public void paragraph() { finishFormatting (); newData (); _currentData.setType (WikiDataTypes.PARAGRAPH_BREAK); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2e6a5e583cccdc19c543caf9a1fb259181c98cb6/DefaultPageBuilder.java/buggy/wiki/src/org/tcdi/opensource/wiki/builder/DefaultPageBuilder.java |
|
readline.setUsePagination(true); | public static void createReadline(IRuby runtime) throws IOException { readline = new ConsoleReader(); readline.setUseHistory(false); ((CandidateListCompletionHandler) readline.getCompletionHandler()).setAlwaysIncludeNewline(false); currentCompletor = new RubyFileNameCompletor(); readline.addCompletor(currentCompletor); RubyModule mReadline = runtime.defineModule("Readline"); CallbackFactory readlinecb = runtime.callbackFactory(Readline.class); mReadline.defineMethod("readline",readlinecb.getSingletonMethod("s_readline",IRubyObject.class,IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("readline")}); mReadline.defineMethod("completion_append_character=",readlinecb.getSingletonMethod("s_set_completion_append_character",IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("completion_append_character=")}); mReadline.defineMethod("completion_proc=",readlinecb.getSingletonMethod("s_set_completion_proc",IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("completion_proc=")}); IRubyObject hist = runtime.getObject().callMethod("new"); mReadline.setConstant("HISTORY",hist); hist.defineSingletonMethod("push",readlinecb.getSingletonMethod("s_push",IRubyObject.class)); hist.defineSingletonMethod("pop",readlinecb.getSingletonMethod("s_pop")); hist.defineSingletonMethod("to_a",readlinecb.getSingletonMethod("s_hist_to_a")); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/93b4832244b3a18f15b406720fe8e901ecb92553/Readline.java/buggy/src/org/jruby/ext/Readline.java |
|
if(line.isNil()) { return recv.getRuntime().newString(""); } | public static IRubyObject s_readline(IRubyObject recv, IRubyObject prompt, IRubyObject add_to_hist) throws IOException { IRubyObject line = recv.getRuntime().getNil(); String v = readline.readLine(prompt.toString()); if(null != v) { if (add_to_hist.isTrue()) readline.getHistory().addToHistory(v); line = recv.getRuntime().newString(v); } if(line.isNil()) { return recv.getRuntime().newString(""); } return line; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/93b4832244b3a18f15b406720fe8e901ecb92553/Readline.java/buggy/src/org/jruby/ext/Readline.java |
|
public Collection getLines(String methodNameAndDescriptor) | public SortedSet getLines() | public Collection getLines(String methodNameAndDescriptor) { Collection lines = new HashSet(); Iterator iter = children.values().iterator(); while (iter.hasNext()) { LineData next = (LineData)iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { lines.add(next); } } return lines; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/7f42310aa94d3450acefa63804376619941a31c5/ClassData.java/buggy/cobertura/src/net/sourceforge/cobertura/coveragedata/ClassData.java |
Collection lines = new HashSet(); Iterator iter = children.values().iterator(); while (iter.hasNext()) { LineData next = (LineData)iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { lines.add(next); } } return lines; | return new TreeSet(this.children.values()); | public Collection getLines(String methodNameAndDescriptor) { Collection lines = new HashSet(); Iterator iter = children.values().iterator(); while (iter.hasNext()) { LineData next = (LineData)iter.next(); if (methodNameAndDescriptor.equals(next.getMethodName() + next.getMethodDescriptor())) { lines.add(next); } } return lines; } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/7f42310aa94d3450acefa63804376619941a31c5/ClassData.java/buggy/cobertura/src/net/sourceforge/cobertura/coveragedata/ClassData.java |
Copyright.print(System.out); | Header.print(System.out); | void coverage(String[] filenames) { if (filenames.length == 0) { return; } for (int i = 0; i < filenames.length; i++) { getProject().log("Adding " + filenames[i] + " to list", Project.MSG_VERBOSE); addArg(filenames[i]); } saveArgs(); Copyright.print(System.out); System.out.println("instrumenting " + filenames.length + " " + (filenames.length == 1 ? "class" : "classes") + (toDir != null ? " to " + toDir : "")); /** * TODO: Do something here so that we can set System.in and System.out on * getJava() to the one we're using now. So that when instrumentation calls * System.out, it will show up as "[instrument] doing stuff" instead of * "[java] doing stuff" in the ant output. */ if (getJava().executeJava() != 0) { throw new BuildException(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/0e9968867b8060fdd72b4fc9c248fcbdc4e96330/InstrumentTask.java/buggy/cobertura/src/net/sourceforge/cobertura/ant/InstrumentTask.java |
Callback atan2 = new ReflectionCallbackMethod(RubyMath.class, "atan2", new Class[] { RubyNumeric.class, RubyNumeric.class }); Callback cos = new ReflectionCallbackMethod(RubyMath.class, "cos", RubyNumeric.class); Callback exp = new ReflectionCallbackMethod(RubyMath.class, "exp", RubyNumeric.class); Callback frexp = new ReflectionCallbackMethod(RubyMath.class, "frexp", RubyNumeric.class); Callback ldexp = new ReflectionCallbackMethod(RubyMath.class, "ldexp", new Class[] { RubyFloat.class, RubyInteger.class }); Callback log = new ReflectionCallbackMethod(RubyMath.class, "log", RubyNumeric.class); Callback log10 = new ReflectionCallbackMethod(RubyMath.class, "log10", RubyNumeric.class); Callback sin = new ReflectionCallbackMethod(RubyMath.class, "sin", RubyNumeric.class); Callback sqrt = new ReflectionCallbackMethod(RubyMath.class, "sqrt", RubyNumeric.class); Callback tan = new ReflectionCallbackMethod(RubyMath.class, "tan", RubyNumeric.class); | public static RubyModule createMathModule(Ruby ruby) { Callback atan2 = new ReflectionCallbackMethod(RubyMath.class, "atan2", new Class[] { RubyNumeric.class, RubyNumeric.class }); Callback cos = new ReflectionCallbackMethod(RubyMath.class, "cos", RubyNumeric.class); Callback exp = new ReflectionCallbackMethod(RubyMath.class, "exp", RubyNumeric.class); Callback frexp = new ReflectionCallbackMethod(RubyMath.class, "frexp", RubyNumeric.class); Callback ldexp = new ReflectionCallbackMethod(RubyMath.class, "ldexp", new Class[] { RubyFloat.class, RubyInteger.class }); Callback log = new ReflectionCallbackMethod(RubyMath.class, "log", RubyNumeric.class); Callback log10 = new ReflectionCallbackMethod(RubyMath.class, "log10", RubyNumeric.class); Callback sin = new ReflectionCallbackMethod(RubyMath.class, "sin", RubyNumeric.class); Callback sqrt = new ReflectionCallbackMethod(RubyMath.class, "sqrt", RubyNumeric.class); Callback tan = new ReflectionCallbackMethod(RubyMath.class, "tan", RubyNumeric.class); RubyModule mathModule = ruby.defineModule("Math"); mathModule.defineConstant("E", RubyFloat.newFloat(ruby, Math.E)); mathModule.defineConstant("PI", RubyFloat.newFloat(ruby, Math.PI)); mathModule.defineSingletonMethod("atan2", atan2); mathModule.defineSingletonMethod("cos", cos); mathModule.defineSingletonMethod("exp", exp);// mathModule.defineSingletonMethod("frexp", frexp); mathModule.defineSingletonMethod("ldexp", ldexp); mathModule.defineSingletonMethod("log", log); mathModule.defineSingletonMethod("log10", log10); mathModule.defineSingletonMethod("sin", sin); mathModule.defineSingletonMethod("sqrt", sqrt); mathModule.defineSingletonMethod("tan", tan); return mathModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/RubyMath.java/buggy/org/jruby/RubyMath.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.