bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
protected AbstractDocument.AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } | protected AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } | 17,182 |
protected AbstractDocument.AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } | protected AbstractDocument.AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } | 17,183 |
protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) { // FIXME: Not implemented System.out.println("createLeafElement not implemented"); return super.createLeafElement(parent, a, p0, p1); } | protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) { // FIXME: Not implemented System.out.println("createLeafElement not implemented"); return super.createLeafElement(parent, a, p0, p1); } | 17,184 |
public ElementIterator(Document document) { this.root = document.getDefaultRootElement(); this.currentElement = root; this.state = new int[5]; } | public ElementIterator(Document document) { this.root = document.getDefaultRootElement(); this.currentElement = root; this.state = new int[5]; } | 17,185 |
public Element current() { return currentElement; } | public Element current() { Element current; if (stack == null) current = first(); else { current = null; if (! stack.isEmpty()) { ElementRef ref = (ElementRef) stack.peek(); Element el = ref.element; int index = ref.index; if (index == -1) current = el; else current = el.getElement(index); } } return current; } | 17,186 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,187 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,188 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,189 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,190 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,191 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,192 |
public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... | 17,193 |
public void updateUI() { ScrollPaneUI b = (ScrollPaneUI)UIManager.getUI(this); setUI(b); } | public void updateUI() { ScrollPaneUI b = (ScrollPaneUI)UIManager.getUI(this); setUI(b); } | 17,194 |
public final Class getCategory() { return JobHoldUntil.class; } | public Class getCategory() { return JobHoldUntil.class; } | 17,195 |
public final String getName() { return "job-hold-until"; } | public String getName() { return "job-hold-until"; } | 17,196 |
public void addActionListener(ActionListener l) { actions.addElement(l); } | public void addActionListener(ActionListener l) { actions.addElement(l); } | 17,197 |
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row); | Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row); | 17,198 |
AbstractButton FindButton(ButtonModel m) { for (int i=0;i<v.size();i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; } } return null; } | AbstractButton FindButton(ButtonModel m) { for (int i = 0;i < buttons.size(); i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; } } return null; } | 17,200 |
AbstractButton FindButton(ButtonModel m) { for (int i=0;i<v.size();i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; } } return null; } | AbstractButton FindButton(ButtonModel m) { for (int i=0;i<v.size();i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; } } return null; } | 17,201 |
AbstractButton FindButton(ButtonModel m) { for (int i=0;i<v.size();i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; } } return null; } | AbstractButton FindButton(ButtonModel m) { for (int i=0;i<v.size();i++) { AbstractButton a = (AbstractButton) v.get(i); if (a.getModel()== m) { return a; return null; | 17,202 |
public int getButtonCount() { return v.size(); } | public int getButtonCount() { return buttons.size(); } | 17,203 |
public Enumeration getElements() { return v.elements(); } | public Enumeration getElements() { return v.elements(); } | 17,204 |
public boolean isSelected(ButtonModel m) { return (m == sel); } | public boolean isSelected(ButtonModel m) { return m == sel; } | 17,205 |
public void remove(AbstractButton b) { b.getModel().setGroup(null); v.removeElement(b); } | public void remove(AbstractButton b) { b.getModel().setGroup(null); buttons.removeElement(b); } | 17,206 |
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = Fin... | public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = Fin... | 17,207 |
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = Fin... | public void setSelected(ButtonModel m, boolean b) if ((m == sel) && (b == true)) // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; } if (sel != null) System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = FindBu... | 17,208 |
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = Fin... | public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on sam item twice. System.out.println("PRESSED TWICE:" + m + ", sel="+sel); return; if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(!b); AbstractButton but = Find... | 17,209 |
protected final Address getTSIAddress() { if (tsiAddress == null) { tsiAddress = ObjectReference.fromObject(this).toAddress(); } return tsiAddress; } | protected final Address getTSIAddress() { if (tsiAddress.isZero()) { tsiAddress = ObjectReference.fromObject(this).toAddress(); } return tsiAddress; } | 17,210 |
final void lock(ProcessorLock otherLock) { if (otherLock == null) { queueLock.lock(); } else { ProcessorLock.lock(queueLock, otherLock); } } | final void lock(ProcessorLock otherLock) { if (otherLock == null) { queueLock.lock(); } else { ProcessorLock.lock(queueLock, otherLock); } } | 17,211 |
final void unlock(ProcessorLock otherLock) { if (otherLock != null) { otherLock.unlock(); } queueLock.unlock(); } | final void unlock(ProcessorLock otherLock) { if (otherLock != null) { otherLock.unlock(); } queueLock.unlock(); } | 17,212 |
final void addToReadyQueue(VmThread thread, boolean ignorePriority) { try { // Get access to queues queueLock.lock(); if (thread.isRunning() || thread.isYielding()) { readyQueue.enqueue(thread, ignorePriority); } else { Unsafe ... | final void addToReadyQueue(VmThread thread, boolean ignorePriority, String caller) { try { // Get access to queues queueLock.lock(); if (thread.isRunning() || thread.isYielding()) { readyQueue.enqueue(thread, ignorePriority); } else { ... | 17,213 |
final void addToReadyQueue(VmThread thread, boolean ignorePriority) { try { // Get access to queues queueLock.lock(); if (thread.isRunning() || thread.isYielding()) { readyQueue.enqueue(thread, ignorePriority); } else { Unsafe ... | final void addToReadyQueue(VmThread thread, boolean ignorePriority) { try { // Get access to queues queueLock.lock(); if (thread.isRunning() || thread.isYielding()) { sleepQueue.remove(thread); readyQueue.add(thread, ignorePriority, caller); } else {... | 17,214 |
final void dump() { try { // Get access to queues queueLock.lock(); readyQueue.dump(false, null); wakeupQueue.dump(false, null); } finally { // Release access to queues queueLock.unlock(); } } | final void dump() { try { // Get access to queues queueLock.lock(); readyQueue.dump(false, null); sleepQueue.dump(false, null); } finally { // Release access to queues queueLock.unlock(); } } | 17,215 |
final void setYieldingState() { if (threadState == RUNNING) { threadState = YIELDING; } } | final void setYieldingState() throws UninterruptiblePragma { if (threadState == RUNNING) { threadState = YIELDING; } } | 17,216 |
public static char toLowerCase(char ch) { // Signedness doesn't matter, as result is cast back to char. return (char) (ch + lower[readChar(ch) >> 7]); } | public static char toLowerCase(char ch) { // Signedness doesn't matter, as result is cast back to char. return (char) (lower[0][readCodePoint((int)ch) >>> 7] + ch); } | 17,217 |
public void mousePressed(MouseEvent e) { if (comboBox.isEnabled()) togglePopup(); } | public void mousePressed(MouseEvent e) { if (SwingUtilities.isLeftMouseButton(e) && comboBox.isEnabled()) { delegateFocus(e); togglePopup(); } | 17,218 |
public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | 17,220 |
public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | 17,221 |
public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | public void mouseReleased(MouseEvent e) { // Get component over which mouse was released Component src = (Component) e.getSource(); int x = e.getX(); int y = e.getY(); Component releasedComponent = SwingUtilities.getDeepestComponentAt(src, ... | 17,223 |
public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | 17,225 |
public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | 17,226 |
public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | 17,227 |
public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | 17,228 |
public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | public void mouseDragged(MouseEvent e) { // convert point of the drag event relative to combo box list component // figure out over which list cell the mouse is currently being dragged // and highlight the cell. The list model is changed but the change has // no effect on combo box's data mo... | 17,229 |
public void mouseReleased(MouseEvent anEvent) { int index = list.locationToIndex(anEvent.getPoint()); // Check for valid index. if (index >= 0) comboBox.setSelectedIndex(index); hide(); } | public void mouseReleased(MouseEvent anEvent) { int index = list.locationToIndex(anEvent.getPoint()); // Check for valid index. if (index >= 0) comboBox.setSelectedIndex(index); hide(); } | 17,232 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue(... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue(... | 17,234 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue(... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("model")) { list.setModel((ComboBoxModel) e.getNewValue()); ... | 17,235 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue(... | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("renderer")) { list.setCellRenderer((ListCellRenderer) e.getNewValue()); revalidate(); repaint(); } if (e.getPropertyName().equals("dataModel")) { list.setModel((ComboBoxModel) e.getNewValue(... | 17,236 |
public BasicComboPopup(JComboBox comboBox) { this.comboBox = comboBox; installComboBoxListeners(); configurePopup(); setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled()); } | public BasicComboPopup(JComboBox comboBox) { this.comboBox = comboBox; installComboBoxListeners(); configurePopup(); setLightWeightPopupEnabled(comboBox.isLightWeightPopupEnabled()); } | 17,237 |
protected void configureList() { list.setModel(comboBox.getModel()); list.setVisibleRowCount(comboBox.getMaximumRowCount()); list.setFocusable(false); installListListeners(); } | protected void configureList() { list.setModel(comboBox.getModel()); list.setVisibleRowCount(comboBox.getMaximumRowCount()); list.setFocusable(false); installListListeners(); } | 17,238 |
protected void configurePopup() { setBorder(BorderFactory.createLineBorder(Color.BLACK)); // initialize list that will be used to display combo box's items this.list = createList(); ((JLabel) list.getCellRenderer()).setHorizontalAlignment(SwingConstants.LEFT); configureList(); // initialize scrolle... | protected void configurePopup() { setBorder(BorderFactory.createLineBorder(Color.BLACK)); // initialize list that will be used to display combo box's items this.list = createList(); ((JLabel) list.getCellRenderer()).setHorizontalAlignment(SwingConstants.LEFT); configureList(); // initialize scrolle... | 17,240 |
protected void configureScroller() { scroller.setBorder(null); scroller.getViewport().setView(list); scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); } | protected void configureScroller() { scroller.setBorder(null); scroller.getViewport().setView(list); scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); } | 17,241 |
protected MouseEvent convertMouseEvent(MouseEvent e) { return null; } | protected MouseEvent convertMouseEvent(MouseEvent e) { Point point = SwingUtilities.convertPoint((Component) e.getSource(), e.getPoint(), list); MouseEvent newEvent= new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers(), point.x, point.y, e.getModifiers(), e.isPopupTrigger()); return ... | 17,242 |
protected JList createList() { JList l = new JList(comboBox.getModel()); l.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); return l; } | protected JList createList() { JList l = new JList(comboBox.getModel()); return l; } | 17,243 |
protected JScrollPane createScroller() { return new JScrollPane(); } | protected JScrollPane createScroller() { return new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); } | 17,244 |
protected int getPopupHeightForRowCount(int maxRowCount) { int totalHeight = 0; ListCellRenderer rend = list.getCellRenderer(); if (comboBox.getItemCount() < maxRowCount) maxRowCount = comboBox.getItemCount(); for (int i = 0; i < maxRowCount; i++) { Component comp = rend.getListCellRendererComp... | protected int getPopupHeightForRowCount(int maxRowCount) { int totalHeight = 0; ListCellRenderer rend = list.getCellRenderer(); if (comboBox.getItemCount() < maxRowCount) maxRowCount = comboBox.getItemCount(); for (int i = 0; i < maxRowCount; i++) { Component comp = rend.getListCellRendererComp... | 17,246 |
public void hide() { super.setVisible(false); } | public void hide() { MenuSelectionManager menuSelectionManager = MenuSelectionManager.defaultManager(); javax.swing.MenuElement[] menuElements = menuSelectionManager.getSelectedPath(); for (int i = 0; i < menuElements.length; i++) { if (menuElements[i] == this) { menuSelectionManager.clearSelectedPath(); break; }... | 17,247 |
protected void installComboBoxListeners() { // mouse listener that listens to mouse event in combo box mouseListener = createMouseListener(); comboBox.addMouseListener(mouseListener); // mouse listener that listens to mouse dragging events in the combo box mouseMotionListener = createMouseMotionListen... | protected void installComboBoxListeners() { // mouse listener that listens to mouse event in combo box mouseListener = createMouseListener(); comboBox.addMouseListener(mouseListener); // mouse listener that listens to mouse dragging events in the combo box mouseMotionListener = createMouseMotionListen... | 17,248 |
public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | public void show() { Dimension size = comboBox.getSize(); size.height = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); Insets i = getInsets(); size.width -= i.left + i.right; Rectangle bounds = computePopupBounds(0, comboBox.getBounds().height, size.width, size.height); // popup should have same wid... | 17,250 |
public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property scroller.setMaximumSize(bounds.getSize()); scroller.setPreferredSize(bounds.getSize()); scroller.setM... | 17,251 |
public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | 17,252 |
public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); scroller.setPreferredS... | 17,253 |
protected void togglePopup() { if (BasicComboPopup.this.isVisible()) hide(); else show(); } | protected void togglePopup() { if (isVisible()) hide(); else show(); } | 17,254 |
private void uninstallComboBoxListeners() { comboBox.removeMouseListener(mouseListener); mouseListener = null; comboBox.removeMouseMotionListener(mouseMotionListener); mouseMotionListener = null; comboBox.removeItemListener(itemListener); itemListener = null; comboBox.removePropertyChangeListene... | private void uninstallComboBoxListeners() { comboBox.removeMouseListener(mouseListener); mouseListener = null; comboBox.removeMouseMotionListener(mouseMotionListener); mouseMotionListener = null; comboBox.removeItemListener(itemListener); itemListener = null; comboBox.removePropertyChangeListene... | 17,255 |
private void uninstallListeners() { uninstallListListeners(); uninstallComboBoxListeners(); uninstallComboBoxModelListeners(comboBox.getModel()); } | private void uninstallListeners() { uninstallComboBoxListeners(); uninstallComboBoxModelListeners(comboBox.getModel()); } | 17,256 |
protected void updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll) { // TODO: We need to handle the shouldScroll parameter somehow. int index = list.locationToIndex(anEvent.getPoint()); // Check for valid index. if (index >= 0) list... | protected void updateListBoxSelectionForEvent(MouseEvent anEvent, boolean shouldScroll) { // TODO: We need to handle the shouldScroll parameter somehow. int index = list.locationToIndex(anEvent.getPoint()); // Check for valid index. if (index >= 0) list... | 17,257 |
public boolean contains(Point p) { return width > 0 && height > 0 && p.x >= x && p.x < x + width && p.y >= y && p.y < y + height; } | public boolean contains(Point p) { return width > 0 && height > 0 && p.x >= x && p.x < x + width && p.y >= y && p.y < y + height; } | 17,259 |
public DataFlavor[] getCurrentDataFlavors () { // FIXME: implement this return null; } | public DataFlavor[] getCurrentDataFlavors () { // FIXME: implement this return context.getCurrentDataFlavors (); } | 17,262 |
public List getCurrentDataFlavorsAsList () { // FIXME: implement this return null; } | public List getCurrentDataFlavorsAsList () { // FIXME: implement this return context.getCurrentDataFlavorsAsList (); } | 17,263 |
public boolean isDataFlavorSupported (DataFlavor df) { // FIXME: implement this return true; } | public boolean isDataFlavorSupported (DataFlavor df) { // FIXME: implement this return context.isDataFlavorSupported (df); } | 17,264 |
final int getValue() { return (primary << 16) + (secondary << 8) + tertiary; } | int getValue() { return (primary << 16) + (secondary << 8) + tertiary; } | 17,266 |
public static final int primaryOrder(int order) { // From the JDK 1.2 spec. return order >>> 16; } | public static int primaryOrder(int order) { // From the JDK 1.2 spec. return order >>> 16; } | 17,267 |
public static final short secondaryOrder(int order) { // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255); } | public static short secondaryOrder(int order) { // From the JDK 1.2 spec. return (short) ((order >>> 8) & 255); } | 17,268 |
public static final short tertiaryOrder(int order) { // From the JDK 1.2 spec. return (short) (order & 255); } | public static short tertiaryOrder(int order) { // From the JDK 1.2 spec. return (short) (order & 255); } | 17,269 |
public FormatMismatch(String why) { super(why); } | public FormatMismatch() { super(why); } | 17,270 |
public FormatMismatch(String why) { super(why); } | public FormatMismatch(String why) { } | 17,271 |
public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | 17,272 |
public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { HashSet result = new HashSet(); Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.n... | 17,273 |
public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | 17,274 |
public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | public static AudioInputStream getAudioInputStream(InputStream is) throws UnsupportedAudioFileException, IOException { Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class); while (i.hasNext()) { AudioFileReader reader = (AudioFileReader) i.next(); try { r... | 17,275 |
boolean isComponentPartOfCurrentMenu (Component c) { MenuElement[] subElements; for (int i = 0; i < selection.size (); i++) { subElements = ((MenuElement) selection.get (i)).getSubElements (); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getComponent... | boolean isComponentPartOfCurrentMenu (Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selection.get (i)).getSubElements (); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getCompone... | 17,276 |
boolean isComponentPartOfCurrentMenu (Component c) { MenuElement[] subElements; for (int i = 0; i < selection.size (); i++) { subElements = ((MenuElement) selection.get (i)).getSubElements (); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getComponent... | boolean isComponentPartOfCurrentMenu (Component c) { MenuElement[] subElements; for (int i = 0; i < selection.size (); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getComponen... | 17,277 |
public Location(byte tag, Class clazz, Method meth, int index) throws JdwpException { this.tag = tag; this.crti = (ClassReferenceTypeId) VMIdManager.getDefault().getReferenceTypeId(clazz); this.mid = VMIdManager.getDefault().getObjectId(meth); this.index = index; } | public Location(byte tag, Class clazz, Method meth, int index) throws JdwpException { this.tag = tag; this.crti = (ClassReferenceTypeId) VMIdManager.getDefault().getReferenceTypeId(clazz); this.mid = VMIdManager.getDefault().getObjectId(meth); this.index = index; } | 17,279 |
public Location(byte tag, Class clazz, Method meth, int index) throws JdwpException { this.tag = tag; this.crti = (ClassReferenceTypeId) VMIdManager.getDefault().getReferenceTypeId(clazz); this.mid = VMIdManager.getDefault().getObjectId(meth); this.index = index; } | public Location(byte tag, Class clazz, Method meth, int index) throws JdwpException { this.tag = tag; this.crti = (ClassReferenceTypeId) VMIdManager.getDefault().getReferenceTypeId(clazz); this.mid = VMIdManager.getDefault().getObjectId(meth); this.index = index; } | 17,280 |
public void write(DataOutputStream os) throws IOException { os.writeByte(tag); crti.write(os); mid.write(os); os.writeInt(index); } | public void write(DataOutputStream os) throws IOException { os.writeByte(tag); crti.write(os); mid.write(os); os.writeInt(index); } | 17,281 |
public void append(String toAppend) { setText(getText() + toAppend); } | public void append(String toAppend) { try { getDocument().insertString(getText().length(), toAppend, null); } catch (BadLocationException exception) { throw new RuntimeException("Unexpected exception occurred.", exception); } } | 17,282 |
public boolean getLineWrap() { return wrapping; } | public boolean getLineWrap() { return lineWrap; } | 17,283 |
public boolean getScrollableTracksViewportWidth() { return wrapping ? true : super.getScrollableTracksViewportWidth(); } | public boolean getScrollableTracksViewportWidth() { return lineWrap ? true : super.getScrollableTracksViewportWidth(); } | 17,284 |
public void setLineWrap(boolean flag) { if (wrapping == flag) return; boolean oldValue = wrapping; wrapping = flag; firePropertyChange("lineWrap", oldValue, wrapping); } | public void setLineWrap(boolean flag) { if (lineWrap == flag) return; boolean oldValue = wrapping; wrapping = flag; firePropertyChange("lineWrap", oldValue, wrapping); } | 17,285 |
public void setLineWrap(boolean flag) { if (wrapping == flag) return; boolean oldValue = wrapping; wrapping = flag; firePropertyChange("lineWrap", oldValue, wrapping); } | public void setLineWrap(boolean flag) { if (wrapping == flag) return; boolean oldValue = wrapping; wrapping = flag; firePropertyChange("lineWrap", oldValue, wrapping); } | 17,286 |
public TreePath(Object element) { // Create Path path = new Object[1]; path[0] = element; } | public TreePath(Object[] path) { // Create Path path = new Object[1]; path[0] = element; } | 17,288 |
public TreePath(Object element) { // Create Path path = new Object[1]; path[0] = element; } | public TreePath(Object element) { // Create Path path = new Object[1]; path[0] = element; } | 17,289 |
public String toString() { return null; // TODO } | public String toString() { if (path.length == 1) return String.valueOf(path[0]); else return Arrays.asList(path).toString(); // TODO } | 17,290 |
public void read(cdrInput in) { service_context = ServiceContext.readSequence(in); request_id = in.read_ulong(); response_expected = in.read_boolean(); object_key = in.read_sequence(); operation = in.read_string(); requesting_principal = in.read_sequence(); in.setCodeSet(cxCodeSet.find(service_c... | public void read(AbstractCdrInput in) { service_context = ServiceContext.readSequence(in); request_id = in.read_ulong(); response_expected = in.read_boolean(); object_key = in.read_sequence(); operation = in.read_string(); requesting_principal = in.read_sequence(); in.setCodeSet(cxCodeSet.find(s... | 17,291 |
public void read(cdrInput in) { service_context = ServiceContext.readSequence(in); request_id = in.read_ulong(); response_expected = in.read_boolean(); object_key = in.read_sequence(); operation = in.read_string(); requesting_principal = in.read_sequence(); in.setCodeSet(cxCodeSet.find(service_c... | public void read(cdrInput in) { service_context = ServiceContext.readSequence(in); request_id = in.read_ulong(); response_expected = in.read_boolean(); object_key = in.read_sequence(); operation = in.read_string(); requesting_principal = in.read_sequence(); in.setCodeSet(CodeSetServiceContext.fi... | 17,292 |
public void write(cdrOutput out) { ServiceContext.writeSequence(out, service_context); out.write_ulong(request_id); out.write_boolean(response_expected); out.write_sequence(object_key); out.write_string(operation); out.write_sequence(requesting_principal); out.setCodeSet(cxCodeSet.find(service_c... | public void write(AbstractCdrOutput out) { ServiceContext.writeSequence(out, service_context); out.write_ulong(request_id); out.write_boolean(response_expected); out.write_sequence(object_key); out.write_string(operation); out.write_sequence(requesting_principal); out.setCodeSet(cxCodeSet.find(s... | 17,293 |
public void write(cdrOutput out) { ServiceContext.writeSequence(out, service_context); out.write_ulong(request_id); out.write_boolean(response_expected); out.write_sequence(object_key); out.write_string(operation); out.write_sequence(requesting_principal); out.setCodeSet(cxCodeSet.find(service_c... | public void write(cdrOutput out) { ServiceContext.writeSequence(out, service_context); out.write_ulong(request_id); out.write_boolean(response_expected); out.write_sequence(object_key); out.write_string(operation); out.write_sequence(requesting_principal); out.setCodeSet(CodeSetServiceContext.fi... | 17,294 |
private void readHeader() throws IOException { /* 1. Check the two magic bytes */ CRC32 headCRC = new CRC32(); int magic = in.read(); if (magic < 0) { eos = true; return; } headCRC.update(magic); if (magic != (GZIP_MAGIC >> 8)) throw new IOException("Error in GZIP header, first... | private void readHeader() throws IOException { /* 1. Check the two magic bytes */ CRC32 headCRC = new CRC32(); int magic = in.read(); if (magic < 0) { eos = true; return; } headCRC.update(magic); if (magic != (GZIP_MAGIC >> 8)) throw new IOException("Error in GZIP header, first... | 17,295 |
static void installBorder(JComponent c, String defaultBorderName) { //Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource. } | public static void installBorder(JComponent c, String defaultBorderName) { //Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource. } | 17,296 |
public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName) { //Convenience method for initializing a components foreground background and font properties with values from the current defaults table. } | public static void installColorsAndFont(JComponent component, String defaultBgName, String defaultFgName, String defaultFontName) { //Convenience method for initializing a components foreground background and font properties with values from the current defaults table. } | 17,297 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.