rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return; | throw new IllegalArgumentException("Action " + actionId + " is invalid"); | public void doAction(long id, int actionId, Map inputs) throws WorkflowException { int[] availableActions = getAvailableActions(id); boolean validAction = false; for (int i = 0; i < availableActions.length; i++) { if (availableActions[i] == actionId) { validAction = tr... |
public Message getMessageNow() throws JMSException | public Message getMessageNow(boolean wait) throws JMSException | public Message getMessageNow() throws JMSException { return endpoint.getMessageNow(); } |
return endpoint.getMessageNow(); | return endpoint.getMessageNow(wait); | public Message getMessageNow() throws JMSException { return endpoint.getMessageNow(); } |
log.info("==============Running job:" + this.getName()); | log.info("==============Running fill job"); | public void run() { Connection conn = null; try { log.info("==============Running job:" + this.getName()); super.setup(); conn = cf.createConnection(); long count = 0; Session sess = conn.createSession(fals... |
log.info("Received message " + msgsReceived); | log.trace("Received message " + msgsReceived); | public synchronized void onMessage(Message message) { try { log.info("Received message " + msgsReceived); TextMessage tm = (TextMessage)message; if (!tm.getText().equals("testing testing")) { fai... |
super.drainDestination(cf, queue); | public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); ServerManagement.undeployQueue("Queue"); ServerManagement.deployQueue("Queue"); InitialContext ic = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)ic.lookup("/Connec... | |
log.info("Rolling back session"); | log.trace("Rolling back session"); | public void testRedelivery() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); co... |
log.info("Received all messages in redelivery"); | log.trace("Received all messages in redelivery"); | public void testRedelivery() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); co... |
log.info("Committed session"); | log.trace("Committed session"); | public void testRedelivery() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); co... |
log.info("Closed connection consumer"); | log.trace("Closed connection consumer"); | public void testRedelivery() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); co... |
log.info("Received all messages"); | log.trace("Received all messages"); | public void testSimple() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); connCo... |
log.info("closing connection consumer ..."); | log.trace("closing connection consumer ..."); | public void testSimple() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); connCo... |
log.info("closing connections ..."); | log.trace("closing connections ..."); | public void testSimple() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); connCo... |
public void setAccel(Action act, int key) { | public static void setAccel(Action act, int key) { | public void setAccel(Action act, int key) { act.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(key, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); } |
public void setMnemonic(Action act, Integer mnem) { | public static void setMnemonic(Action act, Integer mnem) { | public void setMnemonic(Action act, Integer mnem) { act.putValue(Action.MNEMONIC_KEY, mnem); } |
public void setName(Action act, String name) { | public static void setName(Action act, String name) { | public void setName(Action act, String name) { act.putValue(Action.NAME, name); } |
Node n2 = attrs2.item(i); | Node n2 = attrs2.item(j); | public static void assertEquivalent(Node node, Node node2) { if (node == null) { throw new XMLRuntimeException("the first node to be compared is null"); } if (node2 == null) { throw new XMLRuntimeException("the second node to be compared is null"); } if (!node.get... |
transientVars.put("actionId", new Integer(action.getId())); | protected List getAvailableActionsForStep(WorkflowDescriptor wf, Step step, Map transientVars, PropertySet ps) throws WorkflowException { List l = new ArrayList(); StepDescriptor s = wf.getStep(step.getStepId()); if (s == null) { log.warn("getAvailableActionsForStep called for non-ex... | |
transientVars.put("actionId", new Integer(action.getId())); | protected int[] getAvailableAutoActions(long id, Map inputs) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry == null) { throw new IllegalArgumentException("No such workflow id " + id); } ... | |
transientVars.put("actionId", new Integer(action.getId())); | protected List getAvailableAutoActionsForStep(WorkflowDescriptor wf, Step step, Map transientVars, PropertySet ps) throws WorkflowException { List l = new ArrayList(); StepDescriptor s = wf.getStep(step.getStepId()); if (s == null) { log.warn("getAvailableAutoActionsForStep called fo... | |
if (extents.width == 0 && extents.height == 0) { extents = new Rectangle(0, 0, 1, 1); } | protected LayoutContext newLayoutContext(Graphics2D g) { XRLog.layout(Level.FINEST, "new context begin"); getSharedContext().setCanvas(this); Rectangle extents = getScreenExtents(); XRLog.layout(Level.FINEST, "new context end"); LayoutContext result = getSharedContext().newLayoutC... | |
MessageCallbackHandler handler = (MessageCallbackHandler)invocation.getMetaData(MetaDataConstants.JMS, MetaDataConstants.MESSAGE_HANDLER); | public Object handleClosing(Invocation invocation) throws Throwable { MessageCallbackHandler handler = (MessageCallbackHandler)invocation.getMetaData(MetaDataConstants.JMS, MetaDataConstants.MESSAGE_HANDLER); if (handler == null) { throw new IllegalStateException("Cannot find m... | |
if (handler == null) { throw new IllegalStateException("Cannot find message handler"); } | ConsumerState state = getState(invocation); Client client = state.getCallbackClient(); client.removeListener(state.getMessageCallbackHandler()); client.disconnect(); | public Object handleClosing(Invocation invocation) throws Throwable { MessageCallbackHandler handler = (MessageCallbackHandler)invocation.getMetaData(MetaDataConstants.JMS, MetaDataConstants.MESSAGE_HANDLER); if (handler == null) { throw new IllegalStateException("Cannot find m... |
handler.close(); | state.getMessageCallbackHandler().close(); | public Object handleClosing(Invocation invocation) throws Throwable { MessageCallbackHandler handler = (MessageCallbackHandler)invocation.getMetaData(MetaDataConstants.JMS, MetaDataConstants.MESSAGE_HANDLER); if (handler == null) { throw new IllegalStateException("Cannot find m... |
InvokerLocator serverLocator = (InvokerLocator)invocation. getMetaData(MetaDataConstants.JMS, MetaDataConstants.INVOKER_LOCATOR); if (serverLocator == null) { throw new RuntimeException("No InvokerLocator supplied. Can't invoke remotely!"); } Connector callbackServer = Remoting.getCallbackServer(); InvokerLocator c... | public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; //register/unregister a callback handler that deal with callbacks sent by the server InvokerLocator serverLocator = (InvokerLocator)invocation. ge... | |
Client client = new Client(serverLocator, "JMS"); | Client client = new Client(new InvokerLocator(connState.getServerURI())); | public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; //register/unregister a callback handler that deal with callbacks sent by the server InvokerLocator serverLocator = (InvokerLocator)invocation. ge... |
client.addListener(messageHandler, callbackServerLocator); | client.addListener(messageHandler, connState.getCallbackServer().getLocator()); | public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; //register/unregister a callback handler that deal with callbacks sent by the server InvokerLocator serverLocator = (InvokerLocator)invocation. ge... |
messageHandler.setCallbackServer(callbackServer, client); SimpleMetaData instanceMetaData = ((Advised)consumerDelegate)._getInstanceAdvisor().getMetaData(); instanceMetaData.addMetaData(MetaDataConstants.JMS, MetaDataConstants.MESSAGE_HANDLER, messageHandler, PayloadKey.TRANSIENT); | theState.setMessageCallbackHandler(messageHandler); theState.setCallbackClient(client); | public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; //register/unregister a callback handler that deal with callbacks sent by the server InvokerLocator serverLocator = (InvokerLocator)invocation. ge... |
rp = (NodeRecord) nodes.get(rp.parent); | { Object parent = rp.parent; rp = (NodeRecord) nodes.get(parent); if (rp == null) lpath.addFirst(parent); } | TreePath getPath() { if (path == null) { LinkedList lpath = new LinkedList(); NodeRecord rp = this; while (rp != null) { lpath.addFirst(rp.node); if (rp.parent != null) rp = (NodeRecord) nodes.get(rp.parent); ... |
path = new TreePath(lpath.toArray()); | path = new GnuPath(lpath.toArray(), lastChild); | TreePath getPath() { if (path == null) { LinkedList lpath = new LinkedList(); NodeRecord rp = this; while (rp != null) { lpath.addFirst(rp.node); if (rp.parent != null) rp = (NodeRecord) nodes.get(rp.parent); ... |
nodes.put(node, new NodeRecord(n.intValue(), depth, node, parent)); | NodeRecord nr = new NodeRecord(n.intValue(), depth, node, parent); nodes.put(node, nr); | private final void countRows(Object node, Object parent, int depth) { Integer n = new Integer(row2node.size()); row2node.put(n, node); nodes.put(node, new NodeRecord(n.intValue(), depth, node, parent)); if (expanded.contains(node) || parent == null) { int sc = treeModel.getChildCount(node... |
if (expanded.contains(node) || parent == null) | if (expanded.contains(node)) | private final void countRows(Object node, Object parent, int depth) { Integer n = new Integer(row2node.size()); row2node.put(n, node); nodes.put(node, new NodeRecord(n.intValue(), depth, node, parent)); if (expanded.contains(node) || parent == null) { int sc = treeModel.getChildCount(node... |
return new Rectangle(); | { rect.x = rect.y = rect.width = rect.height = 0; } | public Rectangle getBounds(TreePath path, Rectangle rect) { if (dirty) update(); Object last = path.getLastPathComponent(); NodeRecord r = (NodeRecord) nodes.get(last); if (r == null) // This node is not visible. return new Rectangle(); else { if (r.bounds == null) { ... |
return r.bounds; | rect.setRect(r.bounds); | public Rectangle getBounds(TreePath path, Rectangle rect) { if (dirty) update(); Object last = path.getLastPathComponent(); NodeRecord r = (NodeRecord) nodes.get(last); if (r == null) // This node is not visible. return new Rectangle(); else { if (r.bounds == null) { ... |
return rect; | public Rectangle getBounds(TreePath path, Rectangle rect) { if (dirty) update(); Object last = path.getLastPathComponent(); NodeRecord r = (NodeRecord) nodes.get(last); if (r == null) // This node is not visible. return new Rectangle(); else { if (r.bounds == null) { ... | |
int row = y / rowHeight; if (row < 0) row = 0; if (row > getRowCount()) row = getRowCount() - 1; | NodeRecord best = null; NodeRecord r; Enumeration en = nodes.elements(); | public TreePath getPathClosestTo(int x, int y) { if (dirty) update(); // We do not need to iterate because all rows have the same height. int row = y / rowHeight; if (row < 0) row = 0; if (row > getRowCount()) row = getRowCount() - 1; if (row < 0) return null; // Empty tree -... |
if (row < 0) return null; | int dist = Integer.MAX_VALUE; while (en.hasMoreElements() && dist > 0) { r = (NodeRecord) en.nextElement(); if (best == null) { best = r; dist = distance(r.getBounds(), x, y); } else { int rr = distance(r.getBounds(), x, y); if (rr < dist) { best = r; dist = rr; } } } | public TreePath getPathClosestTo(int x, int y) { if (dirty) update(); // We do not need to iterate because all rows have the same height. int row = y / rowHeight; if (row < 0) row = 0; if (row > getRowCount()) row = getRowCount() - 1; if (row < 0) return null; // Empty tree -... |
Object node = row2node.get(new Integer(row)); NodeRecord nr = (NodeRecord) nodes.get(node); return nr.getPath(); | if (best == null) return null; else return best.getPath(); | public TreePath getPathClosestTo(int x, int y) { if (dirty) update(); // We do not need to iterate because all rows have the same height. int row = y / rowHeight; if (row < 0) row = 0; if (row > getRowCount()) row = getRowCount() - 1; if (row < 0) return null; // Empty tree -... |
if (path == null) return -1; | public int getRowForPath(TreePath path) { if (dirty) update(); NodeRecord r = (NodeRecord) nodes.get(path.getLastPathComponent()); if (r == null) return - 1; else return r.row; } | |
NodeRecord r = (NodeRecord) nodes.get(path.getLastPathComponent()); if (r!=null) r.bounds = null; | public void invalidatePathBounds(TreePath path) { // Following JDK 1.4 API, should return without action. } | |
super.setModel(newModel); | treeModel = newModel; expanded.add(treeModel.getRoot()); | public void setModel(TreeModel newModel) { super.setModel(newModel); dirty = true; } |
countRows(child, root, 1); | countRows(child, root, 0); | private final void update() { nodes.clear(); row2node.clear(); Object root = treeModel.getRoot(); if (rootVisible) { countRows(root, null, 0); } else { int sc = treeModel.getChildCount(root); for (int i = 0; i < sc; i++) { Object child = treeModel.getChil... |
remaining_width -= bfc.getLeftFloatDistance( prev_line ); remaining_width -= bfc.getRightFloatDistance( prev_line ); | remaining_width -= bfc.getLeftFloatDistance(prev_line); remaining_width -= bfc.getRightFloatDistance(prev_line); prev_line.width = 0; | public static int adjustForTab( Context c, LineBox prev_line, int remaining_width ) { if(prev_line.width == 0) { prev_line.width = remaining_width; } else { Uu.p("warning. possible error. line already has width: " + prev_line); } BlockFormattingContext bfc = c.getBlockFormattingContext(); remai... |
public synchronized void unregisterConnectionFactory(String connFactoryID) throws Exception | public synchronized void unregisterConnectionFactory(int connFactoryID) throws Exception | public synchronized void unregisterConnectionFactory(String connFactoryID) throws Exception { ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)endpoints.get(connFactoryID); JNDIBindings jndiBindings = endpoint.getJNDIBindings(); if (jndiBindings != null) { ... |
(ServerConnectionFactoryEndpoint)endpoints.get(connFactoryID); | (ServerConnectionFactoryEndpoint)endpoints.get(Integer.valueOf(connFactoryID)); | public synchronized void unregisterConnectionFactory(String connFactoryID) throws Exception { ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)endpoints.get(connFactoryID); JNDIBindings jndiBindings = endpoint.getJNDIBindings(); if (jndiBindings != null) { ... |
JMSDispatcher.instance.unregisterTarget(Integer.valueOf(connFactoryID)); | public synchronized void unregisterConnectionFactory(String connFactoryID) throws Exception { ServerConnectionFactoryEndpoint endpoint = (ServerConnectionFactoryEndpoint)endpoints.get(connFactoryID); JNDIBindings jndiBindings = endpoint.getJNDIBindings(); if (jndiBindings != null) { ... | |
bodyWriteOnly = true; | public void clearBody() throws JMSException { payload = new ArrayList(); position = 0; offset = 0; size = 0; bodyWriteOnly = true; super.clearBody(); } | |
super.clearBody(); | public void clearBody() throws JMSException { payload = new ArrayList(); position = 0; offset = 0; size = 0; bodyWriteOnly = true; super.clearBody(); } | |
if (bodyWriteOnly) | if (!bodyReadOnly) | public boolean readBoolean() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public byte readByte() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Value ... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public int readBytes(byte[] value) throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object myObj = ((List)payload).get(position); if (myObj == null) throw new NullPointerException("Value is null"... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public char readChar() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Value ... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public double readDouble() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Va... |
super.readExternal(in); bodyWriteOnly = in.readBoolean(); | super.readExternal(in); | public void readExternal(ObjectInput in) throws IOException { try { super.readExternal(in); bodyWriteOnly = in.readBoolean(); payload = (ArrayList) in.readObject(); position = in.readInt(); offset = in.readInt(); size = in.readInt(); } catch (Clas... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public float readFloat() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Valu... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public int readInt() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Value is... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public long readLong() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Value ... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public Object readObject() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); position++; offset = 0; return value; } catch (IndexOutOfB... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public short readShort() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) throw new NullPointerException("Valu... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public String readString() throws JMSException { if (bodyWriteOnly) throw new MessageNotReadableException("The message body is writeonly"); try { Object value = ((List)payload).get(position); offset = 0; if (value == null) { position++; r... |
bodyWriteOnly = false; | bodyReadOnly = true; | public void reset() throws JMSException { bodyWriteOnly = false; position = 0; size = ((List)payload).size(); offset = 0; } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeBoolean(boolean value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(Primitives.valueOf(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeByte(byte value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Byte(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeBytes(byte[] value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(value.clone()); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeChar(char value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Character(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeDouble(double value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Double(value)); } |
out.writeBoolean(bodyWriteOnly); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeBoolean(bodyWriteOnly); out.writeObject(((List)payload)); out.writeInt(position); out.writeInt(offset); out.writeInt(size); } | |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeFloat(float value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Float(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeInt(int value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Integer(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeLong(long value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Long(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeObject(Object value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); if (value == null) ((List)payload).add(null); else if (value instanceof Boolean) ((List)payload).add(value); else if (v... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeShort(short value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); ((List)payload).add(new Short(value)); } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeString(String value) throws JMSException { if (!bodyWriteOnly) throw new MessageNotWriteableException("The message body is readonly"); if (value == null) ((List)payload).add(null); else ((List)payload).add(value); } |
client.setSubsystem(ServerPeer.REMOTING_JMS_SUBSYSTEM); | protected void setUpConnection() throws Throwable { if (log.isTraceEnabled()) { log.trace("Connecting with server URI:" + serverLocator); } String params = "/?marshaller=org.jboss.jms.server.remoting.JMSWireFormat&" + "unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat&" ... | |
callbackServer.addInvocationHandler("Callback", callbackManager); | callbackServer.addInvocationHandler(JMS_CALLBACK_SUBSYSTEM, callbackManager); | protected void setUpConnection() throws Throwable { if (log.isTraceEnabled()) { log.trace("Connecting with server URI:" + serverLocator); } String params = "/?marshaller=org.jboss.jms.server.remoting.JMSWireFormat&" + "unmarshaller=org.jboss.jms.server.remoting.JMSWireFormat&" ... |
if(floater.y + floater.height > box.y) { return floater.y + floater.height; | Uu.p("looking at floater: " + floater); Uu.p("floater parent = " + floater.getParent()); Uu.p("floater parent parent = " + floater.getParent().getParent()); Point fpt = (Point) offset_map.get(floater); Uu.p("offset = " + fpt); if(floater.y + floater.height - fpt.y > box.y) { return floater.y + floater.height - fpt.y; | public int getLeftDownDistance(Box box) { for(int i=0; i< left_floats.size(); i++) { Box floater = (Box) left_floats.get(i); if(floater.y + floater.height > box.y) { return floater.y + floater.height; } } return 0; } |
*/ return getDownDistance(box,left_floats); | public int getLeftDownDistance(Box box) { for(int i=0; i< left_floats.size(); i++) { Box floater = (Box) left_floats.get(i); if(floater.y + floater.height > box.y) { return floater.y + floater.height; } } return 0; } | |
for(int i=0; i< right_floats.size(); i++) { Box floater = (Box) right_floats.get(i); if(floater.y + floater.height > box.y) { return floater.y + floater.height; } } return 0; | return getDownDistance(box,right_floats); | public int getRightDownDistance(Box box) { for(int i=0; i< right_floats.size(); i++) { Box floater = (Box) right_floats.get(i); if(floater.y + floater.height > box.y) { return floater.y + floater.height; } } return 0; } |
JScrollBar hsb = scrollpane.getHorizontalScrollBar(); hsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); JScrollBar vsb = scrollpane.getVerticalScrollBar(); vsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE); | public void installUI(JComponent c) { super.installUI(c); } | |
JScrollBar hsb = scrollpane.getHorizontalScrollBar(); hsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, null); JScrollBar vsb = scrollpane.getVerticalScrollBar(); vsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, null); | public void uninstallUI(JComponent c) { super.uninstallUI(c); } | |
if(master != null) { if(start_index == -1 || end_index == -1) { return master; } if(end_index < start_index) { u.p("warning: end is less than start: " + end_index + " < " + start_index); u.p("master = " + master); return master; } return master.substring(start_index, end_index); } | public String getSubstring() { if(text == null) return ""; String txt = text.substring( start_index, end_index ); return txt; } | |
return "InlineBox text = \"" + getText() + | return "InlineBox text = \"" + getSubstring() + | public String toString() { return "InlineBox text = \"" + getText() + "\" bnds = " + x + "," + y + " - " + width + "x" + height + " start = " + this.start_index + " end = " + this.end_index + " baseline = " + this.baseline + " vset = " + this.vset + // CLN:... |
factory = (AbstractWorkflowFactory) Class.forName(clazz, true, Thread.currentThread().getContextClassLoader()).newInstance(); | factory = (AbstractWorkflowFactory) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); | public void load(URL url) throws FactoryException { InputStream is = getInputStream(url); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = null; try { db = dbf.newDocume... |
Relative.setupRelative(c, new_inline); | public static void layoutContent(Context c, Box box, List contentList) { //Here we should always be inside something that corresponds to a block-level element //for formatting purposes Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; validateBounds(bounds);... | |
public DurableSubscription(String subName, Topic topic, String selector, | public DurableSubscription(String clientID, String subName, Topic topic, String selector, | public DurableSubscription(String subName, Topic topic, String selector, MessageStore ms, PersistenceManager pm) { super(topic, selector, ms, pm); this.subName = subName; } |
super(topic, selector, ms, pm); | super(clientID + "." + subName, topic, selector, ms, pm); | public DurableSubscription(String subName, Topic topic, String selector, MessageStore ms, PersistenceManager pm) { super(topic, selector, ms, pm); this.subName = subName; } |
if (where + 1 >= values.size ()) | if (where == values.size ()) | public Object nextElement () throws NoSuchElementException { if (where + 1 >= values.size ()) throw new NoSuchElementException ("no more elements"); ++where; return values.get (where); } |
++where; return values.get (where); | return values.get (where++); | public Object nextElement () throws NoSuchElementException { if (where + 1 >= values.size ()) throw new NoSuchElementException ("no more elements"); ++where; return values.get (where); } |
return response; | log.info("returning response:" + response); byte[] bytes = StreamUtils.toBytes(response); return bytes; | Object execute(PostOfficeInternal office) throws Throwable { TransactionId id = new TransactionId(nodeId, txId); if (hold) { List dels = office.getDeliveries(queueName, numMessages); PullMessagesResponse response = new PullMessagesResponse(dels.size()); ... |
queueName = in.readUTF(); | super.read(in); | public void read(DataInputStream in) throws Exception { queueName = in.readUTF(); numMessages = in.readInt(); } |
numMessages = in.readInt(); | if (hold) { queueName = in.readUTF(); numMessages = in.readInt(); } | public void read(DataInputStream in) throws Exception { queueName = in.readUTF(); numMessages = in.readInt(); } |
out.writeUTF(queueName); | super.write(out); | public void write(DataOutputStream out) throws Exception { out.writeUTF(queueName); out.writeInt(numMessages); } |
out.writeInt(numMessages); | if (hold) { out.writeUTF(queueName); out.writeInt(numMessages); } | public void write(DataOutputStream out) throws Exception { out.writeUTF(queueName); out.writeInt(numMessages); } |
pm.retrievePreparedTransactions(); | prepared = pm.retrievePreparedTransactions(); | public void loadPreparedTransactions() throws TransactionException { List prepared = null; try { pm.retrievePreparedTransactions(); } catch (Exception e) { throw new TransactionException("Failed to retrieve prepared transactions", e); } if (prepar... |
if (current != this.x) { calcCanvasLocation(); calcChildLocations(); } | public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam... | |
if (getParent().getStyle().isHidden()) { | if (! getParent().getStyle().isVisible()) { | public void paintInline(RenderingContext c) { if (getParent().getStyle().isHidden()) { return; } if (textDecoration != null) { paintTextDecoration(c); } if (c.debugDrawLineBoxes()) { Color oldColor = c.getGraphics().getColor(); ... |
checkStop(); | public void run() { try { office.sendQueueStats(); } catch (Exception e) { log.error("Failed to send statistics", e); } } | |
TimerTask task = new SendStatsTimerTask(); | task = new SendStatsTimerTask(); timer.schedule(task, delay, period); | public synchronized void start() throws Exception { if (started) { return; } //Needs to be daemon timer = new Timer(true); //Add a random delay to prevent all timers starting at once long delay = (long)(period * Math.random()); TimerTask task = new ... |
timer.schedule(task, delay, period); | started = true; | public synchronized void start() throws Exception { if (started) { return; } //Needs to be daemon timer = new Timer(true); //Add a random delay to prevent all timers starting at once long delay = (long)(period * Math.random()); TimerTask task = new ... |
started = false; | public synchronized void stop() throws Exception { if (!started) { return; } timer.cancel(); timer = null; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.