rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
lastMove = -1;
HiViewerWin() { super(DEFAULT_TITLE); IconManager iconMng = IconManager.getInstance(); statusBar = new StatusBar(iconMng.getIcon(IconManager.INFO)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerWin.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerWin.java
mainPane.setResizeWeight(1);
if (lastMove != -1) { mainPane.setDividerLocation(lastMove); mainPane.setResizeWeight(0); } else mainPane.setResizeWeight(1);
private JSplitPane createSplitPane(JComponent browserUI, JComponent clipBoardUI) { mainPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, browserUI, clipBoardUI); mainPane.setOneTouchExpandable(true); mainPane.setContinuousLayout(true); mainPane.setResizeWeight(1); //before we remove items. return mainPane; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/HiViewerWin.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerWin.java
this.packArg = new RubyString(this.io.getRuntime(), "C");
this.packArg = io.getRuntime().newString("C");
public IOInputStream(final IRubyObject io) { if(!io.respondsTo("read")) { throw new IllegalArgumentException("Object: " + io + " is not a legal argument to this wrapper, cause it doesn't respond to \"read\"."); } this.io = io; this.numOne = RubyFixnum.one(this.io.getRuntime()); this.packArg = new RubyString(this.io.getRuntime(), "C"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/IOInputStream.java/clean/src/org/jruby/util/IOInputStream.java
suite.addTest(new TestSuite(TestIdentitySet.class));
public static Test suite() throws Throwable { TestSuite suite = new TestSuite(); suite.addTest(new TestSuite(TestRubyObject.class)); suite.addTest(new TestSuite(TestRubyNil.class)); suite.addTest(new TestSuite(TestRubyHash.class)); suite.addTest(new TestSuite(TestRubyTime.class)); suite.addTest(new TestSuite(TestRuby.class)); suite.addTest(new TestSuite(TestJavaUtil.class)); suite.addTest(new TestSuite(TestKernel.class)); suite.addTest(new TestSuite(TestRubyCollect.class)); suite.addTest(new TestSuite(TestObjectSpace.class)); suite.addTest(ScriptTestSuite.suite()); suite.addTest(new TestSuite(TestRubySymbol.class)); suite.addTest(new TestSuite(TestRubyProxyFactory.class)); return suite; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/385e3f4e7eba5184dfea0a1e9d23b8ab7d46b1a5/MainTestSuite.java/clean/org/jruby/test/MainTestSuite.java
String s1 = o1.toString(); String s2 = o2.toString(); int result = (s1.toLowerCase()).compareTo(s2.toLowerCase()); int v = 0; if (result < 0) v = -1; else if (result > 0) v = 1; return v;
return compareStrings(o1.toString(), o2.toString());
private int compareObjects(Object o1, Object o2) { String s1 = o1.toString(); String s2 = o2.toString(); int result = (s1.toLowerCase()).compareTo(s2.toLowerCase()); int v = 0; if (result < 0) v = -1; else if (result > 0) v = 1; return v; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6af4fe52d7d6045034e88f4dfb4499ac42397e2f/ViewerSorter.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/ViewerSorter.java
if (s1 == null && s2 == null) return 0; else if (s1 == null) return -1; else if (s2 == null) return 1;
private int compareStrings(String s1, String s2) { int v = 0; int result = (s1.toLowerCase()).compareTo(s2.toLowerCase()); if (result < 0) v = -1; else if (result > 0) v = 1; return v; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6af4fe52d7d6045034e88f4dfb4499ac42397e2f/ViewerSorter.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/ViewerSorter.java
if (value == Renderer.MODEL_GREYSCALE)
if (value.equals(Renderer.MODEL_GREYSCALE))
static RenderingStrategy makeNew(RenderingModel model) { String value = model.getValue(); if (value == Renderer.MODEL_GREYSCALE) return new GreyScaleStrategy(); else if (value == Renderer.MODEL_HSB) return new HSBStrategy(); else if (value == Renderer.MODEL_RGB) return new RGBStrategy(); log.warn("WARNING: Unknown model '" + value + "' using greyscale."); return new GreyScaleStrategy(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bba3aa91d760832bcfb2bd6f04f26049fd728058/RenderingStrategy.java/clean/components/rendering/src/omeis/providers/re/RenderingStrategy.java
else if (value == Renderer.MODEL_HSB)
else if (value.equals(Renderer.MODEL_HSB))
static RenderingStrategy makeNew(RenderingModel model) { String value = model.getValue(); if (value == Renderer.MODEL_GREYSCALE) return new GreyScaleStrategy(); else if (value == Renderer.MODEL_HSB) return new HSBStrategy(); else if (value == Renderer.MODEL_RGB) return new RGBStrategy(); log.warn("WARNING: Unknown model '" + value + "' using greyscale."); return new GreyScaleStrategy(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bba3aa91d760832bcfb2bd6f04f26049fd728058/RenderingStrategy.java/clean/components/rendering/src/omeis/providers/re/RenderingStrategy.java
else if (value == Renderer.MODEL_RGB)
else if (value.equals(Renderer.MODEL_RGB))
static RenderingStrategy makeNew(RenderingModel model) { String value = model.getValue(); if (value == Renderer.MODEL_GREYSCALE) return new GreyScaleStrategy(); else if (value == Renderer.MODEL_HSB) return new HSBStrategy(); else if (value == Renderer.MODEL_RGB) return new RGBStrategy(); log.warn("WARNING: Unknown model '" + value + "' using greyscale."); return new GreyScaleStrategy(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bba3aa91d760832bcfb2bd6f04f26049fd728058/RenderingStrategy.java/clean/components/rendering/src/omeis/providers/re/RenderingStrategy.java
springBootstrap.setServerBaseDirectory(".");
springBootstrap.setServerBaseDirectory(basedir);
public void testClasspathBootstrap() throws Exception{ springBootstrap.setConfigurationFile("META-INF/xbean-bootstrap.xml"); springBootstrap.setServerBaseDirectory("."); assertBootable(springBootstrap); }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/c06ecd608700a5a1d16363b667e5a08286b3438a/SpringBootstrapTest.java/buggy/server/src/test/org/xbean/server/spring/main/SpringBootstrapTest.java
springBootstrap.setConfigurationFile("src/resources/META-INF/xbean-bootstrap.xml"); springBootstrap.setServerBaseDirectory(".");
springBootstrap.setConfigurationFile(basedir + "/src/resources/META-INF/xbean-bootstrap.xml"); springBootstrap.setServerBaseDirectory(basedir);
public void testFileBootstrap() throws Exception{ springBootstrap.setConfigurationFile("src/resources/META-INF/xbean-bootstrap.xml"); springBootstrap.setServerBaseDirectory("."); assertBootable(springBootstrap); }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/c06ecd608700a5a1d16363b667e5a08286b3438a/SpringBootstrapTest.java/buggy/server/src/test/org/xbean/server/spring/main/SpringBootstrapTest.java
OutputStream stringOutput = new ByteArrayOutputStream();
ByteArrayOutputStream stringOutput = new ByteArrayOutputStream();
public static RubyObject dump(Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length < 1) { throw new ArgumentError(ruby, "wrong # of arguments(at least 1)"); } RubyObject objectToDump = args[0]; RubyIO io = null; int depthLimit = -1; if (args.length >= 2) { if (args[1] instanceof RubyIO) { io = (RubyIO) args[1]; } else if (args[1] instanceof RubyFixnum) { depthLimit = (int) ((RubyFixnum) args[1]).getLongValue(); } if (args.length == 3) { depthLimit = (int) ((RubyFixnum) args[2]).getLongValue(); } } try { if (io != null) { dumpToStream(objectToDump, io.getOutStream(), depthLimit); return io; } else { OutputStream stringOutput = new ByteArrayOutputStream(); dumpToStream(objectToDump, stringOutput, depthLimit); return RubyString.newString(ruby, stringOutput.toString()); } } catch (IOException ioe) { RubyBugException exception = new RubyBugException(ioe.getMessage()); exception.initCause(ioe); throw exception; } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/bb772f38cd98a3cfc11f39a8353947e7469dc172/RubyMarshal.java/buggy/org/jruby/RubyMarshal.java
return RubyString.newString(ruby, stringOutput.toString());
return RubyString.newString(ruby, stringOutput.toString(sEncoding));
public static RubyObject dump(Ruby ruby, RubyObject recv, RubyObject[] args) { if (args.length < 1) { throw new ArgumentError(ruby, "wrong # of arguments(at least 1)"); } RubyObject objectToDump = args[0]; RubyIO io = null; int depthLimit = -1; if (args.length >= 2) { if (args[1] instanceof RubyIO) { io = (RubyIO) args[1]; } else if (args[1] instanceof RubyFixnum) { depthLimit = (int) ((RubyFixnum) args[1]).getLongValue(); } if (args.length == 3) { depthLimit = (int) ((RubyFixnum) args[2]).getLongValue(); } } try { if (io != null) { dumpToStream(objectToDump, io.getOutStream(), depthLimit); return io; } else { OutputStream stringOutput = new ByteArrayOutputStream(); dumpToStream(objectToDump, stringOutput, depthLimit); return RubyString.newString(ruby, stringOutput.toString()); } } catch (IOException ioe) { RubyBugException exception = new RubyBugException(ioe.getMessage()); exception.initCause(ioe); throw exception; } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/bb772f38cd98a3cfc11f39a8353947e7469dc172/RubyMarshal.java/buggy/org/jruby/RubyMarshal.java
rawInput = new ByteArrayInputStream(inString.getBytes());
rawInput = new ByteArrayInputStream(inString.getBytes(sEncoding));
public static RubyObject load(Ruby ruby, RubyObject recv, RubyObject[] args) { try { if (args.length < 1) { throw new ArgumentError(ruby, "wrong # of arguments(at least 1)"); } // FIXME: handle more parameters RubyObject in = args[0]; InputStream rawInput; if (in instanceof RubyIO) { throw new NotImplementedError(); } else if (respondsTo(in, "to_str")) { String inString = ((RubyString) in.funcall("to_str")).getValue(); rawInput = new ByteArrayInputStream(inString.getBytes()); } else { throw new TypeError(ruby, "instance of IO needed"); } UnmarshalStream input = new UnmarshalStream(ruby, rawInput); return input.unmarshalObject(); } catch (IOException ioe) { // FIXME: throw appropriate ruby exception .. RubyBugException exception = new RubyBugException(ioe.getMessage()); exception.initCause(ioe); throw exception; } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/bb772f38cd98a3cfc11f39a8353947e7469dc172/RubyMarshal.java/buggy/org/jruby/RubyMarshal.java
fail("implement me");
Experimenter ex = new Experimenter( new Long(0) ); try { Experimenter e = (Experimenter) iQuery.findByExample( ex ); } catch (InternalException ie) { assertTrue( ie.getMessage().contains( "unique result")); }
public void test_examplById() throws Exception { fail("implement me"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e91cf7e7022550061d61ae8fb99911286a82c708/QueryTest.java/clean/components/server/test/ome/server/itests/query/QueryTest.java
struct.values = new RubyObject[size];
struct.values = new IRubyObject[size];
public static RubyStruct newStruct(IRubyObject recv, IRubyObject[] args) { RubyStruct struct = new RubyStruct(recv.getRuntime(), (RubyClass) recv); int size = RubyFixnum.fix2int(getInstanceVariable((RubyClass) recv, "__size__")); struct.values = new RubyObject[size]; struct.callInit(args); return struct; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyStruct.java/clean/org/jruby/RubyStruct.java
clone.values = new RubyObject[values.length];
clone.values = new IRubyObject[values.length];
public IRubyObject rbClone() { RubyStruct clone = new RubyStruct(ruby, getInternalClass()); clone.values = new RubyObject[values.length]; System.arraycopy(values, 0, clone.values, 0, values.length); return clone; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyStruct.java/clean/org/jruby/RubyStruct.java
Ruby ruby = input.getRuby();
Ruby ruby = input.getRuntime();
public static RubyStruct unmarshalFrom(UnmarshalStream input) throws java.io.IOException { Ruby ruby = input.getRuby(); RubySymbol className = (RubySymbol) input.unmarshalObject(); RubyClass rbClass = pathToClass(ruby, className.toId()); if (rbClass == null) { throw new NameError(ruby, "uninitialized constant " + className); } int size = input.unmarshalInt(); IRubyObject[] values = new IRubyObject[size]; for (int i = 0; i < size; i++) { input.unmarshalObject(); // Read and discard a Symbol, which is the name values[i] = input.unmarshalObject(); } return newStruct(rbClass, values); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyStruct.java/clean/org/jruby/RubyStruct.java
if (width > ViewerUIF.MAX_WITH) width = ViewerUIF.MAX_WITH;
if (width > maxWidth) width = maxWidth;
private void incrementWidth() { width += incrementWidth; if (width > ViewerUIF.MAX_WITH) width = ViewerUIF.MAX_WITH; control.setLensWidth(width); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8846f7da5fbaf4d3fb83aa43b5616bcd13483654/LensBarMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/transform/lens/LensBarMng.java
}
}
private void incrementWidth() { width += incrementWidth; if (width > ViewerUIF.MAX_WITH) width = ViewerUIF.MAX_WITH; control.setLensWidth(width); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8846f7da5fbaf4d3fb83aa43b5616bcd13483654/LensBarMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/transform/lens/LensBarMng.java
if (source == view.getOnOff()) control.setLensOnOff(b); else if (source == view.getPin()) control.setPin(b);
if (source == view.getOnOff()) control.setLensOnOff(b); else if (source == view.getPin()) control.setPin(b);
public void itemStateChanged(ItemEvent e) { Object source = e.getSource(); boolean b = false; if (e.getStateChange() == ItemEvent.SELECTED) b = true; if (source == view.getOnOff()) control.setLensOnOff(b); else if (source == view.getPin()) control.setPin(b); else if (source == view.getPainting()) { // grab the color. int index = view.getColors().getSelectedIndex(); control.setPainting(b, colorSelection[index]); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8846f7da5fbaf4d3fb83aa43b5616bcd13483654/LensBarMng.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/transform/lens/LensBarMng.java
e.printStackTrace();
byte[] getThumbnail(Pixels pixels, int sizeX, int sizeY) throws RenderingServiceException { try { IThumb service = getIThumbService(); return service.getThumbnailDirect(pixels, null, new Integer(sizeX), new Integer(sizeY)); } catch (Exception e) { e.printStackTrace(); throw new RenderingServiceException("Cannot get thumbnail", e); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3be9d381a3d593d28d0b987df4bc2963a9fa97b8/OMEROGateway.java/clean/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
file.setId(Helper.getNextFilesId());
public FileBuffer createFileBuffer(OriginalFile file) throws FileNotFoundException { file.setId(Helper.getNextFilesId()); return new FileBuffer(file, "rw"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/49b1cc3bf41e9fd22f35e59aeb72233de4fe3863/OriginalFilesService.java/clean/components/omeio-nio/src/ome/io/nio/OriginalFilesService.java
public HTMLURLRenderer(WikiSystem wiki) { _wiki = wiki;
public HTMLURLRenderer () { this (null);
public HTMLURLRenderer(WikiSystem wiki) { _wiki = wiki; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/de189c90ed378866a49b63001cc676a626167e7d/HTMLURLRenderer.java/buggy/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLURLRenderer.java
} else if (protocol.equalsIgnoreCase("javadoc")) {
} else if (_wiki != null && protocol.equalsIgnoreCase("javadoc")) {
public String renderURL(String url) { if (url == null) return null; int l_paren = url.indexOf('('); int r_paren = url.indexOf(')'); String label; if (r_paren > l_paren && l_paren != -1) { label = url.substring(l_paren+1, r_paren); url = url.substring(0, l_paren); } else { label = url; } int idx = url.indexOf(':'); String protocol = url.substring(0, idx); String location = url.substring(idx+1); StringBuffer sb = new StringBuffer(); if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("ftp") || protocol.equalsIgnoreCase("gopher")) { sb.append("<a href=\"") .append(url) .append("\" target=_blank>") .append(label) .append("</a>"); } else if (protocol.equalsIgnoreCase("mailto")) { sb.append("<a href=\"") .append(url) .append("\">") .append(label) .append("</a>"); } else if (protocol.equalsIgnoreCase("javadoc")) { sb.append("<a target=javadoc href=\"") .append(_wiki.getProperties().getProperty("JavaDocRoot")) .append(location.replace('.', '/')) .append(".html\">") .append(label) .append("</a>"); } else if (protocol.equalsIgnoreCase("image")) { sb.append("<img src=\"") .append(location) .append("\" border=0>"); } else { // unrecognized protocol return url; } return sb.toString(); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/de189c90ed378866a49b63001cc676a626167e7d/HTMLURLRenderer.java/buggy/wiki/src/org/tcdi/opensource/wiki/renderer/HTMLURLRenderer.java
JndiStatefulObjectFactoryBean.class, null, mpv);
ConfigurableJndiObjectFactoryBean.class, null, mpv);
public void testDoCallsReturnDifferentObjects() throws Exception { ServiceFactory sf = new ServiceFactory(); Hashtable ht = (Hashtable) sf.getContext().getBean("env"); MutablePropertyValues mpv = new MutablePropertyValues(); mpv.addPropertyValue("jndiEnvironment",ht); mpv.addPropertyValue("lookupOnStartup",Boolean.FALSE); mpv.addPropertyValue("jndiName","omero/remote/ome.api.RawPixelStore"); mpv.addPropertyValue("proxyInterface",RawPixelsStore.class.getName()); BeanDefinition def = new RootBeanDefinition( JndiStatefulObjectFactoryBean.class, null, mpv); StaticApplicationContext context = new StaticApplicationContext(); context.registerBeanDefinition( "jndi", def ); context.refresh(); RawPixelsStore raw_1 = (RawPixelsStore) context.getBean("jndi"); RawPixelsStore raw_2 = (RawPixelsStore) context.getBean("jndi"); assertTrue( raw_1 != raw_2 ); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/871879ebfefc9b3324909f8c3840a03367fdfb5a/JndiStatefulObjectFactoryBeanTest.java/buggy/components/client/test/ome/client/itests/JndiStatefulObjectFactoryBeanTest.java
if (e.getButton() == 1 && !e.isMetaDown()) {
if (e.getButton() == 1 && !(e.isControlDown() || e.isMetaDown()) ) {
private void onClick(MouseEvent e) { if (e.getButton() == 1 && !e.isMetaDown()) { if (e.getClickCount() == 1) timer.start(); else if (e.getClickCount() == 2) { timer.stop(); doubleClick(); } } else if ((e.getButton() == 2 || e.isMetaDown())) onReleased(e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/419b967a57574e31832047f2418f0c78331cb3f0/ChannelButton.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java
else if ((e.getButton() == 2 || e.isMetaDown())) onReleased(e);
else if ((e.getButton() == 2 || (e.isControlDown() || e.isMetaDown()))) onReleased(e);
private void onClick(MouseEvent e) { if (e.getButton() == 1 && !e.isMetaDown()) { if (e.getClickCount() == 1) timer.start(); else if (e.getClickCount() == 2) { timer.stop(); doubleClick(); } } else if ((e.getButton() == 2 || e.isMetaDown())) onReleased(e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/419b967a57574e31832047f2418f0c78331cb3f0/ChannelButton.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/util/ChannelButton.java
preferredSize_ = new Dimension(width_, h);
if( model.getOrientation() == VERTICAL ) preferredSize_ = new Dimension(width_, h); else { width_ = calculateVerticalWidth(); preferredSize_ = new Dimension(width_,h); }
private void calculatePreferredSize() { int h = knobHeight; if (model.isPaintTicks()) h += knobHeight; if (model.isPaintLabels() || model.isPaintEndLabels()) h += TwoKnobsSliderUI.EXTRA+fontHeight+2*TwoKnobsSliderUI.BUFFER; preferredSize_ = new Dimension(width_, h); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/dbcb69209c8e495b002b85a987399ee5b4f9f249/TwoKnobsSlider.java/buggy/SRC/org/openmicroscopy/shoola/util/ui/slider/TwoKnobsSlider.java
window.setSize(window.getWidth(), TitleBar.HEIGHT+2*BORDER_THICKNESS);
Dimension d = new Dimension(window.getWidth(), TitleBar.HEIGHT+2*BORDER_THICKNESS); titleBar.setPreferredSize(d); window.pack();
void updateCollapsedState() { if (window.isCollapsed()) { removeComponent(canvas); window.setSize(window.getWidth(), TitleBar.HEIGHT+2*BORDER_THICKNESS); titleBar.sizeButton.setActionType(SizeButton.EXPAND); } else { addComponent(canvas); window.pack(); titleBar.sizeButton.setActionType(SizeButton.COLLAPSE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/8682da21e921a7cb7426f7bb525d43bbd4a62cf9/TinyWindowUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/twindow/TinyWindowUI.java
Block oldBlock = getRuby().getBlock().getCurrent();
Block oldBlock = getRuby().getBlockStack().getCurrent();
public IRubyObject call(RubyObject[] args) { RubyModule oldWrapper = getRuby().getWrapper(); Block oldBlock = getRuby().getBlock().getCurrent(); getRuby().setWrapper(wrapper); getRuby().getBlock().setCurrent(block); getRuby().getIterStack().push(Iter.ITER_CUR); getRuby().getCurrentFrame().setIter(Iter.ITER_CUR); try { return getRuby().yield(args != null ? RubyArray.newArray(getRuby(), args) : null, null, null, true); } finally { getRuby().getIterStack().pop(); getRuby().getBlock().setCurrent(oldBlock); getRuby().setWrapper(oldWrapper); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/RubyProc.java/buggy/org/jruby/RubyProc.java
getRuby().getBlock().setCurrent(block);
getRuby().getBlockStack().setCurrent(block);
public IRubyObject call(RubyObject[] args) { RubyModule oldWrapper = getRuby().getWrapper(); Block oldBlock = getRuby().getBlock().getCurrent(); getRuby().setWrapper(wrapper); getRuby().getBlock().setCurrent(block); getRuby().getIterStack().push(Iter.ITER_CUR); getRuby().getCurrentFrame().setIter(Iter.ITER_CUR); try { return getRuby().yield(args != null ? RubyArray.newArray(getRuby(), args) : null, null, null, true); } finally { getRuby().getIterStack().pop(); getRuby().getBlock().setCurrent(oldBlock); getRuby().setWrapper(oldWrapper); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/RubyProc.java/buggy/org/jruby/RubyProc.java
getRuby().getBlock().setCurrent(oldBlock);
getRuby().getBlockStack().setCurrent(oldBlock);
public IRubyObject call(RubyObject[] args) { RubyModule oldWrapper = getRuby().getWrapper(); Block oldBlock = getRuby().getBlock().getCurrent(); getRuby().setWrapper(wrapper); getRuby().getBlock().setCurrent(block); getRuby().getIterStack().push(Iter.ITER_CUR); getRuby().getCurrentFrame().setIter(Iter.ITER_CUR); try { return getRuby().yield(args != null ? RubyArray.newArray(getRuby(), args) : null, null, null, true); } finally { getRuby().getIterStack().pop(); getRuby().getBlock().setCurrent(oldBlock); getRuby().setWrapper(oldWrapper); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/RubyProc.java/buggy/org/jruby/RubyProc.java
newProc.block = ruby.getBlock().getCurrent().cloneBlock();
newProc.block = ruby.getBlockStack().getCurrent().cloneBlock();
public static RubyProc newProc(Ruby ruby, RubyClass rubyClass) { if (!ruby.isBlockGiven() && !ruby.isFBlockGiven()) { throw new ArgumentError(ruby, "tried to create Proc object without a block"); } RubyProc newProc = new RubyProc(ruby, rubyClass); newProc.block = ruby.getBlock().getCurrent().cloneBlock(); newProc.wrapper = ruby.getWrapper(); newProc.block.setIter(newProc.block.getNext() != null ? Iter.ITER_PRE : Iter.ITER_NOT); newProc.block.setFrame(ruby.getCurrentFrame()); newProc.block.setScope(ruby.currentScope()); // +++ return newProc; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/8db42974495981011f558bcce15e2dfc28681a76/RubyProc.java/buggy/org/jruby/RubyProc.java
add(buildSliderPanel());
add(buildTablePanel());
private void buildGUI() { JPanel topControls = new JPanel(); topControls.setLayout(new BoxLayout(topControls, BoxLayout.X_AXIS)); topControls.add(buildMoviePanel()); add(topControls); add(buildSliderPanel()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
JPanel p = new JPanel(), field = new JPanel(), slider = new JPanel();
JPanel slider = new JPanel();
private JPanel buildSliderPanel() { JPanel p = new JPanel(), field = new JPanel(), slider = new JPanel(); slider.setLayout(null); slider.setOpaque(false); slider.setPreferredSize(DIM); slider.setSize(DIM); tSlider.setPreferredSize(DIM); tSlider.setBounds(0, 0, PANEL_WIDTH, PANEL_HEIGHT); slider.add(tSlider); JLabel current = new JLabel("Current T: "); current.setForeground(NavigationPalette.STEELBLUE); field.add(current); field.add(tField); field.setAlignmentX(LEFT_ALIGNMENT); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(field); p.add(slider); return p; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
JLabel current = new JLabel("Current T: "); current.setForeground(NavigationPalette.STEELBLUE); field.add(current); field.add(tField); field.setAlignmentX(LEFT_ALIGNMENT); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(field); p.add(slider); return p;
return slider;
private JPanel buildSliderPanel() { JPanel p = new JPanel(), field = new JPanel(), slider = new JPanel(); slider.setLayout(null); slider.setOpaque(false); slider.setPreferredSize(DIM); slider.setSize(DIM); tSlider.setPreferredSize(DIM); tSlider.setBounds(0, 0, PANEL_WIDTH, PANEL_HEIGHT); slider.add(tSlider); JLabel current = new JLabel("Current T: "); current.setForeground(NavigationPalette.STEELBLUE); field.add(current); field.add(tField); field.setAlignmentX(LEFT_ALIGNMENT); p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); p.add(field); p.add(slider); return p; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
private void initComponents(int sizeT, int t)
private void initComponents(int maxT, int t)
private void initComponents(int sizeT, int t) { //Slider tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t); tSlider.setToolTipText("Move the slider to navigate across time"); tSlider.setMinorTickSpacing(1); tSlider.setMajorTickSpacing(10); tSlider.setPaintTicks(true); Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(0), new JLabel(""+0) ); labelTable.put(new Integer(sizeT), new JLabel(""+sizeT)); tSlider.setLabelTable(labelTable); tSlider.setPaintLabels(true); //textField tField = new JTextField("0", (""+sizeT).length()); tField.setForeground(NavigationPalette.STEELBLUE); tField.setToolTipText("Enter a timepoint"); //buttons play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText("Play movie from current timepoint"); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText("Stop movie"); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText("Go to first timepoint"); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+sizeT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)"; editor.setToolTipText(s); fps.setEditor(editor); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t);
tSlider = new JSlider(JSlider.HORIZONTAL, 0, maxT, t);
private void initComponents(int sizeT, int t) { //Slider tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t); tSlider.setToolTipText("Move the slider to navigate across time"); tSlider.setMinorTickSpacing(1); tSlider.setMajorTickSpacing(10); tSlider.setPaintTicks(true); Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(0), new JLabel(""+0) ); labelTable.put(new Integer(sizeT), new JLabel(""+sizeT)); tSlider.setLabelTable(labelTable); tSlider.setPaintLabels(true); //textField tField = new JTextField("0", (""+sizeT).length()); tField.setForeground(NavigationPalette.STEELBLUE); tField.setToolTipText("Enter a timepoint"); //buttons play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText("Play movie from current timepoint"); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText("Stop movie"); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText("Go to first timepoint"); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+sizeT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)"; editor.setToolTipText(s); fps.setEditor(editor); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
labelTable.put(new Integer(sizeT), new JLabel(""+sizeT));
labelTable.put(new Integer(maxT), new JLabel(""+maxT));
private void initComponents(int sizeT, int t) { //Slider tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t); tSlider.setToolTipText("Move the slider to navigate across time"); tSlider.setMinorTickSpacing(1); tSlider.setMajorTickSpacing(10); tSlider.setPaintTicks(true); Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(0), new JLabel(""+0) ); labelTable.put(new Integer(sizeT), new JLabel(""+sizeT)); tSlider.setLabelTable(labelTable); tSlider.setPaintLabels(true); //textField tField = new JTextField("0", (""+sizeT).length()); tField.setForeground(NavigationPalette.STEELBLUE); tField.setToolTipText("Enter a timepoint"); //buttons play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText("Play movie from current timepoint"); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText("Stop movie"); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText("Go to first timepoint"); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+sizeT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)"; editor.setToolTipText(s); fps.setEditor(editor); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
tField = new JTextField("0", (""+sizeT).length());
tField = new JTextField("0", (""+maxT).length());
private void initComponents(int sizeT, int t) { //Slider tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t); tSlider.setToolTipText("Move the slider to navigate across time"); tSlider.setMinorTickSpacing(1); tSlider.setMajorTickSpacing(10); tSlider.setPaintTicks(true); Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(0), new JLabel(""+0) ); labelTable.put(new Integer(sizeT), new JLabel(""+sizeT)); tSlider.setLabelTable(labelTable); tSlider.setPaintLabels(true); //textField tField = new JTextField("0", (""+sizeT).length()); tField.setForeground(NavigationPalette.STEELBLUE); tField.setToolTipText("Enter a timepoint"); //buttons play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText("Play movie from current timepoint"); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText("Stop movie"); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText("Go to first timepoint"); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+sizeT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)"; editor.setToolTipText(s); fps.setEditor(editor); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
editor = new JTextField("12", (""+sizeT).length());
editor = new JTextField("12", (""+maxT).length());
private void initComponents(int sizeT, int t) { //Slider tSlider = new JSlider(JSlider.HORIZONTAL, 0, sizeT, t); tSlider.setToolTipText("Move the slider to navigate across time"); tSlider.setMinorTickSpacing(1); tSlider.setMajorTickSpacing(10); tSlider.setPaintTicks(true); Hashtable labelTable = new Hashtable(); labelTable.put(new Integer(0), new JLabel(""+0) ); labelTable.put(new Integer(sizeT), new JLabel(""+sizeT)); tSlider.setLabelTable(labelTable); tSlider.setPaintLabels(true); //textField tField = new JTextField("0", (""+sizeT).length()); tField.setForeground(NavigationPalette.STEELBLUE); tField.setToolTipText("Enter a timepoint"); //buttons play = new JButton(im.getIcon(IconManager.MOVIE)); play.setToolTipText("Play movie from current timepoint"); stop = new JButton(im.getIcon(IconManager.STOP)); stop.setToolTipText("Stop movie"); rewind = new JButton(im.getIcon(IconManager.REWIND)); rewind.setToolTipText("Go to first timepoint"); //Spinner timepoint granularity is 1, so must be stepSize //fps = new JSpinner(new SpinnerNumberModel(12, 0, sizeT, 1)); fps = new JSpinner(new SpinnerNumberModel(12, 12, 12, 1)); editor = new JTextField("12", (""+sizeT).length()); String s = "Select or enter the movie playback rate " + "(frames per second)"; editor.setToolTipText(s); fps.setEditor(editor); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b52b1735c990029c4d2115a33258acf4d3c82ae5/TNavigator.java/clean/SRC/org/openmicroscopy/shoola/agents/viewer/controls/TNavigator.java
for (int i = 0; i < comps.length; i++) return (comps[i].equals(browser.getUI()));
for (int i = 0; i < comps.length; i++) { if (comps[i].equals(browser.getUI())) return true; }
private boolean isBrowserVisible(Browser browser) { Component[] comps = tabs.getComponents(); for (int i = 0; i < comps.length; i++) return (comps[i].equals(browser.getUI())); return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e3d58ccb148adea4a6398d457b6aa215e64b7893/TreeViewerWin.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerWin.java
roi.setText("#"+j);
roi.setLabel("#"+j);
public void erase() { erase = true; if (eraseAll) listROIErase.removeAll(listROIErase); eraseAll = false; listROIErase.add(currentROI); int index = currentROI.getIndex(); listROI.remove(currentROI); Iterator i = listROI.iterator(); ROIShape roi; int j; while (i.hasNext()) { roi = (ROIShape) i.next(); j = roi.getIndex(); if (j > index) { j--; roi.setIndex(j); roi.setText("#"+j); } } //Select the last ROI if any left. int n = listROI.size()-1; if (n >= 0) { currentROI = (ROIShape) listROI.get(n); currentShape = currentROI.getShape(); view.setIndexSelected(currentROI.getIndex()); } else { currentROI = null; currentShape = null; view.erase(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
public void erase() { erase = true; if (eraseAll) listROIErase.removeAll(listROIErase); eraseAll = false; listROIErase.add(currentROI); int index = currentROI.getIndex(); listROI.remove(currentROI); Iterator i = listROI.iterator(); ROIShape roi; int j; while (i.hasNext()) { roi = (ROIShape) i.next(); j = roi.getIndex(); if (j > index) { j--; roi.setIndex(j); roi.setText("#"+j); } } //Select the last ROI if any left. int n = listROI.size()-1; if (n >= 0) { currentROI = (ROIShape) listROI.get(n); currentShape = currentROI.getShape(); view.setIndexSelected(currentROI.getIndex()); } else { currentROI = null; currentShape = null; view.erase(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
private void handleMousePressed(Point p)
private void handleMousePressed(Point p, int clickCount)
private void handleMousePressed(Point p) { Iterator i = listROI.iterator(); ROIShape roi; Shape s; while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); if (s.contains(p)) { currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
if (clickCount == 2) control.annotateROI(roi);
private void handleMousePressed(Point p) { Iterator i = listROI.iterator(); ROIShape roi; Shape s; while (i.hasNext()) { roi = (ROIShape) (i.next()); s = roi.getShape(); if (s.contains(p)) { currentROI = roi; currentShape = s; Rectangle r = s.getBounds(); xControl = r.x; yControl = r.y; view.setIndexSelected(roi.getIndex()); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
public void mouseMoved(MouseEvent e) {}
public void mouseMoved(MouseEvent e) { if (annotationOnOff) { Iterator i = listROI.iterator(); ROIShape roi; Shape s; String txt; dragging = false; control.setAnnotation(null); while (i.hasNext()) { roi = (ROIShape) (i.next()); txt = roi.getAnnotation(); s = roi.getShape(); if (s.contains(e.getPoint())){ if (txt != null && txt.length() != 0) txt = roi.getLabel()+" "+txt; else txt = null; control.setAnnotation(txt); } } } }
public void mouseMoved(MouseEvent e) {}
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
Point p = new Point(e.getPoint()); if (!dragging && drawingArea.contains(p)) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; handleMousePressed(p); }
Point p = e.getPoint(); if (!dragging && drawingArea.contains(p)) handleMousePressed(p, e.getClickCount());
public void mousePressed(MouseEvent e) { Point p = new Point(e.getPoint()); if (!dragging && drawingArea.contains(p)) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; handleMousePressed(p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
view.draw(currentShape);
view.moveAndDraw(currentShape);
private void move(Point p) { int diffX = p.x-anchor.x, diffY = p.y-anchor.y; Rectangle r = currentShape.getBounds(); int x = xControl+diffX, y = yControl+diffY, w = r.width, h = r.height; if (areaValid(x, y, w, h)) { ROIFactory.setShapeBounds(currentShape, currentROI.getShapeType(), x , y, w, h); moving = true; view.draw(currentShape); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
r.setText("#"+n);
r.setLabel("#"+n);
private void undoEraseAll(ROIShape roi) { int n = listROIErase.size(); Iterator i = listROI.iterator(); ROIShape r; while (i.hasNext()) { r = (ROIShape) i.next(); r.setIndex(n); r.setText("#"+n); n++; } listROI.addAll(listROIErase); listROIErase.removeAll(listROIErase); currentROI = roi; currentShape = roi.getShape(); eraseAll = false; view.setIndexSelected(roi.getIndex()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
r.setText("#"+j);
r.setLabel("#"+j);
private void undoEraseOne(ROIShape roi) { int index = roi.getIndex(); Iterator i = listROI.iterator(); ROIShape r; int j; while (i.hasNext()) { r = (ROIShape) i.next(); j = r.getIndex(); if (j >= index) { j++; r.setIndex(j); r.setText("#"+j); } } listROI.add(roi); listROIErase.remove(roi); currentROI = roi; currentShape = roi.getShape(); if (listROIErase.size() == 0) erase = false; view.setIndexSelected(index); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/75759d4628947eccba1f0e97cd7b5035c174f2cc/DrawingCanvasMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/canvas/DrawingCanvasMng.java
if (old_d == null || new_d == null)
if (new_d == null)
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
if (new_d == null && old_d == null)
throw new InternalException( "New details null. Not currently handled."); } else if (old_d == null) { if (new_d.getOwner()!=null||new_d.getGroup()!=null|| new_d.getCreationEvent()!=null|| new_d.getUpdateEvent()!=null)
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
"Both details null. Can't have changed!");
"These circumstances should never happen."); } else if (new_d.getPermissions()==null) { return true;
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
else if (new_d == null) {
else if (new_d.getPermissions().isSet(Flag.SOFT)) {
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
else { if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true;
else {
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
public static boolean onlyLockChanged( SessionImplementor session, EntityPersister persister, IObject entity, Object[] state, String[] names ) { Object[] current = persister.getPropertyValues(entity, EntityMode.POJO); int[] dirty = persister.findDirty( state, current, entity, session); if ( dirty != null ) { if ( dirty.length > 1 ) return false; if ( ! DETAILS.equals( names[dirty[0]] )) return false; Details new_d = getDetails(current, names); Details old_d = getDetails(state, names); // have to handle nulls because of ticket:307 if (old_d == null || new_d == null) { if (new_d == null && old_d == null) { throw new InternalException( "Both details null. Can't have changed!"); } else if (new_d == null) { // don't worry about it. return true; } else { // then new_d != null. What's up? if (new_d.getPermissions() != null && new_d.getPermissions().isSet(Flag.SOFT)) return true; return false; } } else { if ( ! onlyPermissionsChanged(new_d, old_d)) return false; Permissions new_p = new Permissions( new_d.getPermissions() ); Permissions old_p = new Permissions( old_d.getPermissions() ); old_p.set( Flag.LOCKED ); return new_p.identical( old_p ); } } return false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/33553b0a2381da2d421d9d7aa0f393e0228ee623/HibernateUtils.java/clean/components/server/src/ome/tools/hibernate/HibernateUtils.java
if (ChainBuilderAgent.DEBUG) { end = System.currentTimeMillis()-start; System.err.println("in chain layout contents. time for chain view "+end); }
public void layoutContents() { // the current chain LayoutChainData chain; PaletteChainView view; Collection chains = dataManager.getChains(); ArrayList views = buildChainViews(chains); int num = views.size(); // The display should be roughly square, // in terms of the number of rows vs. # of columns rowSize = (int) Math.floor(Math.sqrt(num)); count=0; // draw each of them. Iterator iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); ChainBox box = buildChain(view); if (box != null) { placeChain(box); } } if (x > maxRowWidth) { maxRowWidth = x; } // fix up the last row. row.setHeight(rowHeight); rows.add(row); adjustSizes(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
rows.add(row);
rows.add(row); start = System.currentTimeMillis();
public void layoutContents() { // the current chain LayoutChainData chain; PaletteChainView view; Collection chains = dataManager.getChains(); ArrayList views = buildChainViews(chains); int num = views.size(); // The display should be roughly square, // in terms of the number of rows vs. # of columns rowSize = (int) Math.floor(Math.sqrt(num)); count=0; // draw each of them. Iterator iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); ChainBox box = buildChain(view); if (box != null) { placeChain(box); } } if (x > maxRowWidth) { maxRowWidth = x; } // fix up the last row. row.setHeight(rowHeight); rows.add(row); adjustSizes(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
if (ChainBuilderAgent.DEBUG) { end = System.currentTimeMillis()-start; System.err.println("time for adjusting size.."+end); }
public void layoutContents() { // the current chain LayoutChainData chain; PaletteChainView view; Collection chains = dataManager.getChains(); ArrayList views = buildChainViews(chains); int num = views.size(); // The display should be roughly square, // in terms of the number of rows vs. # of columns rowSize = (int) Math.floor(Math.sqrt(num)); count=0; // draw each of them. Iterator iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); ChainBox box = buildChain(view); if (box != null) { placeChain(box); } } if (x > maxRowWidth) { maxRowWidth = x; } // fix up the last row. row.setHeight(rowHeight); rows.add(row); adjustSizes(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
System.err.println("largest chain is "+largest.getChain().getName()+ ", area is "+largest.getArea()); System.err.println("largest width is "+largest.getWidth()+","+largest.getHeight());
if (ChainBuilderAgent.DEBUG) { System.err.println("largest chain is "+largest.getChain().getName()+ ", area is "+largest.getArea()); System.err.println("largest width is "+largest.getWidth()+","+largest.getHeight()); }
private void scaleAreas(ArrayList views) { PaletteChainView view; Collections.sort(views); /* // get smallest area PaletteChainView smallest= (PaletteChainView) views.get(0); double logSmallestArea = Math.log(smallest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = 3*logArea/logSmallestArea; newArea = smallest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); }*/ // get largest area PaletteChainView largest= (PaletteChainView) views.get(views.size()-1); System.err.println("largest chain is "+largest.getChain().getName()+ ", area is "+largest.getArea()); System.err.println("largest width is "+largest.getWidth()+","+largest.getHeight()); double logLargestArea = Math.log(largest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = logArea/logLargestArea; newArea = largest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("original area is "+view.getArea()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); System.err.println("new area is "+newArea); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
System.err.println("\nchain..."+view.getChain().getName()); System.err.println("original area is "+view.getArea()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale);
if (ChainBuilderAgent.DEBUG) { System.err.println("\nchain..."+view.getChain().getName()); System.err.println("original area is "+view.getArea()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); }
private void scaleAreas(ArrayList views) { PaletteChainView view; Collections.sort(views); /* // get smallest area PaletteChainView smallest= (PaletteChainView) views.get(0); double logSmallestArea = Math.log(smallest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = 3*logArea/logSmallestArea; newArea = smallest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); }*/ // get largest area PaletteChainView largest= (PaletteChainView) views.get(views.size()-1); System.err.println("largest chain is "+largest.getChain().getName()+ ", area is "+largest.getArea()); System.err.println("largest width is "+largest.getWidth()+","+largest.getHeight()); double logLargestArea = Math.log(largest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = logArea/logLargestArea; newArea = largest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("original area is "+view.getArea()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); System.err.println("new area is "+newArea); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
System.err.println(" scaled width is "+newWidth); System.err.println("new area is "+newArea);
if (ChainBuilderAgent.DEBUG) { System.err.println(" scaled width is "+newWidth); System.err.println("new area is "+newArea); }
private void scaleAreas(ArrayList views) { PaletteChainView view; Collections.sort(views); /* // get smallest area PaletteChainView smallest= (PaletteChainView) views.get(0); double logSmallestArea = Math.log(smallest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = 3*logArea/logSmallestArea; newArea = smallest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); }*/ // get largest area PaletteChainView largest= (PaletteChainView) views.get(views.size()-1); System.err.println("largest chain is "+largest.getChain().getName()+ ", area is "+largest.getArea()); System.err.println("largest width is "+largest.getWidth()+","+largest.getHeight()); double logLargestArea = Math.log(largest.getArea()); double logArea; double ratio; double newArea; double scale; Iterator iter = views.iterator(); iter = views.iterator(); while (iter.hasNext()) { view = (PaletteChainView) iter.next(); logArea = Math.log(view.getArea()); ratio = logArea/logLargestArea; newArea = largest.getArea()*ratio; scale = newArea/view.getArea(); view.setScale(scale); System.err.println("\nchain..."+view.getChain().getName()); System.err.println("original area is "+view.getArea()); System.err.println("chain width is "+view.getWidth()); System.err.println(" scale is "+scale); double newWidth = scale*view.getWidth(); System.err.println(" scaled width is "+newWidth); System.err.println("new area is "+newArea); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ChainPaletteCanvas.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteCanvas.java
newString.setRubyClass((RubyClass) recv);
newString.setInternalClass((RubyClass) recv);
public static RubyString newInstance(IRubyObject recv, IRubyObject[] args) { RubyString newString = newString(recv.getRuntime(), ""); newString.setRubyClass((RubyClass) recv); newString.callInit(args); return newString; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyString.java/buggy/org/jruby/RubyString.java
return (RubyString) anObject.toRubyObject().convertType(RubyString.class, "String", "to_str");
return (RubyString) anObject.convertType(RubyString.class, "String", "to_str");
public static RubyString stringValue(IRubyObject anObject) { if (anObject instanceof RubyString) { return (RubyString) anObject; } else { return (RubyString) anObject.toRubyObject().convertType(RubyString.class, "String", "to_str"); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyString.java/buggy/org/jruby/RubyString.java
return RubyString.newString(input.getRuby(), input.unmarshalString());
return RubyString.newString(input.getRuntime(), input.unmarshalString());
public static RubyString unmarshalFrom(UnmarshalStream input) throws java.io.IOException { return RubyString.newString(input.getRuby(), input.unmarshalString()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyString.java/buggy/org/jruby/RubyString.java
public void loadScript( RubyString scriptName, RubyString source, boolean wrap) {
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) {
public void loadScript( RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSecurityLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.m_newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().m_clone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getRubyScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); RubyId last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } catch (Exception excptn) { excptn.printStackTrace(getErrorStream()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getRubyScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ec719ef82be7ea6956b3d139a2ce2d236eed4568/RubyRuntime.java/clean/org/jruby/runtime/RubyRuntime.java
kernelModule.defineMethod("singleton_method_added", CallbackFactory.getNilMethod());
kernelModule.defineMethod("singleton_method_added", CallbackFactory.getNilMethod(1));
public static RubyModule createKernelModule(Ruby ruby) { RubyModule kernelModule = ruby.defineModule("Kernel"); kernelModule.defineMethod("open", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "open")); kernelModule.defineMethod("format", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "sprintf")); kernelModule.defineMethod("gets", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "gets")); kernelModule.defineMethod("p", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "p")); kernelModule.defineMethod("print", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "print")); kernelModule.defineMethod("printf", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "printf")); kernelModule.defineMethod("puts", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "puts")); kernelModule.defineMethod("readline", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "readline")); kernelModule.defineMethod("readlines", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "readlines")); kernelModule.defineMethod("sprintf", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "sprintf")); kernelModule.defineMethod("gsub!", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "gsub_bang")); kernelModule.defineMethod("gsub", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "gsub")); kernelModule.defineMethod("sub!", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "sub_bang")); kernelModule.defineMethod("sub", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "sub")); kernelModule.defineMethod("chop!", CallbackFactory.getSingletonMethod(RubyKernel.class, "chop_bang")); kernelModule.defineMethod("chop", CallbackFactory.getSingletonMethod(RubyKernel.class, "chop")); kernelModule.defineMethod("chomp!", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "chomp_bang")); kernelModule.defineMethod("chomp", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "chomp")); kernelModule.defineMethod("split", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "split")); kernelModule.defineMethod("scan", CallbackFactory.getSingletonMethod(RubyKernel.class, "scan", RubyObject.class)); kernelModule.defineMethod("load", CallbackFactory.getSingletonMethod(RubyKernel.class, "load", RubyString.class)); //kernelModule.defineMethod("autoload", CallbackFactory.getSingletonMethod(RubyKernel.class, "autoload", RubyString.class)); kernelModule.defineMethod("raise", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "raise")); kernelModule.defineMethod("require", CallbackFactory.getSingletonMethod(RubyKernel.class, "require", RubyString.class)); kernelModule.defineMethod("global_variables", CallbackFactory.getSingletonMethod(RubyKernel.class, "global_variables")); kernelModule.defineMethod("local_variables", CallbackFactory.getSingletonMethod(RubyKernel.class, "local_variables")); kernelModule.defineMethod("block_given?", CallbackFactory.getSingletonMethod(RubyKernel.class, "block_given")); kernelModule.defineMethod("iterator?", CallbackFactory.getSingletonMethod(RubyKernel.class, "block_given")); kernelModule.defineMethod("proc", CallbackFactory.getSingletonMethod(RubyKernel.class, "proc")); kernelModule.defineMethod("loop", CallbackFactory.getSingletonMethod(RubyKernel.class, "loop")); kernelModule.defineMethod("eval", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "eval", RubyString.class)); kernelModule.defineMethod("caller", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "caller")); kernelModule.defineMethod("catch", CallbackFactory.getSingletonMethod(RubyKernel.class, "rbCatch", RubyObject.class)); kernelModule.defineMethod("throw", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "rbThrow", RubyObject.class)); kernelModule.defineMethod("singleton_method_added", CallbackFactory.getNilMethod()); kernelModule.defineMethod("set_trace_func", CallbackFactory.getSingletonMethod(RubyKernel.class, "set_trace_func", RubyObject.class)); kernelModule.defineMethod("`", CallbackFactory.getSingletonMethod(RubyKernel.class, "backquote", RubyString.class)); kernelModule.defineMethod("exit", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "exit")); kernelModule.defineMethod("srand", CallbackFactory.getSingletonMethod(RubyKernel.class, "srand", RubyObject.class)); kernelModule.defineMethod("rand", CallbackFactory.getOptSingletonMethod(RubyKernel.class, "rand")); kernelModule.defineAlias("lambda", "proc"); return kernelModule; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyKernel.java/buggy/org/jruby/RubyKernel.java
gbc.weighty = 100;
gbc.weighty = 190;
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 100; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 300; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 1700; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d1099f1a40d90a6affae7dfc56a940b82584eb11/TabbedPaneUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/TabbedPaneUI.java
gbc.weighty = 300;
gbc.weighty = 600;
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 100; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 300; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 1700; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d1099f1a40d90a6affae7dfc56a940b82584eb11/TabbedPaneUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/TabbedPaneUI.java
gbc.weighty = 1700;
gbc.weighty = 2800;
private void createUI() { createToolbar(); createActionbar(); createPanels(); JPanel container = new JPanel(); container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS)); container.add(toolbar , BorderLayout.WEST); container.add(Box.createHorizontalBox()); container.add(userActionbar, BorderLayout.EAST); this.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 40; gbc.weighty = 0; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); this.add(container, gbc); gbc.gridx = 0; gbc.gridy = 1; gbc.weightx = 100; gbc.weighty = 100; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(5, 5, 0, 5); this.add(paintPotPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(colourWheelPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 300; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(RGBSliderPane, gbc); gbc.gridx = 0; gbc.gridy = 2; gbc.weightx = 100; gbc.weighty = 1700; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.BOTH; gbc.insets = new Insets(0, 0, 0, 0); this.add(swatchPane, gbc); RGBSliderPane.setVisible(false); swatchPane.setVisible(false); colourWheelButton.setSelected(true); colourWheelPane.setActive(true); this.doLayout(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d1099f1a40d90a6affae7dfc56a940b82584eb11/TabbedPaneUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/TabbedPaneUI.java
tree.getTopItem().setExpanded(true);
tree.getItem(0).setExpanded(true);
public void init() { tree.getTopItem().setExpanded(true); }
57508 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57508/3000a07ff0b6334bd55fb7c9711452ae58c647cc/NoteTree.java/buggy/trunk/src/display/NoteTree.java
return orNodeVisitor;
return opAsgnOrNodeVisitor;
public Instruction visitOpAsgnOrNode(OpAsgnOrNode iVisited) { return orNodeVisitor; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/62395b140d1fb0b5b75ba224eb0f4b564f70979b/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
super();
public AbstractOmeroHierarchyBrowserIntegrationTest(String name){ this.setName(name); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
Set test = new HashSet(); Iterator i = result.iterator(); while (i.hasNext()){ Object o = i.next(); if (o instanceof Image) { test.add(o); } else if (o instanceof Dataset) { Dataset dd = (Dataset) o; test.addAll(dd.getImages()); } else if (o instanceof Project) { Project pd = (Project) o; Iterator p = pd.getDatasets().iterator(); while (p.hasNext()){ Dataset dd = (Dataset) p.next(); test.addAll(dd.getImages()); } } }
Set test = Utils.getImagesinPID(result);
public void testContainedImages(){ // Something Set result = (Set) testFindPDIHierarchies(); assertTrue(nonNull, result != null && result.size() != 0); // Not to much Set test = new HashSet(); Iterator i = result.iterator(); while (i.hasNext()){ Object o = i.next(); if (o instanceof Image) { test.add(o); } else if (o instanceof Dataset) { Dataset dd = (Dataset) o; test.addAll(dd.getImages()); } else if (o instanceof Project) { Project pd = (Project) o; Iterator p = pd.getDatasets().iterator(); while (p.hasNext()){ Dataset dd = (Dataset) p.next(); test.addAll(dd.getImages()); } } } assertTrue("There should only be as many images as in the data.imagesPDI", test.size() == this.getData().imgsPDI.size());// TODO Make sure joins aren't leaving anything out because of empties! }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testContainedImages(){ // Something Set result = (Set) testFindPDIHierarchies(); assertTrue(nonNull, result != null && result.size() != 0); // Not to much Set test = new HashSet(); Iterator i = result.iterator(); while (i.hasNext()){ Object o = i.next(); if (o instanceof Image) { test.add(o); } else if (o instanceof Dataset) { Dataset dd = (Dataset) o; test.addAll(dd.getImages()); } else if (o instanceof Project) { Project pd = (Project) o; Iterator p = pd.getDatasets().iterator(); while (p.hasNext()){ Dataset dd = (Dataset) p.next(); test.addAll(dd.getImages()); } } } assertTrue("There should only be as many images as in the data.imagesPDI", test.size() == this.getData().imgsPDI.size());// TODO Make sure joins aren't leaving anything out because of empties! }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindCGCIHierarchiesNoReturn() {
public void testFindCGCIHierarchiesNoReturn() throws Exception { super.setUp();
public void testFindCGCIHierarchiesNoReturn() { Object obj = testFindCGCIHierarchies(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindDatasetAnnotationsSetForExperimenterNoReturn() {
public void testFindDatasetAnnotationsSetForExperimenterNoReturn() throws Exception { super.setUp();
public void testFindDatasetAnnotationsSetForExperimenterNoReturn() { Object obj = testFindDatasetAnnotationsSetForExperimenter(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindDatasetAnnotationsSetNoReturn() {
public void testFindDatasetAnnotationsSetNoReturn() throws Exception { super.setUp();
public void testFindDatasetAnnotationsSetNoReturn() { Object obj = testFindDatasetAnnotationsSet(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindImageAnnotationsSetForExperimenterNoReturn() {
public void testFindImageAnnotationsSetForExperimenterNoReturn() throws Exception { super.setUp();
public void testFindImageAnnotationsSetForExperimenterNoReturn() { Object obj = testFindImageAnnotationsSetForExperimenter(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindImageAnnotationsSetNoReturn() {
public void testFindImageAnnotationsSetNoReturn() throws Exception { super.setUp();
public void testFindImageAnnotationsSetNoReturn() { Object obj = testFindImageAnnotationsSet(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testFindPDIHierarchiesNoReturn() {
public void testFindPDIHierarchiesNoReturn() throws Exception { super.setUp();
public void testFindPDIHierarchiesNoReturn() { Object obj = testFindPDIHierarchies(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testLoadCGCIHierarchyCategoryGroupNoReturn() {
public void testLoadCGCIHierarchyCategoryGroupNoReturn() throws Exception { super.setUp();
public void testLoadCGCIHierarchyCategoryGroupNoReturn() { Object obj = testLoadCGCIHierarchyCategoryGroup(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testLoadCGCIHierarchyCategoryNoReturn() {
public void testLoadCGCIHierarchyCategoryNoReturn() throws Exception { super.setUp();
public void testLoadCGCIHierarchyCategoryNoReturn() { Object obj = testLoadCGCIHierarchyCategory(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testLoadPDIHierarchyDatasetNoReturn() {
public void testLoadPDIHierarchyDatasetNoReturn() throws Exception { super.setUp();
public void testLoadPDIHierarchyDatasetNoReturn() { Object obj = testLoadPDIHierarchyDataset(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testLoadPDIHierarchyProjectNoReturn() {
public void testLoadPDIHierarchyProjectNoReturn() throws Exception { super.setUp();
public void testLoadPDIHierarchyProjectNoReturn() { Object obj = testLoadPDIHierarchyProject(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO getHb().findCGCIHierarchies( ); //TODO generate OMENullData(); and use it here. //TODO OMEData toString(); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // assertTrue(emptyColl,getHb().findDatasetAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findImageAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findPDIHierarchies(test).size()==0); assertTrue(emptyColl,getHb().findPDIHierarchies(new HashSet()).size()==0); // assertNull(nullObj,getHb().loadCGCIHierarchy(CategoryGroup.class, 0)); assertNull(nullObj,getHb().loadCGCIHierarchy(Category.class, 0)); // assertNull(nullObj,getHb().loadPDIHierarchy(Project.class, 0)); assertNull(nullObj,getHb().loadPDIHierarchy(Dataset.class, 0)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
test.add(new Integer(0)); int nonExp = 0;
test.add(new Integer(-1)); int nonExp = -1;
public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO getHb().findCGCIHierarchies( ); //TODO generate OMENullData(); and use it here. //TODO OMEData toString(); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // assertTrue(emptyColl,getHb().findDatasetAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findImageAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findPDIHierarchies(test).size()==0); assertTrue(emptyColl,getHb().findPDIHierarchies(new HashSet()).size()==0); // assertNull(nullObj,getHb().loadCGCIHierarchy(CategoryGroup.class, 0)); assertNull(nullObj,getHb().loadCGCIHierarchy(Category.class, 0)); // assertNull(nullObj,getHb().loadPDIHierarchy(Project.class, 0)); assertNull(nullObj,getHb().loadPDIHierarchy(Dataset.class, 0)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
assertTrue(emptyColl,getHb().findCGCIHierarchies(test).size()==0); assertTrue(emptyColl,getHb().findCGCIHierarchies(new HashSet()).size()==0);
public void testNulls(){ // Each method should return a null or an empty set as appropriate //TODO getHb().findCGCIHierarchies( ); //TODO generate OMENullData(); and use it here. //TODO OMEData toString(); Set test = new HashSet(); test.add(new Integer(0)); // Non-existence set of ids int nonExp = 0; // Non-existence experimenter ID // assertTrue(emptyColl,getHb().findDatasetAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotations(test).size()==0); assertTrue(emptyColl,getHb().findImageAnnotations(new HashSet()).size()==0); // assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(test,nonExp).size()==0); assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); // assertTrue(emptyColl,getHb().findPDIHierarchies(test).size()==0); assertTrue(emptyColl,getHb().findPDIHierarchies(new HashSet()).size()==0); // assertNull(nullObj,getHb().loadCGCIHierarchy(CategoryGroup.class, 0)); assertNull(nullObj,getHb().loadCGCIHierarchy(Category.class, 0)); // assertNull(nullObj,getHb().loadPDIHierarchy(Project.class, 0)); assertNull(nullObj,getHb().loadPDIHierarchy(Dataset.class, 0)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2bc67970abd041b6cb8e0252d02a6e27f304bec4/AbstractOmeroHierarchyBrowserIntegrationTest.java/buggy/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
assertEquals("[\"foo\", \"bar\"]", eval("$h.each_pair {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_pair {|pair| }"));
assertTrue(eval("$h.each_pair {|pair| p pair}").indexOf("[\"foo\", \"bar\"]") != -1); assertTrue(eval("p $h.each_pair {|pair| }").indexOf("{\"foo\"=>\"bar\"}") != -1);
public void testIterating() throws Exception { assertEquals("[\"foo\", \"bar\"]", eval("$h.each {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each {|pair| }")); assertEquals("[\"foo\", \"bar\"]", eval("$h.each_pair {|pair| p pair}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_pair {|pair| }")); assertEquals("\"foo\"", eval("$h.each_key {|k| p k}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_key {|k| }")); assertEquals("\"bar\"", eval("$h.each_value {|v| p v}")); assertEquals("{\"foo\"=>\"bar\"}", eval("p $h.each_value {|v| }")); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/TestRubyHash.java/buggy/test/org/jruby/test/TestRubyHash.java
throw new PropertyException("Cannot set the value of a function: " + _vname);
throw new PropertyException("Cannot set the value of a function: " + getVariableName());
public void setValue (Context c, Object v) throws PropertyException { throw new PropertyException("Cannot set the value of a function: " + _vname); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/FunctionVariable.java/buggy/webmacro/src/org/webmacro/engine/FunctionVariable.java
return "function:" + _vname;
return "function:" + getVariableName();
public String toString () { return "function:" + _vname; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/976cc762ab65b58fbb5a81d83d913780b9d31fd4/FunctionVariable.java/buggy/webmacro/src/org/webmacro/engine/FunctionVariable.java
public DefaultMethod(ScopeNode body, ArgsNode argsNode, Visibility visibility, RubyModule module) {
public DefaultMethod(ScopeNode body, ArgsNode argsNode, Visibility visibility, ArrayStack moduleStack) {
public DefaultMethod(ScopeNode body, ArgsNode argsNode, Visibility visibility, RubyModule module) { super(visibility); this.body = body; this.argsNode = argsNode; this.module = module; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java
this.module = module;
this.moduleStack = moduleStack;
public DefaultMethod(ScopeNode body, ArgsNode argsNode, Visibility visibility, RubyModule module) { super(visibility); this.body = body; this.argsNode = argsNode; this.module = module; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java
context.pushClass(module);
ArrayStack oldStack = context.getClassStack(); context.setClassStack(moduleStack);
public IRubyObject call(Ruby runtime, IRubyObject receiver, String name, IRubyObject[] args, boolean noSuper) { ThreadContext context = runtime.getCurrentContext(); RubyProc optionalBlockArg = null; if (argsNode.getBlockArgNode() != null && context.isBlockGiven()) { optionalBlockArg = RubyProc.newProc(runtime); } context.getScopeStack().push(); if (body.getLocalNames() != null) { context.getScopeStack().resetLocalVariables(body.getLocalNames()); } context.pushDynamicVars(); context.pushClass(module); try { if (argsNode != null) { prepareArguments(runtime, receiver, args); } if (optionalBlockArg != null) { context.getScopeStack().setValue(argsNode.getBlockArgNode().getCount(), optionalBlockArg); } traceCall(runtime, receiver, name); return receiver.eval(body.getBodyNode()); } catch (ReturnJump rj) { if (rj.getTarget() == this) { return rj.getReturnValue(); } throw rj; } finally { context.popClass(); context.popDynamicVars(); context.getScopeStack().pop(); traceReturn(runtime, receiver, name); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java
context.popClass();
context.setClassStack(oldStack);
public IRubyObject call(Ruby runtime, IRubyObject receiver, String name, IRubyObject[] args, boolean noSuper) { ThreadContext context = runtime.getCurrentContext(); RubyProc optionalBlockArg = null; if (argsNode.getBlockArgNode() != null && context.isBlockGiven()) { optionalBlockArg = RubyProc.newProc(runtime); } context.getScopeStack().push(); if (body.getLocalNames() != null) { context.getScopeStack().resetLocalVariables(body.getLocalNames()); } context.pushDynamicVars(); context.pushClass(module); try { if (argsNode != null) { prepareArguments(runtime, receiver, args); } if (optionalBlockArg != null) { context.getScopeStack().setValue(argsNode.getBlockArgNode().getCount(), optionalBlockArg); } traceCall(runtime, receiver, name); return receiver.eval(body.getBodyNode()); } catch (ReturnJump rj) { if (rj.getTarget() == this) { return rj.getReturnValue(); } throw rj; } finally { context.popClass(); context.popDynamicVars(); context.getScopeStack().pop(); traceReturn(runtime, receiver, name); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java
return new DefaultMethod(body, argsNode, getVisibility(), module);
return new DefaultMethod(body, argsNode, getVisibility(), moduleStack);
public ICallable dup() { return new DefaultMethod(body, argsNode, getVisibility(), module); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7fd129dfcc9660fb6d3c382cc48a2692d03890ca/DefaultMethod.java/clean/src/org/jruby/internal/runtime/methods/DefaultMethod.java
renderer.makeQuantumManager();
renderer.updateQuantumManager();
public void setQuantumStrategy(int family, double coefficient, int bitResolution) { RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(family, qd.pixelType, coefficient, qd.cdStart, qd.cdEnd, bitResolution); rd.setQuantumDef(newQd); renderer.makeQuantumManager(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/54db6819abeb15722fb59b84d5f3a2d7298b41cb/RenderingControlImpl.java/clean/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlImpl.java
if (pattern.endsWith("/")) { patternEndsWithPathDelimeter = true; }
public Glob(String pattern) { this.pattern = new File(pattern); //.getAbsoluteFile(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af80e8f70b3c6d7fab314143b5f1e641350602b1/Glob.java/clean/src/org/jruby/util/Glob.java