rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
BasicTreeUI.this.tree.repaint(); | public void treeCollapsed(TreeExpansionEvent event) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
|
BasicTreeUI.this.tree.repaint(); | public void treeExpanded(TreeExpansionEvent event) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
|
(DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); | (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); | protected TreeCellEditor createDefaultCellEditor() { return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm .getHeight()); | return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); } return null; | private Rectangle getCellBounds(int x, int y, Object cell) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(tree.getFont()); return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s), fm .getHeight()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
return new Dimension(200, 900); | return getPreferredSize(c); | public Dimension getMaximumSize(JComponent c) { // FIXME: not implemented return new Dimension(200, 900); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
return new Dimension(200, 900); | return getPreferredSize(c); | public Dimension getMinimumSize(JComponent c) { // FIXME: not implemented return new Dimension(200, 900); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); | DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel()) .getRoot()); | public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } if (pathForRow == null) return null; return new TreePath(pathForRow.getPath()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
{ if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } if (pathForRow == null) return null; return new TreePath(pathForRow.getPath()); } | node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(node.getPath()); } | public TreePath getPathForRow(JTree tree, int row) { // FIXME: check visibility when expand/collapse is implemented DefaultMutableTreeNode pathForRow = ((DefaultMutableTreeNode) (tree .getModel()).getRoot()); for (int i = 0; i < row; i++) { if (pathForRow != null) pathForRow = pathForRow.getNextNode(); } if (pathForRow == null) return null; return new TreePath(pathForRow.getPath()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
return treeState.getRowCount(); | DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel()) .getRoot()); int count = 0; while (node != null) { count++; node = getNextVisibleNode(node); } return count; | public int getRowCount(JTree tree) { return treeState.getRowCount(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) | protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) | protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) { // FIXME: not implemented } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
return false; | TreePath pathForRow = getPathForRow(tree, row); if (pathForRow == null) return true; Object node = pathForRow.getLastPathComponent(); if (node instanceof TreeNode) return ((TreeNode) node).isLeaf(); else return true; | protected boolean isLeaf(int row) { return false; // FIXME: not implemented } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); | TreePath curr = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(curr); | private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, leaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, false, true, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
.getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, leaf)); | .getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, leaf)); | private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, leaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, false, true, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, false, true, 0, false); | Component c = tree.getCellRenderer().getTreeCellRendererComponent( tree, leaf, false, false, true, 0, false); | private void paintLeaf(Graphics g, int x, int y, JTree tree, Object leaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) leaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, leaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, leaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, leaf, false, false, true, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); | TreePath curr = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(curr); boolean expanded = tree.isExpanded(curr); | private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, nonLeaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, false, false, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
.getTreeCellRendererComponent(tree, nonLeaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, nonLeaf)); | .getTreeCellRendererComponent(tree, nonLeaf, true, expanded, false, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, nonLeaf)); | private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, nonLeaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, false, false, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, false, false, 0, false); | Component c = tree.getCellRenderer().getTreeCellRendererComponent( tree, nonLeaf, false, expanded, false, 0, false); | private void paintNonLeaf(Graphics g, int x, int y, JTree tree, Object nonLeaf) { TreePath tp = new TreePath(((DefaultMutableTreeNode) nonLeaf).getPath()); boolean selected = tree.isPathSelected(tp); if (selected) { Component comp = tree.getCellRenderer() .getTreeCellRendererComponent(tree, nonLeaf, true, false, true, 0, false); rendererPane.paintComponent(g, comp, tree, getCellBounds(x, y, nonLeaf)); } else { Component c = tree.getCellRenderer().getTreeCellRendererComponent(tree, nonLeaf, false, false, false, 0, false); g.translate(x, y); c.paint(g); g.translate(-x, -y); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
} else | } else | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); | heightOfLine = descent + halfHeight; g.drawLine(indentation + halfWidth, heightOfLine, indentation + rightChildIndent, heightOfLine); | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
int y1 = descent - halfHeight; if (y0 != y1) | if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) curr) .getPath()))) if (y0 != heightOfLine) | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); | g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, heightOfLine); | private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
private int paintRecursive(Graphics g, int indentation, int descent, int childNumber, int depth, JTree tree, TreeModel mod, Object curr) { Rectangle clip = g.getClipBounds(); if (indentation > clip.x + clip.width + rightChildIndent || descent > clip.y + clip.height + getRowHeight()) return descent; int halfHeight = getRowHeight() / 2; int halfWidth = rightChildIndent / 2; int y0 = descent + halfHeight; if (mod.isLeaf(curr)) { paintLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); } else { if (depth > 0 || tree.isRootVisible()) { paintNonLeaf(g, indentation, descent, tree, curr); descent += getRowHeight(); y0 += halfHeight; } int max = mod.getChildCount(curr); for (int i = 0; i < max; ++i) { g.setColor(getHashColor()); g.drawLine(indentation + halfWidth, descent + halfHeight, indentation + rightChildIndent, descent + halfHeight); descent = paintRecursive(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(curr, i)); } } int y1 = descent - halfHeight; if (y0 != y1) { g.setColor(getHashColor()); g .drawLine(indentation + halfWidth, y0, indentation + halfWidth, y1); } return descent; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java |
||
final Point screen = new Point(location); final Component parent = component.getParent(); if (parent != null) { final Point parentScreen = parent.getLocationOnScreen(); screen.translate(parentScreen.x, parentScreen.y); } return screen; } | return computeLocationOnScreen(component); } | public Point getLocationOnScreen() { final Point screen = new Point(location); final Component parent = component.getParent(); if (parent != null) { final Point parentScreen = parent.getLocationOnScreen(); screen.translate(parentScreen.x, parentScreen.y); } return screen; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ae9db4fc68ede9647d01b988919ce05ed61bf034/SwingComponentPeer.java/buggy/gui/src/awt/org/jnode/awt/swingpeers/SwingComponentPeer.java |
public Image createImage(ImageProducer producer) { return new JNodeImage(producer); | public Image createImage(byte[] data, int offset, int len) { if (len >= 4 && data[offset + 0] == 'G' && data[offset + 1] == 'I' && data[offset + 2] == 'F' && data[offset + 3] == '8') { try { return createImage(new GIFDecoder(new ByteArrayInputStream( data, offset, len))); } catch (LinkageError err) { } } return new ErrorImage(); | public Image createImage(ImageProducer producer) { return new JNodeImage(producer); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java |
else string = getClass ().getName () + "[" + paramString () + "] on " + source; | public String toString () { String string = null; if (source instanceof Component) string = getClass ().getName () + "[" + paramString () + "] on " + ((Component) source).getName (); else if (source instanceof MenuComponent) string = getClass ().getName () + "[" + paramString () + "] on " + ((MenuComponent) source).getName (); return string; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/AWTEvent.java/buggy/core/src/classpath/java/java/awt/AWTEvent.java |
|
void setEventMask (long mask); | void setEventMask(long mask); | void setEventMask (long mask); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/ComponentPeer.java/buggy/core/src/classpath/java/java/awt/peer/ComponentPeer.java |
private void jbInit() throws Exception { changes = new PropertyChangeSupport(this); Dimension ps = null; // fonts Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); // define fonts panel final JPanel fp = new JPanel(); fp.setLayout(new BorderLayout()); JPanel flp = new JPanel(); TitledBorder tb = BorderFactory.createTitledBorder(LangTool.getString("sa.font")); flp.setBorder(tb); fontsList = new JComboBox(); String font = getStringProperty("font"); for (int x = 0; x < fonts.length; x++) { if (fonts[x].getFontName().indexOf('.') < 0) fontsList.addItem(fonts[x].getFontName()); } fontsList.setSelectedItem(font); flp.add(fontsList);// NumberFormat nf = NumberFormat.getNumberInstance();// ((DecimalFormat)nf).setPositiveSuffix(" ");// ((DecimalFormat)nf).setMaximumFractionDigits(1);// ((DecimalFormat)nf).setMinimumFractionDigits(1); JPanel fsp = new JPanel(); fsp.setLayout(new AlignLayout(2,5,5)); tb = BorderFactory.createTitledBorder(LangTool.getString("sa.scaleLabel")); fsp.setBorder(tb); verticalScale = new JTextField("1.2",5); horizontalScale = new JTextField("1.0",5); pointSize = new JTextField("0",5); if (getStringProperty("fontScaleWidth").length() != 0) horizontalScale.setText(getStringProperty("fontScaleWidth")); if (getStringProperty("fontScaleHeight").length() != 0) verticalScale.setText(getStringProperty("fontScaleHeight")); if (getStringProperty("fontPointSize").length() != 0) pointSize.setText(getStringProperty("fontPointSize")); fsp.add(new JLabel(LangTool.getString("sa.fixedPointSize"))); fsp.add(pointSize); fsp.add(new JLabel(LangTool.getString("sa.horScaleLabel"))); fsp.add(horizontalScale); fsp.add(new JLabel(LangTool.getString("sa.vertScaleLabel"))); fsp.add(verticalScale); fp.add(flp,BorderLayout.NORTH); fp.add(fsp,BorderLayout.SOUTH); // define colors panel final JPanel cpp = new JPanel(); cpp.setLayout(new BorderLayout()); JPanel cp = new JPanel(); cp.setLayout(new BorderLayout()); JPanel cschp = new JPanel(); tb = BorderFactory.createTitledBorder(LangTool.getString("sa.colorSchema")); cschp.setBorder(tb); colorSchemaList = new JComboBox(); loadSchemas(colorSchemaList); colorSchemaList.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); Object obj = cb.getSelectedItem(); if (obj instanceof Schema) { System.out.println(" we got a schema "); colorSchema = (Schema)obj; } else { colorSchema = null; } } }); cschp.add(colorSchemaList); tb = BorderFactory.createTitledBorder(LangTool.getString("sa.colors")); cp.setBorder(tb); colorList = new JComboBox(); colorList.addItem(LangTool.getString("sa.bg")); colorList.addItem(LangTool.getString("sa.blue")); colorList.addItem(LangTool.getString("sa.red")); colorList.addItem(LangTool.getString("sa.pink")); colorList.addItem(LangTool.getString("sa.green")); colorList.addItem(LangTool.getString("sa.turq")); colorList.addItem(LangTool.getString("sa.yellow")); colorList.addItem(LangTool.getString("sa.white")); colorList.addItem(LangTool.getString("sa.guiField")); colorList.addItem(LangTool.getString("sa.cursorColor")); colorList.addItem(LangTool.getString("sa.columnSep")); colorList.addItem(LangTool.getString("sa.hexAttrColor")); jcc = new JColorChooser(); // set the default color for display as that being for back ground jcc.setColor(getColorProperty("colorBg")); colorList.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox)e.getSource(); String newSelection = (String)cb.getSelectedItem(); if (newSelection.equals(LangTool.getString("sa.bg"))) { jcc.setColor(getColorProperty("colorBg")); } if (newSelection.equals(LangTool.getString("sa.blue"))) { jcc.setColor(getColorProperty("colorBlue")); } if (newSelection.equals(LangTool.getString("sa.red"))) { jcc.setColor(getColorProperty("colorRed")); } if (newSelection.equals(LangTool.getString("sa.pink"))) { jcc.setColor(getColorProperty("colorPink")); } if (newSelection.equals(LangTool.getString("sa.green"))) { jcc.setColor(getColorProperty("colorGreen")); } if (newSelection.equals(LangTool.getString("sa.turq"))) { jcc.setColor(getColorProperty("colorTurq")); } if (newSelection.equals(LangTool.getString("sa.yellow"))) { jcc.setColor(getColorProperty("colorYellow")); } if (newSelection.equals(LangTool.getString("sa.white"))) { jcc.setColor(getColorProperty("colorWhite")); } if (newSelection.equals(LangTool.getString("sa.guiField"))) { jcc.setColor(getColorProperty("colorGUIField",Color.white)); } if (newSelection.equals(LangTool.getString("sa.cursorColor"))) { jcc.setColor(getColorProperty("colorCursor", getColorProperty("colorBg"))); } if (newSelection.equals(LangTool.getString("sa.columnSep"))) { jcc.setColor(getColorProperty("colorSep", getColorProperty("colorWhite"))); } if (newSelection.equals(LangTool.getString("sa.hexAttrColor"))) { jcc.setColor(getColorProperty("colorHexAttr", getColorProperty("colorWhite"))); } } }); cp.add(colorList,BorderLayout.NORTH); cp.add(jcc,BorderLayout.CENTER); cpp.add(cschp,BorderLayout.NORTH); cpp.add(cp,BorderLayout.CENTER); // define display panel final JPanel display = new JPanel(); display.setLayout(new BoxLayout(display,BoxLayout.Y_AXIS)); // define column separator panel JPanel csp = new JPanel(); tb = BorderFactory.createTitledBorder(LangTool.getString("sa.cs")); csp.setBorder(tb); csLine = new JRadioButton(LangTool.getString("sa.csLine")); csLine.setActionCommand("Line"); csDot = new JRadioButton(LangTool.getString("sa.csDot")); csDot.setActionCommand("Dot"); csShortLine = new JRadioButton(LangTool.getString("sa.csShortLine")); csShortLine.setActionCommand("ShortLine"); // Group the radio buttons. ButtonGroup csGroup = new ButtonGroup(); csGroup.add(csLine); csGroup.add(csDot); csGroup.add(csShortLine); if (getStringProperty("colSeparator").equals("Dot")) csDot.setSelected(true); else if (getStringProperty("colSeparator").equals("ShortLine")) csShortLine.setSelected(true); else csLine.setSelected(true); csp.add(csLine); csp.add(csDot); csp.add(csShortLine); // define show attributs panel JPanel sap = new JPanel(); sap.setBorder( BorderFactory.createTitledBorder(LangTool.getString("sa.showAttr"))); saNormal = new JRadioButton(LangTool.getString("sa.showNormal")); saNormal.setActionCommand("Normal"); JRadioButton saHex = new JRadioButton(LangTool.getString("sa.showHex")); saHex.setActionCommand("Hex"); // Group the radio buttons. ButtonGroup saGroup = new ButtonGroup(); saGroup.add(saNormal); saGroup.add(saHex); if (getStringProperty("showAttr").equals("Hex")) saHex.setSelected(true); else saNormal.setSelected(true); sap.add(saNormal); sap.add(saHex); // define gui panel JPanel cgp = new JPanel(); cgp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.cgp"))); cgp.setLayout(new AlignLayout(1,5,5));// cgp.setLayout(new BoxLayout(cgp,BoxLayout.Y_AXIS)); guiCheck = new JCheckBox(LangTool.getString("sa.guiCheck")); guiShowUnderline = new JCheckBox(LangTool.getString("sa.guiShowUnderline")); if (getStringProperty("guiInterface").equals("Yes")) guiCheck.setSelected(true); // since this is a new property added then it might not exist in existing // profiles and it should be defaulted to yes. String under = getStringProperty("guiShowUnderline"); if (under.equals("Yes") || under.length() == 0) guiShowUnderline.setSelected(true); cgp.add(guiCheck); cgp.add(guiShowUnderline); display.add(csp); display.add(sap); display.add(cgp); // define cursor panel final JPanel cuPanel = new JPanel(); cuPanel.setLayout(new BoxLayout(cuPanel,BoxLayout.Y_AXIS)); // define cursor size panel JPanel crp = new JPanel(); crp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.crsSize"))); cFull = new JRadioButton(LangTool.getString("sa.cFull")); cHalf = new JRadioButton(LangTool.getString("sa.cHalf")); cLine = new JRadioButton(LangTool.getString("sa.cLine")); // Group the radio buttons. ButtonGroup cGroup = new ButtonGroup(); cGroup.add(cFull); cGroup.add(cHalf); cGroup.add(cLine); int cursorSize = 0; if (getStringProperty("cursorSize").equals("Full")) cursorSize = 2; if (getStringProperty("cursorSize").equals("Half")) cursorSize = 1; switch (cursorSize) { case 0: cLine.setSelected(true); break; case 1: cHalf.setSelected(true); break; case 2: cFull.setSelected(true); break; } crp.add(cFull); crp.add(cHalf); crp.add(cLine); // define cursor ruler panel JPanel chp = new JPanel(); chp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.crossHair"))); chNone = new JRadioButton(LangTool.getString("sa.chNone")); chHorz = new JRadioButton(LangTool.getString("sa.chHorz")); chVert = new JRadioButton(LangTool.getString("sa.chVert")); chCross = new JRadioButton(LangTool.getString("sa.chCross")); // Group the radio buttons. ButtonGroup chGroup = new ButtonGroup(); chGroup.add(chNone); chGroup.add(chHorz); chGroup.add(chVert); chGroup.add(chCross); int crossHair = 0; if (getStringProperty("crossHair").equals("Horz")) crossHair = 1; if (getStringProperty("crossHair").equals("Vert")) crossHair = 2; if (getStringProperty("crossHair").equals("Both")) crossHair = 3; switch (crossHair) { case 0: chNone.setSelected(true); break; case 1: chHorz.setSelected(true); break; case 2: chVert.setSelected(true); break; case 3: chCross.setSelected(true); break; } chp.add(chNone); chp.add(chHorz); chp.add(chVert); chp.add(chCross); // define double click as enter JPanel rulerFPanel = new JPanel(); rulerFPanel.setBorder(BorderFactory.createTitledBorder("")); rulerFixed = new JCheckBox(LangTool.getString("sa.rulerFixed")); rulerFPanel.add(rulerFixed); cuPanel.add(crp); cuPanel.add(chp); cuPanel.add(rulerFPanel); // define onConnect panel final JPanel onConnect = new JPanel(); onConnect.setLayout(new BoxLayout(onConnect,BoxLayout.Y_AXIS)); // define onConnect macro to run JPanel ocMacrop = new JPanel(); ocMacrop.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.connectMacro"))); connectMacro = new JTextField(); connectMacro.setColumns(30); // check if double click sends enter connectMacro.setText(getStringProperty("connectMacro")); ocMacrop.add(connectMacro); onConnect.add(ocMacrop); // define mouse panel final JPanel mouse = new JPanel(); mouse.setLayout(new BoxLayout(mouse,BoxLayout.Y_AXIS)); // define double click as enter JPanel dcep = new JPanel(); dcep.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.doubleClick"))); dceCheck = new JCheckBox(LangTool.getString("sa.sendEnter")); // check if double click sends enter dceCheck.setSelected(getStringProperty("doubleClick").equals("Yes")); dcep.add(dceCheck); mouse.add(dcep); // define hotspot panel final JPanel hotspot = new JPanel(); hotspot.setLayout(new BoxLayout(hotspot,BoxLayout.Y_AXIS)); // define hsPanel panel JPanel hsp = new JPanel(); hsp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.hsp"))); hsCheck = new JCheckBox(LangTool.getString("sa.hsCheck")); if (getStringProperty("hotspots").equals("Yes")) hsCheck.setSelected(true); hsp.add(hsCheck); // define assignment panel JPanel hsap = new JPanel(); hsap.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.hsap"))); hsap.setLayout(new GridLayout(2,2)); JLabel moreLabel = new JLabel(LangTool.getString("sa.hsMore")); JLabel bottomLabel = new JLabel(LangTool.getString("sa.hsBottom")); hsMore = new JTextField(getStringProperty("hsMore")); hsBottom = new JTextField(getStringProperty("hsBottom")); hsap.add(moreLabel); hsap.add(hsMore); hsap.add(bottomLabel); hsap.add(hsBottom); hotspot.add(hsp); hotspot.add(hsap); // define Key Pad panel final JPanel kp = new JPanel(); kp.setLayout(new BoxLayout(kp,BoxLayout.Y_AXIS)); // define kpPanel panel JPanel kpp = new JPanel(); kpp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.kpp"))); kpCheck = new JCheckBox(LangTool.getString("sa.kpCheck")); if (getStringProperty("keypad").equals("Yes")) kpCheck.setSelected(true); kpp.add(kpCheck); kp.add(kpp); // define default final JPanel jp = new JPanel(); jp.add(cpp,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); //Create the nodes. DefaultMutableTreeNode top = new DefaultMutableTreeNode(fileName); createNodes(top); //Create a tree that allows one selection at a time. final JTree tree = new JTree(top); tree.getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION); //Listen for when the selection changes. tree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node == null) return; Object nodeInfo = node.getUserObject(); if (nodeInfo.toString().equals(LangTool.getString("sa.nodeFonts"))) { jp.removeAll(); jp.add(fp,BorderLayout.NORTH); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeColors"))) { jp.removeAll(); jp.add(cpp,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeDisplay"))) { jp.removeAll(); jp.add(display,BorderLayout.NORTH); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeCursor"))) { jp.removeAll(); jp.add(cuPanel,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeOnConnect"))) { jp.removeAll(); jp.add(onConnect,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeMouse"))) { jp.removeAll(); jp.add(mouse,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeHS"))) { jp.removeAll(); jp.add(hotspot,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } if (nodeInfo.toString().equals(LangTool.getString("sa.nodeKP"))) { jp.removeAll(); jp.add(kp,BorderLayout.CENTER); jp.setPreferredSize(cpp.getPreferredSize()); jp.validate(); jpm.repaint(); } } }); // define tree selection panel JPanel jsp = new JPanel(); jsp.setBackground(Color.white); jsp.add(tree); jpm.add(jp,BorderLayout.EAST); jpm.add(jsp,BorderLayout.WEST); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/4aeb43e177d093974bc7ac8bf0617a0a162695fa/SessionAttributes.java/clean/tn5250j/src/org/tn5250j/SessionAttributes.java |
||
public void setColumns(int columns) { if (columns < 0) throw new IllegalArgumentException(); this.columns = columns; invalidate(); repaint(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextField.java/buggy/core/src/classpath/javax/javax/swing/JTextField.java |
||
s1.setMacroRunning(false); | public void executeScriptFile(Session session, String scriptFile) throws InterpreterDriver.InterpreterException { try { final Session s1 = session; final String s2 = scriptFile; s1.setMacroRunning(true); Runnable interpretIt = new Runnable() { public void run() { _interpreter = new PythonInterpreter(); _interpreter.set("_session",s1); _interpreter.execfile(s2); } }; // lets start interpreting it. Thread interpThread = new Thread(interpretIt); interpThread.setDaemon(true); interpThread.start(); } catch (PyException ex) { throw new InterpreterDriver.InterpreterException(ex); } catch (Exception ex2) { throw new InterpreterDriver.InterpreterException(ex2); } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/4a96f388e2e0e1e6eb69280a457ea7c39e957ed1/JPythonInterpreterDriver.java/buggy/tn5250j/src/org/tn5250j/scripting/JPythonInterpreterDriver.java |
|
s1.setMacroRunning(false); | public void run() { _interpreter = new PythonInterpreter(); _interpreter.set("_session",s1); _interpreter.execfile(s2); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/4a96f388e2e0e1e6eb69280a457ea7c39e957ed1/JPythonInterpreterDriver.java/buggy/tn5250j/src/org/tn5250j/scripting/JPythonInterpreterDriver.java |
|
assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); | assertEquals( "Unable to retrieve localized text for locale: default", s0, "[] value1" ); | public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); String s2 = i18n.getString( "org.codehaus.plexus.i18n.BarBundle", new Locale( "ko", "KR" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: ko-KR", s2, "[ko] value3" ); String s4 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "value1", s5 ); } | 8307 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8307/e16c3226021dee6efdd2011e6666bf163a99b525/DefaultI18NTest.java/clean/src/test/java/org/codehaus/plexus/i18n/DefaultI18NTest.java |
assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); | assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "[en_US] value2" ); | public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); String s2 = i18n.getString( "org.codehaus.plexus.i18n.BarBundle", new Locale( "ko", "KR" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: ko-KR", s2, "[ko] value3" ); String s4 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "value1", s5 ); } | 8307 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8307/e16c3226021dee6efdd2011e6666bf163a99b525/DefaultI18NTest.java/clean/src/test/java/org/codehaus/plexus/i18n/DefaultI18NTest.java |
assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); | assertEquals( "Unable to retrieve localized text for locale: fr", s4, "[fr] value3" ); | public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); String s2 = i18n.getString( "org.codehaus.plexus.i18n.BarBundle", new Locale( "ko", "KR" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: ko-KR", s2, "[ko] value3" ); String s4 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "value1", s5 ); } | 8307 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8307/e16c3226021dee6efdd2011e6666bf163a99b525/DefaultI18NTest.java/clean/src/test/java/org/codehaus/plexus/i18n/DefaultI18NTest.java |
String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); | String s5 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr", "FR" ), "key3" ); | public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); String s2 = i18n.getString( "org.codehaus.plexus.i18n.BarBundle", new Locale( "ko", "KR" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: ko-KR", s2, "[ko] value3" ); String s4 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "value1", s5 ); } | 8307 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8307/e16c3226021dee6efdd2011e6666bf163a99b525/DefaultI18NTest.java/clean/src/test/java/org/codehaus/plexus/i18n/DefaultI18NTest.java |
assertEquals( "value1", s5 ); | assertEquals( "Unable to retrieve localized text for locale: fr-FR", s5, "[fr] value3" ); String s6 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "Unable to retrieve localized properties for locale: default", "[] value1", s6 ); Locale old = Locale.getDefault(); Locale.setDefault(Locale.FRENCH); try { String s7 = i18n.getString( "org.codehaus.plexus.i18n.i18n", Locale.ENGLISH, "key1" ); assertEquals( "Not picking up new default locale: fr", "[fr] value1", s7 ); String s8 = i18n.getString( "org.codehaus.plexus.i18n.i18n", Locale.ITALIAN, "key1" ); assertEquals( "Unable to retrieve localized properties for locale: it", "[it] value1", s8 ); } finally { Locale.setDefault(old); } | public void testLocalization() { String s0 = i18n.getString( null, null, "key1" ); assertEquals( "Unable to retrieve localized text for locale: default", s0, "value1" ); String s1 = i18n.getString( null, new Locale( "en", "US" ), "key2" ); assertEquals( "Unable to retrieve localized text for locale: en-US", s1, "value2" ); String s2 = i18n.getString( "org.codehaus.plexus.i18n.BarBundle", new Locale( "ko", "KR" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: ko-KR", s2, "[ko] value3" ); String s4 = i18n.getString( "org.codehaus.plexus.i18n.FooBundle", new Locale( "fr" ), "key3" ); assertEquals( "Unable to retrieve localized text for locale: fr-US", s4, "[fr] value3" ); String s5 = i18n.getString( "org.codehaus.plexus.i18n.i18n", null, "key1" ); assertEquals( "value1", s5 ); } | 8307 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8307/e16c3226021dee6efdd2011e6666bf163a99b525/DefaultI18NTest.java/clean/src/test/java/org/codehaus/plexus/i18n/DefaultI18NTest.java |
sew.show(); | sew.setVisible(true); | private void showPopupMenu(MouseEvent me) { JPopupMenu jpm = new JPopupMenu(); JMenuItem menuItem; Action action; final int row = spools.rowAtPoint(me.getPoint()); final int col = spools.convertColumnIndexToModel( spools.columnAtPoint(me.getPoint()));// System.out.println(" column clicked " + col);// System.out.println(" column clicked to model " + spools.convertColumnIndexToModel(col)); action = new AbstractAction(LangTool.getString("spool.optionView")) { public void actionPerformed(ActionEvent e) { System.out.println(row + " is selected "); spools.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); SwingUtilities.invokeLater( new Runnable () { public void run() { displayViewer(getSpooledFile(row)); } } ); } }; jpm.add(action); action = new AbstractAction(LangTool.getString("spool.optionProps")) { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null,"Not Available yet","Not yet", JOptionPane.WARNING_MESSAGE); } }; jpm.add(action); jpm.addSeparator(); action = new AbstractAction(LangTool.getString("spool.optionExport")) { public void actionPerformed(ActionEvent e) { SpoolExportWizard sew = new SpoolExportWizard(getSpooledFile(row), session); sew.show(); } }; jpm.add(action); jpm.addSeparator(); switch (col) { case 0: case 3: case 6: action = new AbstractAction(LangTool.getString("spool.labelFilter")) { public void actionPerformed(ActionEvent e) { setFilter(row,col); } }; jpm.add(action); jpm.addSeparator(); break; } action = new AbstractAction(LangTool.getString("spool.optionHold")) { public void actionPerformed(ActionEvent e) { doSpoolStuff(getSpooledFile(row),e.getActionCommand()); } }; jpm.add(action); action = new AbstractAction(LangTool.getString("spool.optionRelease")) { public void actionPerformed(ActionEvent e) { doSpoolStuff(getSpooledFile(row),e.getActionCommand()); } }; jpm.add(action); action = new AbstractAction(LangTool.getString("spool.optionDelete")) { public void actionPerformed(ActionEvent e) { doSpoolStuff(getSpooledFile(row),e.getActionCommand()); } }; jpm.add(action); GUIGraphicsUtils.positionPopup(spools,jpm,me.getX(),me.getY()); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/SpoolExporter.java/clean/tn5250j/src/org/tn5250j/spoolfile/SpoolExporter.java |
sew.show(); | sew.setVisible(true); | public void actionPerformed(ActionEvent e) { SpoolExportWizard sew = new SpoolExportWizard(getSpooledFile(row), session); sew.show(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/d3f4f0d032e4305c6a78bdb863ee5599f3e41633/SpoolExporter.java/clean/tn5250j/src/org/tn5250j/spoolfile/SpoolExporter.java |
public NoSuchMethodException() { super(); | public NoSuchMethodException() { | public NoSuchMethodException() { super(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/NoSuchMethodException.java/buggy/core/src/classpath/java/java/lang/NoSuchMethodException.java |
public NoSuchAlgorithmException(String msg) | public NoSuchAlgorithmException() | public NoSuchAlgorithmException(String msg) { super(msg); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/NoSuchAlgorithmException.java/buggy/core/src/classpath/java/java/security/NoSuchAlgorithmException.java |
super(msg); | public NoSuchAlgorithmException(String msg) { super(msg); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/NoSuchAlgorithmException.java/buggy/core/src/classpath/java/java/security/NoSuchAlgorithmException.java |
|
SecureSet (final Subject subject, final int type, final Collection elements) | SecureSet (final Subject subject, final int type, final Collection inElements) | SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalArgumentException(o+" is not a Principal"); } if (!elements.contains (o)) { elements.add (o); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java |
for (Iterator it = elements.iterator(); it.hasNext(); ) | for (Iterator it = inElements.iterator(); it.hasNext(); ) | SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalArgumentException(o+" is not a Principal"); } if (!elements.contains (o)) { elements.add (o); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java |
if (!elements.contains (o)) | if (!this.elements.contains (o)) | SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalArgumentException(o+" is not a Principal"); } if (!elements.contains (o)) { elements.add (o); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java |
elements.add (o); | this.elements.add (o); | SecureSet (final Subject subject, final int type, final Collection elements) { this (subject, type); for (Iterator it = elements.iterator(); it.hasNext(); ) { Object o = it.next(); if (type == PRINCIPALS && !(o instanceof Principal)) { throw new IllegalArgumentException(o+" is not a Principal"); } if (!elements.contains (o)) { elements.add (o); } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java |
return elements.remove (element); | return elements.contains (element); | public synchronized boolean contains (final Object element) { return elements.remove (element); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/Subject.java/clean/core/src/classpath/javax/javax/security/auth/Subject.java |
g.setColor(Color.black); | y = y + getShift(); g.setColor(MetalLookAndFeel.getBlack()); | public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); g.drawLine(x + 12, y + 15, x + 12, y + 6); g.drawLine(x + 12, y + 6, x + 9, y); g.drawLine(x + 7, y + 2, x + 11, y + 6); g.drawLine(x + 8, y + 1, x + 9, y + 1); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 1, y + 1, x + 7, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + 14); g.drawLine(x + 1, y + 14, x + 11, y + 14); g.drawLine(x + 11, y + 14, x + 11, y + 7); g.drawLine(x + 8, y + 2, x + 10, y + 4); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(new Color(204, 204, 255)); | g.setColor(MetalLookAndFeel.getPrimaryControl()); | public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y, x + 9, y); g.drawLine(x, y + 1, x, y + 15); g.drawLine(x, y + 15, x + 12, y + 15); g.drawLine(x + 12, y + 15, x + 12, y + 6); g.drawLine(x + 12, y + 6, x + 9, y); g.drawLine(x + 7, y + 2, x + 11, y + 6); g.drawLine(x + 8, y + 1, x + 9, y + 1); g.setColor(new Color(204, 204, 255)); g.drawLine(x + 1, y + 1, x + 7, y + 1); g.drawLine(x + 1, y + 1, x + 1, y + 14); g.drawLine(x + 1, y + 14, x + 11, y + 14); g.drawLine(x + 11, y + 14, x + 11, y + 7); g.drawLine(x + 8, y + 2, x + 10, y + 4); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(Color.black); g.drawLine(x, y + 3, x, y + 12); g.drawLine(x, y + 12, x + 15, y + 12); g.drawLine(x + 15, y + 12, x + 15, y + 2); g.drawLine(x + 14, y + 3, x + 9, y + 3); g.drawLine(x + 8, y + 2, x + 1, y + 2); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 4, 7, 8); g.fillRect(x + 9, y + 5, 6, 7); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 9, y + 2, x + 14, y + 2); g.setColor(new Color(50, 50, 120)); g.drawLine(x + 9, y + 1, x + 15, y + 1); g.drawLine(x + 10, y, x + 15, y); | y = y + getShift(); g.setColor(MetalLookAndFeel.getBlack()); g.drawLine(x, y + 6, x, y + 15); g.drawLine(x, y + 15, x + 15, y + 15); g.drawLine(x + 15, y + 15, x + 15, y + 5); g.drawLine(x + 14, y + 6, x + 9, y + 6); g.drawLine(x + 8, y + 5, x + 1, y + 5); g.setColor(MetalLookAndFeel.getPrimaryControl()); g.fillRect(x + 2, y + 7, 7, 8); g.fillRect(x + 9, y + 8, 6, 7); g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); g.drawLine(x + 9, y + 5, x + 14, y + 5); g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(x + 9, y + 4, x + 15, y + 4); g.drawLine(x + 10, y + 3, x + 15, y + 3); | public void paintIcon(Component c, Graphics g, int x, int y) { // TODO: pick up appropriate UI colors g.setColor(Color.black); g.drawLine(x, y + 3, x, y + 12); g.drawLine(x, y + 12, x + 15, y + 12); g.drawLine(x + 15, y + 12, x + 15, y + 2); g.drawLine(x + 14, y + 3, x + 9, y + 3); g.drawLine(x + 8, y + 2, x + 1, y + 2); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 4, 7, 8); g.fillRect(x + 9, y + 5, 6, 7); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 9, y + 2, x + 14, y + 2); g.setColor(new Color(50, 50, 120)); g.drawLine(x + 9, y + 1, x + 15, y + 1); g.drawLine(x + 10, y, x + 15, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(new Color(102, 102, 153)); | g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 2, 12, 3); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 6, y + 3, x + 6, y + 3); g.drawLine(x + 9, y + 3, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 3); g.setColor(Color.white); g.fillRect(x + 2, y + 6, 12, 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 8, y + 2, x + 8, y + 2); g.drawLine(x + 11, y + 2, x + 11, y + 2); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(new Color(204, 204, 255)); | g.setColor(MetalLookAndFeel.getPrimaryControl()); | public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 2, 12, 3); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 6, y + 3, x + 6, y + 3); g.drawLine(x + 9, y + 3, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 3); g.setColor(Color.white); g.fillRect(x + 2, y + 6, 12, 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 8, y + 2, x + 8, y + 2); g.drawLine(x + 11, y + 2, x + 11, y + 2); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(new Color(102, 102, 153)); | g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); | public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 2, 12, 3); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 6, y + 3, x + 6, y + 3); g.drawLine(x + 9, y + 3, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 3); g.setColor(Color.white); g.fillRect(x + 2, y + 6, 12, 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 8, y + 2, x + 8, y + 2); g.drawLine(x + 11, y + 2, x + 11, y + 2); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
g.setColor(Color.white); | g.setColor(MetalLookAndFeel.getWhite()); | public void paintIcon(Component c, Graphics g, int x, int y) { g.setColor(new Color(102, 102, 153)); g.fillRect(x + 1, y, 14, 2); g.fillRect(x, y + 1, 2, 14); g.fillRect(x + 1, y + 14, 14, 2); g.fillRect(x + 14, y + 1, 2, 14); g.drawLine(x + 2, y + 5, x + 14, y + 5); g.setColor(new Color(204, 204, 255)); g.fillRect(x + 2, y + 2, 12, 3); g.setColor(new Color(102, 102, 153)); g.drawLine(x + 3, y + 3, x + 3, y + 3); g.drawLine(x + 6, y + 3, x + 6, y + 3); g.drawLine(x + 9, y + 3, x + 9, y + 3); g.drawLine(x + 12, y + 3, x + 12, y + 3); g.setColor(Color.white); g.fillRect(x + 2, y + 6, 12, 8); g.drawLine(x + 2, y + 2, x + 2, y + 2); g.drawLine(x + 5, y + 2, x + 5, y + 2); g.drawLine(x + 8, y + 2, x + 8, y + 2); g.drawLine(x + 11, y + 2, x + 11, y + 2); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5a5d754b2589a0d1c598cfa61794debb63640f7/MetalIconFactory.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalIconFactory.java |
(obj instanceof SmallAttributeSet) | (obj instanceof AttributeSet) | public boolean equals(Object obj) { return (obj instanceof SmallAttributeSet) && this.isEqual((AttributeSet)obj); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/StyleContext.java/buggy/core/src/classpath/javax/javax/swing/text/StyleContext.java |
while (getMacroByNumber(++x) != null) {} macros.put("macro" + x + "." + name,keyStrokes); macrosExist = true; | if (macrosExist && getMacroByName(name) != null) { Set macroSet = macros.keySet(); Iterator macroIterator = macroSet.iterator(); String byName = null; String prefix = null; while (macroIterator.hasNext()) { byName = (String)macroIterator.next(); if (byName.endsWith(name)) { prefix = byName.substring(0,byName.indexOf(name)); macros.put(prefix + name,keyStrokes); } } } else { while (getMacroByNumber(++x) != null) {} macros.put("macro" + x + "." + name,keyStrokes); macrosExist = true; } | public final static void setMacro(String name, String keyStrokes) { int x = 0; while (getMacroByNumber(++x) != null) {} macros.put("macro" + x + "." + name,keyStrokes); macrosExist = true; saveMacros(); } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/72cd8bcd8293ce09c5a6fcc9aefa5bbd7a099673/Macronizer.java/clean/tn5250j/src/org/tn5250j/tools/Macronizer.java |
this.redoContent = new String(StringContent.this.content, this.start, this.length); | this.redoContent = new String(StringContent.this.content, this.start, this.length); | public void undo() { super.undo(); try { StringContent.this.checkLocation(this.start, this.length); this.redoContent = new String(StringContent.this.content, this.start, this.length); StringContent.this.remove(this.start, this.length); } catch (BadLocationException b) { throw new CannotUndoException(); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
else if ((where + len)>this.count) | else if ((where + len) > this.count) | void checkLocation(int where, int len) throws BadLocationException { if (where < 0) throw new BadLocationException("Invalid location", 1); else if (where > this.count) throw new BadLocationException("Invalid location", this.count); else if ((where + len)>this.count) throw new BadLocationException("Invalid range", this.count); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
public void getChars(int where, int len, Segment txt) throws BadLocationException | public void getChars(int where, int len, Segment txt) throws BadLocationException | public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
if (txt != null) { | public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
|
} | public void getChars(int where, int len, Segment txt) throws BadLocationException { checkLocation(where, len); if (txt != null) { txt.array = this.content; txt.offset = where; txt.count = len; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
|
Position p = (Position)iter.next(); | Position p = (Position) iter.next(); | protected Vector getPositionsInRange(Vector v, int offset, int length) { Vector refPos = new Vector(); Iterator iter = this.positions.iterator(); while(iter.hasNext()) { Position p = (Position)iter.next(); if ((offset <= p.getOffset()) && (p.getOffset() <= (offset + length))) refPos.add(p); } return refPos; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
return new String (this.content, where, len); | return new String(this.content, where, len); | public String getString(int where, int len) throws BadLocationException { checkLocation(where, len); return new String (this.content, where, len); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
System.arraycopy(this.content, where, temp, (where + insert.length), (temp.length - where - insert.length)); | System.arraycopy(this.content, where, temp, (where + insert.length), (temp.length - where - insert.length)); | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp = new char[this.content.length + insert.length]; this.count += insert.length; // Copy array and insert the string. if (where > 0) System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(insert, 0, temp, where, insert.length); System.arraycopy(this.content, where, temp, (where + insert.length), (temp.length - where - insert.length)); if (this.content.length < temp.length) this.content = new char[temp.length]; // Copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, temp.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, temp.length - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); p.setOffset(p.getOffset() + str.length()); } InsertUndo iundo = new InsertUndo(where, insert.length); return iundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
Vector refPos = getPositionsInRange(this.positions, where, temp.length - where); | Vector refPos = getPositionsInRange(this.positions, where, temp.length - where); | public UndoableEdit insertString(int where, String str) throws BadLocationException { checkLocation(where, 0); if (where == this.count) throw new BadLocationException("Invalid location", 1); if (str == null) throw new NullPointerException(); char[] insert = str.toCharArray(); char[] temp = new char[this.content.length + insert.length]; this.count += insert.length; // Copy array and insert the string. if (where > 0) System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(insert, 0, temp, where, insert.length); System.arraycopy(this.content, where, temp, (where + insert.length), (temp.length - where - insert.length)); if (this.content.length < temp.length) this.content = new char[temp.length]; // Copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, temp.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, temp.length - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); p.setOffset(p.getOffset() + str.length()); } InsertUndo iundo = new InsertUndo(where, insert.length); return iundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
checkLocation(where, nitems); | checkLocation(where, nitems + 1); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; // Then copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, this.content.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); } return rundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); | RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; // Then copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, this.content.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); } return rundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); | System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; // Then copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, this.content.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); } return rundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); | Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); | public UndoableEdit remove(int where, int nitems) throws BadLocationException { checkLocation(where, nitems); char[] temp = new char[(this.content.length - nitems)]; this.count = this.count - nitems; RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where, nitems)); // Copy array. System.arraycopy(this.content, 0, temp, 0, where); System.arraycopy(this.content, where + nitems, temp, where, this.content.length - where - nitems); this.content = new char[temp.length]; // Then copy the result in the original char array. System.arraycopy(temp, 0, this.content, 0, this.content.length); // Move all the positions. Vector refPos = getPositionsInRange(this.positions, where, this.content.length + nitems - where); Iterator iter = refPos.iterator(); while (iter.hasNext()) { StickyPosition p = (StickyPosition)iter.next(); int result = p.getOffset() - nitems; p.setOffset(result); if (result < 0) this.positions.remove(p); } return rundo; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/StringContent.java/buggy/core/src/classpath/javax/javax/swing/text/StringContent.java |
super(); | public CannotRedoException() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CannotRedoException.java/buggy/core/src/classpath/javax/javax/swing/undo/CannotRedoException.java |
|
super(); | public CannotUndoException() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/CannotUndoException.java/buggy/core/src/classpath/javax/javax/swing/undo/CannotUndoException.java |
|
public PanelUI() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/PanelUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/PanelUI.java |
||
public DatagramSocket(SocketAddress address) throws SocketException | protected DatagramSocket(DatagramSocketImpl impl) | public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java |
String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } | if (impl == null) throw new NullPointerException("impl may not be null"); | public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java |
if (address != null) bind(address); | this.impl = impl; this.remoteAddress = null; this.remotePort = -1; | public DatagramSocket(SocketAddress address) throws SocketException { // @classpath-bugfix Security String propVal = (String)AccessController.doPrivileged(new GetPropertyAction("impl.prefix")); if (factory != null) { // @classpath-bugfix Use factory impl = factory.createDatagramSocketImpl(); } else if (propVal == null || propVal.equals("")) impl = new PlainDatagramSocketImpl(); else try { impl = (DatagramSocketImpl) Class.forName("java.net." + propVal + "DatagramSocketImpl") .newInstance(); } catch (Exception e) { System.err.println("Could not instantiate class: java.net." + propVal + "DatagramSocketImpl"); impl = new PlainDatagramSocketImpl(); } if (address != null) bind(address); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4ab0e0ca443d7a98e3dfd00d94df0d256e3fbd3f/DatagramSocket.java/buggy/core/src/classpath/java/java/net/DatagramSocket.java |
} | } | public ViewportLayout() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/ViewportLayout.java/buggy/core/src/classpath/javax/javax/swing/ViewportLayout.java |
public AccessibleJWindow() | protected AccessibleJWindow() | public AccessibleJWindow() { super(); // Nothing to do here. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/JWindow.java/clean/core/src/classpath/javax/javax/swing/JWindow.java |
break; | private void parseConditionalSect(char[] saved) throws Exception { skipWhitespace(); if (tryRead("INCLUDE")) { skipWhitespace(); require('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Conditional Section/PE nesting"); } skipWhitespace(); while (!tryRead("]]>")) { parseMarkupdecl(); skipWhitespace(); } } else if (tryRead("IGNORE")) { skipWhitespace(); require('['); // VC: Proper Conditional Section/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Conditional Section/PE nesting"); } int nesting = 1; char c; expandPE = false; for (int nest = 1; nest > 0; ) { c = readCh(); switch (c) { case '<': if (tryRead("![")) { nest++; } case ']': if (tryRead("]>")) { nest--; } } } expandPE = true; } else { error("conditional section must begin with INCLUDE or IGNORE"); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/XmlParser.java/buggy/core/src/classpath/gnu/gnu/xml/aelfred2/XmlParser.java |
|
XDF.setDefaultDataArraySize(value); | Specification.getInstance().setDefaultDataArraySize(value); | public Object action (SaxDocumentHandler handler, AttributeList attrs) { // The root node is just a "structure" node, // but is always the first one. XDF.setXMLAttributes(attrs); // set XML attributes from passed list CurrentStructure = XDF; // current working structure is now the root // structure // if this global option is set in the reader, we use it if(Options.contains("DefaultDataDimensionSize")) { int value = ((Integer) Options.get("DefaultDataDimensionSize")).intValue(); XDF.setDefaultDataArraySize(value); } return CurrentStructure; } | 4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/b3840ff490803a892bb4c65cfb5cf46f6722f00a/SaxDocumentHandler.java/buggy/src/gov/nasa/gsfc/adc/xdf/SaxDocumentHandler.java |
protected synchronized void create(boolean stream) throws IOException { throw new SocketException("Not implemented"); | protected synchronized void create(boolean stream) throws IOException { channel = new SocketChannelImpl(false); VMChannel vmchannel = channel.getVMChannel(); vmchannel.initSocket(stream); channel.configureBlocking(true); impl.getState().setChannelFD(vmchannel.getState()); | protected synchronized void create(boolean stream) throws IOException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainSocketImpl.java/buggy/core/src/classpath/gnu/gnu/java/net/PlainSocketImpl.java |
super("bdf"); | public BDFFontProvider() { log.debug("new BDFFontProvider"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/27da370c3e05f80083e8c618351850b1d1d108b6/BDFFontProvider.java/buggy/gui/src/awt/org/jnode/awt/font/bdf/BDFFontProvider.java |
|
{ final BDFFont bdfFont = (BDFFont) font; | { final BDFFont bdfFont = getBDFFont(font); | protected FontMetrics createFontMetrics(Font font) throws IOException { final BDFFont bdfFont = (BDFFont) font; return bdfFont.getFontMetrics(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/27da370c3e05f80083e8c618351850b1d1d108b6/BDFFontProvider.java/buggy/gui/src/awt/org/jnode/awt/font/bdf/BDFFontProvider.java |
final BDFFont bdfFont = (BDFFont) font; | final BDFFont bdfFont = getBDFFont(font); | protected TextRenderer createTextRenderer(RenderCache renderCache, Font font) { final BDFFont bdfFont = (BDFFont) font; final TextRenderer renderer = new BDFTextRenderer(bdfFont.getContainer()); log.debug("created TextRenderer for BDF"); return renderer; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/27da370c3e05f80083e8c618351850b1d1d108b6/BDFFontProvider.java/buggy/gui/src/awt/org/jnode/awt/font/bdf/BDFFontProvider.java |
protected GnuRSAKey(final BigInteger n, final BigInteger e) | protected GnuRSAKey(int defaultFormat, BigInteger n, BigInteger e) | protected GnuRSAKey(final BigInteger n, final BigInteger e) { super(); this.n = n; this.e = e; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAKey.java |
this.defaultFormat = defaultFormat <= 0 ? Registry.RAW_ENCODING_ID : defaultFormat; | protected GnuRSAKey(final BigInteger n, final BigInteger e) { super(); this.n = n; this.e = e; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAKey.java |
|
return null; | return KeyPairCodecFactory.getEncodingShortName(defaultFormat); | public String getFormat() { return null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/792415b1783f5e8798e64529a3048ed049193e55/GnuRSAKey.java/clean/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAKey.java |
input.mark(2000); | private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
|
String uxId = input.read_string(); input.reset(); | gnuAny exc = new gnuAny(); | private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
UserException uex = ObjectCreator.readUserException(uxId, input); | exc.insert_Streamable(new streamReadyHolder(input)); | private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); | UnknownUserException unuex = new UnknownUserException(exc); m_environment.exception(unuex); | private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
private void p_invoke() throws SystemException { binaryReply response = submit(); ReplyHeader rh = response.header.create_reply_header(); cdrBufInput input = response.getStream(); input.setOrb(orb); rh.read(input); // The stream must be aligned sinve v1.2, but only once. boolean align = response.header.version.since_inclusive(1, 2); boolean moved_permanently = false; switch (rh.reply_status) { case ReplyHeader.NO_EXCEPTION : NamedValue arg; // Read return value, if set. if (m_result != null) { if (align) { input.align(8); align = false; } m_result.value().read_value(input, m_result.value().type()); } // Read returned parameters, if set. if (m_args != null) for (int i = 0; i < m_args.count(); i++) { try { arg = m_args.item(i); // Both ARG_INOUT and ARG_OUT have this binary flag set. if ((arg.flags() & ARG_OUT.value) != 0) { if (align) { input.align(8); align = false; } arg.value().read_value(input, arg.value().type()); } } catch (Bounds ex) { Unexpected.error(ex); } } break; case ReplyHeader.SYSTEM_EXCEPTION : if (align) { input.align(8); align = false; } SystemException exception = ObjectCreator.readSystemException(input); m_environment.exception(exception); throw exception; case ReplyHeader.USER_EXCEPTION : if (align) { input.align(8); align = false; } input.mark(2000); String uxId = input.read_string(); input.reset(); UserException uex = ObjectCreator.readUserException(uxId, input); if (uex == null) m_environment.exception(new UserException(uxId)); else m_environment.exception(uex); break; case ReplyHeader.LOCATION_FORWARD_PERM : case ReplyHeader.LOCATION_FORWARD : if (response.header.version.since_inclusive(1, 2)) input.align(8); IOR forwarded = new IOR(); try { forwarded._read_no_endian(input); } catch (IOException ex) { throw new MARSHAL(ex + " while reading the forwarding info"); } setIor(forwarded); // Repeat with the forwarded information. p_invoke(); return; default : throw new MARSHAL("Unknow reply status: " + rh.reply_status); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
||
setBigEndian(ior.Big_Endian); | public void setIor(IOR an_ior) { ior = an_ior; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
|
Socket socket = new Socket(ior.Internet.host, ior.Internet.port); | long pause = PAUSE_INITIAL; if (socket == null) { Open: for (int i = 0; i < PAUSE_STEPS; i++) { try { socket = new Socket(ior.Internet.host, ior.Internet.port); break Open; } catch (BindException ex) { try { System.gc(); Thread.sleep(pause); pause = pause * 2; if (pause > PAUSE_MAX) pause = PAUSE_MAX; } catch (InterruptedException iex) { } } } } if (socket == null) throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port + " in use" ); socket.setKeepAlive(true); | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
n = socketInput.read(r, n, r.length - n); | n += socketInput.read(r, n, r.length - n); | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
socketInput.close(); | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
|
catch (IOException ex1) | catch (IOException io_ex) | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
ex1.printStackTrace(); | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
|
finally { try { if (socket != null && !socket.isClosed()) { socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS); SocketRepository.put_socket(key, socket ); } } catch (IOException scx) { InternalError ierr = new InternalError(); ierr.initCause(scx); throw ierr; } } | public synchronized binaryReply submit() { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useVersion(ior.Internet.version); RequestHeader rh = header.create_request_header(); rh.object_key = ior.key; rh.operation = m_operation; // Prepare the submission. cdrBufOutput request_part = new cdrBufOutput(); request_part.setOffset(header.getHeaderSize()); request_part.setVersion(header.version); request_part.setCodeSet(cxCodeSet.negotiate(ior.CodeSets)); request_part.setOrb(orb); // This also sets the stream encoding to the encoding, specified // in the header. rh.write(request_part); if (m_args != null && m_args.count() > 0) { write_parameters(header, request_part); if (m_parameter_buffer != null) throw new BAD_INV_ORDER("Please either add parameters or " + "write them into stream, but not both " + "at once." ); } if (m_parameter_buffer != null) { write_parameter_buffer(header, request_part); } // Now the message size is available. header.message_size = request_part.buffer.size(); try { Socket socket = new Socket(ior.Internet.host, ior.Internet.port); OutputStream socketOutput = socket.getOutputStream(); // Write the message header. header.write(socketOutput); // Write the request header and parameters (if present). request_part.buffer.writeTo(socketOutput); socketOutput.flush(); if (!socket.isClosed()) { MessageHeader response_header = new MessageHeader(); InputStream socketInput = socket.getInputStream(); response_header.read(socketInput); byte[] r = new byte[ response_header.message_size ]; int n = 0; reading: while (n < r.length) { n = socketInput.read(r, n, r.length - n); } socketInput.close(); return new binaryReply(orb, response_header, r); } else return EMPTY; } catch (IOException ex1) { ex1.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d0121d0b7854a7d29b8a526d3f5998b6e08248f6/gnuRequest.java/buggy/core/src/classpath/gnu/gnu/CORBA/gnuRequest.java |
|
public static SystemException readSystemException(InputStream input) | public static SystemException readSystemException(InputStream input, ServiceContext[] contexts) | public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java |
CompletionStatus status = CompletionStatusHelper.read(input); | CompletionStatus completed = CompletionStatusHelper.read(input); | public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java |
SystemException exception = ObjectCreator.createSystemException(idl, minor, status); | try { exception = (SystemException) createObject(idl, null); exception.minor = minor; exception.completed = completed; } catch (Exception ex) { UNKNOWN u = new UNKNOWN("Unsupported system exception " + idl, minor, completed); u.initCause(ex); throw u; } try { ServiceContext uEx = ServiceContext.find( ServiceContext.UnknownExceptionInfo, contexts); if (uEx != null) { cdrBufInput in = new cdrBufInput(uEx.context_data); in.setOrb(in.orb()); if (input instanceof cdrInput) { ((cdrInput) input).cloneSettings(in); } Throwable t = UnknownExceptionCtxHandler.read(in, contexts); exception.initCause(t); } } catch (Exception ex) { } | public static SystemException readSystemException(InputStream input) { String idl = input.read_string(); int minor = input.read_ulong(); CompletionStatus status = CompletionStatusHelper.read(input); SystemException exception = ObjectCreator.createSystemException(idl, minor, status); return exception; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java |
String helper = toHelperName(idl); Class helperClass = Class.forName(helper); | Class helperClass = findHelper(idl); | public static UserException readUserException(String idl, InputStream input) { try { String helper = toHelperName(idl); Class helperClass = Class.forName(helper); Method read = helperClass.getMethod("read", new Class[] { org.omg.CORBA.portable.InputStream.class } ); return (UserException) read.invoke(null, new Object[] { input }); } catch (MARSHAL mex) { // This one is ok to throw throw mex; } catch (Exception ex) { ex.printStackTrace(); return null; } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ObjectCreator.java/buggy/core/src/classpath/gnu/gnu/CORBA/ObjectCreator.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.