rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
{
{
public void cancelEditing(JTree tree) { if (isEditing(tree)) completeEditing(false, true, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
completeEditing(false, true, false); }
completeEditing(false, true, false); }
public void cancelEditing(JTree tree) { if (isEditing(tree)) completeEditing(false, true, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
int mouseY) { }
int mouseY) { if (isLocationInExpandControl(path, mouseX, mouseY)) toggleExpandState(path); }
protected void checkForClickInExpandControl(TreePath path, int mouseX, int mouseY) { // FIXME: not implemented }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{
{
protected void completeEditing() { completeEditing(false, true, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
protected void completeEditing() { completeEditing(false, true, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ }
{ }
protected void completeUIInstall() { // FIXME: not implemented }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ }
{ }
protected void completeUIUninstall() { // FIXME: not implemented }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ treeState = createLayoutCache(); }
{ treeState = createLayoutCache(); }
protected void configureLayoutCache() { treeState = createLayoutCache(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
private int convertModifiers(int mod) { if ((mod & KeyEvent.SHIFT_DOWN_MASK) != 0) { mod |= KeyEvent.SHIFT_MASK; mod &= ~KeyEvent.SHIFT_DOWN_MASK; } if ((mod & KeyEvent.CTRL_DOWN_MASK) != 0) { mod |= KeyEvent.CTRL_MASK; mod &= ~KeyEvent.CTRL_DOWN_MASK; } if ((mod & KeyEvent.META_DOWN_MASK) != 0) { mod |= KeyEvent.META_MASK; mod &= ~KeyEvent.META_DOWN_MASK; } if ((mod & KeyEvent.ALT_DOWN_MASK) != 0) { mod |= KeyEvent.ALT_MASK; mod &= ~KeyEvent.ALT_DOWN_MASK; } if ((mod & KeyEvent.ALT_GRAPH_DOWN_MASK) != 0) { mod |= KeyEvent.ALT_GRAPH_MASK; mod &= ~KeyEvent.ALT_GRAPH_DOWN_MASK; } return mod; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new CellEditorHandler(); }
{ return new CellEditorHandler(); }
protected CellEditorListener createCellEditorListener() { return new CellEditorHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new CellRendererPane(); }
{ return new CellRendererPane(); }
protected CellRendererPane createCellRendererPane() { return new CellRendererPane(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new ComponentHandler(); }
{ return new ComponentHandler(); }
protected ComponentListener createComponentListener() { return new ComponentHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{
{
protected TreeCellEditor createDefaultCellEditor() { if (currentCellRenderer != null) return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) currentCellRenderer, cellEditor); return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
protected TreeCellEditor createDefaultCellEditor() { if (currentCellRenderer != null) return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) currentCellRenderer, cellEditor); return new DefaultTreeCellEditor(tree, (DefaultTreeCellRenderer) createDefaultCellRenderer(), cellEditor); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new DefaultTreeCellRenderer(); }
{ return new DefaultTreeCellRenderer(); }
protected TreeCellRenderer createDefaultCellRenderer() { return new DefaultTreeCellRenderer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new FocusHandler(); }
{ return new FocusHandler(); }
protected FocusListener createFocusListener() { return new FocusHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new KeyHandler(); }
{ return new KeyHandler(); }
protected KeyListener createKeyListener() { return new KeyHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new FixedHeightLayoutCache(); }
{ return new FixedHeightLayoutCache(); }
protected AbstractLayoutCache createLayoutCache() { return new FixedHeightLayoutCache(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new MouseHandler(); }
{ return new MouseHandler(); }
protected MouseListener createMouseListener() { return new MouseHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return null; }
{ return new NodeDimensionsHandler(); }
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() { // FIXME: not implemented return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new PropertyChangeHandler(); }
{ return new PropertyChangeHandler(); }
protected PropertyChangeListener createPropertyChangeListener() { return new PropertyChangeHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new SelectionModelPropertyChangeHandler(); }
{ return new SelectionModelPropertyChangeHandler(); }
protected PropertyChangeListener createSelectionModelPropertyChangeListener() { return new SelectionModelPropertyChangeHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new TreeExpansionHandler(); }
{ return new TreeExpansionHandler(); }
protected TreeExpansionListener createTreeExpansionListener() { return new TreeExpansionHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new TreeModelHandler(); }
{ return new TreeModelHandler(); }
protected TreeModelListener createTreeModelListener() { return new TreeModelHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new TreeSelectionHandler(); }
{ return new TreeSelectionHandler(); }
protected TreeSelectionListener createTreeSelectionListener() { return new TreeSelectionHandler(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return new BasicTreeUI(); }
{ return new BasicTreeUI(); }
public static ComponentUI createUI(JComponent c) { return new BasicTreeUI(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ }
{ if (beginRow < endRow) { int temp = endRow; endRow = beginRow; beginRow = temp; } for (int i = beginRow; i < endRow; i++) { TreePath path = getPathForRow(tree, i); if (!tree.isVisible(path)) tree.makeVisible(path); } }
protected void ensureRowsAreVisible(int beginRow, int endRow) { // FIXME: not implemented }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel();
private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getChild(root, i), node); if (n != null) return n; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (!mod.isLeaf(root)) size = mod.getChildCount(root);
if (!treeModel.isLeaf(root)) size = treeModel.getChildCount(root);
private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getChild(root, i), node); if (n != null) return n; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (mod.getIndexOfChild(root, node) != -1)
if (treeModel.getIndexOfChild(root, node) != -1)
private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getChild(root, i), node); if (n != null) return n; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object n = findNode(mod.getChild(root, i), node);
Object n = findNode(treeModel.getChild(root, i), node);
private Object findNode(Object root, Object node) { TreeModel mod = tree.getModel(); int size = 0; if (!mod.isLeaf(root)) size = mod.getChildCount(root); for (int i = 0; i < size; i++) { if (mod.getIndexOfChild(root, node) != -1) return root; Object n = findNode(mod.getChild(root, i), node); if (n != null) return n; } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (cell != null)
if (cell != null)
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4, fm.getHeight()); } return new Rectangle(x, y, 0, 0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
String s = cell.toString(); Font f = tree.getFont();
String s = cell.toString(); Font f = tree.getFont();
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4, fm.getHeight()); } return new Rectangle(x, y, 0, 0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
fm.getHeight());
fm.getHeight());
Rectangle getCellBounds(int x, int y, Object cell) { if (cell != null) { String s = cell.toString(); Font f = tree.getFont(); FontMetrics fm = tree.getToolkit().getFontMetrics(f); if (s != null) return new Rectangle(x, y, SwingUtilities.computeStringWidth(fm, s) + 4, fm.getHeight()); } return new Rectangle(x, y, 0, 0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return cellEditor; }
{ return cellEditor; }
protected TreeCellEditor getCellEditor() { return cellEditor; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) {
int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) {
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
} if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))
} if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object child = mod.getChild(startNode, 0); if (child != null)
Object child = mod.getChild(startNode, 0); if (child != null)
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
Point getCellLocation(int x, int y, JTree tree, TreeModel mod, Object node, Object startNode) { int rowHeight = getRowHeight(); if (startNode == null || startNode.equals(node)) { if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot()))) return new Point(x + ((getLevel(node)) * rightChildIndent), y); return new Point(x + ((getLevel(node) + 1) * rightChildIndent), y); } if (!mod.isLeaf(startNode) && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) && !mod.isLeaf(startNode) && mod.getChildCount(startNode) > 0) { Object child = mod.getChild(startNode, 0); if (child != null) return getCellLocation(x, y + rowHeight, tree, mod, node, child); } return getCellLocation(x, y + rowHeight, tree, mod, node, getNextVisibleNode(startNode)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ if (currentCellRenderer != null) return currentCellRenderer;
{ if (currentCellRenderer != null) return currentCellRenderer;
protected TreeCellRenderer getCellRenderer() { if (currentCellRenderer != null) return currentCellRenderer; return createDefaultCellRenderer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return createDefaultCellRenderer(); }
return createDefaultCellRenderer(); }
protected TreeCellRenderer getCellRenderer() { if (currentCellRenderer != null) return currentCellRenderer; return createDefaultCellRenderer(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{
{
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { // FIXME: what if root is hidden? should not depend on (0,0) // should start counting rows from where root is. int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); // no row is visible at this node while (row > 0 && path == null) { --row; path = getPathForRow(tree, row); } return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); while (row > 0 && path == null)
int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); while (row > 0 && path == null)
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { // FIXME: what if root is hidden? should not depend on (0,0) // should start counting rows from where root is. int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); // no row is visible at this node while (row > 0 && path == null) { --row; path = getPathForRow(tree, row); } return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
--row; path = getPathForRow(tree, row);
--row; path = getPathForRow(tree, row);
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { // FIXME: what if root is hidden? should not depend on (0,0) // should start counting rows from where root is. int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); // no row is visible at this node while (row > 0 && path == null) { --row; path = getPathForRow(tree, row); } return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return path; }
return path; }
public TreePath getClosestPathForLocation(JTree tree, int x, int y) { // FIXME: what if root is hidden? should not depend on (0,0) // should start counting rows from where root is. int row = Math.round(y / getRowHeight()); TreePath path = getPathForRow(tree, row); // no row is visible at this node while (row > 0 && path == null) { --row; path = getPathForRow(tree, row); } return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return collapsedIcon; }
{ return collapsedIcon; }
public Icon getCollapsedIcon() { return collapsedIcon; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{
{
public TreePath getEditingPath(JTree tree) { return editingPath; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
public TreePath getEditingPath(JTree tree) { return editingPath; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return expandedIcon; }
{ return expandedIcon; }
public Icon getExpandedIcon() { return expandedIcon; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return UIManager.getLookAndFeelDefaults().getColor("Tree.hash"); }
{ return UIManager.getLookAndFeelDefaults().getColor("Tree.hash"); }
protected Color getHashColor() { return UIManager.getLookAndFeelDefaults().getColor("Tree.hash"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return 0; }
{ return rightChildIndent / 2; }
protected int getHorizontalLegBuffer() { // FIXME: not implemented return 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return ((TreePath) parent.getLastPathComponent()); }
{ return ((TreePath) parent.getLastPathComponent()); }
protected TreePath getLastChildPath(TreePath parent) { return ((TreePath) parent.getLastPathComponent()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return leftChildIndent; }
{ return leftChildIndent; }
public int getLeftChildIndent(int newAmount) { return leftChildIndent; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
current = getParent(tree.getModel().getRoot(), current);
current = getParent(treeModel.getRoot(), current);
int getLevel(Object node) { int count = -1; Object current = node; do { current = getParent(tree.getModel().getRoot(), current); count++; } while (current != null); return count; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return getPreferredSize(c); }
{ if (c instanceof JTree) return ((JTree) c).getPreferredSize(); return new Dimension(); }
public Dimension getMaximumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return getPreferredSize(c); }
{ Dimension min = getPreferredMinSize(); if (min == null) return new Dimension(); return min; }
public Dimension getMinimumSize(JComponent c) { // FIXME: not implemented return getPreferredSize(c); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return treeModel; }
{ return treeModel; }
protected TreeModel getModel() { return treeModel; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0);
if (!treeModel.isLeaf(curr) && treeModel.getChildCount(curr) > 0) return treeModel.getChild(curr, 0);
Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); } while (sibling == null && node != null); return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); } while (sibling == null && node != null); return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
node = getParent(mod.getRoot(), node);
node = getParent(treeModel.getRoot(), node);
Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); } while (sibling == null && node != null); return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object getNextNode(Object curr) { TreeModel mod = tree.getModel(); if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) return mod.getChild(curr, 0); Object node = curr; Object sibling = null; do { sibling = getNextSibling(node); node = getParent(mod.getRoot(), node); } while (sibling == null && node != null); return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
Object parent = getParent(treeModel.getRoot(), node);
Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index == 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
int index = mod.getIndexOfChild(parent, node) + 1;
int index = treeModel.getIndexOfChild(parent, node) + 1;
Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index == 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (!mod.isLeaf(parent)) size = mod.getChildCount(parent);
if (!treeModel.isLeaf(parent)) size = treeModel.getChildCount(parent);
Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index == 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return mod.getChild(parent, index);
return treeModel.getChild(parent, index);
Object getNextSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) + 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index == 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{
{
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreePath current = null;
TreePath current = null;
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (node != null)
if (node != null)
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (next != null)
if (next != null)
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (tree.isVisible(current)) return next;
if (tree.isVisible(current)) return next;
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
while (next != null && !tree.isVisible(current)) {
while (next != null && !tree.isVisible(current)) {
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return next; }
return next; }
Object getNextVisibleNode(Object node) { Object next = null; TreePath current = null; if (node != null) next = getNextNode(node); if (next != null) { current = new TreePath(getPathToRoot(next, 0)); if (tree.isVisible(current)) return next; while (next != null && !tree.isVisible(current)) { next = getNextNode(next); if (next != null) current = new TreePath(getPathToRoot(next, 0)); } } return next; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ if (path != null)
{ if (path != null)
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object cell = path.getLastPathComponent();
Object cell = path.getLastPathComponent();
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel(); if (mod != null)
if (treeModel != null)
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object root = mod.getRoot();
Object root = treeModel.getRoot();
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
root = getNextNode(root);
root = getNextNode(root);
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell);
Point loc = getCellLocation(0, 0, tree, treeModel, cell, root); return getCellBounds(loc.x, loc.y, cell); }
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
} return null; }
return null; }
public Rectangle getPathBounds(JTree tree, TreePath path) { if (path != null) { Object cell = path.getLastPathComponent(); TreeModel mod = tree.getModel(); if (mod != null) { Object root = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) root = getNextNode(root); Point loc = getCellLocation(0, 0, tree, mod, cell, root); return getCellBounds(loc.x, loc.y, cell); } } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ TreeModel mod = tree.getModel(); if (mod != null)
{ if (treeModel != null)
public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node);
Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node);
public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
for (int i = 0; i < row; i++) node = getNextVisibleNode(node);
for (int i = 0; i < row; i++) node = getNextVisibleNode(node);
public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (node == null) return null;
if (node == null) return null;
public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return new TreePath(getPathToRoot(node, 0)); }
return new TreePath(getPathToRoot(node, 0)); }
public TreePath getPathForRow(JTree tree, int row) { TreeModel mod = tree.getModel(); if (mod != null) { Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node); for (int i = 0; i < row; i++) node = getNextVisibleNode(node); if (node == null) return null; return new TreePath(getPathToRoot(node, 0)); } return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel();
Object[] getPathToRoot(Object node, int depth) { TreeModel mod = tree.getModel(); if (node == null) { if (depth == 0) return null; return new Object[depth]; } Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); path[path.length - depth - 1] = node; return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object[] getPathToRoot(Object node, int depth) { TreeModel mod = tree.getModel(); if (node == null) { if (depth == 0) return null; return new Object[depth]; } Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); path[path.length - depth - 1] = node; return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1);
Object[] path = getPathToRoot(getParent(treeModel.getRoot(), node), depth + 1);
Object[] getPathToRoot(Object node, int depth) { TreeModel mod = tree.getModel(); if (node == null) { if (depth == 0) return null; return new Object[depth]; } Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); path[path.length - depth - 1] = node; return path; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return null; }
{ return null; }
public Dimension getPreferredMinSize() { // FIXME: not implemented return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ return getPreferredSize(c, false); }
{ return getPreferredSize(c, false); }
public Dimension getPreferredSize(JComponent c) { return getPreferredSize(c, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
Object parent = getParent(treeModel.getRoot(), node);
Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); while (size > 0) { sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); else size = 0; } return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); while (size > 0) { sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); else size = 0; } return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling);
if (!treeModel.isLeaf(sibling)) size = treeModel.getChildCount(sibling);
Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); while (size > 0) { sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); else size = 0; } return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
{ sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling);
{ sibling = treeModel.getChild(sibling, size - 1); if (!treeModel.isLeaf(sibling)) size = treeModel.getChildCount(sibling);
Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); while (size > 0) { sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); else size = 0; } return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
}
}
Object getPreviousNode(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; Object sibling = getPreviousSibling(node); if (sibling == null) return parent; int size = 0; if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); while (size > 0) { sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling); else size = 0; } return sibling; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node);
Object parent = getParent(treeModel.getRoot(), node);
Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index < 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
int index = mod.getIndexOfChild(parent, node) - 1;
int index = treeModel.getIndexOfChild(parent, node) - 1;
Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index < 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
if (!mod.isLeaf(parent)) size = mod.getChildCount(parent);
if (!treeModel.isLeaf(parent)) size = treeModel.getChildCount(parent);
Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index < 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
return mod.getChild(parent, index);
return treeModel.getChild(parent, index);
Object getPreviousSibling(Object node) { TreeModel mod = tree.getModel(); Object parent = getParent(mod.getRoot(), node); if (parent == null) return null; int index = mod.getIndexOfChild(parent, node) - 1; int size = 0; if (!mod.isLeaf(parent)) size = mod.getChildCount(parent); if (index < 0 || index >= size) return null; return mod.getChild(parent, index); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java