rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
return selectionModel.isPathSelected(getPathForRow(row));
return selectionModel.isPathSelected(getPathForRow(row));
public boolean isRowSelected(int row) { return selectionModel.isPathSelected(getPathForRow(row)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTree.java/buggy/core/src/classpath/javax/javax/swing/JTree.java
public SizeRequirements() { }
public SizeRequirements() { this (0, 0, 0, 0.5F); }
public SizeRequirements() { // TODO } // SizeRequirements()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
public static int[] adjustSizes(int delta, SizeRequirements[] children) {
public static int[] adjustSizes(int delta, SizeRequirements[] children) {
public static int[] adjustSizes(int delta, SizeRequirements[] children) { return null; // TODO } // adjustSizes()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
}
}
public static int[] adjustSizes(int delta, SizeRequirements[] children) { return null; // TODO } // adjustSizes()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { }
SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) { calculateTiledPositions(allocated, total, children, offsets, spans, true); }
public static void calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateAlignedPositions()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { }
SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) { calculateTiledPositions(allocated, total, children, offsets, spans, true); }
public static void calculateTiledPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offset, int[] spans) { // TODO } // calculateTiledPositions()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
public static SizeRequirements getAlignedSizeRequirements( SizeRequirements[] children) {
getAlignedSizeRequirements(SizeRequirements[] children) {
public static SizeRequirements getAlignedSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getAlignedSizeRequirements()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
}
}
public static SizeRequirements getAlignedSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getAlignedSizeRequirements()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
public static SizeRequirements getTiledSizeRequirements( SizeRequirements[] children) { return null; }
getTiledSizeRequirements(SizeRequirements[] children) { SizeRequirements result = new SizeRequirements(); for (int i = 0; i < children.length; i++) { result.minimum += children[i].minimum; result.preferred += children[i].preferred; result.maximum += children[i].maximum; } return result; }
public static SizeRequirements getTiledSizeRequirements( SizeRequirements[] children) { return null; // TODO } // getTiledSizeRequirements()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
public String toString() {
public String toString() {
public String toString() { return null; // TODO } // toString()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
}
}
public String toString() { return null; // TODO } // toString()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/SizeRequirements.java/clean/core/src/classpath/javax/javax/swing/SizeRequirements.java
public boolean isFocusCycleRoot ()
public boolean isFocusCycleRoot (Container c)
public boolean isFocusCycleRoot () { return focusCycleRoot; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Container.java/buggy/core/src/classpath/java/java/awt/Container.java
return focusCycleRoot;
if (this == c && isFocusCycleRoot ()) return true; Container ancestor = getFocusCycleRootAncestor (); if (c == ancestor) return true; return false;
public boolean isFocusCycleRoot () { return focusCycleRoot; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b0bcdc7c5655d1ed77837894a9de15b7556d346b/Container.java/buggy/core/src/classpath/java/java/awt/Container.java
catch (ThreadDeath death) { throw death; }
public SecureRandom() { Provider[] p = Security.getProviders(); //Format of Key: SecureRandom.algname String key; String classname = null; int i; Enumeration e; for (i = 0; i < p.length; i++) { e = p[i].propertyNames(); while (e.hasMoreElements()) { key = (String) e.nextElement(); if (key.startsWith("SECURERANDOM.")) { if ((classname = p[i].getProperty(key)) != null) { try { secureRandomSpi = (SecureRandomSpi) Class. forName(classname).newInstance(); provider = p[i]; return; } catch (Throwable t) { // Ignore. } } } } } // Nothing found. Fall back to SHA1PRNG secureRandomSpi = new gnu.java.security.provider.SHA1PRNG(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/SecureRandom.java/buggy/core/src/classpath/java/java/security/SecureRandom.java
if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored");
if (Configuration.DEBUG) log.fine("SecurityManager forbids reading system properties. Ignored");
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
if (DEBUG) debug("Setting " + name + " to '" + s + "'");
if (Configuration.DEBUG) log.fine("Setting " + name + " to '" + s + "'");
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored");
if (Configuration.DEBUG) log.fine("Invalid value for -D" + name + ": " + s + ". Ignored");
private void handleBooleanProperty(final String name) { String s = null; try { s = System.getProperty(name); } catch (SecurityException x) { if (DEBUG) debug("SecurityManager forbids reading system properties. Ignored"); } if (s != null) { s = s.trim().toLowerCase(); // we have to test for explicit "true" or "false". anything else may // hide valid value set previously if (s.equals(TRUE) || s.equals(FALSE)) { if (DEBUG) debug("Setting " + name + " to '" + s + "'"); props.put(name, s); } else { if (DEBUG) debug("Invalid value for -D" + name + ": " + s + ". Ignored"); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored.");
if (Configuration.DEBUG) log.fine("Reading property " + PROPERTIES_FILE + " not allowed. Ignored.");
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage());
if (Configuration.DEBUG) log.fine("IO error reading " + propFile + ": " + ioe.getMessage());
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
if (DEBUG) debug("Security error reading " + propFile + ": "
if (Configuration.DEBUG) log.fine("Security error reading " + propFile + ": "
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue();
reproducible = Boolean.valueOf((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = Boolean.valueOf((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = Boolean.valueOf((String) props.get(DO_RSA_BLINDING)).booleanValue();
private void init() { // default values props.put(REPRODUCIBLE_PRNG, (reproducible ? "true" : "false")); props.put(CHECK_WEAK_KEYS, (checkForWeakKeys ? "true" : "false")); props.put(DO_RSA_BLINDING, (doRSABlinding ? "true" : "false")); // 1. allow site-wide override by reading a properties file String propFile = null; try { propFile = (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(PROPERTIES_FILE); } }); } catch (SecurityException se) { if (DEBUG) debug("Reading property " + PROPERTIES_FILE + " not allowed. Ignored."); } if (propFile != null) { try { final java.util.Properties temp = new java.util.Properties(); final FileInputStream fin = new FileInputStream(propFile); temp.load(fin); temp.list(System.out); props.putAll(temp); } catch (IOException ioe) { if (DEBUG) debug("IO error reading " + propFile + ": " + ioe.getMessage()); } catch (SecurityException se) { if (DEBUG) debug("Security error reading " + propFile + ": " + se.getMessage()); } } // 2. allow vm-specific override by allowing -D options in launcher handleBooleanProperty(REPRODUCIBLE_PRNG); handleBooleanProperty(CHECK_WEAK_KEYS); handleBooleanProperty(DO_RSA_BLINDING); // re-sync the 'known' properties reproducible = new Boolean((String) props.get(REPRODUCIBLE_PRNG)).booleanValue(); checkForWeakKeys = new Boolean((String) props.get(CHECK_WEAK_KEYS)).booleanValue(); doRSABlinding = new Boolean((String) props.get(DO_RSA_BLINDING)).booleanValue(); // This does not change. props.put(VERSION, Registry.VERSION_STRING); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7172738fba4eab23190cf62c40a31b7348ab1677/Properties.java/clean/core/src/classpath/gnu/gnu/java/security/Properties.java
setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon"));
setExpandedIcon(defaults.getIcon("Tree.expandedIcon")); setCollapsedIcon(defaults.getIcon("Tree.collapsedIcon"));
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
mouseInputListener = new MouseInputHandler(null, null, null);
mouseListener = createMouseListener();
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
tree.addMouseListener(mouseInputListener);
tree.addMouseListener(mouseListener);
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); }
public void installUI(JComponent c) { tree = (JTree) c; configureLayoutCache(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); tree.setFont(defaults.getFont("Tree.font")); tree.setForeground(defaults.getColor("Tree.foreground")); tree.setBackground(defaults.getColor("Tree.background")); tree.setOpaque(true); tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); rightChildIndent = defaults.getInt("Tree.rightChildIndent"); leftChildIndent = defaults.getInt("Tree.leftChildIndent"); setRowHeight(defaults.getInt("Tree.rowHeight")); tree.requestFocusInWindow(false); setExpandedIcon(defaults.getIcon("Tree.openIcon")); setCollapsedIcon(defaults.getIcon("Tree.closedIcon")); currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; TreeModel mod = tree.getModel(); setModel(mod); if (mod != null) { TreePath path = new TreePath(mod.getRoot()); if (!tree.isExpanded(path)) toggleExpandState(path); } treeSelectionModel = tree.getSelectionModel(); drawingCache = new Hashtable(); nodeDimensions = createNodeDimensions(); propertyChangeListener = createPropertyChangeListener(); focusListener = createFocusListener(); treeSelectionListener = createTreeSelectionListener(); mouseInputListener = new MouseInputHandler(null, null, null); keyListener = createKeyListener(); selectionModelPropertyChangeListener = createSelectionModelPropertyChangeListener(); componentListener = createComponentListener(); cellEditorListener = createCellEditorListener(); treeExpansionListener = createTreeExpansionListener(); treeModelListener = createTreeModelListener(); editingRow = -1; lastSelectedRow = -1; installKeyboardActions(); tree.addPropertyChangeListener(propertyChangeListener); tree.addFocusListener(focusListener); tree.addTreeSelectionListener(treeSelectionListener); tree.addMouseListener(mouseInputListener); tree.addKeyListener(keyListener); tree.addPropertyChangeListener(selectionModelPropertyChangeListener); tree.addComponentListener(componentListener); tree.addTreeExpansionListener(treeExpansionListener); if (treeModel != null) treeModel.addTreeModelListener(treeModelListener); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
tree.removeMouseListener(mouseInputListener);
tree.removeMouseListener(mouseListener);
public void uninstallUI(JComponent c) { tree.setFont(null); tree.setForeground(null); tree.setBackground(null); uninstallKeyboardActions(); tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseInputListener); tree.removeKeyListener(keyListener); tree.removePropertyChangeListener(selectionModelPropertyChangeListener); tree.removeComponentListener(componentListener); tree.removeTreeExpansionListener(treeExpansionListener); TreeCellEditor tce = tree.getCellEditor(); if (tce != null) tce.removeCellEditorListener(cellEditorListener); TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener); tree = null; uninstallComponents(); completeUIUninstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
installDefaults((JTree) c);
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeModel mod = tree.getModel(); setModel(mod); tree.setRootVisible(true); if (mod != null) tree.expandPath(new TreePath(mod.getRoot())); treeSelectionModel = tree.getSelectionModel(); installKeyboardActions(); installListeners(); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
installDefaults();
public void installUI(JComponent c) { super.installUI(c); installDefaults((JTree) c); tree = (JTree) c; currentCellRenderer = createDefaultCellRenderer(); rendererPane = createCellRendererPane(); createdRenderer = true; setCellEditor(createDefaultCellEditor()); createdCellEditor = true; isEditing = false; TreeModel mod = tree.getModel(); setModel(mod); tree.setRootVisible(true); if (mod != null) tree.expandPath(new TreePath(mod.getRoot())); treeSelectionModel = tree.getSelectionModel(); installKeyboardActions(); installListeners(); completeUIInstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
public void setRowHeight(int height) { if (rowHeight == height) return; int oldValue = rowHeight; rowHeight = height; firePropertyChange(ROW_HEIGHT_PROPERTY, oldValue, height); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTree.java/buggy/core/src/classpath/javax/javax/swing/JTree.java
uninstallDefaults((JTree) c);
uninstallDefaults();
public void uninstallUI(JComponent c) { uninstallDefaults((JTree) c); uninstallKeyboardActions(); uninstallListeners(); tree = null; completeUIUninstall(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicTreeUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicTreeUI.java
protected void reindex()
private void reindex()
protected void reindex() { Element[] lines; try { String str = content.getString(0, content.length()); ArrayList elts = new ArrayList(); int j = 0; for (int i = str.indexOf('\n', 0); i != -1; i = str.indexOf('\n', i + 1)) { elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1)); j = i + 1; } if (j < content.length()) elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, content.length())); lines = new Element[elts.size()]; for (int i = 0; i < elts.size(); ++i) lines[i] = (Element) elts.get(i); } catch (BadLocationException e) { lines = new Element[1]; lines[0] = createLeafElement(rootElement, SimpleAttributeSet.EMPTY, 0, 1); } ((BranchElement) rootElement).replace(0, rootElement.getElementCount(), lines); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/PlainDocument.java/buggy/core/src/classpath/javax/javax/swing/text/PlainDocument.java
throws NotImplementedException
public void keyPressed(KeyEvent e) throws NotImplementedException { // FIXME: This method calls JComboBox.selectWithKeyChar if the key that // was pressed is not a navigation key. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
if (comboBox.getModel().getSize() != 0 && comboBox.isEnabled()) { if (! isNavigationKey(e.getKeyCode())) { if (! comboBox.isEditable()) if (comboBox.selectWithKeyChar(e.getKeyChar())) e.consume(); } else { if (e.getKeyCode() == KeyEvent.VK_UP && comboBox.isPopupVisible()) selectPreviousPossibleValue(); else if (e.getKeyCode() == KeyEvent.VK_DOWN) { if (comboBox.isPopupVisible()) selectNextPossibleValue(); else comboBox.showPopup(); } else if (e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_ESCAPE) popup.hide(); } }
public void keyPressed(KeyEvent e) throws NotImplementedException { // FIXME: This method calls JComboBox.selectWithKeyChar if the key that // was pressed is not a navigation key. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
arrowButton.putClientProperty(BasicLookAndFeel.DONT_CANCEL_POPUP, Boolean.TRUE);
public void configureArrowButton() { if (arrowButton != null) { arrowButton.setEnabled(comboBox.isEnabled()); arrowButton.setFocusable(false); if (popupMouseListener != null) arrowButton.addMouseListener(popupMouseListener); if (popupMouseMotionListener != null) arrowButton.addMouseMotionListener(popupMouseMotionListener); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
if (keyListener != null) editor.addKeyListener(keyListener);
protected void configureEditor() { editor.setFont(comboBox.getFont()); if (popupKeyListener != null) editor.addKeyListener(popupKeyListener); comboBox.configureEditor(comboBox.getEditor(), comboBox.getSelectedItem()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
throws NotImplementedException
public Accessible getAccessibleChild(JComponent c, int i) throws NotImplementedException { // FIXME: Need to implement return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
return null;
Accessible child = null; switch (i) { case 0: if (popup instanceof Accessible) { AccessibleContext ctx = ((Accessible) popup).getAccessibleContext(); ctx.setAccessibleParent(comboBox); child = (Accessible) popup; } break; case 1: if (comboBox.isEditable() && editor instanceof Accessible) { AccessibleContext ctx = ((Accessible) editor).getAccessibleContext(); ctx.setAccessibleParent(comboBox); child = (Accessible) editor; } break; } return child;
public Accessible getAccessibleChild(JComponent c, int i) throws NotImplementedException { // FIXME: Need to implement return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
throws NotImplementedException
public int getAccessibleChildrenCount(JComponent c) throws NotImplementedException { // FIXME: Need to implement return 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
return 0;
int count = 1; if (comboBox.isEditable()) count = 2; return count;
public int getAccessibleChildrenCount(JComponent c) throws NotImplementedException { // FIXME: Need to implement return 0; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
Component comp = renderer.getListCellRendererComponent (listBox, prototype, -1, false, false);
Component comp = renderer.getListCellRendererComponent(listBox, prototype, -1, false, false);
protected Dimension getDisplaySize() { Dimension dim = new Dimension(); ListCellRenderer renderer = comboBox.getRenderer(); if (renderer == null) { renderer = DEFAULT_RENDERER; } Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { Component comp = renderer.getListCellRendererComponent (listBox, prototype, -1, false, false); currentValuePane.add(comp); comp.setFont(comboBox.getFont()); Dimension renderSize = comp.getPreferredSize(); currentValuePane.remove(comp); dim.height = renderSize.height; dim.width = renderSize.width; } else { ComboBoxModel model = comboBox.getModel(); int size = model.getSize(); if (size > 0) { for (int i = 0; i < size; ++i) { Component comp = renderer.getListCellRendererComponent (listBox, model.getElementAt(i), -1, false, false); currentValuePane.add(comp); comp.setFont(comboBox.getFont()); Dimension renderSize = comp.getPreferredSize(); currentValuePane.remove(comp); dim.width = Math.max(dim.width, renderSize.width); dim.height = Math.max(dim.height, renderSize.height); } } else { dim = getDefaultSize(); if (comboBox.isEditable()) dim.width = 100; } } if (comboBox.isEditable()) { Dimension editSize = editor.getPreferredSize(); dim.width = Math.max(dim.width, editSize.width); dim.height = Math.max(dim.height, editSize.height); } displaySize.setSize(dim.width, dim.height); return dim; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
Component comp = renderer.getListCellRendererComponent (listBox, model.getElementAt(i), -1, false, false);
Component comp = renderer.getListCellRendererComponent(listBox, model.getElementAt(i), -1, false, false);
protected Dimension getDisplaySize() { Dimension dim = new Dimension(); ListCellRenderer renderer = comboBox.getRenderer(); if (renderer == null) { renderer = DEFAULT_RENDERER; } Object prototype = comboBox.getPrototypeDisplayValue(); if (prototype != null) { Component comp = renderer.getListCellRendererComponent (listBox, prototype, -1, false, false); currentValuePane.add(comp); comp.setFont(comboBox.getFont()); Dimension renderSize = comp.getPreferredSize(); currentValuePane.remove(comp); dim.height = renderSize.height; dim.width = renderSize.width; } else { ComboBoxModel model = comboBox.getModel(); int size = model.getSize(); if (size > 0) { for (int i = 0; i < size; ++i) { Component comp = renderer.getListCellRendererComponent (listBox, model.getElementAt(i), -1, false, false); currentValuePane.add(comp); comp.setFont(comboBox.getFont()); Dimension renderSize = comp.getPreferredSize(); currentValuePane.remove(comp); dim.width = Math.max(dim.width, renderSize.width); dim.height = Math.max(dim.height, renderSize.height); } } else { dim = getDefaultSize(); if (comboBox.isEditable()) dim.width = 100; } } if (comboBox.isEditable()) { Dimension editSize = editor.getPreferredSize(); dim.width = Math.max(dim.width, editSize.width); dim.height = Math.max(dim.height, editSize.height); } displaySize.setSize(dim.width, dim.height); return dim; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
editor.addFocusListener(focusListener);
comboBox.addFocusListener(focusListener);
protected void installListeners() { // install combo box's listeners propertyChangeListener = createPropertyChangeListener(); comboBox.addPropertyChangeListener(propertyChangeListener); focusListener = createFocusListener(); editor.addFocusListener(focusListener); itemListener = createItemListener(); comboBox.addItemListener(itemListener); keyListener = createKeyListener(); comboBox.addKeyListener(keyListener); // install listeners that listen to combo box model listDataListener = createListDataListener(); comboBox.getModel().addListDataListener(listDataListener); // Install mouse and key listeners from the popup. popupMouseListener = popup.getMouseListener(); comboBox.addMouseListener(popupMouseListener); popupMouseMotionListener = popup.getMouseMotionListener(); comboBox.addMouseMotionListener(popupMouseMotionListener); popupKeyListener = popup.getKeyListener(); comboBox.addKeyListener(popupKeyListener); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
comboBox.putClientProperty(BasicLookAndFeel.DONT_CANCEL_POPUP, Boolean.TRUE);
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JComboBox) { isMinimumSizeDirty = true; comboBox = (JComboBox) c; installDefaults(); // Set editor and renderer for the combo box. Editor is used // only if combo box becomes editable, otherwise renderer is used // to paint the selected item; combobox is not editable by default. ListCellRenderer renderer = comboBox.getRenderer(); if (renderer == null || renderer instanceof UIResource) comboBox.setRenderer(createRenderer()); ComboBoxEditor currentEditor = comboBox.getEditor(); if (currentEditor == null || currentEditor instanceof UIResource) { currentEditor = createEditor(); comboBox.setEditor(currentEditor); } editor = currentEditor.getEditorComponent(); installComponents(); installListeners(); if (arrowButton != null) configureArrowButton(); if (editor != null) configureEditor(); comboBox.setLayout(createLayoutManager()); comboBox.setFocusable(true); installKeyboardActions(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
throws NotImplementedException
protected boolean isNavigationKey(int keyCode) throws NotImplementedException { // FIXME: Need to implement return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
return false;
return keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN || keyCode == KeyEvent.VK_LEFT || keyCode == KeyEvent.VK_RIGHT || keyCode == KeyEvent.VK_ENTER || keyCode == KeyEvent.VK_ESCAPE || keyCode == KeyEvent.VK_TAB;
protected boolean isNavigationKey(int keyCode) throws NotImplementedException { // FIXME: Need to implement return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
if (index != 0)
if (index > 0)
protected void selectPreviousPossibleValue() { int index = comboBox.getSelectedIndex(); if (index != 0) comboBox.setSelectedIndex(index - 1); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
if (keyListener != null) editor.removeKeyListener(keyListener);
protected void unconfigureEditor() { if (popupKeyListener != null) editor.removeKeyListener(popupKeyListener); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboBoxUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus);
Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus);
Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/ListCellRenderer.java/buggy/core/src/classpath/javax/javax/swing/ListCellRenderer.java
public static Object get(Object key)
public static Object get(Object key)
public static Object get(Object key) { return getLookAndFeelDefaults().get(key); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/UIManager.java/buggy/core/src/classpath/javax/javax/swing/UIManager.java
firePropertyChange("renderer", oldRenderer, renderer);
firePropertyChange("renderer", oldRenderer, renderer);
public void setRenderer(ListCellRenderer aRenderer) { if (renderer != aRenderer) { ListCellRenderer oldRenderer = renderer; renderer = aRenderer; firePropertyChange("renderer", oldRenderer, renderer); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) {
if (selectedItem != null) { if (dataModel instanceof DefaultComboBoxModel)
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
} else {
else {
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
for(int i=0; i < size; i++) {
for (int i = 0; i < size; i++) {
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
if((selectedItem != null) ? selectedItem.equals(o) : o == null) {
if ((selectedItem != null) ? selectedItem.equals(o) : o == null)
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
}
public int getSelectedIndex() { Object selectedItem = getSelectedItem(); if (selectedItem != null) { if(dataModel instanceof DefaultComboBoxModel) { // Uses special method of DefaultComboBoxModel to retrieve the index. return ((DefaultComboBoxModel) dataModel).getIndexOf(selectedItem); } else { // Iterates over all items to retrieve the index. int size = dataModel.getSize(); for(int i=0; i < size; i++) { Object o = dataModel.getElementAt(i); // XXX: Is special handling of ComparableS neccessary? if((selectedItem != null) ? selectedItem.equals(o) : o == null) { return i; } } } } // returns that no item is currently selected return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
if(index < -1 || index >= dataModel.getSize()) {
if (index < -1 || index >= dataModel.getSize())
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
} else { /* Selects the item at the given index or clears the selection if the * index value is -1. */
else
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
}
public void setSelectedIndex(int index) { if(index < -1 || index >= dataModel.getSize()) { // Fails because index is out of bounds. throw new IllegalArgumentException("illegal index: " + index); } else { /* Selects the item at the given index or clears the selection if the * index value is -1. */ setSelectedItem((index == -1) ? null : dataModel.getElementAt(index)); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComboBox.java/buggy/core/src/classpath/javax/javax/swing/JComboBox.java
+ service_context.context_id, 15, CompletionStatus.COMPLETED_NO);
+ service_context.context_id, 15, CompletionStatus.COMPLETED_NO);
public static void add(org.omg.IOP.ServiceContext[] cx, org.omg.IOP.ServiceContext service_context, boolean replace) { int exists = -1; for (int i = 0; i < cx.length; i++) if (cx[i].context_id == service_context.context_id) exists = i; if (exists < 0) { // Add context. org.omg.IOP.ServiceContext[] n = new org.omg.IOP.ServiceContext[cx.length + 1]; for (int i = 0; i < cx.length; i++) n[i] = cx[i]; n[cx.length] = service_context; } else { // Replace context. if (!replace) throw new BAD_INV_ORDER("Repetetive setting of the context " + service_context.context_id, 15, CompletionStatus.COMPLETED_NO); else cx[exists] = service_context; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/ServiceContext.java/buggy/core/src/classpath/gnu/gnu/CORBA/GIOP/ServiceContext.java
surface.draw(shape, transform, getColor(), mode);
surface.draw(shape, clip, transform, getColor(), mode);
public final void draw(Shape shape) { surface.draw(shape, transform, getColor(), mode); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractSurfaceGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) {
public final boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) {
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { try { final Raster raster = getCompatibleRaster(image); surface.drawCompatibleRaster(raster, 0, 0, x, y, raster.getWidth(), raster.getHeight(), bgcolor); return true; } catch (InterruptedException ex) { return false; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractSurfaceGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
public void drawRenderableImage(RenderableImage image, AffineTransform xform) {
public final void drawRenderableImage(RenderableImage image, AffineTransform xform) {
public void drawRenderableImage(RenderableImage image, AffineTransform xform) { drawRenderedImage(image.createDefaultRendering(), xform); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractSurfaceGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
public void drawRenderedImage(RenderedImage image, AffineTransform xform) {
public final void drawRenderedImage(RenderedImage image, AffineTransform xform) {
public void drawRenderedImage(RenderedImage image, AffineTransform xform) { // TODO Auto-generated method stub }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractSurfaceGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
surface.fill(shape, transform, getColor(), mode);
surface.fill(shape, clip, transform, getColor(), mode);
public final void fill(Shape shape) { surface.fill(shape, transform, getColor(), mode); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractSurfaceGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractSurfaceGraphics.java
public AbstractGraphics(AbstractGraphics src) { this.bgColor = src.bgColor; this.fgColor = src.fgColor; this.xorColor = src.xorColor; this.font = src.font; this.clip = src.clip; this.stroke = src.stroke; this.transform = new AffineTransform(src.transform); this.paint = src.paint; this.composite = src.composite;
public AbstractGraphics(int width, int height) { clip = new Rectangle(0, 0, width, height);
public AbstractGraphics(AbstractGraphics src) { this.bgColor = src.bgColor; this.fgColor = src.fgColor; this.xorColor = src.xorColor; this.font = src.font; this.clip = src.clip; this.stroke = src.stroke; this.transform = new AffineTransform(src.transform); this.paint = src.paint; this.composite = src.composite; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public void draw(Shape shape, AffineTransform tx, Color color, int mode);
public void draw(Shape shape, Shape clip, AffineTransform tx, Color color, int mode);
public void draw(Shape shape, AffineTransform tx, Color color, int mode);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/Surface.java/buggy/gui/src/driver/org/jnode/driver/video/Surface.java
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { return false;
public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y) { final Image img1 = op.filter(image, null); drawImage(img1, new AffineTransform(1f, 0f, 0f, 1f, x, y), null);
public boolean drawImage(Image image, int x, int y, Color bgcolor, ImageObserver observer) { // TODO Auto-generated method stub return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/AbstractGraphics.java/buggy/gui/src/awt/org/jnode/awt/util/AbstractGraphics.java
public JNodeImage(ImageProducer producer) { this.initProducer = producer; this.colorModel = ColorModel.getRGBdefault();
public JNodeImage(int width, int height) { this(width, height, ColorModel.getRGBdefault());
public JNodeImage(ImageProducer producer) { this.initProducer = producer; this.colorModel = ColorModel.getRGBdefault(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/JNodeImage.java/buggy/gui/src/awt/org/jnode/awt/image/JNodeImage.java
public void fill(Shape shape, AffineTransform tx, Color color, int mode);
public void fill(Shape shape, Shape clip, AffineTransform tx, Color color, int mode);
public void fill(Shape shape, AffineTransform tx, Color color, int mode);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4557d0702a8d0890ae78e109ce9a6ba79d7a5beb/Surface.java/buggy/gui/src/driver/org/jnode/driver/video/Surface.java
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB)
public PixelGrabber(Image img, int x, int y, int w, int h, int pix[], int off, int scansize)
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/PixelGrabber.java/buggy/core/src/classpath/java/java/awt/image/PixelGrabber.java
this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB;
this (img.getSource(), x, y, w, h, pix, off, scansize);
public PixelGrabber(Image img, int x, int y, int w, int h, boolean forceRGB) { this.ip = img.getSource(); this.x = x; this.y = y; width = w; height = h; // If width or height is negative, postpone pixel buffer // initialization until setDimensions is called back by ip. if (width >= 0 && height >= 0) { int_pixel_buffer = new int[width * height]; byte_pixel_buffer = new byte[width * height]; } this.forceRGB = forceRGB; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/f9edc08acdeb1f2f4fe82f01243818bd374a3e46/PixelGrabber.java/buggy/core/src/classpath/java/java/awt/image/PixelGrabber.java
bad.minor = Minor.Any;
public static IOR extract(Any any) { try { return ((IORHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("IOR expected"); bad.initCause(cex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/IORHelper.java/clean/core/src/classpath/org/org/omg/IOP/IORHelper.java
m.minor = Minor.Encapsulation;
public static void write(OutputStream output, TaggedProfile value) { output.write_long(value.tag); if (output instanceof cdrBufOutput) { // Highly probable. output.write_long(value.profile_data.length); try { output.write(value.profile_data); } catch (IOException e) { MARSHAL m = new MARSHAL(); m.initCause(e); throw m; } } else { output.write_long(value.profile_data.length); for (int i0 = 0; i0 < value.profile_data.length; i0++) output.write_octet(value.profile_data[i0]); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/TaggedProfileHelper.java/buggy/core/src/classpath/org/org/omg/IOP/TaggedProfileHelper.java
return ((JViewport) getParent()).getHeight() > getPreferredSize().height;
return getParent().getHeight() > getPreferredSize().height;
public boolean getScrollableTracksViewportHeight() { if (getParent() instanceof JViewport) return ((JViewport) getParent()).getHeight() > getPreferredSize().height; return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
return ((JViewport) getParent()).getWidth() > getPreferredSize().width;
return getParent().getWidth() > getPreferredSize().width;
public boolean getScrollableTracksViewportWidth() { if (getParent() instanceof JViewport) return ((JViewport) getParent()).getWidth() > getPreferredSize().width; return false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/JTextComponent.java/clean/core/src/classpath/javax/javax/swing/text/JTextComponent.java
public String getToolTipText(MouseEvent event) { return getToolTipText(); }
public String getToolTipText() { return toolTipText; }
public String getToolTipText(MouseEvent event) { return getToolTipText(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComponent.java/buggy/core/src/classpath/javax/javax/swing/JComponent.java
if (fs.getSelectedItem() != null) { changes.firePropertyChange(this,"print.font", getStringProperty("print.font"), (String)fs.getSelectedItem()); setProperty("print.font",(String)fs.getSelectedItem()); }
public void applyAttributes() { if (defaultPrinter.isSelected()) { changes.firePropertyChange(this,"defaultPrinter", getStringProperty("defaultPrinter"), "Yes"); setProperty("defaultPrinter","Yes"); } else { changes.firePropertyChange(this,"defaultPrinter", getStringProperty("defaultPrinter"), "No"); setProperty("defaultPrinter","No"); } // portrait parameters changes.firePropertyChange(this,"print.portWidth", getStringProperty("print.portWidth"), new Double(pappyPort.getWidth())); setProperty("print.portWidth",Double.toString(pappyPort.getWidth())); changes.firePropertyChange(this,"print.portImageWidth", getStringProperty("print.portImageWidth"), new Double(pappyPort.getImageableWidth())); setProperty("print.portImageWidth",Double.toString(pappyPort.getImageableWidth())); changes.firePropertyChange(this,"print.portHeight", getStringProperty("print.portHeight"), new Double(pappyPort.getHeight())); setProperty("print.portHeight",Double.toString(pappyPort.getHeight())); changes.firePropertyChange(this,"print.portImageHeight", getStringProperty("print.portImageHeight"), new Double(pappyPort.getImageableHeight())); setProperty("print.portImageHeight",Double.toString(pappyPort.getImageableHeight())); changes.firePropertyChange(this,"print.portImage.X", getStringProperty("print.portImage.X"), new Double(pappyPort.getImageableX())); setProperty("print.portImage.X",Double.toString(pappyPort.getImageableX())); changes.firePropertyChange(this,"print.portImage.Y", getStringProperty("print.portImage.Y"), new Double(pappyPort.getImageableY())); setProperty("print.portImage.Y",Double.toString(pappyPort.getImageableY())); // landscape parameters changes.firePropertyChange(this,"print.landWidth", getStringProperty("print.landWidth"), new Double(pappyLand.getWidth())); setProperty("print.landWidth",Double.toString(pappyLand.getWidth())); changes.firePropertyChange(this,"print.landImageWidth", getStringProperty("print.landImageWidth"), new Double(pappyLand.getImageableWidth())); setProperty("print.landImageWidth",Double.toString(pappyLand.getImageableWidth())); changes.firePropertyChange(this,"print.landHeight", getStringProperty("print.landHeight"), new Double(pappyLand.getHeight())); setProperty("print.landHeight",Double.toString(pappyLand.getHeight())); changes.firePropertyChange(this,"print.landImageHeight", getStringProperty("print.landImageHeight"), new Double(pappyLand.getImageableHeight())); setProperty("print.landImageHeight",Double.toString(pappyLand.getImageableHeight())); changes.firePropertyChange(this,"print.landImage.X", getStringProperty("print.landImage.X"), new Double(pappyLand.getImageableX())); setProperty("print.landImage.X",Double.toString(pappyLand.getImageableX())); changes.firePropertyChange(this,"print.landImage.Y", getStringProperty("print.landImage.Y"), new Double(pappyLand.getImageableY())); setProperty("print.landImage.Y",Double.toString(pappyLand.getImageableY())); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/df65a89f3874249d9a0046d2eba72cb4360e1f37/PrinterAttributesPanel.java/clean/tn5250j/src/org/tn5250j/settings/PrinterAttributesPanel.java
page.add(setPortAttributes); page.add(setLandAttributes);
JPanel pagePage = new JPanel();
public void initPanel() throws Exception { setLayout(new BorderLayout()); contentPane = new JPanel(); contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.Y_AXIS)); add(contentPane,BorderLayout.NORTH); // define ppPanel panel JPanel ppp = new JPanel(); ppp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.print"))); defaultPrinter = new JCheckBox(LangTool.getString("sa.defaultPrinter")); if (getStringProperty("defaultPrinter").equals("Yes")) defaultPrinter.setSelected(true); ppp.add(defaultPrinter); //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); // will have to remember this for the next time. // Always set a page format before call setPrintable to // set the orientation. PageFormat pf = printJob.defaultPage(); pappyPort = pf.getPaper(); pappyLand = pf.getPaper(); // Portrait paper parameters if (getStringProperty("print.portWidth").length() != 0 && getStringProperty("print.portHeight").length() != 0 && getStringProperty("print.portImageWidth").length() != 0 && getStringProperty("print.portImageHeight").length() != 0 && getStringProperty("print.portImage.X").length() != 0 && getStringProperty("print.portImage.Y").length() != 0) { pappyPort.setSize(Double.parseDouble(getStringProperty("print.portWidth")), Double.parseDouble(getStringProperty("print.portHeight"))); pappyPort.setImageableArea(Double.parseDouble(getStringProperty("print.portImage.X")), Double.parseDouble(getStringProperty("print.portImage.Y")), Double.parseDouble(getStringProperty("print.portImageWidth")), Double.parseDouble(getStringProperty("print.portImageHeight"))); } // Landscape paper parameters if (getStringProperty("print.landWidth").length() != 0 && getStringProperty("print.landHeight").length() != 0 && getStringProperty("print.landImageWidth").length() != 0 && getStringProperty("print.landImageHeight").length() != 0 && getStringProperty("print.landImage.X").length() != 0 && getStringProperty("print.landImage.Y").length() != 0) { pappyLand.setSize(Double.parseDouble(getStringProperty("print.landWidth")), Double.parseDouble(getStringProperty("print.landHeight"))); pappyLand.setImageableArea(Double.parseDouble(getStringProperty("print.landImage.X")), Double.parseDouble(getStringProperty("print.landImage.Y")), Double.parseDouble(getStringProperty("print.landImageWidth")), Double.parseDouble(getStringProperty("print.landImageHeight"))); } // define page panel JPanel page = new JPanel(); page.setBorder(BorderFactory.createTitledBorder( LangTool.getString("sa.pageParameters"))); setPortAttributes = new JButton(LangTool.getString("sa.columns24")); setPortAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPortraitAttributes(); } }); setLandAttributes = new JButton(LangTool.getString("sa.columns132")); setLandAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getLandscapeAttributes(); } }); page.add(setPortAttributes); page.add(setLandAttributes); contentPane.add(ppp); contentPane.add(page);// contentPane.add(ppa); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/df65a89f3874249d9a0046d2eba72cb4360e1f37/PrinterAttributesPanel.java/clean/tn5250j/src/org/tn5250j/settings/PrinterAttributesPanel.java
public void initPanel() throws Exception { setLayout(new BorderLayout()); contentPane = new JPanel(); contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.Y_AXIS)); add(contentPane,BorderLayout.NORTH); // define ppPanel panel JPanel ppp = new JPanel(); ppp.setBorder(BorderFactory.createTitledBorder(LangTool.getString("sa.print"))); defaultPrinter = new JCheckBox(LangTool.getString("sa.defaultPrinter")); if (getStringProperty("defaultPrinter").equals("Yes")) defaultPrinter.setSelected(true); ppp.add(defaultPrinter); //--- Create a printerJob object PrinterJob printJob = PrinterJob.getPrinterJob (); // will have to remember this for the next time. // Always set a page format before call setPrintable to // set the orientation. PageFormat pf = printJob.defaultPage(); pappyPort = pf.getPaper(); pappyLand = pf.getPaper(); // Portrait paper parameters if (getStringProperty("print.portWidth").length() != 0 && getStringProperty("print.portHeight").length() != 0 && getStringProperty("print.portImageWidth").length() != 0 && getStringProperty("print.portImageHeight").length() != 0 && getStringProperty("print.portImage.X").length() != 0 && getStringProperty("print.portImage.Y").length() != 0) { pappyPort.setSize(Double.parseDouble(getStringProperty("print.portWidth")), Double.parseDouble(getStringProperty("print.portHeight"))); pappyPort.setImageableArea(Double.parseDouble(getStringProperty("print.portImage.X")), Double.parseDouble(getStringProperty("print.portImage.Y")), Double.parseDouble(getStringProperty("print.portImageWidth")), Double.parseDouble(getStringProperty("print.portImageHeight"))); } // Landscape paper parameters if (getStringProperty("print.landWidth").length() != 0 && getStringProperty("print.landHeight").length() != 0 && getStringProperty("print.landImageWidth").length() != 0 && getStringProperty("print.landImageHeight").length() != 0 && getStringProperty("print.landImage.X").length() != 0 && getStringProperty("print.landImage.Y").length() != 0) { pappyLand.setSize(Double.parseDouble(getStringProperty("print.landWidth")), Double.parseDouble(getStringProperty("print.landHeight"))); pappyLand.setImageableArea(Double.parseDouble(getStringProperty("print.landImage.X")), Double.parseDouble(getStringProperty("print.landImage.Y")), Double.parseDouble(getStringProperty("print.landImageWidth")), Double.parseDouble(getStringProperty("print.landImageHeight"))); } // define page panel JPanel page = new JPanel(); page.setBorder(BorderFactory.createTitledBorder( LangTool.getString("sa.pageParameters"))); setPortAttributes = new JButton(LangTool.getString("sa.columns24")); setPortAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getPortraitAttributes(); } }); setLandAttributes = new JButton(LangTool.getString("sa.columns132")); setLandAttributes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { getLandscapeAttributes(); } }); page.add(setPortAttributes); page.add(setLandAttributes); contentPane.add(ppp); contentPane.add(page);// contentPane.add(ppa); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/df65a89f3874249d9a0046d2eba72cb4360e1f37/PrinterAttributesPanel.java/clean/tn5250j/src/org/tn5250j/settings/PrinterAttributesPanel.java
return toString(d, false);
return VMDouble.toString(d, false);
public static String toString(double d) { return toString(d, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/Double.java/buggy/core/src/classpath/5.0/java/lang/Double.java
return null;
return new NoPrinterJob();
public static PrinterJob getPrinterJob() { // FIXME: Need to fix this to load a default implementation instance. return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/PrinterJob.java/buggy/core/src/classpath/java/java/awt/print/PrinterJob.java
public static double parseDouble(String str) { return new VMDouble(str).parse();
public static double parseDouble(String str) { return VMDouble.parseDouble(str);
public static double parseDouble(String str) { return new VMDouble(str).parse(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/4d952c1ff48838834c7dcd3b56acf7f236a00079/Double.java/buggy/core/src/classpath/5.0/java/lang/Double.java
int getRunLimit (AttributedCharacterIterator.Attribute attrib);
int getRunLimit();
int getRunLimit (AttributedCharacterIterator.Attribute attrib);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedCharacterIterator.java/clean/core/src/classpath/java/java/text/AttributedCharacterIterator.java
int getRunStart (AttributedCharacterIterator.Attribute attrib);
int getRunStart();
int getRunStart (AttributedCharacterIterator.Attribute attrib);
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/AttributedCharacterIterator.java/clean/core/src/classpath/java/java/text/AttributedCharacterIterator.java
e.printStackTrace();
log.warn("In constructor: "+e);
public Gui5250SplitFrame(My5250 m) { super(m); enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250SplitFrame.java/clean/tn5250j/src/org/tn5250j/Gui5250SplitFrame.java
int oldAlignment = verticalAlignment; verticalAlignment = checkVerticalKey(alignment, "verticalAlignment");
int oldAlignment = verticalAlignment; verticalAlignment = checkVerticalKey(alignment, "verticalAlignment");
public void setVerticalAlignment(int alignment) { if (alignment == verticalAlignment) return; int oldAlignment = verticalAlignment; verticalAlignment = checkVerticalKey(alignment, "verticalAlignment"); firePropertyChange("verticalAlignment", oldAlignment, verticalAlignment); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JLabel.java/buggy/core/src/classpath/javax/javax/swing/JLabel.java
public JSplitPane(int newOrientation)
public JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
public JSplitPane(int newOrientation) { this(newOrientation, false, null, null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JSplitPane.java/buggy/core/src/classpath/javax/javax/swing/JSplitPane.java
this(newOrientation, false, null, null);
if (newOrientation != HORIZONTAL_SPLIT && newOrientation != VERTICAL_SPLIT) throw new IllegalArgumentException("orientation is invalid."); orientation = newOrientation; continuousLayout = newContinuousLayout; setLeftComponent(newLeftComponent); setRightComponent(newRightComponent); updateUI();
public JSplitPane(int newOrientation) { this(newOrientation, false, null, null); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JSplitPane.java/buggy/core/src/classpath/javax/javax/swing/JSplitPane.java
public static Border createEtchedBorder ()
public static Border createEtchedBorder()
public static Border createEtchedBorder () { return new EtchedBorder (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java
return new EtchedBorder ();
return new EtchedBorder();
public static Border createEtchedBorder () { return new EtchedBorder (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/BorderFactory.java/buggy/core/src/classpath/javax/javax/swing/BorderFactory.java
public boolean getValueIsAdjusting() {
public boolean getValueIsAdjusting() {
public boolean getValueIsAdjusting() { return isAdjusting; } // getValueIsAdjusting()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ListSelectionEvent.java/buggy/core/src/classpath/javax/javax/swing/event/ListSelectionEvent.java
}
}
public boolean getValueIsAdjusting() { return isAdjusting; } // getValueIsAdjusting()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ListSelectionEvent.java/buggy/core/src/classpath/javax/javax/swing/event/ListSelectionEvent.java
protected AccessibleJProgressBar() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JProgressBar.java/buggy/core/src/classpath/javax/javax/swing/JProgressBar.java
if (config == null) { String conf = (String) AccessController.doPrivileged (new PrivilegedAction() { public Object run() { return Security.getProperty ("login.configuration.provider"); } }); try { if (conf != null) config = (Configuration) Class.forName (conf).newInstance(); else config = new NullConfiguration(); } catch (Exception x) { config = new NullConfiguration(); } }
static Configuration getConfig() { return config; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/Configuration.java/buggy/core/src/classpath/javax/javax/security/auth/login/Configuration.java
if (config == null) { String conf = (String) AccessController.doPrivileged (new PrivilegedAction() { public Object run() { return Security.getProperty ("login.configuration.provider"); } }); try { if (conf != null) config = (Configuration) Class.forName (conf).newInstance(); else config = new NullConfiguration(); } catch (Exception x) { config = new NullConfiguration(); } } return config;
return getConfig();
public static synchronized Configuration getConfiguration() { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission (new AuthPermission ("getLoginConfiguration")); if (config == null) { String conf = (String) AccessController.doPrivileged (new PrivilegedAction() { public Object run() { return Security.getProperty ("login.configuration.provider"); } }); try { if (conf != null) config = (Configuration) Class.forName (conf).newInstance(); else config = new NullConfiguration(); } catch (Exception x) { config = new NullConfiguration(); } } return config; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/Configuration.java/buggy/core/src/classpath/javax/javax/security/auth/login/Configuration.java
public BooleanSeqHolder(boolean[] initial_value)
public BooleanSeqHolder()
public BooleanSeqHolder(boolean[] initial_value) { value = initial_value; typecode.setLength(value.length); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9b55eb78411ab1a82da7ba097b7b93a8cd80865/BooleanSeqHolder.java/buggy/core/src/classpath/org/org/omg/CORBA/BooleanSeqHolder.java