rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
{ List pSummaries = agentCtrl.getUserProjects(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); root.removeAllChildren(); if (pSummaries != null) { Iterator i = pSummaries.iterator(); ProjectSummary ps; DefaultMutableTreeNode pNode; while (i.hasNext()) { ps = (ProjectSummary) i.next(); pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); addDatasetsToProject(ps, pNode, treeModel); } treeModel.reload(root); treeLoaded = true; } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); treeModel.insertNodeInto(childNode, root, root.getChildCount()); treeModel.reload(root); view.tree.collapsePath(new TreePath(root.getPath())); } }
{ List pSummaries = agentCtrl.getUserProjects(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); root.removeAllChildren(); if (pSummaries != null && pSummaries.size() !=0 ) { Iterator i = pSummaries.iterator(); ProjectSummary ps; DefaultMutableTreeNode pNode; while (i.hasNext()) { ps = (ProjectSummary) i.next(); pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); addDatasetsToProject(ps, pNode, treeModel); } treeModel.reload(root); treeLoaded = true; } else { treeModel.insertNodeInto(new DefaultMutableTreeNode(""), root, root.getChildCount()); treeModel.reload(root); view.tree.collapsePath(new TreePath(root.getPath())); } }
void rebuildTree() { List pSummaries = agentCtrl.getUserProjects(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); root.removeAllChildren(); if (pSummaries != null) { Iterator i = pSummaries.iterator(); ProjectSummary ps; DefaultMutableTreeNode pNode; while (i.hasNext()) { ps = (ProjectSummary) i.next(); pNode = new DefaultMutableTreeNode(ps); treeModel.insertNodeInto(pNode, root, root.getChildCount()); pNodes.put(new Integer(ps.getID()), pNode); addDatasetsToProject(ps, pNode, treeModel); } treeModel.reload(root); treeLoaded = true; } else { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(""); treeModel.insertNodeInto(childNode, root, root.getChildCount()); treeModel.reload(root); view.tree.collapsePath(new TreePath(root.getPath())); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
if (cDNodes == null) return;
if (cDNodes.size() == 0) return;
void refreshDatasetInTree(DatasetSummary ds) { if (cDNodes == null) return; List nodes = (List) cDNodes.get(new Integer(ds.getID())); if (nodes == null) return; Iterator i = nodes.iterator(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode node, childNode; List images = agentCtrl.getImages(ds.getID()); while (i.hasNext()) { node = (DefaultMutableTreeNode) i.next(); node.removeAllChildren(); if (images.size() != 0) addImagesToDataset(images, node); else { childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
void refreshDatasetInTree(DatasetSummary ds) { if (cDNodes == null) return; List nodes = (List) cDNodes.get(new Integer(ds.getID())); if (nodes == null) return; Iterator i = nodes.iterator(); DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode node, childNode; List images = agentCtrl.getImages(ds.getID()); while (i.hasNext()) { node = (DefaultMutableTreeNode) i.next(); node.removeAllChildren(); if (images.size() != 0) addImagesToDataset(images, node); else { childNode = new DefaultMutableTreeNode(EMPTY); treeModel.insertNodeInto(childNode, node, node.getChildCount()); } treeModel.reload(node); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
DefaultMutableTreeNode parent) { view.tree.expandPath(new TreePath(parent.getPath())); view.tree.scrollPathToVisible(new TreePath(child.getPath())); }
DefaultMutableTreeNode parent) { view.tree.expandPath(new TreePath(parent.getPath())); view.tree.scrollPathToVisible(new TreePath(child.getPath())); }
private void setNodeVisible(DefaultMutableTreeNode child, DefaultMutableTreeNode parent) { view.tree.expandPath(new TreePath(parent.getPath())); view.tree.scrollPathToVisible(new TreePath(child.getPath())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
{ DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode)
{ DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode)
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void updateDatasetInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; while (j.hasNext()) { ps = (ProjectSummary) j.next(); pNode = (DefaultMutableTreeNode) pNodes.get(new Integer(ps.getID())); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
if (cDNodes != null) { Iterator i = cDNodes.keySet().iterator(); Iterator j; DefaultMutableTreeNode dNode; List dNodes, images; Integer datasetID; updateImagesInDataset(is); while (i.hasNext()) { datasetID = (Integer) i.next(); images = (List) imagesInDataset.get(datasetID); dNodes = (List) cDNodes.get(datasetID); j = dNodes.iterator(); while (j.hasNext()) { dNode = (DefaultMutableTreeNode) j.next(); dNode.removeAllChildren(); addImagesToDataset(images, dNode); treeModel.reload(dNode); }
if (cDNodes.size() == 0) return; Iterator i = cDNodes.keySet().iterator(); Iterator j; DefaultMutableTreeNode dNode; List dNodes, images; Integer datasetID; updateImagesInDataset(is); while (i.hasNext()) { datasetID = (Integer) i.next(); images = (List) imagesInDataset.get(datasetID); dNodes = (List) cDNodes.get(datasetID); j = dNodes.iterator(); while (j.hasNext()) { dNode = (DefaultMutableTreeNode) j.next(); dNode.removeAllChildren(); addImagesToDataset(images, dNode); treeModel.reload(dNode);
void updateImageInTree(ImageSummary is) { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); if (cDNodes != null) { Iterator i = cDNodes.keySet().iterator(); Iterator j; DefaultMutableTreeNode dNode; List dNodes, images; Integer datasetID; //First update the images in list of expanded datasets. updateImagesInDataset(is); //Then update the tree. while (i.hasNext()) { datasetID = (Integer) i.next(); images = (List) imagesInDataset.get(datasetID); dNodes = (List) cDNodes.get(datasetID); j = dNodes.iterator(); while (j.hasNext()) { dNode = (DefaultMutableTreeNode) j.next(); dNode.removeAllChildren(); addImagesToDataset(images, dNode); treeModel.reload(dNode); } } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
{ Iterator i = imagesInDataset.keySet().iterator(); Iterator j; List images; ImageSummary is; while (i.hasNext()) { images = (List) imagesInDataset.get(i.next()); j = images.iterator(); while (j.hasNext()) { is = (ImageSummary) j.next(); if (is.getID() == retVal.getID()) { is.setName(retVal.getName()); break; } } } }
{ Iterator i = imagesInDataset.keySet().iterator(); Iterator j; List images; ImageSummary is; while (i.hasNext()) { images = (List) imagesInDataset.get(i.next()); j = images.iterator(); while (j.hasNext()) { is = (ImageSummary) j.next(); if (is.getID() == retVal.getID()) { is.setName(retVal.getName()); break; } } } }
private void updateImagesInDataset(ImageSummary retVal) { Iterator i = imagesInDataset.keySet().iterator(); Iterator j; List images; ImageSummary is; while (i.hasNext()) { images = (List) imagesInDataset.get(i.next()); j = images.iterator(); while (j.hasNext()) { is = (ImageSummary) j.next(); if (is.getID() == retVal.getID()) { is.setName(retVal.getName()); break; } } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
{ DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
{ DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
void updateProjectInTree() { DefaultTreeModel treeModel = (DefaultTreeModel) view.tree.getModel(); DefaultMutableTreeNode pNode; List pSummaries = agentCtrl.getUserProjects(); if (pSummaries != null) { Iterator j = pSummaries.iterator(); ProjectSummary ps; Integer projectID; while (j.hasNext()) { ps = (ProjectSummary) j.next(); projectID = new Integer(ps.getID()); pNode = (DefaultMutableTreeNode) pNodes.get(projectID); pNode.removeAllChildren(); addDatasets(ps.getDatasets(), pNode, false); treeModel.reload(pNode); } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0f6adad8d8ff39bdd3e4f95c09c34b2489329435/ExplorerPaneManager.java/clean/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPaneManager.java
if( usrObj instanceof ProjectSummary || usrObj instanceof DatasetSummary || usrObj instanceof ImageSummary )
if (usrObj instanceof ProjectSummary || usrObj instanceof DatasetSummary || usrObj instanceof ImageSummary)
DataObject getCurrentOMEObject() { DataObject target = null; DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node != null) { Object usrObj = node.getUserObject(); if( usrObj instanceof ProjectSummary || usrObj instanceof DatasetSummary || usrObj instanceof ImageSummary ) target = (DataObject) usrObj; } return target; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/6ec05530173229b43c3f21f0021b71fd776dd63c/ExplorerPane.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/ExplorerPane.java
TinyWindowUI(TinyWindow window, BufferedImage image)
public TinyWindowUI(TinyWindow window, BufferedImage image)
TinyWindowUI(TinyWindow window, BufferedImage image) { if (window == null) throw new NullPointerException("No window."); this.window = window; titleBar = new TitleBar(window.getTitle()); canvas = new ThumbnailCanvas(image); makeBorders(); makeComponentsSize(image); buildUI(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/11fc11c4e769e382f5279d4e21088d468940d1b6/TinyWindowUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/twindow/TinyWindowUI.java
void attachMouseListener(MouseListener controller)
public void attachMouseListener(MouseListener controller)
void attachMouseListener(MouseListener controller) { titleBar.addMouseListener(controller); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/11fc11c4e769e382f5279d4e21088d468940d1b6/TinyWindowUI.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/twindow/TinyWindowUI.java
public Experimenter(Integer attributeId, String omeName, String email, String firstname, String password, String dataDir, String lastname, String institution, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set datasets, Set groupsByLeader, Set groupsByContact, Set images, Set projects, Set moduleExecutions, Set groups) { this.attributeId = attributeId; this.omeName = omeName; this.email = email; this.firstname = firstname; this.password = password; this.dataDir = dataDir; this.lastname = lastname; this.institution = institution; this.group = group; this.moduleExecution = moduleExecution; this.datasets = datasets; this.groupsByLeader = groupsByLeader; this.groupsByContact = groupsByContact; this.images = images; this.projects = projects; this.moduleExecutions = moduleExecutions; this.groups = groups;
public Experimenter() {
public Experimenter(Integer attributeId, String omeName, String email, String firstname, String password, String dataDir, String lastname, String institution, org.openmicroscopy.omero.model.Group group, org.openmicroscopy.omero.model.ModuleExecution moduleExecution, Set datasets, Set groupsByLeader, Set groupsByContact, Set images, Set projects, Set moduleExecutions, Set groups) { this.attributeId = attributeId; this.omeName = omeName; this.email = email; this.firstname = firstname; this.password = password; this.dataDir = dataDir; this.lastname = lastname; this.institution = institution; this.group = group; this.moduleExecution = moduleExecution; this.datasets = datasets; this.groupsByLeader = groupsByLeader; this.groupsByContact = groupsByContact; this.images = images; this.projects = projects; this.moduleExecutions = moduleExecutions; this.groups = groups; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Experimenter.java/clean/components/common/src/org/openmicroscopy/omero/model/Experimenter.java
public org.openmicroscopy.omero.model.Group getGroup() {
public Group getGroup() {
public org.openmicroscopy.omero.model.Group getGroup() { return this.group; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Experimenter.java/clean/components/common/src/org/openmicroscopy/omero/model/Experimenter.java
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() {
public ModuleExecution getModuleExecution() {
public org.openmicroscopy.omero.model.ModuleExecution getModuleExecution() { return this.moduleExecution; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Experimenter.java/clean/components/common/src/org/openmicroscopy/omero/model/Experimenter.java
public void setGroup(org.openmicroscopy.omero.model.Group group) {
public void setGroup(Group group) {
public void setGroup(org.openmicroscopy.omero.model.Group group) { this.group = group; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Experimenter.java/clean/components/common/src/org/openmicroscopy/omero/model/Experimenter.java
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) {
public void setModuleExecution(ModuleExecution moduleExecution) {
public void setModuleExecution(org.openmicroscopy.omero.model.ModuleExecution moduleExecution) { this.moduleExecution = moduleExecution; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/Experimenter.java/clean/components/common/src/org/openmicroscopy/omero/model/Experimenter.java
if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)");
if(blockVar == null) { return new IRubyObject[]{value}; } if (blockVar instanceof ZeroArgNode) { if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { runtime.getWarnings().warn("multiple values for a block parameter (" + length + " for 1)");
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
} else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); }
} else if (value == null) { runtime.getWarnings().warn("multiple values for a block parameter (0 for 1)"); }
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { } } else if (value == null) { } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); }
AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc);
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
IRubyObject[] args = ArgsUtil.arrayify(value); return args;
return ArgsUtil.arrayify(value);
private IRubyObject[] getBlockArgs(IRubyObject value, IRubyObject self, boolean yieldProc, boolean aValue, Block currentBlock) { Node blockVar = currentBlock.getVar(); if (blockVar != null) { if (blockVar instanceof ZeroArgNode) { // Better not have arguments for a no-arg block. if (yieldProc && arrayLength(value) != 0) { throw runtime.newArgumentError("wrong # of arguments(" + ((RubyArray)value).getLength() + "for 0)"); } } else if (blockVar instanceof MultipleAsgnNode) { if (!aValue) { value = sValueToMRHS(value, ((MultipleAsgnNode)blockVar).getHeadNode()); } value = mAssign(self, (MultipleAsgnNode)blockVar, (RubyArray)value, yieldProc); } else { if (aValue) { int length = arrayLength(value); if (length == 0) { value = runtime.getNil(); } else if (length == 1) { value = ((RubyArray)value).first(IRubyObject.NULL_ARRAY); } else { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(" + // length + "for 1)"); } } else if (value == null) { // XXXEnebo - Should be warning not error. //throw runtime.newArgumentError("wrong # of arguments(0 for 1)"); } AssignmentVisitor.assign(this, getFrameSelf(), blockVar, value, yieldProc); } } IRubyObject[] args = ArgsUtil.arrayify(value); return args; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b87fee1b90fc7a4ff567235e2fc1387d035bbf31/ThreadContext.java/clean/src/org/jruby/runtime/ThreadContext.java
public SourcePositionFactory() { }
public SourcePositionFactory(LexerSource source) { this.source = source; }
public SourcePositionFactory() { }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/SourcePositionFactory.java/buggy/src/org/jruby/lexer/yacc/SourcePositionFactory.java
return new SourcePosition("", -1, -1, 0, 0);
return new SourcePosition("", -1, -1, 0, 0);
public ISourcePosition getDummyPosition() { return new SourcePosition("", -1, -1, 0, 0); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/SourcePositionFactory.java/buggy/src/org/jruby/lexer/yacc/SourcePositionFactory.java
public RaiseException newNameError(String message);
public RaiseException newNameError(String message, String name);
public RaiseException newNameError(String message);
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/IRuby.java/buggy/src/org/jruby/IRuby.java
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control,
CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl agentCtrl,
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
this.control = control;
this.agentCtrl = agentCtrl;
public CreateDatasetEditorManager(CreateDatasetEditor view, DataManagerCtrl control, DatasetData model, List projects) { this.control = control; this.view = view; this.model = model; selectionIndex = -1; this.projects = projects; imagesToAdd = new ArrayList(); projectsToAdd = new ArrayList(); isName = false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
showImages();
showImages(); break; case IMAGES_SELECTION: bringSelector(e); break;
public void actionPerformed(ActionEvent e) { int index = -1; try { index = Integer.parseInt(e.getActionCommand()); switch (index) { case SAVE: save(); break; case CANCEL: cancel(); break; case SELECT_PROJECT: selectProject(); break; case RESET_SELECTION_PROJECT: resetSelectionProject(); break; case SELECT_IMAGE: selectImage(); break; case RESET_SELECTION_IMAGE: resetSelectionImage(); break; case SHOW_IMAGES: showImages(); } } catch(NumberFormatException nfe) { throw new Error("Invalid Action ID "+index, nfe); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
attachBoxListeners(view.getImagesSelections(), IMAGES_SELECTION);
void initListeners() { attachButtonListener(view.getSaveButton(), SAVE); attachButtonListener(view.getCancelButton(), CANCEL); attachButtonListener(view.getSelectButton(), SELECT_PROJECT); attachButtonListener(view.getResetProjectButton(), RESET_SELECTION_PROJECT); attachButtonListener(view.getSelectImageButton(), SELECT_IMAGE); attachButtonListener(view.getResetImageButton(), RESET_SELECTION_IMAGE); attachButtonListener(view.getShowImagesButton(), SHOW_IMAGES); JTextArea nameField = view.getNameArea(); nameField.getDocument().addDocumentListener(this); nameField.addMouseListener(this); JTextArea descriptionArea = view.getDescriptionArea(); descriptionArea.getDocument().addDocumentListener(this); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
UserNotifier un = control.getRegistry().getUserNotifier();
UserNotifier un = agentCtrl.getRegistry().getUserNotifier();
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
"The dataset you wish to create must " +
"The dataset you want to create must " +
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
control.addDataset(projectsToAdd, imagesToAdd, model);
agentCtrl.addDataset(projectsToAdd, imagesToAdd, model);
private void save() { if (projectsToAdd.size() == 0) { UserNotifier un = control.getRegistry().getUserNotifier(); un.notifyInfo("Create dataset", "The dataset you wish to create must " + "be added to an existing project."); return; } model.setDescription(view.getDescriptionArea().getText()); model.setName(view.getNameArea().getText()); //update tree and forward event to DB. //forward event to DataManager. control.addDataset(projectsToAdd, imagesToAdd, model); //close widget. view.dispose(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break;
images = agentCtrl.getImportedImages(); break;
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
images = control.getGroupImages(); break;
images = agentCtrl.getGroupImages(); break;
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
images = control.getSystemImages(); break;
images = agentCtrl.getSystemImages(); break;
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
if (images == null || images.size() == 0) return; view.showImages(images);
displayListImages(images);
private void showImages() { int selectedIndex = view.getImagesSelections().getSelectedIndex(); if (selectedIndex != selectionIndex) { selectionIndex = selectedIndex; List images = null; switch (selectedIndex) { case CreateDatasetImagesPane.IMAGES_IMPORTED: images = control.getImportedImages(); break; case CreateDatasetImagesPane.IMAGES_USED: images = control.getUsedImages(); break; case CreateDatasetImagesPane.IMAGES_GROUP: images = control.getGroupImages(); break; case CreateDatasetImagesPane.IMAGES_SYSTEM: images = control.getSystemImages(); break; } if (images == null || images.size() == 0) return; view.showImages(images); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/a82d641ae8b6aae180291dcfe5e2b1c45e55ea11/CreateDatasetEditorManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/datamng/editors/dataset/CreateDatasetEditorManager.java
.exp(new Integer(3))
.exp(new Long(3))
public void testAllMethods(){ log.info( ob.allCounts() .countsFor(new Integer(1)) .noCounts() .exp(new Integer(3)) .allExps() .noLeaves() .map() ); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/PojoOptionsTest.java/clean/components/common/test/ome/util/utests/PojoOptionsTest.java
public PojoOptions exp(Integer i){
public PojoOptions exp(Long i){
public PojoOptions exp(Integer i){ options.put(EXPERIMENTER,i); return this; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0b36a8e77f5bacb7e122d76ffce01866205b09d7/PojoOptions.java/buggy/components/common/src/ome/util/builders/PojoOptions.java
CRefNode savedCref = null;
CRefNode savedCref = ruby.getCRef();
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { savedCref = ruby.getCRef(); ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java
savedCref = ruby.getCRef();
public RubyObject call(Ruby ruby, RubyObject recv, RubyId id, RubyObject[] args, boolean noSuper) { CRefNode savedCref = null; // VALUE[] localVars = null; RubyPointer argsList = new RubyPointer(args); RubyPointer localVarsList = null; ruby.getRubyScope().push(); if (getRefValue() != null) { savedCref = ruby.getCRef(); ruby.setCRef(getRefValue()); ruby.getRubyFrame().setCbase(getRefValue()); } if (getTable() != null) { // ? +++ // List tmpList = Collections.nCopies(body.nd_tbl()[0].intValue() + 1, getRuby().getNil()); // ? --- // localVarsList = new ShiftableList(new ArrayList(tmpList)); // localVarsList.set(0, body); // localVarsList.shift(1); localVarsList = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); localVarsList.set(0, this); localVarsList.inc(); ruby.getRubyScope().setLocalVars(localVarsList); ruby.getRubyScope().setLocalTbl(getTable()); } else { localVarsList = ruby.getRubyScope().getLocalVars(); ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } Node body = getNextNode(); RubyVarmap.push(ruby); // PUSH_TAG(PROT_FUNC); RubyObject result = ruby.getNil(); try { Node node = null; int i; if (body.getType() == Constants.NODE_ARGS) { node = body; body = null; } else if (body.getType() == Constants.NODE_BLOCK) { node = body.getHeadNode(); body = body.getNextNode(); } if (node != null) { if (node.getType() != Constants.NODE_ARGS) { // rb_bug("no argument-node"); } i = node.getCount(); if (i > (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + i + ")"); } if (node.getRest() == -1) { int opt = i; Node optNode = node.getOptNode(); while (optNode != null) { opt++; optNode = optNode.getNextNode(); } if (opt < (args != null ? args.length : 0)) { throw new RubyArgumentException("wrong # of arguments(" + args.length + " for " + opt + ")"); } ruby.getRubyFrame().setArgs(localVarsList != null ? localVarsList.getPointer(2) : null); } if (localVarsList != null) { if (i > 0) { localVarsList.inc(2); for (int j = 0; j < i; j++ ) { localVarsList.set(j, argsList.get(j)); } localVarsList.dec(2); } argsList.inc(i); if (node.getOptNode() != null) { Node optNode = node.getOptNode(); while (optNode != null && argsList.size() != 0) { ((AssignableNode)optNode.getHeadNode()).assign(ruby, recv, argsList.getRuby(0), true); argsList.inc(1); optNode = optNode.getNextNode(); } recv.eval(optNode); } if (node.getRest() >= 0) { RubyArray array = null; if (argsList.size() > 0) { array = RubyArray.m_newArray(ruby, argsList); } else { array = RubyArray.m_newArray(ruby, 0); } localVarsList.set(node.getRest(), array); } } } result = recv.eval(body); } catch (ReturnException rExcptn) { } RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.setCRef(savedCref); return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java
ruby.getCRef().push(module);
ruby.getCRef().push(module);
public RubyObject setupModule(Ruby ruby, RubyModule module) { // Node node = n; String file = ruby.getSourceFile(); int line = ruby.getSourceLine(); // TMP_PROTECT; RubyFrame frame = ruby.getRubyFrame(); frame.setTmp(ruby.getRubyFrame()); ruby.setRubyFrame(frame); ruby.pushClass(); ruby.setRubyClass(module); ruby.getRubyScope().push(); RubyVarmap.push(ruby); if (getTable() != null) { /*List tmp = Collections.nCopies(idTable[0].intValue() + 1, ruby.getNil()); ShiftableList vars = new ShiftableList(new ArrayList(tmp)); vars.set(0, this); vars.shift(1);*/ RubyPointer vars = new RubyPointer(ruby.getNil(), getTable().getId(0).intValue() + 1); vars.set(0, this); vars.inc(); ruby.getRubyScope().setLocalVars(vars); ruby.getRubyScope().setLocalTbl(getTable()); } else { ruby.getRubyScope().setLocalVars(null); ruby.getRubyScope().setLocalTbl(null); } ruby.getCRef().push(module); ruby.getRubyFrame().setCbase(ruby.getCRef()); // PUSH_TAG(PROT_NONE); RubyObject result = null; // if (( state = EXEC_TAG()) == 0 ) { // if (trace_func) { // call_trace_func("class", file, line, ruby_class, // ruby_frame->last_func, ruby_frame->last_class ); // } result = getNextNode() != null ? getNextNode().eval(ruby, ruby.getRubyClass()) : ruby.getNil(); // } // POP_TAG(); ruby.getCRef().pop(); RubyVarmap.pop(ruby); ruby.getRubyScope().pop(); ruby.popClass(); ruby.setRubyFrame(frame.getTmp()); // if (trace_func) { // call_trace_func("end", file, line, 0, ruby_frame->last_func, ruby_frame->last_class ); // } // if (state != 0) { // JUMP_TAG(state); // } return result; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9a05f18f2b6207bf93455d756436fe8f0002b542/ScopeNode.java/clean/org/jruby/nodes/ScopeNode.java
if (regEx == null || regEx.length() == 0) { UserNotifier un = HiViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Search", "No phrase to find."); return; }
private void performSearch() { try { int index = view.getSearchType(); String regEx = view.getSearchValue(); Pattern p = RegExFactory.createCaseInsensitivePattern(regEx); FindRegExCmd cmd = new FindRegExCmd(view.model.getParentModel(), p, index); cmd.execute(); } catch (PatternSyntaxException pse) { UserNotifier un = HiViewerAgent.getRegistry().getUserNotifier(); un.notifyInfo("Search", "The phrase contains non valid" + "characters."); view.clearSearchValue(); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/3feec30057da68977528d8509d07bff5c080fb40/CBSearchTabViewMng.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/clipboard/CBSearchTabViewMng.java
public FindRegExCmd(HiViewer model, String regEx, int index)
public FindRegExCmd(HiViewer model, Pattern pattern, int index)
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
if (regEx == null) throw new IllegalArgumentException("No regular expression.");
if (pattern == null) throw new IllegalArgumentException("No pattern.");
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
this.regEx = regEx;
this.pattern = pattern;
public FindRegExCmd(HiViewer model, String regEx, int index) { if (model == null) throw new IllegalArgumentException("No model."); if (regEx == null) throw new IllegalArgumentException("No regular expression."); if (!checkIndex(index)) throw new IllegalArgumentException("Search index not valid."); this.model = model; this.regEx = regEx; this.index = index; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
visitor = new FindRegExTitleVisitor(model, regEx);
visitor = new FindRegExTitleVisitor(model, pattern);
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
visitor = new FindRegExAnnotationVisitor(model, regEx);
visitor = new FindRegExAnnotationVisitor(model, pattern);
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx);
visitor = new FindRegExTitleAndAnnotationVisitor(model, pattern);
public void execute() { FindRegExVisitor visitor = null; switch (index) { case IN_TITLE: visitor = new FindRegExTitleVisitor(model, regEx); break; case IN_ANNOTATION: visitor = new FindRegExAnnotationVisitor(model, regEx); break; case IN_T_AND_A: visitor = new FindRegExTitleAndAnnotationVisitor(model, regEx); } if (visitor == null) return; Browser browser = model.getBrowser(); ImageDisplay selectedDisplay = browser.getSelectedDisplay(); if (selectedDisplay.getParentDisplay() == null) //root browser.accept(visitor); else { if (!(selectedDisplay instanceof ImageNode)) selectedDisplay.accept(visitor); } model.getClipBoard().setSearchResults(visitor.getFoundNodes()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/0c7517f5d0ece413452f58f3f0a071be2ccbee2e/FindRegExCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/hiviewer/cmd/FindRegExCmd.java
if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) {
if (type == ruby.getExceptions().getRuntimeError() && (info == null || info.length() == 0)) {
public void printError(RubyException excp) { if (excp == null || excp.isNil()) { return; } RubyArray backtrace = (RubyArray) excp.funcall("backtrace"); if (backtrace.isNil()) { if (ruby.getSourceFile() != null) { getErrorStream().print(ruby.getSourceFile() + ':' + ruby.getSourceLine()); } else { getErrorStream().print(ruby.getSourceLine()); } } else if (backtrace.getLength() == 0) { printErrorPos(); } else { RubyObject mesg = backtrace.entry(0); if (mesg.isNil()) { printErrorPos(); } else { getErrorStream().print(mesg); } } RubyClass type = excp.getRubyClass(); String info = excp.toString(); if (type == ruby.getExceptions().getRuntimeError() && info.length() == 0) { getErrorStream().print(": unhandled exception\n"); } else { String path = type.getClassPath().toString(); if (info.length() == 0) { getErrorStream().print(": " + path + '\n'); } else { if (path.startsWith("#")) { path = null; } String tail = null; if (info.indexOf("\n") != -1) { tail = info.substring(info.indexOf("\n") + 1); info = info.substring(0, info.indexOf("\n")); } getErrorStream().print(": " + info); if (path != null) { getErrorStream().print(" (" + path + ")\n"); } if (tail != null) { getErrorStream().print(tail + '\n'); } } } if (!backtrace.isNil()) { RubyObject[] elements = backtrace.toJavaArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof RubyString) { getErrorStream().print("\tfrom " + elements[i] + '\n'); } if (i == TRACE_HEAD && elements.length > TRACE_MAX) { getErrorStream().print("\t ... " + (elements.length - TRACE_HEAD - TRACE_TAIL) + "levels...\n"); i = elements.length - TRACE_TAIL; } } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f7702d0afbe9410b0033881bbc09af818b54c112/RubyRuntime.java/buggy/org/jruby/runtime/RubyRuntime.java
public Namespace(RubyModule namespaceModule, Namespace parent) { this.namespaceModule = namespaceModule; this.parent = parent;
public Namespace(RubyModule namespaceModule) { this(namespaceModule, null);
public Namespace(RubyModule namespaceModule, Namespace parent) { this.namespaceModule = namespaceModule; this.parent = parent; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/095520dd469b76e5c1b4ca012804294c66855e55/Namespace.java/buggy/org/jruby/runtime/Namespace.java
if (model == null)
if(model != null)
public void setModel(ThumbnailDataModel model) { if (model == null) { this.model = model; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/25bc1b3f47fa8b5a4b979f064e45af877edcc175/Thumbnail.java/buggy/SRC/org/openmicroscopy/shoola/agents/browser/images/Thumbnail.java
return new ProxyCleanupFilter().filter(null, arg0.proceed());
Object result = arg0.proceed(); if (!StatefulServiceInterface.class .isAssignableFrom( arg0.getThis().getClass())) { result = new ProxyCleanupFilter().filter(null, result); } return result;
public Object invoke(MethodInvocation arg0) throws Throwable { return new ProxyCleanupFilter().filter(null, arg0.proceed()); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d5f70f979d40e800343124ec8c28a1f184e2acc8/ProxyCleanupFilter.java/clean/components/server/src/ome/tools/hibernate/ProxyCleanupFilter.java
DataObject hierarchyObject)
DataObject hierarchyObject)
protected EditorModel(TreeViewer parentModel, int editorType, DataObject hierarchyObject) { if (parentModel == null) throw new NullPointerException("No parent model."); if (editorType != Editor.CREATE_EDITOR && editorType != Editor.PROPERTIES_EDITOR) throw new IllegalArgumentException("editor not supported."); if (hierarchyObject == null) throw new IllegalArgumentException("No Data object."); state = Editor.NEW; this.editorType = editorType; this.parentModel = parentModel; this.hierarchyObject = hierarchyObject; annotated = false; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/d5c797990d356c4ac91ebfe686270c29f4586bd6/EditorModel.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorModel.java
public ViewCmd(TreeViewer model, DataObject hierarchyObject)
public ViewCmd(TreeViewer model)
public ViewCmd(TreeViewer model, DataObject hierarchyObject) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c15bffbe5079ea04feee6747b2b93a8c8078270/ViewCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/ViewCmd.java
if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject;
public ViewCmd(TreeViewer model, DataObject hierarchyObject) { if (model == null) throw new IllegalArgumentException("No model."); this.model = model; if (hierarchyObject == null) throw new IllegalArgumentException("No hierarchyObject."); this.hierarchyObject = hierarchyObject; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c15bffbe5079ea04feee6747b2b93a8c8078270/ViewCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/ViewCmd.java
bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName()));
bus.post(new ViewImage(data.getId(), 166, data.getName()));
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c15bffbe5079ea04feee6747b2b93a8c8078270/ViewCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/ViewCmd.java
root, browser.getRootID()));
root, browser.getRootID()));
public void execute() { Browser browser = model.getSelectedBrowser(); if (browser == null) return; Object ho; if (hierarchyObject != null) ho = hierarchyObject; else { TreeImageDisplay display = browser.getSelectedDisplay(); if (display == null) return; ho = display.getUserObject(); } EventBus bus = TreeViewerAgent.getRegistry().getEventBus(); Class root = convertRootLevel(browser.getRootLevel()); if (ho instanceof ImageData) { ImageData data = (ImageData) ho; bus.post(new LoadImage(data.getId(), data.getDefaultPixels().getId(), data.getName())); } else if (ho instanceof DatasetData) bus.post(new Browse(((DatasetData) ho).getId(), Browse.DATASET, root, browser.getRootID())); else if (ho instanceof ProjectData) bus.post(new Browse(((ProjectData) ho).getId(), Browse.PROJECT, root, browser.getRootID())); else if (ho instanceof CategoryData) bus.post(new Browse(((CategoryData) ho).getId(), Browse.CATEGORY, root, browser.getRootID())); else if (ho instanceof CategoryGroupData) bus.post(new Browse(((CategoryGroupData) ho).getId(), Browse.CATEGORY_GROUP, root, browser.getRootID())); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1c15bffbe5079ea04feee6747b2b93a8c8078270/ViewCmd.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/cmd/ViewCmd.java
if (parent == null) throw new IllegalArgumentException("No parent.");
public DataObjectCreator(Editor viewer, DataObject userObject, Object parent) { super(viewer); if (userObject == null) throw new IllegalArgumentException("No object to create."); if (parent == null) throw new IllegalArgumentException("No parent."); this.parent = parent; this.userObject = userObject; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64ee7ec527da3cc538fcd8d0a21183719f854676/DataObjectCreator.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/DataObjectCreator.java
return Collections.EMPTY_LIST;
return EMPTY_LIST;
public List childNodes() { return Collections.EMPTY_LIST; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/b1293eda8454686e846e2a9837b348e2983bb423/FixnumNode.java/clean/src/org/jruby/ast/FixnumNode.java
family = QuantumFactory.LINEAR;
family = QuantumFactory.getFamily(QuantumFactory.LINEAR);
protected QuantumStrategy(QuantumDef qd, PixelsType pt) { windowStart = globalMin = 0.0; windowEnd = globalMax = 1.0; family = QuantumFactory.LINEAR; curveCoefficient = 1.0; if (qd == null) throw new NullPointerException("No quantum definition"); this.qDef = qd; if (pt == null) throw new NullPointerException("No pixel type"); this.type = pt; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
private void defineMapper(int family)
private void defineMapper(Family family)
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL:
String value = family.getValue(); verifyFamily(value); if (value.equals(QuantumFactory.LINEAR) || value.equals(QuantumFactory.POLYNOMIAL))
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: }
else if (value.equals(QuantumFactory.LOGARITHMIC)) valueMapper = new LogarithmicMap(); else if (value.equals(QuantumFactory.EXPONENTIAL)) valueMapper = new ExponentialMap();
private void defineMapper(int family) { verifyFamily(family); switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.POLYNOMIAL: valueMapper = new PolynomialMap(); break; case QuantumFactory.LOGARITHMIC: valueMapper = new LogarithmicMap(); break; case QuantumFactory.EXPONENTIAL: valueMapper = new ExponentialMap(); break; default: // never reached: verify throws exception. } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
int getFamily() { return family; }
Family getFamily() { return family; }
int getFamily() { return family; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
public void setMapping(int family, double k, boolean noiseReduction)
public void setMapping(Family family, double k, boolean noiseReduction)
public void setMapping(int family, double k, boolean noiseReduction) { defineMapper(family); this.family = family; curveCoefficient = k; this.noiseReduction = noiseReduction; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
public void setQuantizationMap(int family, double k, boolean noiseReduction)
public void setQuantizationMap(Family family, double k, boolean noiseReduction)
public void setQuantizationMap(int family, double k, boolean noiseReduction) { setMapping(family, k, noiseReduction); onWindowChange(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
private static void verifyFamily(int family)
private static void verifyFamily(String value)
private static void verifyFamily(int family) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); }
if (!value.equals(QuantumFactory.LINEAR) && !value.equals(QuantumFactory.LOGARITHMIC) && !value.equals(QuantumFactory.EXPONENTIAL) && !value.equals(QuantumFactory.POLYNOMIAL)) throw new IllegalArgumentException( "Unsupported family type: '" + value + "'");
private static void verifyFamily(int family) { switch (family) { case QuantumFactory.LINEAR: case QuantumFactory.LOGARITHMIC: case QuantumFactory.EXPONENTIAL: case QuantumFactory.POLYNOMIAL: return; default: throw new IllegalArgumentException("Unsupported family type"); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) {
if (PlaneFactory.in(type, new String[] { "int8", "uint8" })) {
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
} else if (PixelTypeHelper.in(type,
} else if (PlaneFactory.in(type,
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
} else if (PixelTypeHelper.in(type,
} else if (PlaneFactory.in(type,
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
} else if (PixelTypeHelper.in(type,
} else if (PlaneFactory.in(type,
private void verifyInterval(double min, double max) { boolean b = false; if (min <= max) { double range = max-min; if (PixelTypeHelper.in(type, new String[] { "int8", "uint8" })) { if (range < 0x100) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int16", "uint16" })) { if (range < 0x10000) b = true; } else if (PixelTypeHelper.in(type, new String[] { "int32", "uint32" })) { if (range < 0x100000000L) b = true; } else if (PixelTypeHelper.in(type, new String[] { "float", "double" })) b = true; } if (!b) throw new IllegalArgumentException("Pixel interval not supported"); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/b2d1563defffc9fa654271400d754843f42e2810/QuantumStrategy.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumStrategy.java
cacheEnabled=((Boolean)values[2]).booleanValue();
public void restoreState(FacesContext ctx, Object state) { Object values[] = (Object[]) state; super.restoreState(ctx, values[0]); headlineAsLink=((Boolean)values[1]).booleanValue(); }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/18f3f17c7d7e21ff910a232da3187e72e9de9847/ArticleItemViewer.java/clean/src/java/com/idega/block/article/component/ArticleItemViewer.java
Object values[] = new Object[2];
Object values[] = new Object[3];
public Object saveState(FacesContext ctx) { Object values[] = new Object[2]; values[0] = super.saveState(ctx); values[1] = Boolean.valueOf(headlineAsLink); return values; }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/18f3f17c7d7e21ff910a232da3187e72e9de9847/ArticleItemViewer.java/clean/src/java/com/idega/block/article/component/ArticleItemViewer.java
values[2] = Boolean.valueOf(cacheEnabled);
public Object saveState(FacesContext ctx) { Object values[] = new Object[2]; values[0] = super.saveState(ctx); values[1] = Boolean.valueOf(headlineAsLink); return values; }
57000 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57000/18f3f17c7d7e21ff910a232da3187e72e9de9847/ArticleItemViewer.java/clean/src/java/com/idega/block/article/component/ArticleItemViewer.java
protected DataLoader createHierarchyLoader()
protected DataLoader createHierarchyLoader(boolean refresh)
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/DatasetModel.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/DatasetModel.java
return new DatasetLoader(component, datasetsID);
return new DatasetLoader(component, datasetsID, refresh);
protected DataLoader createHierarchyLoader() { return new DatasetLoader(component, datasetsID); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/fb3743d6f75abbf12f788b3b2925f4a6f4606dd6/DatasetModel.java/clean/SRC/org/openmicroscopy/shoola/agents/hiviewer/view/DatasetModel.java
throws ServletException, IOException {
throws IOException {
final private void doRequest( HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { WebContext context = null; if (_problem != null) { init(); if (_problem != null) { try { resp.setContentType("text/html"); FastWriter out = getFastWriter(resp.getOutputStream(), resp.getCharacterEncoding()); out.write("<html><head><title>WebMacro Error</title></head>"); out.write("<body><h1><font color=\"red\">WebMacro Error: "); out.write("</font></h1><pre>"); out.write(_problem); out.write("</pre>"); out.write("Please contact the server administrator"); out.flush(); out.close(); } catch (Exception e) { _log.error(_problem, e); } return; } } boolean timing = false; try { context = newContext(req, resp); timing = Flags.PROFILE && context.isTiming(); if (timing) context.startTiming("WMServlet", req.getRequestURI()); Template t; try { if (timing) context.startTiming("handle"); t = handle(context); } finally { if (timing) context.stopTiming(); } if (t != null) { execute(t, context); } if (timing) context.startTiming("WMServlet.destroyContext()"); try { destroyContext(context); } finally { if (timing) context.stopTiming(); } } catch (HandlerException e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "Your handler was unable to process the request successfully " + "for some reason. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } catch (Exception e) { if (context == null) { context = _wcPrototype.newInstance(req, resp); } _log.error("Your handler failed to handle the request:" + this, e); Template tmpl = error(context, "The handler WebMacro used to handle this request failed for " + "some reason. This is likely a bug in the handler written " + "for this application. Here are the details:<p>" + "<pre>" + e + "</pre>"); execute(tmpl, context); } finally { if (timing) context.stopTiming(); context.recycle(); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/289617da402a00c35bb091baf41ccd5f8d4042c2/WMServlet.java/buggy/webmacro/src/org/webmacro/servlet/WMServlet.java
public void write(String s) throws IOException
public void write(int b) throws IOException
public void write(String s) throws IOException { this.write(s,0,s.length()); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/1ea887f7b197431dd85ca8259382755c7915dc7c/FastWriter.java/buggy/webmacro/src/org/webmacro/FastWriter.java
this.write(s,0,s.length());
if ((_cpos + 1) > CSIZE) cflush(); _cbuf[_cpos] = (char) b; _cpos++;
public void write(String s) throws IOException { this.write(s,0,s.length()); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/1ea887f7b197431dd85ca8259382755c7915dc7c/FastWriter.java/buggy/webmacro/src/org/webmacro/FastWriter.java
System.out.println("WebContext.getResponse() called!");
public final HttpServletResponse getResponse() { return _response; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/278b4a35f5c73b37a3381dc75821bfaa4d3aa3d0/WebContext.java/buggy/webmacro/src/org/webmacro/servlet/WebContext.java
return self.getRuntime().newString("tag:yaml.org,2002:map");
String className = self.getType().getName(); if("Hash".equals(className)) { return self.getRuntime().newString("tag:yaml.org,2002:map"); } else { return self.getRuntime().newString("tag:yaml.org,2002:map:" + className); }
public IRubyObject method1(ThreadContext context, IRubyObject self, IRubyObject[] args) { return self.getRuntime().newString("tag:yaml.org,2002:map"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/121d8287e0a8d27aa18bbefd10a9ebf08fe51d8d/RubyYAML.java/buggy/src/org/jruby/RubyYAML.java
return self.getRuntime().newString("tag:yaml.org,2002:seq");
String className = self.getType().getName(); if("Array".equals(className)) { return self.getRuntime().newString("tag:yaml.org,2002:seq"); } else { return self.getRuntime().newString("tag:yaml.org,2002:seq:" + className); }
public IRubyObject method9(ThreadContext context, IRubyObject self, IRubyObject[] args) { return self.getRuntime().newString("tag:yaml.org,2002:seq"); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/121d8287e0a8d27aa18bbefd10a9ebf08fe51d8d/RubyYAML.java/buggy/src/org/jruby/RubyYAML.java
IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io);
IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", new IRubyObject[]{args[0],self.getRuntime().newString("r")}); IRubyObject val = self.callMethod(context,"load", io);
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return io; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/121d8287e0a8d27aa18bbefd10a9ebf08fe51d8d/RubyYAML.java/buggy/src/org/jruby/RubyYAML.java
return io;
return val;
public IRubyObject method2(ThreadContext context, IRubyObject self, IRubyObject[] args) { //yaml_load_file IRubyObject io = self.getRuntime().getClass("File").callMethod(context,"open", args[0]); self.callMethod(context,"load", io); io.callMethod(context, "close"); return io; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/121d8287e0a8d27aa18bbefd10a9ebf08fe51d8d/RubyYAML.java/buggy/src/org/jruby/RubyYAML.java
w++;
void initStrategies(QuantumDef qd, PixelsType type, ChannelBinding[] waves) { QuantumStrategy stg; double gMin, gMax; List channels = this.metadata.getChannels(); int w = 0; Channel channel; for (Iterator i = channels.iterator(); i.hasNext();) { channel = (Channel) i.next(); stg = QuantumFactory.getStrategy(qd,type); gMin = channel.getStatsInfo().getGlobalMin().doubleValue(); gMax = channel.getStatsInfo().getGlobalMax().doubleValue(); stg.setExtent(gMin, gMax); stg.setMapping( waves[w].getFamily(), waves[w].getCoefficient().doubleValue(), waves[w].getNoiseReduction().booleanValue()); if (wavesStg[w] == null) stg.setWindow(waves[w].getInputStart().intValue(), waves[w].getInputEnd().intValue()); else stg.setWindow(wavesStg[w].getWindowStart(), wavesStg[w].getWindowEnd()); wavesStg[w] = stg; } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/79a840e814598e78717947e317f85f49fa7de784/QuantumManager.java/clean/components/rendering/src/omeis/providers/re/QuantumManager.java
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type)
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type, IPixels iPixels)
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/QuantumFactory.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumFactory.java
strg = getQuantization(qd,type);
strg = getQuantization(qd,type, iPixels);
public static QuantumStrategy getStrategy(QuantumDef qd, PixelsType type) { verifyDef(qd, type); QuantumStrategy strg = null; strg = getQuantization(qd,type); if (strg == null) throw new IllegalArgumentException("Unsupported strategy"); return strg; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/64e6d912272b039f986c1a36d1ca930cc5578578/QuantumFactory.java/buggy/components/rendering/src/omeis/providers/re/quantum/QuantumFactory.java
this(klass, methodName, (Class[])null, false, false);
this(klass, methodName, (Class[]) null, false, false);
public ReflectionCallbackMethod(Class klass, String methodName) { this(klass, methodName, (Class[])null, false, false); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i = 0; i < methodArgs.length; i++) { if (i > 0) { sb.append(", "); } String className = methodArgs[i].getClass().getName(); className = className.substring(className.lastIndexOf(".Ruby") + 5); sb.append("a"); if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') { sb.append("n"); } sb.append(className); } sb.append(")"); } sb.append(" given, "); if (args.length == 0) { sb.append("no arguments excepted."); } else { sb.append("("); for (int i = 0; i < args.length; i++) { if (i > 0) { sb.append(","); } String className = args[i].getName(); sb.append("a").append(className.substring(className.lastIndexOf(".Ruby") + 5)); } if (restArgs) { sb.append(", ..."); } sb.append(") excepted."); } return sb.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') {
if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') {
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i = 0; i < methodArgs.length; i++) { if (i > 0) { sb.append(", "); } String className = methodArgs[i].getClass().getName(); className = className.substring(className.lastIndexOf(".Ruby") + 5); sb.append("a"); if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') { sb.append("n"); } sb.append(className); } sb.append(")"); } sb.append(" given, "); if (args.length == 0) { sb.append("no arguments excepted."); } else { sb.append("("); for (int i = 0; i < args.length; i++) { if (i > 0) { sb.append(","); } String className = args[i].getName(); sb.append("a").append(className.substring(className.lastIndexOf(".Ruby") + 5)); } if (restArgs) { sb.append(", ..."); } sb.append(") excepted."); } return sb.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i = 0; i < methodArgs.length; i++) { if (i > 0) { sb.append(", "); } String className = methodArgs[i].getClass().getName(); className = className.substring(className.lastIndexOf(".Ruby") + 5); sb.append("a"); if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') { sb.append("n"); } sb.append(className); } sb.append(")"); } sb.append(" given, "); if (args.length == 0) { sb.append("no arguments excepted."); } else { sb.append("("); for (int i = 0; i < args.length; i++) { if (i > 0) { sb.append(","); } String className = args[i].getName(); sb.append("a").append(className.substring(className.lastIndexOf(".Ruby") + 5)); } if (restArgs) { sb.append(", ..."); } sb.append(") excepted."); } return sb.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
protected String getExceptedArgsString(RubyObject[] methodArgs) { StringBuffer sb = new StringBuffer(); sb.append("Wrong arguments:"); if (methodArgs.length == 0) { sb.append(" No args"); } else { sb.append(" ("); for (int i = 0; i < methodArgs.length; i++) { if (i > 0) { sb.append(", "); } String className = methodArgs[i].getClass().getName(); className = className.substring(className.lastIndexOf(".Ruby") + 5); sb.append("a"); if (className.charAt(0) == 'A' || className.charAt(0) == 'E' || className.charAt(0) == 'I' || className.charAt(0) == 'O' || className.charAt(0) == 'U') { sb.append("n"); } sb.append(className); } sb.append(")"); } sb.append(" given, "); if (args.length == 0) { sb.append("no arguments excepted."); } else { sb.append("("); for (int i = 0; i < args.length; i++) { if (i > 0) { sb.append(","); } String className = args[i].getName(); sb.append("a").append(className.substring(className.lastIndexOf(".Ruby") + 5)); } if (restArgs) { sb.append(", ..."); } sb.append(") excepted."); } return sb.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
throw new RuntimeException("NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection.");
throw new RuntimeException( "NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection.");
protected Method getMethod() { if (method == null) { try { Class[] newArgs = args; if (staticMethod) { newArgs = new Class[args.length + 2]; System.arraycopy(args, 0, newArgs, 2, args.length); newArgs[0] = Ruby.class; newArgs[1] = RubyObject.class; } method = klass.getMethod(methodName, newArgs); } catch (NoSuchMethodException nsmExcptn) { throw new RuntimeException("NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection."); } catch (SecurityException sExcptn) { throw new RuntimeException("SecurityException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection."); } } return method; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
throw new RuntimeException("SecurityException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection.");
throw new RuntimeException( "SecurityException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection.");
protected Method getMethod() { if (method == null) { try { Class[] newArgs = args; if (staticMethod) { newArgs = new Class[args.length + 2]; System.arraycopy(args, 0, newArgs, 2, args.length); newArgs[0] = Ruby.class; newArgs[1] = RubyObject.class; } method = klass.getMethod(methodName, newArgs); } catch (NoSuchMethodException nsmExcptn) { throw new RuntimeException("NoSuchMethodException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection."); } catch (SecurityException sExcptn) { throw new RuntimeException("SecurityException: Cannot get method \"" + methodName + "\" in class \"" + klass.getName() + "\" by Reflection."); } } return method; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1));
System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1));
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs));
throw new RuntimeException( "Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[]) methodArgs));
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs);
return (RubyObject) getMethod().invoke(staticMethod ? null : recv, methodArgs);
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
throw (RaiseException)itExcptn.getTargetException();
throw (RaiseException) itExcptn.getTargetException();
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
throw (RuntimeException)itExcptn.getTargetException();
throw (RuntimeException) itExcptn.getTargetException();
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java
itExcptn.getTargetException().printStackTrace(); return ruby.getNil();
itExcptn.getTargetException().printStackTrace(); return ruby.getNil();
protected RubyObject invokeMethod(RubyObject recv, Object[] methodArgs, Ruby ruby) { if (restArgs) { RubyObject[] restArray = new RubyObject[methodArgs.length - (args.length - 1)]; Object[] newMethodArgs = new Object[args.length]; try { System.arraycopy(methodArgs, args.length - 1, restArray, 0, methodArgs.length - (args.length - 1)); } catch (ArrayIndexOutOfBoundsException aioobExcptn) { throw new RuntimeException("Cannot call \"" + methodName + "\" in class \"" + klass.getName() + "\". " + getExceptedArgsString((RubyObject[])methodArgs)); } System.arraycopy(methodArgs, 0, newMethodArgs, 0, args.length - 1); newMethodArgs[args.length - 1] = restArray; methodArgs = newMethodArgs; } if (staticMethod) { Object[] newMethodArgs = new Object[methodArgs.length + 2]; System.arraycopy(methodArgs, 0, newMethodArgs, 2, methodArgs.length); newMethodArgs[0] = ruby; newMethodArgs[1] = recv; methodArgs = newMethodArgs; } try { return (RubyObject)getMethod().invoke(staticMethod ? null : recv, methodArgs); } catch (InvocationTargetException itExcptn) { if (itExcptn.getTargetException() instanceof RaiseException) { throw (RaiseException)itExcptn.getTargetException(); } else if (itExcptn.getTargetException() instanceof RuntimeException) { throw (RuntimeException)itExcptn.getTargetException(); } else { System.err.println("[ERROR] ReflectionCallback:"); itExcptn.getTargetException().printStackTrace(); return ruby.getNil(); } } catch (IllegalAccessException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } catch (IllegalArgumentException iaExcptn) { throw new RaiseException(ruby, "RuntimeError", iaExcptn.getMessage()); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/7f0711e7cbb2b441d095c8d8c0838be2b630638c/ReflectionCallbackMethod.java/clean/org/jruby/runtime/ReflectionCallbackMethod.java