bugged
stringlengths
6
599k
fixed
stringlengths
10
599k
__index_level_0__
int64
0
1.13M
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
5,236
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
5,237
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
5,238
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object ClassCastException cex = new ClassCastExc...
5,239
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
public Object narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { if (narrowTo == null) throw new ClassCastException("Can't narrow to null class"); if (narrowFrom == null) return null; Class fromClass = narrowFrom.getClass(); Object result = null; try { if (...
5,240
public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); }
public Remote toStub(Remote ObjImpl) throws NoSuchObjectException { return PortableServer.toStub(obj); }
5,241
public Remote toStub(Remote obj) throws NoSuchObjectException { return PortableServer.toStub(obj); }
public Remote toStub(Remote obj) throws NoSuchObjectException { String icn = ObjImpl.getClass().getName(); if (!icn.endsWith("Impl")) throw new BAD_PARAM("Invalid class name '" + icn + "', must end with 'Impl'"); String sn = "_" + icn.substring(0, icn.length() - "Impl".length()) + "_Stub"; Class stubClass; O...
5,242
public void unexportObject(Remote obj) throws NoSuchObjectException { PortableServer.unexportObject(obj); }
public void unexportObject(Remote obj) throws NoSuchObjectException { Util.unexportObject(obj); }
5,243
public void mouseWheelMoved(MouseWheelEvent e) { if (scrollpane.getViewport().getComponentCount() == 0) return; Component target = scrollpane.getViewport().getComponent(0); JScrollBar bar = scrollpane.getVerticalScrollBar(); Scrollable scrollable = (target instanceof Scrollable) ? (Scr...
public void mouseWheelMoved(MouseWheelEvent e) { if (scrollpane.getViewport().getComponentCount() == 0) return; Component target = scrollpane.getViewport().getComponent(0); JScrollBar bar = scrollpane.getVerticalScrollBar(); Scrollable scrollable = (target instanceof Scrollable) ? (Scr...
5,244
protected void uninstallDefaults(JScrollPane p) { p.setForeground(null); p.setBackground(null); p.setFont(null); p.setBorder(null); scrollpane = null; }
protected void uninstallDefaults(JScrollPane p) { p.setForeground(null); p.setBackground(null); p.setFont(null); p.setBorder(null); scrollpane = null; }
5,247
public void popupMenuWillBecomeInvisible(PopupMenuEvent event) { // remove listener that listens to component events fired // by the top - level window that this popup belongs to. Component invoker = popupMenu.getInvoker(); Container rootContainer = (Container) SwingUtilities.getRoot(invoker...
public void popupMenuWillBecomeInvisible(PopupMenuEvent event) { // remove listener that listens to component events fired // by the top - level window that this popup belongs to. Component invoker = popupMenu.getInvoker(); Container rootContainer = (Container) SwingUtilities.getRoot(invoker...
5,255
public void popupMenuWillBecomeVisible(PopupMenuEvent event) { // Adds topWindowListener to top-level window to listener to // ComponentEvents fired by it. We need to cancel this popup menu // if topWindow to which this popup belongs was resized or moved. Component invoker = popupMenu.getInv...
public void popupMenuWillBecomeVisible(PopupMenuEvent event) { // Adds topWindowListener to top-level window to listener to // ComponentEvents fired by it. We need to cancel this popup menu // if topWindow to which this popup belongs was resized or moved. Component invoker = popupMenu.getInv...
5,256
public BasicPopupMenuUI() { popupMenuListener = new PopupMenuHandler(); mouseInputListener = new MouseInputHandler(); topWindowListener = new TopWindowListener(); }
public BasicPopupMenuUI() { popupMenuListener = new PopupMenuHandler(); topWindowListener = new TopWindowListener(); }
5,257
protected void installListeners() { popupMenu.addMouseListener(mouseInputListener); popupMenu.addMouseMotionListener(mouseInputListener); popupMenu.addPopupMenuListener(popupMenuListener); }
protected void installListeners() { popupMenu.addMouseListener(mouseInputListener); popupMenu.addMouseMotionListener(mouseInputListener); popupMenu.addPopupMenuListener(popupMenuListener); }
5,258
protected void uninstallListeners() { popupMenu.removeMouseListener(mouseInputListener); popupMenu.removeMouseMotionListener(mouseInputListener); popupMenu.removePopupMenuListener(popupMenuListener); }
protected void uninstallListeners() { popupMenu.removeMouseListener(mouseInputListener); popupMenu.removeMouseMotionListener(mouseInputListener); popupMenu.removePopupMenuListener(popupMenuListener); }
5,259
public void menuDragMouseDragged(MenuDragMouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(e.getPath()); }
public void menuDragMouseDragged(MenuDragMouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(e.getPath()); }
5,261
public void menuDragMouseEntered(MenuDragMouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(e.getPath()); }
public void menuDragMouseEntered(MenuDragMouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.setSelectedPath(e.getPath()); }
5,262
public void mouseClicked(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.processMouseEvent(e); }
public void mouseClicked(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); manager.processMouseEvent(e); }
5,264
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
5,265
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
5,266
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
public void mouseEntered(MouseEvent e) { /* When mouse enters menu item, it should be considered selected if (i) if this menu is a submenu in some other menu (ii) or if this menu is in a menu bar and some other menu in a menu bar was just selected and has its popup menu visible. ...
5,267
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; if (menu.isEnabled()) { // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()) ...
5,268
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
5,269
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
5,270
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
5,271
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
public void mousePressed(MouseEvent e) { MenuSelectionManager manager = MenuSelectionManager.defaultManager(); JMenu menu = (JMenu) menuItem; manager.processMouseEvent(e); // Menu should be displayed when the menu is pressed only if // it is top-level menu if (menu.isTopLevelMenu()...
5,272
protected void installKeyboardActions() throws NotImplementedException { // FIXME: Need to implement }
protected void installKeyboardActions() { // FIXME: Need to implement }
5,274
protected void installListeners() { ((JMenu) menuItem).addMouseListener(mouseInputListener); ((JMenu) menuItem).addMouseMotionListener(mouseInputListener); ((JMenu) menuItem).addMenuListener(menuListener); ((JMenu) menuItem).addMenuDragMouseListener(menuDragMouseListener); }
protected void installListeners() { ((JMenu) menuItem).addMouseListener(mouseInputListener); ((JMenu) menuItem).addMouseMotionListener(mouseInputListener); ((JMenu) menuItem).addMenuListener(menuListener); ((JMenu) menuItem).addMenuDragMouseListener(menuDragMouseListener); }
5,276
protected void installListeners() { ((JMenu) menuItem).addMouseListener(mouseInputListener); ((JMenu) menuItem).addMouseMotionListener(mouseInputListener); ((JMenu) menuItem).addMenuListener(menuListener); ((JMenu) menuItem).addMenuDragMouseListener(menuDragMouseListener); }
protected void installListeners() { ((JMenu) menuItem).addMouseListener(mouseInputListener); ((JMenu) menuItem).addMouseMotionListener(mouseInputListener); ((JMenu) menuItem).addMenuListener(menuListener); }
5,277
protected void uninstallKeyboardActions() throws NotImplementedException { // FIXME: Need to implement }
protected void uninstallKeyboardActions() { // FIXME: Need to implement }
5,279
protected void uninstallListeners() { ((JMenu) menuItem).removeMouseListener(mouseInputListener); ((JMenu) menuItem).removeMenuListener(menuListener); ((JMenu) menuItem).removePropertyChangeListener(propertyChangeListener); }
protected void uninstallListeners() { super.uninstallListeners(); ((JMenu) menuItem).removeMenuListener(menuListener); ((JMenu) menuItem).removePropertyChangeListener(propertyChangeListener); }
5,281
protected void uninstallListeners() { ((JMenu) menuItem).removeMouseListener(mouseInputListener); ((JMenu) menuItem).removeMenuListener(menuListener); ((JMenu) menuItem).removePropertyChangeListener(propertyChangeListener); }
protected void uninstallListeners() { ((JMenu) menuItem).removeMouseListener(mouseInputListener); ((JMenu) menuItem).removeMenuListener(menuListener); }
5,282
static String absolutize(String base, String href) { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isLowercaseAscii(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base = ""; else { int i = ...
public static String absolutize(String base, String href) throws MalformedURLException { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isLowercaseAscii(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base ...
5,283
static String absolutize(String base, String href) { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isLowercaseAscii(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base = ""; else { int i = ...
static String absolutize(String base, String href) { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isURLScheme(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base = ""; else { int i = base....
5,284
static String absolutize(String base, String href) { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isLowercaseAscii(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base = ""; else { int i = ...
static String absolutize(String base, String href) { if (href == null) return null; int ci = href.indexOf(':'); if (ci > 1 && isLowercaseAscii(href.substring(0, ci))) { // href is absolute already return href; } if (base == null) base = ""; else { int i = ...
5,285
private InputStream resolve(String url) throws IOException { try { return new URL(url).openStream(); } catch (MalformedURLException e) { return null; } }
static InputStream resolve(String url) throws IOException { try { return new URL(url).openStream(); } catch (MalformedURLException e) { return null; } }
5,286
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Dimension d = BasicGraphicsUtils.getPreferredButtonSize(m, ...
5,289
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && !text.equals("")) { if (menuItem.isEnabled()) { // Menu item ...
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && !text.equals("")) { if (menuItem.isEnabled()) { // Menu item ...
5,290
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && !text.equals("")) { if (menuItem.isEnabled()) { // Menu item ...
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && !text.equals("")) { if (menuItem.isEnabled()) { // Menu item ...
5,291
public void run() { try { synchronized (queueLock) { try { queueLock.wait(initialDelay); } catch (InterruptedException e) { // Ignored } if (!runnin...
public void run() { try { synchronized (queueLock) { try { queueLock.wait(initialDelay); } catch (InterruptedException e) { // Ignored } if (!runnin...
5,292
public void run() { try { synchronized (queueLock) { try { queueLock.wait(initialDelay); } catch (InterruptedException e) { // Ignored } if (!runnin...
public void run() { try { synchronized (queueLock) { try { queueLock.wait(initialDelay); } catch (InterruptedException e) { // Ignored } if (!runnin...
5,293
void queueEvent() { synchronized (queueLock) { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer); } }
void queueEvent() { synchronized (queueLock) { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer); } }
5,295
void queueEvent() { synchronized (queueLock) { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer); } }
void queueEvent() { synchronized (queueLock) { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer);
5,296
public void start() { synchronized (queueLock) { if (waker != null) return; waker = new Waker(); waker.start(); } }
public void start() { synchronized (queueLock) { if (waker != null) return; waker = new Waker(); waker.start(); } }
5,297
public void stop() { synchronized (queueLock) { running = false; queue = 0; if (waker != null) queueLock.notifyAll(); waker = null; } }
public void stop() { synchronized (queueLock) { running = false; queue = 0; queueLock.notifyAll(); waker = null; } }
5,299
public Area(Shape s) { }
public Area() { }
5,300
public void transform(AffineTransform at) { // XXX Implement. throw new Error("not implemented"); }
public void transform(AffineTransform at) { // XXX Implement. for (int i = 0; i < solids.size(); i++) ((Segment) solids.elementAt(i)).transformSegmentList(at); for (int i = 0; i < holes.size(); i++) ((Segment) holes.elementAt(i)).transformSegmentList(at); if ((at.getType() & AffineTransform.TYPE_FLIP) != 0) ...
5,302
public boolean contains(double x, double y) { // XXX Implement. throw new Error("not implemented"); }
public boolean contains(double x, double y) { // XXX Implement. int n = 0; for (int i = 0; i < solids.size(); i++) if (((Segment) solids.elementAt(i)).contains(x, y)) n++; for (int i = 0; i < holes.size(); i++) if (((Segment) holes.elementAt(i)).contains(x, y)) n--; return (n != 0); }
5,304
public boolean equals(Object obj) { if (obj instanceof UID) { UID uid = (UID)obj; if (this.unique == uid.unique && this.time == uid.time && this.count == uid.count) { return (true); } } return (false);}
public boolean equals(Object obj) { if (obj instanceof UID) { UID uid = (UID)obj; if (this.unique == uid.unique && this.time == uid.time && this.count == uid.count) { return (true); } } return (false);}
5,305
public int hashCode() { return (unique);}
public int hashCode() { return (unique);}
5,306
public int signum() { int top = words == null ? ival : words[ival-1]; if (top == 0 && words == null) return 0; return top < 0 ? -1 : 1; }
public int signum() { int top = words == null ? ival : words[ival-1]; if (top == 0 && words == null) return 0; return top < 0 ? -1 : 1; }
5,310
private void writeObject(ObjectOutputStream s) throws IOException, ClassNotFoundException { signum = signum(); magnitude = toByteArray(); s.defaultWriteObject(); }
private void writeObject(ObjectOutputStream s) throws IOException, ClassNotFoundException { signum = signum(); magnitude = signum == 0 ? new byte[0] : toByteArray(); s.defaultWriteObject(); }
5,311
public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { this(session,name); setKeyStroke(name, ks, keyMap); }
public EmulatorAction(Session session, String name) { this(session,name); setKeyStroke(name, ks, keyMap); }
5,312
public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { this(session,name); setKeyStroke(name, ks, keyMap); }
public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { this(session,name); setKeyStroke(name, ks, keyMap); }
5,313
protected void startPlugin() throws PluginException { try { final DeviceManager dm = DeviceUtils.getDeviceManager(); dm.addListener(this); final Collection devs = dm.getDevices(); for (Iterator i = devs.iterator(); i.hasNext();) { addListeners((Devic...
protected void startPlugin() throws PluginException { try { final DeviceManager dm = DeviceUtils.getDeviceManager(); dm.addListener(this); final Collection devs = new ArrayList(dm.getDevices()); for (Iterator i = devs.iterator(); i.hasNext();) { addL...
5,314
public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // A little 'pre-handling' as href is a specialattribute ...
public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // A little 'pre-handling' as href is a specialattribute ...
5,315
public Array appendArrayToArray ( Array arrayToAppendTo, Array arrayToAdd ) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = ne...
public Array appendArrayToArray ( Array arrayToAppendTo, Array arrayToAdd ) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = ne...
5,316
protected void fireActionPerformed() { ActionEvent event = new ActionEvent(this, 0, getText()); ActionListener[] listeners = getActionListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].actionPerformed(event); }
protected void fireActionPerformed() { ActionEvent event = new ActionEvent(this, 0, actionCommand == null ? getText() : actionCommand); ActionListener[] listeners = getActionListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].actionPerformed(event); }
5,317
public static void main(String[] args) throws NoSuchAliasException, NameNotFoundException { ParsedArguments cmdLine = HELP_INFO.parse(args); final Shell shell = ShellUtils.getShellManager().getCurrentShell(); final AliasManager aliasMgr = shell.getAliasManager(); if (cmdLine.size() == 0) { for (Iterator i = alia...
public static void main(String[] args) throws NoSuchAliasException, NameNotFoundException, SyntaxErrorException { ParsedArguments cmdLine = HELP_INFO.parse(args); final Shell shell = ShellUtils.getShellManager().getCurrentShell(); final AliasManager aliasMgr = shell.getAliasManager(); if (cmdLine.size() == 0) { ...
5,319
private DeviceToDriverMapper newMapperInstance(Class cls, ConfigurationElement element) throws InstantiationException, IllegalAccessException { try { final Constructor c = cls.getConstructor(new Class[] { ConfigurationElement.class }); try { return (DeviceToDriverMapper)c...
private DeviceToDriverMapper newMapperInstance(Class cls, ConfigurationElement element) throws InstantiationException, IllegalAccessException { try { final Constructor c = cls.getConstructor(new Class[] { ConfigurationElement.class }); try { return (DeviceToDriverMapper)c...
5,320
public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
public float getPreferredSpan(int axis) { float span = 10; if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
5,322
public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; }
5,323
public void paint(Graphics g, Shape s) { if (view != null) { Rectangle b = s.getBounds(); view.setSize(b.width, b.height); view.paint(g, s); } }
public void paint(Graphics g, Shape s) { if (view != null) { Rectangle b = s.getBounds(); view.setSize(b.width, b.height); view.paint(g, s); } }
5,325
public void setSize(float w, float h) { if (view != null) view.setSize(w, h); }
public synchronized void setSize(float w, float h) { if (view != null) view.setSize(w, h); }
5,327
public Dimension getMaximumSize(JComponent c) { // Sun's implementation returns Integer.MAX_VALUE here, so do we. return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
public Dimension getMaximumSize(JComponent c) { // Sun's implementation returns Integer.MAX_VALUE here, so do we. Dimension d = new Dimension(); Insets i = c.getInsets(); Document doc = textComponent.getDocument(); if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { d.width = (in...
5,329
public Dimension getMinimumSize(JComponent c) { Insets i = c.getInsets(); return new Dimension(i.left + i.right, i.top + i.bottom); }
public Dimension getMinimumSize(JComponent c) { Insets i = c.getInsets(); d.width += i.left + i.right; d.height += i.top + i.bottom; return d; }
5,330
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { // A comment in the spec of NavigationFilter.getNextVisualPositionFrom() // sugge...
public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { // A comment in the spec of NavigationFilter.getNextVisualPositionFrom() // sugge...
5,331
public Dimension getPreferredSize(JComponent c) { Dimension d = c.getSize(); Insets i = c.getInsets(); if (d.width > (i.left + i.right) && d.height > (i.top + i.bottom)) { rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom); } float w = rootV...
public Dimension getPreferredSize(JComponent c) { Dimension d = c.getSize(); Insets i = c.getInsets(); if (d.width > (i.left + i.right) && d.height > (i.top + i.bottom)) { rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom); } float w = rootV...
5,333
protected Rectangle getVisibleEditorRect() { int width = textComponent.getWidth(); int height = textComponent.getHeight(); // Return null if the component has no valid size. if (width <= 0 || height <= 0) return null; Insets insets = textComponent.getInsets(); return new Rectangle(insets.left...
protected Rectangle getVisibleEditorRect() { int width = textComponent.getWidth(); int height = textComponent.getHeight(); // Return null if the component has no valid size. if (width <= 0 || height <= 0) return null; Insets insets = textComponent.getInsets(cachedInsets); return new Rectangle...
5,334
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
5,335
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
5,336
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi...
5,337
protected void installListeners() { textComponent.addFocusListener(focuslistener); }
protected void installListeners() { if (SystemProperties.getProperty("gnu.swing.text.no-xlike-clipboard") == null) { if (focusListener == null) focusListener = new FocusHandler(); textComponent.addFocusListener(focusListener); } }
5,338
public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); textComponent.addPropertyChangeListener(updateHandler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDoc...
public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); installFixedDefaults(); if (handler == null) handler = new Handler(); textComponent.addPropertyChangeListener(handler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEd...
5,339
public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); textComponent.addPropertyChangeListener(updateHandler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDoc...
public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); textComponent.addPropertyChangeListener(updateHandler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDoc...
5,340
protected void uninstallListeners() { textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); }
protected void uninstallListeners() { textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); }
5,342
public void uninstallUI(final JComponent component) { super.uninstallUI(component); rootView.setView(null); uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); textComponent = null; }
public void uninstallUI(final JComponent component) { textComponent.removePropertyChangeListener(handler); textComponent.getDocument().removeDocumentListener(handler); rootView.setView(null); uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); textComponent = null; }
5,343
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,345
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,346
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,347
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,348
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,349
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ...
5,350
public boolean match(Certificate certificate) { if (!(certificate instanceof X509Certificate)) return false; X509Certificate cert = (X509Certificate) certificate; if (this.cert != null) { try { byte[] e1 = this.cert.getEncoded(); byte[] e2 = cert.getEncoded();...
public boolean match(Certificate certificate) { if (!(certificate instanceof X509Certificate)) return false; X509Certificate cert = (X509Certificate) certificate; if (this.cert != null) { try { byte[] e1 = this.cert.getEncoded(); byte[] e2 = cert.getEncoded();...
5,351
protected PropertyChangeListener createActionPropertyChangeListener(Action a) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) setE...
protected PropertyChangeListener createActionPropertyChangeListener(Action a) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()...
5,352
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME...
public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals("enabled")) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME))); else if (e.getP...
5,353
public void fireActionPerformed(ActionEvent e) { e.setSource(this); ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(e); }
protected void fireActionPerformed(ActionEvent e) { e.setSource(this); ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(e); }
5,354
public void fireItemStateChanged(ItemEvent e) { e.setSource(this); ItemListener[] listeners = getItemListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].itemStateChanged(e); }
protected void fireItemStateChanged(ItemEvent e) { e.setSource(this); ItemListener[] listeners = getItemListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].itemStateChanged(e); }
5,355
public void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].stateChanged(changeEvent); }
protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].stateChanged(changeEvent); }
5,356
protected String paramString() { return "AbstractButton"; }
protected String paramString() { StringBuffer sb = new StringBuffer(); sb.append(super.paramString()); sb.append(",defaultIcon="); if (getIcon() != null) sb.append(getIcon()); sb.append(",disabledIcon="); if (getDisabledIcon() != null) sb.append(getDisabledIcon()); sb.append(",disabledSelectedIcon="); if (getDisa...
5,357
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare...
5,359
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break...
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); // Try to find a suitable line break. BreakIterator lineBreaker = BreakIterator.getLineInstance(); Segment txt = new Segment(); try ...
5,360
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break...
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break...
5,361
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break...
public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break...
5,362
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory vf) { getParent().preferenceChanged(this, true, true); }
public void changedUpdate(DocumentEvent e, Shape a, ViewFactory vf) { preferenceChanged(this, true, true); }
5,363
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, el.getStartOffset(), el.getEndOffset()); }
public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, el.getStartOffset(), el.getEndOffset()); }
5,364
public void removeUpdate(DocumentEvent e, Shape a, ViewFactory vf) { getParent().preferenceChanged(this, true, false); }
public void removeUpdate(DocumentEvent e, Shape a, ViewFactory vf) { preferenceChanged(this, true, false); }
5,365
public void setDividerLocation(double proportionalLocation) { if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException ("proportion has to be between 0 and 1."); int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); setDividerLocation((int) (...
public void setDividerLocation(double proportionalLocation) { if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException ("proportion has to be between 0 and 1."); int max = ((orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight()) - getDividerSize(); setDi...
5,366
public MetalComboBoxEditor() { super(); editor = new JTextField(); editor.setBorder(new MetalComboBoxEditorBorder()); }
public MetalComboBoxEditor() { super(); editor.setBorder(new MetalComboBoxEditorBorder()); }
5,367
public void executeScript(Session session, String script) throws InterpreterDriver.InterpreterException { try { session.setMacroRunning(true); _interpreter.set("session",session); _interpreter.exec(script); session.setMacroRunning(false); } catch (PyException ex...
public void executeScript(Session session, String script) throws InterpreterDriver.InterpreterException { try { session.setMacroRunning(true); _interpreter.set("_session",session); _interpreter.exec(script); session.setMacroRunning(false); } catch (PyException e...
5,368