rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
{
try { errorIfNullRenderingDef();
public void saveCurrentSettings() { rwl.writeLock().lock(); { // TODO vararg save method. pixMetaSrv.saveRndSettings(rendDefObj); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void saveCurrentSettings() { rwl.writeLock().lock(); { // TODO vararg save method. pixMetaSrv.saveRndSettings(rendDefObj); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { rwl.writeLock().lock(); errorIfInvalidState();
public void setActive(int w, boolean active) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); ChannelBinding[] cb = renderer.getChannelBindings(); cb[w].setActive(Boolean.valueOf(active)); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setActive(int w, boolean active) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); ChannelBinding[] cb = renderer.getChannelBindings(); cb[w].setActive(Boolean.valueOf(active)); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setChannelWindow(int w, double start, double end) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setChannelWindow(w, start, end); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setChannelWindow(int w, double start, double end) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setChannelWindow(w, start, end); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setCodomainInterval(int start, int end) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setCodomainInterval(start, end); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setCodomainInterval(int start, int end) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setCodomainInterval(start, end); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setDefaultT(int t) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setDefaultT(t); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setDefaultT(int t) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setDefaultT(t); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setDefaultZ(int z) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setDefaultZ(z); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setDefaultZ(int z) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setDefaultZ(z); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setModel(int model) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setModel(model); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setModel(int model) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setModel(model); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction)
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction)
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setQuantizationMap(w, family, coefficient, noiseReduction); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setQuantizationMap(w, family, coefficient, noiseReduction); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setQuantizationMap(int w, int family, double coefficient, boolean noiseReduction) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setQuantizationMap(w, family, coefficient, noiseReduction); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void setRGBA(int w, int red, int green, int blue, int alpha) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setRGBA(w, red, green, blue, alpha); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
} finally { rwl.writeLock().unlock();
public void setRGBA(int w, int red, int green, int blue, int alpha) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setRGBA(w, red, green, blue, alpha); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void setRGBA(int w, int red, int green, int blue, int alpha) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.setRGBA(w, red, green, blue, alpha); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{ if (renderer == null) throw new IllegalStateException(NULL_RENDERER);
try { errorIfInvalidState();
public void updateCodomainMap(CodomainMapContext mapCtx) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.getCodomainChain().update(mapCtx.copy()); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
public void updateCodomainMap(CodomainMapContext mapCtx) { rwl.writeLock().lock(); { if (renderer == null) throw new IllegalStateException(NULL_RENDERER); renderer.getCodomainChain().update(mapCtx.copy()); } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
{
try {
public void usePixels(Pixels pixels) { rwl.writeLock().lock(); { this.pixelsObj = pixels; this.renderer = null; } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
rwl.writeLock().unlock();
if (log.isDebugEnabled()) log.debug("Using pixels: "+this.pixelsObj);
public void usePixels(Pixels pixels) { rwl.writeLock().lock(); { this.pixelsObj = pixels; this.renderer = null; } rwl.writeLock().unlock(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngineImpl.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
super(runtime, null, superClass, runtime.getObject(), "Class", RubyClass.class);
super(runtime, null, superClass, runtime.getObject().getCRef(), "Class", RubyClass.class);
public ClassMetaClass(IRuby runtime, RubyClass superClass) { super(runtime, null, superClass, runtime.getObject(), "Class", RubyClass.class); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/ClassMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/ClassMetaClass.java
if (target == null) return;
void showMenu(int x, int y) { TreePopupMenu menu = view.getPopupMenu(); DataObject target = getDataObject(); String txt = TreePopupMenu.BROWSE; boolean b = false; if (target instanceof ImageSummary) { txt = TreePopupMenu.VIEW; b = true; } menu.setViewText(txt); menu.setClassifyEnabled(b); menu.show(this, x, y); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f8f7dcdd74bccad5e7a9d969c7ab47c1cfee6015/SearchResultsPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/SearchResultsPane.java
throws IOException, QuantizationException
throws IOException, QuantizationException
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the rendering context for the current invocation. renderer = ctx; RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane. initAxesSize(planeDef, renderer.getMetadata()); //Process each active wavelength. If their number N > 1, then //process N-1 async and one in the current thread. If N = 1, //just use the current thread. RenderHSBWaveTask[] tasks = makeRndTasks(planeDef); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//j.m while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]); //j.m exec(tasks[n]); RGBBuffer rndDataBuf = null; byte[] red = null, green = null, blue = null; if (n == 0) { rndDataBuf = (RGBBuffer) tasks[0].call(); red = rndDataBuf.getRedBand(); green = rndDataBuf.getGreenBand(); blue = rndDataBuf.getBlueBand(); } //Wait for all forked tasks (if any) to complete. //When a task completes, assemble its RGB buffer into rndDataBuf. RGBBuffer taskBuffer; int x1, x2, pix; byte[] r, g, b; for (n = 1; n < rndTskFutures.length; ++n) { try { taskBuffer = (RGBBuffer) rndTskFutures[n].get();//j.m getResult(); r = taskBuffer.getRedBand(); g = taskBuffer.getGreenBand(); b = taskBuffer.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pix = sizeX1*x2+x1; red[pix] = (byte) (red[pix]+r[pix]); green[pix] = (byte) (green[pix]+g[pix]); blue[pix] = (byte) (blue[pix]+b[pix]); } } } catch (Exception e) { if (e instanceof QuantizationException) throw (QuantizationException) e; throw (RuntimeException) e; //B/c call() only throws QuantizationException, it must be RE. } } performanceStats.endRendering(); if (rndDataBuf == null) //No active channel, return a black image. return new RGBBuffer(sizeX1, sizeX2); //Done. return rndDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/HSBStrategy.java/buggy/components/rendering/src/omeis/providers/re/HSBStrategy.java
renderer = ctx; RenderingStats performanceStats = renderer.getStats();
renderer = ctx; RenderingStats performanceStats = renderer.getStats(); Pixels metadata = renderer.getMetadata(); initAxesSize(planeDef, metadata); performanceStats.startMalloc(); RGBBuffer buf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc();
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the rendering context for the current invocation. renderer = ctx; RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane. initAxesSize(planeDef, renderer.getMetadata()); //Process each active wavelength. If their number N > 1, then //process N-1 async and one in the current thread. If N = 1, //just use the current thread. RenderHSBWaveTask[] tasks = makeRndTasks(planeDef); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//j.m while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]); //j.m exec(tasks[n]); RGBBuffer rndDataBuf = null; byte[] red = null, green = null, blue = null; if (n == 0) { rndDataBuf = (RGBBuffer) tasks[0].call(); red = rndDataBuf.getRedBand(); green = rndDataBuf.getGreenBand(); blue = rndDataBuf.getBlueBand(); } //Wait for all forked tasks (if any) to complete. //When a task completes, assemble its RGB buffer into rndDataBuf. RGBBuffer taskBuffer; int x1, x2, pix; byte[] r, g, b; for (n = 1; n < rndTskFutures.length; ++n) { try { taskBuffer = (RGBBuffer) rndTskFutures[n].get();//j.m getResult(); r = taskBuffer.getRedBand(); g = taskBuffer.getGreenBand(); b = taskBuffer.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pix = sizeX1*x2+x1; red[pix] = (byte) (red[pix]+r[pix]); green[pix] = (byte) (green[pix]+g[pix]); blue[pix] = (byte) (blue[pix]+b[pix]); } } } catch (Exception e) { if (e instanceof QuantizationException) throw (QuantizationException) e; throw (RuntimeException) e; //B/c call() only throws QuantizationException, it must be RE. } } performanceStats.endRendering(); if (rndDataBuf == null) //No active channel, return a black image. return new RGBBuffer(sizeX1, sizeX2); //Done. return rndDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/HSBStrategy.java/buggy/components/rendering/src/omeis/providers/re/HSBStrategy.java
initAxesSize(planeDef, renderer.getMetadata()); RenderHSBWaveTask[] tasks = makeRndTasks(planeDef); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; ExecutorService processor = Executors.newCachedThreadPool(); while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]); RGBBuffer rndDataBuf = null; byte[] red = null, green = null, blue = null; if (n == 0) { rndDataBuf = (RGBBuffer) tasks[0].call(); red = rndDataBuf.getRedBand(); green = rndDataBuf.getGreenBand(); blue = rndDataBuf.getBlueBand(); } RGBBuffer taskBuffer; int x1, x2, pix; byte[] r, g, b; for (n = 1; n < rndTskFutures.length; ++n) { try { taskBuffer = (RGBBuffer) rndTskFutures[n].get(); r = taskBuffer.getRedBand(); g = taskBuffer.getGreenBand(); b = taskBuffer.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pix = sizeX1*x2+x1; red[pix] = (byte) (red[pix]+r[pix]); green[pix] = (byte) (green[pix]+g[pix]); blue[pix] = (byte) (blue[pix]+b[pix]); } } } catch (Exception e) { if (e instanceof QuantizationException) throw (QuantizationException) e; throw (RuntimeException) e; } } performanceStats.endRendering(); if (rndDataBuf == null) return new RGBBuffer(sizeX1, sizeX2); return rndDataBuf;
render(buf, planeDef); return buf;
RGBBuffer render(Renderer ctx, PlaneDef planeDef) throws IOException, QuantizationException { //Set the rendering context for the current invocation. renderer = ctx; RenderingStats performanceStats = renderer.getStats(); //Initialize sizeX1 and sizeX2 according to the plane. initAxesSize(planeDef, renderer.getMetadata()); //Process each active wavelength. If their number N > 1, then //process N-1 async and one in the current thread. If N = 1, //just use the current thread. RenderHSBWaveTask[] tasks = makeRndTasks(planeDef); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//j.m while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]); //j.m exec(tasks[n]); RGBBuffer rndDataBuf = null; byte[] red = null, green = null, blue = null; if (n == 0) { rndDataBuf = (RGBBuffer) tasks[0].call(); red = rndDataBuf.getRedBand(); green = rndDataBuf.getGreenBand(); blue = rndDataBuf.getBlueBand(); } //Wait for all forked tasks (if any) to complete. //When a task completes, assemble its RGB buffer into rndDataBuf. RGBBuffer taskBuffer; int x1, x2, pix; byte[] r, g, b; for (n = 1; n < rndTskFutures.length; ++n) { try { taskBuffer = (RGBBuffer) rndTskFutures[n].get();//j.m getResult(); r = taskBuffer.getRedBand(); g = taskBuffer.getGreenBand(); b = taskBuffer.getBlueBand(); for (x2 = 0; x2 < sizeX2; ++x2) { for (x1 = 0; x1 < sizeX1; ++x1) { pix = sizeX1*x2+x1; red[pix] = (byte) (red[pix]+r[pix]); green[pix] = (byte) (green[pix]+g[pix]); blue[pix] = (byte) (blue[pix]+b[pix]); } } } catch (Exception e) { if (e instanceof QuantizationException) throw (QuantizationException) e; throw (RuntimeException) e; //B/c call() only throws QuantizationException, it must be RE. } } performanceStats.endRendering(); if (rndDataBuf == null) //No active channel, return a black image. return new RGBBuffer(sizeX1, sizeX2); //Done. return rndDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/HSBStrategy.java/buggy/components/rendering/src/omeis/providers/re/HSBStrategy.java
public CGCILoader(HiViewer viewer, Set images)
public CGCILoader(HiViewer viewer, Set images, boolean refresh)
public CGCILoader(HiViewer viewer, Set images) { super(viewer); this.images = images; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CGCILoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CGCILoader.java
this.refresh = refresh;
public CGCILoader(HiViewer viewer, Set images) { super(viewer); this.images = images; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CGCILoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CGCILoader.java
viewer.setHierarchyRoots((Set) result, false);
viewer.setHierarchyRoots((Set) result, false, refresh);
public void handleResult(Object result) { if (viewer.getState() == HiViewer.DISCARDED) return; //Async cancel. viewer.setHierarchyRoots((Set) result, false); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/CGCILoader.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/CGCILoader.java
this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); }
this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); }
EvalThread(String name, String script) { this.name = RubyString.newString(ruby, name); this.script = RubyString.newString(ruby, script); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
ruby.getRuntime().loadScript(name, script, false); out.close(); }
try { ruby.getRuntime().loadScript(name, script, false); } finally { out.close(); } }
public void run() { ruby.getRuntime().loadScript(name, script, false); out.close(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
super(name); }
super(name); }
public TestRubyBase(String name) { super(name); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
pipeIn = new PipedInputStream(); in = new BufferedReader(new InputStreamReader(pipeIn));
pipeIn = new PipedInputStream(); in = new BufferedReader(new InputStreamReader(pipeIn));
protected String eval(String script) { pipeIn = new PipedInputStream(); in = new BufferedReader(new InputStreamReader(pipeIn)); String output = null; StringBuffer result = new StringBuffer(); try { out = new PrintStream(new PipedOutputStream(pipeIn), true); // ruby.getRuntime().setOutputStream(out); // ruby.getRuntime().setErrorStream(out); RubyIO lStream = new RubyIO(ruby); lStream.initIO(null, out, null); ruby.setGlobalVar("$stdout", lStream); ruby.setGlobalVar("$>", lStream); lStream = (RubyIO) ruby.getGlobalVar("$stderr"); lStream.initIO(null, out, null); ruby.setGlobalVar("$stderr", lStream); new EvalThread("test", script).start(); while ((output = in.readLine()) != null) { result.append(output); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } return result.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
String output = null; StringBuffer result = new StringBuffer(); try { out = new PrintStream(new PipedOutputStream(pipeIn), true); RubyIO lStream = new RubyIO(ruby); lStream.initIO(null, out, null); ruby.setGlobalVar("$stdout", lStream); ruby.setGlobalVar("$>", lStream); lStream = (RubyIO) ruby.getGlobalVar("$stderr"); lStream.initIO(null, out, null); ruby.setGlobalVar("$stderr", lStream); new EvalThread("test", script).start(); while ((output = in.readLine()) != null) { result.append(output); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } return result.toString(); }
String output = null; StringBuffer result = new StringBuffer(); try { out = new PrintStream(new PipedOutputStream(pipeIn), true); RubyIO lStream = new RubyIO(ruby); lStream.initIO(null, out, null); ruby.setGlobalVar("$stdout", lStream); ruby.setGlobalVar("$>", lStream); lStream = (RubyIO) ruby.getGlobalVar("$stderr"); lStream.initIO(null, out, null); ruby.setGlobalVar("$stderr", lStream); new EvalThread("test", script).start(); while ((output = in.readLine()) != null) { result.append(output); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } return result.toString(); }
protected String eval(String script) { pipeIn = new PipedInputStream(); in = new BufferedReader(new InputStreamReader(pipeIn)); String output = null; StringBuffer result = new StringBuffer(); try { out = new PrintStream(new PipedOutputStream(pipeIn), true); // ruby.getRuntime().setOutputStream(out); // ruby.getRuntime().setErrorStream(out); RubyIO lStream = new RubyIO(ruby); lStream.initIO(null, out, null); ruby.setGlobalVar("$stdout", lStream); ruby.setGlobalVar("$>", lStream); lStream = (RubyIO) ruby.getGlobalVar("$stderr"); lStream.initIO(null, out, null); ruby.setGlobalVar("$stderr", lStream); new EvalThread("test", script).start(); while ((output = in.readLine()) != null) { result.append(output); } } catch (Exception ex) { throw new RuntimeException(ex.getMessage()); } return result.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
try { if (in != null) in.close(); if (out != null) out.close(); } catch (IOException ex) { } }
try { if (in != null) in.close(); if (out != null) out.close(); } catch (IOException ex) { } }
public void tearDown() { try { if (in != null) in.close(); if (out != null) out.close(); } catch (IOException ex) { } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f6ab64381d604b2fe48f73bcfae05c88ebb3ceb/TestRubyBase.java/buggy/org/jruby/test/TestRubyBase.java
handleShowProperties((ShowProperties) ae);
handleShowProperties((ShowProperties) ae);
public void eventFired(AgentEvent ae) { if (ae instanceof ShowProperties) handleShowProperties((ShowProperties) ae); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a4d9266809d3b97be3f024727acd05038573d4c0/TreeViewerAgent.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/TreeViewerAgent.java
for (Enumeration enum = _request.getParameterNames(); enum.hasMoreElements();)
for (Enumeration enumeration = _request.getParameterNames(); enumeration.hasMoreElements();)
final public String toString () { StringBuffer sb = new StringBuffer(); String eol = java.lang.System.getProperty("line.separator"); for (Enumeration enum = _request.getParameterNames(); enum.hasMoreElements();) { String key = (String) enum.nextElement(); String[] value = _request.getParameterValues(key); for (int x = 0; value != null && x < value.length; x++) { sb.append(key).append("=").append(value[x]).append(eol); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/66b6fa23bd4cbc41e75a36f1705ebb0db3d2f013/Form.java/buggy/webmacro/src/org/webmacro/servlet/Form.java
String key = (String) enum.nextElement();
String key = (String) enumeration.nextElement();
final public String toString () { StringBuffer sb = new StringBuffer(); String eol = java.lang.System.getProperty("line.separator"); for (Enumeration enum = _request.getParameterNames(); enum.hasMoreElements();) { String key = (String) enum.nextElement(); String[] value = _request.getParameterValues(key); for (int x = 0; value != null && x < value.length; x++) { sb.append(key).append("=").append(value[x]).append(eol); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/66b6fa23bd4cbc41e75a36f1705ebb0db3d2f013/Form.java/buggy/webmacro/src/org/webmacro/servlet/Form.java
return sb.toString(); }
final public String toString () { StringBuffer sb = new StringBuffer(); String eol = java.lang.System.getProperty("line.separator"); for (Enumeration enum = _request.getParameterNames(); enum.hasMoreElements();) { String key = (String) enum.nextElement(); String[] value = _request.getParameterValues(key); for (int x = 0; value != null && x < value.length; x++) { sb.append(key).append("=").append(value[x]).append(eol); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/66b6fa23bd4cbc41e75a36f1705ebb0db3d2f013/Form.java/buggy/webmacro/src/org/webmacro/servlet/Form.java
int numberOfMillisecondsInTheFuture = 5000;
int numberOfMillisecondsInTheFuture = 10000;
public void loadPlugins() { // Add presence and message listeners // we listen for these to force open a 1-1 peer chat window from other operators if // one isn't already open PacketFilter workspaceMessageFilter = new PacketTypeFilter(Message.class); // Add the packetListener to this instance SparkManager.getSessionManager().getConnection().addPacketListener(this, workspaceMessageFilter); // Make presence available to anonymous requests, if from anonymous user in the system. PacketListener workspacePresenceListener = new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence != null && presence.getProperty("anonymous") != null) { boolean isAvailable = statusBox.getPresence().getMode() == Presence.Mode.available; Presence reply = new Presence(Presence.Type.available); if (!isAvailable) { reply.setType(Presence.Type.unavailable); } reply.setTo(presence.getFrom()); SparkManager.getSessionManager().getConnection().sendPacket(reply); } } }; SparkManager.getSessionManager().getConnection().addPacketListener(workspacePresenceListener, new PacketTypeFilter(Presence.class)); // Send Available status final Presence presence = SparkManager.getWorkspace().getStatusBar().getPresence(); SparkManager.getSessionManager().changePresence(presence); // Load Plugins SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(100); } catch (InterruptedException e) { Log.error("Unable to sleep thread.", e); } return "ok"; } public void finished() { final PluginManager pluginManager = PluginManager.getInstance(); pluginManager.loadPlugins(); pluginManager.initializePlugins(); } }; worker.start(); int numberOfMillisecondsInTheFuture = 5000; // 5 sec Date timeToRun = new Date(System.currentTimeMillis() + numberOfMillisecondsInTheFuture); Timer timer = new Timer(); timer.schedule(new TimerTask() { public void run() { SwingUtilities.invokeLater(new Runnable() { public void run() { final Iterator offlineMessage = offlineMessages.iterator(); while (offlineMessage.hasNext()) { Message offline = (Message)offlineMessage.next(); handleOfflineMessage(offline); } } }); } }, timeToRun); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/e3a7a307a8f9a8e562406bb4e0820d56a5810759/Workspace.java/buggy/src/java/org/jivesoftware/spark/Workspace.java
public ModelBased map (Filterable source){
public ModelBased map (Filterable source){
public ModelBased map (Filterable source){ // TODO take any object. just like filter() Filterable o = this.filter("MAPPING...",source); return (ModelBased) model2target.get(o); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0aa4af63b981e511b5fb82621bc6293945ca0d64/ModelMapper.java/clean/components/common/src/ome/util/ModelMapper.java
public AnnotateAction(TreeViewer model) { super(model); name = NAME; //putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); IconManager im = IconManager.getInstance(); putValue(Action.SMALL_ICON, im.getIcon(IconManager.ANNOTATION)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/AnnotateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/AnnotateAction.java
description = DESCRIPTION;
public AnnotateAction(TreeViewer model) { super(model); name = NAME; //putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); IconManager im = IconManager.getInstance(); putValue(Action.SMALL_ICON, im.getIcon(IconManager.ANNOTATION)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/AnnotateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/AnnotateAction.java
Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData));
setValuesFor(selectedDisplay.getUserObject());
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); return; } Browser browser = model.getSelectedBrowser(); if (browser != null) { if (browser.getSelectedDisplays().length > 1) { Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData)); return; } } Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/AnnotateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/AnnotateAction.java
Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData));
setValuesFor(selectedDisplay.getUserObject());
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); return; } Browser browser = model.getSelectedBrowser(); if (browser != null) { if (browser.getSelectedDisplays().length > 1) { Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData)); return; } } Object ho = selectedDisplay.getUserObject(); setEnabled((ho instanceof ImageData) || (ho instanceof DatasetData)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/AnnotateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/AnnotateAction.java
return (int) (a*(x-tW)+b);
return (int) (a*y+b);
int convertGraphicsIntoReal(int x) { int b = control.getGlobalMaximum(); double a = (double) (control.getGlobalMinimum()-b)/(double) rangeGraphics; return (int) (a*(x-tW)+b); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5f198f3677f9aa6bbdd6719a3abfc6406f1479/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
public void setPaneIndex(int index)
public void setPaneIndex(int index, ImageDisplay node)
public void setPaneIndex(int index) { if (index != SEARCH_PANEL && index != ANNOTATION_PANEL) throw new IllegalArgumentException("Pane index not valid."); if (model.getPaneIndex() == index) return; model.setPaneIndex(index); view.onDisplayChange( model.getParentModel().getBrowser().getSelectedDisplay()); view.setSelectedPane(index); if (index != ANNOTATION_PANEL) discardAnnotation(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ClipBoardComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardComponent.java
view.onDisplayChange( model.getParentModel().getBrowser().getSelectedDisplay());
public void setPaneIndex(int index) { if (index != SEARCH_PANEL && index != ANNOTATION_PANEL) throw new IllegalArgumentException("Pane index not valid."); if (model.getPaneIndex() == index) return; model.setPaneIndex(index); view.onDisplayChange( model.getParentModel().getBrowser().getSelectedDisplay()); view.setSelectedPane(index); if (index != ANNOTATION_PANEL) discardAnnotation(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ClipBoardComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardComponent.java
if (node == null) view.onDisplayChange( model.getParentModel().getBrowser().getSelectedDisplay()); else firePropertyChange(ClipBoard.LOCALIZE_IMAGE_DISPLAY, null, node);
public void setPaneIndex(int index) { if (index != SEARCH_PANEL && index != ANNOTATION_PANEL) throw new IllegalArgumentException("Pane index not valid."); if (model.getPaneIndex() == index) return; model.setPaneIndex(index); view.onDisplayChange( model.getParentModel().getBrowser().getSelectedDisplay()); view.setSelectedPane(index); if (index != ANNOTATION_PANEL) discardAnnotation(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b4992016524102ee0a5c7465d4cc7a94e9ffce2d/ClipBoardComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/ClipBoardComponent.java
threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self);
threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self);
public void visitForNode(ForNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { SourcePosition position = threadContext.getPosition(); Block tmpBlock = threadContext.beginCallArgs(); IRubyObject recv = null; try { recv = eval(iVisited.getIterNode()); } finally { threadContext.setPosition(position); threadContext.endCallArgs(tmpBlock); } result = recv.getMetaClass().call(recv, "each", IRubyObject.NULL_ARRAY, CallType.NORMAL); return; } catch (RetryJump retry) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/95597cee751b3d52aa89d777e164e620f649ade9/EvaluateVisitor.java/clean/src/org/jruby/evaluator/EvaluateVisitor.java
threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self);
threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self);
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode()), self); threadContext.getIterStack().push(Iter.ITER_PRE); try { while (true) { try { result = eval(iVisited.getIterNode()); return; } catch (RetryJump rExcptn) { } } } catch (BreakJump bExcptn) { IRubyObject breakValue = bExcptn.getBreakValue(); result = breakValue == null ? runtime.getNil() : breakValue; } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().pop(); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/95597cee751b3d52aa89d777e164e620f649ade9/EvaluateVisitor.java/clean/src/org/jruby/evaluator/EvaluateVisitor.java
super.paintComponent(g);
public void paintComponent(Graphics g) { Graphics2D g2D = (Graphics2D) g; g2D.setColor(bgColor); g2D.fillRect(0, 0, WIDTH, HEIGHT); Font font = g2D.getFont(); FontMetrics fontMetrics = g2D.getFontMetrics(); int hFont = fontMetrics.getHeight(); Rectangle2D rInput = font.getStringBounds("(1) Input", g2D.getFontRenderContext()); Rectangle2D rUpper= font.getStringBounds("upper", g2D.getFontRenderContext()); int wInput = (int) rInput.getWidth(); int wUpper = (int) rUpper.getWidth(); // grid AffineTransform transform = new AffineTransform(); // 140/10 = 14 then middle = 14/2 transform.translate(leftBorder+70, topBorder+70); transform.scale(1, -1); transform.scale(10, 10); g2D.setPaint(gridColor); GeneralPath path = new GeneralPath(); for (int i = -7; i <= 7; i++) { path.moveTo(i, -7); path.lineTo(i, 7); } for (int i = -7; i <= 7; i++) { path.moveTo(-7, i); path.lineTo(7, i); } g2D.draw(transform.createTransformedShape(path)); g2D.setColor(axisColor); //y-axis g2D.drawLine(leftBorder, topBorder-8, leftBorder, tS+5); g2D.drawLine(leftBorder, topBorder-8, leftBorder-3, topBorder-5); g2D.drawLine(leftBorder, topBorder-8, leftBorder+3, topBorder-5); g2D.drawLine(leftBorder-5, topBorder, leftBorder, topBorder); //x-axis g2D.drawLine(leftBorder-5, tS, lS+8, tS); g2D.drawLine(lS+5, tS-3, lS+8, tS); g2D.drawLine(lS+5, tS+3, lS+8, tS); g2D.drawLine(lS, tS, lS, tS+5); //output cursor start int xStartOutputPoints[] = {xStartOutput1, xStartOutput2, xStartOutput3}; int yStartOutputPoints[] = {yStartOutput1, yStartOutput2, yStartOutput3}; GeneralPath filledPolygonStartOutput = new GeneralPath(); filledPolygonStartOutput.moveTo(xStartOutputPoints[0], yStartOutputPoints[0]); for (int index = 1; index < xStartOutputPoints.length; index++) filledPolygonStartOutput.lineTo(xStartOutputPoints[index], yStartOutputPoints[index]); filledPolygonStartOutput.closePath(); g2D.setColor(ostartColor); g2D.fill(filledPolygonStartOutput); //output cursor end output int xEndOutputPoints[] = {xEndOutput1, xEndOutput2, xEndOutput3}; int yEndOutputPoints[] = {yEndOutput1, yEndOutput2, yEndOutput3}; GeneralPath filledPolygonEndOutput = new GeneralPath(); filledPolygonEndOutput.moveTo(xEndOutputPoints[0], yEndOutputPoints[0]); for (int index = 1; index < xEndOutputPoints.length; index++) filledPolygonEndOutput.lineTo(xEndOutputPoints[index], yEndOutputPoints[index]); filledPolygonEndOutput.closePath(); g2D.setColor(oendColor); g2D.fill(filledPolygonEndOutput); g2D.drawString("lower", leftBorder+10, tS+hFont); g2D.drawString("upper", lS-wUpper-10, tS+hFont); g2D.drawString("(1) Input", leftBorder+square/2-wInput/2, tS+bottomBorder/2+hFont); g2D.drawLine(rStart-1, (int) startPt.getY(), rStart-1, tS2); g2D.drawLine(rEnd, tS2, rEnd, (int) endPt.getY()); //set line color g2D.setColor(lineColor); g2D.setStroke(new BasicStroke(1.5f)); //drawline g2D.drawLine(leftBorder+1, (int) startPt.getY(), rStart-1, (int) startPt.getY()); g2D.drawLine(rEnd+1, (int) endPt.getY(), lS, (int) endPt.getY()); //Fixed line. g2D.setColor(fixedLineColor); g2D.drawLine(rStart, tS2, rEnd, tS2); if (isSelected) { g2D.setColor(borderColor); g2D.draw(new Rectangle2D.Double(0, 0, WIDTH, HEIGHT)); } else { g2D.setColor(layerColor); g2D.fillRect(0, 0, WIDTH, HEIGHT); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a28b54c142c80cf786f76c45b6be256d92fd0bb/PlaneSlicingPanel.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/PlaneSlicingPanel.java
return Collections.EMPTY_LIST;
return EMPTY_LIST;
public List childNodes() { return Collections.EMPTY_LIST; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/VCallNode.java/clean/src/org/jruby/ast/VCallNode.java
throw lastCallType == CallType.VARIABLE ? runtime.newNameError(msg) : runtime.newNoMethodError(msg);
throw lastCallType == CallType.VARIABLE ? runtime.newNameError(msg, name) : runtime.newNoMethodError(msg, name);
public static IRubyObject method_missing(IRubyObject recv, IRubyObject[] args) { IRuby runtime = recv.getRuntime(); if (args.length == 0) { throw recv.getRuntime().newArgumentError("no id given"); } String name = args[0].asSymbol(); String description = recv.callMethod(runtime.getCurrentContext(), "inspect").toString(); boolean noClass = description.length() > 0 && description.charAt(0) == '#'; ThreadContext tc = runtime.getCurrentContext(); Visibility lastVis = tc.getLastVisibility(); CallType lastCallType = tc.getLastCallType(); String format = lastVis.errorMessageFormat(lastCallType, name); String msg = new PrintfFormat(format).sprintf(new Object[] { name, description, noClass ? "" : ":", noClass ? "" : recv.getType().getName()}); throw lastCallType == CallType.VARIABLE ? runtime.newNameError(msg) : runtime.newNoMethodError(msg); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyKernel.java/buggy/src/org/jruby/RubyKernel.java
throw runtime.newNameError(message);
throw runtime.newNameError(message, tag);
public static IRubyObject rbThrow(IRubyObject recv, IRubyObject[] args) { IRuby runtime = recv.getRuntime(); String tag = args[0].asSymbol(); String[] catches = runtime.getCurrentContext().getActiveCatches(); String message = "uncaught throw '" + tag + '\''; //Ordering of array traversal not important, just intuitive for (int i = catches.length - 1 ; i >= 0 ; i--) { if (tag.equals(catches[i])) { //Catch active, throw for catch to handle JumpException je = new JumpException(JumpException.JumpType.ThrowJump); je.setPrimaryData(tag); je.setSecondaryData(args.length > 1 ? args[1] : runtime.getNil()); throw je; } } //No catch active for this throw throw runtime.newNameError(message); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/RubyKernel.java/buggy/src/org/jruby/RubyKernel.java
getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control N"), "searchContacts"); getActionMap().put("searchContacts", new AbstractAction("searchContacts") { public void actionPerformed(ActionEvent evt) { SparkManager.getUserManager().searchContacts("", SparkManager.getChatManager().getChatContainer()); } });
private void addKeyNavigation() { KeyStroke leftStroke = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0); String leftStrokeString = org.jivesoftware.spark.util.StringUtils.keyStroke2String(leftStroke); // Handle Left Arrow this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("alt " + leftStrokeString + ""), "navigateLeft"); this.getActionMap().put("navigateLeft", new AbstractAction("navigateLeft") { public void actionPerformed(ActionEvent evt) { int selectedIndex = getSelectedIndex(); if (selectedIndex > 0) { setSelectedIndex(selectedIndex - 1); } else { setSelectedIndex(getTabCount() - 1); } } }); KeyStroke rightStroke = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0); String rightStrokeString = org.jivesoftware.spark.util.StringUtils.keyStroke2String(rightStroke); // Handle Right Arrow this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("alt " + rightStrokeString + ""), "navigateRight"); this.getActionMap().put("navigateRight", new AbstractAction("navigateRight") { public void actionPerformed(ActionEvent evt) { int selectedIndex = getSelectedIndex(); if (selectedIndex > -1) { int count = getTabCount(); if (selectedIndex == (count - 1)) { setSelectedIndex(0); } else { setSelectedIndex(selectedIndex + 1); } } } }); this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "escape"); this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("Ctrl W"), "escape"); this.getActionMap().put("escape", new AbstractAction("escape") { public void actionPerformed(ActionEvent evt) { closeActiveRoom(); } }); KeyStroke appleStroke = KeyStroke.getKeyStroke(Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), 0); String appleString = org.jivesoftware.spark.util.StringUtils.keyStroke2String(appleStroke); // Handle Apple Key W this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(appleString + "w"), "appleStroke"); this.getActionMap().put("appleStroke", new AbstractAction("appleStroke") { public void actionPerformed(ActionEvent evt) { closeActiveRoom(); } }); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } }
ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { closeTab(chatRoom);
public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
}
public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms);
ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } }
public void actionPerformed(ActionEvent e) { for (ChatRoom rooms : getStaleChatRooms()) { closeTab(rooms); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasJoined(room, userid); }
handleMessageNotification(chatRoom);
public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasJoined(room, userid); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
((ChatRoomListener)iter.next()).userHasLeft(room, userid);
((ChatRoomListener)iter.next()).userHasJoined(room, userid);
public void run() { final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasLeft(room, userid); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
try { final int index = indexOfComponent(room); if (index != -1) { room.increaseUnreadMessageCount(); int unreadMessageCount = room.getUnreadMessageCount(); String appendedMessage = ""; if (unreadMessageCount > 1) { appendedMessage = " (" + unreadMessageCount + ")"; } SparkTab tab = getTabAt(index); tab.getTitleLabel().setText(room.getTabTitle() + appendedMessage); if (room instanceof ChatRoomImpl) { checkNotificationPreferences(room); } makeTabRed(room); } boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex);
final Iterator iter = new HashSet(chatRoomListeners).iterator(); while (iter.hasNext()) { ((ChatRoomListener)iter.next()).userHasLeft(room, userid);
public void run() { try { final int index = indexOfComponent(room); if (index != -1) { room.increaseUnreadMessageCount(); int unreadMessageCount = room.getUnreadMessageCount(); String appendedMessage = ""; if (unreadMessageCount > 1) { appendedMessage = " (" + unreadMessageCount + ")"; } SparkTab tab = getTabAt(index); tab.getTitleLabel().setText(room.getTabTitle() + appendedMessage); // Check notifications. if (room instanceof ChatRoomImpl) { checkNotificationPreferences(room); } makeTabRed(room); } boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount();
boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame);
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex);
Log.error("Issue in ChatRooms with tab location.", ex);
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
SparkManager.getAlertManager().stopFlashing(chatFrame);
public void run() { try { int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); useTabDefault(room); tab.getTitleLabel().setText(room.getTabTitle()); room.clearUnreadMessageCount(); } } catch (Exception ex) { Log.error("Could not stop flashing for " + room + " because " + ex.getMessage(), ex); } SparkManager.getAlertManager().stopFlashing(chatFrame); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
final int index = indexOfComponent(room); if (index != -1) { room.increaseUnreadMessageCount(); int unreadMessageCount = room.getUnreadMessageCount(); String appendedMessage = ""; if (unreadMessageCount > 1) { appendedMessage = " (" + unreadMessageCount + ")"; } SparkTab tab = getTabAt(index); tab.getTitleLabel().setText(room.getTabTitle() + appendedMessage); if (room instanceof ChatRoomImpl) { checkNotificationPreferences(room); } makeTabRed(room); }
public void run() { try { boolean invokeFlash = SettingsManager.getLocalPreferences().isChatRoomNotificationsOn() || !(room instanceof GroupChatRoom); if (!chatFrame.isFocused() && invokeFlash) { SparkManager.getAlertManager().flashWindow(chatFrame); } } catch (Exception ex) { Log.error("Issue in ChatRooms with tab location.", ex); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/37d2c9c1910f8cad82e65ab912959a96c5121978/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
public RubyObject reverse_bang() { modify(); Collections.reverse(list); return this;
public RubyArray reverse_bang() { if (list.size() <= 1) { return nilArray(ruby); } modify(); Collections.reverse(list); return this;
public RubyObject reverse_bang() { modify(); Collections.reverse(list); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0335f0acaf11ca0feb41907f65e7274f8ed49fc3/RubyArray.java/clean/org/jruby/RubyArray.java
receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), new IRubyObject[] {value}, 0);
receiver.getInternalClass().call(receiver, iVisited.getName(), new IRubyObject[] {value}, 0);
public void visitCallNode(CallNode iVisited) { EvaluateVisitor evaluator = EvaluateVisitor.createVisitor(self); IRubyObject receiver = evaluator.eval(iVisited.getReceiverNode()); if (iVisited.getArgsNode() == null) { // attribute set. receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), new IRubyObject[] {value}, 0); } else { // element set RubyArray args = (RubyArray) evaluator.eval(iVisited.getArgsNode()); args.append(value); receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), args.toJavaArray(), 0); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/AssignmentVisitor.java/buggy/org/jruby/evaluator/AssignmentVisitor.java
receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), args.toJavaArray(), 0);
receiver.getInternalClass().call(receiver, iVisited.getName(), args.toJavaArray(), 0);
public void visitCallNode(CallNode iVisited) { EvaluateVisitor evaluator = EvaluateVisitor.createVisitor(self); IRubyObject receiver = evaluator.eval(iVisited.getReceiverNode()); if (iVisited.getArgsNode() == null) { // attribute set. receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), new IRubyObject[] {value}, 0); } else { // element set RubyArray args = (RubyArray) evaluator.eval(iVisited.getArgsNode()); args.append(value); receiver.getInternalClass().call(receiver.toRubyObject(), iVisited.getName(), args.toJavaArray(), 0); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/AssignmentVisitor.java/buggy/org/jruby/evaluator/AssignmentVisitor.java
env.getBrowserManager().addBrowser(controller);
public void loadDataset(int datasetID) { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset; final BrowserModel model = new BrowserModel(); model.setLayoutMethod(new NumColsLayoutMethod(8)); BrowserTopModel topModel = new BrowserTopModel(); BPalette modePalette = PaletteFactory.getMainPalette(model,topModel); topModel.addPalette("Modes",modePalette); BPalette paintPalette = PaletteFactory.getPaintModePalette(model,topModel); topModel.addPalette("Overlays",paintPalette); BPalette zoomPalette = PaletteFactory.getZoomPalette(model,topModel); topModel.addPalette(UIConstants.ZOOM_PALETTE_NAME,zoomPalette); modePalette.setOffset(0,0); paintPalette.setOffset(0,75); zoomPalette.setOffset(0,125); BrowserView view = new BrowserView(model,topModel); BrowserController controller = new BrowserController(model,topModel,view); controller.setStatusView(new StatusBar()); int count = env.getBrowserManager().getBrowserCount(); env.getBrowserManager().addBrowser(controller); final int browserIndex = count; final BrowserInternalFrame bif = new BrowserInternalFrame(controller); StatusBar status = controller.getStatusView(); tf.addToDesktop(bif,TopFrame.PALETTE_LAYER); bif.setClosable(true); bif.setIconifiable(true); bif.setMaximizable(true); bif.setResizable(true); bif.show(); final int theDataset = datasetID; Thread retrieveThread = new Thread() { public void run() { try { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset = dms.retrieveDataset(theDataset); model.setDataset(dataset); bif.setTitle("Image Browser: "+dataset.getName()); loadDataset(browserIndex,dataset); } catch(DSAccessException dsae) { UserNotifier notifier = registry.getUserNotifier(); notifier.notifyError("Data retrieval failure", "Unable to retrieve dataset (id = " + theDataset + ")", dsae); return; } catch(DSOutOfServiceException dsoe) { // pop up new login window (eventually caught) throw new RuntimeException(dsoe); } } }; retrieveThread.start(); writeStatusImmediately(status,"Loading dataset from DB..."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
env.getBrowserManager().addBrowser(bif);
public void loadDataset(int datasetID) { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset; final BrowserModel model = new BrowserModel(); model.setLayoutMethod(new NumColsLayoutMethod(8)); BrowserTopModel topModel = new BrowserTopModel(); BPalette modePalette = PaletteFactory.getMainPalette(model,topModel); topModel.addPalette("Modes",modePalette); BPalette paintPalette = PaletteFactory.getPaintModePalette(model,topModel); topModel.addPalette("Overlays",paintPalette); BPalette zoomPalette = PaletteFactory.getZoomPalette(model,topModel); topModel.addPalette(UIConstants.ZOOM_PALETTE_NAME,zoomPalette); modePalette.setOffset(0,0); paintPalette.setOffset(0,75); zoomPalette.setOffset(0,125); BrowserView view = new BrowserView(model,topModel); BrowserController controller = new BrowserController(model,topModel,view); controller.setStatusView(new StatusBar()); int count = env.getBrowserManager().getBrowserCount(); env.getBrowserManager().addBrowser(controller); final int browserIndex = count; final BrowserInternalFrame bif = new BrowserInternalFrame(controller); StatusBar status = controller.getStatusView(); tf.addToDesktop(bif,TopFrame.PALETTE_LAYER); bif.setClosable(true); bif.setIconifiable(true); bif.setMaximizable(true); bif.setResizable(true); bif.show(); final int theDataset = datasetID; Thread retrieveThread = new Thread() { public void run() { try { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset = dms.retrieveDataset(theDataset); model.setDataset(dataset); bif.setTitle("Image Browser: "+dataset.getName()); loadDataset(browserIndex,dataset); } catch(DSAccessException dsae) { UserNotifier notifier = registry.getUserNotifier(); notifier.notifyError("Data retrieval failure", "Unable to retrieve dataset (id = " + theDataset + ")", dsae); return; } catch(DSOutOfServiceException dsoe) { // pop up new login window (eventually caught) throw new RuntimeException(dsoe); } } }; retrieveThread.start(); writeStatusImmediately(status,"Loading dataset from DB..."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
model.addThumbnail(t);
thumbnails.add(t);
public void run() { int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), refInfo.getNumCols()); model.setLayoutMethod(lm); CompletePlate plate = new CompletePlate(); for(Iterator iter = refPlateList.iterator(); iter.hasNext();) { ImagePlate ip = (ImagePlate)iter.next(); plate.put(ip.getWell(),new Integer(ip.getImage().getID())); } boolean wellSized = false; for(int i=0;i<refInfo.getNumRows();i++) { for(int j=0;j<refInfo.getNumCols();j++) { String row = refInfo.getRowName(i); String col = refInfo.getColumnName(j); String well = row+col; List sampleList = (List)plate.get(well); if(sampleList.size() == 1) { Integer intVal = (Integer)sampleList.get(0); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); if(!wellSized) { lm.setWellWidth(image.getWidth(null)); lm.setWellHeight(image.getHeight(null)); wellSized = true; } ImageData data = new ImageData(); data.setID(sum.getID()); data.setName(sum.getName()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); ImageAnnotation annotation = (ImageAnnotation)refAnnotations.get(new Integer(sum.getID())); if(annotation != null) { tdm.getAttributeMap().putAttribute(annotation); } final Thumbnail t = new Thumbnail(image,tdm); lm.setIndex(t,i,j); final int theCount = count; final int theTotal = total; Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } else { Image[] images = new Image[sampleList.size()]; ThumbnailDataModel[] models = new ThumbnailDataModel[sampleList.size()]; for(int k=0;k<sampleList.size();k++) { Integer intVal = (Integer)sampleList.get(k); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ImageData data = new ImageData(); data.setID(pix.getID()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); images[k] = image; models[k] = tdm; count++; String message = ProgressMessageFormatter.format("Loaded image %n of %t...", count,total); status.processAdvanced(message); } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } final Thumbnail t = new Thumbnail(images,models); lm.setIndex(t,i,j); Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); } }; SwingUtilities.invokeLater(addTask); } } } Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
String message = ProgressMessageFormatter.format("Loaded image %n of %t...", count,total); status.processAdvanced(message);
public void run() { int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), refInfo.getNumCols()); model.setLayoutMethod(lm); CompletePlate plate = new CompletePlate(); for(Iterator iter = refPlateList.iterator(); iter.hasNext();) { ImagePlate ip = (ImagePlate)iter.next(); plate.put(ip.getWell(),new Integer(ip.getImage().getID())); } boolean wellSized = false; for(int i=0;i<refInfo.getNumRows();i++) { for(int j=0;j<refInfo.getNumCols();j++) { String row = refInfo.getRowName(i); String col = refInfo.getColumnName(j); String well = row+col; List sampleList = (List)plate.get(well); if(sampleList.size() == 1) { Integer intVal = (Integer)sampleList.get(0); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); if(!wellSized) { lm.setWellWidth(image.getWidth(null)); lm.setWellHeight(image.getHeight(null)); wellSized = true; } ImageData data = new ImageData(); data.setID(sum.getID()); data.setName(sum.getName()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); ImageAnnotation annotation = (ImageAnnotation)refAnnotations.get(new Integer(sum.getID())); if(annotation != null) { tdm.getAttributeMap().putAttribute(annotation); } final Thumbnail t = new Thumbnail(image,tdm); lm.setIndex(t,i,j); final int theCount = count; final int theTotal = total; Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } else { Image[] images = new Image[sampleList.size()]; ThumbnailDataModel[] models = new ThumbnailDataModel[sampleList.size()]; for(int k=0;k<sampleList.size();k++) { Integer intVal = (Integer)sampleList.get(k); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ImageData data = new ImageData(); data.setID(pix.getID()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); images[k] = image; models[k] = tdm; count++; String message = ProgressMessageFormatter.format("Loaded image %n of %t...", count,total); status.processAdvanced(message); } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } final Thumbnail t = new Thumbnail(images,models); lm.setIndex(t,i,j); Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); } }; SwingUtilities.invokeLater(addTask); } } } Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
model.addThumbnail(t);
String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); thumbnails.add(t);
public void run() { int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), refInfo.getNumCols()); model.setLayoutMethod(lm); CompletePlate plate = new CompletePlate(); for(Iterator iter = refPlateList.iterator(); iter.hasNext();) { ImagePlate ip = (ImagePlate)iter.next(); plate.put(ip.getWell(),new Integer(ip.getImage().getID())); } boolean wellSized = false; for(int i=0;i<refInfo.getNumRows();i++) { for(int j=0;j<refInfo.getNumCols();j++) { String row = refInfo.getRowName(i); String col = refInfo.getColumnName(j); String well = row+col; List sampleList = (List)plate.get(well); if(sampleList.size() == 1) { Integer intVal = (Integer)sampleList.get(0); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); if(!wellSized) { lm.setWellWidth(image.getWidth(null)); lm.setWellHeight(image.getHeight(null)); wellSized = true; } ImageData data = new ImageData(); data.setID(sum.getID()); data.setName(sum.getName()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); ImageAnnotation annotation = (ImageAnnotation)refAnnotations.get(new Integer(sum.getID())); if(annotation != null) { tdm.getAttributeMap().putAttribute(annotation); } final Thumbnail t = new Thumbnail(image,tdm); lm.setIndex(t,i,j); final int theCount = count; final int theTotal = total; Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } else { Image[] images = new Image[sampleList.size()]; ThumbnailDataModel[] models = new ThumbnailDataModel[sampleList.size()]; for(int k=0;k<sampleList.size();k++) { Integer intVal = (Integer)sampleList.get(k); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ImageData data = new ImageData(); data.setID(pix.getID()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); images[k] = image; models[k] = tdm; count++; String message = ProgressMessageFormatter.format("Loaded image %n of %t...", count,total); status.processAdvanced(message); } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } final Thumbnail t = new Thumbnail(images,models); lm.setIndex(t,i,j); Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); } }; SwingUtilities.invokeLater(addTask); } } } Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts);
public void run() { int count = 1; int total = refList.size(); PlateLayoutMethod lm = new PlateLayoutMethod(refInfo.getNumRows(), refInfo.getNumCols()); model.setLayoutMethod(lm); CompletePlate plate = new CompletePlate(); for(Iterator iter = refPlateList.iterator(); iter.hasNext();) { ImagePlate ip = (ImagePlate)iter.next(); plate.put(ip.getWell(),new Integer(ip.getImage().getID())); } boolean wellSized = false; for(int i=0;i<refInfo.getNumRows();i++) { for(int j=0;j<refInfo.getNumCols();j++) { String row = refInfo.getRowName(i); String col = refInfo.getColumnName(j); String well = row+col; List sampleList = (List)plate.get(well); if(sampleList.size() == 1) { Integer intVal = (Integer)sampleList.get(0); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); if(!wellSized) { lm.setWellWidth(image.getWidth(null)); lm.setWellHeight(image.getHeight(null)); wellSized = true; } ImageData data = new ImageData(); data.setID(sum.getID()); data.setName(sum.getName()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); ImageAnnotation annotation = (ImageAnnotation)refAnnotations.get(new Integer(sum.getID())); if(annotation != null) { tdm.getAttributeMap().putAttribute(annotation); } final Thumbnail t = new Thumbnail(image,tdm); lm.setIndex(t,i,j); final int theCount = count; final int theTotal = total; Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } else { Image[] images = new Image[sampleList.size()]; ThumbnailDataModel[] models = new ThumbnailDataModel[sampleList.size()]; for(int k=0;k<sampleList.size();k++) { Integer intVal = (Integer)sampleList.get(k); ImageSummary sum = (ImageSummary)imageMap.get(intVal); try { Pixels pix = sum.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ImageData data = new ImageData(); data.setID(pix.getID()); ThumbnailDataModel tdm = new ThumbnailDataModel(data); tdm.setValue(UIConstants.WELL_KEY_STRING,well); tdm.getAttributeMap().putAttribute(pix); images[k] = image; models[k] = tdm; count++; String message = ProgressMessageFormatter.format("Loaded image %n of %t...", count,total); status.processAdvanced(message); } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } final Thumbnail t = new Thumbnail(images,models); lm.setIndex(t,i,j); Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); } }; SwingUtilities.invokeLater(addTask); } } } Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
Thumbnail[] ts = new Thumbnail[thumbnails.size()]; thumbnails.toArray(ts); model.addThumbnails(ts);
public void run() { status.processSucceeded("All images loaded."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
model.addThumbnail(t);
thumbnails.add(t);
public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
model.addThumbnail(t);
String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); thumbnails.add(t);
public void run() { model.addThumbnail(t); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
public void loadImage(int imageID)
public void loadImage(Thumbnail t)
public void loadImage(int imageID) { // TODO: fill in loadImage(int) }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
ThumbnailDataModel tdm = t.getModel(); int imageID = tdm.getID(); Pixels pixels = (Pixels)tdm.getAttributeMap().getAttribute("Pixels"); int pixelsID = pixels.getID(); loadImage(imageID,pixelsID);
public void loadImage(int imageID) { // TODO: fill in loadImage(int) }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a74dcf148f6dd7ae6d4c17a9e0406afba262a755/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java
: "UNKNOWN. Throwing exceptin"));
: "UNKNOWN. Throwing exception"));
public void write(FastWriter out, Context context) throws PropertyException, IOException { Broker broker = context.getBroker(); // the filename arg passed to us was a Macro, so // evaluate and check it now if (_macFilename != null) { _strFilename = _macFilename.evaluate(context).toString(); if (_strFilename == null || _strFilename.length() == 0) { throw makePropertyException("Filename cannot be null or empty"); } } if (_log.loggingDebug() && context.getCurrentLocation().indexOf(_strFilename) > -1) { // when in debug mode, output a warning if a template tries to include itself // there are situtations where this is desired, but it's good to make // the user aware of what they're doing _log.warning(context.getCurrentLocation() + " includes itself."); } // this should only be true if StrictCompatibility is set to false // and "as <something>" wasn't specified in the arg list if (_type == TYPE_DYNAMIC) _type = guessType(broker, _strFilename); if (_log.loggingDebug()) { _log.debug("Including '" + _strFilename + "' as " + ((_type == TYPE_MACRO) ? "MACRO" : (_type == TYPE_TEMPLATE) ? "TEMPLATE" : (_type == TYPE_TEXT) ? "TEXT" : "UNKNOWN. Throwing exceptin")); } Object toInclude = getThingToInclude(broker, _type, _strFilename); switch (_type) { case TYPE_MACRO: // during runtime evaluation of a template, // a TYPE_MACRO doesn't really work as expected. // we logged a warning above in build(), but // we still need to write it out as a template // so just fall through case TYPE_TEMPLATE: ((Template) toInclude).write(out, context); break; case TYPE_TEXT: // static types are strings out.write(toInclude.toString()); break; default: // should never happen throw makePropertyException("Unrecognized file type: " + _type); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/ff709ec8523aa5b42a000462169b11be88cd46de/IncludeDirective.java/buggy/webmacro/src/org/webmacro/directive/IncludeDirective.java
double a = (double) (control.getGlobalMinimum()-b)/(double) rangeGraphics;
double a = (double) (control.getGlobalMinimum()-b)/(double) rangeGraphics;
int convertGraphicsIntoReal(int x) { int b = control.getGlobalMaximum(); double a = (double) (control.getGlobalMinimum()-b)/(double) rangeGraphics; return (int) (a*(x-tW)+b); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83f676753e39a506a8cb86c443c49fa697ec99eb/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
autoResize(Math.max(0, index + position - 1));
autoResize(Math.max(0, index + position));
public void add(int index, Object element) { autoResize(Math.max(0, index + position - 1)); delegate.add(index + position, element); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java
delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) {
throw new UnsupportedOperationException("Cannot access an element left of the list"); } else if (index > delegate.size()) {
protected void autoResize(int index) { if (!autoResize) { return; } else if (index < 0) { delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) { delegate.ensureCapacity(index); for (int i = delegate.size(); i <= index; i++) { delegate.add(autoResizeObject); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java
for (int i = delegate.size(); i <= index; i++) {
for (int i = delegate.size(); i < index; i++) {
protected void autoResize(int index) { if (!autoResize) { return; } else if (index < 0) { delegate.addAll(0, Collections.nCopies(-index, autoResizeObject)); position += -index; } else if (index >= delegate.size()) { delegate.ensureCapacity(index); for (int i = delegate.size(); i <= index; i++) { delegate.add(autoResizeObject); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java
autoResize(index + position);
autoResize(index + position + 1);
public Object get(int index) { autoResize(index + position); return delegate.get(index + position); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java
autoResize(index + position);
autoResize(index + position + 1);
public Object set(int index, Object element) { autoResize(index + position); return delegate.set(index + position, element); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/662c05593e6f402ddd6badcfa923a544ab949833/DefaultPointer.java/buggy/org/jruby/util/DefaultPointer.java
FastWriter w = new FastWriter(System.out, "UTF8");
FastWriter w = new FastWriter(System.out, context.getEncoding());
public static void main(String arg[]) { Log.traceExceptions(true); Log.setLevel(Log.ALL); Log.setTarget(System.err); if (arg.length != 0) { System.out.println("Enabling log types"); Log.enableTypes(arg); } // Build a context WebMacro wm = null; Context context = null; try { wm = new WM(); context = wm.getContext(); Object names[] = { "prop" }; context.setProperty(names, "Example property"); } catch (Exception e) { e.printStackTrace(); } try { context.put("helloworld", "Hello World"); context.put("hello", "Hello"); context.put("file", "include.txt"); context.put("today", new Date()); TestObject[] fruits = { new TestObject("apple",false), new TestObject("lemon",true), new TestObject("pear",false), new TestObject("orange",true), new TestObject("watermelon",false), new TestObject("peach",false), new TestObject("lime",true) }; SelectList sl = new SelectList(fruits, 3); context.put("sl-fruits", sl); context.put("fruits", fruits); context.put("flipper", new TestObject("flip",false)); System.out.println("- - - - - - - - - - - - - - - - - - - -"); System.out.println("Context contains: helloWorld, hello, file, TestObject[] fruits, SelectList sl(fruits, 3), TestObject flipper"); System.out.println("- - - - - - - - - - - - - - - - - - - -"); Template t1 = new StreamTemplate(wm.getBroker(), new InputStreamReader(System.in)); t1.parse(); FastWriter w = new FastWriter(System.out, "UTF8"); System.out.println("*** RESULT ***"); t1.write(w,context); w.close(); System.out.println("*** DONE ***"); //System.out.println(result); } catch (Exception e) { e.printStackTrace(); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/StreamTemplate.java/clean/webmacro/src/org/webmacro/engine/StreamTemplate.java
panHandler = new BoundedDragPanHandler(null);
panHandler = new BoundedEdgePanHandler();
private void init() { env = BrowserEnvironment.getInstance(); setBackground(new Color(192,192,192)); layoutMap = new HashMap(); footprint = new Rectangle2D.Double(0,0,0,0); // here we disable zoom/pan (TODO: save for later, reinstate on mode) removeInputEventListener(getZoomEventHandler()); removeInputEventListener(getPanEventHandler()); panHandler = new BoundedDragPanHandler(null); addInputEventListener(panHandler); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b927571573c6b14fb6e5653fcb9385cd15bd16be/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserView.java
return "ImageDimension"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId);
return "ImageDimension"+(attributeId==null ? ":Hash_"+this.hashCode() : ":Id_"+attributeId);
public String toString(){ return "ImageDimension"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/ImageDimension.java/clean/components/common/src/ome/model/ImageDimension.java
super(parameters);
super( defs, parameters);
public PojosLoadHierarchyQueryDefinition(QueryParameter... parameters) { super(parameters); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f990a7d35ce265e182121d562725175896db41f4/PojosLoadHierarchyQueryDefinition.java/clean/components/server/src/ome/services/query/PojosLoadHierarchyQueryDefinition.java
Class type = PropertyEditorHelper.loadClass("org.apache.xbean.spring.context.impl.QNameHelper"); if (type != null) { Method[] methods = type.getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getName().equals(name)) { return method;
try { Class type = PropertyEditorHelper.loadClass("org.apache.xbean.spring.context.impl.QNameHelper"); if (type != null) { Method[] methods = type.getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getName().equals(name)) { return method; }
protected static Method findMethod(String name) { Class type = PropertyEditorHelper.loadClass("org.apache.xbean.spring.context.impl.QNameHelper"); if (type != null) { Method[] methods = type.getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getName().equals(name)) { return method; } } } return null; }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/19ade509a8b0389eecc524e7e39c49aeaf9c65c7/QNameReflectionHelper.java/clean/xbean-spring-common/src/main/java/org/apache/xbean/spring/context/impl/QNameReflectionHelper.java
} catch (Throwable t) {
protected static Method findMethod(String name) { Class type = PropertyEditorHelper.loadClass("org.apache.xbean.spring.context.impl.QNameHelper"); if (type != null) { Method[] methods = type.getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; if (method.getName().equals(name)) { return method; } } } return null; }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/19ade509a8b0389eecc524e7e39c49aeaf9c65c7/QNameReflectionHelper.java/clean/xbean-spring-common/src/main/java/org/apache/xbean/spring/context/impl/QNameReflectionHelper.java
public static RubyObject m_print(Ruby ruby, RubyObject args[]) {
public static RubyObject m_print(Ruby ruby, RubyModule rubyClass, RubyObject args[]) {
public static RubyObject m_print(Ruby ruby, RubyObject args[]) { for (int i = 0; i < args.length; i++) { if (args[i] != null) { System.out.print(((RubyString)args[i].funcall(ruby.intern("to_s"))).getString()); } } return ruby.getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/76d3fd1bbcdbd38082a9b8c19c593b06ed915280/RBKernel.java/buggy/org/jruby/core/RBKernel.java
public static RubyObject m_puts(Ruby ruby, RubyObject args[]) {
public static RubyObject m_puts(Ruby ruby, RubyModule rubyClass, RubyObject args[]) {
public static RubyObject m_puts(Ruby ruby, RubyObject args[]) { if (args.length == 0) { System.out.println(); } else { for (int i = 0; i < args.length; i++) { if (args[i] != null) { System.out.println(((RubyString)args[i].funcall(ruby.intern("to_s"))).getString()); } } } return ruby.getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/76d3fd1bbcdbd38082a9b8c19c593b06ed915280/RBKernel.java/buggy/org/jruby/core/RBKernel.java
ht.flush();
public Object invoke(MethodInvocation arg0) throws Throwable { CurrentDetails.clear(); setDetails(); try { Object retVal = arg0.proceed(); ht.flush(); // TODO performance? but HInterceptor is flushing // after finally { clear } return retVal; } finally { CurrentDetails.clear(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2752630e0bbf2c7a5f4bcfda3cff9f1e4a433664/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
removeContactItem(jid);
RosterEntry rosterEntry = roster.getEntry(jid); if (rosterEntry != null) { boolean isUnfiled = true; for (RosterGroup group : rosterEntry.getGroups()) { isUnfiled = false; if (getContactGroup(group.getName()) == null) { ContactGroup contactGroup = addContactGroup(group.getName()); contactGroup.setVisible(false); contactGroup = getContactGroup(group.getName()); String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } ContactItem contactItem = new ContactItem(name, rosterEntry.getUser()); contactGroup.addContactItem(contactItem); Presence presence = roster.getPresence(jid); contactItem.setPresence(presence); if (presence != null) { contactGroup.setVisible(true); } } else { ContactGroup contactGroup = getContactGroup(group.getName()); ContactItem item = offlineGroup.getContactItemByJID(jid); if (item == null) { item = contactGroup.getContactItemByJID(jid); } if (item == null) { String name = rosterEntry.getName(); if (name == null) { name = rosterEntry.getUser(); } item = new ContactItem(name, rosterEntry.getUser()); Presence presence = roster.getPresence(jid); item.setPresence(presence); if (presence != null) { contactGroup.addContactItem(item); contactGroup.fireContactGroupUpdated(); } else { offlineGroup.addContactItem(item); offlineGroup.fireContactGroupUpdated(); } } else { Presence presence = roster.getPresence(jid); item.setPresence(presence); updateUserPresence(presence); contactGroup.fireContactGroupUpdated(); } } } final Set<String> groupSet = new HashSet<String>(); jids = addresses.iterator(); while (jids.hasNext()) { jid = (String)jids.next(); rosterEntry = roster.getEntry(jid); for (RosterGroup g : rosterEntry.getGroups()) { groupSet.add(g.getName()); } for (ContactGroup group : new ArrayList<ContactGroup>(getContactGroups())) { if (group.getContactItemByJID(jid) != null && group != unfiledGroup && group != offlineGroup) { if (!groupSet.contains(group.getGroupName())) { removeContactGroup(group); } } } } if (!isUnfiled) { return; } ContactItem unfiledItem = unfiledGroup.getContactItemByJID(jid); if (unfiledItem != null) { } else { ContactItem offlineItem = offlineGroup.getContactItemByJID(jid); if (offlineItem != null) { if ((rosterEntry.getType() == RosterPacket.ItemType.NONE || rosterEntry.getType() == RosterPacket.ItemType.FROM) && RosterPacket.ItemStatus.SUBSCRIPTION_PENDING == rosterEntry.getStatus()) { offlineGroup.removeContactItem(offlineItem); unfiledGroup.addContactItem(offlineItem); unfiledGroup.fireContactGroupUpdated(); unfiledGroup.setVisible(true); } } } }
public void run() { Iterator jids = addresses.iterator(); while (jids.hasNext()) { String jid = (String)jids.next(); removeContactItem(jid); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/2241699ff3d2ad8e9d909d7be10dd19a3a3c757c/ContactList.java/buggy/src/java/org/jivesoftware/spark/ui/ContactList.java