rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public ClassCastException(String s) | public ClassCastException() | public ClassCastException(String s) { super(s); } |
super(s); | public ClassCastException(String s) { super(s); } | |
public NoClassDefFoundError(String s) { super(s); | public NoClassDefFoundError() { | public NoClassDefFoundError(String s) { super(s); } |
public final VmField getField(VmConstFieldRef fieldRef) { return getField(fieldRef.getName(), fieldRef.getSignature()); | public final VmField getField(String name, String signature) { VmField f = getDeclaredField(name, signature); if (f != null) { return f; } if (superClass != null) { f = superClass.getField(name, signature); if (f != null) { return f; } } final int cnt = getNoInterfaces(); for (int i = 0; i < cnt; i++) { f = allInterfac... | public final VmField getField(VmConstFieldRef fieldRef) { return getField(fieldRef.getName(), fieldRef.getSignature()); } |
public ArithmeticException(String s) { super(s); | public ArithmeticException() { | public ArithmeticException(String s) { super(s); } |
CopyOfNode(TemplateNode children, TemplateNode next, Expr select) | CopyOfNode(Expr select) | CopyOfNode(TemplateNode children, TemplateNode next, Expr select) { super(children, next); this.select = select; } |
super(children, next); | CopyOfNode(TemplateNode children, TemplateNode next, Expr select) { super(children, next); this.select = select; } | |
return new CopyOfNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), select.clone(stylesheet)); | TemplateNode ret = new CopyOfNode(select.clone(stylesheet)); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; | TemplateNode clone(Stylesheet stylesheet) { return new CopyOfNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), select.clone(stylesheet)); } |
public abstract Object evaluate(Node context, int pos, int len); | public Object evaluate(Object item, QName returnType) throws XPathExpressionException { Object ret = null; Node context = null; if (item instanceof Node) { context = (Node) item; ret = evaluate(context, 1, 1); if (XPathConstants.STRING == returnType && !(ret instanceof String)) { ret = _string(context, ret); } else if ... | public abstract Object evaluate(Node context, int pos, int len); |
public static <T> void sort(List<T> l, Comparator<? super T> c) | public static <T extends Comparable<? super T>> void sort(List<T> l) | public static <T> void sort(List<T> l, Comparator<? super T> c) { T[] a = (T[]) l.toArray(); Arrays.sort(a, c); ListIterator<T> i = l.listIterator(); for (int pos = 0, alen = a.length; pos < alen; pos++) { i.next(); i.set(a[pos]); } } |
T[] a = (T[]) l.toArray(); Arrays.sort(a, c); ListIterator<T> i = l.listIterator(); for (int pos = 0, alen = a.length; pos < alen; pos++) { i.next(); i.set(a[pos]); } | sort(l, null); | public static <T> void sort(List<T> l, Comparator<? super T> c) { T[] a = (T[]) l.toArray(); Arrays.sort(a, c); ListIterator<T> i = l.listIterator(); for (int pos = 0, alen = a.length; pos < alen; pos++) { i.next(); i.set(a[pos]); } } |
public static String getEncodingOfClass(Class clazz) | public static String getEncodingOfClass(String type, boolean descriptor) | public static String getEncodingOfClass(Class clazz) { return getEncodingOfClass(clazz.getName(), true); } |
return getEncodingOfClass(clazz.getName(), true); | if (! descriptor || type.charAt(0) == '[') return type.replace('.', '/'); if (type.equals("boolean")) return "Z"; if (type.equals("byte")) return "B"; if (type.equals("short")) return "S"; if (type.equals("char")) return "C"; if (type.equals("int")) return "I"; if (type.equals("long")) return "J"; if (type.equals("floa... | public static String getEncodingOfClass(Class clazz) { return getEncodingOfClass(clazz.getName(), true); } |
Provider p[] = Security.getProviders(); | Provider[] p = Security.getProviders(); | public SecureRandom() { Provider p[] = Security.getProviders(); //Format of Key: SecureRandom.algname String key; String classname = null; int i; Enumeration e; for (i = 0; i < p.length; i++) { e = p[i].propertyNames(); while (e.hasMoreElements()) { key = (... |
catch (Throwable ignore) { } | catch (Throwable t) { } | public SecureRandom() { Provider p[] = Security.getProviders(); //Format of Key: SecureRandom.algname String key; String classname = null; int i; Enumeration e; for (i = 0; i < p.length; i++) { e = p[i].propertyNames(); while (e.hasMoreElements()) { key = (... |
Provider p[] = Security.getProviders(); | Provider[] p = Security.getProviders(); | public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException { Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) { } } //... |
catch (NoSuchAlgorithmException ignored) | catch (NoSuchAlgorithmException e) | public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException { Provider p[] = Security.getProviders(); for (int i = 0; i < p.length; i++) { try { return getInstance(algorithm, p[i]); } catch (NoSuchAlgorithmException ignored) { } } //... |
byte tmp[] = new byte[numBytes]; | byte[] tmp = new byte[numBytes]; | public static byte[] getSeed(int numBytes) { byte tmp[] = new byte[numBytes]; new Random().nextBytes(tmp); return tmp; //return secureRandomSpi.engineGenerateSeed( numBytes ); } |
byte tmp[] = new byte[numBits / 8 + (1 * (numBits % 8))]; | byte[] tmp = new byte[numBits / 8 + (1 * (numBits % 8))]; | protected final int next(int numBits) { if (numBits == 0) return 0; byte tmp[] = new byte[numBits / 8 + (1 * (numBits % 8))]; secureRandomSpi.engineNextBytes(tmp); randomBytesUsed += tmp.length; counter++; int ret = 0; for (int i = 0; i < tmp.length; i++) ret |= (tmp[i] & 0xFF) << (8 *... |
public void dropComplete (boolean success) | public void dropComplete(boolean success) throws NotImplementedException | public void dropComplete (boolean success) { // FIXME: implement this } |
public void add(Permission permission) { if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } | public void add(Permission permission) { if (isReadOnly()) throw new SecurityException("readonly"); if (! (permission instanceof PropertyPermission)) throw new IllegalArgumentException(); | public void add(Permission permission) { if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } PropertyPermission pp = (PropertyPermission) permission; final String name = pp.getName(); ... |
final String name = pp.getName(); if (name.equals("*")) { | String name = pp.getName(); if (name.equals("*")) | public void add(Permission permission) { if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } PropertyPermission pp = (PropertyPermission) permission; final String name = pp.getName(); ... |
} final PropertyPermission old = (PropertyPermission) permissions.get(name); if (old != null) { if ((pp.actions | old.actions) == old.actions) { pp = old; } else if ((pp.actions | old.actions) != pp.actions) { | PropertyPermission old = (PropertyPermission) permissions.get(name); if (old != null) { if ((pp.actions | old.actions) == old.actions) pp = old; else if ((pp.actions | old.actions) != pp.actions) | public void add(Permission permission) { if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } PropertyPermission pp = (PropertyPermission) permission; final String name = pp.getName(); ... |
} | public void add(Permission permission) { if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } PropertyPermission pp = (PropertyPermission) permission; final String name = pp.getName(); ... | |
public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; | public boolean implies(Permission permission) { if (! (permission instanceof PropertyPermission)) return false; PropertyPermission toImply = (PropertyPermission) permission; | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... |
if (actions == 0) { return true; } | if (actions == 0) return true; | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... |
if (name.equals("*")) { return false; } | if (name.equals("*")) return false; | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... |
if (name.endsWith("*")) { | if (name.endsWith("*")) | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... |
} | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... | |
if (prefixLength < 0) { return false; } | if (prefixLength < 0) return false; | public boolean implies(Permission permission) { if (!(permission instanceof PropertyPermission)) { return false; } final PropertyPermission toImply = (PropertyPermission) permission; int actions = toImply.actions; if (all_allowed) { int all_actions = ((PropertyPermission) perm... |
setActions(actions.toLowerCase()); | setActions(actions); | public PropertyPermission(String name, String actions) { super(name); if (actions == null) throw new IllegalArgumentException(); setActions(actions.toLowerCase()); } |
private ScrollingButton createDecreaseButton() | ScrollingButton createDecreaseButton() | private ScrollingButton createDecreaseButton() { if (decrButton == null) decrButton = new ScrollingButton(SwingConstants.SOUTH); if (tabPane.getTabPlacement() == SwingConstants.TOP || tabPane.getTabPlacement() == SwingConstants.BOTTOM) decrButton.setDirection(SwingConstants.WEST); else ... |
private ScrollingButton createIncreaseButton() | ScrollingButton createIncreaseButton() | private ScrollingButton createIncreaseButton() { if (incrButton == null) incrButton = new ScrollingButton(SwingConstants.NORTH); if (tabPane.getTabPlacement() == SwingConstants.TOP || tabPane.getTabPlacement() == SwingConstants.BOTTOM) incrButton.setDirection(SwingConstants.EAST); else ... |
private Point findPointForIndex(int index) | Point findPointForIndex(int index) | private Point findPointForIndex(int index) { int tabPlacement = tabPane.getTabPlacement(); int selectedIndex = tabPane.getSelectedIndex(); Insets insets = getSelectedTabPadInsets(tabPlacement); int w = 0; int h = 0; if (tabPlacement == TOP || tabPlacement == BOTTOM) { if (index > 0) { w ... |
public void setEnabled(boolean b) { super.setEnabled(b); getModel().setEnabled(b); repaint(); } | public void setEnabled(boolean b) { super.setEnabled(b); getModel().setEnabled(b); } | public void setEnabled(boolean b) { super.setEnabled(b); getModel().setEnabled(b); repaint(); } |
currentPeer.setVisible(true); | currentPeer.show(); | public void show() { // We must set visible before showing the peer. Otherwise the // peer could post paint events before visible is true, in which // case lightweight components are not initially painted -- // Container.paint first calls isShowing () before painting itself // and its children. if... |
public int getInt(Object key) | int getInt(Object key) | public int getInt(Object key) { Object o = get(key); return o instanceof Integer ? ((Integer) o).intValue() : 0; } |
static public String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) { int next_x = 0; int next_y = 0; ir.height = ir.width = ir.y = ir.x = 0; | public static String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) { | static public String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) { // v... |
if (i != null) { ir.x = vr.x; ir.y = vr.y; ir.width = i.getIconWidth(); ir.height = i.getIconWidth(); | static public String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) { // v... | |
next_x += gap + i.getIconWidth(); next_y += gap + i.getIconHeight(); } tr.x = next_x; tr.y = vr.y + (vr.height/2); | static public String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) { // v... | |
tr.width = fm.stringWidth(text); tr.height = fm.getHeight() + fm.getAscent()/2; return text; } | if (horizontalAlignment == LEADING) { if (c.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) horizontalAlignment = RIGHT; else horizontalAlignment = LEFT; } else if (horizontalAlignment == TRAILING) { if (c.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT) horizontalAlignment = LEFT; else... | static public String layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon i, int vert_a, int hor_i, int vert_text_pos, int hor_text_pos, Rectangle vr, Rectangle ir, Rectangle tr, int gap) { // v... |
else return defaultController.activate (this); } else | public boolean activateController() { if (controller == null) return false; return controller.activate(this); } | |
return controller; | return controller == null ? (no_controller ? null : defaultController) : controller; | public IIOParamController getController() { return controller; } |
return sourceBands; | if (sourceBands == null) return null; int[] sourceBandsCopy = new int[sourceBands.length]; System.arraycopy (sourceBands, 0, sourceBandsCopy, 0, sourceBands.length); return sourceBandsCopy; | public int[] getSourceBands() { return sourceBands; } |
} | public void setController(IIOParamController controller) { this.controller = controller; } | |
this.sourceBands = sourceBands; | int[] sourceBandsCopy = new int[sourceBands.length]; System.arraycopy (sourceBands, 0, sourceBandsCopy, 0, sourceBands.length); this.sourceBands = sourceBandsCopy; | public void setSourceBands(int[] sourceBands) { this.sourceBands = sourceBands; } |
if (sourceRegion != null) { int num_rows = (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1) / sourceYSubsampling; int num_columns = (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1) / sourceXSubsampling; if (num_rows <= 0 || num_columns <= 0) throw new IllegalStateException("zero p... | public void setSourceRegion(Rectangle sourceRegion) { if (sourceRegion != null && (sourceRegion.x < 0 || sourceRegion.y < 0 || sourceRegion.width <= 0 || sourceRegion.height <= 0)) throw new IllegalArgumentException("illegal source region"); // FIXME: Throw IllegalStateException. this.s... | |
if (subsamplingXOffset < 0 || subsamplingYOffset < 0) throw new IllegalArgumentException("subsampling offset < 0"); if (sourceRegion != null) { int num_rows = (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1) / sourceYSubsampling; int num_columns = (sourceRegion.width - subsamplingXOffset + sourceXS... | public void setSourceSubsampling(int sourceXSubsampling, int sourceYSubsampling, int subsamplingXOffset, int subsamplingYOffset) { this.sourceXSubsampling = sourceXSubsampling; this.sourceYSubsampling = sourceYSubsampling; this.subsamplingXOffset = subsamplingXOffset; this.subsamplingYOffset = subs... | |
public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp=" + countComponents() + ", layout=" + getLayout()); return d; } | public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp="+ getComponentCount () + ", layout=" + getLayout()); return d; } | public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); System.out.println("JFrame.getPrefSize(): " + d + " , comp=" + countComponents() + ", layout=" + getLayout()); return d; } |
JRootPane() { setLayout(createRootLayout()); | JRootPane() { setLayout(createRootLayout()); setBackground(UIManager.getColor("control")); getGlassPane(); getLayeredPane(); getContentPane(); | JRootPane() { setLayout(createRootLayout()); getGlassPane(); getLayeredPane(); getContentPane(); setDoubleBuffered(true); updateUI(); } |
getGlassPane(); getLayeredPane(); getContentPane(); setDoubleBuffered(true); updateUI(); } | setDoubleBuffered(true); updateUI(); } | JRootPane() { setLayout(createRootLayout()); getGlassPane(); getLayeredPane(); getContentPane(); setDoubleBuffered(true); updateUI(); } |
public void setContentPane(Container p) { contentPane = p; getLayeredPane().add(contentPane, 0); } | public void setContentPane(Container p) { contentPane = p; getLayeredPane().add(contentPane, JLayeredPane.FRAME_CONTENT_LAYER); } | public void setContentPane(Container p) { contentPane = p; getLayeredPane().add(contentPane, 0); } |
if (p != null && !(p instanceof LightweightPeer)) | if (p != null && ! (p instanceof LightweightPeer)) { | public void update(Graphics g) { // It seems that the JDK clears the background of containers like Panel // and Window (within this method) but not of 'plain' Containers or // JComponents. This could // lead to the assumption that it only clears heavyweight containers. // However that is not quite tru... |
backCleared = true; } | public void update(Graphics g) { // It seems that the JDK clears the background of containers like Panel // and Window (within this method) but not of 'plain' Containers or // JComponents. This could // lead to the assumption that it only clears heavyweight containers. // However that is not quite tru... | |
visitChildren(g, GfxPaintVisitor.INSTANCE, false); | visitChildren(g, GfxPaintVisitor.INSTANCE, !backCleared); backCleared = false; | public void paint(Graphics g) { if (!isShowing()) return; // Visit heavyweights as well, in case they were // erased when we cleared the background for this container. visitChildren(g, GfxPaintVisitor.INSTANCE, false); } |
if (type == null) { resolve(); } | public VmType<?> getType() { return type; } | |
if (authority.length() != 0) { sb.append(" } | if (authority.length() != 0 || file.startsWith(" sb.append(" else | protected String toExternalForm(URL url) { String protocol; String file; String ref; String authority; protocol = url.getProtocol(); authority = url.getAuthority(); if (authority == null) authority = ""; file = url.getFile(); ref = url.getRef(); // Guess a reasonable size for the str... |
final static void checkArraySize(int arraylength, int offset, int length) | static final void checkArraySize(int arraylength, int offset, int length) | final static void checkArraySize(int arraylength, int offset, int length) { if ((offset < 0) || (length < 0) || (arraylength < length + offset)) throw new IndexOutOfBoundsException (); } |
public static boolean equals(byte[] a1, byte[] a2) | public static boolean equals(boolean[] a1, boolean[] a2) | public static boolean equals(byte[] a1, byte[] a2) { // Quick test which saves comparing elements of the same array, and also // catches the case that both are null. if (a1 == a2) return true; if (null == a1 || null == a2) return false; // If they're the same length, test each element if ... |
public void update (byte[] buffer) | public void update (int bval) | public void update (byte[] buffer) { update(buffer, 0, buffer.length); } |
update(buffer, 0, buffer.length); | int s1 = checksum & 0xffff; int s2 = checksum >>> 16; s1 = (s1 + (bval & 0xFF)) % BASE; s2 = (s1 + s2) % BASE; checksum = (s2 << 16) + s1; | public void update (byte[] buffer) { update(buffer, 0, buffer.length); } |
boolean add(E o); | void add(int index, E o); | boolean add(E o); |
{ | public static QName valueOf(String qNameAsString) { String namespaceUri = "", prefix = null; int start = qNameAsString.indexOf('{'); int end = qNameAsString.indexOf('}'); if (start != -1) { if (end < start) { throw new IllegalArgumentException(qNameAsString); } ... | |
} | public static QName valueOf(String qNameAsString) { String namespaceUri = "", prefix = null; int start = qNameAsString.indexOf('{'); int end = qNameAsString.indexOf('}'); if (start != -1) { if (end < start) { throw new IllegalArgumentException(qNameAsString); } ... | |
protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) | public ColorModel(int bits) | protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) { int bits_sum = 0; for (int i = 0; i < bits.length; i++) { if (bits [i] < 0) throw new IllegalArgumentException (); ... |
int bits_sum = 0; for (int i = 0; i < bits.length; i++) { if (bits [i] < 0) throw new IllegalArgumentException (); bits_sum |= bits [i]; } if ((bits.length < cspace.getNumComponents()) || (bits_sum < 1)) throw new IllegalArgumentException (); this.pixel_bits = pixel_bits; this.bits = bits; this.cspace = cspace; this... | this(bits, nArray(bits / 4, 4), ColorSpace.getInstance(ColorSpace.CS_sRGB), true, false, TRANSLUCENT, Buffers.smallestAppropriateTransferType(bits * 4)); | protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace, boolean hasAlpha, boolean isAlphaPremultiplied, int transparency, int transferType) { int bits_sum = 0; for (int i = 0; i < bits.length; i++) { if (bits [i] < 0) throw new IllegalArgumentException (); ... |
DataBuffer db, | public static WritableRaster createWritableRaster(SampleModel sm, DataBuffer db, Point location) { return new WritableRaster(sm, db, location); } | |
return new WritableRaster(sm, db, location); | return new WritableRaster(sm, location); | public static WritableRaster createWritableRaster(SampleModel sm, DataBuffer db, Point location) { return new WritableRaster(sm, db, location); } |
public Object yyparse (yyInput yyLex) | public Object yyparse (yyInput yyLex, Object yydebug) | public Object yyparse (yyInput yyLex) throws java.io.IOException, yyException { if (yyMax <= 0) yyMax = 256; // initial size int yyState = 0, yyStates[] = new int[yyMax]; // state stack Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack int yyToken = -1; // current input int yyE... |
if (yyMax <= 0) yyMax = 256; int yyState = 0, yyStates[] = new int[yyMax]; Object yyVal = null, yyVals[] = new Object[yyMax]; int yyToken = -1; int yyErrorFlag = 0; yyLoop: for (int yyTop = 0;; ++ yyTop) { if (yyTop >= yyStates.length) { int[] i = new int[yyStates.length+yyMax]; System.arraycopy(yyStates, 0, i, 0, yyS... | return yyparse(yyLex); | public Object yyparse (yyInput yyLex) throws java.io.IOException, yyException { if (yyMax <= 0) yyMax = 256; // initial size int yyState = 0, yyStates[] = new int[yyMax]; // state stack Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack int yyToken = -1; // current input int yyE... |
{ | public Expr clone(Object context) { NamespaceContext n = nsctx; if (context instanceof NamespaceContext) { n = (NamespaceContext) context; } ElementAvailableFunction f = new ElementAvailableFunction(n); int len = args.size(); List args2 = new ArrayList(len); for (int i = 0; i < len... | |
} | public Expr clone(Object context) { NamespaceContext n = nsctx; if (context instanceof NamespaceContext) { n = (NamespaceContext) context; } ElementAvailableFunction f = new ElementAvailableFunction(n); int len = args.size(); List args2 = new ArrayList(len); for (int i = 0; i < len... | |
{ | public boolean references(QName var) { for (Iterator i = args.iterator(); i.hasNext(); ) { if (((Expr) i.next()).references(var)) { return true; } } return false; } | |
} | public boolean references(QName var) { for (Iterator i = args.iterator(); i.hasNext(); ) { if (((Expr) i.next()).references(var)) { return true; } } return false; } | |
Oid(int[] components) | public Oid(String strOid) throws GSSException | Oid(int[] components) { this.components = components; relative = false; } |
this.components = components; | if (strOid == null) throw new NullPointerException(); this.strOid = strOid; try { StringTokenizer tok = new StringTokenizer(strOid, "."); components = new int[tok.countTokens()]; int i = 0; while (tok.hasMoreTokens() && i < components.length) { components[i++] = Integer.parseInt(tok.nextToken()); } } catch (Exception x... | Oid(int[] components) { this.components = components; relative = false; } |
public void read(InputStream in, Document doc, int pos) | public void read(InputStream in, Document document, int offset) | public void read(InputStream in, Document doc, int pos) throws BadLocationException, IOException { } |
read(new InputStreamReader(in), document, offset); | public void read(InputStream in, Document doc, int pos) throws BadLocationException, IOException { } | |
public void write(OutputStream out, Document doc, int pos, int len) | public void write(OutputStream out, Document document, int offset, int len) | public void write(OutputStream out, Document doc, int pos, int len) throws BadLocationException, IOException { } |
write(new OutputStreamWriter(out), document, offset, len); | public void write(OutputStream out, Document doc, int pos, int len) throws BadLocationException, IOException { } | |
encoding = System.getProperty("file.encoding"); | encoding = SystemProperties.getProperty("file.encoding"); | public InputStreamReader(InputStream in) { if (in == null) throw new NullPointerException(); this.in = in; try { encoding = System.getProperty("file.encoding"); // Don't use NIO if avoidable if(EncodingHelper.isISOLatin1(encoding)) { encoding = "ISO8859_1"; maxBytesPerChar = 1f;... |
public OutputStreamWriter (OutputStream out) | public OutputStreamWriter (OutputStream out, String encoding_scheme) throws UnsupportedEncodingException | public OutputStreamWriter (OutputStream out) { this.out = out; outputBuffer = null; try { String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); encoder = cs.newEncoder(); encodingName = EncodingHelper.getOldCanonical(cs.name()); } catch(RuntimeExcepti... |
outputBuffer = null; | public OutputStreamWriter (OutputStream out) { this.out = out; outputBuffer = null; try { String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); encoder = cs.newEncoder(); encodingName = EncodingHelper.getOldCanonical(cs.name()); } catch(RuntimeExcepti... | |
String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); | if(EncodingHelper.isISOLatin1(encoding_scheme)) { encodingName = "ISO8859_1"; encoder = null; return; } try { if(encoding_scheme.equalsIgnoreCase("UnicodeBig") || encoding_scheme.equalsIgnoreCase("UTF-16") || encoding_scheme.equalsIgnoreCase("UTF16")) { encoding_scheme = "UTF-16BE"; out.write((byte)0xFE); out.write((... | public OutputStreamWriter (OutputStream out) { this.out = out; outputBuffer = null; try { String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); encoder = cs.newEncoder(); encodingName = EncodingHelper.getOldCanonical(cs.name()); } catch(RuntimeExcepti... |
encodingName = EncodingHelper.getOldCanonical(cs.name()); | encodingName = EncodingHelper.getOldCanonical(cs.name()); encoder.onMalformedInput(CodingErrorAction.REPLACE); encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); | public OutputStreamWriter (OutputStream out) { this.out = out; outputBuffer = null; try { String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); encoder = cs.newEncoder(); encodingName = EncodingHelper.getOldCanonical(cs.name()); } catch(RuntimeExcepti... |
if(encoder != null) { encoder.onMalformedInput(CodingErrorAction.REPLACE); encoder.onUnmappableCharacter(CodingErrorAction.REPLACE); outputBuffer = CharBuffer.allocate(BUFFER_SIZE); } | public OutputStreamWriter (OutputStream out) { this.out = out; outputBuffer = null; try { String encoding = System.getProperty("file.encoding"); Charset cs = Charset.forName(encoding); encoder = cs.newEncoder(); encodingName = EncodingHelper.getOldCanonical(cs.name()); } catch(RuntimeExcepti... | |
while (namespaces.containsValue(prefix)) | if (namespaces.isEmpty()) return prefix; HashMap ctx = (HashMap) namespaces.getFirst(); while (ctx.containsValue(prefix)) | String define(String uri, String prefix) { while (namespaces.containsValue(prefix)) { // Fabricate new prefix prefix = prefix + "_"; } namespaces.put(uri, prefix); return prefix; } |
namespaces.put(uri, prefix); | ctx.put(uri, prefix); | String define(String uri, String prefix) { while (namespaces.containsValue(prefix)) { // Fabricate new prefix prefix = prefix + "_"; } namespaces.put(uri, prefix); return prefix; } |
{ | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
} | htmlEncoded = false; | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
boolean defined = false; | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
} | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
if (isDefined(nsuri)) { | if (isDefined(nsuri, prefix)) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
else if (uri != null && !isDefined(uri)) | else if (uri != null && !isDefined(uri, prefix)) | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
String nsvalue = "'" + encode(uri, true, true) + "'"; | String nsvalue = "\"" + encode(uri, true, true) + "\""; | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
defined = true; | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... | |
value = "'" + encode(a_nodeValue, true, true) + "'"; | value = "\"" + encode(a_nodeValue, true, true) + "\""; | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
if (uri != null && !isDefined(uri)) { prefix = define(uri, node.getPrefix()); | prefix = node.getPrefix(); if (uri != null && !isDefined(uri, prefix)) { prefix = define(uri, prefix); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
value = "<![CDATA[" + node.getNodeValue() + "]]>"; out.write(encodeText(value)); | value = node.getNodeValue(); int bbk = value.indexOf("]]>"); while (bbk != -1) { String head = value.substring(0, bbk + 2); out.write(encodeText("<![CDATA[" + head + "]]>")); value = value.substring(bbk + 2); bbk = value.indexOf("]]>"); } out.write(encodeText("<![CDATA[" + value + "]]>")); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
out.write("xml version='".getBytes("US-ASCII")); | out.write("xml version=\"".getBytes("US-ASCII")); | private void doSerialize(final Node node, final OutputStream out, boolean convertToCdata) throws IOException { if (out == null) { throw new NullPointerException("no output stream"); } String value, prefix; Node children; String uri = node.getNamespaceURI(); boolean ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.