rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public Area(Shape s) | public Area() | public Area(Shape s) { } |
solids = new Vector(); holes = new Vector(); | public Area(Shape s) { } | |
throw new Error("not implemented"); | for (int i = 0; i < solids.size(); i++) ((Segment) solids.elementAt(i)).transformSegmentList(at); for (int i = 0; i < holes.size(); i++) ((Segment) holes.elementAt(i)).transformSegmentList(at); if ((at.getType() & AffineTransform.TYPE_FLIP) != 0) { setDirection(holes, false); setDirection(solids, true); | public void transform(AffineTransform at) { // XXX Implement. throw new Error("not implemented"); } |
} | public void transform(AffineTransform at) { // XXX Implement. throw new Error("not implemented"); } | |
throw new Error("not implemented"); | int n = 0; for (int i = 0; i < solids.size(); i++) if (((Segment) solids.elementAt(i)).contains(x, y)) n++; for (int i = 0; i < holes.size(); i++) if (((Segment) holes.elementAt(i)).contains(x, y)) n--; return (n != 0); | public boolean contains(double x, double y) { // XXX Implement. throw new Error("not implemented"); } |
public boolean equals(Object obj) { if (obj instanceof UID) { UID uid = (UID)obj; if (this.unique == uid.unique && this.time == uid.time && this.count == uid.count) { return (true); } } return (false); } | public boolean equals(Object other) { if (other instanceof UID) { UID ui = (UID) other; return unique == ui.unique && time == ui.time && count == ui.count; } else return false; } | public boolean equals(Object obj) { if (obj instanceof UID) { UID uid = (UID)obj; if (this.unique == uid.unique && this.time == uid.time && this.count == uid.count) { return (true); } } return (false);} |
public int hashCode() { return (unique); } | public int hashCode() { return (int) (unique ^ time ^ machineId); } | public int hashCode() { return (unique);} |
sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus(); | private void nextSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index < sessionPane.getTabCount() - 1) { sessionPane.setSelectedIndex(++index); sessionPane.setForegroundAt(index,Co... | |
sessionPane.getComponent(sessionPane.getSelectedIndex()).requestFocus(); | private void prevSession() { int index = sessionPane.getSelectedIndex(); sessionPane.setForegroundAt(index,Color.black); sessionPane.setIconAt(index,unfocused); if (index == 0) { sessionPane.setSelectedIndex(sessionPane.getTabCount() - 1); sessionPane.setForegroundAt(sessionPane.g... | |
} | private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); words = byteArrayToIntArray(magnitude, signum < 0 ? -1 : 0); BigInteger result = make(words, words.length); this.ival = result.ival; this.words = result.words; } | |
if (top == 0 && words == null) return 0; | public int signum() { int top = words == null ? ival : words[ival-1]; if (top == 0 && words == null) return 0; return top < 0 ? -1 : 1; } | |
magnitude = toByteArray(); | magnitude = signum == 0 ? new byte[0] : toByteArray(); | private void writeObject(ObjectOutputStream s) throws IOException, ClassNotFoundException { signum = signum(); magnitude = toByteArray(); s.defaultWriteObject(); } |
public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { | public EmulatorAction(Session session, String name) { | public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { this(session,name); setKeyStroke(name, ks, keyMap); } |
this(session,name); setKeyStroke(name, ks, keyMap); | super(name); this.session = session; | public EmulatorAction(Session session, String name, KeyStroke ks, KeyMapper keyMap) { this(session,name); setKeyStroke(name, ks, keyMap); } |
final Collection devs = dm.getDevices(); | final Collection devs = new ArrayList(dm.getDevices()); | protected void startPlugin() throws PluginException { try { final DeviceManager dm = DeviceUtils.getDeviceManager(); dm.addListener(this); final Collection devs = dm.getDevices(); for (Iterator i = devs.iterator(); i.hasNext();) { addListeners((Devic... |
} else if (readObj instanceof DelimitedXMLDataIOStyle || readObj instanceof TaggedXMLDataIOStyle ) { throw new SAXException("Cant parse delimited or tagged data from external file (yet)."); } | } | public Object action (SaxDocumentHandler handler, Attributes attrs) throws SAXException { // we only need to do these things for the first time we enter // a data node if (DataNodeLevel == 0) { // A little 'pre-handling' as href is a specialattribute ... |
Log.errorln("Cant understand class of data !(Double|Integer|String). Ignoring append."); | Log.errorln("Dont understand this class of data !(Double|Integer|String). Ignoring append."); | public Array appendArrayToArray ( Array arrayToAppendTo, Array arrayToAdd ) { if (arrayToAppendTo != null) { List origAxisList = arrayToAppendTo.getAxes(); List addAxisList = arrayToAdd.getAxes(); Hashtable correspondingAddAxis = ne... |
ActionEvent event = new ActionEvent(this, 0, getText()); | ActionEvent event = new ActionEvent(this, 0, actionCommand == null ? getText() : actionCommand); | protected void fireActionPerformed() { ActionEvent event = new ActionEvent(this, 0, getText()); ActionListener[] listeners = getActionListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].actionPerformed(event); } |
focusColor = getFocusColor(); selectColor = getSelectColor(); disabledTextColor = getDisabledTextColor(); | public MetalButtonUI() { super(); } | |
public static void main(String[] args) throws NoSuchAliasException, NameNotFoundException { | public static void main(String[] args) throws NoSuchAliasException, NameNotFoundException, SyntaxErrorException { | public static void main(String[] args) throws NoSuchAliasException, NameNotFoundException { ParsedArguments cmdLine = HELP_INFO.parse(args); final Shell shell = ShellUtils.getShellManager().getCurrentShell(); final AliasManager aliasMgr = shell.getAliasManager(); if (cmdLine.size() == 0) { for (Iterator i = alia... |
throw new InstantiationException(ex1.getTargetException()); | final InstantiationException ie = new InstantiationException(); ie.initCause(ex1.getTargetException()); throw ie; | private DeviceToDriverMapper newMapperInstance(Class cls, ConfigurationElement element) throws InstantiationException, IllegalAccessException { try { final Constructor c = cls.getConstructor(new Class[] { ConfigurationElement.class }); try { return (DeviceToDriverMapper)c... |
if (view != null) | public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { view.changedUpdate(ev, shape, vf); } | |
{ | { float span = 10; | public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; } |
return view.getPreferredSpan(axis); return Integer.MAX_VALUE; } | span = view.getPreferredSpan(axis); return span; } | public float getPreferredSpan(int axis) { if (view != null) return view.getPreferredSpan(axis); return Integer.MAX_VALUE; } |
if (view != null) | public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { view.insertUpdate(ev, shape, vf); } | |
Rectangle b = s.getBounds(); view.setSize(b.width, b.height); | Rectangle b = s instanceof Rectangle ? (Rectangle) s : s.getBounds(); setSize(b.width, b.height); | public void paint(Graphics g, Shape s) { if (view != null) { Rectangle b = s.getBounds(); view.setSize(b.width, b.height); view.paint(g, s); } } |
if (view != null) | public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf) { view.removeUpdate(ev, shape, vf); } | |
public void setSize(float w, float h) | public synchronized void setSize(float w, float h) | public void setSize(float w, float h) { if (view != null) view.setSize(w, h); } |
if (kit == null) kit = new DefaultEditorKit(); | public EditorKit getEditorKit(JTextComponent t) { return kit; } | |
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); | Dimension d = new Dimension(); Insets i = c.getInsets(); Document doc = textComponent.getDocument(); if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { d.width = (int) Math.min((long) rootView.getMaximumSpan(View.X_AXIS) + i.left + i.right, Integer.MAX_VALUE); d.height = (int) Math.min((... | public Dimension getMaximumSize(JComponent c) { // Sun's implementation returns Integer.MAX_VALUE here, so do we. return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); } |
return new Dimension(i.left + i.right, i.top + i.bottom); | d.width += i.left + i.right; d.height += i.top + i.bottom; return d; | public Dimension getMinimumSize(JComponent c) { Insets i = c.getInsets(); return new Dimension(i.left + i.right, i.top + i.bottom); } |
return rootView.getNextVisualPositionFrom(pos, b, getVisibleEditorRect(), | int offset = -1; Document doc = textComponent.getDocument(); if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { Rectangle alloc = getVisibleEditorRect(); if (alloc != null) { rootView.setSize(alloc.width, alloc.height); offset = rootView.getNextVisualPositionFrom(pos, b, alloc, | public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { // A comment in the spec of NavigationFilter.getNextVisualPositionFrom() // sugge... |
} finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } return offset; } | public int getNextVisualPositionFrom(JTextComponent t, int pos, Position.Bias b, int direction, Position.Bias[] biasRet) throws BadLocationException { // A comment in the spec of NavigationFilter.getNextVisualPositionFrom() // sugge... | |
float w = rootView.getPreferredSpan(View.X_AXIS); float h = rootView.getPreferredSpan(View.Y_AXIS); | else { rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE); } w = rootView.getPreferredSpan(View.X_AXIS); h = rootView.getPreferredSpan(View.Y_AXIS); } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } | public Dimension getPreferredSize(JComponent c) { Dimension d = c.getSize(); Insets i = c.getInsets(); if (d.width > (i.left + i.right) && d.height > (i.top + i.bottom)) { rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom); } float w = rootV... |
Insets insets = textComponent.getInsets(); | Insets insets = textComponent.getInsets(cachedInsets); | protected Rectangle getVisibleEditorRect() { int width = textComponent.getWidth(); int height = textComponent.getHeight(); // Return null if the component has no valid size. if (width <= 0 || height <= 0) return null; Insets insets = textComponent.getInsets(); return new Rectangle(insets.left... |
textComponent.setMargin(UIManager.getInsets(prefix + ".margin")); | protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi... | |
color = UIManager.getColor(prefix + ".inactiveBackground"); | color = UIManager.getColor(prefix + ".inactiveForeground"); | protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi... |
Caret caret = textComponent.getCaret(); if (caret == null || caret instanceof UIResource) { caret = createCaret(); textComponent.setCaret(caret); caret.setBlinkRate(UIManager.getInt(prefix + ".caretBlinkRate")); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null || highlighter instance... | protected void installDefaults() { String prefix = getPropertyPrefix(); // Install the standard properties. LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefi... | |
textComponent.addFocusListener(focuslistener); | if (SystemProperties.getProperty("gnu.swing.text.no-xlike-clipboard") == null) { if (focusListener == null) focusListener = new FocusHandler(); textComponent.addFocusListener(focusListener); } | protected void installListeners() { textComponent.addFocusListener(focuslistener); } |
textComponent.addPropertyChangeListener(updateHandler); | installFixedDefaults(); if (handler == null) handler = new Handler(); textComponent.addPropertyChangeListener(handler); | public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); textComponent.addPropertyChangeListener(updateHandler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDoc... |
doc.addDocumentListener(documentHandler); | doc.addDocumentListener(handler); | public void installUI(final JComponent c) { textComponent = (JTextComponent) c; installDefaults(); textComponent.addPropertyChangeListener(updateHandler); Document doc = textComponent.getDocument(); if (doc == null) { doc = getEditorKit(textComponent).createDefaultDocument(); textComponent.setDoc... |
if (textComponent.getCaretColor() instanceof UIResource) textComponent.setCaretColor(null); if (textComponent.getSelectionColor() instanceof UIResource) textComponent.setSelectionColor(null); if (textComponent.getDisabledTextColor() instanceof UIResource) textComponent.setDisabledTextColor(null); if (textComponent.getS... | protected void uninstallDefaults() { // Do nothing here. } | |
textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); | if (focusListener != null) textComponent.removeFocusListener(focusListener); | protected void uninstallListeners() { textComponent.removeFocusListener(focuslistener); textComponent.getDocument().removeDocumentListener(documentHandler); } |
super.uninstallUI(component); | textComponent.removePropertyChangeListener(handler); textComponent.getDocument().removeDocumentListener(handler); | public void uninstallUI(final JComponent component) { super.uninstallUI(component); rootView.setView(null); uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); textComponent = null; } |
uninstallFixedDefaults(); | public void uninstallUI(final JComponent component) { super.uninstallUI(component); rootView.setView(null); uninstallDefaults(); uninstallListeners(); uninstallKeyboardActions(); textComponent = null; } | |
writeOut(outputstream, valueListInfinite); | doValuePrint (outputstream, specialValue, valueListInfinite); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
writeOut(outputstream, valueListInfiniteNegative); | doValuePrint (outputstream, specialValue, valueListInfiniteNegative); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
writeOut(outputstream, valueListNoData); | doValuePrint (outputstream, specialValue, valueListNoData); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
writeOut(outputstream, valueListNotANumber); | doValuePrint (outputstream, specialValue, valueListNotANumber); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
writeOut(outputstream, valueListUnderflow); | doValuePrint (outputstream, specialValue, valueListUnderflow); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
writeOut(outputstream, valueListOverflow); } else { Log.errorln("Error: valueList doesnt have "+specialValue+" defined but value does. Ignoring value."); | doValuePrint (outputstream, specialValue, valueListOverflow); | public void toXMLOutputStream (OutputStream outputstream, String indent) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) writeOut(outputstream, indent); // indent node if desired // no need to have repeatable set to 'yes' would just waste space even if we used ... |
if (!sigId.equals(cert.getSigAlgOID())) | if (!sigId.toString().equals(cert.getSigAlgOID())) | public boolean match(Certificate certificate) { if (!(certificate instanceof X509Certificate)) return false; X509Certificate cert = (X509Certificate) certificate; if (this.cert != null) { try { byte[] e1 = this.cert.getEncoded(); byte[] e2 = cert.getEncoded();... |
if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) | if (e.getPropertyName().equals("enabled")) | protected PropertyChangeListener createActionPropertyChangeListener(Action a) { return new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) setE... |
if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) | if (e.getPropertyName().equals("enabled")) | public void propertyChange(PropertyChangeEvent e) { Action act = (Action) (e.getSource()); if (e.getPropertyName().equals(AbstractAction.ENABLED_PROPERTY)) setEnabled(act.isEnabled()); else if (e.getPropertyName().equals(Action.NAME)) setText((String)(act.getValue(Action.NAME... |
public void fireActionPerformed(ActionEvent e) | protected void fireActionPerformed(ActionEvent e) | public void fireActionPerformed(ActionEvent e) { e.setSource(this); ActionListener[] listeners = getActionListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].actionPerformed(e); } |
public void fireItemStateChanged(ItemEvent e) | protected void fireItemStateChanged(ItemEvent e) | public void fireItemStateChanged(ItemEvent e) { e.setSource(this); ItemListener[] listeners = getItemListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].itemStateChanged(e); } |
public void fireStateChanged() | protected void fireStateChanged() | public void fireStateChanged() { ChangeListener[] listeners = getChangeListeners(); for (int i = 0; i < listeners.length; i++) listeners[i].stateChanged(changeEvent); } |
return "AbstractButton"; | StringBuffer sb = new StringBuffer(); sb.append(super.paramString()); sb.append(",defaultIcon="); if (getIcon() != null) sb.append(getIcon()); sb.append(",disabledIcon="); if (getDisabledIcon() != null) sb.append(getDisabledIcon()); sb.append(",disabledSelectedIcon="); if (getDisabledSelectedIcon() != null) sb.append(g... | protected String paramString() { return "AbstractButton"; } |
if (!signedOn) { signedOn = true; signOnSave = screen52.getScreenAsChars(); System.out.println("Signon saved"); } | public void run () { while (keepTrucking) { try { bk = (Stream5250)dsq.get(); } catch (InterruptedException ie) { System.out.println(" vt thread interrupted and stopping "); keepTrucking = false; continue; } // lets play nicel... | |
if (view.isStikeThrough()) | if (view.isStrikeThrough()) | public void paint(GlyphView view, Graphics g, Shape a, int p0, int p1) { Color oldColor = g.getColor(); int height = (int) getHeight(view); Segment txt = view.getText(p0, p1); Rectangle bounds = a.getBounds(); TabExpander tabEx = null; View parent = view.getPare... |
int breakLocation = painter.getBoundedPosition(this, p0, pos, len); | public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break... | |
getDocument().getText(getStartOffset(), getEndOffset(), txt); | int start = getStartOffset(); int length = getEndOffset() - start; getDocument().getText(start, length, txt); | public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break... |
lineBreaker.setText(txt); int goodBreakLocation = lineBreaker.previous(); if (goodBreakLocation != BreakIterator.DONE) breakLocation = goodBreakLocation; | int breakLocation = Utilities.getBreakLocation(txt, getContainer().getFontMetrics(getFont()), (int) pos, (int) (pos + len), getTabExpander(), p0); | public View breakView(int axis, int p0, float pos, float len) { if (axis == Y_AXIS) return this; checkPainter(); GlyphPainter painter = getGlyphPainter(); int breakLocation = painter.getBoundedPosition(this, p0, pos, len); // Try to find a suitable line break. BreakIterator lineBreaker = Break... |
getParent().preferenceChanged(this, true, true); | preferenceChanged(this, true, true); | public void changedUpdate(DocumentEvent e, Shape a, ViewFactory vf) { getParent().preferenceChanged(this, true, true); } |
getGlyphPainter().paint(this, g, a, el.getStartOffset(), el.getEndOffset()); | getGlyphPainter().paint(this, g, a, getStartOffset(), getEndOffset()); | public void paint(Graphics g, Shape a) { Element el = getElement(); checkPainter(); getGlyphPainter().paint(this, g, a, el.getStartOffset(), el.getEndOffset()); } |
getParent().preferenceChanged(this, true, false); | preferenceChanged(this, true, false); | public void removeUpdate(DocumentEvent e, Shape a, ViewFactory vf) { getParent().preferenceChanged(this, true, false); } |
int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); | int max = ((orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight()) - getDividerSize(); | public void setDividerLocation(double proportionalLocation) { if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException ("proportion has to be between 0 and 1."); int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); setDividerLocation((int) (... |
editor = new JTextField(); | public MetalComboBoxEditor() { super(); editor = new JTextField(); editor.setBorder(new MetalComboBoxEditorBorder()); } | |
_interpreter.set("session",session); | _interpreter.set("_session",session); | public void executeScript(Session session, String script) throws InterpreterDriver.InterpreterException { try { session.setMacroRunning(true); _interpreter.set("session",session); _interpreter.exec(script); session.setMacroRunning(false); } catch (PyException ex... |
_interpreter.set("session",s1); | _interpreter = new PythonInterpreter(); _interpreter.set("_session",s1); | public void executeScriptFile(Session session, String scriptFile) throws InterpreterDriver.InterpreterException { try { final Session s1 = session; final String s2 = scriptFile; s1.setMacroRunning(true); Runnable interpretIt = new Runnable() { public v... |
_interpreter.set("session",s1); | _interpreter = new PythonInterpreter(); _interpreter.set("_session",s1); | public void run() { _interpreter.set("session",s1); _interpreter.execfile(s2); } |
System.out.println("getNewVariable(): " + variable); | public Variable getNewVariable() { count += 1; System.out.println("getNewVariable(): " + variable); Variable var = (Variable) variable.clone(); var.setSSAValue(count); stack.add(var); System.out.println("getNewVariable(): " + var); return var; } | |
System.out.println("getNewVariable(): " + var); | public Variable getNewVariable() { count += 1; System.out.println("getNewVariable(): " + variable); Variable var = (Variable) variable.clone(); var.setSSAValue(count); stack.add(var); System.out.println("getNewVariable(): " + var); return var; } | |
System.out.println("peek(): " + variable); | public Variable peek() { System.out.println("peek(): " + variable); int n = stack.size(); // TODO don't know if this right, but it avoids exceptions for certain // rewritePhiParams calls if (n <= 0) { return null; } Variable var = (Variable) stack.get(n - 1); System.out.println("peek(): " + var); return var... | |
return null; | if (variable instanceof MethodArgument) { return variable; } else { return null; } | public Variable peek() { System.out.println("peek(): " + variable); int n = stack.size(); // TODO don't know if this right, but it avoids exceptions for certain // rewritePhiParams calls if (n <= 0) { return null; } Variable var = (Variable) stack.get(n - 1); System.out.println("peek(): " + var); return var... |
System.out.println("peek(): " + var); | public Variable peek() { System.out.println("peek(): " + variable); int n = stack.size(); // TODO don't know if this right, but it avoids exceptions for certain // rewritePhiParams calls if (n <= 0) { return null; } Variable var = (Variable) stack.get(n - 1); System.out.println("peek(): " + var); return var... | |
System.out.println("pop(): " + var); | public Variable pop() { Variable var = (Variable) stack.remove(stack.size() - 1); System.out.println("pop(): " + var); return var; } | |
SwingUtilities.calculateInnerArea(b, vr); | if (b.isBorderPainted()) SwingUtilities.calculateInnerArea(b, vr); else vr = SwingUtilities.getLocalBounds(b); | public void paint(Graphics g, JComponent c) { AbstractButton b = (AbstractButton) c; Rectangle tr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle vr = new Rectangle(); Font f = c.getFont(); g.setFont(f); SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities... |
if (b.getFont() instanceof UIResource) b.setFont(null); | protected void uninstallDefaults(AbstractButton b) { b.setForeground(null); b.setBackground(null); b.setBorder(null); b.setIconTextGap(defaultTextIconGap); b.setMargin(null); } | |
paintHighlight(g, r1); | r0.width = r1.x + r1.width - 1; paintHighlight(g, r0); | public void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c) { Rectangle r0 = null; Rectangle r1 = null; Rectangle rect = bounds.getBounds(); try { r0 = c.modelToView(p0); r1 = c.modelToView(p1); } catch (BadLocationException e) { // This should... |
textComponent.getUI().damageRange(textComponent, p0, p1); | public Object addHighlight(int p0, int p1, Highlighter.HighlightPainter painter) throws BadLocationException { checkPositions(p0, p1); HighlightEntry entry = new HighlightEntry(p0, p1, painter); highlights.add(entry); return entry; } | |
public void changeHighlight(Object tag, int p0, int p1) | public void changeHighlight(Object tag, int n0, int n1) | public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException { checkPositions(p0, p1); HighlightEntry entry = (HighlightEntry) tag; entry.p0 = p0; entry.p1 = p1; } |
checkPositions(p0, p1); | int o0, o1; checkPositions(n0, n1); | public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException { checkPositions(p0, p1); HighlightEntry entry = (HighlightEntry) tag; entry.p0 = p0; entry.p1 = p1; } |
entry.p0 = p0; entry.p1 = p1; | o0 = entry.p0; o1 = entry.p1; if (o0 == n0 && o1 == n1) return; entry.p0 = n0; entry.p1 = n1; TextUI ui = textComponent.getUI(); if (n0 == n1) ui.damageRange(textComponent, o0, o1); else if ((o1 > n0 && o1 <= n1) || (n1 > o0 && n1 <= o1)) { int fds, sds; int fde, sde; if(o0 < n0) { fds = o0; fde = n0; } el... | public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException { checkPositions(p0, p1); HighlightEntry entry = (HighlightEntry) tag; entry.p0 = p0; entry.p1 = p1; } |
return null; | return (Highlighter.Highlight[]) highlights.toArray(new Highlighter.Highlight[highlights.size()]); | public Highlighter.Highlight[] getHighlights() { return null; } |
if (highlights.size() == 0) | if (size == 0) | public void paint(Graphics g) { // Check if there are any highlights. if (highlights.size() == 0) return; Shape bounds = textComponent.getBounds(); for (int index = 0; index < highlights.size(); ++index) { HighlightEntry entry = (HighlightEntry) highlights.get(index); entry.painter.pain... |
Shape bounds = textComponent.getBounds(); | Insets insets = textComponent.getInsets(); Shape bounds = new Rectangle(insets.left, insets.top, textComponent.getWidth() - insets.left - insets.right, textComponent.getHeight() - insets.top - insets.bottom); | public void paint(Graphics g) { // Check if there are any highlights. if (highlights.size() == 0) return; Shape bounds = textComponent.getBounds(); for (int index = 0; index < highlights.size(); ++index) { HighlightEntry entry = (HighlightEntry) highlights.get(index); entry.painter.pain... |
for (int index = 0; index < highlights.size(); ++index) | for (int index = 0; index < size; ++index) | public void paint(Graphics g) { // Check if there are any highlights. if (highlights.size() == 0) return; Shape bounds = textComponent.getBounds(); for (int index = 0; index < highlights.size(); ++index) { HighlightEntry entry = (HighlightEntry) highlights.get(index); entry.painter.pain... |
HighlightEntry entry = (HighlightEntry) tag; textComponent.getUI().damageRange(textComponent, entry.p0, entry.p1); | public void removeHighlight(Object tag) { highlights.remove(tag); } | |
if (sPrettyXDFOutput) { | if (Specification.getInstance().isPrettyXDFOutput()) { | private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { //base condition if (which > stop) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } synchronized (formatCommandList) { int end = fo... |
nestedToXDF(outputstream, indent + sPrettyXDFOutputIndentation, which, stop); | nestedToXDF(outputstream, indent + Specification.getInstance().getPrettyXDFOutputIndentation(), which, stop); | private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { //base condition if (which > stop) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } synchronized (formatCommandList) { int end = fo... |
if (sPrettyXDFOutput) { | if (Specification.getInstance().isPrettyXDFOutput()) { | protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { //write out nodes in formatCommandList synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NE... |
bad.minor = Minor.Any; | public static TaggedComponent extract(Any any) { try { return ((TaggedComponentHolder) any.extract_Streamable()).value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("TaggedComponent expected"); bad.initCause(cex); throw bad; } } | |
return Class.forName(cn); | c = forName(cn); m_classes.put(IDL, c); return c; | public static Class Idl2class(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); String cn = s.replace('/', '.'); try { return Class.forN... |
} } | public static Class Idl2class(String IDL) { String s = IDL; int a = s.indexOf(':') + 1; int b = s.lastIndexOf(':'); s = IDL.substring(a, b); if (s.startsWith(OMG_PREFIX)) s = JAVA_PREFIX + s.substring(OMG_PREFIX.length()); String cn = s.replace('/', '.'); try { return Class.forN... | |
return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance(); | return known.newInstance(); | public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance(); } catch (Exception ex) { try { return Class.forName(toClassName(CLASSPATH_PREFIX, idl) ... |
return Class.forName(toClassName(CLASSPATH_PREFIX, idl) + suffix) .newInstance(); | known = forName(toClassName(JAVA_PREFIX, idl) + suffix); object = known.newInstance(); } catch (Exception ex) { try { known = forName(toClassName(CLASSPATH_PREFIX, idl) + suffix); object = known.newInstance(); | public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance(); } catch (Exception ex) { try { return Class.forName(toClassName(CLASSPATH_PREFIX, idl) ... |
m_classes.put(idl + 0xff + suffix, known); return object; } } | public static java.lang.Object createObject(String idl, String suffix) { try { return Class.forName(toClassName(JAVA_PREFIX, idl) + suffix) .newInstance(); } catch (Exception ex) { try { return Class.forName(toClassName(CLASSPATH_PREFIX, idl) ... | |
String m_exception_id = toIDL(exception.getClass().getName()); | String m_exception_id = getRepositoryId(exception.getClass()); | public static boolean insertSysException(Any into, SystemException exception) { try { cdrBufOutput output = new cdrBufOutput(); String m_exception_id = toIDL(exception.getClass().getName()); output.write_string(m_exception_id); output.write_ulong(exception.minor); Completio... |
protected abstract WritableRaster getDestinationRaster(); | protected WritableRaster getDestinationRaster() { Rectangle db = getDeviceBounds(); if (destinationRaster == null) { int[] bandMasks = new int[]{ 0xFF0000, 0xFF00, 0xFF }; destinationRaster = Raster.createPackedRaster(DataBuffer.TYPE_INT, db.width, db.height, bandMasks, null); int x0 = destinationRaster.getMinX(); i... | protected abstract WritableRaster getDestinationRaster(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.