rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
}; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } if(!kill) { Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; } removeLoaderThread(controller,this); } | public void run() { addLoaderThread(controller,this); int count = 1; int total = refList.size(); for(Iterator iter = refList.iterator(); (iter.hasNext() && !kill);) { ImageSummary summary = (ImageSummary)iter.next(); try { Pixels pix = summary.getDefaultPixels().getPixels(); Image image = ps.getThumbnail(pix); ThumbnailDataModel tdm = new ThumbnailDataModel(summary); tdm.getAttributeMap().putAttribute(pix); // TODO: figure out strategy for adding attributes. do it here? final Thumbnail t = new Thumbnail(image,tdm); final int theCount = count; final int theTotal = total; Runnable addTask = new Runnable() { public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } }; SwingUtilities.invokeLater(addTask); count++; } catch(ImageServerException ise) { UserNotifier un = registry.getUserNotifier(); un.notifyError("ImageServer Error",ise.getMessage(),ise); status.processFailed("Error loading images."); return; } } if(!kill) { Runnable finalTask = new Runnable() { public void run() { status.processSucceeded("All images loaded."); } }; SwingUtilities.invokeLater(finalTask); return; } removeLoaderThread(controller,this); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
|
{ status.processSucceeded("All images loaded."); } | { status.setLeftText(message); } | public void run() { status.processSucceeded("All images loaded."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
{ model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } | { status.processSucceeded("All images loaded."); } | public void run() { model.addThumbnail(t); String message = ProgressMessageFormatter.format("Loaded image %n of %t...", theCount,theTotal); status.processAdvanced(message); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
JMenuItem heatItem = new JMenuItem("HeatMap"); heatItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { HeatMapManager manager = env.getHeatMapManager(); HeatMapUI ui = manager.getUI(); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } } }); tf.addToMenu(TopFrame.VIEW,heatItem); heatItem.setEnabled(true); | public void setContext(Registry ctx) { this.registry = ctx; this.eventBus = ctx.getEventBus(); this.tf = ctx.getTopFrame(); env.setIconManager(IconManager.getInstance(ctx)); Boolean extractionMode = (Boolean)registry.lookup(THUMBNAIL_MODE_KEY); this.useServerThumbs = extractionMode.booleanValue(); Integer thumbWidth = (Integer)registry.lookup(THUMBNAIL_WIDTH_KEY); Integer thumbHeight = (Integer)registry.lookup(THUMBNAIL_HEIGHT_KEY); this.thumbnailWidth = 120;//thumbWidth.intValue(); this.thumbnailHeight = 120;//thumbHeight.intValue(); eventBus.register(this,LoadDataset.class); eventBus.register(this,ImageAnnotated.class); /* JMenuItem testItem = new JMenuItem("Browser"); testItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { Integer dummyID = (Integer)registry.lookup(DUMMY_DATASET_KEY); loadDataset(dummyID.intValue()); } }); tf.addToMenu(TopFrame.VIEW,testItem); testItem.setEnabled(true); */ JMenuItem heatItem = new JMenuItem("HeatMap"); heatItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { HeatMapManager manager = env.getHeatMapManager(); HeatMapUI ui = manager.getUI(); if(!ui.isShowing()) { tf.addToDesktop(ui,TopFrame.PALETTE_LAYER); ui.show(); ui.setClosable(true); ui.setIconifiable(true); ui.setResizable(false); ui.setMaximizable(false); } else { try { ui.setSelected(true); } catch(PropertyVetoException ex) {} } } }); tf.addToMenu(TopFrame.VIEW,heatItem); heatItem.setEnabled(true); // test code to check for image STs SemanticTypesService sts = registry.getSemanticTypesService(); try { List typeList = sts.getAvailableImageTypes(); for(Iterator iter = typeList.iterator(); iter.hasNext();) { SemanticType st = (SemanticType)iter.next(); imageTypeList.add(st); } } catch(DSOutOfServiceException dso) { dso.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Connection Error",dso.getMessage(),dso); } catch(DSAccessException dsa) { dsa.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Server Error",dsa.getMessage(),dsa); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
|
status.setLeftText(message); | try { DataManagementService dms = registry.getDataManagementService(); DatasetData dataset = dms.retrieveDataset(theDataset); model.setDataset(dataset); browser.setBrowserTitle("Image Browser: "+dataset.getName()); loadDataset(theIndex,dataset); } catch(DSAccessException dsae) { UserNotifier notifier = registry.getUserNotifier(); notifier.notifyError("Data retrieval failure", "Unable to retrieve dataset (id = " + theDataset + ")", dsae); return; } catch(DSOutOfServiceException dsoe) { throw new RuntimeException(dsoe); } | public void run() { status.setLeftText(message); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/913e45a73e803bf6a97dca24496a64546a51c9d5/BrowserAgent.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/BrowserAgent.java |
b = new JButton(controller.getAction(TreeViewerControl.CREATE_OBJECT)); UIUtilities.unifiedButtonLookAndFeel(b); bar.add(b); | private JToolBar createManagementBar() { JToolBar bar = new JToolBar(); bar.setFloatable(false); bar.setRollover(true); bar.setBorder(null); JButton b = new JButton(controller.getAction(TreeViewerControl.VIEW)); UIUtilities.unifiedButtonLookAndFeel(b); bar.add(b); TreeViewerAction a = controller.getAction(TreeViewerControl.MANAGER); b = new JButton(a); UIUtilities.unifiedButtonLookAndFeel(b); b.addMouseListener((ManagerAction) a); bar.add(b); b = new JButton(controller.getAction( TreeViewerControl.CREATE_TOP_CONTAINER)); UIUtilities.unifiedButtonLookAndFeel(b); bar.add(b); bar.add(new JSeparator(SwingConstants.VERTICAL)); return bar; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/ToolBar.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/ToolBar.java |
|
Object res = get(names[0]); if (names.length == 1) { return res; } | public final Object getProperty(final Object[] names) throws PropertyException, InvalidContextException { if (names.length == 0) { return null; } else if (_bean == null) { return PropertyOperator.getProperty(this,get(names[0]),names,1); } else { return PropertyOperator.getProperty(this,_bean,names); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c014f9ca1df894fd446de107d2210a66cbd5d354/Context.java/clean/webmacro/src/org/webmacro/Context.java |
|
if (names.length == 1) { put(names[0], value); return true; } | final public boolean setProperty(final Object[] names, final Object value) throws PropertyException, InvalidContextException { if (names.length == 0) { return false; } else if (_bean == null) { return PropertyOperator.setProperty(this,get(names[0]),names,1,value); } else { return PropertyOperator.setProperty(this,_bean,names,value); } } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c014f9ca1df894fd446de107d2210a66cbd5d354/Context.java/clean/webmacro/src/org/webmacro/Context.java |
|
this.value = new BigDecimal(args[0].toString()); | String ss = args[0].toString(); if(ss.trim().equals("")) { ss = "0"; } this.value = new BigDecimal(ss); | public IRubyObject initialize(IRubyObject[] args) { this.value = new BigDecimal(args[0].toString()); return this; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b4a762ced3d64a82873f9615dab83cf245ba56f0/RubyBigDecimal.java/buggy/src/org/jruby/RubyBigDecimal.java |
if(e.isPopupTrigger()){ return; } | public void mousePressed(MouseEvent e) { if (e.getSource() instanceof SparkTab) { SparkTab tab = (SparkTab)e.getSource(); setSelectedTab(tab); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/f025bf59efca040bc8b47fac943f829129bf5e5e/SparkTabbedPane.java/clean/src/java/org/jivesoftware/spark/component/tabbedPane/SparkTabbedPane.java |
|
} | } | public void propertyChange(PropertyChangeEvent pce) { String name = pce.getPropertyName(); if (name.equals(TreeViewer.CANCEL_LOADING_PROPERTY)) { Browser browser = model.getSelectedBrowser(); if (browser != null) browser.cancel(); } else if (name.equals(Browser.POPUP_MENU_PROPERTY)) { Component c = (Component) pce.getNewValue(); Browser browser = model.getSelectedBrowser(); if (browser != null && c != null) view.showPopup(c, browser.getClickPoint()); } else if (name.equals(Browser.CLOSE_PROPERTY)) { Browser browser = (Browser) pce.getNewValue(); if (browser != null) view.removeBrowser(browser); } else if (name.equals(Editor.CLOSE_EDITOR_PROPERTY) || name.equals(Classifier.CLOSE_CLASSIFIER_PROPERTY)) { model.removeEditor(); model.onComponentStateChange(true); } else if (name.equals(TreeViewer.FINDER_VISIBLE_PROPERTY)) { Boolean b = (Boolean) pce.getNewValue(); if (!b.booleanValue()) { model.clearFoundResults(); model.onComponentStateChange(true); } } else if (name.equals(TreeViewer.SELECTED_BROWSER_PROPERTY)) { Browser b = model.getSelectedBrowser(); Iterator i = model.getBrowsers().values().iterator(); Browser browser; while (i.hasNext()) { browser = (Browser) i.next(); browser.setSelected(browser.equals(b)); } } else if (name.equals(TreeViewer.THUMBNAIL_LOADING_PROPERTY)) { model.retrieveThumbnail((ImageData) pce.getNewValue()); } else if (name.equals(Browser.SELECTED_DISPLAY_PROPERTY)) { model.onSelectedDisplay(); } else if (name.equals(TreeViewer.HIERARCHY_ROOT_PROPERTY)) { Map browsers = model.getBrowsers(); Iterator i = browsers.values().iterator(); while (i.hasNext()) ((Browser) i.next()).refreshTree(); } else if (name.equals( AddExistingObjectsDialog.EXISTING_ADD_PROPERTY)) { model.addExistingObjects((Set) pce.getNewValue()); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/TreeViewerControl.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerControl.java |
case M_CLONE: return rbClone(); | public RubyObject callIndexed(int index, RubyObject[] args) { switch (index) { case M_INSPECT: return inspect(); case M_TO_S: return to_s(); case M_FROZEN: return frozen(); case M_EQUAL: return equal(args[0]); case M_EQL: return eql(args[0]); case M_AREF: return aref(args); case M_ASET: return aset(args); case M_FIRST: return first(); case M_LAST: return last(); case M_CONCAT: return concat(args[0]); case M_APPEND: return append(args[0]); case M_PUSH: return push(args); case M_POP: return pop(); case M_SHIFT: return shift(); case M_UNSHIFT: return unshift(args); case M_EACH: return each(); case M_EACH_INDEX: return each_index(); case M_REVERSE_EACH: return reverse_each(); case M_LENGTH: return length(); case M_EMPTY_P: return empty_p(); case M_INDEX: return index(args[0]); case M_RINDEX: return rindex(args[0]); case M_INDICES: return indices(args); case M_REVERSE: return reverse(); case M_REVERSE_BANG: return reverse_bang(); case M_SORT: return sort(); case M_SORT_BANG: return sort_bang(); case M_COLLECT: return collect(); case M_COLLECT_BANG: return collect_bang(); case M_DELETE: return delete(args[0]); case M_DELETE_AT: return delete_at(args[0]); case M_DELETE_IF: return delete_if(); case M_REJECT_BANG: return reject_bang(); case M_REPLACE: return replace(args[0]); case M_CLEAR: return clear(); case M_INCLUDE_P: return include_p(args[0]); case M_CLONE: return rbClone(); } Asserts.assertNotReached(); return null; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyArray.java/buggy/org/jruby/RubyArray.java |
|
arrayClass.defineMethod("join", CallbackFactory.getOptMethod(RubyArray.class, "join")); | arrayClass.defineMethod("join", IndexedCallback.createOptional(M_JOIN)); | public static RubyClass createArrayClass(Ruby ruby) { RubyClass arrayClass = ruby.defineClass("Array", ruby.getClasses().getObjectClass()); arrayClass.includeModule(ruby.getRubyModule("Enumerable")); arrayClass.defineSingletonMethod("new", CallbackFactory.getOptSingletonMethod(RubyArray.class, "newInstance")); arrayClass.defineSingletonMethod("[]", CallbackFactory.getOptSingletonMethod(RubyArray.class, "create")); arrayClass.defineMethod("initialize", CallbackFactory.getOptMethod(RubyArray.class, "initialize")); arrayClass.defineMethod("inspect", IndexedCallback.create(M_INSPECT, 0)); arrayClass.defineMethod("to_s", IndexedCallback.create(M_TO_S, 0)); arrayClass.defineMethod("to_a", CallbackFactory.getSelfMethod(0)); arrayClass.defineMethod("to_ary", CallbackFactory.getSelfMethod(0)); arrayClass.defineMethod("frozen?", IndexedCallback.create(M_FROZEN, 0)); arrayClass.defineMethod("==", IndexedCallback.create(M_EQUAL, 1)); arrayClass.defineMethod("eql?", IndexedCallback.create(M_EQL, 1)); arrayClass.defineMethod("===", IndexedCallback.create(M_EQUAL, 1)); arrayClass.defineMethod("[]", IndexedCallback.createOptional(M_AREF)); arrayClass.defineMethod("[]=", IndexedCallback.createOptional(M_ASET)); arrayClass.defineMethod("at", CallbackFactory.getMethod(RubyArray.class, "at", RubyFixnum.class)); arrayClass.defineMethod("first", IndexedCallback.create(M_FIRST, 0)); arrayClass.defineMethod("last", IndexedCallback.create(M_LAST, 0)); arrayClass.defineMethod("concat", IndexedCallback.create(M_CONCAT, 1)); arrayClass.defineMethod("<<", IndexedCallback.create(M_APPEND, 1)); arrayClass.defineMethod("push", IndexedCallback.createOptional(M_PUSH, 1)); arrayClass.defineMethod("pop", IndexedCallback.create(M_POP, 0)); arrayClass.defineMethod("shift", IndexedCallback.create(M_SHIFT, 0)); arrayClass.defineMethod("unshift", IndexedCallback.createOptional(M_UNSHIFT)); arrayClass.defineMethod("each", IndexedCallback.create(M_EACH, 0)); arrayClass.defineMethod("each_index", IndexedCallback.create(M_EACH_INDEX, 0)); arrayClass.defineMethod("reverse_each", IndexedCallback.create(M_REVERSE_EACH, 0)); arrayClass.defineMethod("length", IndexedCallback.create(M_LENGTH, 0)); arrayClass.defineMethod("size", IndexedCallback.create(M_LENGTH, 0)); arrayClass.defineMethod("empty?", IndexedCallback.create(M_EMPTY_P, 0)); arrayClass.defineMethod("index", IndexedCallback.create(M_INDEX, 1)); arrayClass.defineMethod("rindex", IndexedCallback.create(M_RINDEX, 1)); arrayClass.defineMethod("indexes", IndexedCallback.createOptional(M_INDICES)); arrayClass.defineMethod("indices", IndexedCallback.createOptional(M_INDICES)); arrayClass.defineMethod("clone", IndexedCallback.create(M_CLONE, 0)); arrayClass.defineMethod("join", CallbackFactory.getOptMethod(RubyArray.class, "join")); arrayClass.defineMethod("reverse", IndexedCallback.create(M_REVERSE, 0)); arrayClass.defineMethod("reverse!", IndexedCallback.create(M_REVERSE_BANG, 0)); arrayClass.defineMethod("sort", IndexedCallback.create(M_SORT, 0)); arrayClass.defineMethod("sort!", IndexedCallback.create(M_SORT_BANG, 0)); arrayClass.defineMethod("collect", IndexedCallback.create(M_COLLECT, 0)); arrayClass.defineMethod("collect!", IndexedCallback.create(M_COLLECT_BANG, 0)); arrayClass.defineMethod("map!", IndexedCallback.create(M_COLLECT_BANG, 0)); arrayClass.defineMethod("filter", IndexedCallback.create(M_COLLECT_BANG, 0)); arrayClass.defineMethod("delete", IndexedCallback.create(M_DELETE, 1)); arrayClass.defineMethod("delete_at", IndexedCallback.create(M_DELETE_AT, 1)); arrayClass.defineMethod("delete_if", IndexedCallback.create(M_DELETE_IF, 0)); arrayClass.defineMethod("reject!", IndexedCallback.create(M_REJECT_BANG, 0)); arrayClass.defineMethod("replace", IndexedCallback.create(M_REPLACE, 1)); arrayClass.defineMethod("clear", IndexedCallback.create(M_CLEAR, 0)); arrayClass.defineMethod("fill", CallbackFactory.getOptMethod(RubyArray.class, "fill")); arrayClass.defineMethod("include?", IndexedCallback.create(M_INCLUDE_P, 1)); arrayClass.defineMethod("<=>", CallbackFactory.getMethod(RubyArray.class, "op_cmp", RubyObject.class)); arrayClass.defineMethod("slice", CallbackFactory.getOptMethod(RubyArray.class, "aref")); arrayClass.defineMethod("slice!", CallbackFactory.getOptMethod(RubyArray.class, "slice_bang")); arrayClass.defineMethod("assoc", CallbackFactory.getMethod(RubyArray.class, "assoc", RubyObject.class)); arrayClass.defineMethod("rassoc", CallbackFactory.getMethod(RubyArray.class, "rassoc", RubyObject.class)); arrayClass.defineMethod("+", CallbackFactory.getMethod(RubyArray.class, "op_plus", RubyObject.class)); arrayClass.defineMethod("*", CallbackFactory.getMethod(RubyArray.class, "op_times", RubyObject.class)); arrayClass.defineMethod("-", CallbackFactory.getMethod(RubyArray.class, "op_diff", RubyObject.class)); arrayClass.defineMethod("&", CallbackFactory.getMethod(RubyArray.class, "op_and", RubyObject.class)); arrayClass.defineMethod("|", CallbackFactory.getMethod(RubyArray.class, "op_or", RubyObject.class)); arrayClass.defineMethod("uniq", CallbackFactory.getMethod(RubyArray.class, "uniq")); arrayClass.defineMethod("uniq!", CallbackFactory.getMethod(RubyArray.class, "uniq_bang")); arrayClass.defineMethod("compact", CallbackFactory.getMethod(RubyArray.class, "compact")); arrayClass.defineMethod("compact!", CallbackFactory.getMethod(RubyArray.class, "compact_bang")); arrayClass.defineMethod("flatten", CallbackFactory.getMethod(RubyArray.class, "flatten")); arrayClass.defineMethod("flatten!", CallbackFactory.getMethod(RubyArray.class, "flatten_bang")); arrayClass.defineMethod("nitems", CallbackFactory.getMethod(RubyArray.class, "nitems")); arrayClass.defineMethod("pack", CallbackFactory.getMethod(RubyArray.class, "pack", RubyString.class)); return arrayClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyArray.java/buggy/org/jruby/RubyArray.java |
return new RubyFixnum(getRuby(), getLength()); | return RubyFixnum.newFixnum(getRuby(), getLength()); | public RubyFixnum length() { return new RubyFixnum(getRuby(), getLength()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/afb67c3765f6466c476317e6bb0c72f6593f05f3/RubyArray.java/buggy/org/jruby/RubyArray.java |
return "1.1.9.3"; | return "1.1.9.4"; | public static String getVersion() { return "1.1.9.3"; } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/4a4e391bcac36d4945744eb39f3723849d9a3e26/JiveInfo.java/buggy/src/java/org/jivesoftware/sparkimpl/settings/JiveInfo.java |
getJava().createArg().setValue("-i"); | getJava().createArg().setValue("--datafile"); | public void execute() throws BuildException { Header.print(System.out); getJava().createArg().setValue("-i"); getJava().createArg().setValue(coverageDataFileName); getJava().createArg().setValue("-s"); getJava().createArg().setValue(src.toString()); getJava().createArg().setValue("-o"); getJava().createArg().setValue(destDir.toString()); getJava().createArg().setValue("-f"); getJava().createArg().setValue(format); if (getJava().executeJava() != 0) { throw new BuildException(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/eaf2267474ed505073f1abfd841ab9ef7b9dd935/CoverageReportTask.java/buggy/cobertura/src/net/sourceforge/cobertura/ant/CoverageReportTask.java |
getJava().createArg().setValue("-s"); | getJava().createArg().setValue("--source"); | public void execute() throws BuildException { Header.print(System.out); getJava().createArg().setValue("-i"); getJava().createArg().setValue(coverageDataFileName); getJava().createArg().setValue("-s"); getJava().createArg().setValue(src.toString()); getJava().createArg().setValue("-o"); getJava().createArg().setValue(destDir.toString()); getJava().createArg().setValue("-f"); getJava().createArg().setValue(format); if (getJava().executeJava() != 0) { throw new BuildException(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/eaf2267474ed505073f1abfd841ab9ef7b9dd935/CoverageReportTask.java/buggy/cobertura/src/net/sourceforge/cobertura/ant/CoverageReportTask.java |
getJava().createArg().setValue("-o"); | getJava().createArg().setValue("--output"); | public void execute() throws BuildException { Header.print(System.out); getJava().createArg().setValue("-i"); getJava().createArg().setValue(coverageDataFileName); getJava().createArg().setValue("-s"); getJava().createArg().setValue(src.toString()); getJava().createArg().setValue("-o"); getJava().createArg().setValue(destDir.toString()); getJava().createArg().setValue("-f"); getJava().createArg().setValue(format); if (getJava().executeJava() != 0) { throw new BuildException(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/eaf2267474ed505073f1abfd841ab9ef7b9dd935/CoverageReportTask.java/buggy/cobertura/src/net/sourceforge/cobertura/ant/CoverageReportTask.java |
getJava().createArg().setValue("-f"); | getJava().createArg().setValue("--format"); | public void execute() throws BuildException { Header.print(System.out); getJava().createArg().setValue("-i"); getJava().createArg().setValue(coverageDataFileName); getJava().createArg().setValue("-s"); getJava().createArg().setValue(src.toString()); getJava().createArg().setValue("-o"); getJava().createArg().setValue(destDir.toString()); getJava().createArg().setValue("-f"); getJava().createArg().setValue(format); if (getJava().executeJava() != 0) { throw new BuildException(); } } | 50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/eaf2267474ed505073f1abfd841ab9ef7b9dd935/CoverageReportTask.java/buggy/cobertura/src/net/sourceforge/cobertura/ant/CoverageReportTask.java |
fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); | public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", RubyObject.class)); fixnumClass.defineMethod("to_f", CallbackFactory.getMethod(RubyFixnum.class, "to_f")); fixnumClass.defineMethod("to_s", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("to_str", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("hash", CallbackFactory.getMethod(RubyFixnum.class, "hash")); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("<<", CallbackFactory.getMethod(RubyFixnum.class, "op_lshift", RubyObject.class)); fixnumClass.defineMethod(">>", CallbackFactory.getMethod(RubyFixnum.class, "op_rshift", RubyObject.class)); fixnumClass.defineMethod("+", CallbackFactory.getMethod(RubyFixnum.class, "op_plus", RubyObject.class)); fixnumClass.defineMethod("-", CallbackFactory.getMethod(RubyFixnum.class, "op_minus", RubyObject.class)); fixnumClass.defineMethod("*", CallbackFactory.getMethod(RubyFixnum.class, "op_mul", RubyObject.class)); fixnumClass.defineMethod("/", CallbackFactory.getMethod(RubyFixnum.class, "op_div", RubyObject.class)); fixnumClass.defineMethod("%", CallbackFactory.getMethod(RubyFixnum.class, "op_mod", RubyObject.class)); fixnumClass.defineMethod("**", CallbackFactory.getMethod(RubyFixnum.class, "op_pow", RubyObject.class)); fixnumClass.defineMethod("==", CallbackFactory.getMethod(RubyFixnum.class, "op_equal", RubyObject.class)); fixnumClass.defineMethod("<=>", CallbackFactory.getMethod(RubyFixnum.class, "op_cmp", RubyObject.class)); fixnumClass.defineMethod(">", CallbackFactory.getMethod(RubyFixnum.class, "op_gt", RubyObject.class)); fixnumClass.defineMethod(">=", CallbackFactory.getMethod(RubyFixnum.class, "op_ge", RubyObject.class)); fixnumClass.defineMethod("<", CallbackFactory.getMethod(RubyFixnum.class, "op_lt", RubyObject.class)); fixnumClass.defineMethod("<=", CallbackFactory.getMethod(RubyFixnum.class, "op_le", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("size", CallbackFactory.getMethod(RubyFixnum.class, "size")); return fixnumClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/dc83cf778f725a9020cad5e79608a2fe37d5ea5d/RubyFixnum.java/clean/org/jruby/RubyFixnum.java |
|
} catch (BreakException bExcptn) { | } catch (BreakJump bExcptn) { | public RubyObject eval(Ruby ruby, RubyObject self) { while (getConditionNode().eval(ruby, self).isFalse()) { while (true) { try { getBodyNode().eval(ruby, self); break; } catch (RedoException rExcptn) { } catch (NextException nExcptn) { break; } catch (BreakException bExcptn) { return ruby.getNil(); } } } return ruby.getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/UntilNode.java/buggy/org/jruby/nodes/UntilNode.java |
} catch (BreakException bExcptn) { | } catch (BreakJump bExcptn) { | public RubyObject eval(Ruby ruby, RubyObject self) { while (true) { try { // while (!rb_gets().isNil() false) { // HACK +++ if (true) { // HACK --- try { getBodyNode().eval(ruby, self); } catch (RedoException rExcptn) { } } break; } catch (NextException nExcptn) { } catch (BreakException bExcptn) { break; } } return ruby.getNil(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/786cea08c1dd2092a02d1254b49fbee371ace5f9/OptNNode.java/buggy/org/jruby/nodes/OptNNode.java |
if (!slider.isEnabled() || !isDragging) return; currentMouseX = event.getX(); currentMouseY = event.getY(); slider.setValueIsAdjusting(true); int thumbMiddle; int thumbPosition; switch (slider.getOrientation()) { case JSlider.VERTICAL: thumbMiddle = thumbRect.height/2; thumbPosition = event.getY()-offset; int trackTop = trackRect.y; int trackBottom = trackRect.y+(trackRect.height-1); int MaxYValue = yPositionForValue(slider.getMaximum() -slider.getExtent()); if (drawInverted()) trackBottom = MaxYValue; else trackTop = MaxYValue; thumbPosition = Math.max(thumbPosition, trackTop-thumbMiddle); thumbPosition = Math.min(thumbPosition, trackBottom-thumbMiddle); setThumbLocation(thumbRect.x, thumbPosition); thumbMiddle = thumbPosition+thumbMiddle; slider.setValue(valueForYPosition(thumbMiddle)); break; case JSlider.HORIZONTAL: thumbMiddle = thumbRect.width/2; thumbPosition = event.getX()-offset; int trackLeft = trackRect.x; int trackRight = trackRect.x+(trackRect.width-1); int MaxXValue = xPositionForValue(slider.getMaximum() - slider.getExtent()); if (drawInverted()) trackLeft = MaxXValue; else trackRight = MaxXValue; thumbPosition = Math.max(thumbPosition, trackLeft-thumbMiddle); thumbPosition = Math.min(thumbPosition, trackRight-thumbMiddle); setThumbLocation(thumbPosition, thumbRect.y); thumbMiddle = thumbPosition+thumbMiddle; slider.setValue(valueForXPosition(thumbMiddle)); break; } | super.mouseDragged(event); | public void mouseDragged(MouseEvent event) { // Return if slider disabled or we're not dragging slider. if (!slider.isEnabled() || !isDragging) return; currentMouseX = event.getX(); currentMouseY = event.getY(); slider.setValueIsAdjusting(true); int thumbMiddle; int thumbPosition; switch (slider.getOrientation()) { case JSlider.VERTICAL: thumbMiddle = thumbRect.height/2; thumbPosition = event.getY()-offset; int trackTop = trackRect.y; int trackBottom = trackRect.y+(trackRect.height-1); int MaxYValue = yPositionForValue(slider.getMaximum() -slider.getExtent()); if (drawInverted()) trackBottom = MaxYValue; else trackTop = MaxYValue; thumbPosition = Math.max(thumbPosition, trackTop-thumbMiddle); thumbPosition = Math.min(thumbPosition, trackBottom-thumbMiddle); setThumbLocation(thumbRect.x, thumbPosition); thumbMiddle = thumbPosition+thumbMiddle; slider.setValue(valueForYPosition(thumbMiddle)); break; case JSlider.HORIZONTAL: thumbMiddle = thumbRect.width/2; thumbPosition = event.getX()-offset; int trackLeft = trackRect.x; int trackRight = trackRect.x+(trackRect.width-1); int MaxXValue = xPositionForValue(slider.getMaximum() - slider.getExtent()); if (drawInverted()) trackLeft = MaxXValue; else trackRight = MaxXValue; thumbPosition = Math.max(thumbPosition, trackLeft-thumbMiddle); thumbPosition = Math.min(thumbPosition, trackRight-thumbMiddle); setThumbLocation(thumbPosition, thumbRect.y); thumbMiddle = thumbPosition+thumbMiddle; slider.setValue(valueForXPosition(thumbMiddle)); break; } if (showTipLabel && tipDialog != null && endLabel != null) { Point location = slider.getLocationOnScreen(); location.x += thumbRect.x+TOOLTIP_OFFSET; location.y += thumbRect.y; tipDialog.setTipString( endLabel+" : " + slider.getValue()); tipDialog.setLocation(location); tipDialog.setVisible(true); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c6472710140ce7700bb1cb3c30b584ae3057a53/OneKnobSliderUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/slider/OneKnobSliderUI.java |
{ switch (slider.getOrientation()) { case JSlider.HORIZONTAL: offset = currentMouseX-thumbRect.x; break; case JSlider.VERTICAL: offset = currentMouseY-thumbRect.y; } isDragging = true; return; } | super.mousePressed(event); | public void mousePressed(MouseEvent event) { // Check to see that the slider is enabled before proceeeding. if (!slider.isEnabled()) return; // Get mouse x, y positions. currentMouseX = event.getX(); currentMouseY = event.getY(); // If the slider has {@link #setFocusEnabled} true then // request focus. if (slider.isRequestFocusEnabled()) slider.requestFocus(); // Check to see if the thumb was clicked. if (thumbRect.contains(currentMouseX, currentMouseY)) { // Depending on orientation of the mouse. switch (slider.getOrientation()) { case JSlider.HORIZONTAL: offset = currentMouseX-thumbRect.x; break; case JSlider.VERTICAL: offset = currentMouseY-thumbRect.y; } isDragging = true; return; } if (showArrows) { if (minArrowRect.contains(currentMouseX, currentMouseY)) { int value = slider.getValue(); if (value > slider.getMinimum()) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); scrollListener.setDirection(OneKnobSliderUI.NEGATIVE_SCROLL); scrollTimer.start(); slider.repaint(); } isDragging = false; return; } if (maxArrowRect.contains(currentMouseX, currentMouseY)) { int value = slider.getValue(); if (value < slider.getMaximum()) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); scrollListener.setDirection( OneKnobSliderUI.POSITIVE_SCROLL); scrollTimer.start(); slider.repaint(); } isDragging = false; return; } } // We have clicked outside of the thumb and onto the track. isDragging = false; slider.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c6472710140ce7700bb1cb3c30b584ae3057a53/OneKnobSliderUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/slider/OneKnobSliderUI.java |
isDragging = false; | public void mousePressed(MouseEvent event) { // Check to see that the slider is enabled before proceeeding. if (!slider.isEnabled()) return; // Get mouse x, y positions. currentMouseX = event.getX(); currentMouseY = event.getY(); // If the slider has {@link #setFocusEnabled} true then // request focus. if (slider.isRequestFocusEnabled()) slider.requestFocus(); // Check to see if the thumb was clicked. if (thumbRect.contains(currentMouseX, currentMouseY)) { // Depending on orientation of the mouse. switch (slider.getOrientation()) { case JSlider.HORIZONTAL: offset = currentMouseX-thumbRect.x; break; case JSlider.VERTICAL: offset = currentMouseY-thumbRect.y; } isDragging = true; return; } if (showArrows) { if (minArrowRect.contains(currentMouseX, currentMouseY)) { int value = slider.getValue(); if (value > slider.getMinimum()) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); scrollListener.setDirection(OneKnobSliderUI.NEGATIVE_SCROLL); scrollTimer.start(); slider.repaint(); } isDragging = false; return; } if (maxArrowRect.contains(currentMouseX, currentMouseY)) { int value = slider.getValue(); if (value < slider.getMaximum()) { scrollTimer.stop(); scrollListener.setScrollByBlock(false); scrollListener.setDirection( OneKnobSliderUI.POSITIVE_SCROLL); scrollTimer.start(); slider.repaint(); } isDragging = false; return; } } // We have clicked outside of the thumb and onto the track. isDragging = false; slider.repaint(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c6472710140ce7700bb1cb3c30b584ae3057a53/OneKnobSliderUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/slider/OneKnobSliderUI.java |
|
if (showTipLabel && tipDialog != null) | if (showTipLabel && tipDialog != null) | public void mouseReleased(MouseEvent event) { super.mouseReleased(event); if (showTipLabel && tipDialog != null) { if (tipDialog.isVisible()) tipDialog.setVisible(false); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c6472710140ce7700bb1cb3c30b584ae3057a53/OneKnobSliderUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/slider/OneKnobSliderUI.java |
slider.repaint(); | public void mouseReleased(MouseEvent event) { super.mouseReleased(event); if (showTipLabel && tipDialog != null) { if (tipDialog.isVisible()) tipDialog.setVisible(false); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c6472710140ce7700bb1cb3c30b584ae3057a53/OneKnobSliderUI.java/clean/SRC/org/openmicroscopy/shoola/util/ui/slider/OneKnobSliderUI.java |
|
view.setVisible(false); | private void handleClose() { view.dispose(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f84715d97fb9bad35cd75d5c742a1473fe1f109/ROIStatsMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/util/ROIStatsMng.java |
|
} else { final long otherVal = other.getLongValue(); return value > otherVal ? 1 : value < otherVal ? -1 : 0; } | } long otherVal = other.getLongValue(); return value > otherVal ? 1 : value < otherVal ? -1 : 0; | protected int compareValue(RubyNumeric other) { if (other instanceof RubyBignum) { return -other.compareValue(this); } else if (other instanceof RubyFloat) { final double otherVal = other.getDoubleValue(); return value > otherVal ? 1 : value < otherVal ? -1 : 0; } else { final long otherVal = other.getLongValue(); return value > otherVal ? 1 : value < otherVal ? -1 : 0; } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df3ba2646cbb9e6b1bf4f1687ed12226cdf7b3ad/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
} else { | } else if (other instanceof RubyNumeric) { | public IRubyObject op_minus(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_minus(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } else { long otherValue = ((RubyNumeric) other).getLongValue(); long result = value - otherValue; if ((value <= 0 && otherValue >= 0 && (result > 0 || result < -MAX)) || (value >= 0 && otherValue <= 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df3ba2646cbb9e6b1bf4f1687ed12226cdf7b3ad/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
(value >= 0 && otherValue <= 0 && (result < 0 || result > MAX))) { | (value >= 0 && otherValue <= 0 && (result < 0 || result > MAX))) { | public IRubyObject op_minus(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_minus(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } else { long otherValue = ((RubyNumeric) other).getLongValue(); long result = value - otherValue; if ((value <= 0 && otherValue >= 0 && (result > 0 || result < -MAX)) || (value >= 0 && otherValue <= 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df3ba2646cbb9e6b1bf4f1687ed12226cdf7b3ad/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
return callCoerced("-", other); | public IRubyObject op_minus(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_minus(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } else { long otherValue = ((RubyNumeric) other).getLongValue(); long result = value - otherValue; if ((value <= 0 && otherValue >= 0 && (result > 0 || result < -MAX)) || (value >= 0 && otherValue <= 0 && (result < 0 || result > MAX))) { return RubyBignum.newBignum(getRuntime(), value).op_minus(other); } return newFixnum(result); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df3ba2646cbb9e6b1bf4f1687ed12226cdf7b3ad/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
|
} else { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } | } return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); | public IRubyObject op_pow(IRubyObject other) { if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } else if (other instanceof RubyNumeric) { long longValue = ((RubyNumeric) other).getLongValue(); if (longValue == 0) { return getRuntime().newFixnum(1); } else if (longValue == 1) { return this; } else if (longValue > 1) { return RubyBignum.newBignum(getRuntime(), getLongValue()).op_pow(other); } else { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } } return callCoerced("**", other); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/df3ba2646cbb9e6b1bf4f1687ed12226cdf7b3ad/RubyFixnum.java/clean/src/org/jruby/RubyFixnum.java |
props.put("J2EEApplication", applicationName); | props.put("J2EEApplication", "null"); props.put("J2EEModule", moduleName); | private ObjectName createObjectName(String name, String type) { Properties props = new Properties(); if (type != null) { props.put("j2eeType", type); } props.put("name", name); props.put("J2EEApplication", applicationName); props.put("J2EEServer", serverName); return ServiceName.createName(domainName, props); } | 52533 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52533/6a661ce4fbc3261ed4b3a744b1e1919df53cbbf7/ObjectNameBuilder.java/clean/kernel/src/java/org/gbean/spring/ObjectNameBuilder.java |
System.err.println("# of trajectories..."+instances.size()); | private List findTrajectoryEntries(Vector mexes) { SemanticTypesService sts = registry.getSemanticTypesService(); try { List instances = sts.retrieveTrajectoryEntriesByMEXs(mexes); System.err.println("# of trajectories..."+instances.size()); return instances; } catch(DSOutOfServiceException dso) { dso.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Connection Error",dso.getMessage(),dso); } catch(DSAccessException dsa) { dsa.printStackTrace(); UserNotifier un = registry.getUserNotifier(); un.notifyError("Server Error",dsa.getMessage(),dsa); } return null; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6b41a202a5fe8755e51de4d1bf73d2c78a302603/SpotsTrajectorySet.java/buggy/SRC/org/openmicroscopy/shoola/agents/spots/data/SpotsTrajectorySet.java |
|
((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue("-"); | ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(new StringBuffer("-")); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)getRuntime().getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(getRuntime(), filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyArgsFile.java/clean/src/org/jruby/RubyArgsFile.java |
String filename = ((RubyString) args.shift()).getValue(); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(filename); | String filename = ((RubyString) args.shift()).toString(); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(new StringBuffer(filename)); | protected boolean nextArgsFile() { RubyArray args = (RubyArray)getRuntime().getGlobalVariables().get("$*"); if (args.getLength() == 0) { if (currentFile == null) { currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue("-"); currentLineNumber = 0; return true; } return false; } String filename = ((RubyString) args.shift()).getValue(); ((RubyString) getRuntime().getGlobalVariables().get("$FILENAME")).setValue(filename); if (filename.equals("-")) { currentFile = (RubyIO) getRuntime().getGlobalVariables().get("$stdin"); } else { currentFile = new RubyFile(getRuntime(), filename); } return true; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyArgsFile.java/clean/src/org/jruby/RubyArgsFile.java |
protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, RubyModule parentModule, String name) { | protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, SinglyLinkedList parentCRef, String name) { | protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, RubyModule parentModule, String name) { super(runtime, metaClass); this.superClass = superClass; this.parentModule = parentModule; setBaseName(name); // If no parent is passed in, it is safe to assume Object. if (this.parentModule == null) { this.parentModule = runtime.getObject(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
this.parentModule = parentModule; | protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, RubyModule parentModule, String name) { super(runtime, metaClass); this.superClass = superClass; this.parentModule = parentModule; setBaseName(name); // If no parent is passed in, it is safe to assume Object. if (this.parentModule == null) { this.parentModule = runtime.getObject(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
|
if (this.parentModule == null) { this.parentModule = runtime.getObject(); | if (parentCRef == null) { if (runtime.getObject() != null) { parentCRef = runtime.getObject().getCRef(); } | protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, RubyModule parentModule, String name) { super(runtime, metaClass); this.superClass = superClass; this.parentModule = parentModule; setBaseName(name); // If no parent is passed in, it is safe to assume Object. if (this.parentModule == null) { this.parentModule = runtime.getObject(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
this.cref = new SinglyLinkedList(this, parentCRef); | protected RubyModule(IRuby runtime, RubyClass metaClass, RubyClass superClass, RubyModule parentModule, String name) { super(runtime, metaClass); this.superClass = superClass; this.parentModule = parentModule; setBaseName(name); // If no parent is passed in, it is safe to assume Object. if (this.parentModule == null) { this.parentModule = runtime.getObject(); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
|
return getRuntime().newBoolean(getConstant(name, false) != null); | return getRuntime().newBoolean(getConstantAt(name) != null); | public RubyBoolean const_defined(IRubyObject symbol) { String name = symbol.asSymbol(); if (!IdUtil.isConstant(name)) { throw getRuntime().newNameError("wrong constant name " + name); } return getRuntime().newBoolean(getConstant(name, false) != null); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
getRuntime().defineClassUnder(name, superClazz, this)); | getRuntime().defineClassUnder(name, superClazz, cref)); | public RubyClass defineClassUnder(String name, RubyClass superClazz) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyClass) setConstant(name, getRuntime().defineClassUnder(name, superClazz, this)); } if (!(type instanceof RubyClass)) { throw getRuntime().newTypeError(name + " is not a class."); } else if (((RubyClass) type).getSuperClass().getRealClass() != superClazz) { throw getRuntime().newNameError(name + " is already defined."); } return (RubyClass) type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
getRuntime().defineModuleUnder(name, this)); | getRuntime().defineModuleUnder(name, cref)); | public RubyModule defineModuleUnder(String name) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyModule) setConstant(name, getRuntime().defineModuleUnder(name, this)); } if (!(type instanceof RubyModule)) { throw getRuntime().newTypeError(name + " is not a module."); } return (RubyModule) type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
getRuntime().defineClassUnder(name, superClazz, this)); | getRuntime().defineClassUnder(name, superClazz, cref)); | public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) { IRubyObject type = getConstantAt(name); if (type == null) { return (RubyClass) setConstant(name, getRuntime().defineClassUnder(name, superClazz, this)); } if (!(type instanceof RubyClass)) { throw getRuntime().newTypeError(name + " is not a class."); } return (RubyClass) type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
return RubyModule.newModule(getRuntime(), getBaseName(), parentModule); | return RubyModule.newModule(getRuntime(), getBaseName(), cref.getNext()); | protected IRubyObject doClone() { return RubyModule.newModule(getRuntime(), getBaseName(), parentModule); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
IRubyObject module = getConstant(name, false); | IRubyObject module = getConstantAt(name); | public RubyClass getClass(String name) { IRubyObject module = getConstant(name, false); return (module instanceof RubyClass) ? (RubyClass) module : null; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
return getConstant(name, true); | return getConstantInner(name, false); | public IRubyObject getConstant(String name) { return getConstant(name, true); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
IRubyObject constant = getInstanceVariable(name); if (constant != null) { return constant; } if (this == getRuntime().getObject()) { return getConstant(name, false); } return null; | return getInstanceVariable(name); | public IRubyObject getConstantAt(String name) { IRubyObject constant = getInstanceVariable(name); if (constant != null) { return constant; } if (this == getRuntime().getObject()) { return getConstant(name, false); } return null; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
return parentModule; | if (cref.getNext() == null) { return null; } return (RubyModule)cref.getNext().getValue(); | public RubyModule getParent() { return parentModule; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
for (RubyModule p = module.getSuperClass(); p != null; p = p.getSuperClass()) { includeModule(p); } | public synchronized void includeModule(IRubyObject arg) { testFrozen("module"); if (!isTaint()) { getRuntime().secure(4); } if (!(arg instanceof RubyModule)) { throw getRuntime().newTypeError("Wrong argument type " + arg.getMetaClass().getName() + " (expected Module)."); } RubyModule module = (RubyModule) arg; Map moduleMethods = module.getMethods(); // Make sure the module we include does not already exist for (RubyModule p = this; p != null; p = p.getSuperClass()) { // XXXEnebo - Lame equality check (cause: IncludedModule?) if (p.getMethods() == moduleMethods) { return; } } // Invalidate cache for all methods in the new included module in case a base class method // of the same name has already been cached. for (Iterator iter = moduleMethods.keySet().iterator(); iter.hasNext();) { String methodName = (String) iter.next(); getRuntime().getCacheMap().remove(methodName, searchMethod(methodName)); } // Include new module setSuperClass(module.newIncludeClass(getSuperClass())); // Try to include all included modules from module just added for (RubyModule p = module.getSuperClass(); p != null; p = p.getSuperClass()) { includeModule(p); } module.callMethod("included", this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
|
return new IncludedModuleWrapper(getRuntime(), superClazz, this); | IncludedModuleWrapper includedModule = new IncludedModuleWrapper(getRuntime(), superClazz, this); if (getSuperClass() != null) { includedModule.includeModule(getSuperClass()); } return includedModule; | public IncludedModuleWrapper newIncludeClass(RubyClass superClazz) { return new IncludedModuleWrapper(getRuntime(), superClazz, this); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
/*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ | getRuntime().getWarnings().warn("undefining `"+ name +"' may cause serious problem"); | public void undef(String name) { IRuby runtime = getRuntime(); if (this == runtime.getObject()) { runtime.secure(4); } if (runtime.getSafeLevel() >= 4 && !isTaint()) { throw new SecurityException("Insecure: can't undef"); } testFrozen("module"); if (name.equals("__id__") || name.equals("__send__")) { /*rb_warn("undefining `%s' may cause serious problem", rb_id2name( id ) );*/ } ICallable method = searchMethod(name); if (method.isUndefined()) { String s0 = " class"; RubyModule c = this; if (c.isSingleton()) { IRubyObject obj = getInstanceVariable("__attached__"); if (obj != null && obj instanceof RubyModule) { c = (RubyModule) obj; s0 = ""; } } else if (c.isModule()) { s0 = " module"; } throw getRuntime().newNameError("Undefined method " + name + " for" + s0 + " '" + c.getName() + "'"); } addMethod(name, UndefinedMethod.getInstance()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a1b8fc1d456e3d5c6e01579b88773383068aa85c/RubyModule.java/buggy/src/org/jruby/RubyModule.java |
synchronized (this) { _pageTree = null; } | public void deletePage(String title) { // backup page we're about to remove WikiPage oldPage = getPage(title); if (oldPage != null) { oldPage.setTitle(".DELETED-" + oldPage.getTitle()); _pageStore.put(".DELETED-" + oldPage.getTitle(), oldPage); } // remove the page _pageStore.remove(title); populatePageNames(); } | 52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/76bb847e1a32516a74762100398ded03f39feec8/Wiki.java/buggy/wiki/src/org/tcdi/opensource/wiki/Wiki.java |
|
if (!result.isAbsolute()) { result = new NormalizedFile(runtime.getCurrentDirectory(), path); } | protected static NormalizedFile getDir(IRuby runtime, String path, boolean mustExist) { NormalizedFile result = new NormalizedFile(path); // For some reason Java 1.5.x will print correct absolute path on a created file, // but it will still operate on an old user.dir when performing any action. // This could even happen with older Java runtimes? try { result = (NormalizedFile)result.getCanonicalFile(); } catch (IOException e) { result = (NormalizedFile)result.getAbsoluteFile(); } boolean isDirectory = result.isDirectory(); if (mustExist && !isDirectory) { throw runtime.newErrnoENOENTError(path + " is not a directory"); } else if (!mustExist && isDirectory) { throw runtime.newErrnoEEXISTError("File exists - " + path); } return result; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/295cdd11472f7ae4b0426336dc7cdcabe946fdc1/RubyDir.java/clean/src/org/jruby/RubyDir.java |
|
if (chatFrame.isVisible() && (chatFrame.getState() == Frame.ICONIFIED || chatFrame.getInactiveTime() > 60000)) { | if (chatFrame.isVisible() && (chatFrame.getState() == Frame.ICONIFIED || !chatFrame.isInFocus())) { | public void fireNotifyOnMessage(final ChatRoom chatRoom) { ChatRoom activeChatRoom = null; try { activeChatRoom = getActiveChatRoom(); } catch (ChatRoomNotFoundException e1) { Log.error(e1); } if (chatFrame.isVisible() && (chatFrame.getState() == Frame.ICONIFIED || chatFrame.getInactiveTime() > 60000)) { int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation); startFlashing(chatRoom); return; } if (!chatFrame.isVisible() && SparkManager.getMainWindow().isFocused()) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); } else if (chatFrame.isVisible() && !chatFrame.isInFocus()) { startFlashing(chatRoom); } else if (chatFrame.isVisible() && chatFrame.getState() == Frame.ICONIFIED) { // Set to new tab. int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation); // If the ContactList is in the tray, we need better notification by flashing // the chatframe. startFlashing(chatRoom); } // Handle when chat frame is visible but the Contact List is not. else if (chatFrame.isVisible() && !SparkManager.getMainWindow().isVisible() && !chatFrame.isInFocus()) { startFlashing(chatRoom); } else if (!chatFrame.isVisible()) { if (Spark.isWindows()) { chatFrame.setFocusableWindowState(false); chatFrame.setState(Frame.ICONIFIED); } chatFrame.setVisible(true); // Set to new tab. int tabLocation = indexOfComponent(chatRoom); setSelectedIndex(tabLocation); // If the ContactList is in the tray, we need better notification by flashing // the chatframe. if (!SparkManager.getMainWindow().isVisible()) { startFlashing(chatRoom); } else if (chatFrame.getState() == Frame.ICONIFIED) { startFlashing(chatRoom); } } else if (chatRoom != activeChatRoom) { startFlashing(chatRoom); } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/574c15c5effb6d20a2b7e90ba6b59211402c8696/ChatContainer.java/buggy/src/java/org/jivesoftware/spark/ui/ChatContainer.java |
boolean bT = false, bZ = false; | boolean bT = false, bZ = false, bZT = false; | void setDefaultZT(int t, int z, int sizeT, int sizeZ) { ToolBarManager tbm = toolBar.getManager(); tbm.onTChange(t); tbm.onZChange(z); int maxZ = sizeZ-1; int maxT = sizeT-1; tbm.setMaxT(maxT); tbm.setMaxZ(maxZ); toolBar.getZLabel().setText("/"+maxZ); toolBar.getTLabel().setText("/"+maxT); resetSliders(maxT, t, maxZ, z); boolean bT = false, bZ = false; if (maxT != 0) bT = true; if (maxZ != 0) bZ = true; toolBar.getTField().setEditable(bT); toolBar.getZField().setEditable(bZ); toolBar.getViewer3D().setEnabled(bZ); viewer3DItem.setEnabled(bZ); if (bZ && bT) movieItem.setEnabled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/69d9ca849e67dccda3286f8ae868fd51e5634768/ViewerUIF.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/ViewerUIF.java |
if (bZ && bT) movieItem.setEnabled(true); | toolBar.getMovie().setEnabled(bZT); movieItem.setEnabled(bZT); | void setDefaultZT(int t, int z, int sizeT, int sizeZ) { ToolBarManager tbm = toolBar.getManager(); tbm.onTChange(t); tbm.onZChange(z); int maxZ = sizeZ-1; int maxT = sizeT-1; tbm.setMaxT(maxT); tbm.setMaxZ(maxZ); toolBar.getZLabel().setText("/"+maxZ); toolBar.getTLabel().setText("/"+maxT); resetSliders(maxT, t, maxZ, z); boolean bT = false, bZ = false; if (maxT != 0) bT = true; if (maxZ != 0) bZ = true; toolBar.getTField().setEditable(bT); toolBar.getZField().setEditable(bZ); toolBar.getViewer3D().setEnabled(bZ); viewer3DItem.setEnabled(bZ); if (bZ && bT) movieItem.setEnabled(true); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/69d9ca849e67dccda3286f8ae868fd51e5634768/ViewerUIF.java/buggy/SRC/org/openmicroscopy/shoola/agents/viewer/ViewerUIF.java |
public RubyArray coerce(IRubyObject num) { RubyNumeric other = numericValue(num); | public RubyArray coerce(RubyNumeric other) { | public RubyArray coerce(IRubyObject num) { RubyNumeric other = numericValue(num); if (getMetaClass() == other.getMetaClass()) { return RubyArray.newArray(getRuntime(), other, this); } else { return RubyArray.newArray( getRuntime(), RubyFloat.newFloat(getRuntime(), other.getDoubleValue()), RubyFloat.newFloat(getRuntime(), getDoubleValue())); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
} else { return RubyArray.newArray( | } return RubyArray.newArray( | public RubyArray coerce(IRubyObject num) { RubyNumeric other = numericValue(num); if (getMetaClass() == other.getMetaClass()) { return RubyArray.newArray(getRuntime(), other, this); } else { return RubyArray.newArray( getRuntime(), RubyFloat.newFloat(getRuntime(), other.getDoubleValue()), RubyFloat.newFloat(getRuntime(), getDoubleValue())); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
} | public RubyArray coerce(IRubyObject num) { RubyNumeric other = numericValue(num); if (getMetaClass() == other.getMetaClass()) { return RubyArray.newArray(getRuntime(), other, this); } else { return RubyArray.newArray( getRuntime(), RubyFloat.newFloat(getRuntime(), other.getDoubleValue()), RubyFloat.newFloat(getRuntime(), getDoubleValue())); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
|
return new NumericDefinition(ruby).getType(); | RubyClass result = ruby.defineClass("Numeric", ruby.getClasses().getObjectClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); result.includeModule(ruby.getClasses().getComparableModule()); result.defineMethod("+@", callbackFactory.getMethod(RubyNumeric.class, "op_uplus")); result.defineMethod("-@", callbackFactory.getMethod(RubyNumeric.class, "op_uminus")); result.defineMethod("<=>", callbackFactory.getMethod(RubyBignum.class, "cmp", RubyNumeric.class)); result.defineMethod("==", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("equal?", callbackFactory.getMethod(RubyNumeric.class, "veryEqual", IRubyObject.class)); result.defineMethod("===", callbackFactory.getMethod(RubyNumeric.class, "equal", IRubyObject.class)); result.defineMethod("abs", callbackFactory.getMethod(RubyNumeric.class, "abs")); result.defineMethod("ceil", callbackFactory.getMethod(RubyNumeric.class, "ceil")); result.defineMethod("coerce", callbackFactory.getMethod(RubyNumeric.class, "coerce", RubyNumeric.class)); result.defineMethod("clone", callbackFactory.getMethod(RubyNumeric.class, "rbClone")); result.defineMethod("divmod", callbackFactory.getMethod(RubyNumeric.class, "divmod", RubyNumeric.class)); result.defineMethod("eql?", callbackFactory.getMethod(RubyNumeric.class, "eql", IRubyObject.class)); result.defineMethod("floor", callbackFactory.getMethod(RubyNumeric.class, "floor")); result.defineMethod("integer?", callbackFactory.getMethod(RubyNumeric.class, "int_p")); result.defineMethod("modulo", callbackFactory.getMethod(RubyNumeric.class, "modulo", RubyNumeric.class)); result.defineMethod("nonzero?", callbackFactory.getMethod(RubyNumeric.class, "nonzero_p")); result.defineMethod("remainder", callbackFactory.getMethod(RubyNumeric.class, "remainder", RubyNumeric.class)); result.defineMethod("round", callbackFactory.getMethod(RubyNumeric.class, "round")); result.defineMethod("truncate", callbackFactory.getMethod(RubyNumeric.class, "truncate")); result.defineMethod("zero?", callbackFactory.getMethod(RubyNumeric.class, "zero_p")); return result; | public static RubyClass createNumericClass(Ruby ruby) { return new NumericDefinition(ruby).getType(); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
public RubyArray divmod(IRubyObject val) { RubyNumeric other = numericValue(val); | public RubyArray divmod(RubyNumeric other) { | public RubyArray divmod(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric div = (RubyNumeric) callMethod("/", other); if (div instanceof RubyFloat) { double d = Math.floor(((RubyFloat) div).getValue()); if (((RubyFloat) div).getValue() > d) { div = RubyFloat.newFloat(getRuntime(), d); } } RubyNumeric mod = (RubyNumeric) callMethod("%", other); return RubyArray.newArray(getRuntime(), div, mod); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
RubyNumeric mod = (RubyNumeric) callMethod("%", other); | public RubyArray divmod(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric div = (RubyNumeric) callMethod("/", other); if (div instanceof RubyFloat) { double d = Math.floor(((RubyFloat) div).getValue()); if (((RubyFloat) div).getValue() > d) { div = RubyFloat.newFloat(getRuntime(), d); } } RubyNumeric mod = (RubyNumeric) callMethod("%", other); return RubyArray.newArray(getRuntime(), div, mod); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
|
return RubyArray.newArray(getRuntime(), div, mod); | return RubyArray.newArray(getRuntime(), div, modulo(other)); | public RubyArray divmod(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric div = (RubyNumeric) callMethod("/", other); if (div instanceof RubyFloat) { double d = Math.floor(((RubyFloat) div).getValue()); if (((RubyFloat) div).getValue() > d) { div = RubyFloat.newFloat(getRuntime(), d); } } RubyNumeric mod = (RubyNumeric) callMethod("%", other); return RubyArray.newArray(getRuntime(), div, mod); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
} else { return super.equal(other); | public RubyBoolean eql(IRubyObject other) { if (getMetaClass() != other.getMetaClass()) { return getRuntime().getFalse(); } else { return super.equal(other); // +++ rb_equal } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
|
return equal(other); | public RubyBoolean eql(IRubyObject other) { if (getMetaClass() != other.getMetaClass()) { return getRuntime().getFalse(); } else { return super.equal(other); // +++ rb_equal } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
|
if (other instanceof RubyNumeric) { return RubyBoolean.newBoolean(getRuntime(), compareValue((RubyNumeric) other) == 0); } | public RubyBoolean equal(IRubyObject other) { return super.equal(other); // +++ rb_equal } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
|
public RubyNumeric modulo(IRubyObject val) { RubyNumeric other = numericValue(val); | public RubyNumeric modulo(RubyNumeric other) { | public RubyNumeric modulo(IRubyObject val) { RubyNumeric other = numericValue(val); return (RubyNumeric) callMethod("%", other); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
public RubyNumeric remainder(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric mod = (RubyNumeric) callMethod("%", other); | public RubyNumeric remainder(RubyNumeric other) { RubyNumeric mod = modulo(other); | public RubyNumeric remainder(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric mod = (RubyNumeric) callMethod("%", other); final RubyNumeric zero = RubyFixnum.zero(getRuntime()); if (callMethod("<", zero).isTrue() && other.callMethod(">", zero).isTrue() || callMethod(">", zero).isTrue() && other.callMethod("<", zero).isTrue()) { return (RubyNumeric) mod.callMethod("-", other); } return mod; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
if (callMethod("<", zero).isTrue() && other.callMethod(">", zero).isTrue() || callMethod(">", zero).isTrue() && other.callMethod("<", zero).isTrue()) { | if (callMethod("<", zero).isTrue() && other.callMethod(">", zero).isTrue() || callMethod(">", zero).isTrue() && other.callMethod("<", zero).isTrue()) { | public RubyNumeric remainder(IRubyObject val) { RubyNumeric other = numericValue(val); RubyNumeric mod = (RubyNumeric) callMethod("%", other); final RubyNumeric zero = RubyFixnum.zero(getRuntime()); if (callMethod("<", zero).isTrue() && other.callMethod(">", zero).isTrue() || callMethod(">", zero).isTrue() && other.callMethod("<", zero).isTrue()) { return (RubyNumeric) mod.callMethod("-", other); } return mod; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyNumeric.java/buggy/src/org/jruby/RubyNumeric.java |
public void passivationNotAllowed() | protected void passivationNotAllowed() | public void passivationNotAllowed() { throw new InternalException( "Passivation should have been disabled for all Stateful Session Beans.\n" + "Please contact the Omero development team for how to ensure that passivation\n" + "is disabled on your application server."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3174c2805bbc3341f9872f4461426b51c56c6770/AbstractBean.java/clean/components/ejb/src/ome/ro/ejb/AbstractBean.java |
throw new InternalException( "Passivation should have been disabled for all Stateful Session Beans.\n" + | throw new InternalException(String.format( "Passivation should have been disabled for this Stateful Session Beans (%s).\n" + | public void passivationNotAllowed() { throw new InternalException( "Passivation should have been disabled for all Stateful Session Beans.\n" + "Please contact the Omero development team for how to ensure that passivation\n" + "is disabled on your application server."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3174c2805bbc3341f9872f4461426b51c56c6770/AbstractBean.java/clean/components/ejb/src/ome/ro/ejb/AbstractBean.java |
"is disabled on your application server."); | "is disabled on your application server.",this.getClass().getName())); | public void passivationNotAllowed() { throw new InternalException( "Passivation should have been disabled for all Stateful Session Beans.\n" + "Please contact the Omero development team for how to ensure that passivation\n" + "is disabled on your application server."); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3174c2805bbc3341f9872f4461426b51c56c6770/AbstractBean.java/clean/components/ejb/src/ome/ro/ejb/AbstractBean.java |
StatusBar(Icon statusIcon) | StatusBar(TreeViewerControl controller) | StatusBar(Icon statusIcon) { initComponents(statusIcon); buildUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
initComponents(statusIcon); | if (controller == null) throw new IllegalArgumentException("No control."); this.controller = controller; initComponents(); | StatusBar(Icon statusIcon) { initComponents(statusIcon); buildUI(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
private void initComponents(Icon statusIcon) | private void initComponents() | private void initComponents(Icon statusIcon) { progressBar = new JProgressBar(); progressBar.setIndeterminate(true); status = new JLabel(); statusButton = new JButton(statusIcon); statusButton.setBorder(null); statusButton.setBorderPainted(false); statusButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
statusButton = new JButton(statusIcon); | statusButton = new JButton(icons.getIcon(IconManager.STATUS_INFO)); | private void initComponents(Icon statusIcon) { progressBar = new JProgressBar(); progressBar.setIndeterminate(true); status = new JLabel(); statusButton = new JButton(statusIcon); statusButton.setBorder(null); statusButton.setBorderPainted(false); statusButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); | if (buttonEnabled) controller.cancel(); | private void initComponents(Icon statusIcon) { progressBar = new JProgressBar(); progressBar.setIndeterminate(true); status = new JLabel(); statusButton = new JButton(statusIcon); statusButton.setBorder(null); statusButton.setBorderPainted(false); statusButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); } }); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); | if (buttonEnabled) controller.cancel(); | public void actionPerformed(ActionEvent e) { if (buttonEnabled) firePropertyChange(CANCEL_PROPERTY, Boolean.FALSE, Boolean.TRUE); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/83e42c21eb5c1f3394496ff33c72723a58274a2a/StatusBar.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/StatusBar.java |
if (view.isLensVisible()) view.setLensPlaneImage(image); | public void setImage(BufferedImage image) { if (model.getState() != LOADING_IMAGE) throw new IllegalStateException("This method can only be invoked " + "in the LOADING_IMAGE state."); model.setImage(image); view.setStatus(getStatusText(), -1, true); view.setIconImage(model.getImageIcon()); fireStateChange(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/43f8c678f03aa7cac6a19865461c28a00cf7eb2b/ImViewerComponent.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java |
|
presentation.setDrawOnOff(drawOnOff); | private void bringUpPresentation() { presentation.setDrawOnOff(drawOnOff); presentation.deIconify(); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a3b96a253cd00c6814bf47e105ab9165c722dba6/ROIAgt.java/buggy/SRC/org/openmicroscopy/shoola/agents/roi/ROIAgt.java |
|
add(workspacePane, new GridBagConstraints(0, 9, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(4, 4, 4, 4), 0, 0)); add(statusBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 4), 0, 0)); add(alerts, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 4), 0, 0)); | add(workspacePane, new GridBagConstraints(0, 9, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 4, 4, 4), 0, 0)); add(statusBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 4, 4, 4), 0, 0)); add(alerts, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 4, 4, 4), 0, 0)); | private Workspace() { MainWindow mainWindow = SparkManager.getMainWindow(); // Add MainWindow listener mainWindow.addMainWindowListener(new MainWindowListener() { public void shutdown() { // Close all Chats. final Iterator chatRooms = SparkManager.getChatManager().getChatContainer().getAllChatRooms(); while (chatRooms.hasNext()) { final ChatRoom chatRoom = (ChatRoom)chatRooms.next(); // Leave ChatRoom SparkManager.getChatManager().getChatContainer().leaveChatRoom(chatRoom); } conferences.shutdown(); } public void mainWindowActivated() { } public void mainWindowDeactivated() { } }); // Initialize workspace pane, defaulting the tabs to the bottom. workspacePane = new SparkTabbedPane(JTabbedPane.BOTTOM); workspacePane.setActiveButtonBold(true); // Add Panels. cardLayout = new CardLayout(); cardPanel = new JPanel(cardLayout); cardPanel.setOpaque(false); cardPanel.add(WORKSPACE_PANE, this); // Setup alert Panel alertPanel.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0, true, false)); alertPanel.setBackground((Color)UIManager.get("List.background")); alerts.setContentPane(alertPanel); alerts.getTitlePane().setVisible(false); // Build default workspace this.setLayout(new GridBagLayout()); add(workspacePane, new GridBagConstraints(0, 9, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(4, 4, 4, 4), 0, 0)); add(statusBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 4), 0, 0)); add(alerts, new GridBagConstraints(0, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 4), 0, 0)); this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F12"), "showDebugger"); this.getActionMap().put("showDebugger", new AbstractAction("showDebugger") { public void actionPerformed(ActionEvent evt) { EnhancedDebuggerWindow window = EnhancedDebuggerWindow.getInstance(); window.setVisible(true); } }); // Set background setBackground(Color.white); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/13101c630904fabdd110ed5ddc78c50dc5eaaf65/Workspace.java/buggy/src/java/org/jivesoftware/spark/Workspace.java |
alerts.setVisible(true); | public void addAlert(Component comp) { alertPanel.add(comp); int comps = alertPanel.getComponentCount(); alerts.getTitlePane().setVisible(true); alerts.setTitle("Alerts (" + comps + ")"); alertPanel.invalidate(); alertPanel.validate(); alertPanel.repaint(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/13101c630904fabdd110ed5ddc78c50dc5eaaf65/Workspace.java/buggy/src/java/org/jivesoftware/spark/Workspace.java |
|
alerts.setVisible(false); | public void removeAlert(Component comp) { alertPanel.remove(comp); int comps = alertPanel.getComponentCount(); if (comps == 0) { alerts.getTitlePane().setVisible(false); } else { alerts.setTitle("Alerts (" + comps + ")"); } invalidate(); validate(); repaint(); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/13101c630904fabdd110ed5ddc78c50dc5eaaf65/Workspace.java/buggy/src/java/org/jivesoftware/spark/Workspace.java |
|
if (ruby.getClasses().getClassMap().get(id) != null) { return (RubyObject)ruby.getClasses().getClassMap().get(id); } | protected RubyObject getConstant(Ruby ruby, RubyObject self, CRefNode cref, String id) { CRefNode cbase = cref; // HACK +++ if (ruby.getClasses().getClassMap().get(id) != null) { return (RubyObject)ruby.getClasses().getClassMap().get(id); } // HACK --- while (cbase != null && cbase.getNextNode() != null) { RubyObject rubyClass = cbase.getClassValue(); if (rubyClass.isNil()) { return self.getRubyClass().getConstant(id); } else if (rubyClass.getInstanceVariables().get(id) != null) { return (RubyObject)rubyClass.getInstanceVariables().get(id); } cbase = (CRefNode)cbase.getNextNode(); } return ((RubyModule)cref.getClassValue()).getConstant(id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/d31a76ee29d5978a9bec41e3ac9134cee024bcab/ConstNode.java/buggy/org/jruby/nodes/ConstNode.java |
|
"WEB-INF/security.xml", | protected String[] getConfigLocations() { return new String[] { "WEB-INF/services.xml", "WEB-INF/dao.xml", "WEB-INF/data.xml", "WEB-INF/test/config-test.xml" }; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/00ef5f18481d04aa649d8ea20819b4b7bb9c2f28/OmeroThumbnailsBugTest.java/clean/components/server/test/org/openmicroscopy/omero/server/itests/OmeroThumbnailsBugTest.java |
|
case SELECTION: bringSelector(e); break; | public void actionPerformed(ActionEvent e) { try { int index = Integer.parseInt(e.getActionCommand()); switch (index) { case LOAD: loadImages(); break; } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+e.getActionCommand(), nfe); } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
|
attachBoxListeners(view.bar.selections, SELECTION); | private void initListeners() { attachButtonListeners(view.bar.load, LOAD); } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
|
Object[] images = null; | List images = null; | private void loadImages() { int selectedIndex = view.bar.selections.getSelectedIndex(); if (selectedIndex != index) { index = selectedIndex; Object[] images = null; switch (selectedIndex) { case ImagesPaneBar.IMAGES_IMPORTED: images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; case ImagesPaneBar.IMAGES_GROUP: images = agentCtrl.getGroupImages().toArray(); break; case ImagesPaneBar.IMAGES_SYSTEM: images = agentCtrl.getSystemImages().toArray(); break; } if (images == null) return; view.displayImages(images); loaded = true; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; | images = agentCtrl.getImportedImages(); break; | private void loadImages() { int selectedIndex = view.bar.selections.getSelectedIndex(); if (selectedIndex != index) { index = selectedIndex; Object[] images = null; switch (selectedIndex) { case ImagesPaneBar.IMAGES_IMPORTED: images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; case ImagesPaneBar.IMAGES_GROUP: images = agentCtrl.getGroupImages().toArray(); break; case ImagesPaneBar.IMAGES_SYSTEM: images = agentCtrl.getSystemImages().toArray(); break; } if (images == null) return; view.displayImages(images); loaded = true; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
images = agentCtrl.getGroupImages().toArray(); break; | images = agentCtrl.getGroupImages(); break; | private void loadImages() { int selectedIndex = view.bar.selections.getSelectedIndex(); if (selectedIndex != index) { index = selectedIndex; Object[] images = null; switch (selectedIndex) { case ImagesPaneBar.IMAGES_IMPORTED: images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; case ImagesPaneBar.IMAGES_GROUP: images = agentCtrl.getGroupImages().toArray(); break; case ImagesPaneBar.IMAGES_SYSTEM: images = agentCtrl.getSystemImages().toArray(); break; } if (images == null) return; view.displayImages(images); loaded = true; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
images = agentCtrl.getSystemImages().toArray(); break; | images = agentCtrl.getSystemImages(); break; | private void loadImages() { int selectedIndex = view.bar.selections.getSelectedIndex(); if (selectedIndex != index) { index = selectedIndex; Object[] images = null; switch (selectedIndex) { case ImagesPaneBar.IMAGES_IMPORTED: images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; case ImagesPaneBar.IMAGES_GROUP: images = agentCtrl.getGroupImages().toArray(); break; case ImagesPaneBar.IMAGES_SYSTEM: images = agentCtrl.getSystemImages().toArray(); break; } if (images == null) return; view.displayImages(images); loaded = true; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
if (images == null) return; view.displayImages(images); loaded = true; | displayListImages(images); | private void loadImages() { int selectedIndex = view.bar.selections.getSelectedIndex(); if (selectedIndex != index) { index = selectedIndex; Object[] images = null; switch (selectedIndex) { case ImagesPaneBar.IMAGES_IMPORTED: images = agentCtrl.getImportedImages().toArray(); break; case ImagesPaneBar.IMAGES_USED: images = agentCtrl.getUsedImages().toArray(); break; case ImagesPaneBar.IMAGES_GROUP: images = agentCtrl.getGroupImages().toArray(); break; case ImagesPaneBar.IMAGES_SYSTEM: images = agentCtrl.getSystemImages().toArray(); break; } if (images == null) return; view.displayImages(images); loaded = true; } } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/ImagesPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ImagesPaneManager.java |
fixnumClass.defineMethod("|", CallbackFactory.getMethod(RubyFixnum.class, "op_or", RubyInteger.class)); fixnumClass.defineMethod("^", CallbackFactory.getMethod(RubyFixnum.class, "op_xor", RubyInteger.class)); | public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); fixnumClass.includeModule(ruby.getClasses().getPrecisionModule()); fixnumClass.defineSingletonMethod("induced_from", CallbackFactory.getSingletonMethod(RubyFixnum.class, "induced_from", RubyObject.class)); fixnumClass.defineMethod("to_f", CallbackFactory.getMethod(RubyFixnum.class, "to_f")); fixnumClass.defineMethod("to_s", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("to_str", CallbackFactory.getMethod(RubyFixnum.class, "to_s")); fixnumClass.defineMethod("hash", CallbackFactory.getMethod(RubyFixnum.class, "hash")); fixnumClass.defineMethod("taint", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("freeze", CallbackFactory.getSelfMethod()); fixnumClass.defineMethod("<<", CallbackFactory.getMethod(RubyFixnum.class, "op_lshift", RubyObject.class)); fixnumClass.defineMethod(">>", CallbackFactory.getMethod(RubyFixnum.class, "op_rshift", RubyObject.class)); fixnumClass.defineMethod("+", CallbackFactory.getMethod(RubyFixnum.class, "op_plus", RubyObject.class)); fixnumClass.defineMethod("-", CallbackFactory.getMethod(RubyFixnum.class, "op_minus", RubyObject.class)); fixnumClass.defineMethod("*", CallbackFactory.getMethod(RubyFixnum.class, "op_mul", RubyObject.class)); fixnumClass.defineMethod("/", CallbackFactory.getMethod(RubyFixnum.class, "op_div", RubyObject.class)); fixnumClass.defineMethod("%", CallbackFactory.getMethod(RubyFixnum.class, "op_mod", RubyObject.class)); fixnumClass.defineMethod("**", CallbackFactory.getMethod(RubyFixnum.class, "op_pow", RubyObject.class)); fixnumClass.defineMethod("==", CallbackFactory.getMethod(RubyFixnum.class, "op_equal", RubyObject.class)); fixnumClass.defineMethod("<=>", CallbackFactory.getMethod(RubyFixnum.class, "op_cmp", RubyObject.class)); fixnumClass.defineMethod(">", CallbackFactory.getMethod(RubyFixnum.class, "op_gt", RubyObject.class)); fixnumClass.defineMethod(">=", CallbackFactory.getMethod(RubyFixnum.class, "op_ge", RubyObject.class)); fixnumClass.defineMethod("<", CallbackFactory.getMethod(RubyFixnum.class, "op_lt", RubyObject.class)); fixnumClass.defineMethod("<=", CallbackFactory.getMethod(RubyFixnum.class, "op_le", RubyObject.class)); fixnumClass.defineMethod("&", CallbackFactory.getMethod(RubyFixnum.class, "op_and", RubyObject.class)); fixnumClass.defineMethod("size", CallbackFactory.getMethod(RubyFixnum.class, "size")); fixnumClass.defineMethod("[]", CallbackFactory.getMethod(RubyFixnum.class, "aref", RubyInteger.class)); return fixnumClass; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/c5505ec7f148e23ccef642f45d2ff27f7d7483c6/RubyFixnum.java/clean/org/jruby/RubyFixnum.java |
|
listenAction.putValue(Action.NAME, "Notify when available"); | listenAction.putValue(Action.NAME, Res.getString("menuitem.alert.when.online")); | public void initialize() { // Listen for right-clicks on ContactItem final ContactList contactList = SparkManager.getWorkspace().getContactList(); final Action listenAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.add(item); } }; listenAction.putValue(Action.NAME, "Notify when available"); listenAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_ALARM_CLOCK)); final Action removeAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.remove(item); } }; removeAction.putValue(Action.NAME, "Remove notification when available"); removeAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object object, JPopupMenu popup) { if (object instanceof ContactItem) { ContactItem item = (ContactItem)object; if (item.getPresence() == null || (item.getPresence().getMode() != Presence.Mode.available && item.getPresence().getMode() != Presence.Mode.chat)) { if (contacts.contains(item)) { popup.add(removeAction); } else { popup.add(listenAction); } } } } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); // Check presence changes SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence == null || (presence.getMode() != Presence.Mode.available && presence.getMode() != Presence.Mode.chat)) { return; } String from = presence.getFrom(); final Iterator contactItems = new ArrayList(contacts).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (item.getFullJID().equals(StringUtils.parseBareAddress(from))) { contacts.remove(item); ChatManager chatManager = SparkManager.getChatManager(); ChatRoom chatRoom = chatManager.createChatRoom(item.getFullJID(), item.getNickname(), item.getFullJID()); String infoText = "**" + item.getNickname() + " is now available to chat. **"; chatRoom.getTranscriptWindow().insertNotificationMessage(infoText); Message message = new Message(); message.setFrom(item.getFullJID()); message.setBody(infoText); chatManager.getChatContainer().messageReceived(chatRoom, message); } } } }, new PacketTypeFilter(Presence.class)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/ede843505c046d47bba853e049191aedc32bd2fe/PresenceChangePlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/chat/PresenceChangePlugin.java |
removeAction.putValue(Action.NAME, "Remove notification when available"); | removeAction.putValue(Action.NAME, Res.getString("menuitem.remove.alert.when.online")); | public void initialize() { // Listen for right-clicks on ContactItem final ContactList contactList = SparkManager.getWorkspace().getContactList(); final Action listenAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.add(item); } }; listenAction.putValue(Action.NAME, "Notify when available"); listenAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_ALARM_CLOCK)); final Action removeAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.remove(item); } }; removeAction.putValue(Action.NAME, "Remove notification when available"); removeAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object object, JPopupMenu popup) { if (object instanceof ContactItem) { ContactItem item = (ContactItem)object; if (item.getPresence() == null || (item.getPresence().getMode() != Presence.Mode.available && item.getPresence().getMode() != Presence.Mode.chat)) { if (contacts.contains(item)) { popup.add(removeAction); } else { popup.add(listenAction); } } } } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); // Check presence changes SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence == null || (presence.getMode() != Presence.Mode.available && presence.getMode() != Presence.Mode.chat)) { return; } String from = presence.getFrom(); final Iterator contactItems = new ArrayList(contacts).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (item.getFullJID().equals(StringUtils.parseBareAddress(from))) { contacts.remove(item); ChatManager chatManager = SparkManager.getChatManager(); ChatRoom chatRoom = chatManager.createChatRoom(item.getFullJID(), item.getNickname(), item.getFullJID()); String infoText = "**" + item.getNickname() + " is now available to chat. **"; chatRoom.getTranscriptWindow().insertNotificationMessage(infoText); Message message = new Message(); message.setFrom(item.getFullJID()); message.setBody(infoText); chatManager.getChatContainer().messageReceived(chatRoom, message); } } } }, new PacketTypeFilter(Presence.class)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/ede843505c046d47bba853e049191aedc32bd2fe/PresenceChangePlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/chat/PresenceChangePlugin.java |
String infoText = "**" + item.getNickname() + " is now available to chat. **"; | String time = SparkManager.DATE_SECOND_FORMATTER.format(new Date()); String infoText = Res.getString("message.user.now.available.to.chat", item.getNickname(), time); | public void initialize() { // Listen for right-clicks on ContactItem final ContactList contactList = SparkManager.getWorkspace().getContactList(); final Action listenAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.add(item); } }; listenAction.putValue(Action.NAME, "Notify when available"); listenAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_ALARM_CLOCK)); final Action removeAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ContactItem item = (ContactItem)contactList.getSelectedUsers().iterator().next(); contacts.remove(item); } }; removeAction.putValue(Action.NAME, "Remove notification when available"); removeAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_DELETE)); contactList.addContextMenuListener(new ContextMenuListener() { public void poppingUp(Object object, JPopupMenu popup) { if (object instanceof ContactItem) { ContactItem item = (ContactItem)object; if (item.getPresence() == null || (item.getPresence().getMode() != Presence.Mode.available && item.getPresence().getMode() != Presence.Mode.chat)) { if (contacts.contains(item)) { popup.add(removeAction); } else { popup.add(listenAction); } } } } public void poppingDown(JPopupMenu popup) { } public boolean handleDefaultAction(MouseEvent e) { return false; } }); // Check presence changes SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence == null || (presence.getMode() != Presence.Mode.available && presence.getMode() != Presence.Mode.chat)) { return; } String from = presence.getFrom(); final Iterator contactItems = new ArrayList(contacts).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (item.getFullJID().equals(StringUtils.parseBareAddress(from))) { contacts.remove(item); ChatManager chatManager = SparkManager.getChatManager(); ChatRoom chatRoom = chatManager.createChatRoom(item.getFullJID(), item.getNickname(), item.getFullJID()); String infoText = "**" + item.getNickname() + " is now available to chat. **"; chatRoom.getTranscriptWindow().insertNotificationMessage(infoText); Message message = new Message(); message.setFrom(item.getFullJID()); message.setBody(infoText); chatManager.getChatContainer().messageReceived(chatRoom, message); } } } }, new PacketTypeFilter(Presence.class)); } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/ede843505c046d47bba853e049191aedc32bd2fe/PresenceChangePlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/chat/PresenceChangePlugin.java |
String infoText = "**" + item.getNickname() + " is now available to chat. **"; | String time = SparkManager.DATE_SECOND_FORMATTER.format(new Date()); String infoText = Res.getString("message.user.now.available.to.chat", item.getNickname(), time); | public void processPacket(Packet packet) { Presence presence = (Presence)packet; if (presence == null || (presence.getMode() != Presence.Mode.available && presence.getMode() != Presence.Mode.chat)) { return; } String from = presence.getFrom(); final Iterator contactItems = new ArrayList(contacts).iterator(); while (contactItems.hasNext()) { ContactItem item = (ContactItem)contactItems.next(); if (item.getFullJID().equals(StringUtils.parseBareAddress(from))) { contacts.remove(item); ChatManager chatManager = SparkManager.getChatManager(); ChatRoom chatRoom = chatManager.createChatRoom(item.getFullJID(), item.getNickname(), item.getFullJID()); String infoText = "**" + item.getNickname() + " is now available to chat. **"; chatRoom.getTranscriptWindow().insertNotificationMessage(infoText); Message message = new Message(); message.setFrom(item.getFullJID()); message.setBody(infoText); chatManager.getChatContainer().messageReceived(chatRoom, message); } } } | 52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/ede843505c046d47bba853e049191aedc32bd2fe/PresenceChangePlugin.java/buggy/src/java/org/jivesoftware/sparkimpl/plugin/chat/PresenceChangePlugin.java |
if (type == Collection.class) return ArrayList.class; if (type == List.class) return ArrayList.class; if (type == Map.class) return HashMap.class; if (type == Set.class) return HashSet.class; if (type == SortedSet.class) return TreeSet.class; if (type == SortedMap.class) return TreeMap.class; | protected static Class getCanonicalJavaClass(Class type) { // Replace wrapper classes with the primitive class that each // represents. if (type == Double.class) return Double.TYPE; if (type == Float.class) return Float.TYPE; if (type == Integer.class) return Integer.TYPE; if (type == Long.class) return Long.TYPE; if (type == Short.class) return Short.TYPE; if (type == Byte.class) return Byte.TYPE; if (type == Character.class) return Character.TYPE; if (type == Void.class) return Void.TYPE; if (type == Boolean.class) return Boolean.TYPE; // Replace each common interface with a concrete class that // can implement it. if (type == Collection.class) return ArrayList.class; if (type == List.class) return ArrayList.class; if (type == Map.class) return HashMap.class; if (type == Set.class) return HashSet.class; if (type == SortedSet.class) return TreeSet.class; if (type == SortedMap.class) return TreeMap.class; return type; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/05c7de156620b4e1926ea77f476287db1b42b4cc/JavaUtil.java/buggy/src/org/jruby/javasupport/JavaUtil.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.