bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public void startDevice() throws DriverException { try { final Device dev = getDevice(); final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); speakIO = rm.claimIOResource(dev, SPEAKER_PORT, 1); pitIO = rm.claimIOResource(dev, CHANNEL2_PORT, 2); getDevice().registerAPI(Sp...
public void startDevice() throws DriverException { try { final Device dev = getDevice(); final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); speakIO = rm.claimIOResource(dev, SPEAKER_PORT, 1); pitIO = rm.claimIOResource(dev, CHANNEL2_PORT, 2); getDevice().registerAPI(Sp...
31,455
public static TaggedProfile read(InputStream input) { TaggedProfile value = new TaggedProfile(); value.tag = input.read_long(); value.profile_data = new byte[ input.read_long() ]; for (int i0 = 0; i0 < value.profile_data.length; i0++) value.profile_data [ i0 ] = input.read_octet(); return value; ...
public static TaggedProfile read(InputStream input) { TaggedProfile value = new TaggedProfile(); value.tag = input.read_long(); if (input instanceof cdrBufInput) { value.profile_data = ((cdrBufInput) input).read_sequence(); } else { value.profile_data = new byte[input.read_long()]; for (int i0 = 0; i0 ...
31,456
public static TaggedProfile read(InputStream input) { TaggedProfile value = new TaggedProfile(); value.tag = input.read_long(); value.profile_data = new byte[ input.read_long() ]; for (int i0 = 0; i0 < value.profile_data.length; i0++) value.profile_data [ i0 ] = input.read_octet(); return value; ...
public static TaggedProfile read(InputStream input) { TaggedProfile value = new TaggedProfile(); value.tag = input.read_long(); value.profile_data = new byte[ input.read_long() ]; for (int i0 = 0; i0 < value.profile_data.length; i0++) value.profile_data[i0] = input.read_octet(); } return value; ...
31,457
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[ 2 ]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind...
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[2]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind.t...
31,458
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[ 2 ]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind...
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[ 2 ]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind...
31,459
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[ 2 ]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind...
public static TypeCode type() { if (typeCode == null) { ORB orb = ORB.init(); StructMember[] members = new StructMember[ 2 ]; TypeCode field; field = orb.create_alias_tc("IDL:omg.org/IOP/ProfileId:1.0", "ProfileId", orb.get_primitive_tc(TCKind...
31,460
public static void write(OutputStream output, TaggedProfile value) { output.write_long(value.tag); output.write_long(value.profile_data.length); for (int i0 = 0; i0 < value.profile_data.length; i0++) output.write_octet(value.profile_data [ i0 ]); }
public static void write(OutputStream output, TaggedProfile value) { output.write_long(value.tag); output.write_long(value.profile_data.length); for (int i0 = 0; i0 < value.profile_data.length; i0++) output.write_octet(value.profile_data[i0]); } }
31,461
public Object getPreviousValue() { Calendar prevCal = Calendar.getInstance(); prevCal.setTime(date.getTime()); prevCal.roll(calendarField, false); Date prevDate = prevCal.getTime(); if (end != null) if (end.compareTo(prevDate) > 0) return null; return prevDate; }
public Object getPreviousValue() { Calendar prevCal = Calendar.getInstance(); prevCal.setTime(date.getTime()); prevCal.roll(calendarField, false); Date prevDate = prevCal.getTime(); if (end != null) if (end.compareTo(prevDate) > 0) return null; return prevDate; }
31,462
private void listPlugin(PrintStream out, PluginManager mgr, String id) throws PluginException { final PluginDescriptor descr = mgr.getRegistry() .getPluginDescriptor(id); out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { ...
private void listPlugin(PrintStream out, PluginManager mgr, String id) throws PluginException { final PluginDescriptor descr = mgr.getRegistry() .getPluginDescriptor(id); out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { ...
31,464
private void listPlugin(PrintStream out, PluginManager mgr, String id) throws PluginException { final PluginDescriptor descr = mgr.getRegistry() .getPluginDescriptor(id); out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { ...
private void listPlugin(PrintStream out, PluginManager mgr, String id) throws PluginException { final PluginDescriptor descr = mgr.getRegistry() .getPluginDescriptor(id); out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { ...
31,465
public final Class getCategory() { return NumberOfInterveningJobs.class; }
public Class getCategory() { return NumberOfInterveningJobs.class; }
31,466
public final String getName() { return "number-of-intervening-jobs"; }
public String getName() { return "number-of-intervening-jobs"; }
31,467
protected final StringBuffer formatInternal (Object arguments[], StringBuffer appendBuf, FieldPosition fp, FormatCharacterIterator output_iterator) { appendBuf.append(leader); if (output_iterator != null) output_iterator.append(leader); for (int i = 0; i < elements.length; ++i) ...
protected final StringBuffer formatInternal (Object arguments[], StringBuffer appendBuf, FieldPosition fp, FormatCharacterIterator output_iterator) { appendBuf.append(leader); if (output_iterator != null) output_iterator.append(leader); for (int i = 0; i < elements.length; ++i) ...
31,468
public Object nextElement() { ZipEntry zip = (ZipEntry) entries.nextElement(); JarEntry jar = new JarEntry(zip); Manifest manifest; try { manifest = getManifest(); } catch (IOException ioe) { manifest = null; } if (manifest != null) { jar.attr = manifest.getAttributes(jar.getNa...
if (!signaturesRead) try { readSignatures(); } catch (IOException ioe) { if (DEBUG) { debug(ioe); ioe.printStackTrace(); } signaturesRead = true; } if (entryCerts != null && verified.containsKey(zip.getName()) && ((Boolean) verified.get(zip.getName())).booleanValue()) { Set certs = (Set) entryCerts.get(jar.getName...
31,469
public ZipEntry getEntry(String name) { ZipEntry entry = super.getEntry(name); if (entry != null) { JarEntry jarEntry = new JarEntry(entry); Manifest manifest; try { manifest = getManifest(); } catch (IOException ioe) { manifest = null; } if (manifest != null) { jarEntry.attr = manife...
} if (!signaturesRead) try { readSignatures(); } catch (IOException ioe) { if (DEBUG) { debug(ioe); ioe.printStackTrace(); } signaturesRead = true; } if (DEBUG) debug("entryCerts=" + entryCerts + " verified " + name + " ? " + verified.get(name)); if (entryCerts != null && verified.containsKey(name) && ((Boolean) ver...
31,470
public synchronized InputStream getInputStream(ZipEntry entry) throws ZipException, IOException { return super.getInputStream(entry); // XXX verify }
public synchronized InputStream getInputStream(ZipEntry entry) throws ZipException, IOException { if (!verified.containsKey(entry.getName()) && verify) { if (DEBUG) debug("reading and verifying " + entry); return new EntryInputStream(entry, super.getInputStream(entry)); } else { if (DEBUG) debug("reading alread...
31,471
public Manifest(InputStream in) throws IOException { this(); read(in); }
public Manifest() { this(); read(in); }
31,472
public Manifest(InputStream in) throws IOException { this(); read(in); }
public Manifest(InputStream in) throws IOException { this(); read(in); }
31,473
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p = null; BigInteger g = null; BigInteger q = null; BigInteger y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read();...
31,474
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
31,475
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
31,476
public PublicKey decodePublicKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger p, g, q, y; DERReader der = new DERReader(input); try { DERValue derSPKI = der.read(); DerUtil.checkIsConstructed(derSPKI, "Wrong Sub...
publicPublicKeydecodePublicKey(byte[]input){if(input==null)thrownewInvalidParameterException("InputbytesMUSTNOTbenull");BigIntegerp,g,q,y;DERReaderder=newDERReader(input);try{DERValuederSPKI=der.read();DerUtil.checkIsConstructed(derSPKI,"WrongSubjectPublicKeyInfofield");DERValuederAlgorithmID=der.read();DerUtil.checkIs...
31,477
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
31,478
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
31,479
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
31,480
public byte[] encodePublicKey(PublicKey key) { if (! (key instanceof DSSPublicKey)) throw new InvalidParameterException("key"); DERValue derOID = new DERValue(DER.OBJECT_IDENTIFIER, DSA_ALG_OID); DSSPublicKey dssKey = (DSSPublicKey) key; BigInteger p = dssKey.getParams().getP(); BigInteger q = ds...
publicbyte[]encodePublicKey(PublicKeykey){if(!(keyinstanceofDSSPublicKey))thrownewInvalidParameterException("key");DERValuederOID=newDERValue(DER.OBJECT_IDENTIFIER,DSA_ALG_OID);DSSPublicKeydssKey=(DSSPublicKey)key;BigIntegerp=dssKey.getParams().getP();BigIntegerq=dssKey.getParams().getQ();BigIntegerg=dssKey.getParams()...
31,481
protected String getPropertyPrefix() { return null; }
protected String getPropertyPrefix() { return "RadioButtonMenuItem"; }
31,482
public final Class getCategory() { return JobPrioritySupported.class; }
public Class getCategory() { return JobPrioritySupported.class; }
31,483
public final String getName() { return "job-priority-supported"; }
public String getName() { return "job-priority-supported"; }
31,484
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(Locale locale) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointerExcept...
31,485
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,486
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ Currency newCurrency; String country = locale.getCountry(); ...
31,487
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,488
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,489
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,490
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,491
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
public static Currency getInstance(String currencyCode) { Locale[] allLocales; /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an IllegalArgumentException. */ if (currencyCode == null) { throw new NullPointer...
31,492
private void checkThread() { if (!SwingUtilities.isEventDispatchThread()) { log.debug("Wrong Thread", new Exception("Stacktracr")); } }
private void checkThread() { if (!SwingUtilities.isEventDispatchThread()) { log.debug("Wrong Thread", new Exception("Stacktrace")); } }
31,494
public void add(Point p) { add((double) p.x, (double) p.y); }
public void add(Point p) { add((double) p.x, (double) p.y); }
31,495
public static synchronized final Set getNames() { if (names == null) { HashSet hs = new HashSet(); hs.add(Registry.DSS_KPG + "/" + Registry.RAW_ENCODING_SHORT_NAME); hs.add(Registry.DSS_KPG + "/" + Registry.X509_ENCODING_SORT_NAME); hs.add(Registry.DSS_KPG + "/" + Registry.PKCS8_E...
publicstaticsynchronizedfinalSetgetNames(){if(names==null){HashSeths=newHashSet();hs.add(Registry.DSS_KPG+"/"+Registry.RAW_ENCODING_SHORT_NAME);hs.add(Registry.DSS_KPG+"/"+Registry.X509_ENCODING_SORT_NAME);hs.add(Registry.DSS_KPG+"/"+Registry.PKCS8_ENCODING_SHORT_NAME);hs.add(Registry.RSA_KPG+"/"+Registry.RAW_ENCODING_...
31,497
public static synchronized final Set getNames() { if (names == null) { HashSet hs = new HashSet(); hs.add(Registry.DSS_KPG + "/" + Registry.RAW_ENCODING_SHORT_NAME); hs.add(Registry.DSS_KPG + "/" + Registry.X509_ENCODING_SORT_NAME); hs.add(Registry.DSS_KPG + "/" + Registry.PKCS8_E...
publicstaticsynchronizedfinalSetgetNames(){if(names==null){HashSeths=newHashSet();hs.add(Registry.DSS_KPG+"/"+Registry.RAW_ENCODING_SHORT_NAME);hs.add(Registry.DSS_KPG+"/"+Registry.X509_ENCODING_SORT_NAME);hs.add(Registry.DSS_KPG+"/"+Registry.PKCS8_ENCODING_SHORT_NAME);hs.add(Registry.RSA_KPG+"/"+Registry.RAW_ENCODING_...
31,498
public void reset() { // reset this instance for future re-use count = 0L; for (int i = 0; i < blockSize;) { buffer[i++] = 0; } resetContext(); }
public void reset() // reset this instance for future re-use count = 0L; for (int i = 0; i < blockSize;) buffer[i++] = 0; } resetContext(); }
31,499
public void reset() { // reset this instance for future re-use count = 0L; for (int i = 0; i < blockSize;) { buffer[i++] = 0; } resetContext(); }
public void reset() { // reset this instance for future re-use count = 0L; for (int i = 0; i < blockSize;) { buffer[i++] = 0; resetContext(); }
31,500
public X86Core(final Map labels) { super(labels); }
public X86Core(final Map labels) { super(labels); }
31,501
public Object getDataElements(int x, int y, Object obj, DataBuffer data) { int xyOffset = pixelStride*x + scanlineStride*y; int[] totalBandDataOffsets = new int[numBands]; /* Notice that band and bank offsets are different. Band offsets are managed by the sample model, and bank offsets are managed by th...
case DataBuffer.TYPE_FLOAT: DataBufferFloat inFloat = (DataBufferFloat) data; float[] outFloat = (float[]) obj; if (outFloat == null) outFloat = new float[numBands]; for (int b=0; b<numBands; b++) { int dOffset = totalBandDataOffsets[b]; outFloat[b] = inFloat.getData(bankIndices[b])[dOffset]; } return outFloat; case ...
31,502
public static DataBuffer createBuffer(int dataType, int size, int numBanks) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT : return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT : return new DataBufferInt(size, n...
public static DataBuffer createBuffer(int dataType, int size, int numBanks) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte(size, numBanks); case DataBuffer.TYPE_USHORT : return new DataBufferUShort(size, numBanks); case DataBuffer.TYPE_INT : return new DataBufferInt(size, n...
31,503
public int[] getOffsets() { if (offsets == null) { // is this necessary? offsets = new int[1]; offsets[0] = offset; } return offsets; }
public int[] getOffsets() { if (offsets == null) { // is this necessary? offsets = new int[1]; offsets[0] = offset; } return offsets; }
31,504
public byte[] getData(int bank) { return bankData[bank]; }
public byte[] getData() { return bankData[bank]; }
31,505
public byte[] getData(int bank) { return bankData[bank]; }
public byte[] getData(int bank) { return data; }
31,506
public short[] getData(int bank) { return bankData[bank]; }
public short[] getData() { return bankData[bank]; }
31,507
public short[] getData(int bank) { return bankData[bank]; }
public short[] getData(int bank) { return data; }
31,508
public int[] getData(int bank) { return bankData[bank]; }
public int[] getData(int bank) { return bankData[bank]; }
31,509
public int getSize() { return size; }
public int getSize() { return size; }
31,510
public static Object getData(DataBuffer buffer) { if (buffer instanceof DataBufferByte) return ((DataBufferByte) buffer).getData(); if (buffer instanceof DataBufferUShort) return ((DataBufferUShort) buffer).getData(); if (buffer instanceof DataBufferInt) return ((DataBufferInt) buffer).getData(); throw new C...
public static Object getData(DataBuffer buffer) { if (buffer instanceof DataBufferByte) return ((DataBufferByte) buffer).getData(); if (buffer instanceof DataBufferUShort) return ((DataBufferUShort) buffer).getData(); if (buffer instanceof DataBufferInt) return ((DataBufferInt) buffer).getData(); throw new C...
31,511
public int getOffset() { return offset; }
public int getOffset() { return offset; }
31,513
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
31,514
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
31,515
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
31,516
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
31,517
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
public static int getDataTypeSize(int dataType) { // Maybe this should be a lookup table instead. switch (dataType) { case TYPE_BYTE : return 8; case TYPE_USHORT : case TYPE_SHORT : return 16; case TYPE_INT : case TYPE_FLOAT : return 32; case TYPE_DOUBLE : return 64; default : throw new ...
31,518
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
31,519
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
31,520
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
31,521
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
public static DataBuffer createBufferFromData(int dataType, Object data, int size) { switch (dataType) { case DataBuffer.TYPE_BYTE : return new DataBufferByte((byte[]) data, size); case DataBuffer.TYPE_USHORT : return new DataBufferUShort((short[]) data, size); case DataBuffer.TYPE_INT : return new Dat...
31,522
public void updateUI() { super.setUI((MenuItemUI) UIManager.getUI(this)); invalidate(); }
public void updateUI() { super.setUI((MenuItemUI) UIManager.getUI(this)); invalidate(); }
31,523
AbstractButton FindButton(ButtonModel m) { for (int i = 0;i < buttons.size(); i++) { AbstractButton a = (AbstractButton) buttons.get(i); if (a.getModel() == m) return a; } return null; }
AbstractButton FindButton(ButtonModel m) { for (int i = 0;i < buttons.size(); i++) { AbstractButton a = (AbstractButton) buttons.get(i); if (a.getModel() == m) return a; } return null; }
31,524
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
31,525
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
31,526
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
31,527
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
public void setSelected(ButtonModel m, boolean b) { if ((m == sel) && (b == true)) { // clicked on same item twice. System.out.println("PRESSED TWICE:" + m + ", sel=" + sel); return; } if (sel != null) { System.out.println("DESELECTING: " + sel); sel.setSelected(! b); AbstractButton but = Fin...
31,528
public ZipEntry getNextEntry() throws IOException { if (crc == null) throw new IOException("Stream closed."); if (entry != null) closeEntry(); int header = readLeInt(); if (header == CENSIG) { /* Central Header reached. */ close(); return null; } if (header != LOCSIG) throw new ZipExcepti...
public ZipEntry getNextEntry() throws IOException { if (crc == null) throw new IOException("Stream closed."); if (entry != null) closeEntry(); int header = readLeInt(); if (header == CENSIG) { /* Central Header reached. */ close(); return null; } if (header != LOCSIG) throw new ZipExcepti...
31,529
public final CharBuffer decode (ByteBuffer bb) { try { // NB: This implementation serializes different threads calling // Charset.decode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
public final CharBuffer decode (ByteBuffer bb) { try { // NB: This implementation serializes different threads calling // Charset.decode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
31,531
public final ByteBuffer encode (CharBuffer cb) { try { // NB: This implementation serializes different threads calling // Charset.encode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
public final ByteBuffer encode (CharBuffer cb) { try { // NB: This implementation serializes different threads calling // Charset.encode(), a potential performance problem. It might // be better to remove the cache, or use ThreadLocal to cache on // a per-thread basis. syn...
31,532
public abstract int get ();
public abstract int get ();
31,533
public abstract IntBuffer put (int b);
public abstract IntBuffer put (int b);
31,534
public void mark() { try { markStack.push(new Long(getStreamPosition())); } catch (IOException e) { // Ignored. } }
throw new RuntimeException(e); throw new RuntimeException(e); publicthrow new RuntimeException(e); voidthrow new RuntimeException(e); mark()throw new RuntimeException(e); throw new RuntimeException(e); {throw new RuntimeException(e); throw new RuntimeException(e); throw new RuntimeException(e); throw new RuntimeExcepti...
31,536
public int readBit() throws IOException { checkClosed(); // Calc new bit offset here, readByte resets it. int newOffset = (bitOffset + 1) & 0x7; byte data = readByte(); if (bitOffset != 0) { seek(getStreamPosition() - 1); data = (byte) (data >> (8 - newOffset)); } bitOffset = newOf...
public int readBit() throws IOException { checkClosed(); // Calc new bit offset here, readByte resets it. int newOffset = (bitOffset + 1) & 0x7; byte data = readByte(); if (bitOffset != 0) { seek(getStreamPosition() - 1); data = (byte) (data >> (8 - newOffset)); } bitOffset = newOf...
31,537
public int readBit() throws IOException { checkClosed(); // Calc new bit offset here, readByte resets it. int newOffset = (bitOffset + 1) & 0x7; byte data = readByte(); if (bitOffset != 0) { seek(getStreamPosition() - 1); data = (byte) (data >> (8 - newOffset)); } bitOffset = newOf...
public int readBit() throws IOException { checkClosed(); // Calc new bit offset here, readByte resets it. int newOffset = (bitOffset + 1) & 0x7; byte data = readByte(); if (newOffset != 0) { seek(getStreamPosition() - 1); data = (byte) (data >> (8 - newOffset)); } bitOffset = n...
31,538
public long readBits(int numBits) throws IOException { checkClosed(); if (numBits < 0 || numBits > 64) throw new IllegalArgumentException(); if (numBits == 0) return 0L; long bits = 0L; for (int i = 0; i < numBits; i++) { bits <<= 1; bits |= readBit(); } return bits; }
public long readBits(int numBits) throws IOException { checkClosed(); if (numBits < 0 || numBits > 64) throw new IllegalArgumentException(); if (numBits == 0) return 0L; long bits = 0L; for (int i = 0; i < numBits; i++) { bits <<= 1; bits |= readBit(); } return bits; }
31,539
public long readBits(int numBits) throws IOException { checkClosed(); if (numBits < 0 || numBits > 64) throw new IllegalArgumentException(); if (numBits == 0) return 0L; long bits = 0L; for (int i = 0; i < numBits; i++) { bits <<= 1; bits |= readBit(); } return bits; }
publiclongreadBits(intnumBits)throwsIOException{checkClosed();if(numBits<0||numBits>64)thrownewIllegalArgumentException();if(numBits==0)return0L;longbits=0L;for(inti=0;i<numBits;i++){ bits<<=1; bits|=readBit();}returnbits;}
31,540
public void readBytes(IIOByteBuffer buffer, int len) throws IOException { int result = read(buffer.getData(), buffer.getOffset(), len); if (result == -1 || result < len) throw new EOFException(); buffer.setLength(len); }
public void readBytes(IIOByteBuffer buffer, int len) throws IOException { int result = read(buffer.getData(), buffer.getOffset(), len); if (result == -1 || result < len) throw new EOFException(); buffer.setLength(len); }
31,543
public double readDouble() throws IOException { return (double) readLong(); }
public double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); }
31,544
public float readFloat() throws IOException { return (float) readInt(); }
public float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
31,545
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
31,546
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
31,547
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
public int readInt() throws IOException { int result = read(buffer, 0, 4); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (buffer[1] << 8) + (buffer[2] << 16) + (buffer[3] << 24)); } return ((buffer[4] << ...
31,548
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); c = read(); if (c == -1) return null; while (!eol) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); ...
31,549
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
31,550
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
31,551
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
31,552
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
public String readLine() throws IOException { checkClosed(); int c = -1; boolean eol = false; StringBuffer buffer = new StringBuffer(); while (!eol && (c = read()) != -1) { switch(c) { case '\r': // Consume following \n' long oldPosition = getStreamPosition(); if (read() != '\n...
31,553
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
31,554
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
31,555
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
public long readLong() throws IOException { int result = read(buffer, 0, 8); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return ((buffer[0] & 0xff) + (((buffer[1] & 0xff)) << 8) + (((buffer[2] & 0xff)) << ...
31,556
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
31,557
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
31,558
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
public short readShort() throws IOException { int result = read(buffer, 0, 2); if (result == -1) throw new EOFException(); if (getByteOrder() == ByteOrder.LITTLE_ENDIAN) { return (short) ((buffer[0] & 0xff) + (buffer[1] << 8)); } return (short) ((buffer[0] << 8) + (buffer[1] ...
31,559
public String readUTF() throws IOException { checkClosed(); String data; ByteOrder old = getByteOrder(); setByteOrder(ByteOrder.BIG_ENDIAN); // Strings are always big endian. try { data = DataInputStream.readUTF(this); } finally { setByteOrder(old); } return data; }
public String readUTF() throws IOException { checkClosed(); String data; ByteOrder old = getByteOrder(); setByteOrder(ByteOrder.BIG_ENDIAN); // Strings are always big endian. try { data = DataInputStream.readUTF(this); } finally { setByteOrder(old); } return data; }
31,560
public int readUnsignedByte() throws IOException { return readByte() & 0xff; }
public int readUnsignedByte() throws IOException { return (int) readByte() & 0xff; }
31,561
public long readUnsignedInt() throws IOException { return readInt() & 0xffffffff; }
public long readUnsignedInt() throws IOException { return (long) readInt() & 0xffffffffL; }
31,562