rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
catch (ForwardRequest forw_ex) | catch (org.omg.PortableServer.ForwardRequest forw_ex) | public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) return servantToHandler(servant); else { // Use servant... |
} | public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) return servantToHandler(servant); else { // Use servant... | |
else | } else | public void invoke() { InvokeHandler handler = object.getHandler(operation(), cookie, false); if (handler instanceof dynImpHandler) { DynamicImplementation dyn = ((dynImpHandler) handler).servant; if (serverRequest == null) serverRequest = new LocalServerRequest(this); try ... |
} | org.omg.CORBA.portable.InputStream s_invoke(InvokeHandler handler) throws ApplicationException { try { poa.m_orb.currents.put(Thread.currentThread(), this); org.omg.CORBA.portable.InputStream input = v_invoke(handler); if (!exceptionReply) r... | |
} | public String[] _ids() { if (repository_ids == null) return getServant()._all_interfaces(poa, Id); else return repository_ids; } | |
{ | public void setServant(Servant a_servant) { if (a_servant != null && !(a_servant instanceof InvokeHandler) && !(a_servant instanceof DynamicImplementation) ) throw new BAD_PARAM("Must be either InvokeHandler or " + "DynamicImplementation, but is " + a_servant ... | |
} | public void setServant(Servant a_servant) { if (a_servant != null && !(a_servant instanceof InvokeHandler) && !(a_servant instanceof DynamicImplementation) ) throw new BAD_PARAM("Must be either InvokeHandler or " + "DynamicImplementation, but is " + a_servant ... | |
public static void setProperty(String key, String datnum) | public static void setProperty(String key, String datum) | public static void setProperty(String key, String datnum) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSecurityAccess("setProperty." + key); secprops.put(key, datnum); } |
secprops.put(key, datnum); | if (datum == null) secprops.remove(key); else secprops.put(key, datum); | public static void setProperty(String key, String datnum) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkSecurityAccess("setProperty." + key); secprops.put(key, datnum); } |
{ | public Object decodeSignature(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_SIGNATURE[0] || k[1] != Registry.MAGIC_RAW_DSS_SIGNATURE[1] || k[2] != Registry.MAGIC_RAW_DSS_SIGNATURE[2] || k[3] != Registry.MAGIC_RAW_DSS_SIGNATURE[3]) { throw new IllegalArgumentException(... | |
} | public Object decodeSignature(byte[] k) { // magic if (k[0] != Registry.MAGIC_RAW_DSS_SIGNATURE[0] || k[1] != Registry.MAGIC_RAW_DSS_SIGNATURE[1] || k[2] != Registry.MAGIC_RAW_DSS_SIGNATURE[2] || k[3] != Registry.MAGIC_RAW_DSS_SIGNATURE[3]) { throw new IllegalArgumentException(... | |
throw new IllegalArgumentException("key"); | throw new IllegalArgumentException("signature"); | public byte[] encodeSignature(Object signature) { BigInteger r, s; try { BigInteger[] sig = (BigInteger[]) signature; r = sig[0]; s = sig[1]; } catch (Exception x) { throw new IllegalArgumentException("key"); } ByteArrayOutputStream baos = new ByteArrayOutp... |
return bg; | Color background; if (bg == null) background = JTabbedPane.this.getBackground(); else background = bg; return background; | public Color getBackground() { return bg; } |
return fg; | Color foreground; if (fg == null) foreground = JTabbedPane.this.getForeground(); else foreground = fg; return foreground; | public Color getForeground() { return fg; } |
return getComponentAt(getSelectedIndex()); | int selectedIndex = getSelectedIndex(); Component selected = null; if (selectedIndex >= 0) selected = getComponentAt(selectedIndex); return selected; | public Component getSelectedComponent() { return getComponentAt(getSelectedIndex()); } |
return findClass(name); | return loaders[i].loadClass(name); | protected Class findClass(String name) throws ClassNotFoundException { for (int i = 0; i < loaders.length; i++) { try { return findClass(name); } catch (ClassNotFoundException e) { // try another. } } return super.findClass(name)... |
URL resource = findResource(name); | URL resource = loaders[i].getResource(name); | protected URL findResource(String name) { for (int i = 0; i < loaders.length; i++) { URL resource = findResource(name); if (resource != null) return resource; } return super.findResource(name); } |
Enumeration resource = findResources(name); | Enumeration resource = loaders[i].getResources(name); | protected Enumeration findResources(String name) throws IOException { for (int i = 0; i < loaders.length; i++) { Enumeration resource = findResources(name); if (resource != null) return resource; } return super.findResources(name); } |
animationTimer = new Timer(); | animationTimer = new Timer(200, null); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JProgressBar) { progressBar = (JProgressBar) c; animationTimer = new Timer(); animationTimer.setRepeats(true); installDefaults(); installListeners(); } } |
public abstract void addItem (MenuItem item); | void addItem (MenuItem item); | public abstract void addItem (MenuItem item); |
public abstract void delItem (int index); | void delItem (int index); | public abstract void delItem (int index); |
public abstract void invoke(ServerRequest request); | public void invoke(ServerRequest request) { Request r = _request(request.operation()); NVList args = new gnuNVList(); request.arguments(args); NamedValue v; int i = 0; try { for (i = 0; i < args.count(); i++) { v = args.item(i); Any n; OutputStream out; switch (v.flags()) { case ARG_IN.value: out = v.value().creat... | public abstract void invoke(ServerRequest request); |
typecode = new primitiveTypeCode(TCKind.from_int(xKind)); | typecode = new PrimitiveTypeCode(TCKind.from_int(xKind)); | public TypeCode type() { if (typecode != null) return typecode; else if (xKind >= 0) { typecode = new primitiveTypeCode(TCKind.from_int(xKind)); return typecode; } else return has != null ? has._type() : nullType; } |
private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) | private void applyPatternWithSymbols(String pattern, DecimalFormatSymbols syms) | private final void applyPatternWithSymbols (String pattern, DecimalFormatSymbols syms) { // Initialize to the state the parser expects. negativePrefix = ""; negativeSuffix = ""; positivePrefix = ""; positiveSuffix = ""; decimalSeparatorAlwaysShown = false; groupingSize = 0; minExponentDigits = 0; ... |
private final String computePattern (DecimalFormatSymbols syms) | private String computePattern(DecimalFormatSymbols syms) | private final String computePattern (DecimalFormatSymbols syms) { StringBuffer mainPattern = new StringBuffer (); // We have to at least emit a zero for the minimum number of // digits. Past that we need hash marks up to the grouping // separator (and one beyond). int total_digits = Math.max(minimumInteger... |
private final boolean equals (String s1, String s2) | private boolean equals(String s1, String s2) | private final boolean equals (String s1, String s2) { if (s1 == null || s2 == null) return s1 == s2; return s1.equals(s2); } |
private final String patternChars (DecimalFormatSymbols syms) | private String patternChars (DecimalFormatSymbols syms) | private final String patternChars (DecimalFormatSymbols syms) { StringBuffer buf = new StringBuffer (); buf.append(syms.getDecimalSeparator()); buf.append(syms.getDigit()); buf.append(syms.getExponential()); buf.append(syms.getGroupingSeparator()); // Adding this one causes pattern application to fail. // O... |
private final void quoteFix (StringBuffer buf, String text, String patChars) | private void quoteFix(StringBuffer buf, String text, String patChars) | private final void quoteFix (StringBuffer buf, String text, String patChars) { int len = text.length(); for (int index = 0; index < len; ++index) { char c = text.charAt(index); if (patChars.indexOf(c) != -1) { buf.append('\''); buf.append(c); buf.append('\''); } else buf.append(c); } } |
private final int scanFix (String pattern, int index, FormatBuffer buf, | private int scanFix (String pattern, int index, FormatBuffer buf, | private final int scanFix (String pattern, int index, FormatBuffer buf, String patChars, DecimalFormatSymbols syms, boolean is_suffix) { int len = pattern.length(); boolean quoteStarted = false; buf.clear(); boolean multiplierSet = false; while (index < len) { char c = pattern.cha... |
private final int scanFormat (String pattern, int index, String patChars, DecimalFormatSymbols syms, boolean is_positive) | private int scanFormat (String pattern, int index, String patChars, DecimalFormatSymbols syms, boolean is_positive) | private final int scanFormat (String pattern, int index, String patChars, DecimalFormatSymbols syms, boolean is_positive) { int max = pattern.length(); int countSinceGroup = 0; int zeroCount = 0; boolean saw_group = false; // // Scan integer part. // while (index < max) { char c = pattern.char... |
public BeanInfo[] getServicesBeanInfo(); | BeanInfo[] getServicesBeanInfo(); | public BeanInfo[] getServicesBeanInfo(); |
scrollpane = p; | protected void installDefaults(JScrollPane p) { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); p.setForeground(defaults.getColor("ScrollPane.foreground")); p.setBackground(defaults.getColor("ScrollPane.background")); p.setFont(defaults.getFont("ScrollPane.font")); p.setBorder(defaults.getBo... | |
scrollpane = null; | protected void uninstallDefaults(JScrollPane p) { p.setForeground(null); p.setBackground(null); p.setFont(null); p.setBorder(null); } | |
public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars) | public GlyphVector createGlyphVector (FontRenderContext ctx, String str) | public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars){ return peer.createGlyphVector (this, ctx, new StringCharacterIterator (new String (chars)));} |
return peer.createGlyphVector (this, ctx, new StringCharacterIterator (new String (chars))); | return peer.createGlyphVector (this, ctx, new StringCharacterIterator (str)); | public GlyphVector createGlyphVector (FontRenderContext ctx, char[] chars){ return peer.createGlyphVector (this, ctx, new StringCharacterIterator (new String (chars)));} |
invalidate(); | public void updateUI() { setUI((ComboBoxUI) UIManager.getUI(this)); invalidate(); } | |
pageIO = rm.claimIOResource(owner, 0x81, 0x8f - 0x81 + 1); dma1IO = rm.claimIOResource(owner, 0x00, 16); dma2IO = rm.claimIOResource(owner, 0xc0, 32); | pageIO = claimPorts(rm, owner, 0x81, 0x8f - 0x81 + 1); dma1IO = claimPorts(rm, owner, 0x00, 16); dma2IO = claimPorts(rm, owner, 0xc0, 32); | public DMA() throws DMAException { final ResourceManager rm; try { rm = (ResourceManager)InitialNaming.lookup(ResourceManager.NAME); } catch (NameNotFoundException ex) { throw new DMAException("Cannot find ResourceManager", ex); } IOResource pageIO = null; IOResource dma1IO = null; IOResource dma2IO = null;... |
while (!vstack.isEmpty()) { Item v = vstack.pop(); if (v.isStack()) { if (VirtualStack.checkOperandStack) { vstack.operandStack.pop(v); } os.writeLEA(helper.SP, helper.SP, v.getCategory() * helper.SLOTSIZE); } v.release(eContext); } | public final void visit_return() { stackFrame.emitReturn(); assertCondition(vstack.isEmpty(), "vstack should be empty; it is ", vstack); } | |
final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; | final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
case Kind.LOCAL: os.writePUSH(FP, getLsbOffsetToFP()); os.writePUSH(FP, getMsbOffsetToFP()); break; | switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
case Kind.CONSTANT: pushConstant(ec, os); break; | case Kind.LOCAL: os.writePUSH(FP, getLsbOffsetToFP()); os.writePUSH(FP, getMsbOffsetToFP()); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
case Kind.FPUSTACK: notImplemented(); break; | case Kind.CONSTANT: pushConstant(ec, os); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
case Kind.STACK: if (VirtualStack.checkOperandStack) { final VirtualStack stack = ec.getVStack(); | case Kind.FPUSTACK: final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); break; | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
if (kind == Kind.STACK) { stack.operandStack.pop(this); } } break; } | case Kind.STACK: if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } break; } | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
if (VirtualStack.checkOperandStack) { final VirtualStack stack = ec.getVStack(); stack.operandStack.push(this); } } | if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } } | final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: ... |
case Kind.STACK: break; default: throw new IllegalArgumentException("Invalid item kind"); } | case Kind.STACK: break; | final void release(EmitterContext ec) { final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(reg); assertCondition(pool.isFree(reg), "reg is free"); break; case Kind.LOCAL: // nothing to do ... |
this.reg = null; this.kind = 0; } | default: throw new IllegalArgumentException("Invalid item kind"); } this.reg = null; this.kind = 0; } | final void release(EmitterContext ec) { final X86RegisterPool pool = ec.getPool(); switch (getKind()) { case Kind.REGISTER: pool.release(reg); assertCondition(pool.isFree(reg), "reg is free"); break; case Kind.LOCAL: // nothing to do ... |
if (!containsAlias(alias)) { return false; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { | log.entering(this.getClass().getName(), "containsCertificate", alias); boolean result = false; if (containsAlias(alias)) for (Iterator it = get(alias).iterator(); it.hasNext();) | public boolean containsCertificate(String alias) { if (!containsAlias(alias)) { return false; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { if (it.next() instanceof CertificateEntry) { return true; } } return false;... |
return true; } | result = true; break; | public boolean containsCertificate(String alias) { if (!containsAlias(alias)) { return false; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { if (it.next() instanceof CertificateEntry) { return true; } } return false;... |
return false; | log.exiting(this.getClass().getName(), "containsCertificate", Boolean.valueOf(result)); return result; | public boolean containsCertificate(String alias) { if (!containsAlias(alias)) { return false; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { if (it.next() instanceof CertificateEntry) { return true; } } return false;... |
if (!containsAlias(alias)) { return null; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) | log.entering(this.getClass().getName(), "getCertificate", alias); Certificate result = null; if (containsAlias(alias)) for (Iterator it = get(alias).iterator(); it.hasNext();) | public Certificate getCertificate(String alias) { if (!containsAlias(alias)) { return null; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { Entry e = (Entry) it.next(); if (e instanceof CertificateEntry) { return ((CertificateE... |
return ((CertificateEntry) e).getCertificate(); | result = ((CertificateEntry) e).getCertificate(); break; | public Certificate getCertificate(String alias) { if (!containsAlias(alias)) { return null; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { Entry e = (Entry) it.next(); if (e instanceof CertificateEntry) { return ((CertificateE... |
return null; | log.exiting(this.getClass().getName(), "getCertificate", result); return result; | public Certificate getCertificate(String alias) { if (!containsAlias(alias)) { return null; } List l = get(alias); for (Iterator it = l.iterator(); it.hasNext();) { Entry e = (Entry) it.next(); if (e instanceof CertificateEntry) { return ((CertificateE... |
{ | protected void load(InputStream in, char[] password) throws IOException { if (in.read() != USAGE) { throw new MalformedKeyringException("incompatible keyring usage"); } if (in.read() != PasswordAuthenticatedEntry.TYPE) { throw new MalformedKeyringException( ... | |
} | protected void load(InputStream in, char[] password) throws IOException { if (in.read() != USAGE) { throw new MalformedKeyringException("incompatible keyring usage"); } if (in.read() != PasswordAuthenticatedEntry.TYPE) { throw new MalformedKeyringException( ... | |
{ throw new MalformedKeyringException( "expecting password-authenticated entry tag"); } keyring = PasswordAuthenticatedEntry.decode(new DataInputStream(in), password); | throw new MalformedKeyringException("expecting password-authenticated entry tag"); DataInputStream dis = new DataInputStream(in); keyring = PasswordAuthenticatedEntry.decode(dis, password); log.exiting(this.getClass().getName(), "load"); | protected void load(InputStream in, char[] password) throws IOException { if (in.read() != USAGE) { throw new MalformedKeyringException("incompatible keyring usage"); } if (in.read() != PasswordAuthenticatedEntry.TYPE) { throw new MalformedKeyringException( ... |
if (containsCertificate(alias)) | log.entering(this.getClass().getName(), "putCertificate", new Object[] { alias, cert }); if (! containsCertificate(alias)) | public void putCertificate(String alias, Certificate cert) { if (containsCertificate(alias)) { return; } Properties p = new Properties(); p.put("alias", fixAlias(alias)); add(new CertificateEntry(cert, new Date(), p)); } |
return; } | public void putCertificate(String alias, Certificate cert) { if (containsCertificate(alias)) { return; } Properties p = new Properties(); p.put("alias", fixAlias(alias)); add(new CertificateEntry(cert, new Date(), p)); } | |
else log.finer("Keyring already contains alias: " + alias); log.exiting(this.getClass().getName(), "putCertificate"); } | public void putCertificate(String alias, Certificate cert) { if (containsCertificate(alias)) { return; } Properties p = new Properties(); p.put("alias", fixAlias(alias)); add(new CertificateEntry(cert, new Date(), p)); } | |
log.exiting(this.getClass().getName(), "store"); | protected void store(OutputStream out, char[] password) throws IOException { out.write(USAGE); keyring.encode(new DataOutputStream(out), password); } | |
if (field.isStatic()) { final VmStaticField sf = (VmStaticField)field; initialize(sf); Unsafe.setObject(getStaticFieldAddress(sf), value); SoftByteCodes.putstaticWriteBarrier(sf.getStaticsIndex(), value); } else { final VmInstanceField inf = (VmInstanceField)field; final int offset = inf.getOffset(); Unsafe.setObject(o... | if (field.isStatic()) { final VmStaticField sf = (VmStaticField) field; initialize(sf); Unsafe.setObject(getStaticFieldAddress(sf), value); final VmWriteBarrier wb = Vm.getVm().getHeapManager() .getWriteBarrier(); if (wb != null) { wb.putstaticWriteBarrier(sf.getStaticsIndex(), value); } } else { final VmInstanceField ... | public static void setObject(VmField field, Object o, Object value) { if (field.isStatic()) { final VmStaticField sf = (VmStaticField)field; initialize(sf); Unsafe.setObject(getStaticFieldAddress(sf), value); SoftByteCodes.putstaticWriteBarrier(sf.getStaticsIndex(), value); } else { final VmInstanceField i... |
fillBlock (); | public void setup(Map attributes) { seeded = false; Arrays.fill(key, (byte) 0); Arrays.fill(counter, (byte) 0); byte[] seed = (byte[]) attributes.get(SEED); if (seed != null) addRandomBytes(seed); } | |
try { fillBlock (); } catch (LimitReachedException shouldNotHappen) { throw new RuntimeException (shouldNotHappen); } | public void setup(Map attributes) { lastReseed = 0; reseedCount = 0; pool = 0; pool0Count = 0; generator.init(attributes); } | |
if (!initialised) { | if (! initialised) | public byte nextByte() throws IllegalStateException, LimitReachedException { if (!initialised) { throw new IllegalStateException(); } return nextByteInternal(); } |
} | public byte nextByte() throws IllegalStateException, LimitReachedException { if (!initialised) { throw new IllegalStateException(); } return nextByteInternal(); } | |
limit(capacity()); | public DoubleBuffer compact () { int copied = 0; while (remaining () > 0) { put (copied, get ()); copied++; } position (copied); return this; } | |
status = ABORTED | COMPLETE; | status = ABORTED; | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... |
status = ERRORED | COMPLETE; | status = ERRORED; | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... |
else if ((flags & SOMEBITS) != 0) status = LOADING; | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... | |
if ((status & COMPLETE) == COMPLETE) { | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... | |
} | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... | |
return (status & COMPLETE) == 0; | return ((status & (COMPLETE | ERRORED | ABORTED)) == 0); | public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & ABORT) != 0) status = ABORTED | COMPLETE; else if ((flags & ERROR) != 0) status = ERRORED | COMPLETE; else if ((flags & ALLBITS) != 0) status = COMPLETE; else if... |
int flags = target.checkImage(image, e); e.imageUpdate(image, flags, -1, -1, -1, -1); | } | public void addImage(Image image, int id) { MediaEntry e = new MediaEntry(); e.id = id; e.image = image; e.next = head; head = e; // Start tracking image status. int flags = target.checkImage(image, e); e.imageUpdate(image, flags, -1, -1, -1, -1); } |
} | public void removeImage(Image image) { MediaEntry e = head; MediaEntry prev = null; while (e != null) { if (e.image == image) { if (prev == null) head = e.next; else prev.next = e.next; } prev = e; e = e.next; } } | |
target.prepareImage(e.image, e); | boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else | public int statusAll(boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (load && e.status == 0) { target.prepareImage(e.image, e); e.status = LOADING; } result |= e.status; e = e.next; } return result; } |
target.prepareImage(e.image, e); | boolean complete = target.prepareImage(e.image, e); if (complete) e.status = COMPLETE; else | public int statusID(int id, boolean load) { int result = 0; MediaEntry e = head; while (e != null) { if (e.id == id) { if (load && e.status == 0) { target.prepareImage(e.image, e); e.status = LOADING; } result |= e.status; } e = e.next; } return re... |
private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException E) { } if (getMethodName2 != null) { if (g... | private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException e) { } } | private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException E) { } if (getMethodNa... |
Method getMethod2; try { getMethod2 = beanClass.getMethod(getMethodName2, new Class[0]); } catch (NoSuchMethodException E) { getMethod2 = null; } if (getMethod2 != null) { if (getMethod != null) { if (!getMethod.getReturnType().equals(getMethod2.getReturnType())) { throw new IntrospectionException( "Both " + getMethodN... | if (getMethod == null && getMethodName2 != null) { try { getMethod = beanClass.getMethod(getMethodName2, new Class[0]); } catch (NoSuchMethodException e) { } } | private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException E) { } if (getMethodNa... |
if (getMethod != null) { propertyType = getMethod.getReturnType(); if (setMethodName != null) { Class[] setArgs = new Class[1]; setArgs[0] = propertyType; try { setMethod = beanClass.getMethod(setMethodName, setArgs); if (!setMethod.getReturnType().equals(java.lang.Void.TYPE)) { throw new IntrospectionException(setMeth... | if (setMethodName != null) { if (getMethod != null) { Class propertyType = getMethod.getReturnType(); if (propertyType == Void.TYPE) { String msg = "The property's read method has return type 'void'"; throw new IntrospectionException(msg); } Class[] setArgs = new Class[]{propertyType}; try { setMethod = beanClass.ge... | private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException E) { } if (getMethodNa... |
else if (getMethodName1 == null && getMethodName2 == null) { Method[] methods = beanClass.getMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].getName().equals(setMethodName) && methods[i].getParameterTypes().length == 1 && methods[i].getReturnType() == Void.TYPE) { setMethod = methods[i]; break; }... | private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException { try { if (getMethodName1 != null) { try { getMethod = beanClass.getMethod(getMethodName1, new Class[0]); } catch (NoSuchMethodException E) { } if (getMethodNa... | |
speakIO = rm.claimIOResource(dev, SPEAKER_PORT, 1); pitIO = rm.claimIOResource(dev, CHANNEL2_PORT, 2); | speakIO = claimPorts(rm, dev, SPEAKER_PORT, 1); pitIO = claimPorts(rm, dev, CHANNEL2_PORT, 2); | 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... |
value.profile_data = new byte[ input.read_long() ]; | if (input instanceof cdrBufInput) { value.profile_data = ((cdrBufInput) input).read_sequence(); } else { value.profile_data = new byte[input.read_long()]; | 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; ... |
value.profile_data [ i0 ] = input.read_octet(); | value.profile_data[i0] = input.read_octet(); } | 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; ... |
output.write_octet(value.profile_data [ 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 ]); } |
if (end != null) if (end.compareTo(prevDate) > 0) | if (start != null) if (start.compareTo(prevDate) > 0) | 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 void setValue(Object value) { if (! (value instanceof Date) || value == null) throw new IllegalArgumentException("Value not a date."); date.setTime((Date) value); fireStateChanged(); } | |
out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { out.println("active"); | if (descr != null) { out.print(descr.getId()); out.print("; state "); if (descr.getPlugin().isActive()) { out.println("active"); } else { out.println("inactive"); } | 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()) { ... |
out.println("inactive"); | out.println("Plugin " + id + " not found"); | 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()) { ... |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return NumberOfInterveningJobs.class; } |
public final String getName() | public String getName() | public final String getName() { return "number-of-intervening-jobs"; } |
protected final StringBuffer formatInternal (Object arguments[], StringBuffer appendBuf, | private StringBuffer formatInternal (Object arguments[], StringBuffer appendBuf, | 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) ... |
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(... | 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 (DEBUG) debug("entryCerts=" + entryCerts + " verified " + name + " ? " + verified.get(name)); if (entryCerts != null && verified.containsKey(name) && ((Boolean) ver... | 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... | |
return super.getInputStream(entry); | 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 already verified entry " + entry); if (!((Boolean) verified.get(entry.getName())).booleanValue()) throw new ZipE... | public synchronized InputStream getInputStream(ZipEntry entry) throws ZipException, IOException { return super.getInputStream(entry); // XXX verify } |
BigInteger p, g, q, y; | BigInteger p = null; BigInteger g = null; BigInteger q = null; BigInteger y; | 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... |
DERValue derParams = der.read(); DerUtil.checkIsConstructed(derParams, "Wrong DSS Parameters field"); | 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... | |
InvalidParameterException e = new InvalidParameterException(); | InvalidParameterException e = new InvalidParameterException(x.getMessage()); | 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... |
BigInteger y = dssKey.getY(); | 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... | |
DERValue derParams = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE, params); | derParams = new DERValue(DER.CONSTRUCTED | DER.SEQUENCE, params); } | 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... |
InvalidParameterException e = new InvalidParameterException(); | InvalidParameterException e = new InvalidParameterException(x.getMessage()); | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.