rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
super(control.getReferenceFrame(), "ROI Results");
super(control.getReferenceFrame(), "ROI Results", true);
public ROIStats(ROIAgtCtrl control, Registry reg) { super(control.getReferenceFrame(), "ROI Results"); manager = new ROIStatsMng(this, control); IconManager im = IconManager.getInstance(reg); init(im); manager.attachListeners(); buildGUI(im); pack(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f84715d97fb9bad35cd75d5c742a1473fe1f109/ROIStats.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/util/ROIStats.java
private JToolBar buildBar()
private JPanel buildBar()
private JToolBar buildBar() { JToolBar bar = new JToolBar(); bar.setBorder(BorderFactory.createEtchedBorder()); bar.setFloatable(true); bar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); bar.add(save); bar.add(Box.createRigidArea(HBOX)); bar.add(close); ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f84715d97fb9bad35cd75d5c742a1473fe1f109/ROIStats.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/util/ROIStats.java
return bar;
JPanel p = new JPanel(); p.setLayout(new FlowLayout(FlowLayout.RIGHT)); p.add(bar); return p;
private JToolBar buildBar() { JToolBar bar = new JToolBar(); bar.setBorder(BorderFactory.createEtchedBorder()); bar.setFloatable(true); bar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); bar.add(save); bar.add(Box.createRigidArea(HBOX)); bar.add(close); ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f84715d97fb9bad35cd75d5c742a1473fe1f109/ROIStats.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/util/ROIStats.java
"text file."));
"text or XML file."));
private void init(IconManager im) { close = new JButton(im.getIcon(IconManager.CLOSE)); save = new JButton(im.getIcon(IconManager.SAVE)); close.setToolTipText( UIUtilities.formatToolTipText("Close the window.")); save.setToolTipText( UIUtilities.formatToo...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f84715d97fb9bad35cd75d5c742a1473fe1f109/ROIStats.java/clean/SRC/org/openmicroscopy/shoola/agents/roi/util/ROIStats.java
return getRuntime().newFixnum(toString().hashCode());
return getRuntime().newFixnum(hashCode());
public RubyFixnum hash() { return getRuntime().newFixnum(toString().hashCode()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/accd69543aeec606dd2490c5f67964fb52c543a5/RubyString.java/clean/src/org/jruby/RubyString.java
Dataset d = (Dataset) createNewData(Dataset.class); d.setID(retVal.getID()); d.setName(retVal.getName()); d.setDescription(retVal.getDescription()); updateData(d);
public void updateDataset(DatasetData retVal) { }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5466bd473afcbdaa8b3ad0642cfb46e7843a2afe/DMSAdapter.java/clean/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java
Project p = (Project) createNewData(Project.class); p.setID(retVal.getID()); p.setName(retVal.getName()); p.setDescription(retVal.getDescription()); updateData(p);
public void updateProject(ProjectData retVal) { }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5466bd473afcbdaa8b3ad0642cfb46e7843a2afe/DMSAdapter.java/clean/SRC/org/openmicroscopy/shoola/env/data/DMSAdapter.java
private UIComponent getMetadataPanel() { String path = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getFolderLocation"); String fileName = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getHeadline");// System.out.println("path = "+path+"/"+fileName+".xml"); WebDAVMetadata metadataUI = new WebDAVMetadata(path+"/"+fi...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemView.java/buggy/src/java/com/idega/block/article/component/ArticleItemView.java
WebDAVMetadata metadataUI = new WebDAVMetadata(path+"/"+fileName+".xml");
WebDAVMetadata metadataUI = new WebDAVMetadata(path+"/"+fileName+ArticleItemBean.ARTICLE_SUFFIX);
private UIComponent getMetadataPanel() { String path = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getFolderLocation"); String fileName = (String)WFUtil.invoke(ARTICLE_ITEM_BEAN_ID, "getHeadline");// System.out.println("path = "+path+"/"+fileName+".xml"); WebDAVMetadata metadataUI = new WebDAVMetadata(path+"/"+fi...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/e75e5a35d9b917c44d8a58d117a43ccf5ad660b4/ArticleItemView.java/buggy/src/java/com/idega/block/article/component/ArticleItemView.java
/* if (model.getSelectedBrowser() != null) { if (model.getSelectedBrowser().getSelectedDisplays().length > 1) { setEnabled(false); return; } } */
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { name = NAME; setEnabled(false); return; } /* if (model.getSelectedBrowser() != null) { if (model.getSelectedBrowser().getSelectedDispla...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/DeleteAction.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/DeleteAction.java
if ((ho instanceof ProjectData) || (ho instanceof CategoryGroupData)) { name = NAME;
if (ho instanceof ProjectData) { name = NAME_ROOT_P; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_ROOT_P)); setEnabled(model.isObjectWritable((DataObject) ho)); } else if (ho instanceof CategoryGroupData) { name = NAME_ROOT_CG; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTip...
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { name = NAME; setEnabled(false); return; } /* if (model.getSelectedBrowser() != null) { if (model.getSelectedBrowser().getSelectedDispla...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/DeleteAction.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/DeleteAction.java
if (p instanceof DatasetData) name = NAME_DATASET; else name = NAME_CATEGORY;
if (p instanceof DatasetData) { name = NAME_DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else { name = NAME_CATEGORY; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); }
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { name = NAME; setEnabled(false); return; } /* if (model.getSelectedBrowser() != null) { if (model.getSelectedBrowser().getSelectedDispla...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/DeleteAction.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/DeleteAction.java
public Query(QueryParameter... parameters) { this.options = options; this.qps = parameters; defineParameters(); checkParameters(); }
private Query() { /* have to have the Parameters */ }
public Query(QueryParameter... parameters) { this.options = options; this.qps = parameters; defineParameters(); checkParameters(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/Query.java/clean/components/server/src/ome/services/query/Query.java
for (int i = 0; i < qps.length; i++)
for (int i = 0; i < defs.length; i++)
protected void checkParameters(){ if (defs == null) throw new IllegalStateException( "Query parameter definitions not set."); if (qps == null) throw new IllegalArgumentException( "Null arrays "+ "are not va...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/Query.java/clean/components/server/src/ome/services/query/Query.java
model.setId(this.getId());
model.setId(new Long(this.getId()));
public boolean fill(IObject model) { model.setId(this.getId()); model.setDetails(new Details()); if (!this.isLoaded()){ model.unload(); return false; } else { for (Iterator it = this.filtered.iterator(); it.hasNext();) { model...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/73a1afa2d25923d96be1e1cc467e96ddaca80e9f/DataObject.java/clean/components/shoola-adapter/src/pojos/DataObject.java
setTitle(TITLE); setModal(true);
setProperties();
public ImgSaver(JFrame owner, ImViewer model) { super(owner); if (model == null) throw new IllegalArgumentException("No model."); this.model = model; setTitle(TITLE); setModal(true); uiDelegate = new ImgSaverUI(this); pack(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5aacd98a1cfb2219e218c87eed17b5a0f0e9738a/ImgSaver.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/util/saver/ImgSaver.java
BufferedImage.TYPE_INT_RGB);
BufferedImage.TYPE_INT_RGB);
void saveImage() { //Builds the image to display. boolean unitBar = model.isUnitBar(); String v = model.getUnitBarValue(); int s = (int) model.getUnitBarSize(); if (imageComponents == null) { int width = mainImage.getWidth(); int h = mainImage.getHeight()...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5aacd98a1cfb2219e218c87eed17b5a0f0e9738a/ImgSaver.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/util/saver/ImgSaver.java
e.printStackTrace();
ImViewerAgent.getRegistry().getLogger().error(this, e.getMessage());
private void writeImage(BufferedImage image, String n) { UserNotifier un = ImViewerAgent.getRegistry().getUserNotifier(); n += "."+format; File f = new File(n); try { if (format.equals(TIFFFilter.TIF)) { Encoder encoder = new TIFFEncoder(Factory.createImage(i...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5aacd98a1cfb2219e218c87eed17b5a0f0e9738a/ImgSaver.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/util/saver/ImgSaver.java
} if (channel instanceof AbstractSelectableChannel) { ((AbstractSelectableChannel)channel).configureBlocking(false);
public IOHandlerNio(IRuby runtime, Channel channel) throws IOException { super(runtime); String mode = ""; this.channel = channel; if (channel instanceof ReadableByteChannel) { mode += "r"; isOpen = true; } if (channel instanceof WritableByteChannel) {...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/69fa0b1be0ae2b0e938046a77771ab15ebec6d4e/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java
if (((ReadableByteChannel) channel).read(buffer) < 0) {
int bytesRead = ((ReadableByteChannel) channel).read(buffer); if (bytesRead < 0) {
public String sysread(int length) throws EOFException, BadDescriptorException, IOException { checkReadable(); checkBuffered(); ByteBuffer buffer = ByteBuffer.allocate(length); boolean eof = false; while (buffer.hasRemaining()) { if (((ReadableByteChannel) channel).read...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/69fa0b1be0ae2b0e938046a77771ab15ebec6d4e/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java
if (bytesRead == 0) { break; }
public String sysread(int length) throws EOFException, BadDescriptorException, IOException { checkReadable(); checkBuffered(); ByteBuffer buffer = ByteBuffer.allocate(length); boolean eof = false; while (buffer.hasRemaining()) { if (((ReadableByteChannel) channel).read...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/69fa0b1be0ae2b0e938046a77771ab15ebec6d4e/IOHandlerNio.java/clean/src/org/jruby/util/IOHandlerNio.java
if (lastRead == '\n') {
if (offset > 0 && buffer.charAt(offset-1) == '\n') {
public char read() { synchronized (buffer) { if (lastRead == '\n') { // The \n has already been read, but we increment on first char // of new line line++; } readIntoBuffer(); lastRead = buffer.charAt(offset++); ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/56ea311750a6deff58586137a9fa05dc3bdd35fd/AbstractLexerSource.java/buggy/src/org/ablaf/internal/lexer/AbstractLexerSource.java
if (offset > 0 && buffer.charAt(offset-1) == '\n') {
public void unread() { synchronized (buffer) { char result; if (offset > 0) { result = buffer.charAt(--offset); } else { result = 0; } lastRead = result;// todo: create a test case where this code matters (and works):// ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/56ea311750a6deff58586137a9fa05dc3bdd35fd/AbstractLexerSource.java/buggy/src/org/ablaf/internal/lexer/AbstractLexerSource.java
line--; }
public void unread() { synchronized (buffer) { char result; if (offset > 0) { result = buffer.charAt(--offset); } else { result = 0; } lastRead = result;// todo: create a test case where this code matters (and works):// ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/56ea311750a6deff58586137a9fa05dc3bdd35fd/AbstractLexerSource.java/buggy/src/org/ablaf/internal/lexer/AbstractLexerSource.java
nameArea.getDocument().addDocumentListener( new DocumentListener() {
nameAreaListener = new DocumentListener() {
private void initComponents() { tabbedPane = new JTabbedPane(); nameArea = new JTextField(); setTextAreaDefault(nameArea); descriptionArea = new MultilineLabel(); setTextAreaDefault(descriptionArea); if (model.getEditorType() == Editor.PROPERTIES_EDITOR) { nam...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bde0d9ea0ad5bcb7ca080ea7ee82bc689e6bd9da/DOBasic.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOBasic.java
});
}; nameArea.getDocument().addDocumentListener(nameAreaListener);
private void initComponents() { tabbedPane = new JTabbedPane(); nameArea = new JTextField(); setTextAreaDefault(nameArea); descriptionArea = new MultilineLabel(); setTextAreaDefault(descriptionArea); if (model.getEditorType() == Editor.PROPERTIES_EDITOR) { nam...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/bde0d9ea0ad5bcb7ca080ea7ee82bc689e6bd9da/DOBasic.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/DOBasic.java
*/
public static Criteria buildCategoryGroupCriteria(int groupID, int userID) { Criteria c = new Criteria(); c.addWantedField("Name"); c.addWantedField("Description"); c.addWantedField("CategoryList"); //wanted fields for CategoryList c.addWantedField("CategoryList", "Name"...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/73d218b1f03225366903abf43d50c4be713e767b/CategoryMapper.java/clean/SRC/org/openmicroscopy/shoola/env/data/map/CategoryMapper.java
is = new ImageSummary(); ImageMapper.buildImageSummary(classification.getImage(), is);
is = ImageMapper.buildImageSummary(classification.getImage(), null);
private static CategoryData fillCategory(CategoryGroupData gData, CategoryData proto, Category c) { CategoryData model = (CategoryData) proto.makeNew(); model.setID(c.getID()); model.setName(c.getName()); model.setDescription(c.getDescription()); mod...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/73d218b1f03225366903abf43d50c4be713e767b/CategoryMapper.java/clean/SRC/org/openmicroscopy/shoola/env/data/map/CategoryMapper.java
List getImages() { return getDatasetData().getImages(); }
List getImages() { List l = getDatasetData().getImages(); if (l == null) l = new ArrayList(); return l; }
List getImages() { return getDatasetData().getImages(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9a6c82df9be190d9173204c3d22c6d17ab56ccc0/DatasetEditorManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/DatasetEditorManager.java
IWApplicationContext iwac = iwuc.getApplicationContext();
public void load(String path) throws XmlException, IOException{ System.out.println("Attempting to load path "+path); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.cl...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/3be5b072f03b106a663adb9d9077f7370a7695b3/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
IWSlideService service = (IWSlideService)IBOLookup.getServiceInstance(iwac,IWSlideService.class);
public void load(String path) throws XmlException, IOException{ System.out.println("Attempting to load path "+path); IWUserContext iwuc = IWContext.getInstance(); IWApplicationContext iwac = iwuc.getApplicationContext(); IWSlideSession session = (IWSlideSession)IBOLookup.getSessionInstance(iwuc,IWSlideSession.cl...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/3be5b072f03b106a663adb9d9077f7370a7695b3/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
System.out.println("webdavServerURL = "+service.getWebdavServerURL()); System.out.println("webdavServletURL = "+getWebdavServletURL(iwuc)); System.out.println("Main category = "+getMainCategory());
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KE...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/3be5b072f03b106a663adb9d9077f7370a7695b3/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
System.out.println(filePath);
public void store() throws IDOStoreException{// public Boolean store() { boolean storeOk = true; clearErrorKeys(); ArticleDocument articleDoc = ArticleDocument.Factory.newInstance(); ArticleDocument.Article article = articleDoc.addNewArticle(); if (getHeadline().trim().equals("")) { addErrorKey(KE...
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/3be5b072f03b106a663adb9d9077f7370a7695b3/ArticleItemBean.java/buggy/src/java/com/idega/block/article/bean/ArticleItemBean.java
if (target instanceof RubySymbol) { target = ((RubySymbol) target).to_s(); }
public IRubyObject match(IRubyObject target) { if (target.isNil()) { return getRuntime().getFalse(); } int result = search(target, 0); return result < 0 ? getRuntime().getNil() : getRuntime().newFixnum(result); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/79e935db5c7a68676c9c113d21a3544014842401/RubyRegexp.java/clean/src/org/jruby/RubyRegexp.java
String str = RubyString.stringValue(target).toString();
String str = RubyString.stringValue(target).toString();
public int search(IRubyObject target, int pos) { String str = RubyString.stringValue(target).toString(); if (pos > str.length()) { return -1; } recompileIfNeeded(); // If nothing match then nil will be returned IRubyObject result = match(str, pos); getRunt...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/79e935db5c7a68676c9c113d21a3544014842401/RubyRegexp.java/clean/src/org/jruby/RubyRegexp.java
versionLabel.setText(VERSION+"(rev "+m.group()+")"+OMERO_VERSION);
versionLabel.setText(VERSION+OMERO_VERSION);
private void initFields() { user = new JTextField(); user.setFont(FONT); user.setForeground(FONT_COLOR); user.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); pass = new JPasswordField(); pass.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/146920a8791fff71320ced0f240b9d8f3d319a13/SplashScreenView.java/clean/SRC/org/openmicroscopy/shoola/env/ui/SplashScreenView.java
public String getName() { return _name; }
final public String getName() { return _name; }
public String getName() { return _name; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/af8b9e04f0dcb3a0994b2882f87f1d6c81e86fc1/Argument.java/buggy/webmacro/src/org/webmacro/engine/Argument.java
public Object getValue() { return _value; }
final public Object getValue() { return _value; }
public Object getValue() { return _value; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/af8b9e04f0dcb3a0994b2882f87f1d6c81e86fc1/Argument.java/buggy/webmacro/src/org/webmacro/engine/Argument.java
block.addElement(MacroAdapter.createMacro(buf.toString()));
block.addElement(MacroAdapter.createMacro(buf.toString(),bc.getEncoding()));
final public Object build(BuildContext bc) throws BuildException { Vector block = new Vector(20); StringBuffer buf = new StringBuffer(512); flatten(bc,block,buf,elements()); if (buf.length() > 0) { block.addElement(MacroAdapter.createMacro(buf.toString())); } Macro[] res...
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/BlockBuilder.java/buggy/webmacro/src/org/webmacro/engine/BlockBuilder.java
block.addElement(MacroAdapter.createMacro(buf.toString()));
block.addElement(MacroAdapter.createMacro(buf.toString(),bc.getEncoding()));
private void flatten(BuildContext bc, Vector block, StringBuffer buf, Enumeration e) throws BuildException { while(e.hasMoreElements()) { Object cur = e.nextElement(); Object o = cur; if (o instanceof BlockBuilder) { Enumeration e2 = ((BlockBuilder) o).elements...
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/BlockBuilder.java/buggy/webmacro/src/org/webmacro/engine/BlockBuilder.java
if (null == imgIds || imgIds.size() == 0) { return new HashSet(); }
public Set findCGCPaths(Set imgIds, boolean contained) { List l = containerDao.findCGCPaths(imgIds,contained); Set<CategoryGroup> s = new HashSet<CategoryGroup>(l); for (CategoryGroup cg : s){ for (Object o : cg.getCategories()){ Category c = (Category) o; c.setClassifications(null); ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b6382cda97f15631c059881b08c1708cc8b2b7d8/HierarchyBrowsingImpl.java/clean/components/server/src/org/openmicroscopy/omero/logic/HierarchyBrowsingImpl.java
v /= zoomFactor;
v *= zoomFactor;
double getUnitBarSize() { double v = unitInMicrons; if (getPixelsSizeX() > 0) v = unitInMicrons/getPixelsSizeX(); v /= zoomFactor; return v; //if (unit == -1) setUnitBarSize(5); //return unit; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/70af2b53ede1e70eb3573db44238cd870bea85cd/BrowserModel.java/clean/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserModel.java
Locale locale = (Locale) tmpl.getParam( WMConstants.TEMPLATE_LOCALE); _log.debug("TemplateLocale="+locale); if (locale != null) { setLocale(resp, locale); } String encoding = (String) tmpl.getParam( WMConstants.TEMPLATE_OUTPUT_ENCODING); if (encoding==null) { encoding = resp.getCharacterEncoding(); } _log.debug("Usi...
final protected void execute(Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming(); try { if (timing) c.startTiming("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse(); Locale locale = (Locale) t...
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c2d009387a686003be3c3f30bc84f3a302311279/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
resp.getOutputStream(), encoding);
resp.getOutputStream(), resp.getCharacterEncoding());
final protected void execute(Template tmpl, WebContext c) { FastWriter fw = null; boolean timing = Flags.PROFILE && c.isTiming(); try { if (timing) c.startTiming("Template.write", tmpl); try { HttpServletResponse resp= c.getResponse(); Locale locale = (Locale) t...
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c2d009387a686003be3c3f30bc84f3a302311279/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
ClassLoader cl = this.getClass().getClassLoader(); System.out.println("WMServlet init: classloader="+cl); if (cl == null) { return new WM(); } else { System.out.println("WMServlet init: defaults="+cl.getResource("WebMacro.defaults")); return new WM(cl); }
return new WM();
public WebMacro initWebMacro() throws InitException { ClassLoader cl = this.getClass().getClassLoader(); System.out.println("WMServlet init: classloader="+cl); if (cl == null) { return new WM(); } else { System.out.println("WMServlet init: defaults="+cl.getResource("WebMac...
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/c2d009387a686003be3c3f30bc84f3a302311279/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
System.out.println("Cobertura coverage check");
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null,
LongOpt[] longOpts = new LongOpt[6]; longOpts[0] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[1] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null, 'r'); longOpts[2] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null,
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT, null, 'd'); longOpts[3] = new LongOpt("ignore", LongOpt.REQUIRED_ARGUMENT, null, 'i'); longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l');
longOpts[3] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null, 'l'); longOpts[4] = new LongOpt("totalbranch", LongOpt.REQUIRED_ARGUMENT, null, 'B'); longOpts[5] = new LongOpt("totalline", LongOpt.REQUIRED_ARGUMENT, null, 'L');
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
Getopt g = new Getopt(getClass().getName(), args, ":b:d:i:l:",
Getopt g = new Getopt(getClass().getName(), args, ":b:B:d:l:L:r",
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
double branchCoverageRate = 0.8; double lineCoverageRate = 0.7;
File dataFile = CoverageDataFileHandler.getDefaultDataFile(); double branchCoverageRate = 0.0; double lineCoverageRate = 0.0; double totalBranchCoverageRate = 0.0; double totalLineCoverageRate = 0.0;
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
case 'd': CoverageDataFileHandler.setDefaultDataFile(g.getOptarg());
case 'B': totalBranchCoverageRate = inRangeAndDivideByOneHundred(g .getOptarg());
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
case 'i': setMinimumCoverageRate(g.getOptarg());
case 'd': dataFile = new File(g.getOptarg());
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
minimumCoverageRate = new CoverageRate(lineCoverageRate,
ProjectData projectData = CoverageDataFileHandler .loadCoverageData(dataFile); if (projectData == null) { System.err.println("Error: Unable to read from data file " + dataFile.getAbsolutePath()); System.exit(1); } if ((branchCoverageRate == 0) && (lineCoverageRate == 0) && (totalLineCoverageRate == 0) && (totalBranc...
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
ProjectData projectData = ProjectData.getGlobalProjectData(); if (logger.isInfoEnabled()) { logger.info("Coverage data has " + projectData.getNumberOfClasses() + " classes"); }
double totalLines = 0; double totalLinesCovered = 0; double totalBranches = 0; double totalBranchesCovered = 0;
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
if (logger.isInfoEnabled())
if (totalBranchCoverageRate > 0.0)
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
StringBuffer sb = new StringBuffer(); sb.append(classData.getName()); sb.append(", line: "); sb.append(percentage(classData.getLineCoverageRate())); sb.append("% ("); sb.append(percentage(classData.getLineCoverageRate())); sb.append("%), branch: "); sb.append(percentage(classData.getBranchCoverageRate())); sb.append("%...
totalBranches += classData.getNumberOfValidBranches(); totalBranchesCovered += classData.getNumberOfCoveredBranches(); } if (totalLineCoverageRate > 0.0) { totalLines += classData.getNumberOfValidLines(); totalLinesCovered += classData.getNumberOfCoveredLines(); } logger.debug("Class " + classData.getName() + ", line...
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
StringBuffer sb = new StringBuffer(); sb.append(classData.getName()); sb.append(" line coverage rate of: "); sb.append(percentage(classData.getLineCoverageRate())); sb.append("% (required: "); sb.append(percentage(coverageRate.getLineCoverageRate())); sb.append("%)"); System.out.println(sb.toString()); } if (classData...
System.err.println(classData.getName() + " failed check. Line coverage rate of " + percentage(classData.getLineCoverageRate()) + "% is below " + percentage(coverageRate.getLineCoverageRate()) + "%"); exitStatus |= 4;
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
if ((totalBranches > 0) && (totalBranchCoverageRate > (totalBranchesCovered / totalBranches))) { System.err .println("Project failed check. " + "Total branch coverage rate of " + percentage(totalBranchesCovered / totalBranches) + "% is below " + percentage(totalBranchCoverageRate) + "%"); exitStatus |= 8; } if ((tot...
public Main(String[] args) throws MalformedPatternException { Header.print(System.out); System.out.println("Cobertura coverage check"); LongOpt[] longOpts = new LongOpt[4]; longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null, 'b'); longOpts[2] = new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
Iterator i = minimumCoverageRates.entrySet().iterator(); while (i.hasNext())
Iterator iter = this.minimumCoverageRates.entrySet().iterator(); while (iter.hasNext())
CoverageRate findMinimumCoverageRate(String classname) { Iterator i = minimumCoverageRates.entrySet().iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry)i.next(); if (pm.matches(classname, (Pattern)entry.getKey())) { return (CoverageRate)entry.getValue(); } } return minimumCoverageRate; }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
Map.Entry entry = (Map.Entry)i.next();
Map.Entry entry = (Map.Entry)iter.next();
CoverageRate findMinimumCoverageRate(String classname) { Iterator i = minimumCoverageRates.entrySet().iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry)i.next(); if (pm.matches(classname, (Pattern)entry.getKey())) { return (CoverageRate)entry.getValue(); } } return minimumCoverageRate; }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
return minimumCoverageRate;
return this.minimumCoverageRate;
CoverageRate findMinimumCoverageRate(String classname) { Iterator i = minimumCoverageRates.entrySet().iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry)i.next(); if (pm.matches(classname, (Pattern)entry.getKey())) { return (CoverageRate)entry.getValue(); } } return minimumCoverageRate; }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
minimumCoverageRates.put(pc.compile(tokenizer.nextToken()),
this.minimumCoverageRates.put(pc.compile(tokenizer.nextToken()),
void setMinimumCoverageRate(String minimumCoverageRate) throws MalformedPatternException { StringTokenizer tokenizer = new StringTokenizer(minimumCoverageRate, ":"); minimumCoverageRates.put(pc.compile(tokenizer.nextToken()), new CoverageRate(inRangeAndDivideByOneHundred(tokenizer .nextToken()), inRange...
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/b5fae504c12a9486e23c38b8e2fb563abfcdacb8/Main.java/buggy/cobertura/src/net/sourceforge/cobertura/check/Main.java
if (getScopeStack().hasLocalValues()) {
if (getScopeStack().hasLocalVariables()) {
public IRubyObject getBackref() { if (getScopeStack().hasLocalValues()) { return getScopeStack().getValue(1); } return ruby.getNil(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6e143e1ded2275ed4da3449d4a13446b099f800d/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
module.defineMethod("initialize_copy", new ReflectionCallback(RubyObject.class, "initialize_copy", Arity.fixed(1)));
public static void createObjectClass(RubyClass module) { CallbackFactory callbackFactory = module.getRuntime().callbackFactory(RubyObject.class); Callback equal = callbackFactory.getMethod("equal", IRubyObject.class); module.defineMethod("==", equal); module.defineMethod("===", equal); ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4442343885cd87eb52f7b519abf1fac2bbfe523d/RubyObject.java/buggy/src/org/jruby/RubyObject.java
setInstanceVariables(new HashMap(original.getInstanceVariables()));
if (original.getInstanceVariables() != null) { setInstanceVariables(new HashMap(original.getInstanceVariables())); }
public void initCopy(IRubyObject original) { assert !isFrozen() : "frozen object (" + getMetaClass().getName() + ") allocated"; setInstanceVariables(new HashMap(original.getInstanceVariables())); callMethod("initialize_copy", original); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4442343885cd87eb52f7b519abf1fac2bbfe523d/RubyObject.java/buggy/src/org/jruby/RubyObject.java
public RubyFixnum aref(IRubyObject other) { RubyNumeric numericPosition = numericValue(other); long position = numericPosition.getLongValue();
public RubyFixnum aref(RubyNumeric other) { long position = other.getLongValue();
public RubyFixnum aref(IRubyObject other) { RubyNumeric numericPosition = numericValue(other); long position = numericPosition.getLongValue(); // Seems mighty expensive to keep creating over and over again. // How else can this be done though? if (position > BIT_SIZE) { RubyBignum bignum = RubyBignum.new...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
if (position > BIT_SIZE) { RubyBignum bignum = RubyBignum.newBignum(runtime, value); return bignum.aref(numericPosition); }
if (position > BIT_SIZE) { RubyBignum bignum = RubyBignum.newBignum(runtime, value); return bignum.aref(other); }
public RubyFixnum aref(IRubyObject other) { RubyNumeric numericPosition = numericValue(other); long position = numericPosition.getLongValue(); // Seems mighty expensive to keep creating over and over again. // How else can this be done though? if (position > BIT_SIZE) { RubyBignum bignum = RubyBignum.new...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
fixnumClass.defineMethod("<<", callbackFactory.getMethod(RubyFixnum.class, "op_lshift", IRubyObject.class)); fixnumClass.defineMethod(">>", callbackFactory.getMethod(RubyFixnum.class, "op_rshift", IRubyObject.class)); fixnumClass.defineMethod("+", callbackFactory.getMethod(RubyFixnum.class, "op_plus", IRubyObject.class...
fixnumClass.defineMethod("<<", callbackFactory.getMethod(RubyFixnum.class, "op_lshift", RubyNumeric.class)); fixnumClass.defineMethod(">>", callbackFactory.getMethod(RubyFixnum.class, "op_rshift", RubyNumeric.class)); fixnumClass.defineMethod("+", callbackFactory.getMethod(RubyFixnum.class, "op_plus", RubyNumeric.class...
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); fixnumClass.defineMethod("to_f", callbackFactory.getMethod(RubyFixnum.class, "to_f")); ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
fixnumClass.defineMethod("[]", callbackFactory.getMethod(RubyFixnum.class, "aref", IRubyObject.class));
fixnumClass.defineMethod("[]", callbackFactory.getMethod(RubyFixnum.class, "aref", RubyNumeric.class));
public static RubyClass createFixnumClass(Ruby ruby) { RubyClass fixnumClass = ruby.defineClass("Fixnum", ruby.getClasses().getIntegerClass()); CallbackFactory callbackFactory = ruby.callbackFactory(); fixnumClass.defineMethod("to_f", callbackFactory.getMethod(RubyFixnum.class, "to_f")); ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_and(IRubyObject other) { RubyNumeric otherNumeric = numericValue(other); long otherLong = otherNumeric.getTruncatedLongValue(); return newFixnum(value & otherLong);
public RubyNumeric op_and(RubyNumeric other) { return newFixnum(value & other.getTruncatedLongValue());
public RubyNumeric op_and(IRubyObject other) { RubyNumeric otherNumeric = numericValue(other); long otherLong = otherNumeric.getTruncatedLongValue(); return newFixnum(value & otherLong); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_div(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyNumeric op_div(RubyNumeric other) {
public RubyNumeric op_div(IRubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_div(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime()...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyInteger op_lshift(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyInteger op_lshift(RubyNumeric other) {
public RubyInteger op_lshift(IRubyObject num) { RubyNumeric other = numericValue(num); long width = other.getLongValue(); if (width < 0) return op_rshift(other.op_uminus()); if (value > 0) { if (width >= BIT_SIZE - 2 || value >> (BIT_SIZE - width) > 0) { RubyBignum lBigV...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_minus(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyNumeric op_minus(RubyNumeric other) {
public RubyNumeric op_minus(IRubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_minus(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRunti...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_mod(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyNumeric op_mod(RubyNumeric other) {
public RubyNumeric op_mod(IRubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_mod(other); } else if (other instanceof RubyBignum) { return RubyBignum.newBignum(getRuntime()...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_mul(IRubyObject num) { return numericValue(num).multiplyWith(this);
public RubyNumeric op_mul(RubyNumeric other) { return other.multiplyWith(this);
public RubyNumeric op_mul(IRubyObject num) { return numericValue(num).multiplyWith(this); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyInteger op_or(IRubyObject other) {
public RubyInteger op_or(RubyNumeric other) {
public RubyInteger op_or(IRubyObject other) { if (other instanceof RubyBignum) { return (RubyInteger) other.callMethod("|", this); } RubyNumeric otherNumeric = numericValue(other); return newFixnum(value | otherNumeric.getLongValue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
RubyNumeric otherNumeric = numericValue(other); return newFixnum(value | otherNumeric.getLongValue());
return newFixnum(value | other.getLongValue());
public RubyInteger op_or(IRubyObject other) { if (other instanceof RubyBignum) { return (RubyInteger) other.callMethod("|", this); } RubyNumeric otherNumeric = numericValue(other); return newFixnum(value | otherNumeric.getLongValue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_plus(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyNumeric op_plus(RubyNumeric other) {
public RubyNumeric op_plus(IRubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return ((RubyFloat)other).op_plus(this); } else if (other instanceof RubyBignum) { return ((RubyBignum)other).op_plus(this); } else { lo...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyNumeric op_pow(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyNumeric op_pow(RubyNumeric other) {
public RubyNumeric op_pow(IRubyObject num) { RubyNumeric other = numericValue(num); if (other instanceof RubyFloat) { return RubyFloat.newFloat(getRuntime(), getDoubleValue()).op_pow(other); } else { if (other.getLongValue() == 0) { return newFixnum(getRunti...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyInteger op_rshift(IRubyObject num) { RubyNumeric other = numericValue(num);
public RubyInteger op_rshift(RubyNumeric other) {
public RubyInteger op_rshift(IRubyObject num) { RubyNumeric other = numericValue(num); long width = other.getLongValue(); if (width < 0) return op_lshift(other.op_uminus()); return newFixnum(value >> width); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RubyInteger op_xor(IRubyObject other) {
public RubyInteger op_xor(RubyNumeric other) {
public RubyInteger op_xor(IRubyObject other) { if (other instanceof RubyBignum) { return (RubyInteger) other.callMethod("^", this); } RubyNumeric otherNumeric = numericValue(other); return newFixnum(value ^ otherNumeric.getLongValue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
RubyNumeric otherNumeric = numericValue(other); return newFixnum(value ^ otherNumeric.getLongValue());
return newFixnum(value ^ other.getLongValue());
public RubyInteger op_xor(IRubyObject other) { if (other instanceof RubyBignum) { return (RubyInteger) other.callMethod("^", this); } RubyNumeric otherNumeric = numericValue(other); return newFixnum(value ^ otherNumeric.getLongValue()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/RubyFixnum.java/buggy/src/org/jruby/RubyFixnum.java
public RaiseException newNameError(String message) {
public RaiseException newNameError(String message, String name) {
public RaiseException newNameError(String message) { throw new MockException(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/BaseMockRuby.java/clean/test/org/jruby/test/BaseMockRuby.java
public RaiseException newNoMethodError(String message) {
public RaiseException newNoMethodError(String message, String name) {
public RaiseException newNoMethodError(String message) { throw new MockException(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/BaseMockRuby.java/clean/test/org/jruby/test/BaseMockRuby.java
kernelModule.defineMethod("sleep", callbackFactory.getSingletonMethod(KernelModule.class, "sleep", IRubyObject.class));
kernelModule.defineMethod("sleep", callbackFactory.getSingletonMethod(KernelModule.class, "sleep", RubyNumeric.class));
public static RubyModule createKernelModule(Ruby ruby) { RubyModule kernelModule = ruby.defineModule("Kernel"); CallbackFactory callbackFactory = ruby.callbackFactory(); kernelModule.defineMethod("Array", callbackFactory.getSingletonMethod(KernelModule.class, "new_array", IRubyObject.class)); ...
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/KernelModule.java/clean/src/org/jruby/KernelModule.java
public static IRubyObject sleep(IRubyObject recv, IRubyObject seconds) {
public static IRubyObject sleep(IRubyObject recv, RubyNumeric seconds) {
public static IRubyObject sleep(IRubyObject recv, IRubyObject seconds) { try { Thread.sleep((long) (RubyNumeric.numericValue(seconds).getDoubleValue() * 1000.0)); } catch (InterruptedException iExcptn) { } return recv; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/KernelModule.java/clean/src/org/jruby/KernelModule.java
Thread.sleep((long) (RubyNumeric.numericValue(seconds).getDoubleValue() * 1000.0));
Thread.sleep((long) (seconds.getDoubleValue() * 1000.0));
public static IRubyObject sleep(IRubyObject recv, IRubyObject seconds) { try { Thread.sleep((long) (RubyNumeric.numericValue(seconds).getDoubleValue() * 1000.0)); } catch (InterruptedException iExcptn) { } return recv; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1c602493a83e2050f401fa6925ec7e9269b45e4e/KernelModule.java/clean/src/org/jruby/KernelModule.java
public VALUE nd_lit() { return (VALUE)u1; }
public RubyObject nd_lit() { return (RubyObject)u1; }
public VALUE nd_lit() { return (VALUE)u1; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a2024bddc1b8e83f4e8075d2080935c221a833fe/NODE.java/clean/org/jruby/original/NODE.java
if ( klass == null ) throw new ApiUsageException( "Class argument to find cannot be null." );
public IObject find(@NotNull final Class klass, final long id) { if ( klass == null ) throw new ApiUsageException( "Class argument to find cannot be null." ); return (IObject) getHibernateTemplate().execute(new HibernateCallback() { ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
public List findAllByExample(final IObject example, final Filter filter)
public List findAllByExample(@NotNull final IObject example, final Filter filter)
public List findAllByExample(final IObject example, final Filter filter) { if ( example == null ) throw new ApiUsageException( "Example argument to findAllByExample cannot be null."); return (List) getHibernateTemplate().execute(new HibernateCallback() { ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
if ( example == null ) throw new ApiUsageException( "Example argument to findAllByExample cannot be null.");
public List findAllByExample(final IObject example, final Filter filter) { if ( example == null ) throw new ApiUsageException( "Example argument to findAllByExample cannot be null."); return (List) getHibernateTemplate().execute(new HibernateCallback() { ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
if ( example == null ) throw new ApiUsageException( "Example argument to findByExample cannot be null.");
public IObject findByExample(@NotNull final IObject example) throws ApiUsageException { if ( example == null ) throw new ApiUsageException( "Example argument to findByExample cannot be null."); return (IObject) getHibernateTemplate().execute(new HibernateCallba...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
} catch (NonUniqueResultException nure) { throw new ApiUsageException( "Query named:\n\t"+queryName+"\n" + "has returned more than one Object\n" + "findByQuery must return a single value.\n" + "Please try findAllByQuery for queries which return Lists." );
public IObject findByQuery(@NotNull String queryName, Parameters params) throws ValidationException { // specify that we should only return a single value if possible params.getFilter().unique(); Query<IObject> q = queryFactory.lookup( queryName, params ); IObject ...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/59b11883b95c926d6706e6d30b4cdb898088683c/QueryImpl.java/buggy/components/server/src/ome/logic/QueryImpl.java
{ int b = control.getGlobalMaximum(); int c = control.getGlobalMinimum(); int y = x-tW; double a = (c-b)/ (double) rangeGraphics; int r = (int) (a*y+b); if (r < c) r = c; if (r > b) r = b; return r; }
{ int b = control.getGlobalMaximum(); int c = control.getGlobalMinimum(); int y = x-tW; double a = (c-b)/ (double) rangeGraphics; int r = (int) (a*y+b); if (r < c) r = c; if (r > b) r = b; return r; }
int convertGraphicsIntoReal(int x) { int b = control.getGlobalMaximum(); int c = control.getGlobalMinimum(); int y = x-tW; double a = (c-b)/ (double) rangeGraphics; //b/c of the way values are computed. int r = (int) (a*y+b); if (r < c) r = c; if (r > b) r = b; return r; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
{ Point p = e.getPoint(); if (dragging) { if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) {
{ Point p = e.getPoint(); if (dragging) { if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) {
public void mouseDragged(MouseEvent e) { Point p = e.getPoint(); if (dragging) { if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true; inputEndKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowSta...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowStart(curRealValue); } if (boxInputEnd.contains(p) && p.y <= maxStartInputY && p.y >= absEnd) { inputEndKnob = true; inputStartKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowEnd(curRealValue); } } }
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowStart(curRealValue); } if (boxInputEnd.contains(p) && p.y <= maxStartInputY && p.y >= absEnd) { inputEndKnob = true; inputStartKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowEnd(curRealValue); } } }
public void mouseDragged(MouseEvent e) { Point p = e.getPoint(); if (dragging) { if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true; inputEndKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowSta...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
{ Point p = e.getPoint(); if (!dragging) { dragging = true; if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true;
{ Point p = e.getPoint(); if (!dragging) { dragging = true; if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true;
public void mousePressed(MouseEvent e) { Point p = e.getPoint(); if (!dragging) { dragging = true; if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true; inputEndKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindow...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowStart(curRealValue); } if (boxInputEnd.contains(p) && p.y <= maxStartInputY && p.y >= absEnd) { inputEndKnob = true;
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowStart(curRealValue); } if (boxInputEnd.contains(p) && p.y <= maxStartInputY && p.y >= absEnd) { inputEndKnob = true;
public void mousePressed(MouseEvent e) { Point p = e.getPoint(); if (!dragging) { dragging = true; if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true; inputEndKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindow...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowEnd(curRealValue); } } }
curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindowEnd(curRealValue); } } }
public void mousePressed(MouseEvent e) { Point p = e.getPoint(); if (!dragging) { dragging = true; if (boxInputStart.contains(p) && p.y >= minEndInputY && p.y <= absStart) { inputStartKnob = true; inputEndKnob = false; curRealValue = convertGraphicsIntoReal(p.y); control.setInputWindow...
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java
{ if (inputStartKnob) control.setChannelWindowStart(curRealValue); else if (inputEndKnob) control.setChannelWindowEnd(curRealValue); dragging = false; inputStartKnob = false; inputEndKnob = false; }
{ if (inputStartKnob) control.setChannelWindowStart(curRealValue); else if (inputEndKnob) control.setChannelWindowEnd(curRealValue); dragging = false; inputStartKnob = false; inputEndKnob = false; }
public void mouseReleased(MouseEvent e) { if (inputStartKnob) control.setChannelWindowStart(curRealValue); else if (inputEndKnob) control.setChannelWindowEnd(curRealValue); dragging = false; inputStartKnob = false; inputEndKnob = false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/HistogramDialogManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/HistogramDialogManager.java