rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
bus.processQueues(); | protected synchronized void startDevice() throws DriverException { irq = bus.claimResources(getDevice(), MOUSE_IRQ); super.startDevice(); } | |
try { setEnabled(false); } catch (DeviceException ex) { log.debug("Error disabling keyboard", ex); } | protected synchronized void stopDevice() throws DriverException { super.stopDevice(); irq.release(); irq = null; bus.releaseResources(); } | |
catch (JMSException e) { throw e; } | public DurableSubscription getDurableSubscription(String clientID, String subscriptionName, MessageStore ms, ... | |
if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } | DurableSubscription removed = removeDurableSubscriptionInMemory(clientID, subscriptionName); | public boolean removeDurableSubscription(String clientID, String subscriptionName) throws JMSException { try { if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } if (clientID == null) { throw new JMSException("Cli... |
if (clientID == null) | if (removed != null) | public boolean removeDurableSubscription(String clientID, String subscriptionName) throws JMSException { try { if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } if (clientID == null) { throw new JMSException("Cli... |
throw new JMSException("Client ID must be set for connection!"); | deleteMappingRow(removed.getChannelID()); return true; | public boolean removeDurableSubscription(String clientID, String subscriptionName) throws JMSException { try { if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } if (clientID == null) { throw new JMSException("Cli... |
Map subs = (Map)subscriptions.get(clientID); if (subs == null) | else | public boolean removeDurableSubscription(String clientID, String subscriptionName) throws JMSException { try { if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } if (clientID == null) { throw new JMSException("Cli... |
if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } DurableSubscription removed = (DurableSubscription)subs.remove(subscriptionName); if (subs.size() == 0) { subscriptions.remove(clientID); } if (removed == null) { return false; } deleteMappingRow(removed.getChannelID()); ... | public boolean removeDurableSubscription(String clientID, String subscriptionName) throws JMSException { try { if (log.isTraceEnabled()) { log.trace("removing durable subscription " + subscriptionName); } if (clientID == null) { throw new JMSException("Cli... | |
if (!isQueue) { Topic topic = (Topic)dest; Iterator iter = topic.iterator(); while (iter.hasNext()) { CoreSubscription sub = (CoreSubscription)iter.next(); if (sub.isRecoverable()) { DurableSubscription dursub = (DurableSubscription)sub; String clientID = dursub.getClientID(); String name = dursub.getName(); remo... | public CoreDestination undeployCoreDestination(boolean isQueue, String destName) { Map m = isQueue ? queues : topics; CoreDestination dest = (CoreDestination)m.remove(destName); if (dest != null) { idMap.remove(new Long(dest.getId())); } return dest; ... | |
current = null; | iter.detach(); | public int getLength() { int retval = 0; NodeIterator iter = createIterator(); while (iter.nextNode() != null) { retval++; } current = null; return retval; } |
if (current != null) current.detach(); | public void handleEvent(Event e) { MutationEvent mutation = (MutationEvent) e; Node related = mutation.getRelatedNode(); // XXX if it's got children ... check all kids too, they // will invalidate our saved index if (related.getNodeType() != Node.ELEMENT_NODE || rel... | |
current.detach(); | public Node item(int index) { if (current == null) { current = createIterator(); lastIndex = -1; } // last node or before? go backwards if (index <= lastIndex) { while (index != lastIndex) { current.previousNode (); lastIndex--; ... | |
block.setStyle(new Style(c.getCurrentStyle(), 0, c)); | block.setStyle(new Style(c.getCurrentStyle(), 0)); | public static Box createBox(LayoutContext c, Content content) { Box block = new AnonymousBlockBox(content); c.pushStyle(CascadedStyle.emptyCascadedStyle); block.setStyle(new Style(c.getCurrentStyle(), 0, c)); c.popStyle(); return block; } |
log.debug("USBStorageBulkTransport completed with status:" + request.getStatus()); | log.debug("*** Request data : " + request.toString()); log.debug("USBStorageBulkTransport completed with status : 0x" + NumberUtils.hex(request.getStatus(),4)); | public void requestCompleted(USBRequest request) { log.debug("USBStorageBulkTransport completed with status:" + request.getStatus()); } |
log.debug("USBStorageBulkTransport failed with status:" + request.getStatus()); | log.debug("*** Request data : " + request.toString()); log.debug("USBStorageBulkTransport failed with status : 0x" + NumberUtils.hex(request.getStatus(),4)); | public void requestFailed(USBRequest request) { log.debug("USBStorageBulkTransport failed with status:" + request.getStatus()); pipe.close(); } |
final USBRequest req = pipe.createRequest(new SetupPacket(0x01 | final USBRequest req = pipe.createRequest(new SetupPacket(USB_DIR_OUT | public void reset() throws USBException { final USBControlPipe pipe = device.getDefaultControlPipe(); final USBRequest req = pipe.createRequest(new SetupPacket(0x01 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0xFF, 0, 0, 0), null); pipe.syncSubmit(req, GET_TIMEOUT); } |
pipe.syncSubmit(req,5000); | pipe.asyncSubmit(req); | public void transport(CDB cdb) { try { byte[] scsiCmd = cdb.toByteArray(); // Setup command wrapper BulkCommandBlockWrapper bcb = new BulkCommandBlockWrapper(); bcb.setSignature(US_BULK_CB_SIGN); bcb.setDataTransferLength(scsiCmd.length); bcb... |
return findBoxX(panel.body_box, x, y); | return findBoxX(panel.getRootBox(), x, y); | public static int findBoxX(BasicPanel panel, int x, int y) { return findBoxX(panel.body_box, x, y); } |
super.setUp(); DatabaseHelper.createDatabase(""); XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("osworkflow-spring.xml")); workflow.setConfiguration((Configuration) beanFactory.getBean("osworkflowConfiguration")); | try { super.setUp(); DatabaseHelper.createDatabase(""); XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("osworkflow-spring.xml")); workflow.setConfiguration((Configuration) beanFactory.getBean("osworkflowConfiguration")); } catch(Exception e) { log.error(e); } | protected void setUp() throws Exception { super.setUp(); DatabaseHelper.createDatabase(""); XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("osworkflow-spring.xml")); //workflow = (AbstractWorkflow) beanFactory.getBean("workflow"); workflow.setConfiguration((... |
if (where + 1 >= attributes.size ()) | if (where >= attributes.size ()) | public Object nextElement () throws NoSuchElementException { if (where + 1 >= attributes.size ()) throw new NoSuchElementException ("no more elements"); ++where; Attribute at = (Attribute) attributes.get (where); return id ? (Object) at.getID () : (Object) at; } |
Attribute at = (Attribute) attributes.get (where); | public Object nextElement () throws NoSuchElementException { if (where + 1 >= attributes.size ()) throw new NoSuchElementException ("no more elements"); ++where; Attribute at = (Attribute) attributes.get (where); return id ? (Object) at.getID () : (Object) at; } | |
if (! (obj instanceof BasicAttributes)) return false; BasicAttributes b = (BasicAttributes) obj; if (ignoreCase != b.ignoreCase || attributes.size () != b.attributes.size ()) | if (! (obj instanceof Attributes)) | public boolean equals (Object obj) { if (! (obj instanceof BasicAttributes)) return false; BasicAttributes b = (BasicAttributes) obj; if (ignoreCase != b.ignoreCase || attributes.size () != b.attributes.size ()) return false; // Does order matter? for (int i = 0; i < attributes.size (); ++i)... |
for (int i = 0; i < attributes.size (); ++i) | Attributes bs = (Attributes) obj; if (ignoreCase != bs.isCaseIgnored() || attributes.size () != bs.size ()) return false; NamingEnumeration bas = bs.getAll(); while (bas.hasMoreElements()) | public boolean equals (Object obj) { if (! (obj instanceof BasicAttributes)) return false; BasicAttributes b = (BasicAttributes) obj; if (ignoreCase != b.ignoreCase || attributes.size () != b.attributes.size ()) return false; // Does order matter? for (int i = 0; i < attributes.size (); ++i)... |
if (! attributes.get (i).equals (b.attributes.get (i))) | Attribute a = (Attribute) bas.nextElement(); Attribute b = get(a.getID ()); if (! a.equals(b)) | public boolean equals (Object obj) { if (! (obj instanceof BasicAttributes)) return false; BasicAttributes b = (BasicAttributes) obj; if (ignoreCase != b.ignoreCase || attributes.size () != b.attributes.size ()) return false; // Does order matter? for (int i = 0; i < attributes.size (); ++i)... |
protected HttpsURLConnection(URL url) throws IOException | protected HttpsURLConnection(URL url) | protected HttpsURLConnection(URL url) throws IOException { super(url); } |
} try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws PluginException { resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); final PluginDescriptorModel reqDescr = (PluginDescriptorModel) ... | try { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws PluginException { resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); final PluginDescriptorModel reqDescr = (PluginDescriptorModel) reg... | final void startPlugin(final PluginRegistryModel registry) throws PluginException { if (started) { return; } synchronized (this) { if (started || starting) { return; } starting = true; } // BootLog.info("Resolve... |
getPlugin().start(); return null; | }); } catch (PrivilegedActionException ex) { BootLog.error("Error starting plugin", ex); try { Thread.sleep(10000); } catch (InterruptedException ex1) { | final void startPlugin(final PluginRegistryModel registry) throws PluginException { if (started) { return; } synchronized (this) { if (started || starting) { return; } starting = true; } // BootLog.info("Resolve... |
}); } catch (PrivilegedActionException ex) { BootLog.error("Error starting plugin", ex); try { Thread.sleep(10000); } catch (InterruptedException ex1) { | } finally { started = true; | final void startPlugin(final PluginRegistryModel registry) throws PluginException { if (started) { return; } synchronized (this) { if (started || starting) { return; } starting = true; } // BootLog.info("Resolve... |
} finally { started = true; | final void startPlugin(final PluginRegistryModel registry) throws PluginException { if (started) { return; } synchronized (this) { if (started || starting) { return; } starting = true; } // BootLog.info("Resolve... | |
resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); final PluginDescriptorModel reqDescr = (PluginDescriptorModel) registry .getPluginDescriptor(reqId); reqDescr.startPlugin(registry); | resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); final PluginDescriptorModel reqDescr = (PluginDescriptorModel) registry .getPluginDescriptor(reqId); reqDescr.startPlugin(registry); } getPlugin().start(); return null; | public Object run() throws PluginException { resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); // BootLog.info("S... |
getPlugin().start(); return null; } | public Object run() throws PluginException { resolve(registry); final int reqMax = requires.length; for (int i = 0; i < reqMax; i++) { final String reqId = requires[i].getPluginId(); // BootLog.info("S... | |
if (methodName.equals("createSessionDelegate") || methodName.equals("createProducerDelegate")) | if (methodName.equals("createSessionDelegate") || methodName.equals("createProducerDelegate") || methodName.equals("createBrowserDelegate")) | public Object invoke(Invocation invocation) throws Throwable { String methodName = ((MethodInvocation) invocation).getMethod().getName(); Object retVal = invocation.invokeNext(); //TODO browser if (methodName.equals("createSessionDelegate") || methodName.equals("createProducerDelega... |
super(element); | super(element, Y_AXIS); | public ParagraphView(Element element) { super(element); } |
sDbgLogger.setLevel(Level.OFF); | public XRStyleReference( Context context ) { this(); _context = context; } | |
if (log.isTraceEnabled()) { log.trace("Interrupting receiving thread:"); } | public void close() { if (closed) { return; } closed = true; if (receivingThread != null) { receivingThread.interrupt(); } // TODO Get rid of this (http://jira.jboss.org/jira/browse/JBMESSAGING-92) try { // unregister this callback handler a... | |
return m; | if (m == null) { if (log.isTraceEnabled()) { log.trace("No message available"); } return null; } | public Message receive(long timeout) throws JMSException, InterruptedException { long startTimestamp = System.currentTimeMillis(); // make sure the current state allows receiving synchronized(this) { if (listener != null) { throw new JBossJMSExceptio... |
receivingThread = null; | public Message receive(long timeout) throws JMSException, InterruptedException { long startTimestamp = System.currentTimeMillis(); // make sure the current state allows receiving synchronized(this) { if (listener != null) { throw new JBossJMSExceptio... | |
if(currentWorkspace instanceof Workspace) { try { String workflowFile = ((Workspace)currentWorkspace).getWorkflowFile(workflowName); if(workflowFile != null) monitor.addFileChangeListener(this, workflowName, workflowFile, 5000); } catch(FileNotFoundException e) { e.printStackTrace(); } } | public void createGraph(String workflowName) { //Workspace currentWorkspace = manager.getCurrentWorkspace(); WorkflowFactory currentWorkspace = manager.getCurrentWorkspace(); Layout layout = (Layout)currentWorkspace.getLayout(workflowName); WorkflowGraphModel model = new WorkflowGraphModel(layout); mo... | |
menuBar.add(editMenu); | public static JMenuBar createMenubar(WorkspaceManager manager) { JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu(ResourceManager.getString("menu.file")); JMenu itemNew = new JMenu(ResourceManager.getString("menu.new")); itemNew.setIcon(ResourceManager.getIcon("newfile")); itemNew.setHori... | |
public static final synchronized ResourceBundle getBundle (String baseName, Locale locale, ClassLoader classLoader) | public static final ResourceBundle getBundle(String baseName) | public static final synchronized ResourceBundle getBundle (String baseName, Locale locale, ClassLoader classLoader) { // This implementation searches the bundle in the reverse direction // and builds the parent chain on the fly. Locale defaultLocale = Locale.getDefault(); if (defaultLocale != lastDefa... |
Locale defaultLocale = Locale.getDefault(); if (defaultLocale != lastDefaultLocale) { resourceBundleCache = new HashMap(); lastDefaultLocale = defaultLocale; } HashMap cache = (HashMap) resourceBundleCache.get(classLoader); StringBuffer sb = new StringBuffer(60); sb.append(baseName).append('_').append(locale); String n... | return getBundle(baseName, Locale.getDefault(), security.getCallingClassLoader()); | public static final synchronized ResourceBundle getBundle (String baseName, Locale locale, ClassLoader classLoader) { // This implementation searches the bundle in the reverse direction // and builds the parent chain on the fly. Locale defaultLocale = Locale.getDefault(); if (defaultLocale != lastDefa... |
NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++) | List l = XMLUtil.getChildElements(s, "status"); for(int i = 0; i < l.size(); i++) | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
Element status = (Element)l.item(i); | Element status = (Element)l.get(i); | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
NodeList joins = j.getElementsByTagName("condition"); for(int i = 0; i < joins.getLength(); i++) | List joins = XMLUtil.getChildElements(j, "condition"); for(int i = 0; i < joins.size(); i++) | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
Element condition = (Element)joins.item(i); | Element condition = (Element)joins.get(i); | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
NodeList joins = p.getElementsByTagName("function"); for(int i = 0; i < joins.getLength(); i++) | List functions = XMLUtil.getChildElements(p, "function"); for(int i = 0; i < functions.size(); i++) | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
Element function = (Element)joins.item(i); | Element function = (Element)functions.get(i); | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
NodeList joins = pm.getElementsByTagName("condition"); for(int i = 0; i < joins.getLength(); i++) | List joins = XMLUtil.getChildElements(pm, "condition"); for(int i = 0; i < joins.size(); i++) | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
NodeList joins = r.getElementsByTagName("condition"); for(int i = 0; i < joins.getLength(); i++) | List conditions = XMLUtil.getChildElements(r, "condition"); for(int i = 0; i < conditions.size(); i++) | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
Element condition = (Element)joins.item(i); | Element condition = (Element)conditions.get(i); | protected void init(Element root) { // joinconditions Element s = XMLUtil.getChildElement(root, "statusvalues"); defaultNextStatus = s.getAttribute("default-next"); defaultOldStatus = s.getAttribute("default-old"); NodeList l = s.getElementsByTagName("status"); for(int i = 0; i < l.getLength(); i++... |
descriptor.getMetaAttributes().put("generator", "OSWOrkflow Designer"); | descriptor.getMetaAttributes().put("generator", "OSWorkflow Designer"); | public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, WorkflowGraph graph, boolean replace) throws FactoryException { Object obj = layouts.get(name); if(obj instanceof Layout) { Layout layout = (Layout)obj; try { WorkflowConfig config = (WorkflowConfig)workflows.get(n... |
descriptor.getMetaAttributes().put("generator", "OSWOrkflow Designer"); | descriptor.getMetaAttributes().put("generator", "OSWorkflow Designer"); | public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, WorkflowGraph graph, boolean replace) throws Exception { String layoutBuffer = ""; String workflowBuffer; Object obj = layouts.get(name); if(obj instanceof Layout) { Layout layout = (Layout)obj; try { HTT... |
List conditions = null; | ConditionsDescriptor conditions = null; | 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... |
conditions = restriction.getConditions(); | conditions = restriction.getConditionsDescriptor(); | 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... |
if (passesConditions(null, conditions, Collections.unmodifiableMap(transientVars), ps, s.getId())) { | if (passesConditions(conditions, Collections.unmodifiableMap(transientVars), ps, s.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... |
if (passesConditions(null, security.getRestriction().getConditions(), transientVars, ps, xmlStep.getId())) { s.add(security.getName()); | if (security.getRestriction() != null) { if (passesConditions(security.getRestriction().getConditionsDescriptor(), transientVars, ps, xmlStep.getId())) { s.add(security.getName()); } | public List getSecurityPermissions(long id) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName()); PropertySet ps = store.getPropertySet(id); ... |
List conditions = null; | ConditionsDescriptor conditions = null; | private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps, int stepId) throws WorkflowException { if (action == null) { return false; } RestrictionDescriptor restriction = action.getRestriction(); List conditions = null; if (restrictio... |
conditions = restriction.getConditions(); | conditions = restriction.getConditionsDescriptor(); | private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps, int stepId) throws WorkflowException { if (action == null) { return false; } RestrictionDescriptor restriction = action.getRestriction(); List conditions = null; if (restrictio... |
return passesConditions(null, conditions, Collections.unmodifiableMap(transientVars), ps, stepId); | return passesConditions(conditions, Collections.unmodifiableMap(transientVars), ps, stepId); | private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps, int stepId) throws WorkflowException { if (action == null) { return false; } RestrictionDescriptor restriction = action.getRestriction(); List conditions = null; if (restrictio... |
Layer parent = this.layer; while (! parent.isStackingContext()) { parent = parent.getParent(); | Layer parent = this.layer; if (master.getStyle().isFixed()) { while (parent.getParent() != null) { parent = parent.getParent(); } } else { while (! parent.isStackingContext()) { parent = parent.getParent(); } | public void pushLayer(Box master) { Layer layer = null; if (rootLayer == null) { layer = new Layer(master); rootLayer = layer; } else { Layer parent = this.layer; while (! parent.isStackingContext()) { parent = parent.getParent(... |
valid = new Boolean(result); | valid = Boolean.valueOf(result); | public boolean selfTest() { if (valid == null) { boolean result = super.selfTest(); // do symmetry tests if (result) { result = testKat(KAT_KEY, KAT_CT); } valid = new Boolean(result); } return valid.booleanValue(); } |
start, end - len); rootElement.replace(i1, i2 - i1, new Element[]{ newEl }); | start, end); rootElement.replace(i1, i2 - i1 + 1, new Element[]{ newEl }); | protected void removeUpdate(DefaultDocumentEvent event) { super.removeUpdate(event); int p0 = event.getOffset(); int len = event.getLength(); int p1 = len + p0; // check if we must collapse some elements int i1 = rootElement.getElementIndex(p0); int i2 = rootElement.getElementIndex(p1); if (i... |
if (Configuration.isTrue("xr.incremental.enabled", false)) { | if (!root.isPrintView() && Configuration.isTrue("xr.incremental.enabled", false)) { | public void startRepaintLoop() { //Uu.sleep(2000); while (true) { //Uu.sleep(1000); // wait for a repaint event ReflowEvent evt = root.queue.waitForNextRepaintEvent(); if (evt == null) { // we're being shutdown return; ... |
rs = (MessageSupport)MessageFactory.createJBossMessage(0, false, 0, 0, (byte)4, null, null, 0, JBossMessage.TYPE, | rs = (MessageSupport)MessageFactory.createMessage(0, false, 0, 0, (byte)4, null, null, JBossMessage.TYPE, | protected void setUp() throws Exception { rs = (MessageSupport)MessageFactory.createJBossMessage(0, false, 0, 0, (byte)4, null, null, 0, JBossMessage.TYPE, null, null, null, null, null, null... |
return bandOffsets; | return (int[]) bandOffsets.clone(); | public final int[] getBandOffsets() { return bandOffsets; } |
return bankIndices; | return (int[]) bankIndices.clone(); | public final int[] getBankIndices() { return bankIndices; } |
+(h <= 0 ? " height<=0" : " height is ok")); | + (h <= 0 ? " height<=0" : " height is ok")); long area = (long) w * (long) h; if (area > Integer.MAX_VALUE) throw new IllegalArgumentException("w * h exceeds Integer.MAX_VALUE."); | public SampleModel(int dataType, int w, int h, int numBands) { if ((w <= 0) || (h <= 0)) throw new IllegalArgumentException((w <= 0 ? " width<=0" : " width is ok") +(h <= 0 ? " height<=0" : " height is ok")); // FIXME: How can an int be greater than Integer.MAX_VALUE? ... |
if (numBands <= 0) throw new IllegalArgumentException("Requires numBands > 0."); | public SampleModel(int dataType, int w, int h, int numBands) { if ((w <= 0) || (h <= 0)) throw new IllegalArgumentException((w <= 0 ? " width<=0" : " width is ok") +(h <= 0 ? " height<=0" : " height is ok")); // FIXME: How can an int be greater than Integer.MAX_VALUE? ... | |
public void setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) { int size = w*h; int numDataElements = getNumDataElements(); int dataSize = numDataElements*size; Object pixelData; switch (getTransferType()) { case DataBuffer.TYPE_BYTE: pixelData = new byte[numDataElements]; break; case DataBuffer... | public abstract void setDataElements(int x, int y, Object obj, DataBuffer data); | public void setDataElements(int x, int y, int w, int h, Object obj, DataBuffer data) { int size = w*h; int numDataElements = getNumDataElements(); int dataSize = numDataElements*size; Object pixelData; switch (getTransferType()) { case DataBuffer.TYPE_BYTE: pixelData = new byte[numDat... |
public void readLock() | public final void readLock() | public void readLock() { if (currentWriter != null && currentWriter.equals(Thread.currentThread())) return; synchronized (documentCV) { while (currentWriter != null || numWritersWaiting > 0) { try { documentCV.wait(); } ca... |
public void readUnlock() | public final void readUnlock() | public void readUnlock() { // Note we could have a problem here if readUnlock was called without a // prior call to readLock but the specs simply warn users to ensure that // balance by using a finally block: // readLock() // try // { // doSomethingHere // } // finally // { // ... |
public int getIndex(); | int getIndex(); | public int getIndex(); |
if(cell == null) { return; } else | if(cell != null) | public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(graph.getModel().isEdge(cell)) ... |
view.update(); view.refresh(graph.getModel(), graph.getGraphLayoutCache(), false); graph.getSelectionModel().setSelectionCell(view.getCell()); | graph.getGraphLayoutCache().edit(new Object[]{view.getCell()}, map); | public void actionPerformed(ActionEvent e) { Object cell = graph.getFirstCellForLocation(location.x, location.y); if(cell == null) { return; } else { CellView view = (graph.getGraphLayoutCache().getMapping(cell, false)); if(graph.getModel().isEdge(cell)) ... |
public File getArchiveFileInCache(File cache, String organisation, String module, String revision, String artifact, String type, String ext) { return new File(cache, getArchivePathInCache(organisation, module, revision, artifact, type, ext)); | public File getArchiveFileInCache(File cache, Artifact artifact) { return new File(cache, getArchivePathInCache(artifact)); | public File getArchiveFileInCache(File cache, String organisation, String module, String revision, String artifact, String type, String ext) { return new File(cache, getArchivePathInCache(organisation, module, revision, artifact, type, ext)); } |
public static String getReportFileName(ModuleId mid, String conf) { return mid.getOrganisation() + "-" + mid.getName() + "-" + conf+".xml"; | public static String getReportFileName(ConfigurationResolveReport report) { return getReportFileName(report.getModuleDescriptor().getModuleRevisionId().getModuleId(), report.getConfiguration()); | public static String getReportFileName(ModuleId mid, String conf) { return mid.getOrganisation() + "-" + mid.getName() + "-" + conf+".xml"; } |
public DependencyResolver getResolver(String resolverName) { | public DependencyResolver getResolver(ModuleId moduleId) { | public DependencyResolver getResolver(String resolverName) { if (_dictatorResolver != null) { return _dictatorResolver; } DependencyResolver resolver = (DependencyResolver)_resolversMap.get(resolverName); if (resolver == null) { Message.error("unknown resolver "+res... |
DependencyResolver resolver = (DependencyResolver)_resolversMap.get(resolverName); if (resolver == null) { Message.error("unknown resolver "+resolverName); } return resolver; | String resolverName = getResolverName(moduleId); return getResolver(resolverName); | public DependencyResolver getResolver(String resolverName) { if (_dictatorResolver != null) { return _dictatorResolver; } DependencyResolver resolver = (DependencyResolver)_resolversMap.get(resolverName); if (resolver == null) { Message.error("unknown resolver "+res... |
boolean isCompleted = true; | boolean isCompleted = wf.getGlobalActions().size() == 0; | protected void checkImplicitFinish(ActionDescriptor action, long id) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName()); Collection currentSteps = st... |
for (Iterator iterator = currentSteps.iterator(); iterator.hasNext();) { | for (Iterator iterator = currentSteps.iterator(); isCompleted && iterator.hasNext();) { | protected void checkImplicitFinish(ActionDescriptor action, long id) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName()); Collection currentSteps = st... |
if (FontUtil.len(c, inline.getSubstring(), font) <= avail) { | String currentString = inline.getSubstring(); int n = 0; int possibleWrap; boolean lastLenCheck = false; while (true) { possibleWrap = n; n = currentString.indexOf(WhitespaceStripper.SPACE, n + 1); if (n == -1) { break; } lastLenCheck = FontUtil.len(c, currentString.substring(0, n), font) > avail; if (lastLenCheck) { ... | public static void breakText(Context c, InlineTextBox inline, InlineBox prev_align, int avail, Font font) { boolean db = false; if (db) { Uu.p("========================="); Uu.p("breaking: " + inline); //Uu.p("breaking : '" + inline.getSubstring() + "'"); //... |
String currentString = inline.getSubstring(); int n = currentString.length(); int possibleWrap; do { possibleWrap = n; n = currentString.lastIndexOf(WhitespaceStripper.SPACE, possibleWrap - 1); } while (n > 0 && FontUtil.len(c, currentString.substring(0, n), font) > avail); | if (possibleWrap == 0) { if (lastLenCheck) { n = 0; } else { possibleWrap = currentString.length(); } } | public static void breakText(Context c, InlineTextBox inline, InlineBox prev_align, int avail, Font font) { boolean db = false; if (db) { Uu.p("========================="); Uu.p("breaking: " + inline); //Uu.p("breaking : '" + inline.getSubstring() + "'"); //... |
inline.setSubstring(inline.start_index, inline.start_index + n); | inline.setSubstring(inline.start_index, inline.start_index + possibleWrap); | public static void breakText(Context c, InlineTextBox inline, InlineBox prev_align, int avail, Font font) { boolean db = false; if (db) { Uu.p("========================="); Uu.p("breaking: " + inline); //Uu.p("breaking : '" + inline.getSubstring() + "'"); //... |
BoxRendering.paint( c, body_box, false, false ); | c.pushStyle(new CascadedStyle()); BoxRendering.paint(c, body_box, false, false); c.popStyle(); | protected void doRender( Context c ) { // paint the normal swing background first // but only if we aren't printing. Graphics g = c.getGraphics(); if ( !( g instanceof PrinterGraphics ) ) { g.setColor( getBackground() ); g.fillRect( 0, 0, getWidth(), getHeight() ); ... |
public JBossXAResource(ResourceManager rm) | public JBossXAResource(ResourceManager rm, SessionDelegate session) | public JBossXAResource(ResourceManager rm) { trace = log.isTraceEnabled(); this.rm = rm; //this.session = session; } |
this.session = session; | public JBossXAResource(ResourceManager rm) { trace = log.isTraceEnabled(); this.rm = rm; //this.session = session; } | |
try { String asfReceiverID = session.getAsfReceiverID(); session.redeliver(asfReceiverID); } catch (JMSException e) { log.error("Failed to initiate redelivery"); throw new XAException(XAException.XAER_RMERR); } | public void rollback(Xid xid) throws XAException { if (log.isTraceEnabled()) log.trace("Rollback xid=" + xid + " " + this); rm.rollback(xid); } | |
this.currentTxID = null; | this.currentTxID = rm.createLocalTx(); | private void unsetCurrentTransactionId(final Xid xid) { if (xid == null) throw new org.jboss.util.NullArgumentException("xid"); if (trace) log.trace("Unsetting current tx xid=" + xid + " previous: " + this.currentTxID + " " + this); // Don't unset the xid if it has previously been s... |
java.io.Reader reader; | java.io.InputStream stream; | private List getStylesheets() { java.io.Reader reader; List infos = new LinkedList(); long st = System.currentTimeMillis(); String uri = _nsh.getNamespace(); StylesheetInfo info = new StylesheetInfo(); info.setUri(_nsh.getNamespace()); info.setOrigin(StylesheetInfo.U... |
reader = _nsh.getDefaultStylesheet(); if (reader != null) { Stylesheet sheet = _stylesheetFactory.parse(reader, info); | stream = _nsh.getDefaultStylesheet(); if (stream != null) { Stylesheet sheet = _stylesheetFactory.parse(stream, info); | private List getStylesheets() { java.io.Reader reader; List infos = new LinkedList(); long st = System.currentTimeMillis(); String uri = _nsh.getNamespace(); StylesheetInfo info = new StylesheetInfo(); info.setUri(_nsh.getNamespace()); info.setOrigin(StylesheetInfo.U... |
return "Context: extents = " + extents | return "Context: extents = " + "("+extents.x+","+extents.y+") -> ("+extents.width+"x"+extents.height+")" | public String toString() { return "Context: extents = " + extents //" cursor = " + cursor + //"\n color = " + color + " background color = " + background_color; + " offset = " + xoff + "," + yoff ; } |
int numMessages, int ackMode, String subName, | int numMessages, long timeToStart, int ackMode, String subName, | public ReceiverJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, boolean transacted, int transactionSize, int numMessages, int ackMode, String subName, String selector, boolean noLocal, boolea... |
numMessages); | numMessages, timeToStart); | public ReceiverJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, boolean transacted, int transactionSize, int numMessages, int ackMode, String subName, String selector, boolean noLocal, boolea... |
int numMessages, boolean anon, int messageSize, | int numMessages, long timeToStart, boolean anon, int messageSize, | public SenderJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, boolean transacted, int transactionSize, int numMessages, boolean anon, int messageSize, MessageFactory messageFactory, int deli... |
numSessions, transacted, transactionSize, numMessages); | numSessions, transacted, transactionSize, numMessages, timeToStart); | public SenderJob(String slaveURL, Properties jndiProperties, String destinationName, String connectionFactoryJndiName, int numConnections, int numSessions, boolean transacted, int transactionSize, int numMessages, boolean anon, int messageSize, MessageFactory messageFactory, int deli... |
log.info("Measurement, name=" + name + ", value=" + value); | public Measurement(String name, double value) { this.name = name; this.value = new Double(value); variables = new HashMap(); } | |
return "FloatedBlock: " + _elem.getNodeName(); | return "InlineBlock: " + _elem.getNodeName(); | public String toString() { return "FloatedBlock: " + _elem.getNodeName(); } |
InlineBlockBox box = new InlineBlockBox(); box.element = content.getElement(); CalculatedStyle style = c.getCurrentStyle(); if (prev_align != null && !prev_align.break_after) { box.x = prev_align.x + prev_align.width; } else { box.x = 0; } box.y = 0; VerticalAlign.setupVerticalAlign(c, style, box); c.translate(box.x... | public static InlineBox generateReplacedInlineBox(Context c, Content content, int avail, InlineBox prev_align, LineBox curr_line) { //Uu.p("generating replaced Inline Box"); Rectangle bounds = null; BlockBox block = null; JComponent cc = c.getNamespaceHandler().getCustomComponent(content... | |
InlineBlockBox box = new InlineBlockBox(); box.element = content.getElement(); CalculatedStyle style = c.getCurrentStyle(); if (prev_align != null && !prev_align.break_after) { box.x = prev_align.x + prev_align.width; } else { box.x = 0; } box.y = 0; box.break_after = true; VerticalAlign.setupVerticalAlign(c, sty... | public static InlineBox generateReplacedInlineBox(Context c, Content content, int avail, InlineBox prev_align, LineBox curr_line) { //Uu.p("generating replaced Inline Box"); Rectangle bounds = null; BlockBox block = null; JComponent cc = c.getNamespaceHandler().getCustomComponent(content... | |
c.translate(box.x, box.y); c.translateInsets(box); if (cc != null) { | if (cc != null && !box.break_before) { | public static InlineBox generateReplacedInlineBox(Context c, Content content, int avail, InlineBox prev_align, LineBox curr_line) { //Uu.p("generating replaced Inline Box"); Rectangle bounds = null; BlockBox block = null; JComponent cc = c.getNamespaceHandler().getCustomComponent(content... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.