rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
return (Container) Box.createVerticalStrut(17);
return null;
protected Container createSeparator() { return (Container) Box.createVerticalStrut(17); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
protected void installComponents() { // reset it. hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); } Container sep = createSeparator(); if (sep != null) optionPane.add(sep); Container button = createButtonArea(); if (button != null) { ((JComponent) button).setBorder(buttonBorder); buttonContainer = button; optionPane.add(button); } optionPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11)); optionPane.invalidate(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/BasicOptionPaneUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicOptionPaneUI.java
}
}
public boolean getWantsInput() { return wantsInput; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public Icon getIcon() { return icon; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public Icon getIcon() { return icon; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public Object getInitialValue() { return initialValue; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public void setInputValue(Object newValue) { if (inputValue != newValue) { Object old = inputValue; inputValue = newValue; firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public void setInputValue(Object newValue) { if (inputValue != newValue) { Object old = inputValue; inputValue = newValue; firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
{
{
public Object getInitialSelectionValue() { return initialSelectionValue; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
}
}
public Object getInitialSelectionValue() { return initialSelectionValue; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JOptionPane.java/buggy/core/src/classpath/javax/javax/swing/JOptionPane.java
channel = new VMChannel(); channel.initSocket(false);
protected DatagramChannelImpl (SelectorProvider provider) throws IOException { super (provider); socket = new NIODatagramSocket (new PlainDatagramSocketImpl(), this); configureBlocking(true); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
socket.connect (remote);
try { channel.connect((InetSocketAddress) remote, 0); } catch (ClassCastException cce) { throw new IOException("unsupported socked address type"); }
public DatagramChannel connect (SocketAddress remote) throws IOException { if (!isOpen()) throw new ClosedChannelException(); socket.connect (remote); return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
socket.disconnect ();
channel.disconnect();
public DatagramChannel disconnect () throws IOException { socket.disconnect (); return this; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
socket.close ();
channel.close();
protected void implCloseSelectableChannel () throws IOException { socket.close (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
socket.setSoTimeout (blocking ? 0 : NIOConstants.DEFAULT_TIMEOUT);
channel.setBlocking(blocking);
protected void implConfigureBlocking (boolean blocking) throws IOException { socket.setSoTimeout (blocking ? 0 : NIOConstants.DEFAULT_TIMEOUT); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
public boolean isConnected ()
public boolean isConnected()
public boolean isConnected () { return socket.isConnected (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
return socket.isConnected ();
try { return channel.getPeerAddress() != null; } catch (IOException ioe) { return false; }
public boolean isConnected () { return socket.isConnected (); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
int remaining = dst.remaining(); receive (dst); return remaining - dst.remaining();
return channel.read(dst);
public int read (ByteBuffer dst) throws IOException { if (!isConnected ()) throw new NotYetConnectedException (); int remaining = dst.remaining(); receive (dst); return remaining - dst.remaining(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
DatagramPacket packet; int len = dst.remaining(); if (dst.hasArray()) { packet = new DatagramPacket (dst.array(), dst.arrayOffset() + dst.position(), len); } else { packet = new DatagramPacket (new byte [len], len);
begin(); return channel.receive(dst); } finally { end(true); }
public SocketAddress receive (ByteBuffer dst) throws IOException { if (!isOpen()) throw new ClosedChannelException(); try { DatagramPacket packet; int len = dst.remaining(); if (dst.hasArray()) { packet = new DatagramPacket (dst.array(), dst.arrayOffset() + dst.position(), len); } else { packet = new DatagramPacket (new byte [len], len); } boolean completed = false; try { begin(); setInChannelOperation(true); socket.receive (packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (!dst.hasArray()) { dst.put (packet.getData(), packet.getOffset(), packet.getLength()); } else { dst.position (dst.position() + packet.getLength()); } return packet.getSocketAddress(); } catch (SocketTimeoutException e) { return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
boolean completed = false; try { begin(); setInChannelOperation(true); socket.receive (packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (!dst.hasArray()) { dst.put (packet.getData(), packet.getOffset(), packet.getLength()); } else { dst.position (dst.position() + packet.getLength()); } return packet.getSocketAddress(); } catch (SocketTimeoutException e) { return null; } }
public SocketAddress receive (ByteBuffer dst) throws IOException { if (!isOpen()) throw new ClosedChannelException(); try { DatagramPacket packet; int len = dst.remaining(); if (dst.hasArray()) { packet = new DatagramPacket (dst.array(), dst.arrayOffset() + dst.position(), len); } else { packet = new DatagramPacket (new byte [len], len); } boolean completed = false; try { begin(); setInChannelOperation(true); socket.receive (packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (!dst.hasArray()) { dst.put (packet.getData(), packet.getOffset(), packet.getLength()); } else { dst.position (dst.position() + packet.getLength()); } return packet.getSocketAddress(); } catch (SocketTimeoutException e) { return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
if (target instanceof InetSocketAddress && ((InetSocketAddress) target).isUnresolved())
if (!(target instanceof InetSocketAddress)) throw new IOException("can only send to inet socket addresses"); InetSocketAddress dst = (InetSocketAddress) target; if (dst.isUnresolved())
public int send (ByteBuffer src, SocketAddress target) throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (target instanceof InetSocketAddress && ((InetSocketAddress) target).isUnresolved()) throw new IOException("Target address not resolved"); byte[] buffer; int offset = 0; int len = src.remaining(); if (src.hasArray()) { buffer = src.array(); offset = src.arrayOffset() + src.position(); } else { buffer = new byte [len]; src.get (buffer); } DatagramPacket packet = new DatagramPacket (buffer, offset, len, target); boolean completed = false; try { begin(); setInChannelOperation(true); socket.send(packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (src.hasArray()) { src.position (src.position() + len); } return len; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
byte[] buffer; int offset = 0; int len = src.remaining(); if (src.hasArray()) { buffer = src.array(); offset = src.arrayOffset() + src.position(); } else { buffer = new byte [len]; src.get (buffer);
return channel.send(src, dst);
public int send (ByteBuffer src, SocketAddress target) throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (target instanceof InetSocketAddress && ((InetSocketAddress) target).isUnresolved()) throw new IOException("Target address not resolved"); byte[] buffer; int offset = 0; int len = src.remaining(); if (src.hasArray()) { buffer = src.array(); offset = src.arrayOffset() + src.position(); } else { buffer = new byte [len]; src.get (buffer); } DatagramPacket packet = new DatagramPacket (buffer, offset, len, target); boolean completed = false; try { begin(); setInChannelOperation(true); socket.send(packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (src.hasArray()) { src.position (src.position() + len); } return len; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
DatagramPacket packet = new DatagramPacket (buffer, offset, len, target); boolean completed = false; try { begin(); setInChannelOperation(true); socket.send(packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (src.hasArray()) { src.position (src.position() + len); } return len; }
public int send (ByteBuffer src, SocketAddress target) throws IOException { if (!isOpen()) throw new ClosedChannelException(); if (target instanceof InetSocketAddress && ((InetSocketAddress) target).isUnresolved()) throw new IOException("Target address not resolved"); byte[] buffer; int offset = 0; int len = src.remaining(); if (src.hasArray()) { buffer = src.array(); offset = src.arrayOffset() + src.position(); } else { buffer = new byte [len]; src.get (buffer); } DatagramPacket packet = new DatagramPacket (buffer, offset, len, target); boolean completed = false; try { begin(); setInChannelOperation(true); socket.send(packet); completed = true; } finally { end (completed); setInChannelOperation(false); } if (src.hasArray()) { src.position (src.position() + len); } return len; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
return send (src, socket.getRemoteSocketAddress());
return channel.write(src);
public int write (ByteBuffer src) throws IOException { if (!isConnected ()) throw new NotYetConnectedException (); return send (src, socket.getRemoteSocketAddress()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/0775c21093571dbb049293760df0896d396210d3/DatagramChannelImpl.java/buggy/core/src/classpath/gnu/gnu/java/nio/DatagramChannelImpl.java
if (! expect (dateStr, pos, ch))
if (quote_start == -1 && ch == ' ') { int index = pos.getIndex(); int save = index; while (index < dateStr.length() && Character.isWhitespace(dateStr.charAt(index))) ++index; if (index > save) pos.setIndex(index); else { pos.setErrorIndex(index); return null; } } else if (! expect (dateStr, pos, ch))
public Date parse (String dateStr, ParsePosition pos) { int fmt_index = 0; int fmt_max = pattern.length(); calendar.clear(); boolean saw_timezone = false; int quote_start = -1; boolean is2DigitYear = false; try { for (; fmt_index < fmt_max; ++fmt_index) { char ch = pattern.charAt(fmt_index); if (ch == '\'') { int index = pos.getIndex(); if (fmt_index < fmt_max - 1 && pattern.charAt(fmt_index + 1) == '\'') { if (! expect (dateStr, pos, ch)) return null; ++fmt_index; } else quote_start = quote_start < 0 ? fmt_index : -1; continue; } if (quote_start != -1 || ((ch < 'a' || ch > 'z') && (ch < 'A' || ch > 'Z'))) { if (! expect (dateStr, pos, ch)) return null; continue; } // We've arrived at a potential pattern character in the // pattern. int fmt_count = 1; while (++fmt_index < fmt_max && pattern.charAt(fmt_index) == ch) { ++fmt_count; } // We might need to limit the number of digits to parse in // some cases. We look to the next pattern character to // decide. boolean limit_digits = false; if (fmt_index < fmt_max && standardChars.indexOf(pattern.charAt(fmt_index)) >= 0) limit_digits = true; --fmt_index; // We can handle most fields automatically: most either are // numeric or are looked up in a string vector. In some cases // we need an offset. When numeric, `offset' is added to the // resulting value. When doing a string lookup, offset is the // initial index into the string array. int calendar_field; boolean is_numeric = true; int offset = 0; boolean maybe2DigitYear = false; boolean oneBasedHour = false; boolean oneBasedHourOfDay = false; Integer simpleOffset; String[] set1 = null; String[] set2 = null; switch (ch) { case 'd': calendar_field = Calendar.DATE; break; case 'D': calendar_field = Calendar.DAY_OF_YEAR; break; case 'F': calendar_field = Calendar.DAY_OF_WEEK_IN_MONTH; break; case 'E': is_numeric = false; offset = 1; calendar_field = Calendar.DAY_OF_WEEK; set1 = formatData.getWeekdays(); set2 = formatData.getShortWeekdays(); break; case 'w': calendar_field = Calendar.WEEK_OF_YEAR; break; case 'W': calendar_field = Calendar.WEEK_OF_MONTH; break; case 'M': calendar_field = Calendar.MONTH; if (fmt_count <= 2) offset = -1; else { is_numeric = false; set1 = formatData.getMonths(); set2 = formatData.getShortMonths(); } break; case 'y': calendar_field = Calendar.YEAR; if (fmt_count <= 2) maybe2DigitYear = true; break; case 'K': calendar_field = Calendar.HOUR; break; case 'h': calendar_field = Calendar.HOUR; oneBasedHour = true; break; case 'H': calendar_field = Calendar.HOUR_OF_DAY; break; case 'k': calendar_field = Calendar.HOUR_OF_DAY; oneBasedHourOfDay = true; break; case 'm': calendar_field = Calendar.MINUTE; break; case 's': calendar_field = Calendar.SECOND; break; case 'S': calendar_field = Calendar.MILLISECOND; break; case 'a': is_numeric = false; calendar_field = Calendar.AM_PM; set1 = formatData.getAmPmStrings(); break; case 'z': case 'Z': // We need a special case for the timezone, because it // uses a different data structure than the other cases. is_numeric = false; calendar_field = Calendar.ZONE_OFFSET; String[][] zoneStrings = formatData.getZoneStrings(); int zoneCount = zoneStrings.length; int index = pos.getIndex(); boolean found_zone = false; simpleOffset = computeOffset(dateStr.substring(index), pos); if (simpleOffset != null) { found_zone = true; saw_timezone = true; calendar.set(Calendar.DST_OFFSET, 0); offset = simpleOffset.intValue(); } else { for (int j = 0; j < zoneCount; j++) { String[] strings = zoneStrings[j]; int k; for (k = 0; k < strings.length; ++k) { if (dateStr.startsWith(strings[k], index)) break; } if (k != strings.length) { found_zone = true; saw_timezone = true; TimeZone tz = TimeZone.getTimeZone (strings[0]); // Check if it's a DST zone or ordinary if(k == 3 || k == 4) calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings()); else calendar.set (Calendar.DST_OFFSET, 0); offset = tz.getRawOffset (); pos.setIndex(index + strings[k].length()); break; } } } if (! found_zone) { pos.setErrorIndex(pos.getIndex()); return null; } break; default: pos.setErrorIndex(pos.getIndex()); return null; } // Compute the value we should assign to the field. int value; int index = -1; if (is_numeric) { numberFormat.setMinimumIntegerDigits(fmt_count); if (limit_digits) numberFormat.setMaximumIntegerDigits(fmt_count); if (maybe2DigitYear) index = pos.getIndex(); Number n = numberFormat.parse(dateStr, pos); if (pos == null || ! (n instanceof Long)) return null; value = n.intValue() + offset; } else if (set1 != null) { index = pos.getIndex(); int i; boolean found = false; for (i = offset; i < set1.length; ++i) { if (set1[i] != null) if (dateStr.toUpperCase().startsWith(set1[i].toUpperCase(), index)) { found = true; pos.setIndex(index + set1[i].length()); break; } } if (!found && set2 != null) { for (i = offset; i < set2.length; ++i) { if (set2[i] != null) if (dateStr.toUpperCase().startsWith(set2[i].toUpperCase(), index)) { found = true; pos.setIndex(index + set2[i].length()); break; } } } if (!found) { pos.setErrorIndex(index); return null; } value = i; } else value = offset; if (maybe2DigitYear) { // Parse into default century if the numeric year string has // exactly 2 digits. int digit_count = pos.getIndex() - index; if (digit_count == 2) { is2DigitYear = true; value += defaultCentury; } } // Calendar uses 0-based hours. // I.e. 00:00 AM is midnight, not 12 AM or 24:00 if (oneBasedHour && value == 12) value = 0; if (oneBasedHourOfDay && value == 24) value = 0; // Assign the value and move on. calendar.set(calendar_field, value); } if (is2DigitYear) { // Apply the 80-20 heuristic to dermine the full year based on // defaultCenturyStart. int year = calendar.get(Calendar.YEAR); if (calendar.getTime().compareTo(defaultCenturyStart) < 0) calendar.set(Calendar.YEAR, year + 100); } if (! saw_timezone) { // Use the real rules to determine whether or not this // particular time is in daylight savings. calendar.clear (Calendar.DST_OFFSET); calendar.clear (Calendar.ZONE_OFFSET); } return calendar.getTime(); } catch (IllegalArgumentException x) { pos.setErrorIndex(pos.getIndex()); return null; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ac47f92e4c558fe929f5cc64f85d3154701fcd9c/SimpleDateFormat.java/buggy/core/src/classpath/java/java/text/SimpleDateFormat.java
public GregorianCalendar(Locale locale)
public GregorianCalendar()
public GregorianCalendar(Locale locale) { this(TimeZone.getDefault(), locale); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
this(TimeZone.getDefault(), locale);
this(TimeZone.getDefault(), Locale.getDefault());
public GregorianCalendar(Locale locale) { this(TimeZone.getDefault(), locale); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/GregorianCalendar.java/buggy/core/src/classpath/java/java/util/GregorianCalendar.java
if (!isSet[field])
if (! isSet[field])
public int get(int field) { // If the requested field is invalid, force all fields to be recomputed. if (!isSet[field]) areFieldsSet = false; complete(); return fields[field]; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
if (!explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET))
if (! explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET))
public void set(int field, int value) { isTimeSet = false; fields[field] = value; isSet[field] = true; switch (field) { case YEAR: case MONTH: case DATE: isSet[WEEK_OF_YEAR] = false; isSet[DAY_OF_YEAR] = false; isSet[WEEK_OF_MONTH] = false; isSet[DAY_OF_WEEK] = false; isSet[DAY_OF_WEEK_IN_MONTH] = false; break; case AM_PM: isSet[HOUR_OF_DAY] = false; break; case HOUR_OF_DAY: isSet[AM_PM] = false; isSet[HOUR] = false; break; case HOUR: isSet[HOUR_OF_DAY] = false; break; case DST_OFFSET: explicitDSTOffset = true; } // May have crossed over a DST boundary. if (!explicitDSTOffset && (field != DST_OFFSET && field != ZONE_OFFSET)) isSet[DST_OFFSET] = false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
if (!isTimeSet)
if (! isTimeSet)
public final Date getTime() { if (!isTimeSet) computeTime(); return new Date(time); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c65f6a6914005749230b8f31c6890448761cd6f4/Calendar.java/buggy/core/src/classpath/java/java/util/Calendar.java
return numberFormat.equals(d.numberFormat);
return false;
public boolean equals (Object obj) { if (!(obj instanceof DateFormat)) return false; DateFormat d = (DateFormat) obj; return numberFormat.equals(d.numberFormat); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/1a6944e2b647ccd9f0a45036fbe2dcd289ca1699/DateFormat.java/buggy/core/src/classpath/java/java/text/DateFormat.java
protected void processWindowFocusEvent(WindowEvent event) { if (windowFocusListener != null) { switch (event.getID ()) { case WindowEvent.WINDOW_GAINED_FOCUS: windowFocusListener.windowGainedFocus (event); break; case WindowEvent.WINDOW_LOST_FOCUS: windowFocusListener.windowLostFocus (event); break; default: break; } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java
protected void processWindowFocusEvent(WindowEvent event) { if (windowFocusListener != null) { switch (event.getID ()) { case WindowEvent.WINDOW_GAINED_FOCUS: windowFocusListener.windowGainedFocus (event); break; case WindowEvent.WINDOW_LOST_FOCUS: windowFocusListener.windowLostFocus (event); break; default: break; } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/6e9e807110ca5387384fb5569869118ad80844bc/Window.java/buggy/core/src/classpath/java/java/awt/Window.java
public ISO9660Entry(EntryRecord entry) { this.CDFSentry = entry; }
public ISO9660Entry(ISO9660FileSystem fs, EntryRecord entry) { this.fs = fs; this.entryRecord = entry; }
public ISO9660Entry(EntryRecord entry) { this.CDFSentry = entry; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public FSAccessRights getAccessRights() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public FSAccessRights getAccessRights() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public FSAccessRights getAccessRights() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public EntryRecord getCDFSentry() { return CDFSentry; }
public EntryRecord getCDFSentry() { return entryRecord; }
public EntryRecord getCDFSentry() { return CDFSentry; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public FSDirectory getDirectory() throws IOException { return new ISO9660Directory(this); }
public FSDirectory getDirectory() throws IOException { return new ISO9660Directory(this); }
public FSDirectory getDirectory() throws IOException { return new ISO9660Directory(this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public FSFile getFile() throws IOException { return new ISO9660File(this); }
public FSFile getFile() throws IOException { return new ISO9660File(this); }
public FSFile getFile() throws IOException { return new ISO9660File(this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public FileSystem getFileSystem() { return null; }
public FileSystem getFileSystem() { return fs; }
public FileSystem getFileSystem() { return null; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public long getLastModified() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public long getLastModified() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public long getLastModified() throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public String getName() { return CDFSentry.getFileIdentifier(); }
public String getName() { return entryRecord.getFileIdentifier(); }
public String getName() { return CDFSentry.getFileIdentifier(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public FSDirectory getParent() { throw new UnsupportedOperationException("not yet implemented"); }
public FSDirectory getParent() { throw new UnsupportedOperationException("not yet implemented"); }
public FSDirectory getParent() { throw new UnsupportedOperationException("not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public boolean isDirectory() { return CDFSentry.isDirectory(); }
public boolean isDirectory() { return entryRecord.isDirectory(); }
public boolean isDirectory() { return CDFSentry.isDirectory(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public boolean isFile() { return !CDFSentry.isDirectory(); }
public boolean isFile() { return !entryRecord.isDirectory(); }
public boolean isFile() { return !CDFSentry.isDirectory(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public boolean isValid() { return true; }
public boolean isValid() { return true; }
public boolean isValid() { return true; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public void setCDFSentry(EntryRecord sentry) { CDFSentry = sentry; }
public void setCDFSentry(EntryRecord sentry) { entryRecord = sentry; }
public void setCDFSentry(EntryRecord sentry) { CDFSentry = sentry; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public void setLastModified(long lastModified) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public void setLastModified(long lastModified) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public void setLastModified(long lastModified) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
public void setName(String newName) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public void setName(String newName) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
public void setName(String newName) throws IOException { throw new UnsupportedOperationException("not yet implemented"); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/aa324658a8e5c25a895787936a31595462ad8442/ISO9660Entry.java/buggy/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java
exceptionListener = (listener != null) ? listener : new ExceptionListener() { public void exceptionThrown(Exception e) { System.err.println("exception thrown: " + e); } };
exceptionListener = (listener != null) ? listener : DefaultExceptionListener.INSTANCE;
public void setExceptionListener(ExceptionListener listener) { exceptionListener = (listener != null) ? listener : new ExceptionListener() { public void exceptionThrown(Exception e) { System.err.println("exception thrown: " + e); } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5806c07c3eeedb0f4f92b9fbacf30c0f55915c25/Encoder.java/buggy/core/src/classpath/java/java/beans/Encoder.java
public Expression(Object target, String methodName, Object[] arguments)
public Expression(Object value, Object target, String methodName, Object[] arguments)
public Expression(Object target, String methodName, Object[] arguments) { super(target, methodName, arguments); this.value = UNSET; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Expression.java/buggy/core/src/classpath/java/java/beans/Expression.java
this.value = UNSET;
this.value = value;
public Expression(Object target, String methodName, Object[] arguments) { super(target, methodName, arguments); this.value = UNSET; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/Expression.java/buggy/core/src/classpath/java/java/beans/Expression.java
insets = new Insets(0, 0, 0, 0);
top = 0; bottom = 0; left = 0; right = 0;
public CompositeView(Element element) { super(element); children = new View[0]; insets = new Insets(0, 0, 0, 0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
return (short) insets.bottom;
return bottom;
protected short getBottomInset() { return (short) insets.bottom; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
inside.x = alloc.x + insets.left; inside.y = alloc.y + insets.top; inside.width = alloc.width - insets.left - insets.right; inside.height = alloc.height - insets.top - insets.bottom;
inside.x = alloc.x + left; inside.y = alloc.y + top; inside.width = alloc.width - left - right; inside.height = alloc.height - top - bottom;
protected Rectangle getInsideAllocation(Shape a) { if (a == null) return null; Rectangle alloc = a.getBounds(); // Initialize the inside allocation rectangle. This is done inside // a synchronized block in order to avoid multiple threads creating // this instance simultanously. Rectangle inside; synchronized(this) { inside = insideAllocation; if (inside == null) { inside = new Rectangle(); insideAllocation = inside; } } inside.x = alloc.x + insets.left; inside.y = alloc.y + insets.top; inside.width = alloc.width - insets.left - insets.right; inside.height = alloc.height - insets.top - insets.bottom; return inside; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
return (short) insets.left;
return left;
protected short getLeftInset() { return (short) insets.left; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
return (short) insets.right;
return right;
protected short getRightInset() { return (short) insets.right; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
return (short) insets.top;
return top;
protected short getTopInset() { return (short) insets.top; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
View view = children[i];
if (i >= 0 && i < getViewCount() && a != null) { view = getView(i);
protected View getViewAtPosition(int pos, Rectangle a) { int i = getViewIndexAtPosition(pos); View view = children[i]; childAllocation(i, a); return view; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
}
protected View getViewAtPosition(int pos, Rectangle a) { int i = getViewIndexAtPosition(pos); View view = children[i]; childAllocation(i, a); return view; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
if (b == Position.Bias.Backward && pos != 0)
if (b == Position.Bias.Backward)
public int getViewIndex(int pos, Position.Bias b) { if (b == Position.Bias.Backward && pos != 0) pos -= 1; return getViewIndexAtPosition(pos); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
return getViewIndexAtPosition(pos);
int i = -1; if (pos >= getStartOffset() && pos < getEndOffset()) i = getViewIndexAtPosition(pos); return i;
public int getViewIndex(int pos, Position.Bias b) { if (b == Position.Bias.Backward && pos != 0) pos -= 1; return getViewIndexAtPosition(pos); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
int index = -1; for (int i = 0; i < children.length; i++) { if (children[i].getStartOffset() <= pos && children[i].getEndOffset() > pos) { index = i; break; } } return index;
Element el = getElement(); return el.getElementIndex(pos);
protected int getViewIndexAtPosition(int pos) { int index = -1; for (int i = 0; i < children.length; i++) { if (children[i].getStartOffset() <= pos && children[i].getEndOffset() > pos) { index = i; break; } } return index; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
replace(0, getViewCount(), newChildren);
replace(0, 0, newChildren);
protected void loadChildren(ViewFactory f) { Element el = getElement(); int count = el.getElementCount(); View[] newChildren = new View[count]; for (int i = 0; i < count; ++i) { Element child = el.getElement(i); View view = f.create(child); newChildren[i] = view; } replace(0, getViewCount(), newChildren); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
int childIndex = getViewIndex(pos, bias); if (childIndex == -1) throw new BadLocationException("Position " + pos + " is not represented by view.", pos);
boolean backward = bias == Position.Bias.Backward; int testpos = backward ? Math.max(0, pos - 1) : pos;
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex == -1) throw new BadLocationException("Position " + pos + " is not represented by view.", pos); Shape ret = null; View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret = createDefaultLocation(a, bias); return ret; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
if (! backward || testpos >= getStartOffset()) { int childIndex = getViewIndexAtPosition(testpos); if (childIndex != -1 && childIndex < getViewCount()) {
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex == -1) throw new BadLocationException("Position " + pos + " is not represented by view.", pos); Shape ret = null; View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret = createDefaultLocation(a, bias); return ret; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result;
if (childAlloc != null) { ret = child.modelToView(pos, childAlloc, bias); if (ret == null && child.getEndOffset() == pos) { childIndex++; if (childIndex < getViewCount()) { child = getView(childIndex); childAlloc = getChildAllocation(childIndex, a); ret = child.modelToView(pos, childAlloc, bias); } } } } }
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex == -1) throw new BadLocationException("Position " + pos + " is not represented by view.", pos); Shape ret = null; View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret = createDefaultLocation(a, bias); return ret; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
ret = createDefaultLocation(a, bias);
{ throw new BadLocationException("Position " + pos + " is not represented by view.", pos); } }
public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { int childIndex = getViewIndex(pos, bias); if (childIndex == -1) throw new BadLocationException("Position " + pos + " is not represented by view.", pos); Shape ret = null; View child = getView(childIndex); Shape childAlloc = getChildAllocation(childIndex, a); if (childAlloc == null) ret = createDefaultLocation(a, bias); Shape result = child.modelToView(pos, childAlloc, bias); if (result != null) ret = result; else ret = createDefaultLocation(a, bias); return ret; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
}
public void replace(int offset, int length, View[] views) { // Check for null views to add. for (int i = 0; i < views.length; ++i) if (views[i] == null) throw new NullPointerException("Added views must not be null"); int endOffset = offset + length; // First we set the parent of the removed children to null. for (int i = offset; i < endOffset; ++i) children[i].setParent(null); View[] newChildren = new View[children.length - length + views.length]; System.arraycopy(children, 0, newChildren, 0, offset); System.arraycopy(views, 0, newChildren, offset, views.length); System.arraycopy(children, offset + length, newChildren, offset + views.length, children.length - (offset + length)); children = newChildren; // Finally we set the parent of the added children to this. for (int i = 0; i < views.length; ++i) views[i].setParent(this); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
protected void setInsets(short top, short left, short bottom, short right)
protected void setInsets(short t, short l, short b, short r)
protected void setInsets(short top, short left, short bottom, short right) { insets.top = top; insets.left = left; insets.bottom = bottom; insets.right = right; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
insets.top = top; insets.left = left; insets.bottom = bottom; insets.right = right;
top = t; left = l; bottom = b; right = r;
protected void setInsets(short top, short left, short bottom, short right) { insets.top = top; insets.left = left; insets.bottom = bottom; insets.right = right; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
Float l = (Float) attributes.getAttribute(StyleConstants.LeftIndent); short left = 0; if (l != null) left = l.shortValue(); Float r = (Float) attributes.getAttribute(StyleConstants.RightIndent); short right = 0; if (r != null) right = r.shortValue(); Float t = (Float) attributes.getAttribute(StyleConstants.SpaceAbove); short top = 0; if (t != null) top = t.shortValue(); Float b = (Float) attributes.getAttribute(StyleConstants.SpaceBelow); short bottom = 0; if (b != null) bottom = b.shortValue(); setInsets(top, left, bottom, right);
top = (short) StyleConstants.getSpaceAbove(attributes); bottom = (short) StyleConstants.getSpaceBelow(attributes); left = (short) StyleConstants.getLeftIndent(attributes); right = (short) StyleConstants.getRightIndent(attributes);
protected void setParagraphInsets(AttributeSet attributes) { Float l = (Float) attributes.getAttribute(StyleConstants.LeftIndent); short left = 0; if (l != null) left = l.shortValue(); Float r = (Float) attributes.getAttribute(StyleConstants.RightIndent); short right = 0; if (r != null) right = r.shortValue(); Float t = (Float) attributes.getAttribute(StyleConstants.SpaceAbove); short top = 0; if (t != null) top = t.shortValue(); Float b = (Float) attributes.getAttribute(StyleConstants.SpaceBelow); short bottom = 0; if (b != null) bottom = b.shortValue(); setInsets(top, left, bottom, right); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/CompositeView.java/clean/core/src/classpath/javax/javax/swing/text/CompositeView.java
public int getViewIndex(int pos, Position.Bias b)
public int getViewIndex(float x, float y, Shape allocation)
public int getViewIndex(int pos, Position.Bias b) { return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/View.java/buggy/core/src/classpath/javax/javax/swing/text/View.java
{
{
public void replace(int offset, int length, View[] views) { // Default implementation does nothing. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/View.java/buggy/core/src/classpath/javax/javax/swing/text/View.java
if (maxButton != null)
protected void setButtonIcons() { closeButton.setIcon(closeIcon); iconButton.setIcon(iconIcon); maxButton.setIcon(maxIcon); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c5671ff077399b85034dffa0f9635da50cef54a9/BasicInternalFrameTitlePane.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
public void stateChanged(ChangeEvent event) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mouseDragged(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mouseEntered(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mouseExited(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mouseMoved(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mousePressed(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
public void mouseReleased(MouseEvent e) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicMenuBarUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
protected AccessibleJSlider() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/JSlider.java/clean/core/src/classpath/javax/javax/swing/JSlider.java
MouseEvent newEvent= new MouseEvent((Component) e.getSource(),
MouseEvent newEvent = new MouseEvent((Component) e.getSource(),
protected MouseEvent convertMouseEvent(MouseEvent e) { Point point = SwingUtilities.convertPoint((Component) e.getSource(), e.getPoint(), list); MouseEvent newEvent= new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers(), point.x, point.y, e.getModifiers(), e.isPopupTrigger()); return newEvent; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/BasicComboPopup.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboPopup.java
if (preferredSize != null) { Dimension prefSize = getPreferredSize(); prefSize.width = Math.max(prefSize.width, minimumSize.width); prefSize.height = Math.max(prefSize.height, minimumSize.height); setPreferredSize(prefSize); } if (maximumSize != null) { Dimension maxSize = getMaximumSize(); maxSize.width = Math.max(maxSize.width, minimumSize.width); maxSize.height = Math.max(maxSize.height, minimumSize.height); setMaximumSize(maxSize); }
public void setMinimumSize(Dimension min) { Dimension oldMinimumSize = minimumSize; minimumSize = min; firePropertyChange("minimumSize", oldMinimumSize, minimumSize); revalidate(); repaint(); // adjust preferred and maximum size accordingly if (preferredSize != null) { Dimension prefSize = getPreferredSize(); prefSize.width = Math.max(prefSize.width, minimumSize.width); prefSize.height = Math.max(prefSize.height, minimumSize.height); setPreferredSize(prefSize); } if (maximumSize != null) { Dimension maxSize = getMaximumSize(); maxSize.width = Math.max(maxSize.width, minimumSize.width); maxSize.height = Math.max(maxSize.height, minimumSize.height); setMaximumSize(maxSize); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/JComponent.java/buggy/core/src/classpath/javax/javax/swing/JComponent.java
Dimension size = this.getSize();
Dimension size = getSize(); if (size.width == 0 && size.height == 0) { size = getPreferredSize(); setSize(size); }
public void setVisible(boolean visible) { if (visible == isVisible()) return; boolean old = isVisible(); this.visible = visible; if (old != isVisible()) { firePropertyChange("visible", old, isVisible()); if (visible) { firePopupMenuWillBecomeVisible(); Container rootContainer = (Container) SwingUtilities.getRoot(invoker); Dimension screenSize = getToolkit().getScreenSize(); boolean fit = true; Dimension size = this.getSize(); if ((size.width > (rootContainer.getWidth() - popupLocation.x)) || (size.height > (rootContainer.getHeight() - popupLocation.y))) fit = false; if (lightWeightPopupEnabled && fit) popup = new LightWeightPopup(this); else { if (fit) popup = new MediumWeightPopup(this); else { popup = new HeavyWeightPopup(this); setLightWeightPopupEnabled(false); } } if (popup instanceof LightWeightPopup || popup instanceof MediumWeightPopup) { JLayeredPane layeredPane; layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane(); Point p = new Point(popupLocation.x, popupLocation.y); if (layeredPane.isShowing()) SwingUtilities.convertPointFromScreen(p, layeredPane); if (size.width + popupLocation.x > screenSize.width) popupLocation.x -= size.width; if (size.height + popupLocation.y > screenSize.height) popupLocation.y -= size.height; popup.show(p.x, p.y, size.width, size.height); } else { // Subtract insets of the top-level container if popup menu's // top-left corner is inside it. Insets insets = rootContainer.getInsets(); if (size.width + popupLocation.x > screenSize.width) popupLocation.x -= size.width; if (size.height + popupLocation.y > screenSize.height) popupLocation.y -= size.height; popup.show(popupLocation.x - insets.left, popupLocation.y - insets.top, size.width, size.height); } } else { firePopupMenuWillBecomeInvisible(); popup.hide(); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/804045622bd8dd509311bab751f88cfa2f79345a/JPopupMenu.java/buggy/core/src/classpath/javax/javax/swing/JPopupMenu.java
bad.minor = Minor.Any;
public static BindingIterator extract(Any a) { try { return ((BindingIteratorHolder) a.extract_Streamable()).value; } catch (ClassCastException ex) { BAD_OPERATION bad = new BAD_OPERATION("Binding iterator expected"); bad.initCause(ex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/BindingIteratorHelper.java/clean/core/src/classpath/org/org/omg/CosNaming/BindingIteratorHelper.java
bad.minor = Minor.Any;
public static InvalidValue extract(Any any) { try { EmptyExceptionHolder h = (EmptyExceptionHolder) any.extract_Streamable(); return (InvalidValue) h.value; } catch (ClassCastException cex) { BAD_OPERATION bad = new BAD_OPERATION("InvalidValue expected"); bad.initCause(cex); throw bad; } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/InvalidValueHelper.java/buggy/core/src/classpath/org/org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java
public boolean addAxisValueList (ValueListInterface valueListObj)
public boolean addAxisValueList (ValueList valueListObj)
public boolean addAxisValueList (ValueListInterface valueListObj) { List values = valueListObj.getValues(); // do we have any new values? if (values.size() > 0) { addValueListObj(valueListObj); // append in new values to Parameter obj Iterator iter = values.iterator(); while (iter.hasNext()) { Value thisValue = ((Value) iter.next()); internalAddAxisValue(thisValue); } return true; } else { // safety, needed? hasValueListCompactDescription = false; Log.warnln("Warning: no Values appended, ValueList empty. Parameter unchanged."); return false; } }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/Axis.java/buggy/src/gov/nasa/gsfc/adc/xdf/Axis.java
public void setAxisValueList (ValueListInterface valueListObj)
public void setAxisValueList (ValueList valueListObj)
public void setAxisValueList (ValueListInterface valueListObj) { resetAxisValues(); addAxisValueList(valueListObj); }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/Axis.java/buggy/src/gov/nasa/gsfc/adc/xdf/Axis.java
protected boolean addValueListObj (ValueListInterface valueListObj)
protected boolean addValueListObj (ValueList valueListObj)
protected boolean addValueListObj (ValueListInterface valueListObj) { if (valueListObj == null) return false; valueListObjects.add(valueListObj); hasValueListCompactDescription = true; return true; }
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/BaseObjectWithXMLElementsAndValueList.java/buggy/src/gov/nasa/gsfc/adc/xdf/BaseObjectWithXMLElementsAndValueList.java
ex.printStackTrace();
public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (poa.servant_locator != null) { try { servant = poa.servant_locator.preinvoke(Id, poa, operation, cookie); return servantToHandler(servant); } catch (org.omg.PortableServer.ForwardRequest forw_ex) { if (forwarding_allowed) { throw new gnuForwardRequest(forw_ex.forward_reference); } else { servant = ForwardedServant.create(forw_ex.forward_reference); return servantToHandler(servant); } } } else // Use servant activator to locate the servant. if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) && poa.applies(ServantRetentionPolicyValue.RETAIN) ) { try { poa.activate_object_with_id(Id, servant, forwarding_allowed); servant = poa.id_to_servant(Id); return servantToHandler(servant); } catch (gnuForwardRequest forwarded) { throw forwarded; } catch (Exception ex) { ex.printStackTrace(); BAD_OPERATION bad = new BAD_OPERATION("Unable to activate", 0x5004, CompletionStatus.COMPLETED_NO ); bad.initCause(ex); throw bad; } } else if (poa.default_servant != null) { servant = poa.default_servant; return servantToHandler(servant); } // No servant and no servant manager - throw exception. else { throw new BAD_OPERATION("Unable to activate", 0x5002, CompletionStatus.COMPLETED_NO ); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/gnuServantObject.java/clean/core/src/classpath/gnu/gnu/CORBA/Poa/gnuServantObject.java
new BAD_OPERATION("Unable to activate", 0x5004,
new BAD_OPERATION("Unable to activate", Minor.Activation,
public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (poa.servant_locator != null) { try { servant = poa.servant_locator.preinvoke(Id, poa, operation, cookie); return servantToHandler(servant); } catch (org.omg.PortableServer.ForwardRequest forw_ex) { if (forwarding_allowed) { throw new gnuForwardRequest(forw_ex.forward_reference); } else { servant = ForwardedServant.create(forw_ex.forward_reference); return servantToHandler(servant); } } } else // Use servant activator to locate the servant. if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) && poa.applies(ServantRetentionPolicyValue.RETAIN) ) { try { poa.activate_object_with_id(Id, servant, forwarding_allowed); servant = poa.id_to_servant(Id); return servantToHandler(servant); } catch (gnuForwardRequest forwarded) { throw forwarded; } catch (Exception ex) { ex.printStackTrace(); BAD_OPERATION bad = new BAD_OPERATION("Unable to activate", 0x5004, CompletionStatus.COMPLETED_NO ); bad.initCause(ex); throw bad; } } else if (poa.default_servant != null) { servant = poa.default_servant; return servantToHandler(servant); } // No servant and no servant manager - throw exception. else { throw new BAD_OPERATION("Unable to activate", 0x5002, CompletionStatus.COMPLETED_NO ); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/gnuServantObject.java/clean/core/src/classpath/gnu/gnu/CORBA/Poa/gnuServantObject.java
throw new BAD_OPERATION("Unable to activate", 0x5002,
throw new BAD_OPERATION("Unable to activate", Minor.Activation,
public InvokeHandler getHandler(String operation, CookieHolder cookie, boolean forwarding_allowed ) throws gnuForwardRequest { if (servant != null) { return servantToHandler(servant); } else { // Use servant locator to locate the servant. if (poa.servant_locator != null) { try { servant = poa.servant_locator.preinvoke(Id, poa, operation, cookie); return servantToHandler(servant); } catch (org.omg.PortableServer.ForwardRequest forw_ex) { if (forwarding_allowed) { throw new gnuForwardRequest(forw_ex.forward_reference); } else { servant = ForwardedServant.create(forw_ex.forward_reference); return servantToHandler(servant); } } } else // Use servant activator to locate the servant. if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) && poa.applies(ServantRetentionPolicyValue.RETAIN) ) { try { poa.activate_object_with_id(Id, servant, forwarding_allowed); servant = poa.id_to_servant(Id); return servantToHandler(servant); } catch (gnuForwardRequest forwarded) { throw forwarded; } catch (Exception ex) { ex.printStackTrace(); BAD_OPERATION bad = new BAD_OPERATION("Unable to activate", 0x5004, CompletionStatus.COMPLETED_NO ); bad.initCause(ex); throw bad; } } else if (poa.default_servant != null) { servant = poa.default_servant; return servantToHandler(servant); } // No servant and no servant manager - throw exception. else { throw new BAD_OPERATION("Unable to activate", 0x5002, CompletionStatus.COMPLETED_NO ); } } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/gnuServantObject.java/clean/core/src/classpath/gnu/gnu/CORBA/Poa/gnuServantObject.java
public ActivationGroupID(ActivationSystem system) {
public ActivationGroupID(ActivationSystem system) {
public ActivationGroupID(ActivationSystem system) { this.system = system;}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
}
}
public ActivationGroupID(ActivationSystem system) { this.system = system;}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true);
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID) obj; return system.equals(that.system);
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true); } } return (false);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
return (false); }
public boolean equals(Object obj) { if (obj instanceof ActivationGroupID) { ActivationGroupID that = (ActivationGroupID)obj; if (this.system.equals(that.system)) { return (true); } } return (false);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
public ActivationSystem getSystem() { return (system); }
public ActivationSystem getSystem() { return system; }
public ActivationSystem getSystem() { return (system);}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
public int hashCode() { return (system.hashCode()); }
public int hashCode() { return system.hashCode(); }
public int hashCode() { return (system.hashCode());}
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/ActivationGroupID.java/buggy/core/src/classpath/java/java/rmi/activation/ActivationGroupID.java
if (deviceName.getText() != null)
if (deviceName.getText() != null && !sdn.isSelected())
private static String toArgString() { StringBuffer sb = new StringBuffer(); sb.append(systemId.getText()); // port if (port.getText() != null) if (port.getText().trim().length() > 0) sb.append(" -p " + port.getText().trim()); if (fpn.getText() != null) if (fpn.getText().length() > 0) sb.append(" -f " + fpn.getText()); if (!LangTool.getString("conf.labelDefault").equals( (String)cpb.getSelectedItem())) sb.append(" -cp " + (String)cpb.getSelectedItem()); if (!SSL_TYPE_NONE.equals((String)sslType.getSelectedItem())) sb.append(" -sslType " + (String)sslType.getSelectedItem()); if (ec.isSelected()) sb.append(" -e" ); if (tc.isSelected()) sb.append(" -t" ); if (!sdNormal.isSelected()) sb.append(" -132" ); if (deviceName.getText() != null) if (deviceName.getText().trim().length() > 0) if (deviceName.getText().trim().length() > 10) sb.append(" -dn " + deviceName.getText().trim().substring(0,10).toUpperCase()); else sb.append(" -dn " + deviceName.getText().trim().toUpperCase()); if (useProxy.isSelected()) sb.append(" -usp" ); if (proxyHost.getText() != null) if (proxyHost.getText().length() > 0) sb.append(" -sph " + proxyHost.getText()); if (proxyPort.getText() != null) if (proxyPort.getText().length() > 0) sb.append(" -spp " + proxyPort.getText()); if (noEmbed.isSelected()) sb.append(" -noembed "); if (deamon.isSelected()) sb.append(" -d "); if (newJVM.isSelected()) sb.append(" -nc "); return sb.toString(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/1628a5b2ea01b3bfb66854e9d7b426faf9acd581/Configure.java/clean/tn5250j/src/org/tn5250j/Configure.java