rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k | meta stringlengths 141 403 |
|---|---|---|---|
public static String valueOf(int i) | public static String valueOf(Object obj) | public static String valueOf(int i) { // See Integer to understand why we call the two-arg variant. return Integer.toString(i, 10); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
return Integer.toString(i, 10); | return obj == null ? "null" : obj.toString(); | public static String valueOf(int i) { // See Integer to understand why we call the two-arg variant. return Integer.toString(i, 10); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
public byte[] getBytes(String enc) throws UnsupportedEncodingException | public void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin) | public byte[] getBytes(String enc) throws UnsupportedEncodingException { try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); if(bbuf.hasArray()) return bbuf.array(); byte[] bytes = new byte[bbuf.remaining()]; ... | if (srcBegin < 0 || srcBegin > srcEnd || srcEnd > count) throw new StringIndexOutOfBoundsException(); int i = srcEnd - srcBegin; srcBegin += offset; while (--i >= 0) dst[dstBegin++] = (byte) value[srcBegin++]; | public byte[] getBytes(String enc) throws UnsupportedEncodingException { try { CharsetEncoder cse = Charset.forName(enc).newEncoder(); cse.onMalformedInput(CodingErrorAction.REPLACE); cse.onUnmappableCharacter(CodingErrorAction.REPLACE); ByteBuffer bbuf = cse.encode(CharBuffer.wrap(value, offset, count)); i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
public InternalError(String s) { super(s); | public InternalError() { | public InternalError(String s) { super(s); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/InternalError.java/buggy/core/src/classpath/java/java/lang/InternalError.java |
public synchronized int indexOf(String str, int fromIndex) | public int indexOf(String str) | public synchronized int indexOf(String str, int fromIndex) { if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java |
if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; | return indexOf(str, 0); | public synchronized int indexOf(String str, int fromIndex) { if (fromIndex < 0) fromIndex = 0; int limit = count - str.count; for ( ; fromIndex <= limit; fromIndex++) if (regionMatches(fromIndex, str)) return fromIndex; return -1; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java |
public synchronized String substring(int beginIndex, int endIndex) | public String substring(int beginIndex) | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Don't copy unless substring is smaller than 1/4 of the ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java |
int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; boolean share_buffer = ((len << 2) >= value.length); if (share_buffer) this.shared = true; return new String(value, beginIndex, len, share_buffer); | return substring(beginIndex, count); | public synchronized String substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) throw new StringIndexOutOfBoundsException(); if (len == 0) return ""; // Don't copy unless substring is smaller than 1/4 of the ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/68a6301301378680519f2b146daec37812a1bc22/StringBuffer.java/buggy/core/src/classpath/java/java/lang/StringBuffer.java |
public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException | public String() | public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException { if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalfor... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalformedInput(CodingErrorAction.REPLACE); csd.onUnmappableCharacter(CodingErrorAction.REPLACE); CharBuffer cbuf = csd.decode(ByteBuffer.wrap... | value = "".value; offset = 0; count = 0; | public String(byte[] data, int offset, int count, String encoding) throws UnsupportedEncodingException { if (offset < 0 || count < 0 || offset + count > data.length) throw new StringIndexOutOfBoundsException(); try { CharsetDecoder csd = Charset.forName(encoding).newDecoder(); csd.onMalfor... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d8df9982463a273f994e73e8e16990f8349f7cc2/String.java/buggy/core/src/classpath/5.0/java/lang/String.java |
if ((subElements[j].getComponent()).equals(c)) | MenuElement me = subElements[j]; if (me != null && (me.getComponent()).equals(c)) | public boolean isComponentPartOfCurrentMenu(Component c) { MenuElement[] subElements; for (int i = 0; i < selectedPath.size(); i++) { subElements = ((MenuElement) selectedPath.get(i)).getSubElements(); for (int j = 0; j < subElements.length; j++) { if ((subElements[j].getComponent()).e... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/MenuSelectionManager.java/clean/core/src/classpath/javax/javax/swing/MenuSelectionManager.java |
void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); | void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); | void processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager); | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MenuElement.java/buggy/core/src/classpath/javax/javax/swing/MenuElement.java |
else if (y > r.y + r.height) return y - (r.y + r.height); | else if (y > r.y + r.height - 1) return y - (r.y + r.height - 1); | int distance(Rectangle r, int x, int y) { if (y < r.y) return r.y - y; else if (y > r.y + r.height) return y - (r.y + r.height); else return 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/VariableHeightLayoutCache.java/clean/core/src/classpath/javax/javax/swing/tree/VariableHeightLayoutCache.java |
public void setRect(Rectangle2D r) { setRect(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } | public abstract void setRect(double x, double y, double w, double h); | public void setRect(Rectangle2D r) { setRect(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/560cf787ab92cba97cf57ce7b258e72947e5efbc/Rectangle2D.java/buggy/core/src/classpath/java/java/awt/geom/Rectangle2D.java |
public void addLayoutComponent(String name, Component component) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BoxLayout.java/clean/core/src/classpath/javax/javax/swing/BoxLayout.java | ||
children[i].setBounds(offsetsX[i] + in.left, offsetsY[i] + in.top, spansX[i], spansY[i]); | children[i].setBounds(offsetsX[i] + in.left, offsetsY[i] + in.top, spansX[i], spansY[i]); | public void layoutContainer(Container parent) { synchronized(container.getTreeLock()) { if (container != parent) throw new AWTError("BoxLayout can't be shared"); checkLayout(); Component[] children = container.getComponents(); Insets in = container.getInsets(); for (int i = 0; i... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BoxLayout.java/clean/core/src/classpath/javax/javax/swing/BoxLayout.java |
public void removeLayoutComponent(Component component) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BoxLayout.java/clean/core/src/classpath/javax/javax/swing/BoxLayout.java | ||
calculateTiledPositions(allocated, total, children, offsets, spans, true); | calculateAlignedPositions(allocated, total, children, offsets, spans, true); | public static void calculateAlignedPositions(int allocated, SizeRequirements total, SizeRequirements[] children, int[] offsets, int[] spans) { calculateTiledPositions(allocated... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/SizeRequirements.java/buggy/core/src/classpath/javax/javax/swing/SizeRequirements.java |
return null; | return null; | getAlignedSizeRequirements(SizeRequirements[] children) { return null; // TODO } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/SizeRequirements.java/buggy/core/src/classpath/javax/javax/swing/SizeRequirements.java |
protected DividerLayout() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicSplitPaneDivider.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicSplitPaneDivider.java | ||
public void setDividerLocation(int location) | public void setDividerLocation(double proportionalLocation) | public void setDividerLocation(int location) { if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JSplitPane.java/buggy/core/src/classpath/javax/javax/swing/JSplitPane.java |
if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } | if (proportionalLocation > 1 || proportionalLocation < 0) throw new IllegalArgumentException("proportion has to be between 0 and 1."); int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight(); setDividerLocation((int) (proportionalLocation * max)); | public void setDividerLocation(int location) { if (ui != null && location != getDividerLocation()) { int oldLocation = getDividerLocation(); ((SplitPaneUI) ui).setDividerLocation(this, location); firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation, location); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JSplitPane.java/buggy/core/src/classpath/javax/javax/swing/JSplitPane.java |
public PlainDatagramSocketImpl() | public PlainDatagramSocketImpl() throws IOException | public PlainDatagramSocketImpl() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
channel = new VMChannel(); impl = new VMPlainSocketImpl(channel); | public PlainDatagramSocketImpl() { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java | |
throw new SocketException("Not implemented"); | try { impl.bind(new InetSocketAddress(addr, port)); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new SocketException(); se.initCause(ioe); throw se; } | protected synchronized void bind(int port, InetAddress addr) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
protected synchronized void close() { throw new RuntimeException("Not implemented"); | protected synchronized void close() { try { if (channel.getState().isValid()) channel.close(); } catch (IOException ioe) { } | protected synchronized void close() { // @vm-specific no natives //TODO implement me throw new RuntimeException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
protected synchronized void create() throws SocketException { throw new SocketException("Not implemented"); | protected synchronized void create() throws SocketException { try { channel.initSocket(false); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new SocketException(); se.initCause(ioe); throw se; } | protected synchronized void create() throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
public synchronized Object getOption(int option_id) throws SocketException { throw new SocketException("Not implemented"); | public synchronized Object getOption(int optionId) throws SocketException { if (optionId == SO_BINDADDR) { try { InetSocketAddress local = channel.getLocalAddress(); if (local == null) return null; return local.getAddress(); } catch (SocketException se) { throw se; } catch (IOException ioe) { SocketException se = new S... | public synchronized Object getOption(int option_id) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
Object obj = getOption(IP_TTL); if (! (obj instanceof Integer)) throw new IOException("Internal Error"); return ((Integer) obj).intValue(); | return impl.getTimeToLive(); | protected synchronized int getTimeToLive() throws IOException { Object obj = getOption(IP_TTL); if (! (obj instanceof Integer)) throw new IOException("Internal Error"); return ((Integer) obj).intValue(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
protected synchronized void join(InetAddress addr) throws IOException { throw new SocketException("Not implemented"); | protected synchronized void join(InetAddress addr) throws IOException { impl.join(addr); | protected synchronized void join(InetAddress addr) throws IOException { // @vm-specific no natives throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
throw new InternalError ("PlainDatagramSocketImpl::joinGroup is not implemented"); | if (address == null) throw new NullPointerException(); if (!(address instanceof InetSocketAddress)) throw new SocketException("unknown address type"); impl.joinGroup((InetSocketAddress) address, netIf); | public void joinGroup(SocketAddress address, NetworkInterface netIf) { throw new InternalError ("PlainDatagramSocketImpl::joinGroup is not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
protected synchronized void leave(InetAddress addr) throws IOException { throw new SocketException("Not implemented"); | protected synchronized void leave(InetAddress addr) throws IOException { impl.leave(addr); | protected synchronized void leave(InetAddress addr) throws IOException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
throw new InternalError ("PlainDatagramSocketImpl::leaveGroup is not implemented"); | if (address == null) throw new NullPointerException(); if (!(address instanceof InetSocketAddress)) throw new SocketException("unknown address type"); impl.leaveGroup((InetSocketAddress) address, netIf); | public void leaveGroup(SocketAddress address, NetworkInterface netIf) { throw new InternalError ("PlainDatagramSocketImpl::leaveGroup is not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
synchronized(RECEIVE_LOCK) { receive0(packet); } | synchronized(RECEIVE_LOCK) { ByteBuffer buf = ByteBuffer.wrap(packet.getData(), packet.getOffset(), packet.getLength()); SocketAddress addr = null; while (true) { try { addr = channel.receive(buf); break; } catch (SocketTimeoutException ste) { throw ste; } catch (InterruptedIOException iioe) { } } if (addr != null) pa... | protected void receive(DatagramPacket packet) throws IOException { synchronized(RECEIVE_LOCK) { receive0(packet); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
synchronized(SEND_LOCK) | synchronized (SEND_LOCK) | protected void send(DatagramPacket packet) throws IOException { synchronized(SEND_LOCK) { sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); | ByteBuffer buf = ByteBuffer.wrap(packet.getData(), packet.getOffset(), packet.getLength()); InetAddress remote = packet.getAddress(); int port = packet.getPort(); if (remote == null) throw new NullPointerException(); if (port <= 0) throw new SocketException("invalid port " + port); while (true) { try { channel.send(buf... | protected void send(DatagramPacket packet) throws IOException { synchronized(SEND_LOCK) { sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
protected void send(DatagramPacket packet) throws IOException { synchronized(SEND_LOCK) { sendto(packet.getAddress(), packet.getPort(), packet.getData(), packet.getOffset(), packet.getLength()); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java | ||
public synchronized void setOption(int option_id, Object val) throws SocketException { throw new SocketException("Not implemented"); | public synchronized void setOption(int optionId, Object value) throws SocketException { switch (optionId) { case IP_MULTICAST_IF: case IP_MULTICAST_IF2: impl.setMulticastInterface(optionId, (InetAddress) value); break; case IP_MULTICAST_LOOP: case SO_BROADCAST: case SO_KEEPALIVE: case SO_OOBINLINE: case TCP_NODELAY: c... | public synchronized void setOption(int option_id, Object val) throws SocketException { // @vm-specific no natives //TODO implement me throw new SocketException("Not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
setOption(IP_TTL, new Integer(ttl)); | impl.setTimeToLive(ttl); | protected synchronized void setTimeToLive(int ttl) throws IOException { setOption(IP_TTL, new Integer(ttl)); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c6bd4d63622475fff01c1920f223e404234d976f/PlainDatagramSocketImpl.java/clean/core/src/classpath/gnu/gnu/java/net/PlainDatagramSocketImpl.java |
public NullPointerException() { super(); | public NullPointerException() { | public NullPointerException() { super(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b2ed890086e708f00d163f3e8514bfa8b353f662/NullPointerException.java/buggy/core/src/classpath/java/java/lang/NullPointerException.java |
public synchronized byte[] getData() { | public synchronized byte[] getData() { | public synchronized byte[] getData() { return buffer; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
public synchronized int getOffset() { | public synchronized int getOffset() { | public synchronized int getOffset() { return offset; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
public synchronized int getLength() { | public synchronized int getLength() { | public synchronized int getLength() { return length; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { | public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { | public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { if (address == null) throw new IllegalArgumentException(); InetSocketAddress tmp = (InetSocketAddress) address; this.address = tmp.getAddress(); this.port = tmp.getPort(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
throw new IllegalArgumentException(); | throw new IllegalArgumentException("address may not be null"); | public void setSocketAddress(SocketAddress address) throws IllegalArgumentException { if (address == null) throw new IllegalArgumentException(); InetSocketAddress tmp = (InetSocketAddress) address; this.address = tmp.getAddress(); this.port = tmp.getPort(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
public synchronized void setLength(int length) { | public synchronized void setLength(int length) { | public synchronized void setLength(int length) { if (length < 0) throw new IllegalArgumentException("Invalid length: " + length); if (offset + length > buffer.length) throw new IllegalArgumentException("Potential buffer overflow - offset: " + offset + " length: " + length); this.length = length; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
throw new IllegalArgumentException("Potential buffer overflow - offset: " + offset + " length: " + length); | throw new IllegalArgumentException("Potential buffer overflow - offset: " + offset + " length: " + length); | public synchronized void setLength(int length) { if (length < 0) throw new IllegalArgumentException("Invalid length: " + length); if (offset + length > buffer.length) throw new IllegalArgumentException("Potential buffer overflow - offset: " + offset + " length: " + length); this.length = length; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
this.maxlen = length; | public synchronized void setLength(int length) { if (length < 0) throw new IllegalArgumentException("Invalid length: " + length); if (offset + length > buffer.length) throw new IllegalArgumentException("Potential buffer overflow - offset: " + offset + " length: " + length); this.length = length; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java | |
public synchronized InetAddress getAddress() { | public synchronized InetAddress getAddress() { | public synchronized InetAddress getAddress() { return address; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
public synchronized int getPort() { | public synchronized int getPort() { | public synchronized int getPort() { return port; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7c463aa3bd840a934d101c434976bb7b25d5b975/DatagramPacket.java/buggy/core/src/classpath/java/java/net/DatagramPacket.java |
{ | { | public String toString(){ String styleString = ""; switch (getStyle ()) { case 0: styleString = "plain"; break; case 1: styleString = "bold"; break; case 2: styleString = "italic"; break; default: styleString = "unknown"; } return getClass ().getName () + "[... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
switch (getStyle ()) | switch (getStyle()) | public String toString(){ String styleString = ""; switch (getStyle ()) { case 0: styleString = "plain"; break; case 1: styleString = "bold"; break; case 2: styleString = "italic"; break; default: styleString = "unknown"; } return getClass ().getName () + "[... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
return getClass ().getName () | return getClass().getName() | public String toString(){ String styleString = ""; switch (getStyle ()) { case 0: styleString = "plain"; break; case 1: styleString = "bold"; break; case 2: styleString = "italic"; break; default: styleString = "unknown"; } return getClass ().getName () + "[... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
} | } | public String toString(){ String styleString = ""; switch (getStyle ()) { case 0: styleString = "plain"; break; case 1: styleString = "bold"; break; case 2: styleString = "italic"; break; default: styleString = "unknown"; } return getClass ().getName () + "[... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
public int getSize () { | public int getSize() { | public int getSize (){ return size;} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
} | } | public int getSize (){ return size;} | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
public Font (String name, int style, int size) | public Font(String name, int style, int size) | public Font (String name, int style, int size) { HashMap attrs = new HashMap(); ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); this.peer = getPeerFromToolkit (name, attrs); this.size = size; this.pointSize = (float) size; if (name != null) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); this.peer = getPeerFromToolkit (name, attrs); | ClasspathFontPeer.copyStyleToAttrs(style, attrs); ClasspathFontPeer.copySizeToAttrs(size, attrs); this.peer = getPeerFromToolkit(name, attrs); | public Font (String name, int style, int size) { HashMap attrs = new HashMap(); ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); this.peer = getPeerFromToolkit (name, attrs); this.size = size; this.pointSize = (float) size; if (name != null) ... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c0997df57feec0722568b1f1cc390b475c418086/Font.java/buggy/core/src/classpath/java/java/awt/Font.java |
throw new InternalError ("not implemented"); | return super.getActions(); | public Action[] getActions () { throw new InternalError ("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20f5673386408fafdc5023d9aa75062c49b110c6/JFormattedTextField.java/clean/core/src/classpath/javax/javax/swing/JFormattedTextField.java |
throw new InternalError ("not implemented"); | super.processFocusEvent(evt); | protected void processFocusEvent (FocusEvent evt) { throw new InternalError ("not implemented"); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/20f5673386408fafdc5023d9aa75062c49b110c6/JFormattedTextField.java/clean/core/src/classpath/javax/javax/swing/JFormattedTextField.java |
"Button.margin", new Insets(2, 14, 2, 14), | "Button.margin", new InsetsUIResource(2, 14, 2, 14), | protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalLookAndFeel.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalLookAndFeel.java |
"List.font", getControlTextFont(), | protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", getControl(), "Button.border", MetalBorders.getButtonBorder(), "Button.darkShadow", getControlDarkShadow(), "Button.disabledText", get... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalLookAndFeel.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalLookAndFeel.java | |
public void addCustomEntriesToTable(UIDefaults table) { // Do nothing here. // This method needs to be overloaded to actuall do something. } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/c4eda97e6e5feb8e7650d83d5066d85580f1249c/MetalTheme.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalTheme.java | ||
"TextArea.font", new FontUIResource("MonoSpaced", Font.PLAIN, 12), | "TextArea.font", new FontUIResource("Monospaced", Font.PLAIN, 12), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicLookAndFeel.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicLookAndFeel.java |
"TextField.inactiveBackground", new ColorUIResource(light), "TextField.inactiveForeground", new ColorUIResource(Color.gray), | "TextField.inactiveBackground", new ColorUIResource(Color.LIGHT_GRAY), "TextField.inactiveForeground", new ColorUIResource(Color.GRAY), | protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/BasicLookAndFeel.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicLookAndFeel.java |
Border inner = getMarginBorder(); | Border inner = getMarginBorder(); | public static Border getButtonBorder() { if (buttonBorder == null) { Border outer = new ButtonBorder(); Border inner = getMarginBorder(); buttonBorder = new BorderUIResource.CompoundBorderUIResource (outer, inner); } return buttonBorder; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java |
textFieldBorder = new TextFieldBorder(); | { Border inner = getMarginBorder(); Border outer = new TextFieldBorder(); textFieldBorder = new BorderUIResource.CompoundBorderUIResource(outer, inner); } | public static Border getTextFieldBorder() { if (textFieldBorder == null) textFieldBorder = new TextFieldBorder(); return textFieldBorder; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalBorders.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalBorders.java |
String s = getText(); Font f = getFont(); if (f != null) | Dimension size = super.getPreferredSize(); if (renderer != null && DefaultTreeCellEditor.this.getFont() == null) | public Dimension getPreferredSize() { String s = getText(); Font f = getFont(); if (f != null) { FontMetrics fm = getToolkit().getFontMetrics(f); return new Dimension(SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); } ret... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
FontMetrics fm = getToolkit().getFontMetrics(f); return new Dimension(SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); | size.height = renderer.getPreferredSize().height; | public Dimension getPreferredSize() { String s = getText(); Font f = getFont(); if (f != null) { FontMetrics fm = getToolkit().getFontMetrics(f); return new Dimension(SwingUtilities.computeStringWidth(fm, s), fm.getHeight()); } ret... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
int eOffset; if (editingIcon != null) eOffset = editingIcon.getIconWidth(); else eOffset = 0; Rectangle bounds = getBounds(); Component c = getComponent(0); c.setLocation(eOffset, 0); c.setSize(bounds.width - eOffset, bounds.height); /* * @specnote the Sun sets some more narrow editing component width (it is * no... | if (editingComponent != null) { editingComponent.getPreferredSize(); editingComponent.setBounds(offset, 0, getWidth() - offset, getHeight()); } } | public void doLayout() { // The offset of the editing component. int eOffset; // Move the component to the left, leaving room for the editing icon: if (editingIcon != null) eOffset = editingIcon.getIconWidth(); else eOffset = 0; Rectangle bounds = getBounds(); Com... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
editingIcon.paintIcon(this, g, 0, 0); | int y = Math.max(0, (getHeight() - editingIcon.getIconHeight()) / 2); editingIcon.paintIcon(this, g, 0, y); } Color c = getBorderSelectionColor(); if (c != null) { g.setColor(c); g.drawRect(0, 0, getWidth() - 1, getHeight() - 1); | public void paint(Graphics g) { if (editingIcon != null) { // From the previous version, the left margin is taken as half // of the icon width. editingIcon.paintIcon(this, g, 0, 0); } super.paint(g); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
if (tree != null && lastPath != null) tree.startEditingAtPath(lastPath); | public void actionPerformed(ActionEvent e) { } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java | |
if (editingComponent != null) { tree.cancelEditing(); editingComponent = null; } stopEditingTimer(); | realEditor.cancelCellEditing(); finish(); | public void cancelCellEditing() { if (editingComponent != null) { tree.cancelEditing(); editingComponent = null; } stopEditingTimer(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(CLICK_COUNT_TO_START); | Border border = UIManager.getBorder("Tree.editorBorder"); JTextField tf = new DefaultTreeCellEditor.DefaultTextField(border); DefaultCellEditor editor = new DefaultCellEditor(tf); editor.setClickCountToStart(1); | protected TreeCellEditor createTreeCellEditor() { DefaultCellEditor editor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( UIManager.getBorder("Tree.selectionBorder"))); editor.addCellEditorListener(new RealEditorListener()); editor.setClickCountToStart(C... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
renderer.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); Icon c = renderer.getIcon(); if (c != null) offset = renderer.getIconTextGap() + c.getIconWidth(); | if (renderer != null) { if (leaf) editingIcon = renderer.getLeafIcon(); else if (expanded) editingIcon = renderer.getOpenIcon(); | protected void determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { renderer.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); Icon c = renderer.getIcon(... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
} | protected void determineOffset(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { renderer.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); Icon c = renderer.getIcon(... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java | |
boolean isSelected, boolean expanded, | boolean isSelected, boolean expanded, | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getT... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
if (realEditor == null) realEditor = createTreeCellEditor(); | setTree(tree); lastRow = row; determineOffset(tree, value, isSelected, expanded, leaf, row); if (editingComponent != null) editingContainer.remove(editingComponent); | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getT... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
return realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); | editingComponent = realEditor.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row); Font f = getFont(); if (f == null) { if (renderer != null) f = renderer.getFont(); if (f == null) f = tree.getFont(); } editingContainer.setFont(f); prepareForEditing(); return editingContainer; | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (realEditor == null) realEditor = createTreeCellEditor(); return realEditor.getT... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
protected boolean inHitRegion(int x, int y) { Rectangle bounds = tree.getPathBounds(lastPath); return bounds.contains(x, y); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java | ||
if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) | boolean ret = false; boolean ed = false; if (event != null) | public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
prepareForEditing(); return true; | if (event.getSource() instanceof JTree) { setTree((JTree) event.getSource()); if (event instanceof MouseEvent) { MouseEvent me = (MouseEvent) event; TreePath path = tree.getPathForLocation(me.getX(), me.getY()); ed = lastPath != null && path != null && lastPath.equals(path); if (path != null) { lastRow = tree.getRowFor... | public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
return false; | } } } if (! realEditor.isCellEditable(event)) ret = false; else { if (canEditImmediately(event)) ret = true; else if (ed && shouldStartEditingTimer(event)) startEditingTimer(); else if (timer != null && timer.isRunning()) timer.stop(); } if (ret) prepareForEditing(); return ret; | public boolean isCellEditable(EventObject event) { if (editingComponent == null) configureEditingComponent(tree, renderer, realEditor); if (editingComponent != null && realEditor.isCellEditable(event)) { prepareForEditing(); return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
editingContainer.removeAll(); | if (editingComponent != null) | protected void prepareForEditing() { editingContainer.removeAll(); editingContainer.add(editingComponent); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
if (tree != null) tree.addTreeSelectionListener(this); if (timer != null) timer.stop(); } | protected void setTree(JTree newTree) { tree = newTree; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java | |
if ((event instanceof MouseEvent) && ((MouseEvent) event).getClickCount() == 1) return true; return false; | boolean ret = false; if (event instanceof MouseEvent) { MouseEvent me = (MouseEvent) event; ret = SwingUtilities.isLeftMouseButton(me) && me.getClickCount() == 1 && inHitRegion(me.getX(), me.getY()); } return ret; | protected boolean shouldStartEditingTimer(EventObject event) { if ((event instanceof MouseEvent) && ((MouseEvent) event).getClickCount() == 1) return true; return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
if (timer != null) | if (timer == null) { timer = new Timer(1200, this); timer.setRepeats(false); } | protected void startEditingTimer() { if (timer != null) timer.start(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
if (editingComponent != null) | boolean ret = false; if (realEditor.stopCellEditing()) | public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; | finish(); ret = true; | public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
return false; | return ret; | public boolean stopCellEditing() { if (editingComponent != null) { stopEditingTimer(); tree.stopEditing(); editingComponent = null; return true; } return false; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
tPath = lastPath; lastPath = e.getNewLeadSelectionPath(); lastRow = tree.getRowForPath(lastPath); stopCellEditing(); | if (tree != null) { if (tree.getSelectionCount() == 1) lastPath = tree.getSelectionPath(); else lastPath = null; } | public void valueChanged(TreeSelectionEvent e) { tPath = lastPath; lastPath = e.getNewLeadSelectionPath(); lastRow = tree.getRowForPath(lastPath); stopCellEditing(); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/DefaultTreeCellEditor.java/clean/core/src/classpath/javax/javax/swing/tree/DefaultTreeCellEditor.java |
public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); if (columns != 0) size.width = columns * getColumnWidth(); return size; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextField.java/buggy/core/src/classpath/javax/javax/swing/JTextField.java | ||
} | } | public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); if (columns != 0) size.width = columns * getColumnWidth(); return size; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTextField.java/buggy/core/src/classpath/javax/javax/swing/JTextField.java |
public static Color getColor(Object key) | public static Color getColor(Object key) | public static Color getColor(Object key) { return (Color) getLookAndFeelDefaults().get(key); } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/UIManager.java/buggy/core/src/classpath/javax/javax/swing/UIManager.java |
public DefaultCellEditor(JTextField textfield) { | public DefaultCellEditor(JTextField textfield) { | public DefaultCellEditor(JTextField textfield) { // TODO } // DefaultCellEditor() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/DefaultCellEditor.java/buggy/core/src/classpath/javax/javax/swing/DefaultCellEditor.java |
public void setClickCountToStart(int count) { | public void setClickCountToStart(int count) { | public void setClickCountToStart(int count) { // TODO } // setClickCountToStart() | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/DefaultCellEditor.java/buggy/core/src/classpath/javax/javax/swing/DefaultCellEditor.java |
Rectangle rect = getPathBounds(path); | Rectangle rect = getPathBounds(path); | public TreePath getPathForLocation(int x, int y) { TreePath path = getClosestPathForLocation(x, y); if (path != null) { Rectangle rect = getPathBounds(path); if ((rect != null) && rect.contains(x, y)) return path; } return null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTree.java/buggy/core/src/classpath/javax/javax/swing/JTree.java |
if ((rect != null) && rect.contains(x, y)) return path; | if ((rect != null) && rect.contains(x, y)) return path; | public TreePath getPathForLocation(int x, int y) { TreePath path = getClosestPathForLocation(x, y); if (path != null) { Rectangle rect = getPathBounds(path); if ((rect != null) && rect.contains(x, y)) return path; } return null; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTree.java/buggy/core/src/classpath/javax/javax/swing/JTree.java |
if (!treepath[index].equals(path[index])) | if (!path[index].equals(treepath[index])) | public boolean equals(Object object) { Object[] treepath; int index; if (object instanceof TreePath) { treepath = ((TreePath) object).getPath(); if (treepath.length != path.length) return false; for (index = 0; index < path.length; index++) { if (!treepath[index].eq... | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/TreePath.java/buggy/core/src/classpath/javax/javax/swing/tree/TreePath.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.