rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
private void showPopupMenu() { model.removeAllElements(); String typedItem = textField.getText(); final List<ContactItem> validItems = new ArrayList<ContactItem>(); for (ContactItem contactItem : items) { String nickname = contactItem.getNickname().toLowerCase(); if (nickname.startsWith(typedItem.toLowerCase())) { validItems.add(contactItem); } } if (validItems.size() > 0) { for (final ContactItem label : validItems) { model.addElement(label); } } if (validItems.size() != 0 && !popup.isVisible()) { popup.pack(); popup.setSize(textField.getWidth(), 200); Point pt = textField.getLocationOnScreen(); pt.translate(0, textField.getHeight()); popup.setLocation(pt); popup.toFront(); popup.setVisible(true); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/451ca5454333fabb40923ca0b6a307994410412c/JContactItemField.java/buggy/src/java/org/jivesoftware/spark/component/JContactItemField.java
model.fireHierarchyLoading();
model.fireHierarchyLoading(false);
public void activate(Rectangle bounds) { switch (model.getState()) { case NEW: model.fireHierarchyLoading(); view.setComponentBounds(bounds); fireStateChange(); break; case DISCARDED: throw new IllegalStateException( "This method can't be invoked in the DISCARDED state."); default: view.deIconify(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
model.fireHierarchyLoading(true); fireStateChange();
public void refresh() { }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
public void setHierarchyRoots(Set roots, boolean flat)
public void setHierarchyRoots(Set roots, boolean flat, boolean refresh)
public void setHierarchyRoots(Set roots, boolean flat) { if (model.getState() != LOADING_HIERARCHY) throw new IllegalStateException( "This method can only be invoked in the LOADING_HIERARCHY "+ "state."); model.createBrowser(roots, flat); model.createClipBoard(); model.getClipBoard().addPropertyChangeListener(controller); model.fireThumbnailLoading(); //b/c fireThumbnailLoading() sets the state to READY if there is no //image. if (model.getBrowser().getImages().size() == 0) setStatus("Done", -1); else setStatus(HiViewer.PAINTING_TEXT, -1); fireStateChange(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
model.createBrowser(roots, flat); model.createClipBoard(); model.getClipBoard().addPropertyChangeListener(controller); model.fireThumbnailLoading(); if (model.getBrowser().getImages().size() == 0) setStatus("Done", -1); else setStatus(HiViewer.PAINTING_TEXT, -1); fireStateChange();
if (!refresh) { model.createBrowser(roots, flat); model.createClipBoard(); model.getClipBoard().addPropertyChangeListener(controller); model.fireThumbnailLoading(); if (model.getBrowser().getImages().size() == 0) setStatus("Done", -1); else setStatus(HiViewer.PAINTING_TEXT, -1); fireStateChange(); } else { Browser browser = model.getBrowser(); boolean isClipBoardDisplay = model.getClipBoard().isDisplay(); if (browser == null) throw new NullPointerException("The browser cannot be NULL."); view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); model.refreshBrowser(roots, flat); model.createClipBoard(); model.getClipBoard().addPropertyChangeListener(controller); model.fireThumbnailLoading(); if (model.getBrowser().getImages().size() == 0) setStatus("Done", -1); else setStatus(HiViewer.PAINTING_TEXT, -1); fireStateChange(); if (model.getTreeView() != null) { model.createTreeView(); view.showTreeView(true); } view.showClipBoard(isClipBoardDisplay); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
public void setHierarchyRoots(Set roots, boolean flat) { if (model.getState() != LOADING_HIERARCHY) throw new IllegalStateException( "This method can only be invoked in the LOADING_HIERARCHY "+ "state."); model.createBrowser(roots, flat); model.createClipBoard(); model.getClipBoard().addPropertyChangeListener(controller); model.fireThumbnailLoading(); //b/c fireThumbnailLoading() sets the state to READY if there is no //image. if (model.getBrowser().getImages().size() == 0) setStatus("Done", -1); else setStatus(HiViewer.PAINTING_TEXT, -1); fireStateChange(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
Criteria c = session.createCriteria((Class)value(QP.CLASS)); c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
Criteria c = session.createCriteria( klass ); c.setResultTransformer( Criteria.DISTINCT_ROOT_ENTITY );
protected Object runQuery(Session session) throws HibernateException, SQLException { PojoOptions po = new PojoOptions((Map) value(QP.OPTIONS)); Criteria c = session.createCriteria((Class)value(QP.CLASS)); c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); // optional ids Collection ids = (Collection) value(QP.IDS); if ( ids != null && ids.size() > 0) c.add(Restrictions.in("id",(Collection) value(QP.IDS))); int depth = po.isLeaves() ? Integer.MAX_VALUE : 1; Hierarchy.fetchChildren(c,Project.class,depth); return c.list(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/558b759fdbe86923aa020ec590baa2098634fea8/PojosLoadHierarchyQueryDefinition.java/clean/components/server/src/ome/services/query/PojosLoadHierarchyQueryDefinition.java
Hierarchy.fetchChildren(c,Project.class,depth);
Hierarchy.fetchChildren(c,klass,depth);
protected Object runQuery(Session session) throws HibernateException, SQLException { PojoOptions po = new PojoOptions((Map) value(QP.OPTIONS)); Criteria c = session.createCriteria((Class)value(QP.CLASS)); c.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); // optional ids Collection ids = (Collection) value(QP.IDS); if ( ids != null && ids.size() > 0) c.add(Restrictions.in("id",(Collection) value(QP.IDS))); int depth = po.isLeaves() ? Integer.MAX_VALUE : 1; Hierarchy.fetchChildren(c,Project.class,depth); return c.list(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/558b759fdbe86923aa020ec590baa2098634fea8/PojosLoadHierarchyQueryDefinition.java/clean/components/server/src/ome/services/query/PojosLoadHierarchyQueryDefinition.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG>3)
public void actionPerformed(ActionEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse single click"); if (cachedEvent != null) doMouseClicked(cachedEvent); cachedEvent = null; timer.stop(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
public void cancelModuleLinks() { if (ChainBuilderAgent.DEBUG) { System.err.println("cancelling module links..."); System.err.println("selected module is..."+selectedModule); } Iterator iter = links.iterator(); while (iter.hasNext()) { ParamLink link = (ParamLink) iter.next(); link.remove(); } if (ChainBuilderAgent.DEBUG) System.err.println("cancelling modules links. link state is NOT_LINKING"); linkState = NOT_LINKING; cleanUpModuleLink(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void cancelModuleLinks() { if (ChainBuilderAgent.DEBUG) { System.err.println("cancelling module links..."); System.err.println("selected module is..."+selectedModule); } Iterator iter = links.iterator(); while (iter.hasNext()) { ParamLink link = (ParamLink) iter.next(); link.remove(); } if (ChainBuilderAgent.DEBUG) System.err.println("cancelling modules links. link state is NOT_LINKING"); linkState = NOT_LINKING; cleanUpModuleLink(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void cancelModuleTargetLink() { moduleLink.remove(); moduleLink =null; cleanUpModuleTargetLink(); if (ChainBuilderAgent.DEBUG) System.err.println("cancel up module target link NOT_LINKING"); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void cancelParamLink() { if (ChainBuilderAgent.DEBUG) System.err.println("canceling link"); if (link != null) link.remove(); link =null; cleanUParamLink(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3 ) {
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3 ) {
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3 )
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void doMouseClicked(PInputEvent e) { if (postLinkCompletion == true) return; // we only scale if we're not drawing a link. if (ChainBuilderAgent.DEBUG) { System.err.println("mouse clicked.."+e); System.err.println("link state is "+linkState); } if (linkState != NOT_LINKING) { if (linkState == LINKING_CANCELLATION) { if (ChainBuilderAgent.DEBUG) System.err.println("cancelled link. set to not linking"); linkState = NOT_LINKING; } if (ChainBuilderAgent.DEBUG) System.err.println("linking..."); e.setHandled(true); return; } if (postPopup == true) { if (ChainBuilderAgent.DEBUG) System.err.println("post popup"); postPopup = false; e.setHandled(true); return; } PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse clicked on .."+node); int mask = e.getModifiers() & allButtonMask; // if it's a buffered object that is not a chain. if (node instanceof BufferedObject && !(node instanceof ChainView)) { BufferedObject mod = (BufferedObject) node; PCamera camera = canvas.getCamera(); if (mask == MouseEvent.BUTTON1_MASK && e.getClickCount()==1) { if (ChainBuilderAgent.DEBUG) { System.err.println("zooming in on node..."+node); System.err.println("camera view scale was "+camera.getViewScale()); } PBounds b = mod.getBufferedBounds(); PActivity activity = camera.animateViewToCenterBounds(b,true, Constants.ANIMATION_DELAY); activity.setDelegate(new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }); } else if (e.isControlDown() || (mask & MouseEvent.BUTTON3_MASK)==1) { if (ChainBuilderAgent.DEBUG) System.err.println("canvas right click.."); evaluatePopup(e); } } // otherwise, must be a camera, or a chain. either way, zoom in/out //if (! (node instanceof PCamera)) // return; else if (e.isShiftDown()) { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed with shhift.."); PBounds b = canvas.getBufferedBounds(); canvas.getCamera().animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); setModulesDisplayMode(); e.setHandled(true); } else { if (ChainBuilderAgent.DEBUG) System.err.println("zoomed witout shift..."); double scaleFactor = Constants.SCALE_FACTOR; if (e.isControlDown() || ((mask & MouseEvent.BUTTON3_MASK)==1)) { //System.err.println("but wit control..."); scaleFactor = 1/scaleFactor; } zoom(scaleFactor,e); e.setHandled(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void doMouseDoubleClicked(PInputEvent e) { PNode node = e.getPickedNode(); if (ChainBuilderAgent.DEBUG) System.err.println("got a double click on "+node); if (node instanceof ModuleView){ selectedModule = (ModuleView) node; // only start links if it's linkable if (selectedModule.isLinkable()) startModuleLinks(e); } else if (node instanceof FormalParameter) { selectedModule = ((FormalParameter) node).getModuleView(); if (selectedModule.isLinkable()) startModuleLinks(e); } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void evaluatePopup(PInputEvent e) { postPopup=true; PNode n = e.getPickedNode(); PNode p = n.getParent(); if (ChainBuilderAgent.DEBUG) System.err.println("popup. zooming out of "+n); if (n instanceof BufferedObject && (p == canvas.getLayer() || p instanceof ChainView)) { // if I'm on a module that's not in a chain or not. // I should zoom to view of whole canvas PBounds b = canvas.getBufferedBounds(); PCamera camera =canvas.getCamera(); if (ChainBuilderAgent.DEBUG) System.err.println("zooming to canvas bounds.."); PActivity act = camera.animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); PActivityDelegate delegate = new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }; act.setDelegate(delegate); } else { double scaleFactor = 1/Constants.SCALE_FACTOR; zoom(scaleFactor,e); } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void evaluatePopup(PInputEvent e) { postPopup=true; PNode n = e.getPickedNode(); PNode p = n.getParent(); if (ChainBuilderAgent.DEBUG) System.err.println("popup. zooming out of "+n); if (n instanceof BufferedObject && (p == canvas.getLayer() || p instanceof ChainView)) { // if I'm on a module that's not in a chain or not. // I should zoom to view of whole canvas PBounds b = canvas.getBufferedBounds(); PCamera camera =canvas.getCamera(); if (ChainBuilderAgent.DEBUG) System.err.println("zooming to canvas bounds.."); PActivity act = camera.animateViewToCenterBounds(b,true,Constants.ANIMATION_DELAY); PActivityDelegate delegate = new PActivityDelegate() { public void activityStarted(PActivity activity) { } public void activityStepped(PActivity activity) { } public void activityFinished(PActivity activity) { setModulesDisplayMode(); } }; act.setDelegate(delegate); } else { double scaleFactor = 1/Constants.SCALE_FACTOR; zoom(scaleFactor,e); } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void finishModuleLinks(ModuleView mod) { Collection c; // if I started as inputs, get outputs of this node. if (moduleLinksStartedAsInputs == true) c = mod.getOutputParameters(); else c = mod.getInputParameters(); finishModuleLinks(c); links = new Vector(); if (ChainBuilderAgent.DEBUG) System.err.println("finish module links. state is not_linking"); mod.setAllHighlights(false); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void finishModuleTargetLink(ModuleLinkTarget n) { //first, if input and output are the same, barf. if (n.getModuleView() == moduleLinkOriginTarget.getModuleView()) { showSelfLinkError(); cancelModuleTargetLink(); return; } else if (n.isInputLinkTarget() && moduleLinkOriginTarget.isInputLinkTarget()) { canvas.setStatusLabel(NO_INPUT_INPUT_LINKS); cancelModuleTargetLink(); return; } else if (n.isOutputLinkTarget() && moduleLinkOriginTarget.isOutputLinkTarget()) { canvas.setStatusLabel(NO_OUTPUT_OUTPUT_LINKS); cancelModuleTargetLink(); return; } else if (linkLayer. findModuleLink(n.getModuleView(), moduleLinkOriginTarget.getModuleView()) != null) { canvas.setStatusLabel(NO_MULTIPLE_MODULE_LINKS); cancelModuleTargetLink(); return; } if (ChainBuilderAgent.DEBUG) System.err.println("finishing module target link"); // ok. now, create links and make sure we have no cycles. // get inputs & get outputs Collection params1 = moduleLinkOriginTarget.getParameters(); Collection params2 = n.getParameters(); // set other end point of link. moduleLink.setTarget(n); if (finishModuleTargetLink(params1,params2) == false) { showNoLegalLinksBetwenModulesError(); cancelModuleTargetLink(); return; } if (foundCycle() == true) { canvas.setStatusLabel(NO_CYCLES); cancelModuleTargetLink(); } else { moduleLink.setPickable(true); cleanUpModuleTargetLink(); } moduleLinkOriginTarget = null; if (ChainBuilderAgent.DEBUG) System.err.println("ending finsihModuleTargetLink ModuleLinkTarget. NOT_LINKING"); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void finishModuleTargetLink(ModuleLinkTarget n) { //first, if input and output are the same, barf. if (n.getModuleView() == moduleLinkOriginTarget.getModuleView()) { showSelfLinkError(); cancelModuleTargetLink(); return; } else if (n.isInputLinkTarget() && moduleLinkOriginTarget.isInputLinkTarget()) { canvas.setStatusLabel(NO_INPUT_INPUT_LINKS); cancelModuleTargetLink(); return; } else if (n.isOutputLinkTarget() && moduleLinkOriginTarget.isOutputLinkTarget()) { canvas.setStatusLabel(NO_OUTPUT_OUTPUT_LINKS); cancelModuleTargetLink(); return; } else if (linkLayer. findModuleLink(n.getModuleView(), moduleLinkOriginTarget.getModuleView()) != null) { canvas.setStatusLabel(NO_MULTIPLE_MODULE_LINKS); cancelModuleTargetLink(); return; } if (ChainBuilderAgent.DEBUG) System.err.println("finishing module target link"); // ok. now, create links and make sure we have no cycles. // get inputs & get outputs Collection params1 = moduleLinkOriginTarget.getParameters(); Collection params2 = n.getParameters(); // set other end point of link. moduleLink.setTarget(n); if (finishModuleTargetLink(params1,params2) == false) { showNoLegalLinksBetwenModulesError(); cancelModuleTargetLink(); return; } if (foundCycle() == true) { canvas.setStatusLabel(NO_CYCLES); cancelModuleTargetLink(); } else { moduleLink.setPickable(true); cleanUpModuleTargetLink(); } moduleLinkOriginTarget = null; if (ChainBuilderAgent.DEBUG) System.err.println("ending finsihModuleTargetLink ModuleLinkTarget. NOT_LINKING"); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void finishParamLink() { if (lastParameterEntered.getModuleView() == linkOrigin.getModuleView()) { showSelfLinkError(); cancelParamLink(); } else if (lastParameterEntered.getClass() == linkOrigin.getClass()) { showParameterInputOutputConflictError(linkOrigin); cancelParamLink(); } else if (lastParameterEntered.isLinkable() == true) { if (linkOrigin.sameTypeAs(lastParameterEntered) ==false) { showParamterTypeMisMatchError(); cancelParamLink(); } else { if (ChainBuilderAgent.DEBUG) System.err.println("finishing link"); link.setEndParam(lastParameterEntered); if (foundCycle() ==false) { link.setPickable(true); // add the {@link ModuleViewLink} between the modules linkLayer.completeLink(link); cleanUParamLink(); } else { canvas.setStatusLabel(NO_CYCLES); cancelParamLink(); } } } else { canvas.setStatusLabel(MULT_LINKS); cancelParamLink(); } if (ChainBuilderAgent.DEBUG) System.err.println("finishParamLink. state is NOT_LINKING"); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void finishParamLink() { if (lastParameterEntered.getModuleView() == linkOrigin.getModuleView()) { showSelfLinkError(); cancelParamLink(); } else if (lastParameterEntered.getClass() == linkOrigin.getClass()) { showParameterInputOutputConflictError(linkOrigin); cancelParamLink(); } else if (lastParameterEntered.isLinkable() == true) { if (linkOrigin.sameTypeAs(lastParameterEntered) ==false) { showParamterTypeMisMatchError(); cancelParamLink(); } else { if (ChainBuilderAgent.DEBUG) System.err.println("finishing link"); link.setEndParam(lastParameterEntered); if (foundCycle() ==false) { link.setPickable(true); // add the {@link ModuleViewLink} between the modules linkLayer.completeLink(link); cleanUParamLink(); } else { canvas.setStatusLabel(NO_CYCLES); cancelParamLink(); } } } else { canvas.setStatusLabel(MULT_LINKS); cancelParamLink(); } if (ChainBuilderAgent.DEBUG) System.err.println("finishParamLink. state is NOT_LINKING"); linkState = NOT_LINKING; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void keyPressed(PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("a key was pressed "); int key = e.getKeyCode(); if (key != KeyEvent.VK_DELETE && key != KeyEvent.VK_BACK_SPACE) return; if (selectedLink != null) { selectedLink.remove(); selectedLink = null; } else if (selectedModule != null) { selectedModule.remove(); selectedModule = null; } canvas.updateSaveStatus(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mouseClicked(PInputEvent e) { if (timer.isRunning()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse double click"); // this is effectively a double click. timer.stop(); if (wasDoubleClick == true) wasDoubleClick = false; else doMouseDoubleClicked(e); } else { timer.restart(); if (ChainBuilderAgent.DEBUG) System.err.println("caching click event .."+e); cachedEvent = e; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3 )
public void mouseClicked(PInputEvent e) { if (timer.isRunning()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse double click"); // this is effectively a double click. timer.stop(); if (wasDoubleClick == true) wasDoubleClick = false; else doMouseDoubleClicked(e); } else { timer.restart(); if (ChainBuilderAgent.DEBUG) System.err.println("caching click event .."+e); cachedEvent = e; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG>3)
public void mouseEntered(PInputEvent e) { PNode node = e.getPickedNode(); if (node instanceof FormalParameter) { lastParameterEntered = (FormalParameter) node; if (ChainBuilderAgent.DEBUG) System.err.println("mouse entered last entered.."+node); if (linkState == NOT_LINKING) { // turn on params for this parameter lastParameterEntered.setParamsHighlighted(true); // set all modules of this same type to be highlighted. ModuleView mod = lastParameterEntered.getModuleView(); mod.setModulesHighlighted(true); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget && linkState == NOT_LINKING) { ((ModuleLinkTarget) node).setParametersHighlighted(true); e.setHandled(true); } else if (node instanceof SingleModuleView && linkState == NOT_LINKING) { SingleModuleView mod = (SingleModuleView) node; mod.setAllHighlights(true); e.setHandled(true); } else if (node instanceof PCamera && lastParameterEntered != null) { lastParameterEntered.setParamsHighlighted(false); ModuleView mod = lastParameterEntered.getModuleView(); mod.setAllHighlights(false); } else super.mouseEntered(e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG>3)
public void mouseExited(PInputEvent e) { PNode node = e.getPickedNode(); lastParameterEntered = null; if (ChainBuilderAgent.DEBUG) System.err.println("last parameter entered cleared"); if (node instanceof FormalParameter) { FormalParameter param = (FormalParameter) node; if (linkState == NOT_LINKING) { param.setParamsHighlighted(false); ModuleView mod = param.getModuleView(); mod.setAllHighlights(false); } e.setHandled(true); } else if (node instanceof ModuleLinkTarget) { ((ModuleLinkTarget) node).setParametersHighlighted(false); e.setHandled(true); } else if (node instanceof SingleModuleView) { SingleModuleView mod = (SingleModuleView) node; mod.setAllHighlights(false); e.setHandled(true); } else super.mouseExited(e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG>3)
public void mouseMoved(PInputEvent e) { Point2D pos = e.getPosition(); if (linkState == LINKING_PARAMS) { link.setEndCoords((float) pos.getX(),(float) pos.getY()); } else if (linkState == LINKING_MODULES) { Iterator iter = links.iterator(); ParamLink lnk; while (iter.hasNext()) { lnk = (ParamLink) iter.next(); lnk.setEndCoords((float) pos.getX(),(float) pos.getY()); } } else if (linkState == LINKING_MODULE_TARGETS) { if (ChainBuilderAgent.DEBUG) System.err.println("setting end of module link.."); moduleLink.setEndCoords((float) pos.getX(),(float) pos.getY()); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mousePressed(PInputEvent e) { postLinkCompletion = false; if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on "+e.getPickedNode()); if (wasDoubleClick == true) { if (ChainBuilderAgent.DEBUG) System.err.println("just came from double click.."); wasDoubleClick = false; return; } if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed.."); evaluatePopup(e); return; } super.mousePressed(e); PNode node = e.getPickedNode(); // clear off what was selected. if (selectedLink != null && linkState != LINK_CHANGING_POINT) { if (ChainBuilderAgent.DEBUG) System.err.println("setting selected link to not be selected, in mousePressed"); selectedLink.setSelected(false); selectedLink = null; } if (selectedModule != null && linkState != LINKING_MODULES) { selectedModule.removeHandles(); selectedModule = null; } if (selectionTarget != null) { selectionTarget.getLink().setSelected(false); selectionTarget = null; } //first do things based on types of nodes // then do based on state if (node instanceof LinkSelectionTarget) mousePressedSelectionTarget(node); else if (node instanceof Link) mousePressedLink(node); else if (node instanceof ModuleView) mousePressedModule(node); if (linkState == LINKING_PARAMS) mousePressedLinkingParams(node,e); else if (linkState == LINKING_MODULES) mousePressedLinkingModules(node,e); else if (linkState == NOT_LINKING) mousePressedNotLinking(node,e); else if (linkState == LINK_CHANGING_POINT) mousePressedChangingPoint(node,e); else if (linkState == LINKING_MODULE_TARGETS) mousePressedLinkingModuleTargets(node,e); else { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed..setting link state to not linking.."); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mousePressed(PInputEvent e) { postLinkCompletion = false; if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on "+e.getPickedNode()); if (wasDoubleClick == true) { if (ChainBuilderAgent.DEBUG) System.err.println("just came from double click.."); wasDoubleClick = false; return; } if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed.."); evaluatePopup(e); return; } super.mousePressed(e); PNode node = e.getPickedNode(); // clear off what was selected. if (selectedLink != null && linkState != LINK_CHANGING_POINT) { if (ChainBuilderAgent.DEBUG) System.err.println("setting selected link to not be selected, in mousePressed"); selectedLink.setSelected(false); selectedLink = null; } if (selectedModule != null && linkState != LINKING_MODULES) { selectedModule.removeHandles(); selectedModule = null; } if (selectionTarget != null) { selectionTarget.getLink().setSelected(false); selectionTarget = null; } //first do things based on types of nodes // then do based on state if (node instanceof LinkSelectionTarget) mousePressedSelectionTarget(node); else if (node instanceof Link) mousePressedLink(node); else if (node instanceof ModuleView) mousePressedModule(node); if (linkState == LINKING_PARAMS) mousePressedLinkingParams(node,e); else if (linkState == LINKING_MODULES) mousePressedLinkingModules(node,e); else if (linkState == NOT_LINKING) mousePressedNotLinking(node,e); else if (linkState == LINK_CHANGING_POINT) mousePressedChangingPoint(node,e); else if (linkState == LINKING_MODULE_TARGETS) mousePressedLinkingModuleTargets(node,e); else { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed..setting link state to not linking.."); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mousePressed(PInputEvent e) { postLinkCompletion = false; if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on "+e.getPickedNode()); if (wasDoubleClick == true) { if (ChainBuilderAgent.DEBUG) System.err.println("just came from double click.."); wasDoubleClick = false; return; } if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed.."); evaluatePopup(e); return; } super.mousePressed(e); PNode node = e.getPickedNode(); // clear off what was selected. if (selectedLink != null && linkState != LINK_CHANGING_POINT) { if (ChainBuilderAgent.DEBUG) System.err.println("setting selected link to not be selected, in mousePressed"); selectedLink.setSelected(false); selectedLink = null; } if (selectedModule != null && linkState != LINKING_MODULES) { selectedModule.removeHandles(); selectedModule = null; } if (selectionTarget != null) { selectionTarget.getLink().setSelected(false); selectionTarget = null; } //first do things based on types of nodes // then do based on state if (node instanceof LinkSelectionTarget) mousePressedSelectionTarget(node); else if (node instanceof Link) mousePressedLink(node); else if (node instanceof ModuleView) mousePressedModule(node); if (linkState == LINKING_PARAMS) mousePressedLinkingParams(node,e); else if (linkState == LINKING_MODULES) mousePressedLinkingModules(node,e); else if (linkState == NOT_LINKING) mousePressedNotLinking(node,e); else if (linkState == LINK_CHANGING_POINT) mousePressedChangingPoint(node,e); else if (linkState == LINKING_MODULE_TARGETS) mousePressedLinkingModuleTargets(node,e); else { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed..setting link state to not linking.."); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mousePressed(PInputEvent e) { postLinkCompletion = false; if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on "+e.getPickedNode()); if (wasDoubleClick == true) { if (ChainBuilderAgent.DEBUG) System.err.println("just came from double click.."); wasDoubleClick = false; return; } if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed.."); evaluatePopup(e); return; } super.mousePressed(e); PNode node = e.getPickedNode(); // clear off what was selected. if (selectedLink != null && linkState != LINK_CHANGING_POINT) { if (ChainBuilderAgent.DEBUG) System.err.println("setting selected link to not be selected, in mousePressed"); selectedLink.setSelected(false); selectedLink = null; } if (selectedModule != null && linkState != LINKING_MODULES) { selectedModule.removeHandles(); selectedModule = null; } if (selectionTarget != null) { selectionTarget.getLink().setSelected(false); selectionTarget = null; } //first do things based on types of nodes // then do based on state if (node instanceof LinkSelectionTarget) mousePressedSelectionTarget(node); else if (node instanceof Link) mousePressedLink(node); else if (node instanceof ModuleView) mousePressedModule(node); if (linkState == LINKING_PARAMS) mousePressedLinkingParams(node,e); else if (linkState == LINKING_MODULES) mousePressedLinkingModules(node,e); else if (linkState == NOT_LINKING) mousePressedNotLinking(node,e); else if (linkState == LINK_CHANGING_POINT) mousePressedChangingPoint(node,e); else if (linkState == LINKING_MODULE_TARGETS) mousePressedLinkingModuleTargets(node,e); else { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed..setting link state to not linking.."); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
public void mousePressed(PInputEvent e) { postLinkCompletion = false; if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on "+e.getPickedNode()); if (wasDoubleClick == true) { if (ChainBuilderAgent.DEBUG) System.err.println("just came from double click.."); wasDoubleClick = false; return; } if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed.."); evaluatePopup(e); return; } super.mousePressed(e); PNode node = e.getPickedNode(); // clear off what was selected. if (selectedLink != null && linkState != LINK_CHANGING_POINT) { if (ChainBuilderAgent.DEBUG) System.err.println("setting selected link to not be selected, in mousePressed"); selectedLink.setSelected(false); selectedLink = null; } if (selectedModule != null && linkState != LINKING_MODULES) { selectedModule.removeHandles(); selectedModule = null; } if (selectionTarget != null) { selectionTarget.getLink().setSelected(false); selectionTarget = null; } //first do things based on types of nodes // then do based on state if (node instanceof LinkSelectionTarget) mousePressedSelectionTarget(node); else if (node instanceof Link) mousePressedLink(node); else if (node instanceof ModuleView) mousePressedModule(node); if (linkState == LINKING_PARAMS) mousePressedLinkingParams(node,e); else if (linkState == LINKING_MODULES) mousePressedLinkingModules(node,e); else if (linkState == NOT_LINKING) mousePressedNotLinking(node,e); else if (linkState == LINK_CHANGING_POINT) mousePressedChangingPoint(node,e); else if (linkState == LINKING_MODULE_TARGETS) mousePressedLinkingModuleTargets(node,e); else { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed..setting link state to not linking.."); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3)
private void mousePressedChangingPoint(PNode node,PInputEvent e) { if (node instanceof PCamera) { if (ChainBuilderAgent.DEBUG) System.err.println("clearing link selection target.. not_LINKING."); linkState = NOT_LINKING; if (selectionTarget != null) { Link link = selectionTarget.getLink(); if (link != null) link.setSelected(false); } } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void mousePressedLink(PNode node) { if (linkState != LINK_CHANGING_POINT) { selectedLink = (Link) node; selectedLink.setSelected(true); if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed on a link when not changing. link state is NOT_LINKING"); linkState = NOT_LINKING; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3)
private void mousePressedLinkingModuleTargets(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed linking module targets "+e); PNode n = e.getPickedNode(); if (e.getClickCount() ==2) { cancelModuleTargetLink(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (n instanceof ModuleView) { finishModuleTargetLink((ModuleView) n); postLinkCompletion = true; } else if (!(n instanceof ModuleLinkTarget)) { // we're on canvas. Point2D pos = e.getPosition(); moduleLink.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (moduleLinkOriginTarget != null) { finishModuleTargetLink((ModuleLinkTarget) n); postLinkCompletion = true; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG> 3)
private void mousePressedLinkingModuleTargets(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed linking module targets "+e); PNode n = e.getPickedNode(); if (e.getClickCount() ==2) { cancelModuleTargetLink(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (n instanceof ModuleView) { finishModuleTargetLink((ModuleView) n); postLinkCompletion = true; } else if (!(n instanceof ModuleLinkTarget)) { // we're on canvas. Point2D pos = e.getPosition(); moduleLink.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (moduleLinkOriginTarget != null) { finishModuleTargetLink((ModuleLinkTarget) n); postLinkCompletion = true; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); if (ChainBuilderAgent.DEBUG) { System.err.println("node is..."+node); if (node instanceof ParamLink) System.err.println("param link"); if (node instanceof ModuleLink) System.err.println("module link"); System.err.println("caling mouse pressed linking modules.."); } if (count ==2) { if (ChainBuilderAgent.DEBUG) System.err.println("2 presses. node is "+node); if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { finishModuleLinks((ModuleView) node); } else cancelModuleLinks(); wasDoubleClick = true; } else if (node instanceof PCamera){ // single click on camera if (ChainBuilderAgent.DEBUG) { System.err.println("on camera"); System.err.println("adding an intermediate point to modules link"); } Iterator iter = links.iterator(); Point2D pos = e.getPosition(); ParamLink lnk; int size = links.size(); float y = ((float) pos.getY()) - size/2*SPACING; while (iter.hasNext()) { lnk = (ParamLink) iter.next(); lnk.setIntermediatePoint((float) pos.getX(),y); y += SPACING; } } else // single click ont on camera. cancelModuleLinks(); postLinkCompletion = true; e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3)
private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); if (ChainBuilderAgent.DEBUG) { System.err.println("node is..."+node); if (node instanceof ParamLink) System.err.println("param link"); if (node instanceof ModuleLink) System.err.println("module link"); System.err.println("caling mouse pressed linking modules.."); } if (count ==2) { if (ChainBuilderAgent.DEBUG) System.err.println("2 presses. node is "+node); if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { finishModuleLinks((ModuleView) node); } else cancelModuleLinks(); wasDoubleClick = true; } else if (node instanceof PCamera){ // single click on camera if (ChainBuilderAgent.DEBUG) { System.err.println("on camera"); System.err.println("adding an intermediate point to modules link"); } Iterator iter = links.iterator(); Point2D pos = e.getPosition(); ParamLink lnk; int size = links.size(); float y = ((float) pos.getY()) - size/2*SPACING; while (iter.hasNext()) { lnk = (ParamLink) iter.next(); lnk.setIntermediatePoint((float) pos.getX(),y); y += SPACING; } } else // single click ont on camera. cancelModuleLinks(); postLinkCompletion = true; e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
private void mousePressedLinkingModules(PNode node,PInputEvent e) { int count = e.getClickCount(); if (ChainBuilderAgent.DEBUG) { System.err.println("node is..."+node); if (node instanceof ParamLink) System.err.println("param link"); if (node instanceof ModuleLink) System.err.println("module link"); System.err.println("caling mouse pressed linking modules.."); } if (count ==2) { if (ChainBuilderAgent.DEBUG) System.err.println("2 presses. node is "+node); if (node instanceof FormalParameter) { FormalParameter p = (FormalParameter) node; ModuleView mod = p.getModuleView(); finishModuleLinks(mod); } else if (node instanceof ModuleView) { finishModuleLinks((ModuleView) node); } else cancelModuleLinks(); wasDoubleClick = true; } else if (node instanceof PCamera){ // single click on camera if (ChainBuilderAgent.DEBUG) { System.err.println("on camera"); System.err.println("adding an intermediate point to modules link"); } Iterator iter = links.iterator(); Point2D pos = e.getPosition(); ParamLink lnk; int size = links.size(); float y = ((float) pos.getY()) - size/2*SPACING; while (iter.hasNext()) { lnk = (ParamLink) iter.next(); lnk.setIntermediatePoint((float) pos.getX(),y); y += SPACING; } } else // single click ont on camera. cancelModuleLinks(); postLinkCompletion = true; e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void mousePressedLinkingParams(PNode node,PInputEvent e) { //System.err.println("mouse pressed linking params "+e); if (e.getClickCount() ==2) { cancelParamLink(); if (ChainBuilderAgent.DEBUG) System.err.println("mouse pressed linking params. setting to linking cancellation"); linkState = LINKING_CANCELLATION; postLinkCompletion = true; } else if (lastParameterEntered == null) { // we're on canvas. Point2D pos = e.getPosition(); link.setIntermediatePoint((float) pos.getX(),(float) pos.getY()); } else if (lastParameterEntered != null) { finishParamLink(); postLinkCompletion = true; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void mousePressedNotLinking(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("got mouse presssed not linking.."); if (node instanceof FormalParameter) { if (lastParameterEntered == null) mouseEntered(e); FormalParameter param = (FormalParameter) node; if (ChainBuilderAgent.DEBUG) System.err.println("starting a link from .."+param.getParameter().getName()); if (param.canBeLinkOrigin()) startParamLink(param); else canvas.setStatusLabel(MULT_LINKS); } else if (node instanceof ModuleLinkTarget) { if (ChainBuilderAgent.DEBUG) System.err.println("pressing on module link target..."); ModuleLinkTarget modLink = (ModuleLinkTarget) node; startModuleTargetLink(modLink); } else if (node instanceof LinkSelectionTarget) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressiing on target.."); System.err.println("mouse pressed not linking. setting to link changing point"); } selectionTarget = (LinkSelectionTarget) node; linkState = LINK_CHANGING_POINT; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
private void mousePressedNotLinking(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("got mouse presssed not linking.."); if (node instanceof FormalParameter) { if (lastParameterEntered == null) mouseEntered(e); FormalParameter param = (FormalParameter) node; if (ChainBuilderAgent.DEBUG) System.err.println("starting a link from .."+param.getParameter().getName()); if (param.canBeLinkOrigin()) startParamLink(param); else canvas.setStatusLabel(MULT_LINKS); } else if (node instanceof ModuleLinkTarget) { if (ChainBuilderAgent.DEBUG) System.err.println("pressing on module link target..."); ModuleLinkTarget modLink = (ModuleLinkTarget) node; startModuleTargetLink(modLink); } else if (node instanceof LinkSelectionTarget) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressiing on target.."); System.err.println("mouse pressed not linking. setting to link changing point"); } selectionTarget = (LinkSelectionTarget) node; linkState = LINK_CHANGING_POINT; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void mousePressedNotLinking(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("got mouse presssed not linking.."); if (node instanceof FormalParameter) { if (lastParameterEntered == null) mouseEntered(e); FormalParameter param = (FormalParameter) node; if (ChainBuilderAgent.DEBUG) System.err.println("starting a link from .."+param.getParameter().getName()); if (param.canBeLinkOrigin()) startParamLink(param); else canvas.setStatusLabel(MULT_LINKS); } else if (node instanceof ModuleLinkTarget) { if (ChainBuilderAgent.DEBUG) System.err.println("pressing on module link target..."); ModuleLinkTarget modLink = (ModuleLinkTarget) node; startModuleTargetLink(modLink); } else if (node instanceof LinkSelectionTarget) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressiing on target.."); System.err.println("mouse pressed not linking. setting to link changing point"); } selectionTarget = (LinkSelectionTarget) node; linkState = LINK_CHANGING_POINT; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
private void mousePressedNotLinking(PNode node,PInputEvent e) { if (ChainBuilderAgent.DEBUG) System.err.println("got mouse presssed not linking.."); if (node instanceof FormalParameter) { if (lastParameterEntered == null) mouseEntered(e); FormalParameter param = (FormalParameter) node; if (ChainBuilderAgent.DEBUG) System.err.println("starting a link from .."+param.getParameter().getName()); if (param.canBeLinkOrigin()) startParamLink(param); else canvas.setStatusLabel(MULT_LINKS); } else if (node instanceof ModuleLinkTarget) { if (ChainBuilderAgent.DEBUG) System.err.println("pressing on module link target..."); ModuleLinkTarget modLink = (ModuleLinkTarget) node; startModuleTargetLink(modLink); } else if (node instanceof LinkSelectionTarget) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressiing on target.."); System.err.println("mouse pressed not linking. setting to link changing point"); } selectionTarget = (LinkSelectionTarget) node; linkState = LINK_CHANGING_POINT; } e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
private void mousePressedSelectionTarget(PNode node) { if (ChainBuilderAgent.DEBUG) { System.err.println("pressing on selection target.."); System.err.println("mousePressedSelectionTarget.... setting link state to changing point"); } selectionTarget = (LinkSelectionTarget) node; selectionTarget.getLink().setSelected(true); linkState = LINK_CHANGING_POINT; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG >3 )
public void mouseReleased(PInputEvent e) { if (e.isPopupTrigger()) { if (ChainBuilderAgent.DEBUG) System.err.println("mouse released"); evaluatePopup(e); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
public void setModulesDisplayMode() { Collection mods = canvas.findModules(); Iterator iter = mods.iterator(); ModuleView mod; PCamera camera=canvas.getCamera(); double curScale = camera.getViewScale(); boolean showingOverview = false; if (curScale< Constants.SCALE_THRESHOLD) { showingOverview = true; } if (ChainBuilderAgent.DEBUG) { System.err.println("current scale is "+curScale); System.err.println("showing overview..."+showingOverview); } iter = mods.iterator(); while (iter.hasNext()) { mod = (ModuleView)iter.next(); if (showingOverview == true) { mod.showOverview(); } else { mod.showDetails(); } } if (showingOverview == true) canvas.showModuleLinks(); else canvas.showParamLinks(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void startModuleLinks(PInputEvent e) { if (selectedModule == null) return; Point2D pos = e.getPosition(); boolean isInput = selectedModule.isOnInputSide(pos); Collection inputs = selectedModule.getInputParameters(); Collection outputs = selectedModule.getOutputParameters(); if (isInput == true || outputs.size() == 0) { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on input side"); startModuleLinks(inputs); moduleLinksStartedAsInputs = true; } else { if (ChainBuilderAgent.DEBUG) System.err.println("building module links on output side"); startModuleLinks(outputs); moduleLinksStartedAsInputs = false; } if (ChainBuilderAgent.DEBUG) System.err.println("start module links. link state is LINKING_MODULES"); linkState = LINKING_MODULES; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG)
if (ChainBuilderAgent.DEBUG > 3)
private void startModuleTargetLink(ModuleLinkTarget modLink) { moduleLinkOriginTarget = modLink; if (ChainBuilderAgent.DEBUG) System.err.println("starting mmodule target link..."+modLink+", link state is LINKING_MODULE_TARGETS"); moduleLink = new ModuleLink(linkLayer,moduleLinkOriginTarget); moduleLink.setPickable(false); linkState = LINKING_MODULE_TARGETS; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
if (ChainBuilderAgent.DEBUG) {
if (ChainBuilderAgent.DEBUG > 3) {
private void startParamLink(FormalParameter param) { if (ChainBuilderAgent.DEBUG) { System.err.println("mouse pressing and starting link"); System.err.println("start param link. link state is LINKING_PARAMS"); } linkOrigin = param; link = new ParamLink(); linkLayer.addChild(link); link.setStartParam(linkOrigin); link.setPickable(false); linkState = LINKING_PARAMS; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/630a53d68f5d29c53d2485557b18599785befb83/ChainCreationEventHandler.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainCreationEventHandler.java
RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) {
RubyModule containingClass = threadContext.getRubyClass(); if (containingClass == null) {
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) {
if (containingClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) {
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
} else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) {
} else if (visibility.isPublic() && containingClass == runtime.getClasses().getObjectClass()) {
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
runtime.getRubyClass());
threadContext.getRubyClass());
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
rubyClass.addMethod(name, newMethod);
containingClass.addMethod(name, newMethod);
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name));
containingClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); containingClass.callMethod("singleton_method_added", builtins.toSymbol(name));
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
rubyClass.callMethod("method_added", builtins.toSymbol(name));
if (singletonClass != null) { threadContext.pushClass(singletonClass); singletonClass.addMethod(iVisited.getName(), newMethod); } else { containingClass.callMethod("method_added", builtins.toSymbol(name)); }
public void visitDefnNode(DefnNode iVisited) { RubyModule rubyClass = threadContext.getRubyClass(); if (rubyClass == null) { throw new TypeError(runtime, "No class to add method."); } String name = iVisited.getName(); if (rubyClass == runtime.getClasses().getObjectClass() && name.equals("initialize")) { runtime.getWarnings().warn("redefining Object#initialize may cause infinite loop"); } Visibility visibility = threadContext.getCurrentVisibility(); if (name.equals("initialize") || visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } else if (visibility.isPublic() && rubyClass == runtime.getClasses().getObjectClass()) { visibility = iVisited.getVisibility(); } DefaultMethod newMethod = new DefaultMethod(iVisited.getBodyNode(), (ArgsNode) iVisited.getArgsNode(), visibility, runtime.getRubyClass()); iVisited.getBodyNode().accept(new CreateJumpTargetVisitor(newMethod)); rubyClass.addMethod(name, newMethod); if (threadContext.getCurrentVisibility().isModuleFunction()) { rubyClass.getSingletonClass().addMethod(name, new WrapperCallable(newMethod, Visibility.PUBLIC)); rubyClass.callMethod("singleton_method_added", builtins.toSymbol(name)); } rubyClass.callMethod("method_added", builtins.toSymbol(name)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43e9fa2839b5fdb050b372d628601d8a4bcc43a4/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
"reset security system. Must rollback.");
"reset security system. Must rollback.\n Session="+session);
public Object doInHibernate(Session session) throws HibernateException, SQLException { if (session.isDirty()) { throw new InternalException("Session is dirty. Cannot properly " + "reset security system. Must rollback."); } return null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
if ( stateful )
else if ( stateful )
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
else if ( failure ) { }
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
}
ht.clear(); saveLogs(); }
public Object invoke(MethodInvocation arg0) throws Throwable { secSys.setCurrentDetails(); boolean readOnly = checkReadOnly(arg0); // If read-only, we don't save the new current event, which should // allow us to clear the session. if ( readOnly ) { if (log.isDebugEnabled()) { log.debug("Tx readonly. Not saving current event."); } // write operations are to be expected, prepare the current details // by saving the current event. } else { secSys.setCurrentEvent((Event)ht.merge(secSys.getCurrentEvent())); } // now the user can be considered to be logged in. log.info(String.format(" Auth:\tuser=%s,group=%s,event=%s(%s)", secSys.currentUserId(),secSys.currentGroup().getId(), secSys.currentEvent().getId(),secSys.currentEvent().getType())); boolean failure = false; Object retVal = null; try { ht.execute(new EnableFilterAction(secSys)); retVal = arg0.proceed(); return retVal; } catch (Exception ex){ failure = true; throw ex; } finally { try { boolean stateful = (arg0.getThis() instanceof StatefulServiceInterface); // stateful services should NOT be flushed, because that's part // of the state that should hang around. if ( stateful ) { // we don't want to do anything, really. } // read-only sessions should not have anything changed. else if ( readOnly ) { ht.execute(new ClearIfDirtyAction(secSys)); } // on failure, we want to make sure that no one attempts // any further changes. else if ( failure ) { // TODO we should probably do some forced clean up here. } // stateless services, don't keep their sesssions about. else { ht.flush(); ht.execute(new CheckDirtyAction(secSys)); ht.execute(new DisableFilterAction(secSys)); } } finally { secSys.clearCurrentDetails(); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e6b7ac4062ce844e31078de77a00a7ab77e5e5d5/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
outerPanel.add(Box.createRigidArea(new Dimension(100, 16)));
outerPanel.add(Box.createRigidArea(HBOX));
private void buildGUI() { JPanel bars = new JPanel(), outerPanel = new JPanel(); bars.setBorder(null); bars.setLayout(new BoxLayout(bars, BoxLayout.X_AXIS)); bars.add(createManagementBar()); bars.add(createEditBar()); outerPanel.setBorder(null); outerPanel.setLayout(new BoxLayout(outerPanel, BoxLayout.X_AXIS)); outerPanel.add(bars); outerPanel.add(Box.createRigidArea(new Dimension(100, 16))); outerPanel.add(Box.createHorizontalGlue()); setLayout(new FlowLayout(FlowLayout.LEFT)); add(outerPanel); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
b.setBorderPainted(false);
setButtonProperties(b);
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
b.setBorderPainted(false);
setButtonProperties(b);
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
b.setBorderPainted(false);
setButtonProperties(b);
private JToolBar createEditBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction( TreeViewerControl.ANNOTATE)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.CLASSIFIER); b = new JButton(a); b.addMouseListener((ClassifierAction) a); b.setBorderPainted(false); bar.add(b); b = new JButton(controller.getAction(TreeViewerControl.PROPERTIES)); b.setBorderPainted(false); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
b.setBorderPainted(false);
setButtonProperties(b);
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); b.setBorderPainted(false); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
b.setBorderPainted(false);
setButtonProperties(b);
private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); b.setBorderPainted(false); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); b.setBorderPainted(false); b.addMouseListener((ManagerAction) a); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java
menu.add(new JMenuItem( controller.getAction(TreeViewerControl.DECLASSIFY)));
private JMenu createEditMenu() { JMenu menu = new JMenu("Edit"); menu.setMnemonic(KeyEvent.VK_E); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CUT_OBJECT))); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.COPY_OBJECT))); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.PASTE_OBJECT))); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.DELETE_OBJECT))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.FIND))); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CLEAR))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CLASSIFY))); TreeViewerAction a = controller.getAction(TreeViewerControl.ANNOTATE); JMenuItem item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JSeparator(JSeparator.HORIZONTAL)); a = controller.getAction(TreeViewerControl.PROPERTIES); item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); return menu; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java
menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT)));
a = controller.getAction(TreeViewerControl.CREATE_OBJECT); item = new JMenuItem(a); menu.add(item); item.setText(a.getActionName()); menuItems.add(item);
private JMenu createFileMenu() { JMenu menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_F); TreeViewerAction a = controller.getAction( TreeViewerControl.CREATE_TOP_CONTAINER); JMenuItem item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.CREATE_OBJECT))); menu.add(createRootMenu()); menu.add(new JSeparator(JSeparator.HORIZONTAL)); a = controller.getAction(TreeViewerControl.VIEW); item = new JMenuItem(a); item.setText(a.getActionName()); menuItems.add(item); menu.add(item); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.REFRESH_TREE))); menu.add(new JSeparator(JSeparator.HORIZONTAL)); menu.add(new JMenuItem( controller.getAction(TreeViewerControl.EXIT))); return menu; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java
item.setText(((TreeViewerAction) item.getAction()).getActionName());
a = (TreeViewerAction) item.getAction(); item.setText(a.getActionName()); item.setToolTipText(a.getActionDescription());
void updateMenuItems() { Iterator i = menuItems.iterator(); JMenuItem item; while (i.hasNext()) { item = (JMenuItem) i.next(); item.setText(((TreeViewerAction) item.getAction()).getActionName()); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java
public void visitForNode(ForNode iVisited) { ruby.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); ruby.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // XXX ruby.getBlock().flags &= ~RubyBlock.BLOCK_D_SCOPE; Block tmpBlock = ArgsUtil.beginCallArgs(ruby); IRubyObject recv = eval(iVisited.getIterNode()); ArgsUtil.endCallArgs(ruby, tmpBlock); ruby.setSourceFile(file); ruby.setSourceLine(line); result = recv.getInternalClass().call(recv, "each", null, 0); return; } catch (RetryException rExcptn) { } } } catch (ReturnJump rExcptn) { result = rExcptn.getReturnValue(); } catch (BreakJump bExcptn) { result = ruby.getNil(); } finally { ruby.getIterStack().pop(); ruby.getBlockStack().pop(); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/385e3f4e7eba5184dfea0a1e9d23b8ab7d46b1a5/EvaluateVisitor.java/clean/org/jruby/evaluator/EvaluateVisitor.java
((RubyProc)body).getBlock().isLambda = true;
public IRubyObject define_method(IRubyObject[] args) { if (args.length < 1 || args.length > 2) { throw getRuntime().newArgumentError("wrong # of arguments(" + args.length + " for 1)"); } String name = args[0].asSymbol(); IRubyObject body; ICallable newMethod; Visibility visibility = getRuntime().getCurrentContext().getCurrentVisibility(); if (visibility.isModuleFunction()) { visibility = Visibility.PRIVATE; } if (args.length == 1) { body = getRuntime().newProc(); newMethod = new ProcMethod(this, (RubyProc)body, visibility); } else if (args[1].isKindOf(getRuntime().getClass("Method"))) { body = args[1]; newMethod = new MethodMethod(this, ((RubyMethod)body).unbind(), visibility); } else if (args[1].isKindOf(getRuntime().getClass("Proc"))) { body = args[1]; newMethod = new ProcMethod(this, (RubyProc)body, visibility); } else { throw getRuntime().newTypeError("wrong argument type " + args[0].getType().getName() + " (expected Proc/Method)"); } addMethod(name, newMethod); RubySymbol symbol = RubySymbol.newSymbol(getRuntime(), name); if (getRuntime().getCurrentContext().getPreviousVisibility().isModuleFunction()) { getSingletonClass().addMethod(name, new WrapperCallable(getSingletonClass(), newMethod, Visibility.PUBLIC)); callMethod("singleton_method_added", symbol); } callMethod("method_added", symbol); return body; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a3dd185aba4076399f6305a523d16f3f6f3c091e/RubyModule.java/buggy/src/org/jruby/RubyModule.java
throws IOException, QuantizationException {
throws IOException, QuantizationException {
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats();
RenderingStats performanceStats = renderer.getStats(); Pixels metadata = renderer.getMetadata();
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2);
RGBBuffer buf = new RGBBuffer(sizeX1, sizeX2);
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } return renderedDataBuf; }
render(buf, planeDef); return buf; }
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the context and retrieve objects we're gonna use. renderer = ctx; QuantumManager qManager = renderer.getQuantumManager(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); ChannelBinding[] cBindings = renderer.getChannelBindings(); RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane definition and //create the RGB buffer. initAxesSize(planeDef, metadata); performanceStats.startMalloc(); log.info("Creating RGBBuffer of size " + sizeX1 + "x" + sizeX2); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //Process the first active wavelength. Plane2D wData; for (int i = 0; i < cBindings.length; i++) { if (cBindings[i].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(i); wData = PlaneFactory.createPlane(planeDef, i, metadata, pixels); performanceStats.endIO(i); try { //Transform it into an RGB image. performanceStats.startRendering(); renderWave(renderedDataBuf, wData, cBindings[i].getColor(), qManager.getStrategyFor(i)); performanceStats.endRendering(); } catch (QuantizationException e) { e.setWavelength(i); throw e; } break; } } //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
System.err.println("Render wave.");
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { System.err.println("Render wave."); CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; }
if (dataBuf instanceof RGBIntBuffer) { int alpha = color.getAlpha(); int[] buf = ((RGBIntBuffer) dataBuf).getDataBuffer(); for (x2 = 0; x2 < sizeX2; ++x2) { int index = sizeX1 * x2; for (x1 = 0; x1 < sizeX1; ++x1) { discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); buf[index + x1] = alpha << 24 | discreteValue << 16 | discreteValue << 8 | discreteValue; } } } else { byte value; float alpha = color.getAlpha().floatValue() / 255; byte[] r = dataBuf.getRedBand(); byte[] g = dataBuf.getBlueBand(); byte[] b = dataBuf.getGreenBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); r[pixelIndex] = value; g[pixelIndex] = value; b[pixelIndex] = value; } }
private void renderWave(RGBBuffer dataBuf, Plane2D plane, Color color, QuantumStrategy qs) throws QuantizationException { System.err.println("Render wave."); CodomainChain cc = renderer.getCodomainChain(); int x1, x2, discreteValue, pixelIndex; byte value; float alpha = color.getAlpha().floatValue()/255; byte[] red = dataBuf.getRedBand(), green = dataBuf.getGreenBand(), blue = dataBuf.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pixelIndex = sizeX1*x2+x1; discreteValue = qs.quantize(plane.getPixelValue(x1, x2)); discreteValue = cc.transform(discreteValue); value = (byte) (discreteValue*alpha); red[pixelIndex] = value; green[pixelIndex] = value; blue[pixelIndex] = value; } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/GreyScaleStrategy.java/clean/components/rendering/src/omeis/providers/re/GreyScaleStrategy.java
case 0: jj_consume_token(0); {if (true) throw new ParseException("Encountered EOF, expecting #end at " + token.beginLine + "." + token.beginColumn);} break;
final public BlockBuilder Block(Subdirective[] subdirectives) throws ParseException { ParserBlockBuilder block = new ParserBlockBuilder(templateName); Token t; blockStack.push(subdirectives); if (jj_2_23(2147483647)) { jj_consume_token(LBRACE); EatWsNlIfNl(block); label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case END: case BEGIN: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: ; break; default: jj_la1[84] = jj_gen; break label_13; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: case POUND: WMContent(block); break; case END: case BEGIN: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: t = jj_consume_token(BEGIN); break; case END: t = jj_consume_token(END); break; default: jj_la1[85] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[86] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BEGIN: jj_consume_token(BEGIN); EatWsNlOrSpace(block); break; default: jj_la1[87] = jj_gen; ; } label_14: while (true) { if (jj_2_21(1)) { ; } else { break label_14; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STUFF: case POUNDPOUND: case DOLLAR: case QCHAR: case SLASH: WMContentNoDirective(block); break; case RBRACE: case LBRACE: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: t = jj_consume_token(LBRACE); break; case RBRACE: t = jj_consume_token(RBRACE); break; default: jj_la1[88] = jj_gen; jj_consume_token(-1); throw new ParseException(); } block.addElement(t.image); break; default: jj_la1[89] = jj_gen; if (jj_2_22(2147483647) && (lookahead_not_breaking_subd())) { Directive(block); } else { jj_consume_token(-1); throw new ParseException(); } } } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case END: jj_consume_token(END); block.eatOneWs(); break; default: jj_la1[90] = jj_gen; ; } } blockStack.pop(); {if (true) return block;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_44()) { jj_scanpos = xsp;
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_54()) return true;
if (jj_3R_54()) { jj_scanpos = xsp; if (jj_3R_55()) return true;
final private boolean jj_3R_23() { Token xsp; xsp = jj_scanpos; if (jj_3R_44()) { jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { jj_scanpos = xsp; if (jj_3R_47()) { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; if (jj_3R_49()) { jj_scanpos = xsp; if (jj_3R_50()) { jj_scanpos = xsp; if (jj_3R_51()) { jj_scanpos = xsp; if (jj_3R_52()) { jj_scanpos = xsp; if (jj_3R_53()) { jj_scanpos = xsp; if (jj_3R_54()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_55()) { jj_scanpos = xsp;
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_61()) return true;
if (jj_3R_61()) { jj_scanpos = xsp; if (jj_3R_62()) return true;
final private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_3R_55()) { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; if (jj_3R_57()) { jj_scanpos = xsp; if (jj_3R_58()) { jj_scanpos = xsp; if (jj_3R_59()) { jj_scanpos = xsp; if (jj_3R_60()) { jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_62()) return true;
if (jj_3R_63()) return true;
final private boolean jj_3R_41() { if (jj_3R_62()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true;
if (jj_scan_token(0)) return true;
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_3R_63()) { jj_scanpos = xsp; if (jj_3R_64()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
final private boolean jj_3R_43() { if (jj_3R_65()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_scan_token(LPAREN)) return true;
if (jj_3R_67()) return true;
final private boolean jj_3R_45() { if (jj_scan_token(LPAREN)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_3R_67()) return true;
if (jj_scan_token(LPAREN)) return true;
final private boolean jj_3R_46() { if (jj_3R_67()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java
if (jj_scan_token(NULL)) return true;
if (jj_3R_69()) return true;
final private boolean jj_3R_48() { if (jj_scan_token(NULL)) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/cedac29272f91e5d81d3f0fd38e593219ece6cdf/WMParser_impl.java/buggy/webmacro/src/org/webmacro/parser/WMParser_impl.java