bugged stringlengths 6 599k | fixed stringlengths 6 40.8M | __index_level_0__ int64 0 3.24M |
|---|---|---|
public void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); p.setOpaque(true); } | public void installDefaults(JPanel p) { LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); } | 35,311 |
public String paramString() { StringBuffer s = new StringBuffer(id == ACTION_PERFORMED ? "ACTION_PERFORMED,cmd=" : "unknown type,cmd="); s.append(actionCommand).append(",when=").append(when).append("modifiers"); int len = s.length(); ... | public String paramString() { StringBuffer s = new StringBuffer(id == ACTION_PERFORMED ? "ACTION_PERFORMED,cmd=" : "unknown type,cmd="); s.append(actionCommand).append(",when=").append(when).append(",modifiers"); int len = s.length();... | 35,313 |
public CertStoreSpi(CertStoreParameters params) throws java.security.InvalidAlgorithmParameterException { super(); } | public CertStoreSpi(CertStoreParameters params) throws InvalidAlgorithmParameterException { super(); } | 35,314 |
public void setLocation(Point p) { this.x = p.x; this.y = p.y; } | public void setLocation(Point p) { this.x = p.x; this.y = p.y; } | 35,315 |
public void setSize(Dimension d) { width = d.width; height = d.height; } | public void setSize(Dimension d) { width = d.width; height = d.height; } | 35,316 |
public TypeCodeHolder(TypeCode initial_value) { value = initial_value; } | public TypeCodeHolder() { value = initial_value; } | 35,317 |
public TypeCodeHolder(TypeCode initial_value) { value = initial_value; } | public TypeCodeHolder(TypeCode initial_value) { } | 35,318 |
public DirectColorModel(int pixelBits, int rmask, int gmask, int bmask) { this(ColorSpace.getInstance(ColorSpace.CS_sRGB), pixelBits, rmask, gmask, bmask, 0, false, // not alpha premultiplied Buffers.smallestAppropriateTransferType(pixelBits) // find type ); } | public DirectColorModel(int pixelBits, int rmask, int gmask, int bmask) { this(ColorSpace.getInstance(ColorSpace.CS_sRGB), pixelBits, rmask, gmask, bmask, 0, false, // not alpha premultiplied Buffers.smallestAppropriateTransferType(pixelBits) // find type ); } | 35,319 |
public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster, isAlp... | public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster, isAlp... | 35,320 |
public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster, isAlp... | public ColorModel coerceData(WritableRaster raster, boolean isAlphaPremultiplied) { if (this.isAlphaPremultiplied == isAlphaPremultiplied) return this; /* TODO: provide better implementation based on the assumptions we can make due to the specific type of the color model. */ super.coerceData(raster, isAlp... | 35,321 |
public final WritableRaster createCompatibleWritableRaster(int w, int h) { SampleModel sm = createCompatibleSampleModel(w, h); Point origin = new Point(0, 0); return Raster.createWritableRaster(sm, origin); } | public final WritableRaster createCompatibleWritableRaster(int w, int h) { SampleModel sm = createCompatibleSampleModel(w, h); Point origin = new Point(0, 0); return Raster.createWritableRaster(sm, origin); } | 35,322 |
private final int extractAndNormalizeSample(int pixel, int component) { int value = extractAndScaleSample(pixel, component); if (hasAlpha() && isAlphaPremultiplied()) value = value * 255 / getAlpha(pixel); return value; } | private final int extractAndNormalizeSample(int pixel, int component) { int value = extractAndScaleSample(pixel, component); if (hasAlpha() && isAlphaPremultiplied()) value = value * 255 / getAlpha(pixel); return value; } | 35,323 |
private final int extractAndNormalizeSample(int pixel, int component) { int value = extractAndScaleSample(pixel, component); if (hasAlpha() && isAlphaPremultiplied()) value = value * 255 / getAlpha(pixel); return value; } | private final int extractAndNormalizeSample(int pixel, int component) { int value = extractAndScaleSample(pixel, component); if (hasAlpha() && isAlphaPremultiplied()) value = value * 255 / getAlpha(pixel); return value; } | 35,324 |
private final int extractAndScaleSample(int pixel, int component) { int field = pixel & getMask(component); int to8BitShift = 8 - shifts[component] - getComponentSize(component); return (to8BitShift > 0) ? (field << to8BitShift) : (field >>> (-to8BitShift)); } | private final int extractAndScaleSample(int pixel, int component) { int field = pixel & getMask(component); int to8BitShift = 8 - shifts[component] - getComponentSize(component); return (to8BitShift > 0) ? (field << to8BitShift) : (field >>> (-to8BitShift)); } | 35,325 |
private final int extractAndScaleSample(int pixel, int component) { int field = pixel & getMask(component); int to8BitShift = 8 - shifts[component] - getComponentSize(component); return (to8BitShift > 0) ? (field << to8BitShift) : (field >>> (-to8BitShift)); } | private final int extractAndScaleSample(int pixel, int component) { int field = pixel & getMask(component); int to8BitShift = 8 - shifts[component] - getComponentSize(component); return (to8BitShift > 0) ? (field << to8BitShift) : (field >>> (-to8BitShift)); } | 35,326 |
public final int getAlpha(int pixel) { if (!hasAlpha()) return 0; return extractAndScaleSample(pixel, 3); } | public final int getAlpha(int pixel) { if (!hasAlpha()) return 0; return extractAndScaleSample(pixel, 3); } | 35,327 |
public final int getAlphaMask() { return hasAlpha() ? getMask(3) : 0; } | public final int getAlphaMask() { return hasAlpha() ? getMask(3) : 0; } | 35,328 |
public final int getBlue(int pixel) { return extractAndNormalizeSample(pixel, 2); } | public final int getBlue(int pixel) { return extractAndNormalizeSample(pixel, 2); } | 35,329 |
public final int getBlueMask() { return getMask(2); } | public final int getBlueMask() { return getMask(2); } | 35,330 |
public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | 35,331 |
public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | 35,332 |
public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | public final int[] getComponents(int pixel, int[] components, int offset) { int numComponents = getNumComponents(); if (components == null) components = new int[offset + numComponents]; for (int b = 0; b < numComponents; b++) components[offset++] = (pixel & getMask(b)) >>> shifts[b]; return components; } | 35,333 |
public int getDataElement(int[] components, int offset) { int numComponents = getNumComponents(); int pixelValue = 0; for (int c = 0; c < numComponents; c++) pixelValue |= (components[offset++] << shifts[c]) & getMask(c); return pixelValue; } | public int getDataElement(int[] components, int offset) { int numComponents = getNumComponents(); int pixelValue = 0; for (int c = 0; c < numComponents; c++) pixelValue |= (components[offset++] << shifts[c]) & getMask(c); return pixelValue; } | 35,334 |
public int getDataElement(int[] components, int offset) { int numComponents = getNumComponents(); int pixelValue = 0; for (int c = 0; c < numComponents; c++) pixelValue |= (components[offset++] << shifts[c]) & getMask(c); return pixelValue; } | public int getDataElement(int[] components, int offset) { int numComponents = getNumComponents(); int pixelValue = 0; for (int c = 0; c < numComponents; c++) pixelValue |= (components[offset++] << shifts[c]) & getMask(c); return pixelValue; } | 35,335 |
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | 35,336 |
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | 35,337 |
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | 35,338 |
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | 35,339 |
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; /* if r=0xff and a=0xff, then resulting valu... | 35,340 |
public final int getGreen(int pixel) { return extractAndNormalizeSample(pixel, 1); } | public final int getGreen(int pixel) { return extractAndNormalizeSample(pixel, 1); } | 35,341 |
public final int getGreenMask() { return getMask(1); } | public final int getGreenMask() { return getMask(1); } | 35,342 |
public final int getRGB(int pixel) { /* FIXME: The Sun docs show that this method is overridden, but I don't see any way to improve on the superclass implementation. */ return super.getRGB(pixel); } | public final int getRGB(int pixel) { /* FIXME: The Sun docs show that this method is overridden, but I don't see any way to improve on the superclass implementation. */ return super.getRGB(pixel); } | 35,343 |
public final int getRed(int pixel) { return extractAndNormalizeSample(pixel, 0); } | public final int getRed(int pixel) { return extractAndNormalizeSample(pixel, 0); } | 35,344 |
public final int getRedMask() { return getMask(0); } | public final int getRedMask() { return getMask(0); } | 35,345 |
public boolean isCompatibleRaster(Raster raster) { /* FIXME: the Sun docs say this method is overridden here, but I don't see any way to improve upon the implementation in ColorModel. */ return super.isCompatibleRaster(raster); } | public boolean isCompatibleRaster(Raster raster) { /* FIXME: the Sun docs say this method is overridden here, but I don't see any way to improve upon the implementation in ColorModel. */ return super.isCompatibleRaster(raster); } | 35,346 |
String stringParam() { return super.stringParam() + ", redMask=" + Integer.toHexString(getRedMask()) + ", greenMask=" + Integer.toHexString(getGreenMask()) + ", blueMask=" + Integer.toHexString(getBlueMask()) + ", alphaMask=" + Integer.toHexString(getAlphaMask()); } | String stringParam() { return super.stringParam() + ", redMask=" + Integer.toHexString(getRedMask()) + ", greenMask=" + Integer.toHexString(getGreenMask()) + ", blueMask=" + Integer.toHexString(getBlueMask()) + ", alphaMask=" + Integer.toHexString(getAlphaMask()); } | 35,347 |
public String toString() { /* FIXME: Again, docs say override, but how do we improve upon the superclass implementation? */ return super.toString(); } | public String toString() { /* FIXME: Again, docs say override, but how do we improve upon the superclass implementation? */ return super.toString(); } | 35,348 |
private final int valueToField(int val, int component, int highBit) { int toFieldShift = getComponentSize(component) + shifts[component] - highBit; int ret = (toFieldShift > 0) ? (val << toFieldShift) : (val >>> (-toFieldShift)); return ret & getMask(component); } | private final int valueToField(int val, int component, int highBit) { int toFieldShift = getComponentSize(component) + shifts[component] - highBit; int ret = (toFieldShift > 0) ? (val << toFieldShift) : (val >>> (-toFieldShift)); return ret & getMask(component); } | 35,349 |
public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterEnd not implemente... | public void insertAfterEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("inse... | 35,381 |
public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertAfterStart not implem... | public void insertAfterStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("in... | 35,382 |
public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeEnd not implemen... | public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("ins... | 35,383 |
public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("insertBeforeStart not impl... | public void insertBeforeStart(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("i... | 35,384 |
public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use In... | public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (elem.isLeaf()) throw new IllegalArgumentException("Element is a leaf"); if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not ... | 35,385 |
public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println("setOuterHTML not implem... | public void setOuterHTML(Element elem, String htmlText) throws BadLocationException, IOException, NotImplementedException { if (parser == null) throw new IllegalStateException("Parser has not been set"); // FIXME: Not implemented fully, use InsertHTML* in HTMLEditorKit? System.out.println... | 35,386 |
protected byte[] getResult() { return new byte[] { (byte) (h0 >>> 24), (byte) (h0 >>> 16), (byte) (h0 >>> 8), (byte) h0, (byte) (h1 >>> 24), (byte) (h1 >>> 16), (byte) (h1 >>> 8), (byte) h1, (byte) (h2 >>> 24), (byte) (h2 >>> 16), ... | protected byte[] getResult() { return new byte[] { (byte) (h0 >>> 24), (byte) (h0 >>> 16), (byte) (h0 >>> 8), (byte) h0, (byte) (h1 >>> 24), (byte) (h1 >>> 16), (byte) (h1 >>> 8), (byte) h1, (byte) (h2 >>> 24), (byte) (h2 >>> 16), ... | 35,388 |
protected byte[] padBuffer() { int n = (int) (count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lo... | protected byte[] padBuffer() { int n = (int)(count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lon... | 35,389 |
protected byte[] padBuffer() { int n = (int) (count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lo... | protectedbyte[]padBuffer(){intn=(int)(count%BLOCK_SIZE);intpadding=(n<56)?(56-n):(120-n);byte[]result=newbyte[padding+8];//paddingisalwaysbinary1followedbybinary0sresult[0]=(byte)0x80;//savenumberofbits,castingthelongtoanarrayof8byteslongbits=count<<3;result[padding++]=(byte)(bits>>>56);result[padding++]=(byte)(bits>>>... | 35,390 |
protected byte[] padBuffer() { int n = (int) (count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lo... | protectedbyte[]padBuffer(){intn=(int)(count%BLOCK_SIZE);intpadding=(n<56)?(56-n):(120-n);byte[]result=newbyte[padding+8];//paddingisalwaysbinary1followedbybinary0sresult[0]=(byte)0x80;//savenumberofbits,castingthelongtoanarrayof8byteslongbits=count<<3;result[padding++]=(byte)(bits>>>56);result[padding++]=(byte)(bits>>>... | 35,391 |
protected byte[] padBuffer() { int n = (int) (count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lo... | protected byte[] padBuffer() { int n = (int) (count % BLOCK_SIZE); int padding = (n < 56) ? (56 - n) : (120 - n); byte[] result = new byte[padding + 8]; // padding is always binary 1 followed by binary 0s result[0] = (byte) 0x80; // save number of bits, casting the long to an array of 8 bytes lo... | 35,392 |
public boolean selfTest() { if (valid == null) { Sha256 md = new Sha256(); md.update((byte) 0x61); // a md.update((byte) 0x62); // b md.update((byte) 0x63); // c String result = Util.toString(md.digest()); valid = Boolean.valueOf(DIGEST0.equals(result)); } re... | publicbooleanselfTest(){if(valid==null){Sha256md=newSha256();md.update((byte)0x61);//amd.update((byte)0x62);//bmd.update((byte)0x63);//cStringresult=Util.toString(md.digest());valid=Boolean.valueOf(DIGEST0.equals(result));}returnvalid.booleanValue();} | 35,393 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static synchronized final int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,394 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | privatestaticfinalsynchronizedint[]sha(inthh0,inthh1,inthh2,inthh3,inthh4,inthh5,inthh6,inthh7,byte[]in,intoffset){intA=hh0;intB=hh1;intC=hh2;intD=hh3;intE=hh4;intF=hh5;intG=hh6;intH=hh7;intr,T,T2;for(r=0;r<16;r++){w[r]=(in[offset++]<<24|(in[offset++]&0xFF)<<16|(in[offset++]&0xFF)<<8|(in[offset++]&0xFF));}for(r=16;r<64... | 35,395 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,396 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,397 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | privatestaticfinalsynchronizedint[]sha(inthh0,inthh1,inthh2,inthh3,inthh4,inthh5,inthh6,inthh7,byte[]in,intoffset){intA=hh0;intB=hh1;intC=hh2;intD=hh3;intE=hh4;intF=hh5;intG=hh6;intH=hh7;intr,T,T2;for(r=0;r<16;r++){w[r]=(in[offset++]<<24|(in[offset++]&0xFF)<<16|(in[offset++]&0xFF)<<8|(in[offset++]&0xFF));}for(r=16;r<64... | 35,398 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,399 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,400 |
private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | private static final synchronized int[] sha(int hh0, int hh1, int hh2, int hh3, int hh4, int hh5, int hh6, int hh7, byte[] in, int offset) { int A = hh0; int B = hh1; int C ... | 35,401 |
protected void transform(byte[] in, int offset) { int[] result = sha(h0, h1, h2, h3, h4, h5, h6, h7, in, offset); h0 = result[0]; h1 = result[1]; h2 = result[2]; h3 = result[3]; h4 = result[4]; h5 = result[5]; h6 = result[6]; h7 = result[7]; } | protectedvoidtransform(byte[]in,intoffset){int[]result=sha(h0,h1,h2,h3,h4,h5,h6,h7,in,offset);h0=result[0];h1=result[1];h2=result[2];h3=result[3];h4=result[4];h5=result[5];h6=result[6];h7=result[7];} | 35,402 |
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("document")) { Document oldDoc = (Document) e.getOldValue(); oldDoc.removeDocumentListener(documentListener); Document newDoc = (Document) e.getNewValue(); newDoc.addDocumentListener... | public void propertyChange(PropertyChangeEvent e) { String name = e.getPropertyName(); if (name.equals("document")) { Document oldDoc = (Document) e.getOldValue(); oldDoc.removeDocumentListener(documentListener); Document newDoc = (Document) e.getNewValue(); newDo... | 35,403 |
public void focusLost(FocusEvent event) { if (event.isTemporary() == false) { setVisible(false); // Stop the blinker, if running. if (blinkTimer != null && blinkTimer.isRunning()) blinkTimer.stop(); } } | public void focusLost(FocusEvent event) { if (textComponent.isEditable() && event.isTemporary() == false) { setVisible(false); // Stop the blinker, if running. if (blinkTimer != null && blinkTimer.isRunning()) blinkTimer.stop(); } } | 35,406 |
public boolean isVisible() { return visible; } | public boolean isVisible() { return visible && active; } | 35,409 |
public void mousePressed(MouseEvent event) { int button = event.getButton(); // The implementation assumes that consuming the event makes the AWT event // mechanism forget about this event instance and not transfer focus. // By observing how the RI reacts the following behavior has been // impleme... | public void mousePressed(MouseEvent event) { int button = event.getButton(); // The implementation assumes that consuming the event makes the AWT event // mechanism forget about this event instance and not transfer focus. // By observing how the RI reacts the following behavior has been // impleme... | 35,412 |
public void paint(Graphics g) { JTextComponent comp = getComponent(); if (comp == null) return; // Make sure the dot has a sane position. dot = Math.min(dot, textComponent.getDocument().getLength()); dot = Math.max(dot, 0); Rectangle rect = null; try { rect = textComponent.modelToView(... | public void paint(Graphics g) { JTextComponent comp = getComponent(); if (comp == null) return; // Make sure the dot has a sane position. dot = Math.min(dot, textComponent.getDocument().getLength()); dot = Math.max(dot, 0); Rectangle rect = null; try { rect = textComponent.modelToView(... | 35,415 |
public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); double ln = _number(context, left); double rn = _number(context, right); switch (op) { case ADD: return new Double(ln + rn); cas... | public Object evaluate(Node context, int pos, int len) { Object left = lhs.evaluate(context, pos, len); Object right = rhs.evaluate(context, pos, len); double ln = _number(context, left); double rn = _number(context, right); switch (op) { case ADD: return new Double(ln + rn); cas... | 35,417 |
public URL getCodeBase() { try { return tag.prependCodeBase(""); } catch (MalformedURLException e) { throw new RuntimeException("unknown codebase"); } } | public URL getCodeBase() { try { return tag.prependCodeBase(""); } catch (MalformedURLException e) { throw new RuntimeException("Attempted to create" + " invalid codebase URL.", e); } } | 35,419 |
public synchronized void replaceSelection(String content) { int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = getSelectionStart(); int end = getSelectionEnd(); // Remove s... | public synchronized void replaceSelection(String content) { int dot = caret.getDot(); int mark = caret.getMark(); // If content is empty delete selection. if (content == null) { caret.setDot(dot); return; } try { int start = getSelectionStart(); int end = getSelectionEnd(); // Remove s... | 35,420 |
private static final void appendTag(StringBuffer buf, int indent, String tag, String content) { int i; if (content == null) return; for (i = 0; i < indent * 2; i++) buf.append(' '); buf.append("<"); buf.append(tag); buf.append('>'); /* Append the content, but escape for XML by r... | private static final void appendTag(StringBuffer buf, int indent, String tag, String content) { int i; if (content == null) return; for (i = 0; i < indent * 2; i++) buf.append(' '); buf.append("<"); buf.append(tag); buf.append('>'); /* Append the content, but escape for XML by r... | 35,421 |
public boolean intersects(Rectangle r) { return width > 0 && height > 0 && r.width > 0 && r.height > 0 && r.x < x + width && r.x + r.width > x && r.y < y + height && r.y + r.height > y; } | public boolean intersects(Rectangle r) { return r.width > 0 && r.height > 0 && width > 0 && height > 0 && r.x < x + width && r.x + r.width > x && r.y < y + height && r.y + r.height > y; } | 35,423 |
public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); // When the layoutOrientatio... | public Rectangle getCellBounds(JList l, int index1, int index2) { maybeUpdateLayoutState(); if (l != list || cellWidth == -1) return null; int minIndex = Math.min(index1, index2); int maxIndex = Math.max(index1, index2); Point loc = indexToLocation(list, minIndex); // When the layoutOrientatio... | 35,425 |
public void paint(Graphics g, JComponent c) { int nrows = list.getModel().getSize(); if (nrows == 0) return; maybeUpdateLayoutState(); ListCellRenderer render = list.getCellRenderer(); ListModel model = list.getModel(); ListSelectionModel sel = list.getSelectionModel(); int lead = sel.getLe... | public void paint(Graphics g, JComponent c) { int nrows = list.getModel().getSize(); if (nrows == 0) return; maybeUpdateLayoutState(); ListCellRenderer render = list.getCellRenderer(); ListModel model = list.getModel(); ListSelectionModel sel = list.getSelectionModel(); int lead = sel.getLe... | 35,426 |
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | public static TypeCode type() { RecordTypeCode r = new RecordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | 35,427 |
public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new primitiveTypeCode(TCKind.tk_short)); return r; } | public static TypeCode type() { recordTypeCode r = new recordTypeCode(TCKind.tk_alias); r.setName("SyncScope"); r.setId(id()); r.setContentType(new PrimitiveTypeCode(TCKind.tk_short)); return r; } | 35,428 |
public KeyPair generate() { BigInteger p, q, n, d; // 1. Generate a prime p in the interval [2**(M-1), 2**M - 1], where // M = CEILING(L/2), and such that GCD(p, e) = 1 int M = (L + 1) / 2; BigInteger lower = TWO.pow(M - 1); BigInteger upper = TWO.pow(M).subtract(ONE); byte[] kb = new byte[(M + ... | public KeyPair generate() { BigInteger p, q, n, d; // 1. Generate a prime p in the interval [2**(M-1), 2**M - 1], where // M = CEILING(L/2), and such that GCD(p, e) = 1 int M = (L + 1) / 2; BigInteger lower = TWO.pow(M - 1); BigInteger upper = TWO.pow(M).subtract(ONE); byte[] kb = new byte[(M + ... | 35,429 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | 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); SwingUtilities.calculateInnerArea(b, br); SwingUtilities.calculateI... | 35,431 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | 35,432 |
public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Rectangle br = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, b... | 35,433 |
protected JPanel createList(JFileChooser fc) { if (fileList == null) { fileListPanel = new JPanel(new BorderLayout()); fileList = new JList(getModel()); scrollPane = new JScrollPane(fileList); fileList.setLayoutOrientation(JList.VERTICAL_WRAP); fileList.setCellRenderer(new FileRend... | fileListPanel.setPreferredSize(new Dimension(405, 135)); fileListPanel.setPreferredSize(new Dimension(405, 135)); protected fileListPanel.setPreferredSize(new Dimension(405, 135)); JPanel fileListPanel.setPreferredSize(new Dimension(405, 135)); createList(JFileChooser fileListPanel.setPreferredSize(new Dime... | 35,434 |
public void addRow(Object[] rowData) { addRow(convertToVector(rowData)); } | public void addRow(Object[] rowData) { addRow(convertToVector(rowData)); } | 35,435 |
public final Class getCategory() { return DateTimeAtCreation.class; } | public Class getCategory() { return DateTimeAtCreation.class; } | 35,436 |
public final String getName() { return "date-time-at-creation"; } | public String getName() { return "date-time-at-creation"; } | 35,437 |
public static ComponentUI createUI(JComponent x) { return new BasicPanelUI(); } | public static ComponentUI createUI(JComponent panel) { return new BasicPanelUI(); } | 35,438 |
public static ComponentUI createUI(JComponent x) { return new BasicPanelUI(); } | public static ComponentUI createUI(JComponent x) { if (sharedUI == null) sharedUI = new BasicPanelUI(); return sharedUI; } | 35,439 |
protected void uninstallDefaults(JPanel p) { // Nothing to do here. } | LookAndFeel.uninstallBorder(p); LookAndFeel.uninstallBorder(p); protected LookAndFeel.uninstallBorder(p); void LookAndFeel.uninstallBorder(p); uninstallDefaults(JPanel LookAndFeel.uninstallBorder(p); p) LookAndFeel.uninstallBorder(p); LookAndFeel.uninstallBorder(p); { ... | 35,441 |
public void addConsumer(ImageConsumer ic) { consumers.addElement(ic); } | public void addConsumer(ImageConsumer ic) { consumers.addElement(ic); } | 35,442 |
public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); } | public boolean isConsumer(ImageConsumer ic) { return consumers.contains(ic); } | 35,443 |
public void removeConsumer(ImageConsumer ic) { consumers.removeElement(ic); } | public void removeConsumer(ImageConsumer ic) { consumers.removeElement(ic); } | 35,444 |
public void requestTopDownLeftRightResend(ImageConsumer ic) { } | public void requestTopDownLeftRightResend(ImageConsumer ic) { } | 35,445 |
public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | 35,446 |
public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | public void startProduction(ImageConsumer ic) { addConsumer(ic); Vector list = (Vector) consumers.clone(); try { FileInputStream is = (url == null) ? new FileInputStream(filename) : (FileInputStream) url.openStream(); produce(list, is); } catch (Exception e) { for (int i = 0; i < list.size(); i++) { Image... | 35,447 |
public static ComponentUI createUI(final JComponent component) { return new BasicToggleButtonUI(); } | public static ComponentUI createUI(JComponent component) { return new BasicToggleButtonUI(); } | 35,448 |
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); if (b.isBorderPainted()) SwingUtilities.calculateInnerArea(b, vr); ... | 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); if (b.isBorderPainted()) SwingUtilities.calculateInnerArea(b, vr); ... | 35,449 |
public final void cancel() { if (isValid()) { ((AbstractSelector) selector()).cancelKey(this); cancelled = true; } } | public final synchronized void cancel() { if (isValid()) { ((AbstractSelector) selector()).cancelKey(this); cancelled = true; } } | 35,450 |
public final boolean isValid() { return ! cancelled; } | public final synchronized boolean isValid() { return ! cancelled; } | 35,451 |
public WStringHolder(String initial_value) { value = initial_value; } | public WStringHolder() { value = initial_value; } | 35,452 |
public WStringHolder(String initial_value) { value = initial_value; } | public WStringHolder(String initial_value) { } | 35,453 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | 35,454 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmExce... | 35,455 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | 35,456 |
public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); } catch (NoSuchAlgorithm... | public static final TrustManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException { Provider[] provs = Security.getProviders(); for (int i = 0; i < provs.length; i++) { try { return getInstance(algorithm, provs[i]); if (lastException != null) thro... | 35,457 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.