rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
return (EditArticleView) tab.getPerspective(TASK_ID_EDIT);
return (EditArticleView) tab.getTabView(TASK_ID_EDIT);
protected EditArticleView getEditArticleView(){ WFTabbedPane tab = getWFTabbedPane(); if(tab!=null){ return (EditArticleView) tab.getPerspective(TASK_ID_EDIT); } return null; }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleAdminBlock.java/clean/src/java/com/idega/block/article/component/ArticleAdminBlock.java
public void initializeComponent(FacesContext context){ //TODO Remove this and use newer localization system: WFPage.loadResourceBundles(context); super.initializeComponent(context); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); //tb.setMainAreaStyleClass(WFContainer.DEFAULT_STYLE_CLASS); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView());// tb.addTabVB(TASK_ID_LIST, bref + "list", new ListArticlesBlock()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); //if (taskbarListener != null) { // tb.addTabListener(taskbarListener); //} String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditMode(editMode); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleAdminBlock.java/clean/src/java/com/idega/block/article/component/ArticleAdminBlock.java
super.initializeComponent(context);
UISaveState beanSaveState = new UISaveState(); ValueBinding binding = WFUtil.createValueBinding("#{"+ARTICLE_ITEM_BEAN_ID+"}"); beanSaveState.setId("articleItemBeanSaveState"); beanSaveState.setValueBinding("value",binding); add(beanSaveState);
public void initializeComponent(FacesContext context){ //TODO Remove this and use newer localization system: WFPage.loadResourceBundles(context); super.initializeComponent(context); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); //tb.setMainAreaStyleClass(WFContainer.DEFAULT_STYLE_CLASS); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView());// tb.addTabVB(TASK_ID_LIST, bref + "list", new ListArticlesBlock()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); //if (taskbarListener != null) { // tb.addTabListener(taskbarListener); //} String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditMode(editMode); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleAdminBlock.java/clean/src/java/com/idega/block/article/component/ArticleAdminBlock.java
String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditMode(editMode); }
public void initializeComponent(FacesContext context){ //TODO Remove this and use newer localization system: WFPage.loadResourceBundles(context); super.initializeComponent(context); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabbedPane tb = new WFTabbedPane(); //tb.setMainAreaStyleClass(WFContainer.DEFAULT_STYLE_CLASS); tb.setId(TASKBAR_ID); add(tb); EditArticleView editArticleBlock = new EditArticleView(); tb.addTabVB(TASK_ID_EDIT, bref + "edit", editArticleBlock); tb.addTabVB(TASK_ID_DETAILS, bref + "details", new ArticleDetailView());// tb.addTabVB(TASK_ID_LIST, bref + "list", new ListArticlesBlock()); tb.addTabVB(TASK_ID_PREVIEW, bref + "preview", new ArticlePreview()); tb.setSelectedMenuItemId(TASK_ID_EDIT); //if (taskbarListener != null) { // tb.addTabListener(taskbarListener); //} String editMode = getEditMode(); if(editMode!=null){ editArticleBlock.setEditMode(editMode); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/5db26355cf68616cbd8859fa37cd6aa73d783808/ArticleAdminBlock.java/clean/src/java/com/idega/block/article/component/ArticleAdminBlock.java
{ int b = control.getGlobalMinimum(); int c = control.getGlobalMaximum(); double a = (double) rangeGraphics/(b-c); return (int) (a*(x-c)+tW); }
{ int b = control.getGlobalMinimum(); int c = control.getGlobalMaximum(); double a = (double) rangeGraphics/(b-c); return (int) (a*(x-c)+tW); }
int convertRealIntoGraphics(int x) { int b = control.getGlobalMinimum(); int c = control.getGlobalMaximum(); double a = (double) rangeGraphics/(b-c); return (int) (a*(x-c)+tW); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
if (presentation != null) { topFrame.addToDesktop(presentation, TopFrame.PALETTE_LAYER); presentation.setVisible(true); }
topFrame.addToDesktop(presentation, TopFrame.PALETTE_LAYER); presentation.setVisible(true);
void showPresentation() { //TODO: add control. if (presentation != null) { topFrame.addToDesktop(presentation, TopFrame.PALETTE_LAYER); presentation.setVisible(true); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/e717f628b707987e5b693ea9d57b6ef34b300679/RenderingAgt.java/clean/SRC/org/openmicroscopy/shoola/agents/rnd/RenderingAgt.java
_log.debug("Looking for template: " + fileName); for (int i=0; i < _templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { _log.debug("TemplateProvider: Found " + fileName + " in " + dir); return tFile; }
_log.debug("Looking for template: " + fileName); for (int i=0; i <_templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { _log.debug("TemplateProvider: Found " + fileName + " in " + dir); return tFile; }
final private File findTemplate (String fileName) { _log.debug("Looking for template: " + fileName); for (int i=0; i < _templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { _log.debug("TemplateProvider: Found " + fileName + " in " + dir); return tFile; } } return null; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/48ee8713236f326ad466e62ec2396568a03a90bc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java
return null;
return null;
final private File findTemplate (String fileName) { _log.debug("Looking for template: " + fileName); for (int i=0; i < _templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { _log.debug("TemplateProvider: Found " + fileName + " in " + dir); return tFile; } } return null; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/48ee8713236f326ad466e62ec2396568a03a90bc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null;
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null;
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { // this probably occured b/c of a parsing error. // should throw some kind of ParseErrorException here instead _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return t; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/48ee8713236f326ad466e62ec2396568a03a90bc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java
try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return t;
try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return t;
final public Template getTemplate(String fileName) { File tFile = findTemplate (fileName); Template t = null; try { t = new FileTemplate (_broker, tFile); t.parse (); _lastModifiedCache.put (fileName, new Long (tFile.lastModified())); } catch (NullPointerException npe) { _log.warning ("TemplateProvider: Template not found: " + fileName, npe); } catch (Exception e) { // this probably occured b/c of a parsing error. // should throw some kind of ParseErrorException here instead _log.warning ("TemplateProvider: Error occured while getting " + fileName, e); } return t; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/48ee8713236f326ad466e62ec2396568a03a90bc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java
final public boolean shouldReload (String fileName) { File tFile = findTemplate (fileName); Long lm = (Long) _lastModifiedCache.get (fileName); return (lm == null || lm.longValue() != tFile.lastModified()); }
final public boolean shouldReload (String fileName) { File tFile = findTemplate (fileName); Long lm = (Long) _lastModifiedCache.get (fileName); return (lm == null || lm.longValue() != tFile.lastModified()); }
final public boolean shouldReload (String fileName) { File tFile = findTemplate (fileName); Long lm = (Long) _lastModifiedCache.get (fileName); return (lm == null || lm.longValue() != tFile.lastModified()); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/48ee8713236f326ad466e62ec2396568a03a90bc/TemplateProvider.java/clean/webmacro/src/org/webmacro/resource/TemplateProvider.java
private Editor getDOEditor(TreeViewer model, DataObject hierarchyObject,
private Editor getDOEditor(TreeViewer model, DataObject ho,
private Editor getDOEditor(TreeViewer model, DataObject hierarchyObject, int editorType) { model.addPropertyChangeListener(this); if (editor != null) return editor; EditorModel m = new EditorModel(model, editorType, hierarchyObject); EditorComponent component = new EditorComponent(m); m.initialize(component); component.initialize(); editor = component; return editor; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d5c797990d356c4ac91ebfe686270c29f4586bd6/EditorFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorFactory.java
EditorModel m = new EditorModel(model, editorType, hierarchyObject);
EditorModel m = new EditorModel(model, editorType, ho);
private Editor getDOEditor(TreeViewer model, DataObject hierarchyObject, int editorType) { model.addPropertyChangeListener(this); if (editor != null) return editor; EditorModel m = new EditorModel(model, editorType, hierarchyObject); EditorComponent component = new EditorComponent(m); m.initialize(component); component.initialize(); editor = component; return editor; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d5c797990d356c4ac91ebfe686270c29f4586bd6/EditorFactory.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorFactory.java
long modstart = System.currentTimeMillis(); if (ChainBuilderAgent.DEBUG) modstart = System.currentTimeMillis();
public Object getContents() { ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } return modData; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ModuleLoader.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java
long loadEnd; if (ChainBuilderAgent.DEBUG) { loadEnd= System.currentTimeMillis()-loadStart; System.err.println("time for get modules and get categories.."+loadEnd); }
public Object getContents() { ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } return modData; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ModuleLoader.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java
if (ChainBuilderAgent.DEBUG) { long modend = System.currentTimeMillis()-modstart; if (modend > 0) System.err.println("total time spent in module get contents.."+modend); }
public Object getContents() { ChainDataManager chainDataManager = (ChainDataManager) dataManager; if (modData == null) { modData = new ModulesData(); Collection mods = chainDataManager.getModules(); Collection cats = chainDataManager.getModuleCategories(); // find uncategorized modules Iterator iter = mods.iterator(); while (iter.hasNext()) { ChainModuleData m = (ChainModuleData) iter.next(); if (m.getModuleCategory()== null) modData.addUncategorizedModule(m); } // find root categories if (cats != null) { iter = cats.iterator(); while (iter.hasNext()) { ModuleCategoryData c = (ModuleCategoryData) iter.next(); if (c.getParentCategory() == null) modData.addRootModuleCategory(c); findCategoryModules(c,mods); findCategoryChildren(c,cats); } } } return modData; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a806bf744289bb0eed666b235887c8680d549d94/ModuleLoader.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/ModuleLoader.java
defineSingletonMethod("pipe", Arity.noArguments());
protected void initializeClass() { includeModule(getRuntime().getModule("Enumerable")); // TODO: Implement tty? and isatty. We have no real capability to // determine this from java, but if we could set tty status, then // we could invoke jruby differently to allow stdin to return true // on this. This would allow things like cgi.rb to work properly. defineSingletonMethod("foreach", Arity.optional()); defineSingletonMethod("read", Arity.optional()); defineSingletonMethod("readlines", Arity.optional()); defineSingletonMethod("popen", Arity.optional()); defineSingletonMethod("select", Arity.optional()); defineMethod("<<", Arity.singleArgument(), "addString"); defineMethod("binmode", Arity.noArguments()); defineMethod("clone", Arity.noArguments(), "clone_IO"); defineMethod("close", Arity.noArguments()); defineMethod("closed?", Arity.noArguments(), "closed"); defineMethod("each", Arity.optional(), "each_line"); defineMethod("each_byte", Arity.noArguments()); defineMethod("each_line", Arity.optional()); defineMethod("eof", Arity.noArguments()); defineAlias("eof?", "eof"); defineMethod("fcntl", Arity.twoArguments()); defineMethod("fileno", Arity.noArguments()); defineMethod("flush", Arity.noArguments()); defineMethod("fsync", Arity.noArguments()); defineMethod("getc", Arity.noArguments()); defineMethod("gets", Arity.optional()); defineMethod("initialize", Arity.optional()); defineMethod("lineno", Arity.noArguments()); defineMethod("lineno=", Arity.singleArgument(), "lineno_set"); defineMethod("pid", Arity.noArguments()); defineMethod("pos", Arity.noArguments()); defineMethod("pos=", Arity.singleArgument(), "pos_set"); defineMethod("print", Arity.optional()); defineMethod("printf", Arity.optional()); defineMethod("putc", Arity.singleArgument()); defineMethod("puts", Arity.optional()); defineMethod("readpartial", Arity.optional()); defineMethod("read", Arity.optional()); defineMethod("readchar", Arity.noArguments()); defineMethod("readline", Arity.optional()); defineMethod("readlines", Arity.optional()); defineMethod("reopen", Arity.optional()); defineMethod("rewind", Arity.noArguments()); defineMethod("seek", Arity.optional()); defineMethod("sync", Arity.noArguments()); defineMethod("sync=", Arity.singleArgument(), "sync_set"); defineMethod("sysread", Arity.singleArgument()); defineMethod("syswrite", Arity.singleArgument()); defineAlias("tell", "pos"); defineAlias("to_i", "fileno"); defineMethod("to_io", Arity.noArguments()); defineMethod("ungetc", Arity.singleArgument()); defineMethod("write", Arity.singleArgument()); defineMethod("tty?", Arity.noArguments(), "tty"); defineAlias("isatty", "tty?"); // Constants for seek setConstant("SEEK_SET", getRuntime().newFixnum(IOHandler.SEEK_SET)); setConstant("SEEK_CUR", getRuntime().newFixnum(IOHandler.SEEK_CUR)); setConstant("SEEK_END", getRuntime().newFixnum(IOHandler.SEEK_END)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ebb36c83a55d3d046354e5aea24d7b0285ac2c54/IOMetaClass.java/clean/src/org/jruby/runtime/builtin/meta/IOMetaClass.java
throw runtime.newNameError(name() + " is a read-only variable");
throw runtime.newNameError(name() + " is a read-only variable", name());
public IRubyObject set(IRubyObject value) { throw runtime.newNameError(name() + " is a read-only variable"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/ReadonlyGlobalVariable.java/clean/src/org/jruby/runtime/ReadonlyGlobalVariable.java
pushCRef(runtime.getObject());
public void preAdoptThread() { pushIter(Iter.ITER_NOT); pushFrame(); getCurrentFrame().newScope(null); pushRubyClass(runtime.getObject()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/408ba0b04448fd6ff645ed5c2c99654ac80634bf/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
private LensMenu(LensComponent lensComponent)
LensMenu(LensComponent lensComponent)
private LensMenu(LensComponent lensComponent) { this.lensComponent = lensComponent; createPopupMenu(); createMenubarMenu(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
JMenuItem setLensDefaultSize;
private void createMenubarMenu() { JMenu lensOptions; JMenu zoomOptions; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; menubar = new JMenuBar(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); menubar.add(lensOptions); menubar.add(zoomOptions); menubar.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE));
private void createMenubarMenu() { JMenu lensOptions; JMenu zoomOptions; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; menubar = new JMenuBar(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); menubar.add(lensOptions); menubar.add(zoomOptions); menubar.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
LensAction.LENS40x40));
LensAction.LENS40x40)); setLens50x50 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS50x50));
private void createMenubarMenu() { JMenu lensOptions; JMenu zoomOptions; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; menubar = new JMenuBar(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); menubar.add(lensOptions); menubar.add(zoomOptions); menubar.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
lensOptions.add(setLensDefaultSize);
private void createMenubarMenu() { JMenu lensOptions; JMenu zoomOptions; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; menubar = new JMenuBar(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); menubar.add(lensOptions); menubar.add(zoomOptions); menubar.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
zoomOptions.add(setZoomx2);
private void createMenubarMenu() { JMenu lensOptions; JMenu zoomOptions; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; menubar = new JMenuBar(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); menubar.add(lensOptions); menubar.add(zoomOptions); menubar.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
JMenuItem setLensDefaultSize;
private void createPopupMenu() { JMenu lensOptions; JMenu zoomOptions; JMenuItem topOption; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; popupMenu = new JPopupMenu(POPUP_MENU_DESCRIPTION); topOption = new JMenuItem(POPUP_MENU_TOPOPTION); popupMenu.add(topOption); popupMenu.addSeparator(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); popupMenu.add(lensOptions); popupMenu.add(zoomOptions); popupMenu.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE));
private void createPopupMenu() { JMenu lensOptions; JMenu zoomOptions; JMenuItem topOption; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; popupMenu = new JPopupMenu(POPUP_MENU_DESCRIPTION); topOption = new JMenuItem(POPUP_MENU_TOPOPTION); popupMenu.add(topOption); popupMenu.addSeparator(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); popupMenu.add(lensOptions); popupMenu.add(zoomOptions); popupMenu.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
ZoomAction.ZOOMx3));
ZoomAction.ZOOMx3));
private void createPopupMenu() { JMenu lensOptions; JMenu zoomOptions; JMenuItem topOption; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; popupMenu = new JPopupMenu(POPUP_MENU_DESCRIPTION); topOption = new JMenuItem(POPUP_MENU_TOPOPTION); popupMenu.add(topOption); popupMenu.addSeparator(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); popupMenu.add(lensOptions); popupMenu.add(zoomOptions); popupMenu.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
lensOptions.add(setLensDefaultSize);
private void createPopupMenu() { JMenu lensOptions; JMenu zoomOptions; JMenuItem topOption; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; popupMenu = new JPopupMenu(POPUP_MENU_DESCRIPTION); topOption = new JMenuItem(POPUP_MENU_TOPOPTION); popupMenu.add(topOption); popupMenu.addSeparator(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); popupMenu.add(lensOptions); popupMenu.add(zoomOptions); popupMenu.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
zoomOptions.add(setZoomx2);
private void createPopupMenu() { JMenu lensOptions; JMenu zoomOptions; JMenuItem topOption; JMenu displayOptions; JMenuItem setLensDefaultSize; JMenuItem setLens40x40; JMenuItem setLens60x60; JMenuItem setLens80x80; JMenuItem setLens100x100; JMenuItem setLens150x150; JMenuItem setZoomx3; JMenuItem setZoomx4; JMenuItem setZoomx5; JMenuItem setZoomx10; JRadioButtonMenuItem setDisplayMicrons; JRadioButtonMenuItem setDisplayPixels; popupMenu = new JPopupMenu(POPUP_MENU_DESCRIPTION); topOption = new JMenuItem(POPUP_MENU_TOPOPTION); popupMenu.add(topOption); popupMenu.addSeparator(); lensOptions = new JMenu(LENS_OPTIONS); zoomOptions = new JMenu(ZOOM_OPTIONS); displayOptions = new JMenu(DISPLAY_UNITS); popupMenu.add(lensOptions); popupMenu.add(zoomOptions); popupMenu.add(displayOptions); setLensDefaultSize = new JMenuItem(new LensAction(lensComponent, LensAction.LENSDEFAULTSIZE)); setLens40x40 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS40x40)); setLens60x60 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS60x60)); setLens80x80 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS80x80)); setLens100x100 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS100x100)); setLens150x150 = new JMenuItem(new LensAction(lensComponent, LensAction.LENS150x150)); setZoomx3 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx3)); setZoomx4 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx4)); setZoomx5 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx5)); setZoomx10 = new JMenuItem(new ZoomAction(lensComponent, ZoomAction.ZOOMx10)); lensOptions.add(setLensDefaultSize); lensOptions.add(setLens40x40); lensOptions.add(setLens60x60); lensOptions.add(setLens80x80); lensOptions.add(setLens100x100); lensOptions.add(setLens150x150); zoomOptions.add(setZoomx3); zoomOptions.add(setZoomx4); zoomOptions.add(setZoomx5); zoomOptions.add(setZoomx10); setDisplayMicrons = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.MICRON_OPTION)); setDisplayPixels = new JRadioButtonMenuItem(new DisplayAction (lensComponent, DisplayAction.PIXEL_OPTION)); displayOptions.add(setDisplayMicrons); displayOptions.add(setDisplayPixels); ButtonGroup displayUnits = new ButtonGroup(); displayUnits.add(setDisplayMicrons); displayUnits.add(setDisplayPixels); setDisplayPixels.setSelected(true); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
return ref.menubar;
return menubar;
JMenuBar getMenubar() { return ref.menubar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
return ref.popupMenu;
return popupMenu;
JPopupMenu getPopupMenu() { return ref.popupMenu; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/29b0b8d77292efe37e6130bac1e4416901230654/LensMenu.java/clean/SRC/org/openmicroscopy/shoola/util/ui/lens/LensMenu.java
double y = (double) x; verifyInput(y); return Math.log(y);
return Math.log(verifyInput((double) x));
public double transform(int x, double k) { double y = (double) x; verifyInput(y); return Math.log(y); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/003d5b181ea715c02dffec4523e09bc34e884765/LogarithmicMap.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/quantum/LogarithmicMap.java
private void verifyInput(double x)
private double verifyInput(double x)
private void verifyInput(double x) { if (x <= 0) throw new IllegalArgumentException("Value not consistent. " + "The value must be > 0."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/003d5b181ea715c02dffec4523e09bc34e884765/LogarithmicMap.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/quantum/LogarithmicMap.java
if (x <= 0) throw new IllegalArgumentException("Value not consistent. " + "The value must be > 0.");
if (x <= 0) x = 1.0; return x;
private void verifyInput(double x) { if (x <= 0) throw new IllegalArgumentException("Value not consistent. " + "The value must be > 0."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/003d5b181ea715c02dffec4523e09bc34e884765/LogarithmicMap.java/buggy/SRC/org/openmicroscopy/shoola/env/rnd/quantum/LogarithmicMap.java
public RubyScope() {
public RubyScope(Ruby ruby) { this.ruby = ruby;
public RubyScope() { }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d69d4a4ad55400b629f71574f9f1c20c617cc2ca/RubyScope.java/buggy/org/jruby/runtime/RubyScope.java
ruby.setActMethodScope(oldActMethodScope);
public void pop() { this.superObject = old.superObject; this.localTbl = old.localTbl; this.localVars = old.localVars; this.flags = old.flags; this.old = old.old; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d69d4a4ad55400b629f71574f9f1c20c617cc2ca/RubyScope.java/buggy/org/jruby/runtime/RubyScope.java
old = new RubyScope(this);
oldActMethodScope = ruby.getActMethodScope(); ruby.setActMethodScope(Constants.NOEX_PUBLIC); old = new RubyScope(this, ruby);
public void push() { old = new RubyScope(this); localTbl = null; localVars = null; flags = 0; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d69d4a4ad55400b629f71574f9f1c20c617cc2ca/RubyScope.java/buggy/org/jruby/runtime/RubyScope.java
final JDialog optionsDialog = new JDialog(SparkManager.getMainWindow(), Res.getString("title.set.status.message "), true);
final JDialog optionsDialog = new JDialog(SparkManager.getMainWindow(), Res.getString("title.set.status.message"), true);
public void invoke(String selectedType) { final StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); // The user should only be able to close this dialog. Object[] options = {Res.getString("ok"), Res.getString("cancel")}; final JOptionPane optionPane = new JOptionPane(this, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, options, options[0]); mainPanel.add(optionPane, BorderLayout.CENTER); final JDialog optionsDialog = new JDialog(SparkManager.getMainWindow(), Res.getString("title.set.status.message "), true); optionsDialog.setContentPane(mainPanel); optionsDialog.pack(); if (selectedType != null) { int count = typeBox.getItemCount(); for (int i = 0; i < count; i++) { ImageIcon icon = (ImageIcon)typeBox.getItemAt(i); if (icon.getDescription().equals(selectedType)) { typeBox.setSelectedIndex(i); break; } } persistBox.setSelected(true); } optionsDialog.setLocationRelativeTo(SparkManager.getMainWindow()); optionPane.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent propertyChangeEvent) { String value = (String)optionPane.getValue(); if (Res.getString("cancel").equals(value)) { optionsDialog.setVisible(false); } else if (Res.getString("ok").equals(value)) { if (!persistBox.isSelected()) { // Change presence and quit. StatusItem item = statusBar.getStatusItem(getType()); Presence oldPresence = item.getPresence(); Presence presence = StatusBar.copyPresence(oldPresence); presence.setStatus(getStatus()); presence.setPriority(getPriority()); statusBar.changeAvailability(presence); statusBar.setStatus(getStatus()); optionsDialog.setVisible(false); return; } List list = load(); CustomStatusItem customStatusItem = new CustomStatusItem(); customStatusItem.setPriority(getPriority()); customStatusItem.setStatus(getStatus()); customStatusItem.setType(getType()); Iterator customListIterator = list.iterator(); boolean exists = false; while (customListIterator.hasNext()) { CustomStatusItem customItem = (CustomStatusItem)customListIterator.next(); String type = customItem.getType(); String status = customItem.getStatus(); if (type.equals(customStatusItem.getType()) && status.equals(customStatusItem.getStatus())) { exists = true; } } // Otherwise save. if (!exists) { list.add(customStatusItem); // Update current status. StatusItem item = statusBar.getStatusItem(getType()); Presence oldPresence = item.getPresence(); Presence presence = StatusBar.copyPresence(oldPresence); presence.setStatus(getStatus()); presence.setPriority(getPriority()); statusBar.changeAvailability(presence); statusBar.setStatus(getStatus()); // Persist new item. save(list); } optionsDialog.setVisible(false); } } }); optionsDialog.setVisible(true); optionsDialog.toFront(); optionsDialog.requestFocus(); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/19e17d68c2c9589c1eea9caba87ba9f18813b1c4/CustomMessages.java/buggy/src/java/org/jivesoftware/spark/ui/status/CustomMessages.java
bar.add(Box.createRigidArea(VBOX)); bar.add(colorPickerButton);
private JToolBar buildToolBar() { JToolBar bar = new JToolBar(JToolBar.VERTICAL); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); bar.add(colorModelButton); bar.add(Box.createRigidArea(VBOX)); bar.add(channelMovieButton); return bar; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ControlPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ControlPane.java
button.setPreferredSize(new Dimension(30, 30));
button.setPreferredSize(ChannelButton.DEFAULT_MIN_SIZE);
private JPanel createChannelsPane() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); ChannelMetadata[] data = model.getChannelData(); ChannelButton button; ChannelMetadata d; p.add(Box.createRigidArea(VBOX)); boolean gs = model.getColorModel().equals(ImViewer.GREY_SCALE_MODEL); for (int k = 0; k < data.length; k++) { d = data[k]; button = new ChannelButton(""+d.getEmissionWavelength(), model.getChannelColor(k), k, model.isChannelActive(k)); if (gs) button.setGrayedOut(gs); button.addPropertyChangeListener(controller); button.setPreferredSize(new Dimension(30, 30)); channelButtons.add(button); p.add(button); p.add(Box.createRigidArea(VBOX)); } JPanel controls = new JPanel(); controls.setLayout(new BoxLayout(controls,BoxLayout.Y_AXIS)); controls.add(Box.createVerticalStrut(20)); controls.add(buildToolBar()); controls.add(p); return UIUtilities.buildComponentPanel(controls); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ControlPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ControlPane.java
ViewerAction a = controller.getAction(ImViewerControl.COLOR_PICKER); colorPickerButton = new JButton(a); colorPickerButton.addMouseListener((ColorPickerAction) a); UIUtilities.unifiedButtonLookAndFeel(colorPickerButton);
private void initComponents() { ViewerAction[] zoomingActions = new ViewerAction[12]; zoomingActions[0] = controller.getAction(ImViewerControl.ZOOM_25); zoomingActions[1] = controller.getAction(ImViewerControl.ZOOM_50); zoomingActions[2] = controller.getAction(ImViewerControl.ZOOM_75); zoomingActions[3] = controller.getAction(ImViewerControl.ZOOM_100); zoomingActions[4] = controller.getAction(ImViewerControl.ZOOM_125); zoomingActions[5] = controller.getAction(ImViewerControl.ZOOM_150); zoomingActions[6] = controller.getAction(ImViewerControl.ZOOM_175); zoomingActions[7] = controller.getAction(ImViewerControl.ZOOM_200); zoomingActions[8] = controller.getAction(ImViewerControl.ZOOM_225); zoomingActions[9] = controller.getAction(ImViewerControl.ZOOM_250); zoomingActions[10] = controller.getAction(ImViewerControl.ZOOM_275); zoomingActions[11] = controller.getAction(ImViewerControl.ZOOM_300); zoomingBox = new JComboBox(zoomingActions); zoomingBox.setEnabled(false); ViewerAction[] ratingActions = new ViewerAction[5]; ratingActions[0] = controller.getAction(ImViewerControl.RATING_ONE); ratingActions[1] = controller.getAction(ImViewerControl.RATING_TWO); ratingActions[2] = controller.getAction(ImViewerControl.RATING_THREE); ratingActions[3] = controller.getAction(ImViewerControl.RATING_FOUR); ratingActions[4] = controller.getAction(ImViewerControl.RATING_FIVE); ratingBox = new JComboBox(ratingActions); ratingBox.setEnabled(false); zSlider = new OneKnobSlider(JSlider.VERTICAL, 0, 1, 0); zSlider.setEnabled(false); tSlider = new OneKnobSlider(JSlider.VERTICAL, 0, 1, 0); tSlider.setEnabled(false); //zSlider.addChangeListener(this); //tSlider.addChangeListener(this); channelMovieButton = new JButton( controller.getAction(ImViewerControl.CHANNEL_MOVIE)); UIUtilities.unifiedButtonLookAndFeel(channelMovieButton); colorModelButton = new JButton(); UIUtilities.unifiedButtonLookAndFeel(colorModelButton); colorModelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String m = model.getColorModel(); ViewerAction a = null; if (m.equals(ImViewer.RGB_MODEL) || m.equals(ImViewer.HSB_MODEL)) { a = controller.getAction(ImViewerControl.GREY_SCALE_MODEL); } else if (m.equals(ImViewer.GREY_SCALE_MODEL)) { a = controller.getAction(ImViewerControl.RGB_MODEL); } a.actionPerformed(e); } }); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bbd964029121f2811ba2b7cf47a392087032888c/ControlPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ControlPane.java
} catch (Exception excptn) { excptn.printStackTrace(getErrorStream());
/*} catch (Exception excptn) { excptn.printStackTrace(getErrorStream());*/
public void loadScript(RubyString scriptName, RubyString source, boolean wrap) { RubyObject self = ruby.getRubyTopSelf(); CRefNode savedCRef = ruby.getCRef(); // TMP_PROTECT; if (wrap && ruby.getSafeLevel() >= 4) { // Check_Type(fname, T_STRING); } else { // Check_SafeStr(fname); } // volatile ID last_func; // ruby_errinfo = Qnil; /* ensure */ RubyVarmap.push(ruby); ruby.pushClass(); RubyModule wrapper = ruby.getWrapper(); ruby.setCRef(ruby.getTopCRef()); if (!wrap) { ruby.secure(4); /* should alter global state */ ruby.setRubyClass(ruby.getClasses().getObjectClass()); ruby.setWrapper(null); } else { /* load in anonymous module as toplevel */ ruby.setWrapper(RubyModule.newModule(ruby)); ruby.setRubyClass(ruby.getWrapper()); self = ruby.getRubyTopSelf().rbClone(); self.extendObject(ruby.getRubyClass()); ruby.getCRef().push(ruby.getWrapper()); } ruby.getRubyFrame().push(); ruby.getRubyFrame().setLastFunc(null); ruby.getRubyFrame().setLastClass(null); ruby.getRubyFrame().setSelf(self); ruby.getRubyFrame().setCbase(new CRefNode(ruby.getRubyClass(), null)); ruby.getScope().push(); /* default visibility is private at loading toplevel */ ruby.setActMethodScope(Constants.SCOPE_PRIVATE); String last_func = ruby.getRubyFrame().getLastFunc(); try { // RubyId last_func = ruby.getRubyFrame().getLastFunc(); // DEFER_INTS; ruby.setInEval(ruby.getInEval() + 1); ruby.getRubyParser().compileString(scriptName.getValue(), source, 0); // --- ruby.setInEval(ruby.getInEval() - 1); self.evalNode(ruby.getParserHelper().getEvalTree()); } catch (Exception excptn) { excptn.printStackTrace(getErrorStream()); } finally { ruby.getRubyFrame().setLastFunc(last_func); /*if (ruby.getRubyScope().getFlags() == SCOPE_ALLOCA && ruby.getRubyClass() == ruby.getClasses().getObjectClass()) { if (ruby_scope->local_tbl) free(ruby_scope->local_tbl); }*/ ruby.setCRef(savedCRef); ruby.getScope().pop(); ruby.getRubyFrame().pop(); ruby.popClass(); RubyVarmap.pop(ruby); ruby.setWrapper(wrapper); } /*if (ruby_nerrs > 0) { ruby_nerrs = 0; rb_exc_raise(ruby_errinfo); }*/ }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/774c5d3d592dfd020e3a8f961b73f629c4c55cf0/RubyRuntime.java/buggy/org/jruby/runtime/RubyRuntime.java
List names = new ArrayList();
ArrayList names = new ArrayList();
public RubyArray instance_variables() { List names = new ArrayList(); Iterator iter = instanceVariables.keySet().iterator(); while (iter.hasNext()) { String name = (String) iter.next(); names.add(RubyString.newString(getRuby(), name)); } return RubyArray.newArray(ruby, names); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a42a5780d9d19f5b3f27bdc079684319c5596e54/RubyObject.java/buggy/org/jruby/RubyObject.java
rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());
rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+ARTICLE_SUFFIX,articleDoc.toString());
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
HttpURL root = new HttpURL("http:
HttpURL root = new HttpURL("http:
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() != null && getRequestedStatus().equals(ContentItemCase.STATUS_PUBLISHED)) {// if (getCase().getPublishedFromDate() == null) {// addErrorKey(KEY_ERROR_PUBLISHED_FROM_DATE_EMPTY);// storeOk = false;// }// } article.setHeadline(getHeadline()); article.setBody(getBody()); article.setTeaser(getTeaser()); article.setAuthor(getAuthor()); article.setSource(getSource()); article.setComment(getComment()); String filename = getHeadline(); if(null==filename || filename.length()==0) { filename = "empty"; }/* File path = new File(getFolder()); if(!path.exists()) { path.mkdirs(); }*/ try { IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.class); IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); WebdavRootResource rootResource = session.getWebdavRootResource(); String uri = service.getWebdavServerURI(); String folderLoaction = getFolderLocation();// String filePath = service.getWebdavServerURI()+getFolderLocation();// boolean success = rootResource.mkcolMethod(filePath);// createPath(getFolderLocation()); IWSlideService slideService = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class); slideService.createAllFoldersInPath(getFolderLocation()); System.out.println("URI = "+uri); System.out.println("Folder location = "+folderLoaction); // System.out.println("success "+success);// success = rootResource.putMethod(getWebdavServletURL(iwuc)+getFolderLocation()+"/"+filename+".xml",articleDoc.toString());// System.out.println("success "+success);// String webdavServletURL = getWebdavServletURL(iwuc)+"/"+getFolder();// System.out.println("webdavServletURL = "+webdavServletURL);// System.out.println("webdavServerURL = "+service.getWebdavServerURL());// WebdavResource webdavResource = session.getWebdavResource(session.getWebdavServerURL().toString());// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/"); // WebdavFile webdavFile = session.getWebdavFile();// WebdavFile path = new WebdavFile(webdavFile, getFolder());// path.mkdirs();// webdavResource = session.getWebdavResource(getWebdavServletURL(iwuc)+getFolder()+"/"+filename+".xml");// WebdavResource webdavResource = session.getWebdavResource("http://localhost:8080/servlet/webdav/"+filename+".xml");// IWSlideService iwss = new IWSlideService();// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/");// WebdavResource webdavResource = new WebdavResource("http://localhost:8080/servlet/webdav/files/"+filename+".xml");// WebdavFile webdavFile = session.getWebdavFile();// webdavResource.putMethod(new File(filename+".xml")); /* HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml"); root.setUserinfo("root","root"); WebdavFile webdavFile = new WebdavFile(webdavResource.getHttpURL()); webdavResource.close(); */// HttpURL root = new HttpURL("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// root.setUserinfo("root","root"); // WebdavFile webdavFile = new WebdavFile("http://localhost:8080/servlet/webdav/files/"+filename+".xml", "root", "root");// webdavFile.createNewFile();// if(!webdavFile.exists()) {// } // articleDoc.save(new File(getFolder()+"/"+filename+".xml"));// articleDoc.save(webdavFile);// webdavFile.close(); } catch (IOException e1) { storeOk = false; // TODO Auto-generated catch block e1.printStackTrace(); } if (storeOk) { if (getRequestedStatus() != null) { setStatus(getRequestedStatus()); setRequestedStatus(null); } }else { throw new ArticleStoreException(); } }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
long secs = ((RubyFixnum) args[0]).getValue();
long secs = RubyNumeric.num2long(args[0]);
public static RubyTime s_at(Ruby ruby, RubyObject rubyClass, RubyObject[] args) { long secs = ((RubyFixnum) args[0]).getValue(); RubyTime time = new RubyTime(ruby, (RubyClass) rubyClass.getRubyClass()); GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new Date(secs)); time.setJavaCalendar(cal); return time; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/RubyTime.java/clean/org/jruby/RubyTime.java
partialName = true;
protected TreeImageDisplay(Object hierarchyObject) { super(); if (hierarchyObject == null) throw new NullPointerException("No hierarchy object."); setUserObject(hierarchyObject); childrenDisplay = new HashSet(); numberItems = -1; fontStyle = FONT_PLAIN; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeImageDisplay.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/TreeImageDisplay.java
if (getUserObject() instanceof ImageData) return getPartialName(name);
if (getUserObject() instanceof ImageData) { if (partialName) return getPartialName(name); return name; }
public String getNodeText() { String name = getNodeName(); if (getUserObject() instanceof ImageData) return getPartialName(name); if (numberItems == -1) return (name+SPACE+"[...]"); return (name+SPACE+"["+numberItems+"]"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeImageDisplay.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/TreeImageDisplay.java
if (getUserObject() instanceof ImageData) return getPartialName(getNodeName());
public String toString() { if (getUserObject() instanceof ImageData) return getPartialName(getNodeName()); return getNodeName(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/TreeImageDisplay.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/TreeImageDisplay.java
offTop = offBottom-offTop-4;
offTop = offTop-offBottom-4;
public static PiccoloAction getSemanticEnterAction(final BrowserView view, final HoverManager layer) { PiccoloAction enterAction = getImageEnterAction(view); PiccoloAction action = new CompositePiccoloAction(enterAction) { public void execute(PInputEvent e) { super.execute(e); Thumbnail t = (Thumbnail)e.getPickedNode(); double width = t.getWidth()*e.getCamera().getViewScale(); double height = t.getHeight()*e.getCamera().getViewScale(); if(width < SemanticZoomNode.getStandardWidth() && height < SemanticZoomNode.getStandardHeight()) { Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = semanticNode.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); double offRight = semanticNode.getOffset().getX()+ semanticNode.getBounds().getWidth()- e.getCamera().getBounds().getWidth(); double offBottom = semanticNode.getOffset().getY()+ semanticNode.getBounds().getHeight()- e.getCamera().getBounds().getHeight(); double offLeft = semanticNode.getOffset().getX(); double offTop = semanticNode.getOffset().getY(); if(offRight > 0) { offLeft = offLeft-offRight-4; semanticNode.setOffset(offLeft,offTop); } if(offBottom > 0) { offTop = offBottom-offTop-4; semanticNode.setOffset(offLeft,offTop); } if(offLeft < 4) { offLeft = 4; semanticNode.setOffset(offLeft,offTop); } if(offTop < 4) { offTop = 4; semanticNode.setOffset(offLeft,offTop); } layer.nodeEntered(e.getCamera(),semanticNode,200); } } }; return action; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java
layer.nodeEntered(e.getCamera(),semanticNode,200);
layer.nodeEntered(e.getCamera(),semanticNode,500);
public static PiccoloAction getSemanticEnterAction(final BrowserView view, final HoverManager layer) { PiccoloAction enterAction = getImageEnterAction(view); PiccoloAction action = new CompositePiccoloAction(enterAction) { public void execute(PInputEvent e) { super.execute(e); Thumbnail t = (Thumbnail)e.getPickedNode(); double width = t.getWidth()*e.getCamera().getViewScale(); double height = t.getHeight()*e.getCamera().getViewScale(); if(width < SemanticZoomNode.getStandardWidth() && height < SemanticZoomNode.getStandardHeight()) { Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = semanticNode.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); double offRight = semanticNode.getOffset().getX()+ semanticNode.getBounds().getWidth()- e.getCamera().getBounds().getWidth(); double offBottom = semanticNode.getOffset().getY()+ semanticNode.getBounds().getHeight()- e.getCamera().getBounds().getHeight(); double offLeft = semanticNode.getOffset().getX(); double offTop = semanticNode.getOffset().getY(); if(offRight > 0) { offLeft = offLeft-offRight-4; semanticNode.setOffset(offLeft,offTop); } if(offBottom > 0) { offTop = offBottom-offTop-4; semanticNode.setOffset(offLeft,offTop); } if(offLeft < 4) { offLeft = 4; semanticNode.setOffset(offLeft,offTop); } if(offTop < 4) { offTop = 4; semanticNode.setOffset(offLeft,offTop); } layer.nodeEntered(e.getCamera(),semanticNode,200); } } }; return action; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java
offTop = offBottom-offTop-4;
offTop = offTop-offBottom-4;
public void execute(PInputEvent e) { super.execute(e); Thumbnail t = (Thumbnail)e.getPickedNode(); double width = t.getWidth()*e.getCamera().getViewScale(); double height = t.getHeight()*e.getCamera().getViewScale(); if(width < SemanticZoomNode.getStandardWidth() && height < SemanticZoomNode.getStandardHeight()) { Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = semanticNode.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); double offRight = semanticNode.getOffset().getX()+ semanticNode.getBounds().getWidth()- e.getCamera().getBounds().getWidth(); double offBottom = semanticNode.getOffset().getY()+ semanticNode.getBounds().getHeight()- e.getCamera().getBounds().getHeight(); double offLeft = semanticNode.getOffset().getX(); double offTop = semanticNode.getOffset().getY(); if(offRight > 0) { offLeft = offLeft-offRight-4; semanticNode.setOffset(offLeft,offTop); } if(offBottom > 0) { offTop = offBottom-offTop-4; semanticNode.setOffset(offLeft,offTop); } if(offLeft < 4) { offLeft = 4; semanticNode.setOffset(offLeft,offTop); } if(offTop < 4) { offTop = 4; semanticNode.setOffset(offLeft,offTop); } layer.nodeEntered(e.getCamera(),semanticNode,200); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java
layer.nodeEntered(e.getCamera(),semanticNode,200);
layer.nodeEntered(e.getCamera(),semanticNode,500);
public void execute(PInputEvent e) { super.execute(e); Thumbnail t = (Thumbnail)e.getPickedNode(); double width = t.getWidth()*e.getCamera().getViewScale(); double height = t.getHeight()*e.getCamera().getViewScale(); if(width < SemanticZoomNode.getStandardWidth() && height < SemanticZoomNode.getStandardHeight()) { Image image = t.getImage(); SemanticZoomNode semanticNode = new SemanticZoomNode(t); Point2D point = new Point2D.Double(t.getOffset().getX()+ t.getBounds().getCenter2D().getX(), t.getOffset().getY()+ t.getBounds().getCenter2D().getY()); Point2D dummyPoint = new Point2D.Double(point.getX(),point.getY()); Dimension2D size = semanticNode.getBounds().getSize(); Point2D viewPoint = e.getCamera().viewToLocal(dummyPoint); semanticNode.setOffset(viewPoint.getX()-size.getWidth()/2, viewPoint.getY()-size.getHeight()/2); double offRight = semanticNode.getOffset().getX()+ semanticNode.getBounds().getWidth()- e.getCamera().getBounds().getWidth(); double offBottom = semanticNode.getOffset().getY()+ semanticNode.getBounds().getHeight()- e.getCamera().getBounds().getHeight(); double offLeft = semanticNode.getOffset().getX(); double offTop = semanticNode.getOffset().getY(); if(offRight > 0) { offLeft = offLeft-offRight-4; semanticNode.setOffset(offLeft,offTop); } if(offBottom > 0) { offTop = offBottom-offTop-4; semanticNode.setOffset(offLeft,offTop); } if(offLeft < 4) { offLeft = 4; semanticNode.setOffset(offLeft,offTop); } if(offTop < 4) { offTop = 4; semanticNode.setOffset(offLeft,offTop); } layer.nodeEntered(e.getCamera(),semanticNode,200); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/f82d914fe97ef0c74bef944bf12ae4961776c814/PiccoloActionFactory.java/clean/SRC/org/openmicroscopy/shoola/agents/browser/events/PiccoloActionFactory.java
public Category(Integer attributeId, String name, String description, org.openmicroscopy.omero.model.CategoryGroup categoryGroup, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set classifications) { this.attributeId = attributeId; this.name = name; this.description = description; this.categoryGroup = categoryGroup; this.moduleExecution = moduleExecution; this.classifications = classifications;
public Category() {
public Category(Integer attributeId, String name, String description, org.openmicroscopy.omero.model.CategoryGroup categoryGroup, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set classifications) { this.attributeId = attributeId; this.name = name; this.description = description; this.categoryGroup = categoryGroup; this.moduleExecution = moduleExecution; this.classifications = classifications; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Category.java/buggy/components/common/src/org/openmicroscopy/omero/model/Category.java
public org.openmicroscopy.omero.model.CategoryGroup getCategoryGroup() {
public CategoryGroup getCategoryGroup() {
public org.openmicroscopy.omero.model.CategoryGroup getCategoryGroup() { return this.categoryGroup; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Category.java/buggy/components/common/src/org/openmicroscopy/omero/model/Category.java
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() {
public ModuleExecution getModuleExecution() {
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Category.java/buggy/components/common/src/org/openmicroscopy/omero/model/Category.java
public void setCategoryGroup(org.openmicroscopy.omero.model.CategoryGroup categoryGroup) {
public void setCategoryGroup(CategoryGroup categoryGroup) {
public void setCategoryGroup(org.openmicroscopy.omero.model.CategoryGroup categoryGroup) { this.categoryGroup = categoryGroup; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Category.java/buggy/components/common/src/org/openmicroscopy/omero/model/Category.java
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) {
public void setModuleExecution(ModuleExecution moduleExecution) {
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Category.java/buggy/components/common/src/org/openmicroscopy/omero/model/Category.java
private Block(
public Block(
private Block( Node var, ICallable method, IRubyObject self, Frame frame, Scope scope, RubyModule klass, Iter iter, DynamicVariableSet dynamicVars) { assert method != null; this.var = var; this.method = method; this.self = self; this.frame = frame; this.scope = scope; this.klass = klass; this.iter = iter; this.dynamicVariables = dynamicVars; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/clean/src/org/jruby/runtime/Block.java
assert method != null;
private Block( Node var, ICallable method, IRubyObject self, Frame frame, Scope scope, RubyModule klass, Iter iter, DynamicVariableSet dynamicVars) { assert method != null; this.var = var; this.method = method; this.self = self; this.frame = frame; this.scope = scope; this.klass = klass; this.iter = iter; this.dynamicVariables = dynamicVars; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/clean/src/org/jruby/runtime/Block.java
this.cref = cref;
private Block( Node var, ICallable method, IRubyObject self, Frame frame, Scope scope, RubyModule klass, Iter iter, DynamicVariableSet dynamicVars) { assert method != null; this.var = var; this.method = method; this.self = self; this.frame = frame; this.scope = scope; this.klass = klass; this.iter = iter; this.dynamicVariables = dynamicVars; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/clean/src/org/jruby/runtime/Block.java
Block newBlock = new Block(var, method, self, frame, scope, klass, iter, new DynamicVariableSet(dynamicVariables));
Block newBlock = new Block(var, method, self, frame, cref, scope, klass, iter, new DynamicVariableSet(dynamicVariables));
public Block cloneBlock() { Block newBlock = new Block(var, method, self, frame, scope, klass, iter, new DynamicVariableSet(dynamicVariables)); newBlock.isLambda = isLambda; if (getNext() != null) { newBlock.setNext(getNext()); } return newBlock; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/clean/src/org/jruby/runtime/Block.java
context.peekCRef(),
public static Block createBlock(Node var, ICallable method, IRubyObject self) { ThreadContext context = self.getRuntime().getCurrentContext(); return new Block(var, method, self, context.getCurrentFrame(), context.getCurrentScope(), context.getRubyClass(), context.getCurrentIter(), context.getCurrentDynamicVars()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/Block.java/clean/src/org/jruby/runtime/Block.java
public HTMLReport(Map coverageData, File outputDir, File sourceDir)
public HTMLReport(Coverage coverage, File outputDir, File sourceDir)
public HTMLReport(Map coverageData, File outputDir, File sourceDir) throws Exception { this.outputDir = outputDir; this.sourceDir = sourceDir; this.coverage = CoverageUnmarshaller.parse(coverageData); removeNonexistantClasses(); CopyFiles.copy(outputDir); generatePackageList(); generateClassLists(); generateOverviews(); generateSourceFiles(); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/1fc76069b3c268690aea68cfb654d632b23e3b49/HTMLReport.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/html/HTMLReport.java
this.coverage = CoverageUnmarshaller.parse(coverageData);
this.coverage = coverage;
public HTMLReport(Map coverageData, File outputDir, File sourceDir) throws Exception { this.outputDir = outputDir; this.sourceDir = sourceDir; this.coverage = CoverageUnmarshaller.parse(coverageData); removeNonexistantClasses(); CopyFiles.copy(outputDir); generatePackageList(); generateClassLists(); generateOverviews(); generateSourceFiles(); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/1fc76069b3c268690aea68cfb654d632b23e3b49/HTMLReport.java/buggy/cobertura/src/net/sourceforge/cobertura/reporting/html/HTMLReport.java
protected HashMap buildChainHash(Collection chains) { HashMap map = new HashMap();
protected LinkedHashMap buildChainHash(Collection chains) { LinkedHashMap map = new LinkedHashMap();
protected HashMap buildChainHash(Collection chains) { HashMap map = new HashMap(); Iterator iter = chains.iterator(); while (iter.hasNext()) { LayoutChainData p = (LayoutChainData) iter.next(); Integer id = new Integer(p.getID()); map.put(id,p); } return map; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/426d81c49168655739bbc20b40625063012871e0/ChainDataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ChainDataManager.java
chainExecutionHashesByID = new HashMap(); executionsByDatasetID = new HashMap(); executionsByChainID = new HashMap();
chainExecutionHashesByID = new LinkedHashMap(); executionsByDatasetID = new LinkedHashMap(); executionsByChainID = new LinkedHashMap();
protected void buildExecutionHashes(Collection executions) { chainExecutionHashesByID = new HashMap(); executionsByDatasetID = new HashMap(); executionsByChainID = new HashMap(); Iterator iter = executions.iterator(); while (iter.hasNext()) { // hash by execution id ChainExecutionData p = (ChainExecutionData) iter.next(); Integer id = new Integer(p.getID()); chainExecutionHashesByID.put(id,p); // by dataset id DatasetData d = p.getDataset(); id = new Integer(d.getID()); updateExecutionHash(executionsByDatasetID,id,p); LayoutChainData c = (LayoutChainData) p.getChain(); id = new Integer(c.getID()); updateExecutionHash(executionsByChainID,id,p); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/426d81c49168655739bbc20b40625063012871e0/ChainDataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ChainDataManager.java
public void setAnalysisNodes(HashMap analysisNodes) {
public void setAnalysisNodes(LinkedHashMap analysisNodes) {
public void setAnalysisNodes(HashMap analysisNodes) { this.analysisNodes = analysisNodes; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/426d81c49168655739bbc20b40625063012871e0/ChainDataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ChainDataManager.java
private void updateExecutionHash(HashMap map, Integer id,ChainExecutionData p) {
private void updateExecutionHash(LinkedHashMap map, Integer id,ChainExecutionData p) {
private void updateExecutionHash(HashMap map, Integer id,ChainExecutionData p) { ArrayList execs = null; Object obj = map.get(id); if (obj == null) execs = new ArrayList(); else execs = (ArrayList) obj; execs.add(p); map.put(id,execs); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/426d81c49168655739bbc20b40625063012871e0/ChainDataManager.java/clean/SRC/org/openmicroscopy/shoola/agents/chainbuilder/ChainDataManager.java
public ChainExecutionsLoadedEvent(HashMap executionsByDataset, HashMap executionsByChain,HashMap executionsByID) {
public ChainExecutionsLoadedEvent(LinkedHashMap executionsByDataset, LinkedHashMap executionsByChain,LinkedHashMap executionsByID) {
public ChainExecutionsLoadedEvent(HashMap executionsByDataset, HashMap executionsByChain,HashMap executionsByID) { super(); setSource(executionsByDataset); this.executionsByChain = executionsByChain; this.executionsByID = executionsByID; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/426d81c49168655739bbc20b40625063012871e0/ChainExecutionsLoadedEvent.java/buggy/SRC/org/openmicroscopy/shoola/agents/events/ChainExecutionsLoadedEvent.java
RubyGlobal.createGlobals(this);
private void init() { ThreadContext tc = getCurrentContext(); nilObject = new RubyNil(this); trueObject = new RubyBoolean(this, true); falseObject = new RubyBoolean(this, false); verbose = falseObject; debug = falseObject; javaSupport = new JavaSupport(this); initLibraries(); tc.preInitCoreClasses(); initCoreClasses(); RubyGlobal.createGlobals(this); topSelf = TopSelfFactory.createTopSelf(this); tc.preInitBuiltinClasses(objectClass, topSelf); initBuiltinClasses(); getObject().defineConstant("TOPLEVEL_BINDING", newBinding()); // Load additional definitions and hacks from etc.rb getLoadService().smartLoad("builtin/etc.rb"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af07dd9e2d788cd1a5151ea8833909422495f7c4/Ruby.java/buggy/src/org/jruby/Ruby.java
RubyGlobal.createGlobals(this);
private void init() { ThreadContext tc = getCurrentContext(); nilObject = new RubyNil(this); trueObject = new RubyBoolean(this, true); falseObject = new RubyBoolean(this, false); verbose = falseObject; debug = falseObject; javaSupport = new JavaSupport(this); initLibraries(); tc.preInitCoreClasses(); initCoreClasses(); RubyGlobal.createGlobals(this); topSelf = TopSelfFactory.createTopSelf(this); tc.preInitBuiltinClasses(objectClass, topSelf); initBuiltinClasses(); getObject().defineConstant("TOPLEVEL_BINDING", newBinding()); // Load additional definitions and hacks from etc.rb getLoadService().smartLoad("builtin/etc.rb"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/af07dd9e2d788cd1a5151ea8833909422495f7c4/Ruby.java/buggy/src/org/jruby/Ruby.java
wData = Helper.createPlane(planeDef, w, metadata, pixels);
wData = PlaneFactory.createPlane(planeDef, w, metadata, pixels);
private RenderRGBWaveTask[] makeRndTasks(PlaneDef planeDef, RGBBuffer renderedDataBuf) { ArrayList tasks = new ArrayList(3); //Get all objects we need to create the tasks. Plane2D wData; QuantumManager qManager = renderer.getQuantumManager(); ChannelBinding[] cBindings = renderer.getChannelBindings(); CodomainChain cc = renderer.getCodomainChain(); PixelBuffer pixels = renderer.getPixels(); Pixels metadata = renderer.getMetadata(); RenderingStats performanceStats = renderer.getStats(); //Create a task for each active wavelength. for (int w = 0; w < cBindings.length; w++) { if (tasks.size() == 3) break; //We only render 3 w at most. if (cBindings[w].getActive().booleanValue()) { //Get the raw data. performanceStats.startIO(w); wData = Helper.createPlane(planeDef, w, metadata, pixels); performanceStats.endIO(w); //Create a rendering task for this wavelength. tasks.add(new RenderRGBWaveTask( getColorBand(renderedDataBuf, cBindings[w].getColor()), wData, qManager.getStrategyFor(w), cc, cBindings[w].getColor().getAlpha().intValue(), sizeX1, sizeX2)); } } //Turn the list into an array an return it. RenderRGBWaveTask[] t = new RenderRGBWaveTask[tasks.size()]; return (RenderRGBWaveTask[]) tasks.toArray(t); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RGBStrategy.java/buggy/components/rendering/src/omeis/providers/re/RGBStrategy.java
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 definition and //create the RGB buffer. initAxesSize(planeDef, renderer.getMetadata()); performanceStats.startMalloc(); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //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. RenderRGBWaveTask[] tasks = makeRndTasks(planeDef, renderedDataBuf); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //j.m CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//FIXME fast enough? while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]);// j.m exec(tasks[n]); if (n == 0) tasks[0].call(); //Wait for all forked tasks (if any) to complete. processor.shutdown();//j.m //j.mTODO processor.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS); for (n = 1; n < rndTskFutures.length; ++n) { try { rndTskFutures[n].get();//j.m Result(); } 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(); //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RGBStrategy.java/buggy/components/rendering/src/omeis/providers/re/RGBStrategy.java
rndTskFutures[n] = processor.submit(tasks[n]);
rndTskFutures[n] = processor.submit(tasks[n]);
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 definition and //create the RGB buffer. initAxesSize(planeDef, renderer.getMetadata()); performanceStats.startMalloc(); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //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. RenderRGBWaveTask[] tasks = makeRndTasks(planeDef, renderedDataBuf); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //j.m CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//FIXME fast enough? while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]);// j.m exec(tasks[n]); if (n == 0) tasks[0].call(); //Wait for all forked tasks (if any) to complete. processor.shutdown();//j.m //j.mTODO processor.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS); for (n = 1; n < rndTskFutures.length; ++n) { try { rndTskFutures[n].get();//j.m Result(); } 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(); //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RGBStrategy.java/buggy/components/rendering/src/omeis/providers/re/RGBStrategy.java
processor.shutdown();
processor.shutdown();
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 definition and //create the RGB buffer. initAxesSize(planeDef, renderer.getMetadata()); performanceStats.startMalloc(); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //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. RenderRGBWaveTask[] tasks = makeRndTasks(planeDef, renderedDataBuf); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //j.m CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//FIXME fast enough? while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]);// j.m exec(tasks[n]); if (n == 0) tasks[0].call(); //Wait for all forked tasks (if any) to complete. processor.shutdown();//j.m //j.mTODO processor.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS); for (n = 1; n < rndTskFutures.length; ++n) { try { rndTskFutures[n].get();//j.m Result(); } 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(); //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RGBStrategy.java/buggy/components/rendering/src/omeis/providers/re/RGBStrategy.java
rndTskFutures[n].get();
rndTskFutures[n].get();
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 definition and //create the RGB buffer. initAxesSize(planeDef, renderer.getMetadata()); performanceStats.startMalloc(); RGBBuffer renderedDataBuf = new RGBBuffer(sizeX1, sizeX2); performanceStats.endMalloc(); //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. RenderRGBWaveTask[] tasks = makeRndTasks(planeDef, renderedDataBuf); performanceStats.startRendering(); int n = tasks.length; Future[] rndTskFutures = new Future[n]; //[0] unused. //j.m CmdProcessor processor = Env.getProcessor(); ExecutorService processor = Executors.newCachedThreadPool();//FIXME fast enough? while (0 < --n) rndTskFutures[n] = processor.submit(tasks[n]);// j.m exec(tasks[n]); if (n == 0) tasks[0].call(); //Wait for all forked tasks (if any) to complete. processor.shutdown();//j.m //j.mTODO processor.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS); for (n = 1; n < rndTskFutures.length; ++n) { try { rndTskFutures[n].get();//j.m Result(); } 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(); //Done. return renderedDataBuf; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/RGBStrategy.java/buggy/components/rendering/src/omeis/providers/re/RGBStrategy.java
xsdType = "xsd:string";
xsdType = "xs:string";
public static String getXsdType(Type type) { String name = type.getName(); String xsdType = (String) XSD_TYPES.get(name); if (xsdType == null) { xsdType = "xsd:string"; } return xsdType; }
52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/b133db955fc4dea0a80c6c4807180c1a17a4bf13/Utils.java/buggy/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/Utils.java
public static void createReadline(IRuby runtime) { try { Class readline = Class.forName("org.gnu.readline.Readline"); Class readlineLib = Class.forName("org.gnu.readline.ReadlineLibrary"); readline.getMethod("load",new Class[]{readlineLib}).invoke(null,new Object[]{readlineLib.getMethod("byName",new Class[]{String.class}).invoke(null,new Object[]{"GnuReadline"})}); readline.getMethod("initReadline",new Class[]{String.class}).invoke(null,new Object[]{"Ruby"}); readlineMeth = readline.getMethod("readline",new Class[]{String.class,Boolean.TYPE}); addToHistMeth = readline.getMethod("addToHistory",new Class[]{String.class}); RubyModule mReadline = runtime.defineModule("Readline"); CallbackFactory readlinecb = runtime.callbackFactory(Readline.class); mReadline.defineMethod("readline",readlinecb.getSingletonMethod("s_readline",IRubyObject.class,IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("readline")}); IRubyObject hist = runtime.getObject().callMethod("new"); mReadline.setConstant("HISTORY",hist); hist.defineSingletonMethod("push",readlinecb.getSingletonMethod("s_push",IRubyObject.class)); hist.defineSingletonMethod("pop",readlinecb.getSingletonMethod("s_pop")); } catch(Exception e) { throw runtime.newLoadError("Missing libreadline-java library; see Readline-HOWTO.txt in docs"); }
public static void createReadline(IRuby runtime) throws IOException { readline = new ConsoleReader(); readline.setUseHistory(false); ((CandidateListCompletionHandler) readline.getCompletionHandler()).setAlwaysIncludeNewline(false); currentCompletor = new RubyFileNameCompletor(); readline.addCompletor(currentCompletor); RubyModule mReadline = runtime.defineModule("Readline"); CallbackFactory readlinecb = runtime.callbackFactory(Readline.class); mReadline.defineMethod("readline",readlinecb.getSingletonMethod("s_readline",IRubyObject.class,IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("readline")}); mReadline.defineMethod("completion_append_character=",readlinecb.getSingletonMethod("s_set_completion_append_character",IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("completion_append_character=")}); mReadline.defineMethod("completion_proc=",readlinecb.getSingletonMethod("s_set_completion_proc",IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("completion_proc=")}); IRubyObject hist = runtime.getObject().callMethod("new"); mReadline.setConstant("HISTORY",hist); hist.defineSingletonMethod("push",readlinecb.getSingletonMethod("s_push",IRubyObject.class)); hist.defineSingletonMethod("pop",readlinecb.getSingletonMethod("s_pop")); hist.defineSingletonMethod("to_a",readlinecb.getSingletonMethod("s_hist_to_a"));
public static void createReadline(IRuby runtime) { try { Class readline = Class.forName("org.gnu.readline.Readline"); Class readlineLib = Class.forName("org.gnu.readline.ReadlineLibrary"); readline.getMethod("load",new Class[]{readlineLib}).invoke(null,new Object[]{readlineLib.getMethod("byName",new Class[]{String.class}).invoke(null,new Object[]{"GnuReadline"})}); readline.getMethod("initReadline",new Class[]{String.class}).invoke(null,new Object[]{"Ruby"}); readlineMeth = readline.getMethod("readline",new Class[]{String.class,Boolean.TYPE}); addToHistMeth = readline.getMethod("addToHistory",new Class[]{String.class}); RubyModule mReadline = runtime.defineModule("Readline"); CallbackFactory readlinecb = runtime.callbackFactory(Readline.class); mReadline.defineMethod("readline",readlinecb.getSingletonMethod("s_readline",IRubyObject.class,IRubyObject.class)); mReadline.module_function(new IRubyObject[]{runtime.newSymbol("readline")}); IRubyObject hist = runtime.getObject().callMethod("new"); mReadline.setConstant("HISTORY",hist); hist.defineSingletonMethod("push",readlinecb.getSingletonMethod("s_push",IRubyObject.class)); hist.defineSingletonMethod("pop",readlinecb.getSingletonMethod("s_pop")); } catch(Exception e) { throw runtime.newLoadError("Missing libreadline-java library; see Readline-HOWTO.txt in docs"); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/070b77f707d6fe6c85ec1c02b29ea35cd84e9dfc/Readline.java/clean/src/org/jruby/ext/Readline.java
addToHistMeth.invoke(null,new Object[]{line.toString()});
readline.getHistory().addToHistory(line.toString());
public static IRubyObject s_push(IRubyObject recv, IRubyObject line) throws Exception { addToHistMeth.invoke(null,new Object[]{line.toString()}); return recv.getRuntime().getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/070b77f707d6fe6c85ec1c02b29ea35cd84e9dfc/Readline.java/clean/src/org/jruby/ext/Readline.java
public static IRubyObject s_readline(IRubyObject recv, IRubyObject prompt, IRubyObject add_to_hist) {
public static IRubyObject s_readline(IRubyObject recv, IRubyObject prompt, IRubyObject add_to_hist) throws IOException {
public static IRubyObject s_readline(IRubyObject recv, IRubyObject prompt, IRubyObject add_to_hist) { IRubyObject line = recv.getRuntime().getNil(); try { String v = (String)readlineMeth.invoke(null,new Object[]{prompt.toString(),new Boolean(add_to_hist.isTrue())}); if(null != v) { line = recv.getRuntime().newString(v); } } catch(Exception ioe) { return recv.getRuntime().getNil(); } if(line.isNil()) { return recv.getRuntime().newString(""); } return line; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/070b77f707d6fe6c85ec1c02b29ea35cd84e9dfc/Readline.java/clean/src/org/jruby/ext/Readline.java
try { String v = (String)readlineMeth.invoke(null,new Object[]{prompt.toString(),new Boolean(add_to_hist.isTrue())}); if(null != v) { line = recv.getRuntime().newString(v); } } catch(Exception ioe) { return recv.getRuntime().getNil();
String v = readline.readLine(prompt.toString()); if(null != v) { if (add_to_hist.isTrue()) readline.getHistory().addToHistory(v); line = recv.getRuntime().newString(v);
public static IRubyObject s_readline(IRubyObject recv, IRubyObject prompt, IRubyObject add_to_hist) { IRubyObject line = recv.getRuntime().getNil(); try { String v = (String)readlineMeth.invoke(null,new Object[]{prompt.toString(),new Boolean(add_to_hist.isTrue())}); if(null != v) { line = recv.getRuntime().newString(v); } } catch(Exception ioe) { return recv.getRuntime().getNil(); } if(line.isNil()) { return recv.getRuntime().newString(""); } return line; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/070b77f707d6fe6c85ec1c02b29ea35cd84e9dfc/Readline.java/clean/src/org/jruby/ext/Readline.java
return ((RubyArray) rExcptn.getReturnValue()).pop();
return rExcptn.getReturnValue();
public RubyObject call(Ruby ruby, RubyObject recv, String id, RubyPointer args, boolean noSuper) { if (args == null) { args = new RubyPointer(); } CRefNode savedCref = null; // +++ = null; List valueList = null; ruby.getScope().push(); CRefNode lRefValue = getRefValue(); if (lRefValue != null) { savedCref = ruby.getCRef(); // s.a. ruby.setCRef(lRefValue); ruby.getRubyFrame().setCbase(lRefValue); } if (getTable() != null) { valueList = new ArrayList(Collections.nCopies(getTable().size(), ruby.getNil())); ruby.getScope().setLocalValues(valueList); ruby.getScope().setLocalNames(getTable()); } else { valueList = null; //ruby.getScope().getLocalValues(); ruby.getScope().setLocalValues(null); ruby.getScope().setLocalNames(null); } Node callBody = getNextNode(); Node callNode = null; if (callBody.getType() == Constants.NODE_ARGS) { callNode = callBody; callBody = null; } else if (callBody.getType() == Constants.NODE_BLOCK) { callNode = callBody.getHeadNode(); callBody = callBody.getNextNode(); } RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); try { if (callNode != null) { //if (call_node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); //} int i = callNode.getCount(); if (i > (args != null ? args.size() : 0)) { int size = 0; if (args != null) size = args.size(); throw new RubyArgumentException(ruby, getFile() + ":" + getLine() +"wrong # of arguments(" + size + " for " + i + ")"); } if (callNode.getRest() == -1) { int opt = i; Node optNode = callNode.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.size() : 0)) { throw new RubyArgumentException(ruby, "wrong # of arguments(" + args.size() + " for " + opt + ")"); } // +++ ruby.getRubyFrame().setArgs(valueList != null ? new DelegateList(valueList, 2, valueList.size()) : null); // --- } if (valueList != null) { if (i > 0) { for (int j = 0; j < i; j++) { valueList.set(j + 2, args.get(j)); } } args.inc(i); if (callNode.getOptNode() != null) { Node optNode = callNode.getOptNode(); while (optNode != null && args.size() != 0) { ((AssignableNode) optNode.getHeadNode()).assign(ruby, recv, args.getRuby(0), true); args.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (callNode.getRest() >= 0) { RubyArray array = null; if (args.size() > 0) { array = RubyArray.newArray(ruby, args); } else { array = RubyArray.newArray(ruby, 0); } valueList.set(callNode.getRest(), array); } } } return recv.eval(callBody); } catch (ReturnException rExcptn) { // +++ jpetersen return ((RubyArray) rExcptn.getReturnValue()).pop(); // --- } finally { RubyVarmap.pop(ruby); ruby.getScope().pop(); if (savedCref != null) { ruby.setCRef(savedCref); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/fe5b7835d80b52a0683d503660a7f722b7af69b1/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java
case ARGUMENT_TYPES : return argument_types();
public IRubyObject callIndexed(int index, IRubyObject[] args) { switch (index) { case NAME : return name(); case ARITY : return arity(); case PUBLIC_P : return public_p(); case FINAL_P : return final_p(); case INVOKE : return invoke(args); } return super.callIndexed(index, args); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/89272e383891a75366988c82cce7c8626dcf5e2d/JavaMethodClass.java/buggy/org/jruby/javasupport/JavaMethodClass.java
javaMethodClass.defineMethod("argument_types", IndexedCallback.create(ARGUMENT_TYPES, 0));
public static RubyClass createJavaMethodClass(Ruby runtime, RubyModule javaModule) { RubyClass javaMethodClass = javaModule.defineClassUnder("JavaMethod", runtime.getClasses().getObjectClass()); javaMethodClass.defineMethod("name", IndexedCallback.create(NAME, 0)); javaMethodClass.defineMethod("arity", IndexedCallback.create(ARITY, 0)); javaMethodClass.defineMethod("public?", IndexedCallback.create(PUBLIC_P, 0)); javaMethodClass.defineMethod("final?", IndexedCallback.create(FINAL_P, 0)); javaMethodClass.defineMethod("invoke", IndexedCallback.createOptional(INVOKE, 1)); return javaMethodClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/89272e383891a75366988c82cce7c8626dcf5e2d/JavaMethodClass.java/buggy/org/jruby/javasupport/JavaMethodClass.java
} catch (IllegalArgumentException iae) { throw new TypeError(getRuntime(), "expected " + argument_types().inspect());
public IRubyObject invoke(IRubyObject[] args) { if (args.length != getArity() + 1) { throw new ArgumentError(getRuntime(), args.length, getArity() + 1); } IRubyObject invokee = args[0]; if (! (invokee instanceof RubyJavaObject)) { throw new TypeError(getRuntime(), "invokee not a java object"); } Object javaInvokee = ((RubyJavaObject) invokee).getValue(); Object[] arguments = new Object[args.length - 1]; System.arraycopy(args, 1, arguments, 0, arguments.length); try { Object result = method.invoke(javaInvokee, arguments); return JavaUtil.convertJavaToRuby(getRuntime(), result, method); } catch (IllegalAccessException iae) { // FIXME: what's the best exception to throw here? throw new TypeError(getRuntime(), "illegal access"); } catch (InvocationTargetException ite) { getRuntime().getJavaSupport().handleNativeException((Exception) ite.getTargetException()); Asserts.notReached(); return null; } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/89272e383891a75366988c82cce7c8626dcf5e2d/JavaMethodClass.java/buggy/org/jruby/javasupport/JavaMethodClass.java
public void handleNativeException(Exception excptn) { Class excptnClass = excptn.getClass();
public void handleNativeException(Exception exception) { Class excptnClass = exception.getClass();
public void handleNativeException(Exception excptn) { Class excptnClass = excptn.getClass(); RubyProc handler = (RubyProc)exceptionHandlers.get(excptnClass.getName()); while (handler == null && excptnClass != Exception.class) { excptnClass = excptnClass.getSuperclass(); } if (handler != null) { handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, excptn)}); } else { StringWriter stackTrace = new StringWriter(); excptn.printStackTrace(new PrintWriter(stackTrace)); StringBuffer sb = new StringBuffer(); sb.append("Native Exception: '"); sb.append(excptn.getClass()).append("\'; Message: "); sb.append(excptn.getMessage()); sb.append("; StackTrace: "); sb.append(stackTrace.getBuffer().toString()); throw new RaiseException(ruby, "RuntimeError", sb.toString()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12474ae3e4d78d19edc11ac6e29bd9d6e4c50405/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, excptn)});
handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, exception)});
public void handleNativeException(Exception excptn) { Class excptnClass = excptn.getClass(); RubyProc handler = (RubyProc)exceptionHandlers.get(excptnClass.getName()); while (handler == null && excptnClass != Exception.class) { excptnClass = excptnClass.getSuperclass(); } if (handler != null) { handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, excptn)}); } else { StringWriter stackTrace = new StringWriter(); excptn.printStackTrace(new PrintWriter(stackTrace)); StringBuffer sb = new StringBuffer(); sb.append("Native Exception: '"); sb.append(excptn.getClass()).append("\'; Message: "); sb.append(excptn.getMessage()); sb.append("; StackTrace: "); sb.append(stackTrace.getBuffer().toString()); throw new RaiseException(ruby, "RuntimeError", sb.toString()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12474ae3e4d78d19edc11ac6e29bd9d6e4c50405/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
excptn.printStackTrace(new PrintWriter(stackTrace));
exception.printStackTrace(new PrintWriter(stackTrace));
public void handleNativeException(Exception excptn) { Class excptnClass = excptn.getClass(); RubyProc handler = (RubyProc)exceptionHandlers.get(excptnClass.getName()); while (handler == null && excptnClass != Exception.class) { excptnClass = excptnClass.getSuperclass(); } if (handler != null) { handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, excptn)}); } else { StringWriter stackTrace = new StringWriter(); excptn.printStackTrace(new PrintWriter(stackTrace)); StringBuffer sb = new StringBuffer(); sb.append("Native Exception: '"); sb.append(excptn.getClass()).append("\'; Message: "); sb.append(excptn.getMessage()); sb.append("; StackTrace: "); sb.append(stackTrace.getBuffer().toString()); throw new RaiseException(ruby, "RuntimeError", sb.toString()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12474ae3e4d78d19edc11ac6e29bd9d6e4c50405/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
sb.append(excptn.getClass()).append("\'; Message: "); sb.append(excptn.getMessage());
sb.append(exception.getClass()).append("\'; Message: "); sb.append(exception.getMessage());
public void handleNativeException(Exception excptn) { Class excptnClass = excptn.getClass(); RubyProc handler = (RubyProc)exceptionHandlers.get(excptnClass.getName()); while (handler == null && excptnClass != Exception.class) { excptnClass = excptnClass.getSuperclass(); } if (handler != null) { handler.call(new IRubyObject[]{JavaUtil.convertJavaToRuby(ruby, excptn)}); } else { StringWriter stackTrace = new StringWriter(); excptn.printStackTrace(new PrintWriter(stackTrace)); StringBuffer sb = new StringBuffer(); sb.append("Native Exception: '"); sb.append(excptn.getClass()).append("\'; Message: "); sb.append(excptn.getMessage()); sb.append("; StackTrace: "); sb.append(stackTrace.getBuffer().toString()); throw new RaiseException(ruby, "RuntimeError", sb.toString()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12474ae3e4d78d19edc11ac6e29bd9d6e4c50405/JavaSupport.java/buggy/org/jruby/javasupport/JavaSupport.java
return RubySymbol.newSymbol(input.getRuby(), input.unmarshalString());
return RubySymbol.newSymbol(input.getRuntime(), input.unmarshalString());
public static RubySymbol unmarshalFrom(UnmarshalStream input) throws java.io.IOException { return RubySymbol.newSymbol(input.getRuby(), input.unmarshalString()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubySymbol.java/clean/org/jruby/RubySymbol.java
Experimenter o = (Experimenter) ht.load(Experimenter.class,0); ExperimenterGroup g = (ExperimenterGroup) ht.load(ExperimenterGroup.class,0); CurrentDetails.setOwner(o); CurrentDetails.setGroup(g);
if (CurrentDetails.getOwner() == null ) throw new RuntimeException("Current owner must be set."); if (CurrentDetails.getGroup() == null ) throw new RuntimeException("Current group must be set."); if (CurrentDetails.getCreationEvent() == null ) throw new RuntimeException("Current event must be set.");
public Object invoke(MethodInvocation arg0) throws Throwable { Experimenter o = (Experimenter) ht.load(Experimenter.class,0); ExperimenterGroup g = (ExperimenterGroup) ht.load(ExperimenterGroup.class,0); CurrentDetails.setOwner(o); CurrentDetails.setGroup(g); EventType test = (EventType) ht.execute(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q = session.createQuery( "from EventType where value = 'Test'"); return q.uniqueResult(); } }); CurrentDetails.newEvent(test); return arg0.proceed(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/38b37dbcde43de05438b02c9f2be0b9c16614519/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java
EventType test = (EventType) ht.execute(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q = session.createQuery( "from EventType where value = 'Test'"); return q.uniqueResult(); } }); CurrentDetails.newEvent(test); return arg0.proceed();
return arg0.proceed();
public Object invoke(MethodInvocation arg0) throws Throwable { Experimenter o = (Experimenter) ht.load(Experimenter.class,0); ExperimenterGroup g = (ExperimenterGroup) ht.load(ExperimenterGroup.class,0); CurrentDetails.setOwner(o); CurrentDetails.setGroup(g); EventType test = (EventType) ht.execute(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q = session.createQuery( "from EventType where value = 'Test'"); return q.uniqueResult(); } }); CurrentDetails.newEvent(test); return arg0.proceed(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/38b37dbcde43de05438b02c9f2be0b9c16614519/EventHandler.java/clean/components/server/src/ome/tools/hibernate/EventHandler.java