rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); | public synchronized void activate() throws JMSException { if (closed) { //Do nothing return; } active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); } | |
synchronized void cancelAllDeliveries() throws JMSException | void cancelAllDeliveries() throws JMSException | synchronized void cancelAllDeliveries() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " cancels deliveries"); } //Need to cancel starting at the end of the list and working to the front //in order that the messages end up back in the correct order in the channel ... |
for (int i = deliveries.size() - 1; i >= 0; i--) | List toCancel = new ArrayList(); Iterator iter = deliveries.values().iterator(); while (iter.hasNext()) { SingleReceiverDelivery d = (SingleReceiverDelivery)iter.next(); toCancel.add(d); } for (int i = toCancel.size() - 1; i >= 0; i--) | synchronized void cancelAllDeliveries() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " cancels deliveries"); } //Need to cancel starting at the end of the list and working to the front //in order that the messages end up back in the correct order in the channel ... |
SingleReceiverDelivery d = (SingleReceiverDelivery)deliveries.get(i); | SingleReceiverDelivery d = (SingleReceiverDelivery)toCancel.get(i); | synchronized void cancelAllDeliveries() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " cancels deliveries"); } //Need to cancel starting at the end of the list and working to the front //in order that the messages end up back in the correct order in the channel ... |
boolean cancelled = d.cancel(); if (!cancelled) { throw new JMSException("Failed to cancel delivery:" + d.getReference().getMessageID()); } | d.cancel(); | synchronized void cancelAllDeliveries() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " cancels deliveries"); } //Need to cancel starting at the end of the list and working to the front //in order that the messages end up back in the correct order in the channel ... |
log.error("Cannot cancel delivery: " + d, t); } } | log.error("Failed to cancel delivery: " + d, t); } } | synchronized void cancelAllDeliveries() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " cancels deliveries"); } //Need to cancel starting at the end of the list and working to the front //in order that the messages end up back in the correct order in the channel ... |
public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try | public void cancelMessage(Serializable messageID) throws JMSException { SingleReceiverDelivery del = (SingleReceiverDelivery)deliveries.remove(messageID); if (del != null) | public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try { while (iter.hasNext()) { SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); ... |
while (iter.hasNext()) | try | public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try { while (iter.hasNext()) { SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); ... |
SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); if (del.getReference().getMessageID().equals(messageID)) { if (del.cancel()) { cancelled = true; iter.remove(); break; } else { throw new JMSException("Failed to cancel delivery: " + messageID); } } | del.cancel(); | public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try { while (iter.hasNext()) { SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); ... |
} catch (Throwable t) { throw new JBossJMSException("Failed to cancel message", t); } if (!cancelled) { throw new IllegalStateException("Cannot find delivery to cancel"); | catch (Throwable t) { throw new JBossJMSException("Failed to cancel delivery " + del, t); } promptDelivery(); | public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try { while (iter.hasNext()) { SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); ... |
{ promptDelivery(); } | { throw new IllegalStateException("Failed to cancel delivery " + del); } | public synchronized void cancelMessage(Serializable messageID) throws JMSException { boolean cancelled = false; Iterator iter = deliveries.iterator(); try { while (iter.hasNext()) { SingleReceiverDelivery del = (SingleReceiverDelivery)iter.next(); ... |
public synchronized void close() throws JMSException | public void close() throws JMSException | public synchronized void close() throws JMSException { if (closed) { throw new IllegalStateException("Consumer is already closed"); } if (log.isTraceEnabled()) { log.trace(this + " close"); } closed = true; // On close we only disconnect the consumer from the... |
public synchronized void closing() throws JMSException | public void closing() throws JMSException | public synchronized void closing() throws JMSException { if (log.isTraceEnabled()) { log.trace(this + " closing"); } } |
public synchronized void deactivate() throws JMSException | public void deactivate() throws JMSException | public synchronized void deactivate() throws JMSException { active = false; if (log.isTraceEnabled()) { log.trace(this + " deactivated"); } } |
active = false; if (log.isTraceEnabled()) { log.trace(this + " deactivated"); } | synchronized (channel) { active = false; if (log.isTraceEnabled()) { log.trace(this + " deactivated"); } } | public synchronized void deactivate() throws JMSException { active = false; if (log.isTraceEnabled()) { log.trace(this + " deactivated"); } } |
public synchronized javax.jms.Message getMessageNow() throws JMSException { try { grabbing = true; promptDelivery(); javax.jms.Message ret = (javax.jms.Message)toGrab; return ret; | public javax.jms.Message getMessageNow() throws JMSException { synchronized (channel) { try { grabbing = true; promptDelivery(); javax.jms.Message ret = (javax.jms.Message)toGrab; return ret; } finally { toGrab = null; grabbing = false; } | public synchronized javax.jms.Message getMessageNow() throws JMSException { try { grabbing = true; //This will always deliver a message (if there is one) on the same thread promptDelivery(); javax.jms.Message ret = (javax.jms.Message)toGrab; ... |
finally { toGrab = null; grabbing = false; } | public synchronized javax.jms.Message getMessageNow() throws JMSException { try { grabbing = true; //This will always deliver a message (if there is one) on the same thread promptDelivery(); javax.jms.Message ret = (javax.jms.Message)toGrab; ... | |
public synchronized Delivery handle(DeliveryObserver observer, Routable reference, Transaction tx) | public Delivery handle(DeliveryObserver observer, Routable reference, Transaction tx) | public synchronized Delivery handle(DeliveryObserver observer, Routable reference, Transaction tx) { if (log.isTraceEnabled()) { log.trace(this + " receives reference " + Util.guidToString(reference.getMessageID()) + " for delivery"); } if (!isReady()) { if (log.isTraceEnabled()) { log.trace... |
deliveries.add(delivery); | deliveries.put(reference.getMessageID(), delivery); | public synchronized Delivery handle(DeliveryObserver observer, Routable reference, Transaction tx) { if (log.isTraceEnabled()) { log.trace(this + " receives reference " + Util.guidToString(reference.getMessageID()) + " for delivery"); } if (!isReady()) { if (log.isTraceEnabled()) { log.trace... |
synchronized void remove() throws JMSException | void remove() throws JMSException | synchronized void remove() throws JMSException { if (log.isTraceEnabled()) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); ... |
for(Iterator i = deliveries.iterator(); i.hasNext(); ) | for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) | synchronized void remove() throws JMSException { if (log.isTraceEnabled()) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); ... |
i.remove(); | synchronized void remove() throws JMSException { if (log.isTraceEnabled()) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); ... | |
deliveries.clear(); | synchronized void remove() throws JMSException { if (log.isTraceEnabled()) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); ... | |
synchronized void setStarted(boolean started) | void setStarted(boolean started) | synchronized void setStarted(boolean started) { if (log.isTraceEnabled()) { log.trace(this + (started ? " started" : " stopped")); } this.started = started; if (started) { //need to prompt delivery promptDelivery(); } } |
0, | protected Message createMessage(byte i, boolean reliable) throws Exception { HashMap coreHeaders = generateFilledMap(true); HashMap jmsProperties = generateFilledMap(false); JBossTextMessage m = new JBossTextMessage(i, reliable, Syst... | |
log.debug("close"); | this.setStarted(false); | public void close() throws JMSException { log.debug("close"); } |
log.debug("closing"); | public void closing() throws JMSException { log.debug("closing"); } | |
pos = pattern.indexOf('\'',i+1); if (pos == -1) { | pos = pattern.indexOf('\'', i + 1); if (pos == i + 1) tokens.add("'"); else { StringBuffer buf = new StringBuffer(); int oldPos = i + 1; do { if (pos == -1) | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; CompiledField current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
+ i + " not closed."); | + i + " not closed."); buf.append(pattern.substring(oldPos, pos)); if (pos + 1 >= pattern.length() || pattern.charAt(pos + 1) != '\'') break; buf.append('\''); oldPos = pos + 2; pos = pattern.indexOf('\'', pos + 2); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; CompiledField current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
if ((pos+1 < pattern.length()) && (pattern.charAt(pos+1) == '\'')) { tokens.add(pattern.substring(i+1,pos+1)); } else { tokens.add(pattern.substring(i+1,pos)); | while (true); tokens.add(buf.toString()); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; CompiledField current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
if ((current != null) && (field == current.field)) { | if ((current != null) && (field == current.field)) | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; CompiledField current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
} else { current = new CompiledField(field,1,thisChar); | else { current = new CompiledField(field, 1, thisChar); | private void compileFormat(String pattern) { // Any alphabetical characters are treated as pattern characters // unless enclosed in single quotes. char thisChar; int pos; int field; CompiledField current = null; for (int i=0; i<pattern.length(); i++) { thisChar = pattern.charAt(i); fi... |
cmdLine = System.getProperty("jnode.cmdline", ""); | cmdLine = (String)AccessController.doPrivileged(new GetPropertyAction("jnode.cmdline", "")); | public DefaultDeviceManager(ExtensionPoint findersEP, ExtensionPoint mappersEP) { if (findersEP == null) { throw new IllegalArgumentException( "finders extension-point cannot be null"); } if (mappersEP == null) { throw new IllegalArgumentException( "mappers ext... |
if (inlineBlock.getLayer() != null) { inlineBlock.getLayer().detach(); } | inlineBlock.detach(); | public static void layoutContent(LayoutContext c, Box box, List contentList) { int maxAvailableWidth = c.getExtents().width; int remainingWidth = maxAvailableWidth; int minimumLineHeight = (int) c.getCurrentStyle().getLineHeight(c); LineBox currentLine = newLine(c, null, box); Lin... |
result.calcCanvasLocation(); | private static LineBox newLine(LayoutContext c, LineBox previousLine, Box box) { LineBox result = new LineBox(); result.createDefaultStyle(c); result.setParent(box); result.initContainingLayer(c); if (previousLine != null) { result.y = previousLine.y + previousLine.getH... | |
current.calcChildLocations(); | private static void positionVertically( LayoutContext c, Box container, LineBox current, MarkerData markerData) { if (current.getChildCount() == 0) { current.height = 0; } else { LineMetrics strutLM = container.getStyle().getLineMetrics(c); VerticalAlignCont... | |
LayoutUtil.generateAbsolute(c, content, current); | BlockBox abs = LayoutUtil.generateAbsolute(c, content, current); current.addNonFlowContent(abs); | private static int processOutOfFlowContent(LayoutContext c, Content content, LineBox current, int available, List pendingFloats) { int result = 0; c.pushStyle(content.getStyle()); if (content instanceof AbsolutelyPositionedContent) { LayoutUtil.generateAbsolute(c, content, current); ... |
FloatedBlockBox floater = LayoutUtil.generateFloated(c, content, available, current, pendingFloats); | FloatedBlockBox floater = LayoutUtil.generateFloated( c, (FloatedBlockContent)content, available, current, pendingFloats); | private static int processOutOfFlowContent(LayoutContext c, Content content, LineBox current, int available, List pendingFloats) { int result = 0; c.pushStyle(content.getStyle()); if (content instanceof AbsolutelyPositionedContent) { LayoutUtil.generateAbsolute(c, content, current); ... |
current.addNonFlowContent(floater); | private static int processOutOfFlowContent(LayoutContext c, Content content, LineBox current, int available, List pendingFloats) { int result = 0; c.pushStyle(content.getStyle()); if (content instanceof AbsolutelyPositionedContent) { LayoutUtil.generateAbsolute(c, content, current); ... | |
c.setFloatingY(c.getFloatingY() + current.height); | FloatedBlockBox pending0 = (FloatedBlockBox)pendingFloats.get(0); pending0.y += current.height; | private static void saveLine(final LineBox current, LineBox previous, final LayoutContext c, Box block, int minHeight, final int maxAvailableWidth, List elementStack, List pendingFloats, boolean hasFirstLinePCs, ... |
public ServerConnectionDelegate getConnectionDelegate(Serializable connectionID) { return (ServerConnectionDelegate)connections.get(connectionID); } | ServerConnectionDelegate getConnectionDelegate(Serializable connectionID); | public ServerConnectionDelegate getConnectionDelegate(Serializable connectionID) { return (ServerConnectionDelegate)connections.get(connectionID); } |
public ServerConnectionDelegate putConnectionDelegate(Serializable connectionID, ServerConnectionDelegate d) { return (ServerConnectionDelegate)connections.put(connectionID, d); } | ServerConnectionDelegate putConnectionDelegate(Serializable connectionID, ServerConnectionDelegate d); | public ServerConnectionDelegate putConnectionDelegate(Serializable connectionID, ServerConnectionDelegate d) { return (ServerConnectionDelegate)connections.put(connectionID, d); } |
public void removeConnectionDelegate(Serializable connectionID) { connections.remove(connectionID); } | void removeConnectionDelegate(Serializable connectionID); | public void removeConnectionDelegate(Serializable connectionID) { connections.remove(connectionID); } |
String str = getStringValue(); _stringAsArray = ( str == null ? new String[0] : str.split( "," )); | if ( getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE ) { String str = getStringValue(); _stringAsArray = ( str == null ? new String[0] : str.split( "," )); } else if ( getCssValueType() == CSSValue.CSS_VALUE_LIST ) { CSSValueList list = (CSSValueList)_domCSSValue; int len=list.getLength(); _stringAsArray = new String... | public String[] asStringArray() { if ( _stringAsArray == null ) { String str = getStringValue(); _stringAsArray = ( str == null ? new String[0] : str.split( "," )); } return _stringAsArray; } |
final int NUM_TO_RECEIVE = 1; | final int NUM_TO_RECEIVE = NUM_MESSAGES - 1; | public void testDurableSubscriptionReconnect() throws Exception { final String CLIENT_ID1 = "test-client-id1"; Connection conn1 = null; Connection conn2 = null; try { conn1 = cf.createConnection(); conn1.setClientID(CLIENT_ID1); Session sess1 = conn1.createSession(f... |
sc = null; | public void tearDown() throws Exception { sc.stop(); sc = null; ms = null; tr = null; super.tearDown(); } | |
pm.stop(); idm.stop(); tr.stop(); ms.stop(); sc = null; pm = null; idm = null; | public void tearDown() throws Exception { sc.stop(); sc = null; ms = null; tr = null; super.tearDown(); } | |
} finally { input = null; } } else { produce (list, input); } | public void startProduction (ImageConsumer ic) { if (!isConsumer(ic)) addConsumer(ic); Vector list = (Vector) consumers.clone (); try { // Create the input stream here rather than in the // ImageDecoder constructors so that exceptions cause // imageComplete to be called with an appropriate error ... | |
sess.createDurableSubscriber(topic, subName); | MessageConsumer cons = sess.createDurableSubscriber(topic, subName); cons.close(); | private boolean canCreateDurableSub(Connection conn, Topic topic, String subName) throws Exception { Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); try { sess.createDurableSubscriber(topic, subName); sess.unsubscribe(subName); log.trace("Successfully crea... |
{ ViewportUI vp = (ViewportUI) UIManager.getUI(this); setUI(vp); } | { setUI((ViewportUI) UIManager.getUI(this)); } | public void updateUI() { ViewportUI vp = (ViewportUI) UIManager.getUI(this); setUI(vp); } |
protected void chartExecution(XYSeriesCollection dataset, Execution execution) throws Exception | protected void chartExecution(XYSeriesCollection dataset, Execution execution, int mode) throws Exception | protected void chartExecution(XYSeriesCollection dataset, Execution execution) throws Exception { String providerName = execution.getProviderName(); XYSeries series = new XYSeries(providerName); for(Iterator i = execution.iterator(); i.hasNext(); ) { List measurement = (List)i.next(); ... |
if (measurement.size() != 2) | double x = 0, y = 0; if (mode == 1) | protected void chartExecution(XYSeriesCollection dataset, Execution execution) throws Exception { String providerName = execution.getProviderName(); XYSeries series = new XYSeries(providerName); for(Iterator i = execution.iterator(); i.hasNext(); ) { List measurement = (List)i.next(); ... |
continue; | if (measurement.size() != 2) { continue; } Result sendRate = (Result)measurement.get(0); Result receiveRate = (Result)measurement.get(1); if (sendRate instanceof Failure || receiveRate instanceof Failure) { continue; } if (((Job)sendRate.getRequest()).getType() == ReceiveJob.TYPE) { Result tmp = sendRate; sendRate... | protected void chartExecution(XYSeriesCollection dataset, Execution execution) throws Exception { String providerName = execution.getProviderName(); XYSeries series = new XYSeries(providerName); for(Iterator i = execution.iterator(); i.hasNext(); ) { List measurement = (List)i.next(); ... |
Result sendRate = (Result)measurement.get(0); Result receiveRate = (Result)measurement.get(1); if (sendRate instanceof Failure || receiveRate instanceof Failure) { continue; } if (((Job)sendRate.getRequest()).getType() == ReceiveJob.TYPE) { Result tmp = sendRate; sendRate = receiveRate; receiveRate = tmp; } series.... | series.add(x, y); | protected void chartExecution(XYSeriesCollection dataset, Execution execution) throws Exception { String providerName = execution.getProviderName(); XYSeries series = new XYSeries(providerName); for(Iterator i = execution.iterator(); i.hasNext(); ) { List measurement = (List)i.next(); ... |
chartExecution(dataset, e); | chartExecution(dataset, e, mode); } String xLabel = "undefined"; String yLabel = "undefined"; if (mode == 1) { xLabel = "send rate (msg/s)"; yLabel = "receive rate (msg/s)"; } else if (mode == 2) { xLabel = "target send rate (msg/s)"; yLabel = "measured send rate (msg/s)"; | protected void chartPerformanceTest(PerformanceTest pt) throws Exception { // a chart depicts more executions String testName = pt.getName(); XYSeriesCollection dataset = new XYSeriesCollection(); for(Iterator i = pt.getExecutions().iterator(); i.hasNext(); ) { Execution e = (Execu... |
ChartFactory.createXYLineChart(testName, "send rate (msg/s)", "receive rate (msg/s)", dataset, PlotOrientation.VERTICAL, true, true, false); | ChartFactory.createXYLineChart(testName, xLabel, yLabel, dataset, PlotOrientation.VERTICAL, true, true, false); | protected void chartPerformanceTest(PerformanceTest pt) throws Exception { // a chart depicts more executions String testName = pt.getName(); XYSeriesCollection dataset = new XYSeriesCollection(); for(Iterator i = pt.getExecutions().iterator(); i.hasNext(); ) { Execution e = (Execu... |
getContext().css = new TBStyleReference(new NaiveUserAgent()); | getContext().css = new StyleReference(new NaiveUserAgent()); | public RenderingContext() { setMedia("screen"); setContext(new Context()); getContext().ctx = this; getContext().css = new TBStyleReference(new NaiveUserAgent()); XRLog.render("Using CSS implementation from: " + getContext().css.getClass().getName()); layout_factory = new L... |
protected int checkHorizontalKey(int key, String message) { return 0; } | protected int checkHorizontalKey(int key, String message) { if (key != LEFT && key != CENTER && key != RIGHT && key != LEADING && key != TRAILING) throw new IllegalArgumentException(message); else return key; } | protected int checkHorizontalKey(int key, String message) { // Verify that key is a legal value for the horizontalAlignment properties. return 0; } |
protected int checkVerticalKey(int key, String message) { return 0; } | protected int checkVerticalKey(int key, String message) { if (key != TOP && key != BOTTOM && key != CENTER) throw new IllegalArgumentException(message); else return key; } | protected int checkVerticalKey(int key, String message) { // Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties. return 0; } |
{ return 0; } | { return (int) mnemonicKey; } | public int getDisplayedMnemonic() { // Return the keycode that indicates a mnemonic key. return 0; } |
{ return null; } | { return labelFor; } | public Component getLabelFor() { // Get the component this is labelling. return null; } |
public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { return (img == icon); } | public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { Icon currIcon = (isEnabled()) ? activeIcon : disabledIcon; if (currIcon != null && currIcon instanceof ImageIcon) return (((ImageIcon) currIcon).getImage() == img); return false; } | public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { // This is overriden to return false if the current Icon's Image is not equal to the passed in Image img. return (img == icon); } |
{ } | { if (disabledIcon != this.disabledIcon) { Icon oldDisabledIcon = this.disabledIcon; this.disabledIcon = disabledIcon; firePropertyChange(DISABLED_ICON_CHANGED_PROPERTY, oldDisabledIcon, this.disabledIcon); } } | public void setDisabledIcon(Icon disabledIcon) { // Set the icon to be displayed if this JLabel is "disabled" (JLabel.setEnabled(false)). } |
public void setDisplayedMnemonic(char aChar) { } | public void setDisplayedMnemonic(int key) { setDisplayedMnemonic((char) key); } | public void setDisplayedMnemonic(char aChar) { // Specifies the displayedMnemonic as a char value. } |
{ gap = iconTextGap; } | { if (iconTextGap != this.iconTextGap) { int oldIconTextGap = this.iconTextGap; this.iconTextGap = iconTextGap; firePropertyChange(ICON_TEXT_GAP_CHANGED_PROPERTY, oldIconTextGap, iconTextGap); } } | public void setIconTextGap(int iconTextGap) { gap = iconTextGap; } |
{ vert_text_pos = textPosition; } | { if (textPosition != verticalTextPosition) { int oldPos = verticalTextPosition; verticalTextPosition = checkVerticalKey(textPosition, "verticalTextPosition"); firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, oldPos, verticalTextPosition); } } | public void setVerticalTextPosition(int textPosition) { // Sets the vertical position of the label's text, relative to its image. vert_text_pos = textPosition; } |
assertEquals(new Integer(15),map.get(new Integer(25))); assertEquals(new Integer(50),map.get(new Integer(15))); assertEquals(new Integer(25),map.get(new Integer(50))); | assertEquals(new Integer(25), map.get(new Integer(15))); assertEquals(new Integer(50), map.get(new Integer(25))); assertEquals(new Integer(15), map.get(new Integer(50))); | public void testMapper() { Set set = new HashSet(); set.add(new Integer(50)); set.add(new Integer(25)); set.add(new Integer(15)); DefaultFailoverMapper mapper = new DefaultFailoverMapper(); Map map = mapper.generateMapping(set); assertEquals(new Integer(15),map.get(new Integer(25... |
final Register r = ref.getRegister(); | final Register refr = ref.getRegister(); | private final void checkBounds(RefItem ref, IntItem index) { final Label ok = new Label(curInstrLabel + "$$cbok"); // CMP length, index assertCondition(ref.isRegister(), "ref must be in a register"); final Register r = ref.getRegister(); if (index.isConstant()) { os.writeCMP_Const(r, arrayLengthOffset, index.ge... |
os.writeCMP_Const(r, arrayLengthOffset, index.getValue()); | os.writeCMP_Const(refr, arrayLengthOffset, index.getValue()); | private final void checkBounds(RefItem ref, IntItem index) { final Label ok = new Label(curInstrLabel + "$$cbok"); // CMP length, index assertCondition(ref.isRegister(), "ref must be in a register"); final Register r = ref.getRegister(); if (index.isConstant()) { os.writeCMP_Const(r, arrayLengthOffset, index.ge... |
os.writeCMP(r, arrayLengthOffset, index.getRegister()); | os.writeCMP(refr, arrayLengthOffset, index.getRegister()); | private final void checkBounds(RefItem ref, IntItem index) { final Label ok = new Label(curInstrLabel + "$$cbok"); // CMP length, index assertCondition(ref.isRegister(), "ref must be in a register"); final Register r = ref.getRegister(); if (index.isConstant()) { os.writeCMP_Const(r, arrayLengthOffset, index.ge... |
final int count = method.getNoArguments() + ((hasSelf) ? 1 : 0); for (int i = 0; (!vstack.isEmpty() && (i < count)); i++) { Item v = vstack.pop(); | final int count = method.getNoArguments(); for (int i = count - 1; i >= 0; i--) { final int type = method.getArgumentType(i).getJvmType(); final Item v = vstack.pop(JvmType.TypeToContainingType(type)); v.release1(eContext); } if (hasSelf) { RefItem v = vstack.popRef(); | private final void dropParameters(VmMethod method, boolean hasSelf) { //TODO: check parameter types final int count = method.getNoArguments() + ((hasSelf) ? 1 : 0); for (int i = 0; (!vstack.isEmpty() && (i < count)); i++) { Item v = vstack.pop(); v.release1(eContext); } } |
final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { | if (paranoia) { | public void endInstruction() { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalErr... |
public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } } }); | final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { | public void endInstruction() { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalErr... |
vstack.fpuStack.visitItems(new ItemVisitor() { public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } }); vstack.visitItems(new ItemVisitor() { public void ... | public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); | public void endInstruction() { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalErr... |
} }); | }); | public void endInstruction() { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalErr... |
vstack.fpuStack.visitItems(new ItemVisitor() { public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } }); vstack.visitItems(new ItemVisitor() { public void... | public void endInstruction() { // Verify the register usage // No registers can be in use, unless they are on the virtual stack. final X86RegisterPool pool = eContext.getPool(); pool.visitUsedRegisters(new RegisterVisitor() { public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalErr... | |
if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); | if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } | public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } } |
} | public void visit(Register reg) { if (!vstack.uses(reg)) { throw new InternalError("Register " + reg + " is in use outsite of the vstack in method " + currentMethod + " at bytecode address " + curAddress); } } | |
if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); | if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } | public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } |
} | public void visit(Item item) { if (!vstack.contains(item)) { throw new InternalError( "Item " + item + " is not on the vstack, but still of the fpu stack in method " + currentMethod + " at address " + curAddress); } } | |
if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem)item).getRegister()) != item) { throw new InternalError("Item " + item + " uses a register w... | if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem) item).getRegister()) != item) { throw new InternalError( "Item " + item + " uses a register... | public void visit(Item item) { if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem)item).getRegister()) != ... |
} else { if (pool.getOwner(((DoubleWordItem)item).getLsbRegister()) != item) { throw new InternalError("Item " + item + " uses an LSB register which is not registered in the register ppol in method " + currentMethod + " at address " + curAddress); } if (pool.getOwner(((DoubleWordItem)item).getMsbRegister()) != item) { ... | public void visit(Item item) { if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem)item).getRegister()) != ... | |
} | public void visit(Item item) { if (item.getKind() == 0) { throw new InternalError("Item " + item + " is kind 0 in method " + currentMethod + " at address " + curAddress); } if (item.isRegister()) { if (item instanceof WordItem) { if (pool.getOwner(((WordItem)item).getRegister()) != ... | |
private final void prepareForOperation(Item destAndSource, Item source) { | private final boolean prepareForOperation(Item destAndSource, Item source, boolean commutative) { | private final void prepareForOperation(Item destAndSource, Item source) { // WARNING: source was on top of the virtual stack (thus higher than // destAndSource) // x86 can only deal with one complex argument // destAndSource must be a register source.loadIf(eContext, (Item.Kind.STACK | Item.Kind.FPUSTACK)); dest... |
return false; | private final void prepareForOperation(Item destAndSource, Item source) { // WARNING: source was on top of the virtual stack (thus higher than // destAndSource) // x86 can only deal with one complex argument // destAndSource must be a register source.loadIf(eContext, (Item.Kind.STACK | Item.Kind.FPUSTACK)); dest... | |
IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); Register refReg = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeMOV(INTSIZE, refReg, refReg, offset + VmArray.DAT... | waload(JvmType.REFERENCE); | public final void visit_aaload() { IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); Register refReg = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeMO... |
final boolean useBarrier = (context.getWriteBarrier() != null); final RefItem val = vstack.popRef(); final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef(); val.load(eContext); idx.loadIf(eContext, (useBarrier) ? ~Item.Kind.REGISTER : ~(Item.Kind.CONSTANT | Item.Kind.REGISTER)); ref.load(eContext)... | wastore(JvmType.REFERENCE); | public final void visit_aastore() { final boolean useBarrier = (context.getWriteBarrier() != null); final RefItem val = vstack.popRef(); final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef(); //IMPROVE: optimize case with const value val.load(eContext); // if barrier in use, the index must al... |
final Register classr = requestRegister(JvmType.INT); | public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register cntr = cnt.getRegister(); // Request tmp register final Register classr = requestRegister(Jv... | |
helper.invokeJavaMethod(context.getAnewarrayMethod()); | invokeJavaMethod(context.getAnewarrayMethod()); | public final void visit_anewarray(VmConstClass classRef) { // Claim EAX, we're going to use it later requestRegister(EAX); final IntItem cnt = vstack.popInt(); // Load the count value cnt.load(eContext); final Register cntr = cnt.getRegister(); // Request tmp register final Register classr = requestRegister(Jv... |
final RefItem val = vstack.popRef(); if (!val.uses(EAX)) { requestRegister(EAX, val); val.loadTo(eContext, EAX); } val.release(eContext); visit_return(); | wreturn(JvmType.REFERENCE); | public final void visit_areturn() { final RefItem val = vstack.popRef(); if (!val.uses(EAX)) { requestRegister(EAX, val); val.loadTo(eContext, EAX); } val.release(eContext); visit_return(); } |
final Register r = ref.getRegister(); | final Register refr = ref.getRegister(); final Register resultr = result.getRegister(); | public final void visit_arraylength() { final RefItem ref = vstack.popRef(); ref.load(eContext); final Register r = ref.getRegister(); os.writeMOV(INTSIZE, r, r, arrayLengthOffset); final IntItem i = IntItem.createReg(r); eContext.getPool().transferOwnerTo(r, i); vstack.push(i); } |
os.writeMOV(INTSIZE, r, r, arrayLengthOffset); | os.writeMOV(INTSIZE, resultr, refr, arrayLengthOffset); | public final void visit_arraylength() { final RefItem ref = vstack.popRef(); ref.load(eContext); final Register r = ref.getRegister(); os.writeMOV(INTSIZE, r, r, arrayLengthOffset); final IntItem i = IntItem.createReg(r); eContext.getPool().transferOwnerTo(r, i); vstack.push(i); } |
final IntItem i = IntItem.createReg(r); eContext.getPool().transferOwnerTo(r, i); vstack.push(i); | ref.release(eContext); vstack.push(result); | public final void visit_arraylength() { final RefItem ref = vstack.popRef(); ref.load(eContext); final Register r = ref.getRegister(); os.writeMOV(INTSIZE, r, r, arrayLengthOffset); final IntItem i = IntItem.createReg(r); eContext.getPool().transferOwnerTo(r, i); vstack.push(i); } |
if (debug) { BootLog.debug("astore_" + index + "\t" + vstack); } int disp = stackFrame.getEbpOffset(index); vstack.loadLocal(eContext, disp); RefItem i = vstack.popRef(); i.load(eContext); os.writeMOV(INTSIZE, FP, disp, i.getRegister()); i.release(eContext); | wstore(JvmType.REFERENCE, index); | public final void visit_astore(int index) { if (debug) { BootLog.debug("astore_" + index + "\t" + vstack); } int disp = stackFrame.getEbpOffset(index); // Pin down (load) other references to this local vstack.loadLocal(eContext, disp); RefItem i = vstack.popRef(); i.load(eContext); os.writeMOV(INTSIZE, FP, d... |
IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeMOV(BYTESIZE, r, r, offset + VmArray.DATA_OFFSE... | waload(JvmType.BYTE); | public final void visit_baload() { IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeM... |
IntItem val = vstack.popInt(); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); val.load(eContext); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); final Register v = val.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) {... | wastore(JvmType.BYTE); | public final void visit_bastore() { IntItem val = vstack.popInt(); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); //IMPROVE: optimize case with const value val.load(eContext); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); final Register v =... |
IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeMOV(WORDSIZE, r, r, offset + VmArray.DATA_OFFS... | waload(JvmType.CHAR); | public final void visit_caload() { IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int offset = idx.getValue(); os.writeM... |
IntItem val = vstack.popInt(); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); val.load(eContext); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); final Register v = val.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) {... | wastore(JvmType.CHAR); | public final void visit_castore() { IntItem val = vstack.popInt(); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); //IMPROVE: optimize case with const value val.load(eContext); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); final Register v =... |
helper.invokeJavaMethod(context.getSystemExceptionMethod()); | invokeJavaMethod(context.getSystemExceptionMethod()); | public final void visit_checkcast(VmConstClass classRef) { // Pre-claim EAX requestRegister(EAX); // check that top item is a reference final RefItem ref = vstack.popRef(); // Load the ref ref.load(eContext); final Register refr = ref.getRegister(); final Register classr = requestRegister(JvmType.INT); // Res... |
final int offset = idx.getValue(); os.writeFLD64(refr, (offset * 8) + (VmArray.DATA_OFFSET * 4)); | final int offset = idx.getValue() * 8; os.writeFLD64(refr, offset + arrayDataOffset); | public final void visit_daload() { final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register refr = ref.getRegister(); checkBounds(ref, idx); FPUHelper.ensureStackCapacity(os, eContext, vstack, 1); if (idx.isConstant(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.