rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
protected TreeNode[] getPathToRoot(TreeNode value0, int value1) { return null; } | protected TreeNode[] getPathToRoot(TreeNode node, int depth) { if (node == null) { if (depth == 0) return null; return new TreeNode[depth]; } TreeNode[] path = getPathToRoot(node.getParent(), depth + 1); path[depth] = node; return path; } | protected TreeNode[] getPathToRoot(TreeNode value0, int value1) { return null; // TODO } // getPathToRoot() |
public DefaultMutableTreeNode getPreviousLeaf() { return null; } | public DefaultMutableTreeNode getPreviousLeaf() { if (parent == null) return null; return null; } | public DefaultMutableTreeNode getPreviousLeaf() { return null; // TODO } // getPreviousLeaf() |
public DefaultMutableTreeNode getPreviousNode() { return null; } | public DefaultMutableTreeNode getPreviousNode() { if (parent == null) return null; DefaultMutableTreeNode sibling = getPreviousSibling(); if (sibling == null) return (DefaultMutableTreeNode) parent; if (sibling.getChildCount() != 0) return sibling.getLastLeaf(); return sibling; } | public DefaultMutableTreeNode getPreviousNode() { return null; // TODO } // getPreviousNode() |
public DefaultMutableTreeNode getPreviousSibling() { | public DefaultMutableTreeNode getPreviousSibling() { if (parent == null) return null; | public DefaultMutableTreeNode getPreviousSibling() { // Variables int index; // Check for Parent if (parent == null) { return null; } // if // Get Index of this node index = parent.getIndex(this); // Check for Previous Sibling index--; if (index < 0) { return null; } // if return (DefaultMutableTreeNo... |
int index; | int index = parent.getIndex(this) - 1; | public DefaultMutableTreeNode getPreviousSibling() { // Variables int index; // Check for Parent if (parent == null) { return null; } // if // Get Index of this node index = parent.getIndex(this); // Check for Previous Sibling index--; if (index < 0) { return null; } // if return (DefaultMutableTreeNo... |
if (parent == null) { | if (index < 0) | public DefaultMutableTreeNode getPreviousSibling() { // Variables int index; // Check for Parent if (parent == null) { return null; } // if // Get Index of this node index = parent.getIndex(this); // Check for Previous Sibling index--; if (index < 0) { return null; } // if return (DefaultMutableTreeNo... |
} index = parent.getIndex(this); index--; if (index < 0) { return null; } | public DefaultMutableTreeNode getPreviousSibling() { // Variables int index; // Check for Parent if (parent == null) { return null; } // if // Get Index of this node index = parent.getIndex(this); // Check for Previous Sibling index--; if (index < 0) { return null; } // if return (DefaultMutableTreeNo... | |
public TreeNode getRoot() { | public TreeNode getRoot() { TreeNode current = this; TreeNode check = current.getParent(); | public TreeNode getRoot() { // Variables TreeNode current; TreeNode check; // Lookup Parent current = this; check = current.getParent(); while (check != null) { current = check; check = current.getParent(); } // while return current; } // getRoot() |
TreeNode current; TreeNode check; current = this; check = current.getParent(); while (check != null) { | while (check != null) { | public TreeNode getRoot() { // Variables TreeNode current; TreeNode check; // Lookup Parent current = this; check = current.getParent(); while (check != null) { current = check; check = current.getParent(); } // while return current; } // getRoot() |
public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { | public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { TreeNode current = this; ArrayList list = new ArrayList(); | public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { // Variables ArrayList list; TreeNode current; // Get List of Path Elements for this node current = this; list = new ArrayList(); while (current != null) { list.add(current); current = current.getParent(); } // while // Check if any path ele... |
ArrayList list; TreeNode current; current = this; list = new ArrayList(); while (current != null) { | while (current != null) { | public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { // Variables ArrayList list; TreeNode current; // Get List of Path Elements for this node current = this; list = new ArrayList(); while (current != null) { list.add(current); current = current.getParent(); } // while // Check if any path ele... |
while (current != null) { if (list.contains(current) == true) { | while (current != null) { if (list.contains(current)) | public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { // Variables ArrayList list; TreeNode current; // Get List of Path Elements for this node current = this; list = new ArrayList(); while (current != null) { list.add(current); current = current.getParent(); } // while // Check if any path ele... |
} | public TreeNode getSharedAncestor(DefaultMutableTreeNode node) { // Variables ArrayList list; TreeNode current; // Get List of Path Elements for this node current = this; list = new ArrayList(); while (current != null) { list.add(current); current = current.getParent(); } // while // Check if any path ele... | |
public int getSiblingCount() { | public int getSiblingCount() { if (parent == null) return 1; | public int getSiblingCount() { // Variables // Check for no parent if (parent == null) { return 1; } // if // Calculate sibling count from parent's child count return parent.getChildCount(); } // getSiblingCount() |
if (parent == null) { return 1; } | public int getSiblingCount() { // Variables // Check for no parent if (parent == null) { return 1; } // if // Calculate sibling count from parent's child count return parent.getChildCount(); } // getSiblingCount() | |
public Object[] getUserObjectPath() { | public Object[] getUserObjectPath() { TreeNode[] path = getPathToRoot(this, 0); Object[] object = new Object[path.length]; | public Object[] getUserObjectPath() { // Variables TreeNode[] path; Object[] object; int index; // Get Path for Tree Nodes path = getPath(); // Construct Object Path object = new Object[path.length]; for (index = 0; index < path.length; index++) { object[index] = ((DefaultMutableTreeNode) path[index]).get... |
TreeNode[] path; Object[] object; int index; | for (int index = 0; index < path.length; ++index) object[index] = ((DefaultMutableTreeNode) path[index]).getUserObject(); | public Object[] getUserObjectPath() { // Variables TreeNode[] path; Object[] object; int index; // Get Path for Tree Nodes path = getPath(); // Construct Object Path object = new Object[path.length]; for (index = 0; index < path.length; index++) { object[index] = ((DefaultMutableTreeNode) path[index]).get... |
path = getPath(); object = new Object[path.length]; for (index = 0; index < path.length; index++) { object[index] = ((DefaultMutableTreeNode) path[index]).getUserObject(); } | public Object[] getUserObjectPath() { // Variables TreeNode[] path; Object[] object; int index; // Get Path for Tree Nodes path = getPath(); // Construct Object Path object = new Object[path.length]; for (index = 0; index < path.length; index++) { object[index] = ((DefaultMutableTreeNode) path[index]).get... | |
public static void growTree(DefaultMutableTreeNode root) { | public static void growTree(DefaultMutableTreeNode root) { DefaultMutableTreeNode node; | public static void growTree(DefaultMutableTreeNode root) { // Variables int index; DefaultMutableTreeNode node; DefaultMutableTreeNode current; current = root; index = 0;// while (current != root) { do {// if (random.nextInt(3) < 2) { if (random.nextBoolean()) { node = new DefaultMutableTreeNode(St... |
int index; DefaultMutableTreeNode node; DefaultMutableTreeNode current; | DefaultMutableTreeNode current = root; int index = 0; | public static void growTree(DefaultMutableTreeNode root) { // Variables int index; DefaultMutableTreeNode node; DefaultMutableTreeNode current; current = root; index = 0;// while (current != root) { do {// if (random.nextInt(3) < 2) { if (random.nextBoolean()) { node = new DefaultMutableTreeNode(St... |
current = root; index = 0; do { if (random.nextBoolean()) { | do { if (random.nextBoolean()) { | public static void growTree(DefaultMutableTreeNode root) { // Variables int index; DefaultMutableTreeNode node; DefaultMutableTreeNode current; current = root; index = 0;// while (current != root) { do {// if (random.nextInt(3) < 2) { if (random.nextBoolean()) { node = new DefaultMutableTreeNode(St... |
} } while (current != root && current != null); System.out.println("Number of nodes: " + index); } | } } while (current != root && current != null); } | public static void growTree(DefaultMutableTreeNode root) { // Variables int index; DefaultMutableTreeNode node; DefaultMutableTreeNode current; current = root; index = 0;// while (current != root) { do {// if (random.nextInt(3) < 2) { if (random.nextBoolean()) { node = new DefaultMutableTreeNode(St... |
public boolean isLeaf() { return (children.size() == 0); } | public boolean isLeaf() { return children.size() == 0; } | public boolean isLeaf() { return (children.size() == 0); // TODO: check allowsChildren?? } // isLeaf() |
public boolean isNodeAncestor(TreeNode node) { | public boolean isNodeAncestor(TreeNode node) { if (node == null) return false; | public boolean isNodeAncestor(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Ancestor current = this; while (current != null && current != node) { current = current.getParent(); } // while // Check for Ancestor if (current == node)... |
TreeNode current; | TreeNode current = this; | public boolean isNodeAncestor(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Ancestor current = this; while (current != null && current != node) { current = current.getParent(); } // while // Check for Ancestor if (current == node)... |
if (node == null) { return false; } | while (current != null && current != node) current = current.getParent(); | public boolean isNodeAncestor(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Ancestor current = this; while (current != null && current != node) { current = current.getParent(); } // while // Check for Ancestor if (current == node)... |
current = this; while (current != null && current != node) { current = current.getParent(); } if (current == node) { return true; } return false; } | return current == node; } | public boolean isNodeAncestor(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Ancestor current = this; while (current != null && current != node) { current = current.getParent(); } // while // Check for Ancestor if (current == node)... |
public boolean isNodeChild(TreeNode node) { TreeNode current; if (node == null) { return false; } current = node; while (current != null) { if (current == this) { return true; } current = current.getParent(); } | public boolean isNodeChild(TreeNode node) { if (node == null) | public boolean isNodeChild(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Process Path current = node; while (current != null) { if (current == this) { return true; } // if current = current.getParent(); } // while // Node not located i... |
} | return node.getParent() == this; } | public boolean isNodeChild(TreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Process Path current = node; while (current != null) { if (current == this) { return true; } // if current = current.getParent(); } // while // Node not located i... |
public boolean isNodeDescendant(DefaultMutableTreeNode node) { | public boolean isNodeDescendant(DefaultMutableTreeNode node) { if (node == null) return false; | public boolean isNodeDescendant(DefaultMutableTreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Descendant current = node; while (current != null && current != this) { current = current.getParent(); } // while // Check for Descendant ... |
TreeNode current; | TreeNode current = node; | public boolean isNodeDescendant(DefaultMutableTreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Descendant current = node; while (current != null && current != this) { current = current.getParent(); } // while // Check for Descendant ... |
if (node == null) { return false; } | while (current != null && current != this) current = current.getParent(); | public boolean isNodeDescendant(DefaultMutableTreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Descendant current = node; while (current != null && current != this) { current = current.getParent(); } // while // Check for Descendant ... |
current = node; while (current != null && current != this) { current = current.getParent(); } if (current == this) { return true; } return false; } | return current == this; } | public boolean isNodeDescendant(DefaultMutableTreeNode node) { // Variables TreeNode current; // Sanity Check if (node == null) { return false; } // if // Search For Descendant current = node; while (current != null && current != this) { current = current.getParent(); } // while // Check for Descendant ... |
public boolean isNodeRelated(DefaultMutableTreeNode node) { | public boolean isNodeRelated(DefaultMutableTreeNode node) { if (node == null) return false; | public boolean isNodeRelated(DefaultMutableTreeNode node) { // Sanity Check if (node == null) { return false; } // if // Check for the same root if (node.getRoot() == getRoot()) { return true; } // if // Nodes are not related return false; } // isNodeRelated() |
if (node == null) { return false; } if (node.getRoot() == getRoot()) { return true; } return false; } | return node.getRoot() == getRoot(); } | public boolean isNodeRelated(DefaultMutableTreeNode node) { // Sanity Check if (node == null) { return false; } // if // Check for the same root if (node.getRoot() == getRoot()) { return true; } // if // Nodes are not related return false; } // isNodeRelated() |
public boolean isNodeSibling(TreeNode node) { | public boolean isNodeSibling(TreeNode node) { if (node == null) return false; | public boolean isNodeSibling(TreeNode node) { // Check for null if (node == null) { return false; } // if // Check if nodes share a parent if (node.getParent() == getParent() && getParent() != null) { return true; } // if // Nodes are not siblings return false; } // isNodeSibling() |
if (node == null) { return false; } if (node.getParent() == getParent() && getParent() != null) { return true; } return false; } | return (node.getParent() == getParent() && getParent() != null); } | public boolean isNodeSibling(TreeNode node) { // Check for null if (node == null) { return false; } // if // Check if nodes share a parent if (node.getParent() == getParent() && getParent() != null) { return true; } // if // Nodes are not siblings return false; } // isNodeSibling() |
public Enumeration pathFromAncestorEnumeration(TreeNode value0) { return null; } | public Enumeration pathFromAncestorEnumeration(TreeNode node) { if (node == null) throw new IllegalArgumentException(); TreeNode parent = this; Vector nodes = new Vector(); nodes.add(this); while (parent != node && parent != null) { parent = parent.getParent(); nodes.add(0, parent); } if (parent != node) throw new I... | public Enumeration pathFromAncestorEnumeration(TreeNode value0) { return null; // TODO } // pathFromAncestorEnumeration() |
private void readObject(ObjectInputStream value0) throws IOException, ClassNotFoundException { } | private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { } | private void readObject(ObjectInputStream value0) throws IOException, ClassNotFoundException { // TODO } // readObject() |
public String toString() { if (userObject == null) { | public String toString() { if (userObject == null) | public String toString() { if (userObject == null) { return null; } // if return userObject.toString(); } // toString() |
} | public String toString() { if (userObject == null) { return null; } // if return userObject.toString(); } // toString() | |
private void writeObject(ObjectOutputStream value0) throws IOException { } | private void writeObject(ObjectOutputStream stream) throws IOException { } | private void writeObject(ObjectOutputStream value0) throws IOException { // TODO } // writeObject() |
public void setParent(MutableTreeNode parent); | void setParent(MutableTreeNode parent); | public void setParent(MutableTreeNode parent); |
public void insert(MutableTreeNode child, int index); | void insert(MutableTreeNode child, int index); | public void insert(MutableTreeNode child, int index); |
public void remove(int index); | void remove(int index); | public void remove(int index); |
public void removeFromParent(); | void removeFromParent(); | public void removeFromParent(); |
public void setUserObject(Object object); | void setUserObject(Object object); | public void setUserObject(Object object); |
public InputMethod createInputMethod() throws Exception; | InputMethod createInputMethod() throws Exception; | public InputMethod createInputMethod() throws Exception; |
else { position(limit()); limit(capacity()); } | public ByteBuffer compact() { int pos = position(); if (pos > 0) { int count = remaining(); VMDirectByteBuffer.shiftDown(address, 0, pos, count); position(count); limit(capacity()); } return this; } | |
Restricted_ORB.Singleton.create_enum_tc(id(), "ParameterMode", members); | OrbRestricted.Singleton.create_enum_tc(id(), "ParameterMode", members); | public static TypeCode type() { if (typeCode == null) { String[] members = new String[] { "PARAM_IN", "PARAM_OUT", "PARAM_INOUT" }; typeCode = Restricted_ORB.Singleton.create_enum_tc(id(), "ParameterMode", members); } return typeCode; } |
final Item item; switch (jvmType) { case JvmType.INT: item = IntItem.createReg(reg); break; case JvmType.REFERENCE: item = RefItem.createRegister(reg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } push(item); } | final Item item = WordItem.createReg(jvmType, reg); Item.assertCondition(pool.request(reg, item), "request"); push(item); } | public void writePUSH(int jvmType, Register reg) { final Item item; switch (jvmType) { case JvmType.INT: item = IntItem.createReg(reg); break; case JvmType.REFERENCE: item = RefItem.createRegister(reg); break... |
final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } push(item); } | final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.createReg(lsbReg, msbReg); break; default: throw new IllegalArgumentException("Unknown JvmType " + jvmType); } Item.assertCondition(pool.request(lsbReg, item), "request-lsb"); ... | public void writePUSH64(int jvmType, Register lsbReg, Register msbReg) { final Item item; switch (jvmType) { case JvmType.LONG: item = LongItem.createReg(lsbReg, msbReg); break; case JvmType.DOUBLE: item = DoubleItem.create... |
final AbstractX86StackManager createStackMgr() { return new StackManagerImpl(); } | final AbstractX86StackManager createStackMgr(X86RegisterPool pool) { return new StackManagerImpl(pool); } | final AbstractX86StackManager createStackMgr() { return new StackManagerImpl(); } |
for (int i = 0; i < tos; i++) { final Item item = stack[ i]; if ((item.getKind() == Item.Kind.LOCAL) && (item.getOffsetToFP() == offsetToFP)) item.load(ec); } | for (int i = 0; i < tos; i++) { final Item item = stack[i]; if (item.isLocal() && item.isAtOffset(offsetToFP)) { item.load(ec); } } | void loadLocal(EmitterContext ec, int offsetToFP) { for (int i = 0; i < tos; i++) { final Item item = stack[ i]; if ((item.getKind() == Item.Kind.LOCAL) && (item.getOffsetToFP() == offsetToFP)) item.load(ec); } } |
if ((item.getKind() == Item.Kind.STACK) && (tos > 0)) { Item.assertCondition(stack[ tos - 1].getKind() == Item.Kind.STACK, "stack[ tos - 1].getKind() == Item.Kind.STACK"); } | Item.assertCondition(item.getKind() > 0, "Kind > 0"); if ((item.isStack()) && (tos > 0)) { Item.assertCondition(stack[tos - 1].isStack(), "stack[ tos - 1].isStack()"); } | void push(Item item) { if ((item.getKind() == Item.Kind.STACK) && (tos > 0)) { Item.assertCondition(stack[ tos - 1].getKind() == Item.Kind.STACK, "stack[ tos - 1].getKind() == Item.Kind.STACK"); } if (tos == stack.length) { growStack(); } s... |
Item.assertCondition(item.getKind() == expectedKind, "item.getKind() == expectedKind"); if (tos == stack.length) grow(); stack[ tos++] = item; } | Item.assertCondition(item.getKind() == expectedKind, "item.getKind() == expectedKind"); if (tos == stack.length) { grow(); } stack[tos++] = item; } | final void push(Item item) { Item.assertCondition(item.getKind() == expectedKind, "item.getKind() == expectedKind"); if (tos == stack.length) grow(); stack[ tos++] = item; } |
void reset() { stack = new Item[ Math.min(8, maxSize)]; tos = 0; } | final void reset() { stack = new Item[Math.min(8, maxSize)]; tos = 0; } | void reset() { stack = new Item[ Math.min(8, maxSize)]; tos = 0; } |
catch (NoSuchAlgorithmException ignored) | catch (NoSuchAlgorithmException e) | public static CertPathValidator 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) ... |
try { final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); port = rm.claimIOResource(getDevice(), basePort, 8); configure(BAUD9600); getDevice().registerAPI(SerialPortAPI.class, this); } catch (NameNotFoundException nnfex) { throw new DriverException(nnfex); } catch (ResourceNotFreeE... | try { final ResourceManager rm = (ResourceManager) InitialNaming .lookup(ResourceManager.NAME); port = claimPorts(rm, getDevice(), basePort, 8); configure(BAUD9600); getDevice().registerAPI(SerialPortAPI.class, this); } catch (NameNotFoundException nnfex) { throw new DriverException(nnfex); } catch (ResourceNotFreeExce... | protected void startDevice() throws DriverException { try { final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME); port = rm.claimIOResource(getDevice(), basePort, 8); configure(BAUD9600); getDevice().registerAPI(SerialPortAPI.class, this); } catch (NameNotFoundException nnf... |
Streamable holder = holderFactory.createHolder(content); | Streamable holder = HolderLocator.createHolder(content); | public void from_any(Any an_any) throws TypeMismatch, InvalidValue { checkType(official_type, an_any.type()); try { if (!an_any.type().content_type().equal(content)) throw new InvalidValue(CONTENT); } catch (BadKind e) { TypeMismatch t = new TypeMismatch(... |
if (!isURI(uri)) throw new IllegalArgumentException("illegal URI: " + uri); | public void setDefaultNamespace(String uri) throws XMLStreamException { if (!namespaces.declarePrefix(XMLConstants.DEFAULT_NS_PREFIX, uri)) throw new XMLStreamException("illegal default namespace prefix"); } | |
try { if (!isURI(uri)) throw new IllegalArgumentException("illegal URI: " + uri); if (!isNCName(prefix)) throw new IllegalArgumentException("illegal NCName: " + prefix); } catch (IOException e) { XMLStreamException e2 = new XMLStreamException(e); e2.initCause(e); throw e2; } | public void setPrefix(String prefix, String uri) throws XMLStreamException { if (!namespaces.declarePrefix(prefix, uri)) throw new XMLStreamException("illegal prefix " + prefix); } | |
if (hasXML11RestrictedChars) writeEncodedWithRestrictedChars(value, true); else | public void writeAttribute(String localName, String value) throws XMLStreamException { if (!inStartElement) throw new IllegalStateException(); try { writer.write(' '); writer.write(localName); writer.write('='); writer.write('"'); writeEncoded(value, true); ... | |
if (data.indexOf("]]") != -1) throw new IllegalArgumentException(data); | public void writeCData(String data) throws XMLStreamException { try { endStartElement(); if (data.indexOf("]]") != -1) throw new IllegalArgumentException(data); writer.write("<![CDATA["); writer.write(data); writer.write("]]>"); } catch (IOException e) ... | |
if (text != null) | if (hasXML11RestrictedChars) writeEncodedWithRestrictedChars(text, false); else | public void writeCharacters(String text) throws XMLStreamException { try { endStartElement(); if (text != null) writeEncoded(text, false); } catch (IOException e) { XMLStreamException e2 = new XMLStreamException(e); e2.initCause(e); throw e2; }... |
if (data != null && data.indexOf("--") != -1) throw new IllegalArgumentException(data); | public void writeComment(String data) throws XMLStreamException { try { endStartElement(); if (data != null && data.indexOf("--") != -1) throw new IllegalArgumentException(data); writer.write("<!--"); if (data != null) writer.write(data); ... | |
if (data != null) | if (hasXML11RestrictedChars) { int[] seq = UnicodeReader.toCodePointArray(data); for (int i = 0; i < seq.length; i++) { int c = seq[i]; if (XMLParser.isXML11RestrictedChar(c)) writer.write("&#x" + Integer.toHexString(c) + ";"); else writer.write(Character.toChars(i)); } } else | public void writeComment(String data) throws XMLStreamException { try { endStartElement(); if (data != null && data.indexOf("--") != -1) throw new IllegalArgumentException(data); writer.write("<!--"); if (data != null) writer.write(data); ... |
if (!isName(dtd)) throw new IllegalArgumentException("illegal Name: " + dtd); | public void writeDTD(String dtd) throws XMLStreamException { try { writer.write("<!DOCTYPE "); writer.write(dtd); writer.write('>'); } catch (IOException e) { XMLStreamException e2 = new XMLStreamException(e); e2.initCause(e); throw e2; } } | |
writeNamespace(XMLConstants.DEFAULT_NS_PREFIX, namespaceURI); | if (!inStartElement) throw new IllegalStateException(); if (!isURI(namespaceURI)) throw new IllegalArgumentException("illegal URI: " + namespaceURI); writeNamespaceImpl(XMLConstants.DEFAULT_NS_PREFIX, namespaceURI); | public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException { writeNamespace(XMLConstants.DEFAULT_NS_PREFIX, namespaceURI); } |
if (!isName(name)) throw new IllegalArgumentException("illegal Name: " + name); | public void writeEntityRef(String name) throws XMLStreamException { try { endStartElement(); writer.write('&'); writer.write(name); writer.write(';'); } catch (IOException e) { XMLStreamException e2 = new XMLStreamException(e); e2.initCause(e); ... | |
if (prefix == null) prefix = XMLConstants.DEFAULT_NS_PREFIX; setPrefix(prefix, namespaceURI); writer.write(' '); writer.write("xmlns"); if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) { writer.write(':'); writer.write(prefix); } writer.write('='); writer.write('"'); writer.write(namespaceURI); writer.write('"'); | if (!isURI(namespaceURI)) throw new IllegalArgumentException("illegal URI: " + namespaceURI); if (!isNCName(prefix)) throw new IllegalArgumentException("illegal NCName: " + prefix); | public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException { if (!inStartElement) throw new IllegalStateException(); try { if (prefix == null) prefix = XMLConstants.DEFAULT_NS_PREFIX; setPrefix(prefix, namespaceURI); writer.write(... |
writeNamespaceImpl(prefix, namespaceURI); | public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException { if (!inStartElement) throw new IllegalStateException(); try { if (prefix == null) prefix = XMLConstants.DEFAULT_NS_PREFIX; setPrefix(prefix, namespaceURI); writer.write(... | |
if (!isName(localName)) throw new IllegalArgumentException("illegal Name: " + localName); | public void writeStartElement(String localName) throws XMLStreamException { try { endStartElement(); namespaces.pushContext(); writer.write('<'); writer.write(localName); elements.addLast(new String[] { null, localName }); inStartElement = true; ... | |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobOriginatingUserName.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-originating-user-name"; } |
return (String) getAttribute(StyleConstants.NameAttribute); | Object tag = getAttribute(StyleConstants.NameAttribute); String name = null; if (tag != null) name = tag.toString(); return name; | public String getName() { return (String) getAttribute(StyleConstants.NameAttribute); } |
print ("ParagraphAction.end not implemented"); | blockClose(t); | public void end(HTML.Tag t) { // FIXME: Implement. print ("ParagraphAction.end not implemented"); } |
print ("ParagraphAction.start not implemented"); | blockOpen(t, a); | public void start(HTML.Tag t, MutableAttributeSet a) { // FIXME: Implement. print ("ParagraphAction.start not implemented"); } |
element = new DefaultStyledDocument.ElementSpec(attr.copyAttributes(), | attr.addAttribute(StyleConstants.NameAttribute, t); element = new DefaultStyledDocument.ElementSpec(attr, | protected void blockOpen(HTML.Tag t, MutableAttributeSet attr) { printBuffer(); DefaultStyledDocument.ElementSpec element; element = new DefaultStyledDocument.ElementSpec(attr.copyAttributes(), DefaultStyledDocument.ElementSpec.StartTagType); parseBuffer.addElement(element); printBuffe... |
protected void create(DefaultStyledDocument.ElementSpec[] data) | protected void create(ElementSpec[] data) | protected void create(DefaultStyledDocument.ElementSpec[] data) { // FIXME: Not implemented System.out.println("create not implemented"); super.create(data); } |
System.out.println("create not implemented"); | protected void create(DefaultStyledDocument.ElementSpec[] data) { // FIXME: Not implemented System.out.println("create not implemented"); super.create(data); } | |
System.out.println("createBranchElement not implemented"); return super.createBranchElement(parent, a); | return new BlockElement(parent, a); | protected Element createBranchElement(Element parent, AttributeSet a) { // FIXME: Not implemented System.out.println("createBranchElement not implemented"); return super.createBranchElement(parent, a); } |
protected AbstractDocument.AbstractElement createDefaultRoot() | protected AbstractElement createDefaultRoot() | protected AbstractDocument.AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } |
System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); | AttributeContext ctx = getAttributeContext(); AttributeSet atts = ctx.getEmptySet(); atts = ctx.addAttribute(atts, StyleConstants.NameAttribute, HTML.Tag.HTML); BranchElement html = (BranchElement) createBranchElement(null, atts); atts = ctx.getEmptySet(); atts = ctx.addAttribute(atts, StyleConstants.NameAttribute,... | protected AbstractDocument.AbstractElement createDefaultRoot() { // FIXME: Not implemented System.out.println("createDefaultRoot not implemented"); return super.createDefaultRoot(); } |
System.out.println("createLeafElement not implemented"); return super.createLeafElement(parent, a, p0, p1); | RunElement el = new RunElement(parent, a, p0, p1); el.addAttribute(StyleConstants.NameAttribute, HTML.Tag.CONTENT); return new RunElement(parent, a, p0, p1); | protected Element createLeafElement(Element parent, AttributeSet a, int p0, int p1) { // FIXME: Not implemented System.out.println("createLeafElement not implemented"); return super.createLeafElement(parent, a, p0, p1); } |
this.root = document.getDefaultRootElement(); this.currentElement = root; this.state = new int[5]; | root = document.getDefaultRootElement(); | public ElementIterator(Document document) { this.root = document.getDefaultRootElement(); this.currentElement = root; this.state = new int[5]; } |
return currentElement; | Element current; if (stack == null) current = first(); else { current = null; if (! stack.isEmpty()) { ElementRef ref = (ElementRef) stack.peek(); Element el = ref.element; int index = ref.index; if (index == -1) current = el; else current = el.getElement(index); } } return current; | public Element current() { return currentElement; } |
previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) | Element next; if (stack == null) next = first(); else | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
++currentDepth; if (currentDepth > state.length) | next = null; if (! stack.isEmpty()) | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state = newState; } state[currentDepth] = 0; currentElement = currentElement.getElement(0); return currentElement; | ElementRef ref = (ElementRef) stack.peek(); Element el = ref.element; int index = ref.index; if (el.getElementCount() > index + 1) { Element child = el.getElement(index + 1); if (child.isLeaf()) ref.index++; else stack.push(new ElementRef(child)); next = child; next = child; | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
while (currentDepth > 0) | else | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
--currentDepth; currentElement = currentElement.getParentElement(); ++state[currentDepth]; if (state[currentDepth] < currentElement.getElementCount()) | stack.pop(); if (! stack.isEmpty()) | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
currentElement = currentElement.getElement(state[currentDepth]); return currentElement; | ElementRef top = (ElementRef) stack.peek(); top.index++; next = next(); | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
currentElement = null; return currentElement; | } } return next; | public Element next() { previousItem = currentElement; if (currentElement == null) return null; if (! currentElement.isLeaf()) { ++currentDepth; if (currentDepth > state.length) { int[] newState = new int[state.length * 2]; System.arraycopy(state, 0, newState, 0, state.length); state... |
ScrollPaneUI b = (ScrollPaneUI)UIManager.getUI(this); setUI(b); | setUI((ScrollPaneUI) UIManager.getUI(this)); | public void updateUI() { ScrollPaneUI b = (ScrollPaneUI)UIManager.getUI(this); setUI(b); } |
public final Class getCategory() | public Class getCategory() | public final Class getCategory() { return JobHoldUntil.class; } |
public final String getName() | public String getName() | public final String getName() { return "job-hold-until"; } |
public void addActionListener(ActionListener l) { actions.addElement(l); } | public void addActionListener(ActionListener listener) { listenerList.add(ActionListener.class, listener); } | public void addActionListener(ActionListener l) { actions.addElement(l); } |
public Component getTreeCellEditorComponent(JTree tree, | Component getTreeCellEditorComponent(JTree tree, | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row); |
Component view = viewport.getView(); if (view == null) return; | public void layoutContainer(Container parent) { // Sun's implementation simply throws a ClassCastException if // parent is no JScrollPane, so do we. JScrollPane sc = (JScrollPane) parent; JViewport viewport = sc.getViewport(); Dimension viewSize = viewport.getView().getPreferredSize(); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.