rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; | Class generate(ClassLoader loader) { byte[] bytecode = new byte[pool.length() + stream.length()]; | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... |
try { | try { Class vmClassLoader = Class.forName("java.lang.VMClassLoader"); Class[] types = {ClassLoader.class, String.class, byte[].class, int.class, int.class, ProtectionDomain.class }; Method m = vmClassLoader.getDeclaredMethod("defineClass", types); m.flag = true; | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... |
Class vmClassLoader = Class.forName("java.lang.VMClassLoader"); Class[] types = { ClassLoader.class, String.class, byte[].class, int.class, int.class, }; Method m = vmClassLoader .getDeclaredMethod("defineClass", types); m.flag = true; Object[] args = { loader, qualName, bytecode, new Integer(0), | Object[] args = {loader, qualName, bytecode, new Integer(0), | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... |
}; | Object.class.getProtectionDomain() }; | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... |
m.flag = false; | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... | |
f.flag = false; | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... | |
} catch (Throwable e) { | } catch (Exception e) { | final Class generate(ClassLoader loader) { byte[] bytecode = new byte[ pool.length() + stream.length()]; // More efficient to bypass calling charAt() repetitively. char[] c = pool.toString().toCharArray(); int i = c.length; while (--i >= 0) b... |
throw new IllegalArgumentException( "not accessible in " + "classloader: " + inter); } catch (ClassNotFoundException e) { | static ProxyData getProxyData(ProxyType pt) { Map method_set = (Map) ProxySignature.coreMethods.clone(); boolean in_package = false; // true if we encounter non-public // interface ProxyData data = new ProxyData(); data.interface... | |
if (!Modifier.isPublic(inter.getModifiers())) if (in_package) { Package p = inter.getPackage(); if (data.pack != inter.getPackage()) throw new IllegalArgumentException( "non-public interfaces " | catch (ClassNotFoundException e) { throw new IllegalArgumentException("not accessible in " + "classloader: " + inter); } if (! Modifier.isPublic(inter.getModifiers())) if (in_package) { String p = getPackage(inter); if (! data.pack.equals(p)) throw new IllegalArgumentException("non-public interfaces " | static ProxyData getProxyData(ProxyType pt) { Map method_set = (Map) ProxySignature.coreMethods.clone(); boolean in_package = false; // true if we encounter non-public // interface ProxyData data = new ProxyData(); data.interface... |
data.pack = inter.getPackage(); | data.pack = getPackage(inter); | static ProxyData getProxyData(ProxyType pt) { Map method_set = (Map) ProxySignature.coreMethods.clone(); boolean in_package = false; // true if we encounter non-public // interface ProxyData data = new ProxyData(); data.interface... |
if (clazz == null) { ProxyData data = ProxyData.getProxyData(pt); ClassFactory cf = new ClassFactory(data); clazz = cf.generate(loader); | if (clazz == null) { if (VMProxy.HAVE_NATIVE_GET_PROXY_CLASS) clazz = VMProxy.getProxyClass(loader, interfaces); else { ProxyData data = (VMProxy.HAVE_NATIVE_GET_PROXY_DATA ? VMProxy.getProxyData(loader, interfaces) : ProxyData.getProxyData(pt)); clazz = (VMProxy.HAVE_NATIVE_GENERATE_PROXY_CLASS ? VMProxy.generateProx... | public static synchronized Class getProxyClass(ClassLoader loader, Class[] interfaces) { interfaces = (Class[]) interfaces.clone(); ProxyType pt = new ProxyType(loader, interfaces); Class clazz = (Class) proxyClasses.get(pt); if (clazz == null) { ProxyData data = ProxyData.getProxyData(pt); C... |
if (check != null || clazz == null) { throw new InternalError(); } | if (check != null || clazz == null) throw new InternalError(); | public static synchronized Class getProxyClass(ClassLoader loader, Class[] interfaces) { interfaces = (Class[]) interfaces.clone(); ProxyType pt = new ProxyType(loader, interfaces); Class clazz = (Class) proxyClasses.get(pt); if (clazz == null) { ProxyData data = ProxyData.getProxyData(pt); C... |
if (sep != '+' || sep != ',') | if (sep != '+' && sep != ',') | private String readAttributeValue(Reader in) throws IOException { StringBuffer buf = new StringBuffer(); int ch = in.read(); if (ch == '#') { while (true) { ch = in.read(); if (('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') || Character.isDigit... |
failed = true; latch.release(); } if (!tm.getJMSRedelivered()) { | public void onMessage(Message m) { TextMessage tm = (TextMessage)m; count++; log.trace("Got message:" + count); try { log.trace("message:" + tm.getText()); if (count == 1) { if (!("a".equals(tm.g... | |
Thread.sleep(2000); | public void waitForMessages() throws InterruptedException { latch.acquire(); } | |
log.trace("Got message:" + tm.getText() + " count is " + count); | log.info("Got message:" + tm.getText() + " count is " + count); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Should be a but was " + tm.getText()); | log.info("Should be a but was " + tm.getText()); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("rollback() called"); | log.info("rollback() called"); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("recover() called"); | log.info("recover() called"); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Should be a but was " + tm.getText()); | log.info("Should be a but was " + tm.getText()); failed = true; latch.release(); } if (!tm.getJMSRedelivered()) { | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Should be b but was " + tm.getText()); | log.info("Should be b but was " + tm.getText()); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Should be c but was " + tm.getText()); | log.info("Should be c but was " + tm.getText()); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Acknowledging session"); | log.info("Acknowledging session"); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
log.trace("Caught JMSException", e); | log.info("Caught JMSException", e); | public void onMessage(Message m) { try { TextMessage tm = (TextMessage)m; log.trace("Got message:" + tm.getText() + " count is " + count); if (count == 0) { if (!("a".equals(tm.getText()))) { ... |
case FieldExpression.STATE: return "state"; case FieldExpression.NAME: return "workflowName"; | private String getFieldName(int field) { switch (field) { case FieldExpression.ACTION: // actionId return "actionId"; case FieldExpression.CALLER: return "caller"; case FieldExpression.FINISH_DATE: return "finishDate"; case FieldExpression.OWNER: ... | |
FieldExpression sub = (FieldExpression) nestedExpression.getExpression(i); | private Class getQueryClass(com.opensymphony.workflow.query.Expression expr, Collection classesCache) throws StoreException { if (classesCache == null) { classesCache = new HashSet(); } if (expr instanceof FieldExpression) { FieldExpression fieldExpression = (FieldExpressi... | |
resourceManagers = new HashMap(); | holders = new HashMap(); | private ResourceManagerFactory() { resourceManagers = new HashMap(); } |
ResourceManager rm = (ResourceManager)resourceManagers.get(serverID); if (rm == null) | Holder h = (Holder)holders.get(serverID); if (h == null) | public synchronized ResourceManager getResourceManager(String serverID) { ResourceManager rm = (ResourceManager)resourceManagers.get(serverID); if (rm == null) { rm = new ResourceManager(); resourceManagers.put(serverID, rm); } return rm; } |
rm = new ResourceManager(); resourceManagers.put(serverID, rm); | h = new Holder(); holders.put(serverID, h); | public synchronized ResourceManager getResourceManager(String serverID) { ResourceManager rm = (ResourceManager)resourceManagers.get(serverID); if (rm == null) { rm = new ResourceManager(); resourceManagers.put(serverID, rm); } return rm; } |
return rm; | else { h.refCount++; } return h.rm; | public synchronized ResourceManager getResourceManager(String serverID) { ResourceManager rm = (ResourceManager)resourceManagers.get(serverID); if (rm == null) { rm = new ResourceManager(); resourceManagers.put(serverID, rm); } return rm; } |
public void read(Reader in, Document document, int offset) | public void read(InputStream in, Document document, int offset) | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) content.append(line); document.insertSt... |
BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) content.append(line); document.insertString(offset, content.toString(), SimpleAttributeSet.EMPTY); | read(new InputStreamReader(in), document, offset); | public void read(Reader in, Document document, int offset) throws BadLocationException, IOException { BufferedReader reader = new BufferedReader(in); String line; StringBuffer content = new StringBuffer(); while ((line = reader.readLine()) != null) content.append(line); document.insertSt... |
return running; | return task != null; | public boolean isRunning() { return running; } |
} | void queueEvent() { queue++; if (queue == 1) SwingUtilities.invokeLater(drainer); } | |
synchronized (queueLock) { if (!running) | Task t = task; if (t == null) | public void start() { synchronized (queueLock) { if (!running) { running = true; waker = new Waker(); waker.start(); } } } |
running = true; waker = new Waker(); waker.start(); | t = new Task(); if (isRepeats()) timer.schedule(t, getInitialDelay(), getDelay()); else timer.schedule(t, getInitialDelay()); task = t; | public void start() { synchronized (queueLock) { if (!running) { running = true; waker = new Waker(); waker.start(); } } } |
} | public void start() { synchronized (queueLock) { if (!running) { running = true; waker = new Waker(); waker.start(); } } } | |
synchronized (queueLock) | Task t = task; if (t != null) | public void stop() { synchronized (queueLock) { running = false; queue = 0; queueLock.notifyAll(); waker = null; } } |
running = false; queue = 0; queueLock.notifyAll(); waker = null; | t.cancel(); task = null; | public void stop() { synchronized (queueLock) { running = false; queue = 0; queueLock.notifyAll(); waker = null; } } |
if (box.getBlockFormattingContext() != null) { bfc = box.getBlockFormattingContext(); | if (box.getPersistentBFC() != null) { bfc = new BlockFormattingContext(box.getPersistentBFC()); | public static Box findElementBox(Box box, int x, int y, BlockFormattingContext bfc) {//TODO: why is this used? //A better way? should be in a render util? //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); if (box == null) { return null; ... |
Uu.p("x = " + x + " y = " + y + " tty = " + tty + " bx.x = " + bx.x + " bx.y = " + bx.y); Uu.p("tx = " + tx + "," + ty); if(bfc != null) { tx = x - bfc.getX(); ty = tty - bfc.getY(); } | Uu.p("x = " + x + " y = " + y + " tty = " + tty + " bx.x = " + bx.x + " bx.y = " + bx.y); | public static Box findElementBox(Box box, int x, int y, BlockFormattingContext bfc) {//TODO: why is this used? //A better way? should be in a render util? //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); if (box == null) { return null; ... |
if(bx.contains(x-bx.x,tty-bx.y)) { Uu.p("found: " + bx); | if (bfc != null) { tx = x - bfc.getX(); ty = tty - bfc.getY(); } Uu.p("tx = " + tx + "," + ty); if (bx.contains(x - bx.x, tty - bx.y)) { Uu.p("found: " + bx); | public static Box findElementBox(Box box, int x, int y, BlockFormattingContext bfc) {//TODO: why is this used? //A better way? should be in a render util? //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); if (box == null) { return null; ... |
if(box == null) { return null; } | public static Box findElementBox2(Box box, int x, int y, BlockFormattingContext bfc) { //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); //if(box.element != null) { Uu.p("elem : " + box.element.getNodeName()); } // skip if no box to look at if(box == null) { return null; } int dx = 0; ... | |
int dx = 0; int dy = 0; if(bfc != null) { if(box.absolute) { dx += bfc.getX(); dy += bfc.getY(); int[] adj = adjustForAbsolute2(box, x, y, bfc); dx += adj[0]; dy += adj[1]; } } dx += box.x; dy += box.y; if(box instanceof LineBox) { | if (box == null) { return null; | public static Box findElementBox2(Box box, int x, int y, BlockFormattingContext bfc) { //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); //if(box.element != null) { Uu.p("elem : " + box.element.getNodeName()); } // skip if no box to look at if(box == null) { return null; } int dx = 0; ... |
dx += box.tx; dy += box.ty; int ttx = x - dx + box.tx; int tty = y - dy + box.ty; if (box.getBlockFormattingContext() != null) { bfc = box.getBlockFormattingContext(); } if(!box.contains(ttx,tty)) { if(!box.isChildrenExceedBounds()) { return null; } else { } } | public static Box findElementBox2(Box box, int x, int y, BlockFormattingContext bfc) { //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); //if(box.element != null) { Uu.p("elem : " + box.element.getNodeName()); } // skip if no box to look at if(box == null) { return null; } int dx = 0; ... | |
Iterator it = box.getChildIterator(); | int dx = 0; int dy = 0; if (bfc != null) { if (box.absolute) { dx += bfc.getX(); dy += bfc.getY(); int[] adj = adjustForAbsolute2(box, x, y, bfc); dx += adj[0]; dy += adj[1]; } } dx += box.x; dy += box.y; if (box instanceof LineBox) { } dx += box.tx; dy += box.ty; int ttx = x - dx + box.tx; int tty = y - d... | public static Box findElementBox2(Box box, int x, int y, BlockFormattingContext bfc) { //Uu.p("find element box: " + x + " " + y + " " + box + " " + bfc); //if(box.element != null) { Uu.p("elem : " + box.element.getNodeName()); } // skip if no box to look at if(box == null) { return null; } int dx = 0; ... |
public Cell addCell(Node node, int x, int y) throws Exception { | public Cell addCell(Node node, int x, int y) { | public Cell addCell(Node node, int x, int y) throws Exception { //u.p("addCell("+node+","+x+","+y+")"); if(node.getNodeType() != node.ELEMENT_NODE) { throw new Exception("this isn't an element" + node); } Element cell = (Element)node; Cell cl = new Cell(); cl.nod... |
throw new Exception("this isn't an element" + node); | throw new Error("this isn't an element" + node); | public Cell addCell(Node node, int x, int y) throws Exception { //u.p("addCell("+node+","+x+","+y+")"); if(node.getNodeType() != node.ELEMENT_NODE) { throw new Exception("this isn't an element" + node); } Element cell = (Element)node; Cell cl = new Cell(); cl.nod... |
public void addFirstRow(Node row) throws Exception { | public void addFirstRow(Node row) { | public void addFirstRow(Node row) throws Exception { addRow(row,true, 0); } |
public void addRow(Node row, int y) throws Exception { | public void addRow(Node row, int y) { | public void addRow(Node row, int y) throws Exception { addRow(row,false, y); } |
public Cell addTopCell(Node node, int x, int y) throws Exception { | public Cell addTopCell(Node node, int x, int y) { | public Cell addTopCell(Node node, int x, int y) throws Exception { Cell cl = addCell(node, x, y); top_cells.add(cl); return cl; } |
if (notifier != null) notifier.notifyAll(); | Object o = notifier; if (o != null) synchronized(o) { o.notifyAll(); } | public void dispatch() { if (catchExceptions) try { runnable.run(); } catch (Exception e) { exception = e; } else runnable.run(); if (notifier != null) notifier.notifyAll(); } |
super.setPopupSize(cbBounds.width, popupHeight); | Insets insets1 = getInsets(); Insets insets2 = scroller.getInsets(); super.setPopupSize(cbBounds.width, popupHeight + insets1.top + insets1.bottom + insets2.top + insets2.bottom); | public void show() { Rectangle cbBounds = comboBox.getBounds(); // popup should have same width as the comboBox and should be hight anough // to display number of rows equal to 'maximumRowCount' property int popupHeight = getPopupHeightForRowCount(comboBox.getMaximumRowCount()); list.setPreferredSize(... |
String text = ""; | String text; | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text = toLatin(getListCounter()).toLowerCase() + "."; | text = toLatin(getListCounter()).toLowerCase(); | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text = toLatin(getListCounter()).toUpperCase() + "."; | text = toLatin(getListCounter()).toUpperCase(); | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text = toRoman(getListCounter()).toLowerCase() + "."; | text = toRoman(getListCounter()).toLowerCase(); | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text = toRoman(getListCounter()).toUpperCase() + "."; | text = toRoman(getListCounter()).toUpperCase(); } else if (listStyle == IdentValue.DECIMAL_LEADING_ZERO) { text = (getListCounter() >= 10 ? "" : "0") + getListCounter(); | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text = getListCounter() + "."; | text = Integer.toString(getListCounter()); | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
text += " "; | text += ". "; | private MarkerData.TextMarker makeTextMarker(LayoutContext c, IdentValue listStyle) { String text = ""; if (listStyle == IdentValue.LOWER_LATIN || listStyle == IdentValue.LOWER_ALPHA) { text = toLatin(getListCounter()).toLowerCase() + "."; } else if (listStyle == IdentValue.UPPER_LAT... |
if (securityConfiguration == null) | if (securityConfiguration != null) | public String registerDestination(boolean isQueue, String name, String jndiName, Element securityConfiguration) throws JMSException { jndiName = destinationJNDIMapper.registerDestination(isQueue, name, jndiName); if (securityConfiguration == null) { // rel... |
securityConfiguration = getDefaultSecurityConfig(); | sm.setSecurityConfig(isQueue, name, securityConfiguration); | public String registerDestination(boolean isQueue, String name, String jndiName, Element securityConfiguration) throws JMSException { jndiName = destinationJNDIMapper.registerDestination(isQueue, name, jndiName); if (securityConfiguration == null) { // rel... |
sm.setSecurityConfig(name, securityConfiguration); | public String registerDestination(boolean isQueue, String name, String jndiName, Element securityConfiguration) throws JMSException { jndiName = destinationJNDIMapper.registerDestination(isQueue, name, jndiName); if (securityConfiguration == null) { // rel... | |
sm.setSecurityConfig(name, securityConfig); | sm.setSecurityConfig(isQueue, name, securityConfig); | public void setSecurityConfiguration(boolean isQueue, String name, Element securityConfig) throws JMSException { sm.setSecurityConfig(name, securityConfig); } |
sm.clearSecurityConfig(name); | sm.clearSecurityConfig(isQueue, name); | public void unregisterDestination(boolean isQueue, String name) throws JMSException { destinationJNDIMapper.unregisterDestination(isQueue, name); sm.clearSecurityConfig(name); } |
Message m = sub2.receive(2000); | Message m = sub2.receiveNoWait(); | public void testCannotReceiveMessageOnStoppedConnection() throws Exception { TopicConnection conn1 = ((TopicConnectionFactory)cf).createTopicConnection(); TopicConnection conn2 = ((TopicConnectionFactory)cf).createTopicConnection(); TopicSession sess1 = conn1.createTopicSession(false, Session.... |
TextMessage tm = (TextMessage)sub2.receive(2000); | TextMessage tm = (TextMessage)sub2.receiveNoWait(); | public void testCannotReceiveMessageOnStoppedConnection() throws Exception { TopicConnection conn1 = ((TopicConnectionFactory)cf).createTopicConnection(); TopicConnection conn2 = ((TopicConnectionFactory)cf).createTopicConnection(); TopicSession sess1 = conn1.createTopicSession(false, Session.... |
rpcServer.register(peerID, this); | protected void doJoin() throws DistributedException { DistributedPipeOutput output = new DistributedPipeOutput(pipeID, queue); if (!rpcServer.registerUnique(pipeID, output)) { throw new IllegalStateException("More than one server subordinates tried " + ... | |
else | public void setProperty(String name, Object value) throws IllegalArgumentException { if (IS_PREFIX_DEFAULTING.equals(name)) prefixDefaulting = ((Boolean) value).booleanValue(); throw new IllegalArgumentException(name); } | |
channel = new DurableSubscription("testDurableSubscription", null, null, ms, pm); | channel = new DurableSubscription("clientid123", "testDurableSubscription", null, null, ms, pm); | public void setUp() throws Exception { super.setUp(); pm = new HSQLDBPersistenceManager(); ms = new PersistentMessageStore("persistent-message-store", pm); tr.setPersistenceManager(pm); channel = new DurableSubscription("testDurableSubscription", null, null, ms, pm); log.debug("setup ... |
long expected = ( now - timestamp ) * ( max - min ) / ( progress - min ); | long expected = ( progress - min == 0 ) ? ( now - timestamp ) * ( max - min ) : ( now - timestamp ) * ( max - min ) / ( progress - min ); | public void actionPerformed(ActionEvent ae) { long now = System.currentTimeMillis(); if ( first ) { if (( now - timestamp ) > millisToDecideToPopup ) { first = false; long expected = ( now - timestamp ) * ( max - min ) / ( progress - min ); if ( exp... |
BoxRendering.paint(c, box); | BoxRendering.paint(c, box, false); | public static void paintChild(Context c, Box box) { if (box.isChildrenExceedBounds()) { BoxRendering.paint(c, box); return; } if (Configuration.isTrue("xr.renderer.viewport-repaint", false)) { if (c.getGraphics().getClip() != null) { Rectangle2D o... |
public ObjectName getChannelMapperObjectName() throws Exception; | ObjectName getChannelMapperObjectName() throws Exception; | public ObjectName getChannelMapperObjectName() throws Exception; |
public ObjectName getServerPeerObjectName() throws Exception; | ObjectName getServerPeerObjectName() throws Exception; | public ObjectName getServerPeerObjectName() throws Exception; |
PS2Device pDev = new PS2Device(ps2, PS2_POINTER_DEV); pDev.setDriver(new PS2PointerDriver(ps2)); devMan.register(pDev); | if (ps2.testMouse()) { PS2Device pDev = new PS2Device(ps2, PS2_POINTER_DEV); pDev.setDriver(new PS2PointerDriver(ps2)); devMan.register(pDev); } log.debug("ps2stat 0x" + NumberUtils.hex(ps2.readStatus(), 2)); | public void findDevices(DeviceManager devMan, Bus bus) throws DeviceException { try { log.debug("Searching for PS2 devices"); final PS2Bus ps2 = new PS2Bus(bus); // register the keyboard device PS2Device kbDev = new PS2Device(ps2, PS2_KEYBOARD_DEV); kbDev.setDriver(new PS2KeyboardDriver(ps2)); devMan.regi... |
populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(actionId), currentSteps); | populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(actionId), currentSteps, ps); | public void doAction(long id, int actionId, Map inputs) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() != WorkflowEntry.ACTIVATED) { return; } WorkflowDescriptor wf = getConfiguration().... |
populateTransientMap(entry, transientVars, wf.getRegisters(), null, store.findCurrentSteps(id)); | populateTransientMap(entry, transientVars, wf.getRegisters(), null, store.findCurrentSteps(id), ps); | public void executeTriggerFunction(long id, int triggerId) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry == null) { log.warn("Cannot execute trigger #" + triggerId + " on non-existent workflow id#" + id); ... |
populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(0), currentSteps); | populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(0), currentSteps, ps); | 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); } ... |
populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(initialAction), Collections.EMPTY_LIST); | populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(initialAction), Collections.EMPTY_LIST, ps); | public long initialize(String workflowName, int initialAction, Map inputs) throws InvalidRoleException, InvalidInputException, WorkflowException { WorkflowDescriptor wf = getConfiguration().getWorkflow(workflowName); WorkflowStore store = getPersistence(); WorkflowEntry entry = store.createEntr... |
protected void populateTransientMap(WorkflowEntry entry, Map transientVars, List registers, Integer actionId, Collection currentSteps) throws WorkflowException { | protected void populateTransientMap(WorkflowEntry entry, Map transientVars, List registers, Integer actionId, Collection currentSteps, PropertySet ps) throws WorkflowException { | protected void populateTransientMap(WorkflowEntry entry, Map transientVars, List registers, Integer actionId, Collection currentSteps) throws WorkflowException { transientVars.put("context", context); transientVars.put("entry", entry); transientVars.put("store", getPersistence()); transi... |
transientVars.put(register.getVariableName(), r.registerVariable(context, entry, args)); | transientVars.put(register.getVariableName(), r.registerVariable(context, entry, args, ps)); | protected void populateTransientMap(WorkflowEntry entry, Map transientVars, List registers, Integer actionId, Collection currentSteps) throws WorkflowException { transientVars.put("context", context); transientVars.put("entry", entry); transientVars.put("store", getPersistence()); transi... |
log.info("Consuming them all from 2"); | public void test1() throws Throwable { PagingFilteredQueue queue1 = new PagingFilteredQueue("queue1", 1, ms, pm, true, true, new QueuedExecutor(), null, 100, 20, 10); PagingFilteredQueue queue2 = new PagingFilteredQueue("queue2", 2, ms, pm, true, true, new QueuedExecutor(), null, 50, 10, 5); ... | |
sessionDelegate.createConsumerDelegate(d, null, false, null); | sessionDelegate.createConsumerDelegate(d, null, false, null, false); | public MessageConsumer createConsumer(Destination d) throws JMSException { if (d == null) { throw new InvalidDestinationException("Cannot create a consumer with a null destination"); } ConsumerDelegate consumerDelegate = sessionDelegate.createConsumerDelegate(d, null, false, null); ... |
sessionDelegate.createConsumerDelegate(topic, null, false, name); | sessionDelegate.createConsumerDelegate(topic, null, false, name, false); | public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException { //As per spec. section 4.11 if (sessionType == TYPE_QUEUE_SESSION) { throw new IllegalStateException("Cannot create a durable subscriber on a QueueSession"); } if (topic == null) { ... |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); disabledTextColor = defaults.getColor("RadioButton.disabledText"); focusColor = defaults.getColor("RadioButton.focus"); selectColor = defaults.getColor("RadioButton.select"); | disabledTextColor = UIManager.getColor("RadioButton.disabledText"); focusColor = UIManager.getColor("RadioButton.focus"); selectColor = UIManager.getColor("RadioButton.select"); | public void installDefaults(AbstractButton b) { super.installDefaults(b); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); disabledTextColor = defaults.getColor("RadioButton.disabledText"); focusColor = defaults.getColor("RadioButton.focus"); selectColor = defaults.getColor("RadioButton.selec... |
g.drawRect(t.x, t.y, t.width - 2, t.height - 2); | g.drawRect(t.x - 1, t.y + 2, t.width + 2, t.height - 4); | protected void paintFocus(Graphics g, Rectangle t, Dimension d) { g.setColor(focusColor); // minus 2 because of line thickness. Prevents border // from being cutoff. g.drawRect(t.x, t.y, t.width - 2, t.height - 2); } |
Set messageIDs = getUndelivered(); Set s = new HashSet(); for(Iterator i = messageIDs.iterator(); i.hasNext(); ) { Routable r = (Routable)messages.get(i.next()); if (r != null) { s.add(r); } } return s; | return browse(null); | public Set browse() { // TODO Very inefficient implementation, change it Set messageIDs = getUndelivered(); Set s = new HashSet(); for(Iterator i = messageIDs.iterator(); i.hasNext(); ) { Routable r = (Routable)messages.get(i.next()); if (r != null) { s.a... |
NodeList attributs = step.getElementsByTagName("meta"); for (int i = 0; i < attributs.getLength(); i++) { Element meta = (Element) attributs.item(i); | NodeList children = step.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = (Node) children.item(i); if (child.getNodeName().equals("meta")) { Element meta = (Element) child; | protected void init(Element step) { try { setId(Integer.parseInt(step.getAttribute("id"))); } catch (Exception ex) { throw new IllegalArgumentException("Invalid step id value " + step.getAttribute("id")); } name = step.getAttribute("name"); NodeList attributs... |
} | protected void init(Element step) { try { setId(Integer.parseInt(step.getAttribute("id"))); } catch (Exception ex) { throw new IllegalArgumentException("Invalid step id value " + step.getAttribute("id")); } name = step.getAttribute("name"); NodeList attributs... | |
if (tabCount > runCount) runCount = tabCount; | protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex) { Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); boolean isScroll = tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT; // Please note: the ordering of the painting is important. // we WANT to pai... | |
public synchronized void addContainerListener(ContainerListener l) | public synchronized void addContainerListener(ContainerListener listener) | public synchronized void addContainerListener(ContainerListener l) { containerListener = AWTEventMulticaster.add(containerListener, l); } |
containerListener = AWTEventMulticaster.add(containerListener, l); | containerListener = AWTEventMulticaster.add(containerListener, listener); | public synchronized void addContainerListener(ContainerListener l) { containerListener = AWTEventMulticaster.add(containerListener, l); } |
public synchronized void removeContainerListener(ContainerListener l) | public synchronized void removeContainerListener(ContainerListener listener) | public synchronized void removeContainerListener(ContainerListener l) { containerListener = AWTEventMulticaster.remove(containerListener, l); } |
containerListener = AWTEventMulticaster.remove(containerListener, l); | containerListener = AWTEventMulticaster.remove(containerListener, listener); | public synchronized void removeContainerListener(ContainerListener l) { containerListener = AWTEventMulticaster.remove(containerListener, l); } |
String n = function.getAttribute("negate"); boolean negate; if("true".equalsIgnoreCase(n) || "yes".equalsIgnoreCase(n)) | List args = XMLUtil.getChildElements(function, "arg"); for(int l = 0; l < args.size(); l++) | protected void init(Element function) { type = function.getAttribute("type"); String n = function.getAttribute("negate"); boolean negate; if("true".equalsIgnoreCase(n) || "yes".equalsIgnoreCase(n)) { negate = true; } else { negate = false; } NodeList args = function.getElement... |
negate = true; } else { negate = false; } NodeList args = function.getElementsByTagName("arg"); for(int l = 0; l < args.getLength(); l++) { Element arg = (Element)args.item(l); | Element arg = (Element)args.get(l); | protected void init(Element function) { type = function.getAttribute("type"); String n = function.getAttribute("negate"); boolean negate; if("true".equalsIgnoreCase(n) || "yes".equalsIgnoreCase(n)) { negate = true; } else { negate = false; } NodeList args = function.getElement... |
ref = null; System.gc(); | ref.releaseReference(); | public void testTwoStoresSameDatabase() throws Exception { Message m = MessageFactory.createMessage("message0", true, 777l, 888l, 9, headers, "payload"); assertEquals(0, ((JDBCPersistenceManager)pm).getMessageReferenceCount(m.getMessageID())); MessageReference ref = ms.reference(m); log.debug("... |
Thread.sleep(3000); | public void testTwoStoresSameDatabase() throws Exception { Message m = MessageFactory.createMessage("message0", true, 777l, 888l, 9, headers, "payload"); assertEquals(0, ((JDBCPersistenceManager)pm).getMessageReferenceCount(m.getMessageID())); MessageReference ref = ms.reference(m); log.debug("... | |
ref = null; ref2 = null; System.gc(); | ref.releaseReference(); ref2.releaseReference(); | public void testTwoStoresSameDatabase() throws Exception { Message m = MessageFactory.createMessage("message0", true, 777l, 888l, 9, headers, "payload"); assertEquals(0, ((JDBCPersistenceManager)pm).getMessageReferenceCount(m.getMessageID())); MessageReference ref = ms.reference(m); log.debug("... |
master.positionAbsolute(c); | master.positionAbsolute(c, BlockBox.POSITION_BOTH); | private void layoutAbsoluteChild(LayoutContext c, Layer child) { BlockBox master = (BlockBox)child.getMaster(); if (child.getMaster().getStyle().isBottomAuto()) { // Set top, left master.positionAbsolute(c); master.positionAbsoluteOnPage(c); c.reInit(child.g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.