rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
this.unsatisfiedConditions = unsatisfiedConditions;
this.unsatisfiedConditions = Collections.unmodifiableSet(unsatisfiedConditions);
public UnsatisfiedConditionsException(String message, ServiceName serviceName, Set unsatisfiedConditions) { super(message + ": serviceName=" + serviceName + ": unsatisfiedConditions=" + unsatisfiedConditions); this.serviceName = serviceName; this.unsatisfiedConditions = unsatisfiedConditions; }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/e4a9cb81c5b1bfeb724fd5cb9f7325ab7867ae4b/UnsatisfiedConditionsException.java/buggy/kernel/src/java/org/gbean/kernel/UnsatisfiedConditionsException.java
for( Iterator cIt = Scene.v().getClasses().iterator(); cIt.hasNext(); ) { final SootClass c = (SootClass) cIt.next(); handleClass( c ); } Stmt s = null; while(callEdges.hasNext()) { Edge e = (Edge) callEdges.next(); }
public void build() { }
53330 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/53330/0d4ee953a1e7f98cde5831da1aed0d2c700c5a26/FlowGraphBuilder.java/buggy/banshee/java/conflux/builder/FlowGraphBuilder.java
Copyright.print(System.out);
Header.print(System.out);
public Main(String[] args) throws IOException { Copyright.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:", longOpts); int c; double branchCoverageRate = 0.8; double lineCoverageRate = 0.7; while ((c = g.getopt()) != -1) { switch (c) { case 'b': branchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'l': lineCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg()); break; case 'd': setInstrumentationDirectory(new File(g.getOptarg())); break; case 'r': setMinimumCoverageRate(g.getOptarg()); break; } } minimumCoverageRate = new CoverageRate(lineCoverageRate, branchCoverageRate); if (logger.isInfoEnabled()) { logger.info("instrumentation directory: " + instrumentationDirectory); } merge(loadInstrumentation(new FileInputStream(new File( instrumentationDirectory, InstrumentationPersistence.FILE_NAME)))); if (logger.isInfoEnabled()) { logger .info("instrumentation has " + keySet().size() + " entries"); } Iterator i = keySet().iterator(); while (i.hasNext()) { String key = (String)i.next(); CoverageRate coverageRate = findMinimumCoverageRate(key); CoverageData instrumentation = getInstrumentation(key); if (logger.isInfoEnabled()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(", line: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%), branch: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% ("); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); logger.info(sb.toString()); } if (instrumentation.getLineCoverageRate() < coverageRate .getLineCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" line coverage rate of: "); sb.append(percentage(instrumentation.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (instrumentation.getBranchCoverageRate() < coverageRate .getBranchCoverageRate()) { StringBuffer sb = new StringBuffer(); sb.append(key); sb.append(" branch coverage rate of: "); sb .append(percentage(instrumentation .getBranchCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getBranchCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } } }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/0e9968867b8060fdd72b4fc9c248fcbdc4e96330/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
"WEB-INF/security.xml",
protected String[] getConfigLocations() { return new String[]{ "WEB-INF/services.xml", "WEB-INF/dao.xml", "WEB-INF/data.xml", "WEB-INF/test/config-test.xml", "WEB-INF/test/test.xml"}; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/00ef5f18481d04aa649d8ea20819b4b7bb9c2f28/OmeroServiceTest.java/buggy/components/server/test/org/openmicroscopy/omero/server/itests/OmeroServiceTest.java
if (model.getState() == DISCARDED) throw new IllegalStateException("The method cannot be invoked in " + "the DISCARDED state.");
public BufferedImage getZoomedLensImage() { return view.getZoomedLensImage(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ImViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java
return view.isLensVisible();
if (model.getState() == DISCARDED) throw new IllegalStateException("The method cannot be invoked in " + "the DISCARDED state."); return view.isLensVisible();
public boolean isLensVisible() { return view.isLensVisible(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ImViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java
if (model.getState() == DISCARDED) throw new IllegalStateException("The method cannot be invoked in " + "the DISCARDED state.");
public void setLensVisible(boolean b) { view.setLensVisible(b); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ImViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java
lens.setPlaneImage(model.getDisplayedImage());
lens.setPlaneImage(model.getOriginalImage());
void setLensVisible(boolean b) { if (lens == null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) { firstTimeLensShown = false; int lensX = model.getMaxX()/2-lens.getLensUI().getWidth()/2; int lensY = model.getMaxY()/2-lens.getLensUI().getHeight()/2; if (lensX+lens.getLensUI().getWidth() > model.getMaxX()) lensX = model.getMaxX()-lens.getLensUI().getWidth(); if (lensY+lens.getLensUI().getHeight() > model.getMaxY()) lensY = model.getMaxY()-lens.getLensUI().getHeight(); lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setLensLocation(lensX, lensY); lens.setXYPixelMicron(model.getPixelsSizeX(), model.getPixelsSizeY()); model.getBrowser().addComponent(lens.getLensUI()); lens.setZoomWindowLocation(getX()+getWidth(), getY()); } lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setPlaneImage(model.getDisplayedImage()); lens.setLensPreferredColour(); } lens.setVisible(b); repaint(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/38a31e9c570bc8c0bbfb871c8b12b0e52420f22c/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java
extractDependencies(beanDefinition);
dependencies = SpringUtil.extractDependencies(beanDefinition, objectNameMap);
public SpringServiceFactory(RootBeanDefinition beanDefinition, Map objectNameMap) throws Exception { this.beanDefinition = beanDefinition; this.objectNameMap = objectNameMap; extractDependencies(beanDefinition); }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/SpringServiceFactory.java/buggy/kernel/src/java/org/gbean/spring/SpringServiceFactory.java
objectName = getObjectName(name);
objectName = SpringUtil.getObjectName(objectNameMap, name);
public Object createService(final ServiceContext serviceContext) throws Exception { Object service = null; try { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); ServiceContext oldServiceContext = ServiceContextThreadLocal.get(); try { Thread.currentThread().setContextClassLoader(serviceContext.getClassLoader()); ServiceContextThreadLocal.set(serviceContext); ApplicationContext parent = new ApplicationContext() { public ApplicationContext getParent() { throw new UnsupportedOperationException(); } public String getDisplayName() { throw new UnsupportedOperationException(); } public long getStartupDate() { throw new UnsupportedOperationException(); } public void publishEvent(ApplicationEvent event) {// throw new UnsupportedOperationException(); } public boolean containsBeanDefinition(String beanName) { throw new UnsupportedOperationException(); } public int getBeanDefinitionCount() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames() { throw new UnsupportedOperationException(); } public String[] getBeanDefinitionNames(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type) { throw new UnsupportedOperationException(); } public String[] getBeanNamesForType(Class type, boolean includePrototypes, boolean includeFactoryBeans) { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type) throws BeansException { throw new UnsupportedOperationException(); } public Map getBeansOfType(Class type, boolean includePrototypes, boolean includeFactoryBeans) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name) throws BeansException { throw new UnsupportedOperationException(); } public Object getBean(String name, Class requiredType) throws BeansException { ObjectName objectName = null; try { objectName = getObjectName(name); } catch (MalformedObjectNameException e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Could not create an objectname for the specified name").initCause(e); } try { Object service = serviceContext.getKernel().getService(objectName); return service; } catch (Exception e) { throw (NoSuchBeanDefinitionException) new NoSuchBeanDefinitionException(name, "Kernel threw an exception").initCause(e); } } public boolean containsBean(String name) { throw new UnsupportedOperationException(); } public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public Class getType(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public String[] getAliases(String name) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException(); } public BeanFactory getParentBeanFactory() { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) { throw new UnsupportedOperationException(); } public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public String getMessage(MessageSourceResolvable resolvable, Locale locale) throws NoSuchMessageException { throw new UnsupportedOperationException(); } public Resource[] getResources(String locationPattern) { throw new UnsupportedOperationException(); } public Resource getResource(String location) { throw new UnsupportedOperationException(); } }; applicationContext = new GenericApplicationContext(parent); applicationContext.registerBeanDefinition(serviceContext.getObjectName(), beanDefinition); applicationContext.refresh(); service = applicationContext.getBean(serviceContext.getObjectName()); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); ServiceContextThreadLocal.set(oldServiceContext); } } catch (Throwable t) { applicationContext = null; if (t instanceof Exception) { throw (Exception) t; } else if (t instanceof Error) { throw (Error) t; } else { throw new Error(t); } } return service; }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/SpringServiceFactory.java/buggy/kernel/src/java/org/gbean/spring/SpringServiceFactory.java
void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException;
void visitBeanDefinition(String beanName, BeanDefinition beanDefinition, Object data) throws BeansException;
void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException;
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/SpringVisitor.java/buggy/kernel/src/java/org/gbean/spring/SpringVisitor.java
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues());
public void visitBeanDefinition(String beanName, BeanDefinition beanDefinition, Object data) throws BeansException { visitBeanDefinition(beanDefinition, data);
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { visitConstructorArgumentValues(beanDefinition.getConstructorArgumentValues()); visitMutablePropertyValues(beanDefinition.getPropertyValues()); }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/AbstractSpringVisitor.java/buggy/kernel/src/java/org/gbean/spring/AbstractSpringVisitor.java
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException {
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference, Object data) throws BeansException {
public void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException { }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/AbstractSpringVisitor.java/buggy/kernel/src/java/org/gbean/spring/AbstractSpringVisitor.java
public ServiceFactory(String contextName){ this.ctx = OmeroContext.getInstance(contextName);
public ServiceFactory(){ this.ctx = OmeroContext.getClientContext();
public ServiceFactory(String contextName){ this.ctx = OmeroContext.getInstance(contextName); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/92c787632618062d83f0fc8bcbfa71d70e18c6aa/ServiceFactory.java/buggy/components/common/src/ome/system/ServiceFactory.java
this.constructors = constructors; }
this.constructors = constructors; }
public JavaConstructor(Constructor[] constructors) { this.constructors = constructors; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/JavaConstructor.java/buggy/org/jruby/javasupport/JavaConstructor.java
for(ChatRoom rooms : getStaleChatRooms()){
for (ChatRoom rooms : getStaleChatRooms()) {
private void checkTabPopup(MouseEvent e) { final SparkTab tab = (SparkTab)e.getSource(); if (!e.isPopupTrigger()) { return; } final JPopupMenu popup = new JPopupMenu(); // Handle closing this room. Action closeThisAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { closeTab(chatRoom); } } }; closeThisAction.putValue(Action.NAME, "Close this chat"); popup.add(closeThisAction); if (getChatRooms().size() > 1) { // Handle closing other rooms. Action closeOthersAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ChatRoom chatRoom = (ChatRoom)getComponentInTab(tab); if (chatRoom != null) { for (ChatRoom cRoom : getChatRooms()) { if (chatRoom != cRoom) { closeTab(cRoom); } } } } }; closeOthersAction.putValue(Action.NAME, "Close all other chats"); popup.add(closeOthersAction); Action closeOldAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { for(ChatRoom rooms : getStaleChatRooms()){ closeTab(rooms); } } }; closeOldAction.putValue(Action.NAME, "Close stale chats"); popup.add(closeOldAction); } popup.show(tab, e.getX(), e.getY()); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
for(ChatRoom rooms : getStaleChatRooms()){
for (ChatRoom rooms : getStaleChatRooms()) {
public void actionPerformed(ActionEvent e) { for(ChatRoom rooms : getStaleChatRooms()){ closeTab(rooms); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
"Confirmation", JOptionPane.YES_NO_OPTION);
"Confirmation", JOptionPane.YES_NO_OPTION);
public void closeActiveRoom() { ChatRoom room = null; try { room = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { // AgentLog.logError("Chat room not found", e1); } // Confirm end session boolean isGroupChat = room.getChatType() == Message.Type.GROUP_CHAT; String message = "Would you like to end this session?"; if (true) { room.closeChatRoom(); return; } else { if (!room.isActive()) { room.closeChatRoom(); return; } } final int ok = JOptionPane.showConfirmDialog(SparkManager.getMainWindow(), message, "Confirmation", JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { room.closeChatRoom(); return; } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
checkRoomsForTimeout();
private void createFrameIfNeeded() { if (chatFrame != null) { return; } chatFrame = new ChatFrame(); chatFrame.addWindowListener(new WindowAdapter() { public void windowActivated(WindowEvent windowEvent) { stopFlashing(); int sel = getSelectedIndex(); if (sel == -1) { return; } final ChatRoom room; try { room = getChatRoom(sel); focusChat(); // Set the title of the room. chatFrame.setTitle(room.getRoomTitle()); } catch (ChatRoomNotFoundException e1) { } } public void windowDeactivated(WindowEvent windowEvent) { } }); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { }
public Collection<ChatRoom> getStaleChatRooms() { final List<ChatRoom> staleRooms = new ArrayList<ChatRoom>(); for (ChatRoom chatRoom : getChatRooms()) { long lastActivity = chatRoom.getLastActivity(); long currentTime = System.currentTimeMillis(); long diff = currentTime - lastActivity; int minutes = (int)(diff / (60 * 1000F)); LocalPreferences pref = SettingsManager.getLocalPreferences(); int timeoutMinutes = pref.getChatLengthDefaultTimeout(); try { ChatRoom activeChatRoom = getActiveChatRoom(); if (activeChatRoom == chatRoom) { continue; } } catch (ChatRoomNotFoundException e) { } if (timeoutMinutes <= minutes) { staleRooms.add(chatRoom); } } return staleRooms; }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
useTabDefault(room);
public void messageSent(ChatRoom room, Message message) { }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
Font font = titleLabel.getFont();
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint();
titleLabel.setFont(defaultFont);
public void useTabDefault(final ChatRoom room) { final int index = indexOfComponent(room); if (index != -1) { SparkTab tab = getTabAt(index); final JLabel titleLabel = tab.getTitleLabel(); Font font = titleLabel.getFont(); titleLabel.setForeground(Color.black); Font newFont = font.deriveFont(Font.PLAIN); titleLabel.setFont(newFont); titleLabel.validate(); titleLabel.repaint(); } }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/93be14b35e2ec723a91a9660ce4217f9947cf7b5/ChatContainer.java/clean/src/java/org/jivesoftware/spark/ui/ChatContainer.java
assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors);
if (errors == null) throw new NullPointerException("errors is null"); if (errors.isEmpty()) throw new IllegalArgumentException("errors is empty"); for (ListIterator iterator = errors.listIterator(); iterator.hasNext();) { Object error = iterator.next(); if (error == null) { throw new IllegalArgumentException("Errors element " + iterator.previousIndex() + " is null"); } if (!(error instanceof Error)) { throw new IllegalArgumentException("Errors element " + iterator.previousIndex() + " is not an instance of java.lang.Error " + error.getClass() + ": " + error); } }
public KernelErrorsError(List errors) { assert errors != null : "errors is null"; assert !errors.isEmpty() : "errors is empty"; assert assertAllErrors(errors); this.errors = Collections.unmodifiableList(errors); }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/4533b377bef2eed92f5cf978dc051fe822360c5a/KernelErrorsError.java/buggy/kernel/src/java/org/gbean/kernel/KernelErrorsError.java
Iterator iter = iVisited.iterator(); while (iter.hasNext()) {
for (Iterator iter = iVisited.iterator(); iter.hasNext(); ) {
public void visitBlockNode(BlockNode iVisited) { Iterator iter = iVisited.iterator(); while (iter.hasNext()) { eval((Node) iter.next()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
IRubyObject block = eval(iVisited.getBodyNode());
IRubyObject proc = eval(iVisited.getBodyNode());
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
if (block.isNil()) {
if (proc.isNil()) {
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
} else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)");
} if (!(proc instanceof RubyProc)) { proc = proc.convertToType("Proc", "to_proc", false); if (!(proc instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + proc.getMetaClass().getName() + " (expected Proc)"); }
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock());
Block block = (Block) threadContext.getBlockStack().peek(); if (block != null) { IRubyObject blockObject = block.getBlockObject(); if (blockObject != null && blockObject == proc) { try { threadContext.getIterStack().push(Iter.ITER_PRE); eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } }
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
threadContext.getCurrentFrame().setIter(Iter.ITER_PRE);
if (threadContext.getCurrentFrame().getIter() == Iter.ITER_NOT) { threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); }
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
threadContext.getBlockStack().setCurrent(oldBlock);
threadContext.getBlockStack().pop();
public void visitBlockPassNode(BlockPassNode iVisited) { IRubyObject block = eval(iVisited.getBodyNode()); if (block.isNil()) { threadContext.getIterStack().push(Iter.ITER_NOT); try { eval(iVisited.getIterNode()); return; } finally { threadContext.getIterStack().pop(); } } else if (block instanceof RubyMethod) { block = ((RubyMethod)block).to_proc(); } else if (!(block instanceof RubyProc)) { throw new TypeError(runtime, "wrong argument type " + block.getMetaClass().getName() + " (expected Proc)"); } Block oldBlock = (Block) threadContext.getBlockStack().peek(); threadContext.getBlockStack().push(((RubyProc) block).getBlock()); threadContext.getIterStack().push(Iter.ITER_PRE); threadContext.getCurrentFrame().setIter(Iter.ITER_PRE); try { eval(iVisited.getIterNode()); } finally { threadContext.getIterStack().pop(); threadContext.getBlockStack().setCurrent(oldBlock); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
IRubyObject[] args = null;
IRubyObject[] args;
public void visitFCallNode(FCallNode iVisited) { Block tmpBlock = threadContext.beginCallArgs(); IRubyObject[] args = null; try { args = setupArgs(runtime, threadContext, iVisited.getArgsNode()); } finally { threadContext.endCallArgs(tmpBlock); } result = self.getMetaClass().call(self, iVisited.getName(), args, CallType.FUNCTIONAL); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self)); threadContext.getIterStack().push(Iter.ITER_PRE);
threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), self));
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), 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/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
threadContext.getIterStack().pop();
public void visitIterNode(IterNode iVisited) { threadContext.getBlockStack().push(Block.createBlock(iVisited.getVarNode(), new EvaluateMethod(iVisited.getBodyNode(), iVisited.getVarNode()), 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/50d6342dd5da06c42d25bc955addce6aaa0e6b97/EvaluateVisitor.java/buggy/src/org/jruby/evaluator/EvaluateVisitor.java
openIconImage = manager.getLargeImage(IconManager.OPEN_IMAGE);
openIconImage = manager.getLargeImage(IconManager.ZOOM_BAR);
private void initOverlayShapes() { int width = getImage().getWidth(null); int height = getImage().getHeight(null); PaintShapeGenerator generator = PaintShapeGenerator.getInstance(); if(multipleModeOn) { Shape prevShape = generator.getPrevImageShape(); Shape nextShape = generator.getNextImageShape(); AffineTransform prevXForm = AffineTransform.getTranslateInstance(5,height-prevShape.getBounds2D().getHeight()-5); AffineTransform nextXForm = AffineTransform.getTranslateInstance(width-nextShape.getBounds2D().getWidth()-5, height-nextShape.getBounds2D().getHeight()-5); this.prevImageShape = prevXForm.createTransformedShape(prevShape); this.nextImageShape = nextXForm.createTransformedShape(nextShape); } BrowserEnvironment env = BrowserEnvironment.getInstance(); IconManager manager = env.getIconManager(); openIconImage = manager.getLargeImage(IconManager.OPEN_IMAGE); closeIconImage = manager.getLargeImage(IconManager.CLOSE_IMAGE); int iconWidth = openIconImage.getWidth(null); int iconHeight = openIconImage.getHeight(null); openIconShape = new Rectangle2D.Double(width-iconWidth-8,50, iconWidth,iconHeight); iconWidth = closeIconImage.getWidth(null); iconHeight = closeIconImage.getHeight(null); closeIconShape = new Rectangle2D.Double(width-iconWidth-8,8, iconWidth,iconHeight); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/67f806803689dfafeadcc47cb4a1ebc8857cbcc4/SemanticZoomNode.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/SemanticZoomNode.java
path.lineTo(12,16); path.lineTo(18,16); path.lineTo(18,8); path.lineTo(12,8);
public Shape getPrevImageShape() { GeneralPath path = new GeneralPath(); path.moveTo(12,0); path.lineTo(0,12); path.lineTo(12,24); path.closePath(); return path; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/67f806803689dfafeadcc47cb4a1ebc8857cbcc4/PaintShapeGenerator.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/images/PaintShapeGenerator.java
path.moveTo(0,0); path.lineTo(12,12); path.lineTo(0,24);
path.moveTo(6,0); path.lineTo(18,12); path.lineTo(6,24); path.lineTo(6,16); path.lineTo(0,16); path.lineTo(0,8); path.lineTo(6,8);
public Shape getNextImageShape() { GeneralPath path = new GeneralPath(); path.moveTo(0,0); path.lineTo(12,12); path.lineTo(0,24); path.closePath(); return path; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/67f806803689dfafeadcc47cb4a1ebc8857cbcc4/PaintShapeGenerator.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/images/PaintShapeGenerator.java
public synchronized int[] getRGBA(int w) { ChannelBinding[] cb = renderer.getChannelBindings();// int[] rgba = cb[w].getColor, copy = new int[rgba.length];// System.arraycopy(rgba, 0, copy, 0, rgba.length);// return copy; // NOTE: The rgba is supposed to be read-only; however we make a // copy to be on the safe side. int[] rgba = new int[4]; // FIXME rgba[0] = cb[w].getColor().getRed().intValue(); rgba[1] = cb[w].getColor().getGreen().intValue(); rgba[2] = cb[w].getColor().getBlue().intValue(); rgba[3] = cb[w].getColor().getAlpha().intValue(); return rgba; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd28d948457cceff10335f38f67f7866ed76e809/RenderingEngineImpl.java/clean/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
cb[w].setInputStart(new Float(start)); cb[w].setInputEnd(new Float(end));
public synchronized void setChannelWindow(int w, double start, double end) { QuantumStrategy qs = renderer.getQuantumManager().getStrategyFor(w); qs.setWindow(start, end); ChannelBinding[] cb = renderer.getChannelBindings(); // FIXME cb[w].setInputWindow(start, end); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd28d948457cceff10335f38f67f7866ed76e809/RenderingEngineImpl.java/clean/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
CodomainMapContext mapCtx; Iterator i = rd.getSpatialDomainEnhancement().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); }
public synchronized void setCodomainInterval(int start, int end) { CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantization(), newQd; newQd = new QuantumDef(); newQd.setBitResolution(qd.getBitResolution()); newQd.setCdStart(Integer.valueOf(start)); newQd.setCdStop(Integer.valueOf(end)); rd.setQuantization(newQd);// FIXME// CodomainMapContext mapCtx;// Iterator i = rd.getCodomainChainDef().iterator();// while (i.hasNext())// {// mapCtx = (CodomainMapContext) i.next();// mapCtx.setCodomain(start, end);// } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd28d948457cceff10335f38f67f7866ed76e809/RenderingEngineImpl.java/clean/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public synchronized void setRGBA(int w, int red, int green, int blue, int alpha) { ChannelBinding[] cb = renderer.getChannelBindings(); // FIXMEcb[w].setRGBA(red, green, blue, alpha); Color c = cb[w].getColor(); c.setRed(Integer.valueOf(red)); c.setGreen(Integer.valueOf(green)); c.setBlue(Integer.valueOf(blue)); c.setAlpha(Integer.valueOf(alpha)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd28d948457cceff10335f38f67f7866ed76e809/RenderingEngineImpl.java/clean/components/rendering/src/omeis/providers/re/RenderingEngineImpl.java
public double[] getChannelStats(int w);
public double[] getChannelStats(int w);
public double[] getChannelStats(int w); //Do we need that one?
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngine.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngine.java
/* FIXME : very broken. ColorDomain and pixData.get_wave_lengths aren't there.*/
if (pixData == null) rgb = ColorsFactory.getColor(w, -1); else rgb = ColorsFactory.getColor(w, pixData.getLogicalChannel().getEmissionWave()); if (pixData != null && metadata.getAcquisitionContext().getPhotometricInterpretation().getValue() == "RGB") { active = true; model = RenderingDefConstants.RGB; }
public static RenderingDef createDefaultRenderingDef(Pixels metadata, PixelsStats stats) { int c_size = metadata.getSizeC().intValue(); int z_size = metadata.getSizeZ().intValue(); QuantumDef qDef = new QuantumDef(); qDef.setBitResolution(QuantumFactory.DEPTH_8BIT); qDef.setCdStart(0); qDef.setCdStop(QuantumFactory.DEPTH_8BIT); ChannelBindings[] waves = new ChannelBindings[c_size]; PixTStatsEntry wGlobal; int[] rgb = ColorsFactory.getColor(0,0); // FIXME was empty Channel pixData; boolean active = false; int model = RenderingDefConstants.GS; Map map = getPixelsChannelData(metadata); for (int w = 0; w < c_size; ++w) { pixData = (Channel) map.get(new Integer(w)); wGlobal = stats.getGlobalEntry(w);/* FIXME : very broken. ColorDomain and pixData.get_wave_lengths aren't there.*/// if (pixData == null) rgb = ColorsFactory.getColor(w, -1);// else rgb = ColorsFactory.getColor(w, 0);// FIXME FIXME pixData.getEm...);// if (pixData != null && // pixData.getColorDomain() == RGB_COLOR_DOMAIN) {// active = true;// model = RenderingDefConstants.RGB;// } waves[w] = new ChannelBindings(w, wGlobal.globalMin, wGlobal.globalMax, rgb, active, QuantumFactory.LINEAR, 1); } waves[0].setActive(true); //NOTE: dims object enforces 1 < sizeC. RenderingDef newRD = new RenderingDef(); int defaultZ = z_size/2+z_size%2-1; newRD.setDefaultZ(Integer.valueOf(defaultZ)); newRD.setDefaultT(Integer.valueOf(0)); newRD.setModel(RenderingDefConstants.convertToType(model)); newRD.setQuantization(qDef); newRD.setWaveRendering(new HashSet(Arrays.asList(waves))); return newRD; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fd28d948457cceff10335f38f67f7866ed76e809/Helper.java/buggy/components/rendering/src/tmp/Helper.java
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/Renderer.java/buggy/components/rendering/src/omeis/providers/re/Renderer.java
quantumManager = new QuantumManager(metadata);
quantumManager = new QuantumManager(metadata, iPixels);
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/Renderer.java/buggy/components/rendering/src/omeis/providers/re/Renderer.java
public Renderer(IPixels iPixels, Pixels pixelsObj, RenderingDef renderingDefObj, PixelBuffer bufferObj) { metadata = pixelsObj; rndDef = renderingDefObj; buffer = bufferObj; this.iPixels = iPixels; if (metadata == null) throw new NullPointerException("Expecting not null metadata"); else if (rndDef == null) throw new NullPointerException("Expecting not null rndDef"); else if (buffer == null) throw new NullPointerException("Expecting not null buffer"); //Create and configure the quantum strategies. QuantumDef qd = rndDef.getQuantization(); quantumManager = new QuantumManager(metadata); ChannelBinding[] cBindings= getChannelBindings(); quantumManager.initStrategies(qd, metadata.getPixelsType(), cBindings); //Compute the location stats. computeLocationStats(getDefaultPlaneDef()); //Create and configure the codomain chain. codomainChain = new CodomainChain(qd.getCdStart().intValue(), qd.getCdEnd().intValue(), rndDef.getSpatialDomainEnhancement()); //Create an appropriate rendering strategy. renderingStrategy = RenderingStrategy.makeNew(rndDef.getModel()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/Renderer.java/buggy/components/rendering/src/omeis/providers/re/Renderer.java
public static Color getColor(int index, Channel channel)
private static Color getColor(Channel channel)
public static Color getColor(int index, Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/96e921a430a0d0cc0ba3a6f2cdc25e82227755d5/ColorsFactory.java/buggy/components/rendering/src/omeis/providers/re/ColorsFactory.java
Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; }
Integer emWave = channel.getLogicalChannel().getEmissionWave(); if (emWave == null) return null; if (rangeBlue(emWave)) return newBlueColor(); if (rangeGreen(emWave)) return newGreenColor(); if (rangeRed(emWave)) return newRedColor(); return null;
public static Color getColor(int index, Channel channel) { Color c = ColorsFactory.getColor(channel); if (c != null) return c; switch (index) { case 0: return BLUE_COLOR; case 1: return GREEN_COLOR; default: return RED_COLOR; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/96e921a430a0d0cc0ba3a6f2cdc25e82227755d5/ColorsFactory.java/buggy/components/rendering/src/omeis/providers/re/ColorsFactory.java
public void setDefaultT(int t);
public void setDefaultT(int t);
public void setDefaultT(int t); //Is it the best way to do it?
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngine.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngine.java
public void setDefaultZ(int z);
public void setDefaultZ(int z);
public void setDefaultZ(int z); //Is it the best way to do it?
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1a80ae364d5a13aebca07b0ae7349d79247ded75/RenderingEngine.java/buggy/components/rendering/src/omeis/providers/re/RenderingEngine.java
Hibernate.initialize(o);
public IObject find(@NotNull final Class klass, final long id) { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); Hibernate.initialize(o); return o; } }); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0039ef3c66932163f0ec9bfa2b7f37eaa70abe47/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
Hibernate.initialize(o);
public Object doInHibernate(Session session) throws HibernateException { IObject o = (IObject) session.get(klass,id); Hibernate.initialize(o); return o; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0039ef3c66932163f0ec9bfa2b7f37eaa70abe47/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
Hibernate.initialize(o);
public IObject get(@NotNull final Class klass, final long id) throws ValidationException { return (IObject) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } Hibernate.initialize(o); return o; } }); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0039ef3c66932163f0ec9bfa2b7f37eaa70abe47/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
Hibernate.initialize(o);
public Object doInHibernate(Session session) throws HibernateException { IObject o = null; try { o = (IObject) session.load(klass,id); } catch (ObjectNotFoundException onfe) { throw new ApiUsageException(String.format( "The requested object (%s,%s) is not available.\n" + "Please use IQuery.find to deteremine existance.\n", klass.getName(),id)); } Hibernate.initialize(o); return o; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0039ef3c66932163f0ec9bfa2b7f37eaa70abe47/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
_broker.stopClient();
final public void destroy() { if (_alive) { _alive = false; _webContext = null; _log.info("shutdown " + this); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/65c210c2e5230f99b78b769799e9e54e3fcce30a/WM.java/clean/webmacro/src/org/webmacro/WM.java
int flags = Pattern.MULTILINE;
int flags = Pattern.MULTILINE;
int translateFlags(int options) { int flags = Pattern.MULTILINE; if ((options & ReOptions.RE_OPTION_IGNORECASE) > 0) { flags |= Pattern.CASE_INSENSITIVE; } if ((options & ReOptions.RE_OPTION_EXTENDED) > 0) { flags |= Pattern.COMMENTS; } if ((options & ReOptions.RE_OPTION_MULTILINE) > 0) { flags |= Pattern.DOTALL; } return flags; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2c27b59d0859c8f4097e71f0b43756b07d481510/RegexpTranslator.java/buggy/src/org/jruby/RegexpTranslator.java
String translatePattern(String regex, boolean commentsAllowed) { regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"x0$1"); regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1"); if (commentsAllowed) { regex = SPACE_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x20$2"); regex = SHARP_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x23$2"); } return regex; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/2c27b59d0859c8f4097e71f0b43756b07d481510/RegexpTranslator.java/buggy/src/org/jruby/RegexpTranslator.java
public RubyClass newSubClass(String name, RubyModule parent) { return new StringMetaClass(name, this, parent);
public RubyClass newSubClass(String name, SinglyLinkedList parentCRef) { return new StringMetaClass(name, this, parentCRef);
public RubyClass newSubClass(String name, RubyModule parent) { return new StringMetaClass(name, this, parent); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/StringMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/StringMetaClass.java
public void defineMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; addMethod(name, new ReflectedMethod(this, builtinClass, java_name, arity, visibility));
public void defineMethod(String name, Arity arity) { defineMethod(name, arity, name);
public void defineMethod(String name, Arity arity, String java_name) { assert name != null; assert arity != null; assert java_name != null; Visibility visibility = name.equals("initialize") ? Visibility.PRIVATE : Visibility.PUBLIC; addMethod(name, new ReflectedMethod(this, builtinClass, java_name, arity, visibility)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/AbstractMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/AbstractMetaClass.java
protected ObjectMetaClass(String name, Class builtinClass, RubyClass superClass) { this(name, builtinClass, superClass, superClass.getRuntime().getClass("Object").getCRef());
public ObjectMetaClass(IRuby runtime) { super(runtime, null /*Would be Class if it existed yet */, null, null, "Object"); this.builtinClass = RubyObject.class;
protected ObjectMetaClass(String name, Class builtinClass, RubyClass superClass) { this(name, builtinClass, superClass, superClass.getRuntime().getClass("Object").getCRef()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/5e2d21a7295d01b2d891cfc8c8e67af99a3d858e/ObjectMetaClass.java/buggy/src/org/jruby/runtime/builtin/meta/ObjectMetaClass.java
System.err.println("handling background click..");
public void handleBackgroundClick() { System.err.println("handling background click.."); hideLastChainView(); super.handleBackgroundClick(); SelectAnalysisChain event = new SelectAnalysisChain(null); registry.getEventBus().post(event); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
if (lastChainView != null) {
if (lastChainView != null) {
public void hideLastChainView() { if (lastChainView != null) { lastChainView.hide(); } lastChainView = null; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
public void mouseEntered(PInputEvent e) { PNode n = e.getPickedNode(); super.mouseEntered(e); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
if (n instanceof ChainBox) checkExit((ChainBox) n,e);
if (n instanceof ChainBox) { if (!checkEventInNodeInterior(n,e)) super.mouseExited(e); }
public void mouseExited(PInputEvent e) { PNode n = e.getPickedNode(); if (n instanceof ChainBox) checkExit((ChainBox) n,e); else super.mouseExited(e); e.setHandled(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
System.err.println("last chain view is ..."+lastChainView);
if (this.lastChainView == lastChainView) lastChainView.showFullView(true);
public void setLastChainView(PaletteChainView lastChainView) { System.err.println("last chain view is ..."+lastChainView); this.lastChainView = lastChainView; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
System.err.println("setting last entered to .."+node);
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
&& !lastChainView.isAncestorOf(node))
&& !lastChainView.isAncestorOf(node) && !lastChainView.isDescendentOf(node))
protected void setLastEntered(PNode node) { System.err.println("setting last entered to .."+node); if (lastChainView != null && lastChainView != node && node != null && !lastChainView.isAncestorOf(node)) hideLastChainView(); if (node instanceof ChainBox) { ChainBox cb = (ChainBox)node; if (cb.getChainView() instanceof PaletteChainView) lastChainView = (PaletteChainView) cb.getChainView(); } super.setLastEntered(node); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
System.err.println("setting selected chain.."+chain.getChain().getName());
private void setSelectedChain(ChainView chain) { System.err.println("setting selected chain.."+chain.getChain().getName()); if (chain != null && chain.getChain() != null) { ((ChainPaletteCanvas) canvas).setDraggingChain(chain.getChain());; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6a77f59baeb1319a898414f2998d48c334a1c678/ChainPaletteEventHandler.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/piccolo/ChainPaletteEventHandler.java
public void activate(Rectangle bounds) { switch (model.getState()) { case NEW: model.fireHierarchyLoading(); view.setComponentBounds(bounds); //view.setOnScreen(); fireStateChange(); break; case DISCARDED: throw new IllegalStateException( "This method can't be invoked in the DISCARDED state."); default: view.deIconify(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/HiViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
TreeView treeView = model.getTreeView(); if (treeView == null) { model.createTreeView(); treeView = model.getTreeView(); treeView.addPropertyChangeListener(controller); } return treeView;
return model.getTreeView();
public TreeView getTreeView() { int state = model.getState(); if (state == NEW && state == DISCARDED) throw new IllegalStateException( "This method cannot be invoked in the NEW "+ "or DISCARDED state."); TreeView treeView = model.getTreeView(); if (treeView == null) { model.createTreeView(); treeView = model.getTreeView(); treeView.addPropertyChangeListener(controller); } return treeView; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/HiViewerComponent.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/HiViewerComponent.java
repaint();
public void setAxisName(String name) { this.axisName = name; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6d45d101f4e831fda33928e252f882d4d16128d2/HeatMapGradientUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapGradientUI.java
repaint();
public void setMax(double d) { this.max = d; this.maxRange = d; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6d45d101f4e831fda33928e252f882d4d16128d2/HeatMapGradientUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapGradientUI.java
repaint();
public void setMin(double d) { this.min = d; this.minRange = d; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6d45d101f4e831fda33928e252f882d4d16128d2/HeatMapGradientUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapGradientUI.java
repaint();
public void setRangeMax(double d) { this.maxRange = d; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6d45d101f4e831fda33928e252f882d4d16128d2/HeatMapGradientUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapGradientUI.java
repaint();
public void setRangeMin(double d) { this.minRange = d; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6d45d101f4e831fda33928e252f882d4d16128d2/HeatMapGradientUI.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/heatmap/HeatMapGradientUI.java
String classpath = earls[i].getFile();
String classpath = (new File(earls[i].getFile())).getAbsolutePath();
protected Java getJava() { if (java == null) { java = (Java)getProject().createTask("java"); java.setTaskName(getTaskName()); java.setClassname(getClassName()); java.setFork(true); java.setDir(getProject().getBaseDir()); /** * We replace %20 with a space character because, for some * reason, when we call Cobertura from within CruiseControl, * the classpath here contains %20's instead of spaces. I * don't know if this is our problem, or CruiseControl, or * ant, but this seems to fix it. --Mark */ if (getClass().getClassLoader() instanceof AntClassLoader) { String classpath = ((AntClassLoader)getClass() .getClassLoader()).getClasspath(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } else if (getClass().getClassLoader() instanceof URLClassLoader) { URL[] earls = ((URLClassLoader)getClass().getClassLoader()) .getURLs(); for (int i = 0; i < earls.length; i++) { String classpath = earls[i].getFile(); createClasspath().setPath( StringUtil.replaceAll(classpath, "%20", " ")); } } } return java; }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c863f3ae341e9d7e33ea0ce13506504fe85dfade/CommonMatchingTask.java/clean/cobertura/src/net/sourceforge/cobertura/ant/CommonMatchingTask.java
will_lock = true;
public void test_U_Projects_O_Datasets_O_Link() throws Exception { ownsfA = u; ownerA = user; groupA = user_other_group; ownsfB = ownsfC = o; ownerB = ownerC = other; groupB = groupC = user_other_group; // RW_RW_RW / RW_RW_RW / RW_RW_RW permsA = permsB = permsC = RW_RW_RW; manyToMany(); // RW_RW_RW / RW_RW_xx / RW_RW_RW permsA = RW_RW_RW; permsB = RW_RW_xx; permsC = RW_RW_RW; manyToMany(); // RW_RW_RW / RW_xx_xx / RW_RW_RW permsA = RW_RW_RW; permsB = RW_xx_xx; permsC = RW_RW_RW; manyToMany(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c94acf1ed28125ea3ec367725deb6b3896e87bd4/UseSecurityTest.java/clean/components/client/test/ome/client/itests/sec/UseSecurityTest.java
pt.setValue("test"+System.currentTimeMillis());
pt.setValue("int8");
public static Pixels createPixelGraph(Pixels example) { Pixels p = new Pixels(); AcquisitionContext ac = new AcquisitionContext(); PhotometricInterpretation pi = new PhotometricInterpretation(); AcquisitionMode mode = new AcquisitionMode(); PixelsType pt = new PixelsType(); DimensionOrder dO = new DimensionOrder(); PixelsDimensions pd = new PixelsDimensions(); Image i = new Image(); Channel c = new Channel(); if (example != null) { p.setId(example.getId()); p.setVersion(example.getVersion()); // everything else unloaded. ac.setId(example.getAcquisitionContext().getId()); ac.unload(); pt.setId(example.getPixelsType().getId()); pt.unload(); dO.setId(example.getDimensionOrder().getId()); dO.unload(); pd.setId(example.getPixelsDimensions().getId()); pd.unload(); i.setId(example.getImage().getId()); i.unload(); c.setId(((Channel)example.getChannels().get(0)).getId()); c.unload(); } else { mode.setValue("test"+System.currentTimeMillis()); pi.setValue("test"+System.currentTimeMillis()); ac.setPhotometricInterpretation(pi); ac.setMode(mode); pt.setValue("test"+System.currentTimeMillis()); dO.setValue("XXXX"+System.currentTimeMillis()); pd.setSizeX(new Float(1.0)); pd.setSizeY(new Float(1.0)); pd.setSizeZ(new Float(1.0)); c.setPixels(p); i.setName("test"); } p.setSizeX(new Integer(1)); p.setSizeY(new Integer(1)); p.setSizeZ(new Integer(1)); p.setSizeC(new Integer(1)); p.setSizeT(new Integer(1)); p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356"); // "pixels" p.setAcquisitionContext(ac); p.setPixelsType(pt); p.setDimensionOrder(dO); p.setPixelsDimensions(pd); p.setImage(i); List channels = new ArrayList(); channels.add(c); p.setChannels(channels); // Reverse links // FIXME i.setActivePixels(p); p.setDetails(new Details()); return p; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/2175459135ea2f0072491a403552435e5fc26f03/ObjectFactory.java/buggy/components/common/src/ome/testing/ObjectFactory.java
_variables.clear();
public void clear() { Iterator i = _initializedTools.entrySet().iterator(); while (i.hasNext()) { Map.Entry m = (Map.Entry) i.next(); ContextTool ct = (ContextTool) m.getKey(); ct.destroy(m.getValue()); } _initializedTools.clear(); if (_prof != null) { stopTiming(); _prof.destroy(); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/ed9002c26c043d77169080989478f79570deb4ec/Context.java/buggy/webmacro/src/org/webmacro/Context.java
public ComponentMap(Settings initProps) { _config = initProps;
public ComponentMap() { _config = new Settings();
public ComponentMap(Settings initProps) { _config = initProps; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/8f5880751893a7e5dd9da25d036747a39c9b25b5/ComponentMap.java/buggy/webmacro/src/org/webmacro/util/ComponentMap.java
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix);
public void load(String namelist) { load(tokenize(namelist), "");
public void load(String namelist, String suffix) { load(tokenize(namelist), suffix); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/8f5880751893a7e5dd9da25d036747a39c9b25b5/ComponentMap.java/buggy/webmacro/src/org/webmacro/util/ComponentMap.java
throw getRuntime().newTypeError(inspect().getValue() + " is not a symbol");
throw getRuntime().newTypeError(inspect().toString() + " is not a symbol");
public String asSymbol() { throw getRuntime().newTypeError(inspect().getValue() + " is not a symbol"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
((RubyString) filename).getValue(),
((RubyString) filename).toString(),
public IRubyObject evalUnder(RubyModule under, IRubyObject src, IRubyObject file, IRubyObject line) { /* if (ruby_safe_level >= 4) { Check_Type(src, T_STRING); } else { Check_SafeStr(src); } */ return under.executeUnder(new Callback() { public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).getValue(), RubyNumeric.fix2int(lineNumber)); } public Arity getArity() { return Arity.optional(); } }, new IRubyObject[] { this, src, file, line }); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
((RubyString) filename).getValue(),
((RubyString) filename).toString(),
public IRubyObject execute(IRubyObject self, IRubyObject[] args) { IRubyObject source = args[1]; IRubyObject filename = args[2]; IRubyObject lineNumber = args[3]; return args[0].eval(source, self.getRuntime().getNil(), ((RubyString) filename).getValue(), RubyNumeric.fix2int(lineNumber)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
return ((RubyString) callMethod("to_s")).getValue();
return ((RubyString) callMethod("to_s")).toString();
public String toString() { return ((RubyString) callMethod("to_s")).getValue(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
RubyString str = getRuntime().newString("");
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); RubyString str = getRuntime().newString(""); /* 6:tags 16:addr 1:eos */ str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">");
RubyString str = getRuntime().newString("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">");
public RubyString to_s() { String cname = getMetaClass().getRealClass().getName(); RubyString str = getRuntime().newString(""); /* 6:tags 16:addr 1:eos */ str.setValue("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(this)) + ">"); str.setTaint(isTaint()); return str; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyObject.java/clean/src/org/jruby/RubyObject.java
public RaiseException newNoMethodError(String message);
public RaiseException newNoMethodError(String message, String name);
public RaiseException newNoMethodError(String message);
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/IRuby.java/buggy/src/org/jruby/IRuby.java
EncodingCache ec = new EncodingCache("UTF8", 11, 3);
/** byte[] prefix = getPrefix(arg[0]); System.out.println("Prefix for " + arg[0] + " is " + prefix.length + " bytes long"); */ EncodingCache ec = new EncodingCache("UTF16-LE", 11, 3);
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/a9a36c227b06a53be74c8cbbe281c231d9f574ff/EncodingCache.java/clean/webmacro/src/org/webmacro/util/EncodingCache.java
s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) );
String s1 = s.intern(); byte b[] = ec.getEncoding(s1); String s2 = new String(b, "UTF16-LE"); System.out.print("Encoding string: " + s1 + " --> ["); System.out.print( s2 );
public static void main(String arg[]) { try { EncodingCache ec = new EncodingCache("UTF8", 11, 3); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s; while ((s = in.readLine()) != null) { s = s.intern(); System.out.print("Encoding string: " + s + " --> ["); System.out.write( ec.getEncoding(s) ); System.out.println("]"); } } catch (Exception e) { e.printStackTrace(); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/a9a36c227b06a53be74c8cbbe281c231d9f574ff/EncodingCache.java/clean/webmacro/src/org/webmacro/util/EncodingCache.java
currentSelectPoint = e.getCamera().viewToLocal(e.getPosition());
double originalX = selectionAnchorPoint.getX(); double originalY = selectionAnchorPoint.getY(); double newX = e.getPosition().getX(); double newY = e.getPosition().getY(); double minX = Math.min(originalX,newX); double minY = Math.min(originalY,newY); double maxX = Math.max(originalX,newX); double maxY = Math.max(originalY,newY); selectionNode.setBounds(minX,minY, maxX-minX,maxY-minY);
public void respondDrag(PInputEvent e) { currentSelectPoint = e.getCamera().viewToLocal(e.getPosition()); repaint(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
double tlX = Math.min(initialSelectPoint.getX(),
double tlX = Math.min(selectionAnchorPoint.getX(),
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
double tlY = Math.min(initialSelectPoint.getY(),
double tlY = Math.min(selectionAnchorPoint.getY(),
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
double brX = Math.max(initialSelectPoint.getX(),
double brX = Math.max(selectionAnchorPoint.getX(),
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
double brY = Math.max(initialSelectPoint.getY(),
double brY = Math.max(selectionAnchorPoint.getY(),
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
getLayer().removeChild(selectionNode);
public void respondEndDrag(PInputEvent e) { Point2D endSelectPoint = e.getPosition(); double tlX = Math.min(initialSelectPoint.getX(), endSelectPoint.getX()); double tlY = Math.min(initialSelectPoint.getY(), endSelectPoint.getY()); double brX = Math.max(initialSelectPoint.getX(), endSelectPoint.getX()); double brY = Math.max(initialSelectPoint.getY(), endSelectPoint.getY()); Rectangle2D region = new Rectangle2D.Double(tlX,tlY,brX-tlX, brY-tlY); List thumbnailList = browserModel.getThumbnails(); for(Iterator iter = thumbnailList.iterator(); iter.hasNext();) { Thumbnail t = (Thumbnail)iter.next(); Rectangle2D tBounds = new Rectangle2D.Double(t.getOffset().getX(), t.getOffset().getY(), t.getBounds().getWidth(), t.getBounds().getHeight()); if(tBounds.intersects(region)) { browserModel.selectThumbnail(t); } } if(browserModel.getSelectedImages().size() > 0) { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTED_MODE); } else { browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.UNSELECTED_MODE); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
initialSelectPoint = new Point2D.Double(position.getX()- offset.getWidth(), position.getY()- offset.getHeight()); Point2D dummy = new Point2D.Double(initialSelectPoint.getX(), initialSelectPoint.getY()); initialViewPoint = e.getCamera().viewToLocal(dummy); currentSelectPoint = e.getCamera().viewToLocal(position);
selectionNode = new PNode(); selectionNode.setPaint(new Color(153,153,192,128)); selectionAnchorPoint = position; selectionNode.setBounds(position.getX(),position.getY(), offset.getWidth(),offset.getHeight()); getLayer().addChild(selectionNode);
public void respondStartDrag(PInputEvent e) { Point2D position = e.getPosition(); Dimension2D offset = e.getDelta(); initialSelectPoint = new Point2D.Double(position.getX()- offset.getWidth(), position.getY()- offset.getHeight()); Point2D dummy = new Point2D.Double(initialSelectPoint.getX(), initialSelectPoint.getY()); initialViewPoint = e.getCamera().viewToLocal(dummy); currentSelectPoint = e.getCamera().viewToLocal(position); int modifier = PiccoloModifiers.getModifier(e); if(modifier != PiccoloModifiers.MOUSE_INDIV_SELECT && modifier != PiccoloModifiers.SHIFT_DOWN) { browserModel.deselectAllThumbnails(); } browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME, BrowserMode.SELECTING_MODE); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
oldModeMap = new HashMap();
private void init(BrowserTopModel topModel) { env = BrowserEnvironment.getInstance(); setBackground(new Color(192,192,192)); backgroundNode = new BackgroundNode(); getLayer().addChild(backgroundNode); layoutMap = new HashMap(); footprint = new Rectangle2D.Double(0,0,0,0); hoverSensitive = new HashSet(); regionSensitive = new HashSet(); zoomParamListeners = new HashSet(); removeInputEventListener(getZoomEventHandler()); removeInputEventListener(getPanEventHandler()); // default panning mode (may replace this, but probably not) overlayCamera = new BrowserCamera(topModel,getCamera()); hoverSensitive.add(overlayCamera); regionSensitive.add(overlayCamera); scaleToShow = true; addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextEntered(); } } public void mouseExited(MouseEvent me) { for(Iterator iter = hoverSensitive.iterator(); iter.hasNext();) { HoverSensitive hover = (HoverSensitive)iter.next(); hover.contextExited(); } } }); // OK, now, dispatch to the underlying nodes addInputEventListener(BrowserViewEventDispatcher.getDefaultMouseHandler()); addInputEventListener(BrowserViewEventDispatcher.getDefaultDragHandler()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
if(mode == BrowserMode.NOOP_MODE) { semanticHoverThumbnailAction = PiccoloAction.PNOOP_ACTION; defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); setThumbnailOverActions(defaultTOverActions); }
public void modeChanged(String className, BrowserMode mode) { // boooooo. if(className == null) { return; } else if(className.equals(BrowserModel.PAN_MODE_NAME)) { if(mode == BrowserMode.HAND_MODE) { // TODO: change drag listener here } else if(mode == BrowserMode.NO_HAND_MODE) { // TODO: change back. } } else if(className.equals(BrowserModel.MAJOR_UI_MODE_NAME)) { if(mode == BrowserMode.DEFAULT_MODE) { // TODO: fill this in } } else if(className.equals(BrowserModel.SELECT_MODE_NAME)) { if(mode == BrowserMode.SELECTING_MODE) { selectionInProgress = true; repaint(); } else { selectionInProgress = false; repaint(); } } else if(className.equals(BrowserModel.ZOOM_MODE_NAME)) { if(mode == BrowserMode.ZOOM_TO_FIT_MODE) { setZoomToScale(true); } else if(mode == BrowserMode.ZOOM_ACTUAL_MODE) { setZoomToScale(false); setZoomLevel(1); } else if(mode == BrowserMode.ZOOM_50_MODE) { setZoomToScale(false); setZoomLevel(0.5); } else if(mode == BrowserMode.ZOOM_75_MODE) { setZoomToScale(false); setZoomLevel(0.75); } else if(mode == BrowserMode.ZOOM_200_MODE) { setZoomToScale(false); setZoomLevel(2); } } else if(className.equals(BrowserModel.SEMANTIC_MODE_NAME)) { if(mode == BrowserMode.IMAGE_NAME_MODE) { semanticHoverThumbnailAction = PiccoloActionFactory.getImageNameEnterAction(semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); setThumbnailOverActions(defaultTOverActions); } else if(mode == BrowserMode.SEMANTIC_ZOOMING_MODE) { semanticHoverThumbnailAction = PiccoloActionFactory.getSemanticEnterAction(semanticLayer); defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL, semanticHoverThumbnailAction); setThumbnailOverActions(defaultTOverActions); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java
backgroundNode.setBounds(0,0,width/viewScale,height/viewScale);
backgroundNode.setBounds(0,0,10000,10000);
public void updateConstraints() { Dimension dimension = getSize(); double width = dimension.getWidth(); double height = dimension.getHeight(); double xRatio = width / footprint.getWidth(); double yRatio = height / footprint.getHeight(); if(Math.min(xRatio,yRatio) != minZoomLevel) { minZoomLevel = Math.min(xRatio,yRatio); if(minZoomLevel < 0.05) { minZoomLevel = 0.05; } else if(minZoomLevel > 0.75) { minZoomLevel = 0.75; } for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.minZoomLevelChanged(minZoomLevel); } } // for some reason, setting setViewScale(0) screws things up // in a big way. if(scaleToShow) { if((xRatio < 1 || yRatio < 1) && (xRatio != 0 && yRatio != 0)) { double min = Math.min(xRatio,yRatio); getCamera().setViewScale(min); } else { getCamera().setViewScale(1); } } boundCameraPosition(); double viewScale = getCamera().getViewScale(); backgroundNode.setBounds(0,0,width/viewScale,height/viewScale); // update things for(Iterator iter = regionSensitive.iterator(); iter.hasNext();) { RegionSensitive rs = (RegionSensitive)iter.next(); rs.setActiveRegion(footprint); } overlayCamera.cameraResized(new Rectangle2D.Double(0,0,width,height)); for(Iterator iter = zoomParamListeners.iterator(); iter.hasNext();) { ZoomParamListener listener = (ZoomParamListener)iter.next(); listener.zoomLevelChanged(viewScale); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserView.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/ui/BrowserView.java