bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
public JInternalFrame getSelectedFrame() { return null; // TODO } // getSelectedFrame() | public JInternalFrame getSelectedFrame() { return null; // TODO } // getSelectedFrame() | 19,094 |
public String getUIClassID() { return uiClassID; } // getUIClassID() | public String getUIClassID() { return uiClassID; } // getUIClassID() | 19,095 |
protected String paramString() { return null; // TODO } // paramString() | protected String paramString() { return null; // TODO } // paramString() | 19,096 |
public void setDesktopManager(DesktopManager manager) { this.desktopManager = manager; // TODO } // setDesktopManager() | public void setDesktopManager(DesktopManager manager) { this.desktopManager = manager; // TODO } // setDesktopManager() | 19,097 |
public void setDragMode(int mode) { this.dragMode = mode; // TODO } // setDragMode() | public void setDragMode(int mode) { this.dragMode = mode; // TODO } // setDragMode() | 19,098 |
public void updateUI() { setUI((DesktopPaneUI) UIManager.get(this)); invalidate(); } // updateUI() | public void updateUI() { setUI((DesktopPaneUI) UIManager.get(this)); invalidate(); } // updateUI() | 19,099 |
public CompoundEdit() { } // CompoundEdit() | public CompoundEdit() { } // CompoundEdit() | 19,100 |
public void die() { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } // for: index } // die() | public void die() { for (int i = edits.size() - 1; i >= 0; i--) ((UndoableEdit) edits.elementAt(i)).die(); // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current... | 19,101 |
public void die() { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } // for: index } // die() | public void die() { // Variables int index; UndoableEdit current; // Loop through all contained UndoableEdits for (index = edits.size() - 1; index >= 0; index--) { current = (UndoableEdit) edits.elementAt(index); current.die(); } // for: index } // die() | 19,102 |
public String getPresentationName() { if (edits.size() == 0) { return super.getPresentationName(); } else { return lastEdit().getPresentationName(); } } // getPresentationName() | public String getPresentationName() { if (edits.size() == 0) { return super.getPresentationName(); } else { return lastEdit().getPresentationName(); } } // getPresentationName() | 19,103 |
public boolean isSignificant() { // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } // for: index return false; } // isSignificant() | public boolean isSignificant() { for (int i = edits.size() - 1; i >= 0; i--) if (((UndoableEdit) edits.elementAt(i)).isSignificant()) return true; // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index);... | 19,104 |
public boolean isSignificant() { // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } // for: index return false; } // isSignificant() | public boolean isSignificant() { // Variables int index; UndoableEdit current; // Check each edit for (index = 0; index < edits.size(); index++) { current = (UndoableEdit) edits.elementAt(index); if (current.isSignificant() == true) { return true; } } // for: index return false; } // isSignificant() | 19,105 |
protected UndoableEdit lastEdit() { if (edits.size() == 0) { return null; } return (UndoableEdit) edits.elementAt(edits.size() - 1); } // lastEdit() | protected UndoableEdit lastEdit() { if (edits.size() == 0) { return null; } return (UndoableEdit) edits.elementAt(edits.size() - 1); } // lastEdit() | 19,106 |
public boolean addEdit(UndoableEdit anEdit) { return false; } // addEdit() | public boolean addEdit(UndoableEdit anEdit) { return false; } // addEdit() | 19,107 |
public boolean addEdit(UndoableEdit anEdit); | boolean addEdit(UndoableEdit anEdit); | 19,108 |
public boolean replaceEdit(UndoableEdit anEdit); | boolean replaceEdit(UndoableEdit anEdit); | 19,109 |
public boolean canRedo() { if (alive == true && hasBeenDone == false) { return true; } // if return false; } // canRedo() | public boolean canRedo() { if (alive == true && hasBeenDone == false) { return true; } // if return false; } // canRedo() | 19,110 |
public boolean canUndo() { if (alive == true && hasBeenDone == true) { return true; } // if return false; } // canUndo() | public boolean canUndo() { if (alive == true && hasBeenDone == true) { return true; } // if return false; } // canUndo() | 19,111 |
public void die(); | void die(); | 19,112 |
public String getPresentationName(); | String getPresentationName(); | 19,113 |
public String getRedoPresentationName() { if (getPresentationName().equals("") == true) { return RedoName; } else { return RedoName + " " + getPresentationName(); } } // getRedoPresentationName() | public String getRedoPresentationName() { if (getPresentationName().equals("") == true) { return RedoName; } else { return RedoName + " " + getPresentationName(); } } // getRedoPresentationName() | 19,114 |
public String getRedoPresentationName(); | String getRedoPresentationName(); | 19,115 |
public String getUndoPresentationName() { if (getPresentationName().equals("") == true) { return UndoName; } else { return UndoName + " " + getPresentationName(); } } // getUndoPresentationName() | public String getUndoPresentationName() { if (getPresentationName().equals("") == true) { return UndoName; } else { return UndoName + " " + getPresentationName(); } } // getUndoPresentationName() | 19,116 |
public String getUndoPresentationName(); | String getUndoPresentationName(); | 19,117 |
public boolean isSignificant(); | boolean isSignificant(); | 19,118 |
public void redo() throws CannotRedoException; | void redo() throws CannotRedoException; | 19,119 |
public String toString() { return null; // TODO } // toString() | public String toString() { return null; // TODO } // toString() | 19,120 |
public void undo() throws CannotUndoException; | void undo() throws CannotUndoException; | 19,121 |
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. (If nothing was selected, menu... | 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. (If nothing was selected, menu... | 19,122 |
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. (If nothing was selected, menu... | 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. (If nothing was selected, menu... | 19,123 |
protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMajorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable ... | protected SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMajorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable ... | 19,125 |
protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMinorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable. ... | protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { SizeRequirements sr = super.calculateMinorAxisRequirements(axis, r); // FIXME: adjust it if the CSS width or height attribute is specified // and applicable. ... | 19,126 |
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // FIXME: Not implemented. super.layoutMinorAxis(targetSpan, axis, offsets, spans); } | protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { // FIXME: Not implemented. int viewCount = getViewCount(); for (int i = 0; i < viewCount; i++) { View view = getView(i); int min = (int) view.getMinimumSpan(axis); int max; Length length = cs... | 19,127 |
public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else return Integer.MAX_VALUE; } | public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else return Integer.MAX_VALUE; } | 19,128 |
public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else return Integer.MAX_VALUE; } | public float getMaximumSpan(int axis) { if (axis == getAxis()) return getPreferredSpan(axis); else requirements[axis] = calculateMinorAxisRequirements(axis, requirements[axis]); } return requirements[axis].maximum; } | 19,129 |
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe... | protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. SizeRequirements.calculateTiledPositions(targe... | 19,130 |
protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. // TODO: This might be an opportunity for perf... | protected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans) { SizeRequirements[] childReqs = getChildRequirements(axis); // Calculate the spans and offsets using the SizeRequirements uility // methods. // TODO: This might be an opportunity for perf... | 19,131 |
public void paint(Graphics g, Shape a) { // Adjust size if the size is changed. Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside)... | public void paint(Graphics g, Shape a) { // Adjust size if the size is changed. Rectangle bounds = a.getBounds(); if (bounds.width != getWidth() || bounds.height != getHeight()) setSize(bounds.width, bounds.height); Rectangle inside = getInsideAllocation(a); Rectangle copy = new Rectangle(inside)... | 19,132 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,133 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,134 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,135 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,136 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,137 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,138 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,139 |
public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | public void replace(int offset, int length, View[] views) { // Resize and copy data for cache arrays. // The spansX cache. int oldSize = getViewCount(); int[] newSpansX = new int[oldSize - length + views.length]; System.arraycopy(spansX, 0, newSpansX, 0, offset); System.arraycopy(spansX, offset + l... | 19,140 |
public float getInset(int size, View v) { // FIXME: Not implemented. return 0; } | public float getInset(int size, View v) { // FIXME: Not implemented. float inset; switch (size) { case View.TOP: inset = topInset; break; case View.BOTTOM: inset = bottomInset; break; case View.LEFT: inset = leftInset; break; case View.RIGHT: inset = rightInset; break; default: inset = 0.0F; } return i... | 19,141 |
public float getPartialSpan(int p0, int p1) { Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); try { doc.getText(p0, p1 - p0, seg); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException must not be thrown... | public float getPartialSpan(int p0, int p1) { Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); try { doc.getText(p0, p1 - p0, seg); } catch (BadLocationException ex) { AssertionError ae; ae = new AssertionError("BadLocationException ... | 19,142 |
public Segment getText(int p0, int p1) { Segment txt = new Segment(); try { getDocument().getText(p0, p1 - p0, txt); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException should not be " + "thrown here. p0 = " + p0 + "... | public Segment getText(int p0, int p1) { Segment txt = new Segment(); try { getDocument().getText(p0, p1 - p0, txt); } catch (BadLocationException ex) { AssertionError ae; ae = new AssertionError("BadLocationException should not be " + "thrown her... | 19,144 |
public abstract void setText (CharacterIterator newText); | public void setText (String newText) { setText (new StringCharacterIterator (newText)); } | 19,146 |
protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 19,148 |
protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 19,149 |
protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | protected void insertUpdate(ElementSpec[] data) { // Push the current path to the stack. Element current = root; int index = current.getElementIndex(offset); while (! current.isLeaf()) { Element child = current.getElement(index); int editIndex = child.isLeaf() ? index... | 19,150 |
protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | protected void create(ElementSpec[] data) { try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i) {... | 19,151 |
protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 19,152 |
protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | protected void create(ElementSpec[] data) { writeLock(); try { // Clear content if there is some. int len = getLength(); if (len > 0) remove(0, len); // Now we insert the content. StringBuilder b = new StringBuilder(); for (int i = 0; i < data.length; ++i... | 19,153 |
protected void insert(int offset, ElementSpec[] data) throws BadLocationException { if (data == null || data.length == 0) return; try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception ... | protected void insert(int offset, ElementSpec[] data) throws BadLocationException { if (data == null || data.length == 0) return; try { // writeLock() and writeUnlock() should always be in a try/finally // block so that locking balance is guaranteed even if some // exception ... | 19,155 |
public Object stringToValue (String value) throws ParseException { int vLength = value.length(); // For value to be a valid it must be the same length as the mask // note this doesn't take into account symbols that occupy more than // one character, this is something we may possibly need to fix. ... | public Object stringToValue (String value) throws ParseException { int vLength = value.length(); // For value to be a valid it must be the same length as the mask // note this doesn't take into account symbols that occupy more than // one character, this is something we may possibly need to fix. ... | 19,157 |
public String valueToString (Object value) throws ParseException { String result = super.valueToString(value); int rLength = result.length(); // If value is longer than the mask, truncate it. Note we may need to // account for symbols that are more than one character long. if (rLength > maskLeng... | public String valueToString (Object value) throws ParseException { String result = super.valueToString(value); int rLength = result.length(); // If value is longer than the mask, truncate it. Note we may need to // account for symbols that are more than one character long. if (rLength > maskLeng... | 19,158 |
public static boolean isLetter(char ch) { return ((1 << getType(ch)) & ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1 << OTHER_LETTER))) != 0; } | public static boolean isLetter(char ch) { return ((1 << getType(ch)) & ((1 << UPPERCASE_LETTER) | (1 << LOWERCASE_LETTER) | (1 << TITLECASE_LETTER) | (1 << MODIFIER_LETTER) | (1 << OTHER_LETTER))) != 0; } | 19,159 |
public CRL engineGenerateCRL(InputStream inStream) throws CRLException { try { return generateCRL(inStream); } catch (IOException ioe) { throw new CRLException(ioe.toString()); } } | public CRL engineGenerateCRL(InputStream inStream) throws CRLException { try { return generateCRL(inStream); } catch (IOException ioe) { CRLException crle = new CRLException(ioe.getMessage()); crle.initCause (ioe); throw crle; } } | 19,160 |
public Collection engineGenerateCRLs(InputStream inStream) throws CRLException { LinkedList crls = new LinkedList(); while (true) { try { crls.add(generateCRL(inStream)); } catch (EOFException eof) { break; } catch (IOExcept... | public Collection engineGenerateCRLs(InputStream inStream) throws CRLException { LinkedList crls = new LinkedList(); while (true) { try { crls.add(generateCRL(inStream)); } catch (EOFException eof) { break; } catch (IOExcept... | 19,161 |
public Certificate engineGenerateCertificate(InputStream inStream) throws CertificateException { try { return generateCert(inStream); } catch (IOException ioe) { throw new CertificateException(ioe.toString()); } } | public Certificate engineGenerateCertificate(InputStream inStream) throws CertificateException { try { return generateCert(inStream); } catch (IOException ioe) { CertificateException ce = new CertificateException(ioe.getMessage()); ce.initCause (ioe); throw ce; } } | 19,162 |
public Collection engineGenerateCertificates(InputStream inStream) throws CertificateException { LinkedList certs = new LinkedList(); while (true) { try { certs.add(generateCert(inStream)); } catch (EOFException eof) { break; } ... | public Collection engineGenerateCertificates(InputStream inStream) throws CertificateException { LinkedList certs = new LinkedList(); while (true) { try { certs.add(generateCert(inStream)); } catch (EOFException eof) { break; } ... | 19,163 |
public static double getFlatnessSq(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2) { // XXX Implement. throw new Error("not implemented"); } | public static double getFlatnessSq(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2) { // XXX Implement. return Math.max(Line2D.ptSegDistSq(x1, y1, x2, y2, cx1, cy1), Line2D.ptSegDistSq(x1, y1, x2,... | 19,166 |
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current = 0; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public... | 19,167 |
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current >= 2; } public vo... | 19,168 |
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 19,169 |
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 19,170 |
public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | public PathIterator getPathIterator(final AffineTransform at) { return new PathIterator() { /** Current coordinate. */ private int current; public int getWindingRule() { return WIND_NON_ZERO; } public boolean isDone() { return current < 2; } public voi... | 19,171 |
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | public int currentSegment(float[] coords) { int result; switch (current) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current... | 19,172 |
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | 19,173 |
public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | public int currentSegment(float[] coords) { if (current == 0) { coords[0] = (float) getX1(); coords[1] = (float) getY1(); if (at != null) at.transform(coords, 0, coords, 0, 1); return SEG_MOVETO; } if (current == 1) ... | 19,174 |
public boolean isDone() { return current < 2; } | public boolean isDone() { return current >= 2; } | 19,175 |
public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | public void subdivide(CubicCurve2D left, CubicCurve2D right) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 19,176 |
public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 19,177 |
public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | public void subdivide(CubicCurve2D l, CubicCurve2D r) { if (l == null) l = new CubicCurve2D.Double(); if (r == null) r = new CubicCurve2D.Double(); // Use empty slots at end to share single array. double[] d = new double[] { getX1(), getY1(), getCtrlX1(), getCtrlY1(), ... | 19,178 |
public static int solveQuadratic(double[] eqn, double[] res) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the //... | public static int solveQuadratic(double[] eqn) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the // permission to... | 19,179 |
public static int solveQuadratic(double[] eqn, double[] res) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the //... | public static int solveQuadratic(double[] eqn, double[] res) { // Taken from poly/solve_quadratic.c in the GNU Scientific Library // (GSL), cvs revision 1.7 of 2003-07-26. For the original source, // see http://www.gnu.org/software/gsl/ // // Brian Gough, the author of that code, has granted the //... | 19,180 |
public static TypeCode type() { ORB orb = Restricted_ORB.Singleton; return orb.create_alias_tc(id(), "FieldName", orb.create_string_tc(0)); } | public static TypeCode type() { ORB orb = OrbRestricted.Singleton; return orb.create_alias_tc(id(), "FieldName", orb.create_string_tc(0)); } | 19,183 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (m.isSelected() && m.isEnabled()) currentIc... | 19,184 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 19,185 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 19,186 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); Icon currentIcon = null; if (b.isSelected() && b.isEnabled()) currentIc... | 19,187 |
private boolean deflateFast(boolean flush, boolean finish) { if (lookahead < MIN_LOOKAHEAD && !flush) return false; while (lookahead >= MIN_LOOKAHEAD || flush) { if (lookahead == 0) { /* We are flushing everything */ huffman.flushBlock(window, blockStart, strstart - blockStart, fin... | private boolean deflateFast(boolean flush, boolean finish) { if (lookahead < MIN_LOOKAHEAD && !flush) return false; while (lookahead >= MIN_LOOKAHEAD || flush) { if (lookahead == 0) { /* We are flushing everything */ huffman.flushBlock(window, blockStart, strstart - blockStart, fin... | 19,188 |
public Point2D getPoint2D (Point2D srcPt, Point2D dstPt) { return transform.transform (srcPt, dstPt); } | public final Point2D getPoint2D (Point2D srcPt, Point2D dstPt) { return transform.transform (srcPt, dstPt); } | 19,190 |
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | 19,191 |
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | 19,192 |
public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { Color savedColor = g.getColor(); if (c.isEnabled()) g.setColor(MetalLookAndFeel.getControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlShadow()); g.drawLine(x, y, x + w - 1, ... | 19,193 |
public MetalComboBoxEditor() { super(); editor.setBorder(new MetalComboBoxEditorBorder()); } | public MetalComboBoxEditor() { editor = new JTextField("", 9); editor.setBorder(new MetalComboBoxEditorBorder()); } | 19,194 |
public static String setProperty(String key, String value) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new PropertyPermission(key, "write")); return (String) properties.setProperty(key, value); } | public static String setProperty(String key, String value) { SecurityManager sm = SecurityManager.current; // Be thread-safe. if (sm != null) sm.checkPermission(new PropertyPermission(key, "write")); return (String) properties.setProperty(key, value); } | 19,196 |
public static String setProperty(String key, String value) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new PropertyPermission(key, "write")); return (String) properties.setProperty(key, value); } | public static String setProperty(String key, String value) { SecurityManager sm = Runtime.securityManager; // Be thread-safe. if (sm != null) sm.checkPermission(new PropertyPermission(key, "write")); return SystemProperties.setProperty(key, value); } | 19,197 |
public final Class getCategory() { return JobKOctetsProcessed.class; } | public Class getCategory() { return JobKOctetsProcessed.class; } | 19,198 |
public final String getName() { return "job-k-octets-processed"; } | public String getName() { return "job-k-octets-processed"; } | 19,199 |
private void distributeSpillResizing(TableColumn[] cols, int spill, TableColumn resizeIt) { int average = spill / (cols.length-1); for (int i = 0; i < cols.length; i++) { if (cols[i] != null && !cols[i].equals(resizeIt)) cols[i].setWidth(cols[i].getPre... | private void distributeSpillResizing(TableColumn[] cols, int spill, TableColumn resizeIt) { int average = 0; if (cols.length != 1) average = spill / (cols.length-1); for (int i = 0; i < cols.length; i++) { if (cols[i] != null && !cols[i].equals(resizeIt)) ... | 19,200 |
public int getNativeFD() { return ((SocketChannelImpl) ch).getNativeFD(); } | public int getNativeFD() { NIOSocket socket = (NIOSocket) ((SocketChannelImpl) ch).socket(); return socket.getPlainSocketImpl().getNativeFD(); } | 19,202 |
public static CertStore getInstance(String type, CertStoreParameters params) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(type, params, p[i]); ... | public static CertStore getInstance(String type, CertStoreParameters params) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException { Provider[] p = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(type, params, p[i]); ... | 19,203 |
public void actionPerformed(ActionEvent event) { // first we filter the following events: // - control characters // - key events with the ALT modifier (FIXME: filter that too!) char c = event.getActionCommand().charAt(0); if (Character.isISOControl(c)) return; JTextComponent... | public void actionPerformed(ActionEvent event) { // first we filter the following events: // - control characters // - key events with the ALT modifier (FIXME: filter that too!) char c = event.getActionCommand().charAt(0); if (Character.isISOControl(c)) return; JTextComponent... | 19,206 |
public boolean equals(Object other) { ProxyType pt = (ProxyType) other; if (loader != pt.loader || interfaces.length != pt.interfaces.length) return false; return sameTypes(interfaces, pt.interfaces); } | public boolean equals(Object other) { ProxyType pt = (ProxyType) other; if (loader != pt.loader || interfaces.length != pt.interfaces.length) return false; for (int i = 0; i < interfaces.length; i++) if (interfaces[i] != pt.interfaces[i]) return false; return true; } | 19,209 |
public JIFileSystem(Device device, boolean readOnly) throws FileSystemException { if (readOnly==false){ throw new FileSystemException("JIFS can not be created as writable..."); } this.device = device; try { rootDir = new JIFSDirectory(this.device.getId(), true); } catch ( IOException e){ e.printStackTrace()... | public JIFileSystem(Device device, boolean readOnly) throws FileSystemException { if (readOnly==false){ throw new FileSystemException("JIFS can not be created as writable..."); } this.device = device; try { rootDir = new JIFSDirectory(this.device.getId(), true); } catch ( IOException e){ e.printStackTrace()... | 19,210 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.