bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.setDot(0); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } ... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.setDot(0); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } ... | 37,783 |
SelectionBackwardAction() { super(selectionBackwardAction); } | SelectionBackwardAction() { super(selectionBackwardAction, SwingConstants.WEST); } | 37,784 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.moveDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen.... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.moveDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen.... | 37,785 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.moveDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen.... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); c.moveDot(0); try { c.setMagicCaretPosition(t.modelToView(0).getLocation()); } catch(BadLocationException ble) { // Can't happen.... | 37,786 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { // TODO: There is a more efficent solution, but // viewToModel doesn't work properly. Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPos... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { // TODO: There is a more efficent solution, but // viewToModel doesn't work properly. Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPos... | 37,787 |
SelectionDownAction() { super(selectionDownAction); } | SelectionDownAction() { super(selectionDownAction, SwingConstants.SOUTH); } | 37,788 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocati... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocati... | 37,789 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocati... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(BadLocati... | 37,790 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur... | 37,791 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur... | public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { Point p = t.modelToView(t.getCaret().getDot()).getLocation(); int cur = t.getCaretPosition(); int y = p.y; int length = t.getDocument().getLength(); while (y == p.y && cur... | 37,792 |
SelectionForwardAction() { super(selectionForwardAction); } | SelectionForwardAction() { super(selectionForwardAction); } | 37,793 |
SelectionUpAction() { super(selectionUpAction); } | SelectionUpAction() { super(selectionUpAction); } | 37,794 |
UpAction() { super(upAction); } | UpAction() { super(upAction, SwingConstants.NORTH); } | 37,795 |
private final void writeLeInt(int value) throws IOException { writeLeShort(value); writeLeShort(value >> 16); } | private void writeLeInt(int value) throws IOException { writeLeShort(value); writeLeShort(value >> 16); } | 37,796 |
private final void writeLeShort(int value) throws IOException { out.write(value & 0xff); out.write((value >> 8) & 0xff); } | private void writeLeShort(int value) throws IOException { out.write(value & 0xff); out.write((value >> 8) & 0xff); } | 37,797 |
public AffineTransform() { m00 = m11 = 1; } | public AffineTransform() { m00 = m11 = 1; } | 37,798 |
public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } } | public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } } | 37,799 |
public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } } | public Object clone() { try { return super.clone(); } catch (CloneNotSupportedException e) { throw (Error) new InternalError().initCause(e); // Impossible } } | 37,800 |
public void concatenate(AffineTransform tx) { double n00 = m00 * tx.m00 + m01 * tx.m10; double n01 = m00 * tx.m01 + m01 * tx.m11; double n02 = m00 * tx.m02 + m01 * tx.m12 + m02; double n10 = m10 * tx.m00 + m11 * tx.m10; double n11 = m10 * tx.m01 + m11 * tx.m11; double n12 = m10 * tx.m02 + m11 * tx.m12 + m12; m0... | public void concatenate(AffineTransform tx) { double n00 = m00 * tx.m00 + m01 * tx.m10; double n01 = m00 * tx.m01 + m01 * tx.m11; double n02 = m00 * tx.m02 + m01 * tx.m12 + m02; double n10 = m10 * tx.m00 + m11 * tx.m10; double n11 = m10 * tx.m01 + m11 * tx.m11; double n12 = m10 * tx.m02 + m11 * tx.m12 + m12; m0... | 37,801 |
public AffineTransform createInverse() throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("can't invert transform"); return new AffineTransform(m11 / det, -m10 / det, m01 / det, -m00 / det, -m02, -m12); } | public AffineTransform createInverse() throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("can't invert transform"); return new AffineTransform(m11 / det, -m10 / det, m01 / det, -m00 / det, -m02, -m12); } | 37,802 |
public AffineTransform createInverse() throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("can't invert transform"); return new AffineTransform(m11 / det, -m10 / det, m01 / det, -m00 / det, -m02, -m12); } | public AffineTransform createInverse() throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("can't invert transform"); return new AffineTransform(m11 / det, -m10 / det, m01 / det, -m00 / det, -m02, -m12); } | 37,803 |
public Shape createTransformedShape(Shape src) { GeneralPath p = new GeneralPath(src); p.transform(this); return p; } | public Shape createTransformedShape(Shape src) { GeneralPath p = new GeneralPath(src); p.transform(this); return p; } | 37,804 |
public Point2D deltaTransform(Point2D src, Point2D dst) { if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y; double ny = m10 * x + m11 * y; dst.setLocation(nx, ny); return dst; } | public Point2D deltaTransform(Point2D src, Point2D dst) { if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y; double ny = m10 * x + m11 * y; dst.setLocation(nx, ny); return dst; } | 37,805 |
public boolean equals(Object obj) { if (!(obj instanceof AffineTransform)) return false; AffineTransform t = (AffineTransform) obj; return (m00 == t.m00 && m01 == t.m01 && m02 == t.m02 && m10 == t.m10 && m11 == t.m11 && m12 == t.m12); } | public boolean equals(Object obj) { if (!(obj instanceof AffineTransform)) return false; AffineTransform t = (AffineTransform) obj; return (m00 == t.m00 && m01 == t.m01 && m02 == t.m02 && m10 == t.m10 && m11 == t.m11 && m12 == t.m12); } | 37,806 |
public boolean equals(Object obj) { if (!(obj instanceof AffineTransform)) return false; AffineTransform t = (AffineTransform) obj; return (m00 == t.m00 && m01 == t.m01 && m02 == t.m02 && m10 == t.m10 && m11 == t.m11 && m12 == t.m12); } | public boolean equals(Object obj) { if (!(obj instanceof AffineTransform)) return false; AffineTransform t = (AffineTransform) obj; return (m00 == t.m00 && m01 == t.m01 && m02 == t.m02 && m10 == t.m10 && m11 == t.m11 && m12 == t.m12); } | 37,807 |
public double getDeterminant() { return m00 * m11 - m01 * m10; } | public double getDeterminant() { return m00 * m11 - m01 * m10; } | 37,808 |
public void getMatrix(double[] d) { d[0] = m00; d[1] = m10; d[2] = m01; d[3] = m11; if (d.length >= 6) { d[4] = m02; d[5] = m12; } } | public void getMatrix(double[] d) { d[0] = m00; d[1] = m10; d[2] = m01; d[3] = m11; if (d.length >= 6) { d[4] = m02; d[5] = m12; } } | 37,809 |
public void getMatrix(double[] d) { d[0] = m00; d[1] = m10; d[2] = m01; d[3] = m11; if (d.length >= 6) { d[4] = m02; d[5] = m12; } } | public void getMatrix(double[] d) { d[0] = m00; d[1] = m10; d[2] = m01; d[3] = m11; if (d.length >= 6) { d[4] = m02; d[5] = m12; } } | 37,810 |
public static AffineTransform getRotateInstance(double theta) { AffineTransform t = new AffineTransform(); t.setToRotation(theta); return t; } | public static AffineTransform getRotateInstance(double theta) { AffineTransform t = new AffineTransform(); t.setToRotation(theta); return t; } | 37,811 |
public static AffineTransform getScaleInstance(double sx, double sy) { AffineTransform t = new AffineTransform(); t.setToScale(sx, sy); return t; } | public static AffineTransform getScaleInstance(double sx, double sy) { AffineTransform t = new AffineTransform(); t.setToScale(sx, sy); return t; } | 37,812 |
public double getScaleX() { return m00; } | public double getScaleX() { return m00; } | 37,813 |
public double getScaleY() { return m11; } | public double getScaleY() { return m11; } | 37,814 |
public static AffineTransform getShearInstance(double shx, double shy) { AffineTransform t = new AffineTransform(); t.setToShear(shx, shy); return t; } | public static AffineTransform getShearInstance(double shx, double shy) { AffineTransform t = new AffineTransform(); t.setToShear(shx, shy); return t; } | 37,815 |
public double getShearX() { return m01; } | public double getShearX() { return m01; } | 37,816 |
public double getShearY() { return m10; } | public double getShearY() { return m10; } | 37,817 |
public static AffineTransform getTranslateInstance(double tx, double ty) { AffineTransform t = new AffineTransform(); t.setToTranslation(tx, ty); return t; } | public static AffineTransform getTranslateInstance(double tx, double ty) { AffineTransform t = new AffineTransform(); t.setToTranslation(tx, ty); return t; } | 37,818 |
public double getTranslateX() { return m02; } | public double getTranslateX() { return m02; } | 37,819 |
public double getTranslateY() { return m12; } | public double getTranslateY() { return m12; } | 37,820 |
public int getType() { return type; } | public int getType() { return type; } | 37,821 |
public int hashCode() { long l = Double.doubleToLongBits(m00); l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m01); l = l * 31 + Double.doubleToLongBits(m11); l = l * 31 + Double.doubleToLongBits(m02); l = l * 31 + Double.doubleToLongBits(m12); return (int) ((l >> 32) ^ l); } | public int hashCode() { long l = Double.doubleToLongBits(m00); l = l * 31 + Double.doubleToLongBits(m10); l = l * 31 + Double.doubleToLongBits(m01); l = l * 31 + Double.doubleToLongBits(m11); l = l * 31 + Double.doubleToLongBits(m02); l = l * 31 + Double.doubleToLongBits(m12); return (int) ((l >> 32) ^ l); } | 37,822 |
public Point2D inverseTransform(Point2D src, Point2D dst) throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("couldn't invert transform"); if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); do... | public Point2D inverseTransform(Point2D src, Point2D dst) throws NoninvertibleTransformException { double det = getDeterminant(); if (det == 0) throw new NoninvertibleTransformException("couldn't invert transform"); if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); do... | 37,823 |
public boolean isIdentity() { // Rather than rely on type, check explicitly. return (m00 == 1 && m01 == 0 && m02 == 0 && m10 == 0 && m11 == 1 && m12 == 0); } | public boolean isIdentity() { // Rather than rely on type, check explicitly. return (m00 == 1 && m01 == 0 && m02 == 0 && m10 == 0 && m11 == 1 && m12 == 0); } | 37,824 |
public boolean isIdentity() { // Rather than rely on type, check explicitly. return (m00 == 1 && m01 == 0 && m02 == 0 && m10 == 0 && m11 == 1 && m12 == 0); } | public boolean isIdentity() { // Rather than rely on type, check explicitly. return (m00 == 1 && m01 == 0 && m02 == 0 && m10 == 0 && m11 == 1 && m12 == 0); } | 37,825 |
public void preConcatenate(AffineTransform tx) { double n00 = tx.m00 * m00 + tx.m01 * m10; double n01 = tx.m00 * m01 + tx.m01 * m11; double n02 = tx.m00 * m02 + tx.m01 * m12 + tx.m02; double n10 = tx.m10 * m00 + tx.m11 * m10; double n11 = tx.m10 * m01 + tx.m11 * m11; double n12 = tx.m10 * m02 + tx.m11 * m12 + tx... | public void preConcatenate(AffineTransform tx) { double n00 = tx.m00 * m00 + tx.m01 * m10; double n01 = tx.m00 * m01 + tx.m01 * m11; double n02 = tx.m00 * m02 + tx.m01 * m12 + tx.m02; double n10 = tx.m10 * m00 + tx.m11 * m10; double n11 = tx.m10 * m01 + tx.m11 * m11; double n12 = tx.m10 * m02 + tx.m11 * m12 + tx... | 37,826 |
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); updateType(); } | private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { s.defaultReadObject(); updateType(); } | 37,827 |
public void rotate(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); double n00 = m00 * c + m01 * s; double n01 = m00 * -s + m01 * c; double n10 = m10 * c + m11 * s; double n11 = m10 * -s + m11 * c; m00 = n00; m01 = n01; m10 = n10; m11 = n11; updateType(); } | public void rotate(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); double n00 = m00 * c + m01 * s; double n01 = m00 * -s + m01 * c; double n10 = m10 * c + m11 * s; double n11 = m10 * -s + m11 * c; m00 = n00; m01 = n01; m10 = n10; m11 = n11; updateType(); } | 37,828 |
public void scale(double sx, double sy) { m00 *= sx; m01 *= sy; m10 *= sx; m11 *= sy; updateType(); } | public void scale(double sx, double sy) { m00 *= sx; m01 *= sy; m10 *= sx; m11 *= sy; updateType(); } | 37,829 |
public void setToIdentity() { m00 = m11 = 1; m01 = m02 = m10 = m12 = 0; type = TYPE_IDENTITY; } | public void setToIdentity() { m00 = m11 = 1; m01 = m02 = m10 = m12 = 0; type = TYPE_IDENTITY; } | 37,830 |
public void setToRotation(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); m00 = c; m01 = -s; m02 = 0; m10 = s; m11 = c; m12 = 0; type = (c == 1 ? TYPE_IDENTITY : c == 0 || c == -1 ? TYPE_QUADRANT_ROTATION : TYPE_GENERAL_ROTATION); } | public void setToRotation(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); m00 = c; m01 = -s; m02 = 0; m10 = s; m11 = c; m12 = 0; type = (c == 1 ? TYPE_IDENTITY : c == 0 || c == -1 ? TYPE_QUADRANT_ROTATION : TYPE_GENERAL_ROTATION); } | 37,831 |
public void setToRotation(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); m00 = c; m01 = -s; m02 = 0; m10 = s; m11 = c; m12 = 0; type = (c == 1 ? TYPE_IDENTITY : c == 0 || c == -1 ? TYPE_QUADRANT_ROTATION : TYPE_GENERAL_ROTATION); } | public void setToRotation(double theta) { double c = Math.cos(theta); double s = Math.sin(theta); m00 = c; m01 = -s; m02 = 0; m10 = s; m11 = c; m12 = 0; type = (c == 1 ? TYPE_IDENTITY : c == 0 || c == -1 ? TYPE_QUADRANT_ROTATION : TYPE_GENERAL_ROTATION); } | 37,832 |
public void setToScale(double sx, double sy) { m00 = sx; m01 = m02 = m10 = m12 = 0; m11 = sy; type = (sx != sy ? TYPE_GENERAL_SCALE : sx == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE); } | public void setToScale(double sx, double sy) { m00 = sx; m01 = m02 = m10 = m12 = 0; m11 = sy; type = (sx != sy ? TYPE_GENERAL_SCALE : sx == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE); } | 37,833 |
public void setToScale(double sx, double sy) { m00 = sx; m01 = m02 = m10 = m12 = 0; m11 = sy; type = (sx != sy ? TYPE_GENERAL_SCALE : sx == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE); } | public void setToScale(double sx, double sy) { m00 = sx; m01 = m02 = m10 = m12 = 0; m11 = sy; type = (sx != sy ? TYPE_GENERAL_SCALE : sx == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE); } | 37,834 |
public void setToShear(double shx, double shy) { m00 = m11 = 1; m01 = shx; m10 = shy; m02 = m12 = 0; updateType(); } | public void setToShear(double shx, double shy) { m00 = m11 = 1; m01 = shx; m10 = shy; m02 = m12 = 0; updateType(); } | 37,835 |
public void setToTranslation(double tx, double ty) { m00 = m11 = 1; m01 = m10 = 0; m02 = tx; m12 = ty; type = (tx == 0 && ty == 0) ? TYPE_UNIFORM_SCALE : TYPE_TRANSLATION; } | public void setToTranslation(double tx, double ty) { m00 = m11 = 1; m01 = m10 = 0; m02 = tx; m12 = ty; type = (tx == 0 && ty == 0) ? TYPE_UNIFORM_SCALE : TYPE_TRANSLATION; } | 37,836 |
public void setTransform(AffineTransform tx) { m00 = tx.m00; m01 = tx.m01; m02 = tx.m02; m10 = tx.m10; m11 = tx.m11; m12 = tx.m12; type = tx.type; } | public void setTransform(AffineTransform tx) { m00 = tx.m00; m01 = tx.m01; m02 = tx.m02; m10 = tx.m10; m11 = tx.m11; m12 = tx.m12; type = tx.type; } | 37,837 |
public void shear(double shx, double shy) { double n00 = m00 + shx * m01; double n01 = shx * m00 + m01; double n10 = m10 * shy + m11; double n11 = shx * m10 + m11; m00 = n00; m01 = n01; m10 = n10; m11 = n11; updateType(); } | public void shear(double shx, double shy) { double n00 = m00 + shx * m01; double n01 = shx * m00 + m01; double n10 = m10 * shy + m11; double n11 = shx * m10 + m11; m00 = n00; m01 = n01; m10 = n10; m11 = n11; updateType(); } | 37,838 |
public String toString() { return "AffineTransform[[" + m00 + ", " + m01 + ", " + m02 + "], [" + m10 + ", " + m11 + ", " + m12 + "]]"; } | public String toString() { return "AffineTransform[[" + m00 + ", " + m01 + ", " + m02 + "], [" + m10 + ", " + m11 + ", " + m12 + "]]"; } | 37,839 |
public Point2D transform(Point2D src, Point2D dst) { if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y + m02; double ny = m10 * x + m11 * y + m12; dst.setLocation(nx, ny); return dst; } | public Point2D transform(Point2D src, Point2D dst) { if (dst == null) dst = new Point2D.Double(); double x = src.getX(); double y = src.getY(); double nx = m00 * x + m01 * y + m02; double ny = m10 * x + m11 * y + m12; dst.setLocation(nx, ny); return dst; } | 37,840 |
public void translate(double tx, double ty) { m02 += tx * m00 + ty * m01; m12 += tx * m10 + ty * m11; updateType(); } | public void translate(double tx, double ty) { m02 += tx * m00 + ty * m01; m12 += tx * m10 + ty * m11; updateType(); } | 37,841 |
private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | 37,842 |
private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | 37,843 |
private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | 37,844 |
private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | 37,845 |
private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | private void updateType() { double det = getDeterminant(); if (det == 0) { type = TYPE_GENERAL_TRANSFORM; return; } // Scale (includes rotation by PI) or translation. if (m01 == 0 && m10 == 0) { if (m00 == m11) type = m00 == 1 ? TYPE_IDENTITY : TYPE_UNIFORM_SCALE; else type = TYPE_GENERAL_SCALE; i... | 37,846 |
public List getInetAddresses(VMNetDevice netDevice) { final ArrayList<InetAddress> list = new ArrayList<InetAddress>(); final SecurityManager sm = System.getSecurityManager(); try { final NetDeviceImpl netDeviceImpl = (NetDeviceImpl) netDevice; final NetDeviceAPI api = (Ne... | public List<InetAddress> getInetAddresses(VMNetDevice netDevice) { final ArrayList<InetAddress> list = new ArrayList<InetAddress>(); final SecurityManager sm = System.getSecurityManager(); try { final NetDeviceImpl netDeviceImpl = (NetDeviceImpl) netDevice; final NetDevice... | 37,847 |
public Collection getNetDevices() { final ArrayList<VMNetDevice> list = new ArrayList<VMNetDevice>(); final Collection<Device> devs = DeviceUtils .getDevicesByAPI(NetDeviceAPI.class); for (Device dev : devs) { list.add(new NetDeviceImpl(dev)); } return li... | public Collection<VMNetDevice> getNetDevices() { final ArrayList<VMNetDevice> list = new ArrayList<VMNetDevice>(); final Collection<Device> devs = DeviceUtils .getDevicesByAPI(NetDeviceAPI.class); for (Device dev : devs) { list.add(new NetDeviceImpl(dev)); } ... | 37,848 |
public String getApproveButtonText(JFileChooser fc) { if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) return saveButtonText; else return openButtonText; } | public String getApproveButtonText(JFileChooser fc) { if (fc.getApproveButtonText() != null) return fc.getApproveButtonText(); else if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) return saveButtonText; else return openButtonText; } | 37,849 |
public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); refs[1] = refs[1].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] instanceof Variable) { Variable v = (Variable)... | public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); refs[1] = refs[1].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] instanceof Variable) { Variable v = (Variable)... | 37,850 |
public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); refs[1] = refs[1].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] instanceof Variable) { Variable v = (Variable)... | public void doPass2(BootableHashMap liveVariables) { refs[0] = refs[0].simplify(); refs[1] = refs[1].simplify(); if (refs[0] instanceof Variable) { Variable v = (Variable) refs[0]; v.setLastUseAddress(this.getAddress()); liveVariables.put(v, v); } if (refs[1] instanceof Variable) { Variable v = (Variable)... | 37,851 |
public Operand propagate(Variable operand) { Quad quad = foldConstants(); if (quad instanceof ConstantRefAssignQuad) { setDeadCode(true); ConstantRefAssignQuad cop = (ConstantRefAssignQuad) quad; return cop.getRHS(); } return operand; } | public Operand propagate(Variable operand) { Quad quad = foldConstants(); if (quad instanceof ConstantRefAssignQuad) { setDeadCode(true); ConstantRefAssignQuad cop = (ConstantRefAssignQuad) quad; return cop.getRHS(); } return operand; } | 37,852 |
public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(); scrollTimer.setDelay(200); scrollTimer.setRepeats(true); installComponents(); installListeners(); instal... | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JScrollBar) { scrollbar = (JScrollBar) c; trackRect = new Rectangle(); thumbRect = new Rectangle(); scrollTimer = new Timer(); scrollTimer.setDelay(200); scrollTimer.setRepeats(true); installComponents(); installListeners(); instal... | 37,853 |
public void addChangeListener (ChangeListener listener) { listenerList.add (ChangeListener.class, listener); } | public void addChangeListener(ChangeListener listener) { listenerList.add (ChangeListener.class, listener); } | 37,854 |
public void addChangeListener (ChangeListener listener) { listenerList.add (ChangeListener.class, listener); } | public void addChangeListener (ChangeListener listener) { listenerList.add(ChangeListener.class, listener); } | 37,855 |
public Component componentForPoint (Component source, Point sourcePoint) { throw new UnsupportedOperationException("not implemented"); } | public Component componentForPoint(Component source, Point sourcePoint) { throw new UnsupportedOperationException("not implemented"); } | 37,856 |
protected void fireStateChanged () { ChangeListener[] listeners = getChangeListeners (); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | protected void fireStateChanged() { ChangeListener[] listeners = getChangeListeners (); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | 37,857 |
protected void fireStateChanged () { ChangeListener[] listeners = getChangeListeners (); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | protected void fireStateChanged () { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | 37,858 |
protected void fireStateChanged () { ChangeListener[] listeners = getChangeListeners (); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | protected void fireStateChanged () { ChangeListener[] listeners = getChangeListeners (); for (int i = 0; i < listeners.length; i++) { listeners [i].stateChanged (new ChangeEvent (this)); } } | 37,859 |
public ChangeListener[] getChangeListeners () { return (ChangeListener[]) listenerList.getListeners (ChangeListener.class); } | public ChangeListener[] getChangeListeners() { return (ChangeListener[]) listenerList.getListeners (ChangeListener.class); } | 37,860 |
public ChangeListener[] getChangeListeners () { return (ChangeListener[]) listenerList.getListeners (ChangeListener.class); } | public ChangeListener[] getChangeListeners () { return (ChangeListener[]) listenerList.getListeners(ChangeListener.class); } | 37,861 |
private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... | private MenuElement[] getPath(Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pat... | 37,862 |
private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... | private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); while (c instanceof MenuElement) { path.add(0, (MenuElement) c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem ... | 37,863 |
private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... | private MenuElement[] getPath (Component c) { ArrayList path = new ArrayList(); path.add(0, c); Component parent = c.getParent (); while (parent instanceof JMenu || parent instanceof JPopupMenu || parent instanceof JMenuItem || parent instanceof JMenuBar) { pa... | 37,864 |
public void removeChangeListener (ChangeListener listener) { listenerList.remove (ChangeListener.class, listener); } | public void removeChangeListener(ChangeListener listener) { listenerList.remove (ChangeListener.class, listener); } | 37,866 |
public void removeChangeListener (ChangeListener listener) { listenerList.remove (ChangeListener.class, listener); } | public void removeChangeListener (ChangeListener listener) { listenerList.remove(ChangeListener.class, listener); } | 37,867 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { int offs = Utilities.getRowStart(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); ... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);try{intoffs=Utilities.getRowStart(t,t.getCaretPosition());if(offs>-1){Caretc=t.getCaret();c.setDot(offs);c.setMagicCaretPosition(t.modelToView(offs).getLocation());}}catch(BadLocationExceptionble){//Donothinghere.}} | 37,869 |
public void actionPerformed(ActionEvent event) { getTextComponent(event).copy(); } | public void actionPerformed(ActionEvent event) { JTextComponent target = getTextComponent(event); if (target != null) target.copy(); } | 37,871 |
public void actionPerformed(ActionEvent event) { getTextComponent(event).cut(); } | public void actionPerformed(ActionEvent event) { getTextComponent(event).cut(); } | 37,872 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); try { int offs = Utilities.getRowEnd(t, t.getCaretPosition()); if (offs > -1) { Caret c = t.getCaret(); c.setDot(offs); ... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);try{intoffs=Utilities.getRowEnd(t,t.getCaretPosition());if(offs>-1){Caretc=t.getCaret();c.setDot(offs);c.setMagicCaretPosition(t.modelToView(offs).getLocation());}}catch(BadLocationExceptionble){//Nothingtodohere}} | 37,874 |
public void actionPerformed(ActionEvent event) { getTextComponent(event).paste(); } | public void actionPerformed(ActionEvent event) { JTextComponent target = getTextComponent(event); if (target != null) target.paste(); } | 37,878 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); int offs = t.getDocument().getLength(); Caret c = t.getCaret(); c.setDot(0); c.moveDot(offs); try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch(Ba... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);intoffs=t.getDocument().getLength();Caretc=t.getCaret();c.setDot(0);c.moveDot(offs);try{c.setMagicCaretPosition(t.modelToView(offs).getLocation());}catch(BadLocationExceptionble){//Can'thappen.}} | 37,879 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs1 = Utilities.getRowStart(t, c.getDot()); int offs2 = Utilities.getRowEnd(t, c.getDot()); c.setDot(offs2); c.moveDot(offs1);... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);Caretc=t.getCaret();try{intoffs1=Utilities.getRowStart(t,c.getDot());intoffs2=Utilities.getRowEnd(t,c.getDot());c.setDot(offs2);c.moveDot(offs1);c.setMagicCaretPosition(t.modelToView(offs2).getLocation());}catch(BadLocationExceptionble)... | 37,881 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs1 = Utilities.getRowStart(t, c.getDot()); int offs2 = Utilities.getRowEnd(t, c.getDot()); c.setDot(offs2); c.moveDot(offs1);... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);Caretc=t.getCaret();try{intoffs1=Utilities.getRowStart(t,c.getDot());intoffs2=Utilities.getRowEnd(t,c.getDot());c.setDot(offs2);c.moveDot(offs1);c.setMagicCaretPosition(t.modelToView(offs2).getLocation());}catch(BadLocationExceptionble)... | 37,882 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); int dot = c.getDot(); try { int wordStart = Utilities.getWordStart(t, dot); if (dot == wordStart) { // Current cursor pos... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);Caretc=t.getCaret();intdot=c.getDot();try{intwordStart=Utilities.getWordStart(t,dot);if(dot==wordStart){//Currentcursorpositionisonthefirstcharacterinaword.c.setDot(wordStart);c.moveDot(Utilities.getWordEnd(t,wordStart));}else{//Current... | 37,884 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); int dot = c.getDot(); try { int wordStart = Utilities.getWordStart(t, dot); if (dot == wordStart) { // Current cursor pos... | publicvoidactionPerformed(ActionEventevent){JTextComponentt=getTextComponent(event);Caretc=t.getCaret();intdot=c.getDot();try{intwordStart=Utilities.getWordStart(t,dot);if(dot==wordStart){//Currentcursorpositionisonthefirstcharacterinaword.c.setDot(wordStart);c.moveDot(Utilities.getWordEnd(t,wordStart));}else{//Current... | 37,885 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs = Utilities.getRowStart(t, c.getDot()); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); ... | } } } } public} void} actionPerformed(ActionEvent} event)} } } } {} } } } } } JTextComponent} t} =} getTextComponent(event);} } } } } } } } } } } } } } Caret} c} =} t.getCaret();} } } } } } } } } } } } } } try} } } } } } } } } } } } } } } } {} } } } } } } } } } int} offs} =} Utilities.getRowStart(t,} c.getDot());} } } ... | 37,888 |
public void actionPerformed(ActionEvent event) { JTextComponent t = getTextComponent(event); Caret c = t.getCaret(); try { int offs = Utilities.getRowEnd(t, c.getDot()); c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch... | } } } } public} void} actionPerformed(ActionEvent} event)} } } } {} } } } } } JTextComponent} t} =} getTextComponent(event);} } } } } } } } } } Caret} c} =} t.getCaret();} } } } } } } } } } try} } } } } } } } } } } } {} } } } } } } } } } int} offs} =} Utilities.getRowEnd(t,} c.getDot());} } } } } } } } } } } } } } c.se... | 37,890 |
public DefaultTreeModel(TreeNode root) { if (root == null) root = new DefaultMutableTreeNode(); setRoot(root); } | public DefaultTreeModel(TreeNode root) { if (root == null) root = new DefaultMutableTreeNode(); setRoot(root); } | 37,891 |
public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | public boolean equals(final Object obj) if (obj == null) return false; } if (!(obj instanceof RSAPublicKey)) return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); } | 37,894 |
public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | 37,895 |
public boolean equals(final Object obj) { if (obj == null) { return false; } if (!(obj instanceof RSAPublicKey)) { return false; } final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); ... | public boolean equals(final Object obj) { if (obj == null) { return false; if (!(obj instanceof RSAPublicKey)) { return false; final RSAPublicKey that = (RSAPublicKey) obj; return super.equals(that) && getPublicExponent().equals(that.getPublicExponent()); } | 37,896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.