bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, null, tabs.size()); }
|
public void addTab(String title, Icon icon, Component component) { insertTab(title, icon, component, tip, tabs.size()); }
| 1,261 |
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
|
public void remove(int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
| 1,262 |
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
|
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
| 1,263 |
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); repaint(); }
|
public void remove (int index) { Component c = getComponent (index); int layer = getLayer (c); decrLayer (new Integer(layer)); componentToLayer.remove (c); super.remove (index); revalidate(); }
| 1,264 |
public void endInlinedMethod(VmMethod previousMethod) { if (log) { os.log("End of inlined method"); } // Do some housekeeping helper.setMethod(previousMethod); os.setObjectRef(inlinedMethodInfo.getEndOfInlineLabel()); this.currentMethod = previousMethod; // Push the types on the vstack inlinedMethodInfo.pushExitStack(ifac, vstack); // Push the return value inlinedMethodInfo.pushReturnValue(helper); // Cleanup helper.setLabelPrefix(inlinedMethodInfo.getPreviousLabelPrefix()); this.inlinedMethodInfo = inlinedMethodInfo.getPrevious(); if (debug) { BootLog.debug("endInlinedMethod"); } }
|
publicthis.inlineDepth--; voidthis.inlineDepth--; endInlinedMethod(VmMethodthis.inlineDepth--; previousMethod)this.inlineDepth--; {this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; ifthis.inlineDepth--; (log)this.inlineDepth--; {this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; os.log("Endthis.inlineDepth--; ofthis.inlineDepth--; inlinedthis.inlineDepth--; method");this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; }this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; //this.inlineDepth--; Dothis.inlineDepth--; somethis.inlineDepth--; housekeeping helper.setMethod(previousMethod); os.setObjectRef(inlinedMethodInfo.getEndOfInlineLabel()); this.currentMethodthis.inlineDepth--; =this.inlineDepth--; previousMethod;this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; //this.inlineDepth--; Pushthis.inlineDepth--; thethis.inlineDepth--; typesthis.inlineDepth--; onthis.inlineDepth--; thethis.inlineDepth--; vstack inlinedMethodInfo.pushExitStack(ifac,this.inlineDepth--; vstack);this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; //this.inlineDepth--; Pushthis.inlineDepth--; thethis.inlineDepth--; returnthis.inlineDepth--; valuethis.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; inlinedMethodInfo.pushReturnValue(helper);this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; //this.inlineDepth--; Cleanupthis.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; this.inlineDepth--; helper.setLabelPrefix(inlinedMethodInfo.getPreviousLabelPrefix()); this.inlinedMethodInfothis.inlineDepth--; =this.inlineDepth--; inlinedMethodInfo.getPrevious(); ifthis.inlineDepth--; (debug)this.inlineDepth--; { BootLog.debug("endInlinedMethod"); } }
| 1,265 |
public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } } this.curAddress = address; this._curInstrLabel = null; if (startOfBB || setCurInstrLabel) { os.setObjectRef(getCurInstrLabel()); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); }
|
public void startInstruction(int address) { if (debug) { BootLog.debug("#" + address + "\t" + vstack); } if (log) { if (debug) { os.log("#" + address + " VStack: " + vstack.toString()); } else { os.log("#" + address); } } this.curAddress = address; this._curInstrLabel = null; if (startOfBB || setCurInstrLabel) { os.setObjectRef(getCurInstrLabel()); startOfBB = false; setCurInstrLabel = false; } final int offset = os.getLength() - startOffset; cm.add(currentMethod, address, offset); }
| 1,267 |
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); //os.log("LongItem.push "+Integer.toString(getKind())); switch (getKind()) { case Kind.REGISTER: os.writePUSH(msb); os.writePUSH(lsb); break; case Kind.LOCAL: os.writePUSH(FP, getMsbOffsetToFP()); os.writePUSH(FP, getLsbOffsetToFP()); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; if (!fpuStack.isTos(this)) { FPUHelper.fxch(os, fpuStack, fpuStack.getRegister(this)); } stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 8); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,268 |
public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } invokeJavaMethod(method.getSignature()); }
|
public final void invokeJavaMethod(VmMethod method) { if (false) { final int staticsIdx = (VmArray.DATA_OFFSET + method.getStaticsIndex()) << 2; os.writeMOV(INTSIZE, Register.EAX, STATICS, staticsIdx); } else { os.writeMOV_Const(Register.EAX, method); } invokeJavaMethod(method.getSignature()); }
| 1,269 |
final void loadTo(EmitterContext ec, Register reg) { assertCondition(reg != null, "Reg != null"); final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); assertCondition(!pool.isFree(reg), "reg not free"); switch (kind) { case Kind.REGISTER: if (this.reg != reg) { os.writeMOV(INTSIZE, reg, this.reg); release(ec); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, reg, FP, getOffsetToFP()); break; case Kind.CONSTANT: loadToConstant(ec, os, reg); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack FPUHelper.fxch(os, stack.fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); os.writePOP(reg); break; case Kind.STACK: //TODO: make sure this is on top os stack if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(reg); break; default: throw new IllegalArgumentException("Invalid item kind"); } kind = Kind.REGISTER; this.reg = reg; }
|
final void loadTo(EmitterContext ec, Register reg) { assertCondition(reg != null, "Reg != null"); final AbstractX86Stream os = ec.getStream(); final X86RegisterPool pool = ec.getPool(); final VirtualStack stack = ec.getVStack(); assertCondition(!pool.isFree(reg), "reg not free"); switch (kind) { case Kind.REGISTER: if (this.reg != reg) { os.writeMOV(INTSIZE, reg, this.reg); release(ec); } break; case Kind.LOCAL: os.writeMOV(INTSIZE, reg, FP, getOffsetToFP()); break; case Kind.CONSTANT: loadToConstant(ec, os, reg); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack FPUHelper.fxch(os, stack.fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); os.writePOP(reg); break; case Kind.STACK: //TODO: make sure this is on top os stack if (VirtualStack.checkOperandStack) { stack.operandStack.pop(this); } os.writePOP(reg); break; default: throw new IllegalArgumentException("Invalid item kind"); } kind = Kind.REGISTER; this.reg = reg; }
| 1,270 |
public void resolve(VmClassLoader clc) { if (!resolved) { doResolve(clc); resolved = true; } }
|
public void resolve(VmClassLoader clc) { if (!resolved) { doResolve(clc); resolved = true; } }
| 1,271 |
public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0)); }
|
public static int SignatureToType(String signature) { return SignatureToType(signature.charAt(0)); }
| 1,272 |
public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb); return item; }
|
public DoubleWordItem createReg(int jvmType, Register lsb, Register msb) { final DoubleWordItem item = (DoubleWordItem) getOrCreate(jvmType); item.initialize(Item.Kind.REGISTER, 0, lsb, msb); return item; }
| 1,273 |
public CompileError(String s) { super(s); }
|
public CompileError(String s) { super(s); }
| 1,274 |
public abstract void visit_ldc(VmConstClass value);
|
public abstract void visit_ldc(VmConstClass value);
| 1,275 |
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); switch (getKind()) { case Kind.REGISTER: os.writePUSH(reg); break; case Kind.LOCAL: os.writePUSH(FP, offsetToFP); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; FPUHelper.fxch(os, fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; default: throw new IllegalArgumentException("Invalid item kind"); } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
|
final void push(EmitterContext ec) { final AbstractX86Stream os = ec.getStream(); final VirtualStack stack = ec.getVStack(); switch (getKind()) { case Kind.REGISTER: os.writePUSH(reg); break; case Kind.LOCAL: os.writePUSH(FP, offsetToFP); break; case Kind.CONSTANT: pushConstant(ec, os); break; case Kind.FPUSTACK: // Make sure this item is on top of the FPU stack final FPUStack fpuStack = stack.fpuStack; FPUHelper.fxch(os, fpuStack, this); stack.fpuStack.pop(this); // Convert & move to new space on normal stack os.writeLEA(SP, SP, 4); popFromFPU(os, SP, 0); break; case Kind.STACK: //nothing to do if (VirtualStack.checkOperandStack) { // the item is not really pushed and popped // but this checks that it is really the top // element stack.operandStack.pop(this); } break; default: throw new IllegalArgumentException("Invalid item kind"); } release(ec); kind = Kind.STACK; if (VirtualStack.checkOperandStack) { stack.operandStack.push(this); } }
| 1,276 |
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() > getUI().getMinimumSize(this).height; }
|
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height; }
| 1,277 |
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
|
public AssertionError() { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
| 1,278 |
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
|
public AssertionError(Object msg) { super("" + msg); if (msg instanceof Throwable) initCause((Throwable) msg); }
| 1,279 |
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y; for (int i = 0; i < root.getElementCount(); i++) { drawLine(i, g, rect.x, y); y += metrics.getHeight(); } }
|
public void paint(Graphics g, Shape s) { // Ensure metrics are up-to-date. updateMetrics(); JTextComponent textComponent = (JTextComponent) getContainer(); selectedColor = textComponent.getSelectedTextColor(); unselectedColor = textComponent.getForeground(); disabledColor = textComponent.getDisabledTextColor(); Rectangle rect = s.getBounds(); // FIXME: Text may be scrolled. Document document = textComponent.getDocument(); Element root = document.getDefaultRootElement(); int y = rect.y + metrics.getAscent(); for (int i = 0; i < root.getElementCount(); i++) { drawLine(i, g, rect.x, y); y += metrics.getHeight(); } }
| 1,283 |
public Word sub (Word w2) { return null; }
|
public Word sub (int w2) { return null; }
| 1,284 |
public String toXMLString () { // hurm. Cant figure out how to use BufferedWriter here. fooey. Writer outputWriter = (Writer) new StringWriter(); try { toXMLWriter(outputWriter, "", false, null, null); } catch (java.io.IOException e) { // weird. Out of memorY? Log.errorln("Cant got IOException for toXMLWriter() method within toXMLString()."); Log.printStackTrace(e); } return outputWriter.toString(); }
|
public String toXMLString () { // hurm. Cant figure out how to use BufferedWriter here. fooey. Writer outputWriter = (Writer) new StringWriter(); try { basicXMLWriter(outputWriter, "", false, null, null); } catch (java.io.IOException e) { // weird. Out of memorY? Log.errorln("Cant got IOException for toXMLWriter() method within toXMLString()."); Log.printStackTrace(e); } return outputWriter.toString(); }
| 1,285 |
public ShortSeqHolder(short[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public ShortSeqHolder() { value = initial_value; typecode.setLength(value.length); }
| 1,286 |
public ShortSeqHolder(short[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public ShortSeqHolder(short[] initial_value) { value = initial_value; typecode.setLength(value.length); }
| 1,287 |
public JNodeBufferedImage(int w, int h, int type) { super(w, h, type); }
|
public JNodeBufferedImage(int w, int h, int type) { super(w, h, type); }
| 1,288 |
public String getValue(Name name) { return (String) get(name); }
|
public String getValue(String name) { return (String) get(name); }
| 1,289 |
public String getValue(Name name) { return (String) get(name); }
|
public String getValue(Name name) { return (String) get(new Name(name)); }
| 1,290 |
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
|
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
| 1,291 |
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
|
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) loader.loadClass(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
| 1,292 |
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
|
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String) registerMap.get(type); if (className != null) { try { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
| 1,293 |
public static String getEditorKitClassNameForContentType(String type) { return (String) registerMap.get(type); }
|
public static String getEditorKitClassNameForContentType(String type) { EditorKitMapping m = (EditorKitMapping) registerMap.get(type); String kitName = m != null ? m.className : null; return kitName; }
| 1,295 |
public EditorKit getEditorKitForContentType(String type) { // First check if an EditorKit has been explicitly set. EditorKit e = (EditorKit) editorMap.get(type); // Then check to see if we can create one. if (e == null) e = createEditorKitForContentType(type); // Otherwise default to PlainEditorKit. if (e == null) e = new PlainEditorKit(); return e; }
|
public EditorKit getEditorKitForContentType(String type) { // First check if an EditorKit has been explicitly set. EditorKit e = (EditorKit) editorMap.get(type); // Then check to see if we can create one. if (e == null) e = createEditorKitForContentType(type); // Otherwise default to PlainEditorKit. if (e == null) e = createDefaultEditorKit(); return e; }
| 1,296 |
public URL getPage() { return page; }
|
public URL getPage() { return loader != null ? loader.page : null; }
| 1,297 |
public Dimension getPreferredSize() { Dimension pref = super.getPreferredSize(); if (getScrollableTracksViewportWidth()) pref.width = getUI().getMinimumSize(this).width; if (getScrollableTracksViewportHeight()) pref.height = getUI().getMinimumSize(this).height; return pref; }
|
public Dimension getPreferredSize() { Dimension pref = super.getPreferredSize(); if (getScrollableTracksViewportWidth()) pref.width = getUI().getMinimumSize(this).width; if (getScrollableTracksViewportHeight()) pref.height = getUI().getMinimumSize(this).height; return pref; }
| 1,298 |
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height; }
|
public boolean getScrollableTracksViewportHeight() { // Tests show that this returns true when the parent is a JViewport // and has a height > minimum UI height. Container parent = getParent(); return parent instanceof JViewport && parent.getHeight() >= getUI().getMinimumSize(this).height && parent.getHeight() <= getUI().getMaximumSize(this).height; }
| 1,299 |
protected InputStream getStream(URL page) throws IOException { return page.openStream(); }
|
protected InputStream getStream(URL page) throws IOException { URLConnection conn = page.openConnection(); String type = conn.getContentType(); if (type != null) setContentType(type); InputStream stream = conn.getInputStream(); return new BufferedInputStream(stream); }
| 1,300 |
void init() { editorMap = new HashMap(); registerMap = new HashMap(); registerEditorKitForContentType("application/rtf", "javax.swing.text.rtf.RTFEditorKit"); registerEditorKitForContentType("text/plain", "javax.swing.JEditorPane$PlainEditorKit"); registerEditorKitForContentType("text/html", "javax.swing.text.html.HTMLEditorKit"); registerEditorKitForContentType("text/rtf", "javax.swing.text.rtf.RTFEditorKit"); }
|
void init() { editorMap = new HashMap(); registerMap = new HashMap(); registerEditorKitForContentType("application/rtf", "javax.swing.text.rtf.RTFEditorKit"); registerEditorKitForContentType("text/plain", "javax.swing.JEditorPane$PlainEditorKit"); registerEditorKitForContentType("text/html", "javax.swing.text.html.HTMLEditorKit"); registerEditorKitForContentType("text/rtf", "javax.swing.text.rtf.RTFEditorKit"); }
| 1,301 |
public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { Document doc = (Document) desc; try { kit.read(in, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } }
|
public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { HTMLDocument doc = (HTMLDocument) desc; setDocument(doc); try { kit.read(in, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } }
| 1,302 |
public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { Document doc = (Document) desc; try { kit.read(in, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } }
|
public void read(InputStream in, Object desc) throws IOException { EditorKit kit = getEditorKit(); if (kit instanceof HTMLEditorKit && desc instanceof HTMLDocument) { Document doc = (Document) desc; try { InputStreamReader reader = new InputStreamReader(in); kit.read(reader, doc, 0); } catch (BadLocationException ex) { assert false : "BadLocationException must not be thrown here."; } } else { Reader inRead = new InputStreamReader(in); super.read(inRead, desc); } }
| 1,303 |
public static void registerEditorKitForContentType(String type, String classname) { registerMap.put(type, classname); }
|
public static void registerEditorKitForContentType(String type, String classname) { registerEditorKitForContentType(type, classname, Thread.currentThread().getContextClassLoader()); }
| 1,304 |
static final void requestRegister(EmitterContext eContext, X86Register reg) { final X86RegisterPool pool = eContext.getGPRPool(); if (!pool.isFree(reg)) { final Item i = (Item) pool.getOwner(reg); i.spill(eContext, reg); assertCondition(pool.isFree(reg), "register is not free after spill"); } pool.request(reg); }
|
static final void requestRegister(EmitterContext eContext, X86Register reg) { final X86RegisterPool pool = eContext.getGPRPool(); if (!pool.isFree(reg)) { final Item i = (Item) pool.getOwner(reg); i.spill(eContext, reg); assertCondition(pool.isFree(reg), "register is not free after spill"); } pool.request(reg); }
| 1,306 |
public IllegalModeException(String s) { super(s); }
|
public IllegalModeException(String s) { super(s); }
| 1,307 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); DerUtil.checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,308 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); DerUtil.checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,309 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); DerUtil.checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,310 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); DerUtil.checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,311 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); DerUtil.checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,312 |
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
|
public PrivateKey decodePrivateKey(byte[] input) { if (input == null) throw new InvalidParameterException("Input bytes MUST NOT be null"); BigInteger version, p, q, g, x; DERReader der = new DERReader(input); try { DERValue derPKI = der.read(); checkIsConstructed(derPKI, "Wrong PrivateKeyInfo field"); DERValue derVersion = der.read(); if (! (derVersion.getValue() instanceof BigInteger)) throw new InvalidParameterException("Wrong Version field"); version = (BigInteger) derVersion.getValue(); if (version.compareTo(BigInteger.ZERO) != 0) throw new InvalidParameterException("Unexpected Version: " + version); DERValue derAlgoritmID = der.read(); checkIsConstructed(derAlgoritmID, "Wrong AlgorithmIdentifier field"); DERValue derOID = der.read(); OID algOID = (OID) derOID.getValue(); if (! algOID.equals(DSA_ALG_OID)) throw new InvalidParameterException("Unexpected OID: " + algOID); DERValue derParams = der.read(); checkIsConstructed(derParams, "Wrong DSS Parameters field"); DERValue val = der.read(); checkIsBigInteger(val, "Wrong P field"); p = (BigInteger) val.getValue(); val = der.read(); checkIsBigInteger(val, "Wrong Q field"); q = (BigInteger) val.getValue(); val = der.read(); DerUtil.checkIsBigInteger(val, "Wrong G field"); g = (BigInteger) val.getValue(); val = der.read(); byte[] xBytes = (byte[]) val.getValue(); x = new BigInteger(1, xBytes); } catch (IOException e) { InvalidParameterException y = new InvalidParameterException(); y.initCause(e); throw y; } return new DSSPrivateKey(Registry.PKCS8_ENCODING_ID, p, q, g, x); }
| 1,313 |
public int compareTo(BigInteger val) { return compareTo(this, val); }
|
private static int compareTo(BigInteger x, BigInteger y) { return compareTo(this, val); }
| 1,314 |
public int compareTo(BigInteger val) { return compareTo(this, val); }
|
public int compareTo(BigInteger val) { if (x.words == null && y.words == null) return x.ival < y.ival ? -1 : x.ival > y.ival ? 1 : 0; boolean x_negative = x.isNegative(); boolean y_negative = y.isNegative(); if (x_negative != y_negative) return x_negative ? -1 : 1; int x_len = x.words == null ? 1 : x.ival; int y_len = y.words == null ? 1 : y.ival; if (x_len != y_len) return (x_len > y_len) != x_negative ? 1 : -1; return MPN.cmp(x.words, y.words, x_len); }
| 1,315 |
public BigInteger(int signum, byte[] magnitude) { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); }
|
private BigInteger() { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); }
| 1,316 |
public BigInteger(int signum, byte[] magnitude) { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); }
|
public BigInteger(int signum, byte[] magnitude) { if (magnitude == null || signum > 1 || signum < -1) throw new NumberFormatException(); if (signum == 0) { int i; for (i = magnitude.length - 1; i >= 0 && magnitude[i] == 0; --i) ; if (i >= 0) throw new NumberFormatException(); return; } // Magnitude is always positive, so don't ever pass a sign of -1. words = byteArrayToIntArray(magnitude, 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; if (signum < 0) setNegative(); }
| 1,317 |
public DERValue(int tag, Object value) { this(tag, 0, value, null); }
|
public DERValue(int tag, int length, Object value, byte[] encoded) { this(tag, 0, value, null); }
| 1,318 |
public DERValue(int tag, Object value) { this(tag, 0, value, null); }
|
public DERValue(int tag, Object value) { tagClass = tag & 0xC0; this.tag = tag & 0x1F; constructed = (tag & CONSTRUCTED) == CONSTRUCTED; this.length = length; this.value = value; if (encoded != null) this.encoded = (byte[]) encoded.clone(); }
| 1,319 |
public LongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public LongLongSeqHolder() { value = initial_value; typecode.setLength(value.length); }
| 1,322 |
public LongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); }
|
public LongLongSeqHolder(long[] initial_value) { value = initial_value; typecode.setLength(value.length); }
| 1,323 |
private void saveProps() { DefaultMutableTreeNode root = (DefaultMutableTreeNode)tree.getModel().getRoot(); Enumeration e = root.children(); Object child; while (e.hasMoreElements()) { child = e.nextElement(); Object obj = ((DefaultMutableTreeNode)child).getUserObject(); if (obj instanceof AttributesPanel) { ((AttributesPanel)obj).save(); } } try { FileOutputStream out = new FileOutputStream(fileName); props.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} }
|
private void saveProps() { DefaultMutableTreeNode root = (DefaultMutableTreeNode)tree.getModel().getRoot(); Enumeration e = root.children(); Object child; while (e.hasMoreElements()) { child = e.nextElement(); Object obj = ((DefaultMutableTreeNode)child).getUserObject(); if (obj instanceof AttributesPanel) { ((AttributesPanel)obj).save(); } } try { FileOutputStream out = new FileOutputStream(fileName); props.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} }
| 1,324 |
public DefaultMutableTreeNode(Object userObject) { this(userObject, true); }
|
public DefaultMutableTreeNode() { this(userObject, true); }
| 1,325 |
public DefaultMutableTreeNode(Object userObject) { this(userObject, true); }
|
public DefaultMutableTreeNode(Object userObject) { this(null, true); }
| 1,326 |
public _PolicyStub(Delegate delegate) { _set_delegate(delegate); }
|
public _PolicyStub() { _set_delegate(delegate); }
| 1,327 |
public _PolicyStub(Delegate delegate) { _set_delegate(delegate); }
|
public _PolicyStub(Delegate delegate) { }
| 1,328 |
public static ServantActivator read(InputStream input) { throw new MARSHAL(); }
|
public static ServantActivator read(InputStream input) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,329 |
public static void write(OutputStream output, ServantActivator value) { throw new MARSHAL(); }
|
public static void write(OutputStream output, ServantActivator value) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,330 |
public abstract void insert_Object(org.omg.CORBA.Object x);
|
public abstract void insert_Object(org.omg.CORBA.Object x);
| 1,331 |
public ObjID(int num) { objNum = (long)num; space = new UID((short)0);}
|
public ObjID(int num) { objNum = (long)num; space = new UID((short)0);}
| 1,332 |
public UnicastServerRef(ObjID id, int port, RMIServerSocketFactory ssf) { super(id); manager = UnicastConnectionManager.getInstance(port, ssf);}
|
public UnicastServerRef(ObjID id, int port, RMIServerSocketFactory ssf) { super(id); manager = UnicastConnectionManager.getInstance(port, ssf);}
| 1,333 |
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);}
|
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);}
| 1,334 |
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);}
|
public RemoteStub exportObject(Remote obj) throws RemoteException { if (myself == null) { myself = obj; // Save it to server manager, to let client calls in the same VM to issue // local call manager.serverobj = obj; // Find and install the stub Class cls = obj.getClass(); stub = (RemoteStub)getHelperClass(cls, "_Stub"); if (stub == null) { throw new RemoteException("failed to export: " + cls); } // Find and install the skeleton (if there is one) skel = (Skeleton)getHelperClass(cls, "_Skel"); // Build hash of methods which may be called. buildMethodHash(obj.getClass(), true); // Export it. UnicastServer.exportObject(this); } return (stub);}
| 1,335 |
public void write(java.io.OutputStream out) { try { out.write(major & 0xFF); out.write(minor & 0xFF); } catch (IOException ex) { throw new MARSHAL("IOException while writing message header"); } }
|
public void write(java.io.OutputStream out) { try { out.write(major & 0xFF); out.write(minor & 0xFF); } catch (IOException ex) { MARSHAL m = new MARSHAL("IOException while writing message header"); m.minor = Minor.Header; m.initCause(ex); throw m; } }
| 1,336 |
public static Version read_version(java.io.InputStream in) { try { int major = in.read() & 0xFF; int minor = in.read() & 0xFF; return new Version(major, minor); } catch (IOException ex) { throw new MARSHAL("IOException while reading message header"); } }
|
public static Version read_version(java.io.InputStream in) { try { int major = in.read() & 0xFF; int minor = in.read() & 0xFF; return new Version(major, minor); } catch (IOException ex) { MARSHAL m = new MARSHAL("IOException while reading message header"); m.initCause(ex); m.minor = Minor.Header; throw m; } }
| 1,338 |
public int hashCode () { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
|
public int hashCode() { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
| 1,340 |
public int hashCode () { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
|
public int hashCode () { int hash = (negativeSuffix.hashCode() ^ negativePrefix.hashCode() ^positivePrefix.hashCode() ^ positiveSuffix.hashCode()); // FIXME. return hash; }
| 1,341 |
public String[] split(String regex) { return Pattern.compile(regex).split(this, 0); }
|
public String[] split(String regex, int limit) { return Pattern.compile(regex).split(this, 0); }
| 1,342 |
public String[] split(String regex) { return Pattern.compile(regex).split(this, 0); }
|
public String[] split(String regex) { return Pattern.compile(regex).split(this, limit); }
| 1,343 |
protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } }
|
protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } }
| 1,344 |
protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } }
|
protected VmImplementedInterface(VmType vmClass) { if (vmClass == null) { throw new IllegalArgumentException("vmClass cannot be null"); } if (vmClass instanceof VmInterfaceClass) { this.className = vmClass.getName(); this.resolvedClass = (VmInterfaceClass)vmClass; } else { throw new IllegalArgumentException("vmClass must be an interface class"); } }
| 1,345 |
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
|
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
| 1,346 |
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
|
addNotify(){ if (getPeer() == null) setPeer(getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
| 1,347 |
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
|
addNotify(){ if (getPeer() == null) setPeer((MenuComponentPeer)getToolkit().createMenuBar(this)); Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu)e.nextElement(); mi.addNotify(); } if (helpMenu != null) { helpMenu.addNotify(); ((MenuBarPeer) peer).addHelpMenu(helpMenu); }}
| 1,348 |
protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; }
|
protected String paramString() { if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; }
| 1,349 |
protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; }
|
protected String paramString() { String param = super.paramString(); if (layoutMgr != null) return super.paramString(); return param; }
| 1,350 |
protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); return param; }
|
protected String paramString() { String param = super.paramString(); if (layoutMgr != null) param = param + ",layout=" + layoutMgr.getClass().getName(); StringBuffer sb = new StringBuffer(); sb.append(super.paramString()); sb.append(",layout="); sb.append(layoutMgr.getClass().getName()); return sb.toString(); }
| 1,351 |
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
|
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
| 1,352 |
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
|
remove(MenuComponent menu){ int index = menus.indexOf(menu); if (index == -1) return; remove(index);}
| 1,353 |
removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();}
|
removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();}
| 1,354 |
removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();}
|
removeNotify(){ Enumeration e = menus.elements(); while (e.hasMoreElements()) { Menu mi = (Menu) e.nextElement(); mi.removeNotify(); } super.removeNotify();}
| 1,355 |
public static POA read(InputStream input) { throw new MARSHAL("Not applicable"); }
|
public static POA read(InputStream input) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,356 |
public static void write(OutputStream output, POA value) { throw new MARSHAL("Not applicable"); }
|
public static void write(OutputStream output, POA value) { MARSHAL m = new MARSHAL("Inappropriate"); m.minor = Minor.Inappropriate; throw m; }
| 1,357 |
public static Border getButtonBorder() { Border outer = new MetalButtonBorder(); Border inner = getMarginBorder(); return new BorderUIResource.CompoundBorderUIResource(outer, inner); }
|
public static Border getButtonBorder() { Border outer = new MetalButtonBorder(); Border inner = getMarginBorder(); buttonBorder = new BorderUIResource.CompoundBorderUIResource (outer, inner); } return buttonBorder; }
| 1,358 |
static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; }
|
static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; }
| 1,359 |
static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; }
|
static Border getMarginBorder() // intentionally not public { /* Swing is not designed to be thread-safe, so there is no * need to synchronize the access to the global variable. */ if (sharedMarginBorder == null) sharedMarginBorder = new BasicBorders.MarginBorder(); return sharedMarginBorder; }
| 1,360 |
public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ }
|
public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ }
| 1,361 |
public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ }
|
public void paintBorder (Component c, Graphics g, int x, int y, int width, int height) { /* A previous version of Classpath had emitted a warning when * this method was called. The warning was removed because it is * perfectly legal for a subclass to not override the paintBorder * method. An example would be EmptyBorder. */ }
| 1,362 |
public JarFile(File file) throws FileNotFoundException, IOException { this(file, true); }
|
public JarFile(String fileName) throws FileNotFoundException, IOException { this(file, true); }
| 1,363 |
public JarFile(File file) throws FileNotFoundException, IOException { this(file, true); }
|
public JarFile(File file) throws FileNotFoundException, IOException { this(file, true); }
| 1,364 |
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); }
|
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); }
| 1,365 |
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); }
|
public void connect() { String proxyPort = "1080"; // default socks proxy port boolean enhanced = false; boolean support132 = false; int port = 23; // default telnet port enhanced = sesProps.containsKey(SESSION_TN_ENHANCED); if (sesProps.containsKey(SESSION_SCREEN_SIZE)) if (((String)sesProps.getProperty(SESSION_SCREEN_SIZE)).equals(SCREEN_SIZE_27X132_STR)) support132 = true; final tnvt vt = new tnvt(screen,enhanced,support132); setVT(vt); vt.setController(this); if (sesProps.containsKey(SESSION_PROXY_PORT)) proxyPort = (String)sesProps.getProperty(SESSION_PROXY_PORT); if (sesProps.containsKey(SESSION_PROXY_HOST)) vt.setProxy((String)sesProps.getProperty(SESSION_PROXY_HOST), proxyPort); if (sesProps.containsKey(org.tn5250j.transport.SSLConstants.SSL_TYPE)) { sslType = (String)sesProps.getProperty(org.tn5250j.transport.SSLConstants.SSL_TYPE); } else { // set default to none sslType = org.tn5250j.transport.SSLConstants.SSL_TYPE_NONE; } vt.setSSLType(sslType); if (sesProps.containsKey(SESSION_CODE_PAGE)) vt.setCodePage((String)sesProps.getProperty(SESSION_CODE_PAGE)); if (sesProps.containsKey(SESSION_DEVICE_NAME)) vt.setDeviceName((String)sesProps.getProperty(SESSION_DEVICE_NAME)); if (sesProps.containsKey(SESSION_HOST_PORT)) { port = Integer.parseInt((String)sesProps.getProperty(SESSION_HOST_PORT)); } else { // set to default 23 of telnet port = 23; } final String ses = (String)sesProps.getProperty(SESSION_HOST); final int portp = port; // lets set this puppy up to connect within its own thread Runnable connectIt = new Runnable() { public void run() { vt.connect(ses,portp); } }; // now lets set it to connect within its own daemon thread // this seems to work better and is more responsive than using // swingutilities's invokelater Thread ct = new Thread(connectIt); ct.setDaemon(true); ct.start(); addSessionListener(this); }
| 1,366 |
public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
|
public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
| 1,367 |
public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
|
public void draw3DRect(int x, int y, int width, int height, boolean raised){ Color color = getColor(); Color tl = color.brighter(); Color br = color.darker(); if (!raised) { Color tmp = tl; tl = br; br = tmp; } int x1 = x; int y1 = y; int x2 = x + width; int y2 = y + height; setColor(tl); drawLine(x1, y1, x2, y1); drawLine(x1, y2, x1, y1); setColor(br); drawLine(x2, y1, x2, y2); drawLine(x2, y2, x1, y2); setColor(color);}
| 1,368 |
public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
|
public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
| 1,369 |
public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
|
public void drawBytes(byte[] data, int offset, int length, int x, int y){ String str = new String(data, offset, length); drawString(str, x, y);}
| 1,370 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.