rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white);
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
int yPos = yPositionForValue(slider.getValue()); int y = (slider.getInverted() ? trackY : yPos); int h = (slider.getInverted() ? yPos - trackY : trackY + trackH - yPos); g.setColor(MetalLookAndFeel.getControlShadow()); g.fillRect(trackX + 1, y + 1, getTrackWidth() - 3, h - 3); if (slider.isEnabled()) { g.setColor(Metal...
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white);
public void paintTrack(Graphics g) { if (slider.getOrientation() == JSlider.HORIZONTAL) { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x, trackRect.y + (trackRect.height - getTrackWidth()) / 2, trackRect.width - 1, ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
protected void scrollDueToClickInTrack(int dir) { super.scrollDueToClickInTrack(dir); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/045a5b41cdfa747889101d3993040acf89788bc4/MetalSliderUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/metal/MetalSliderUI.java
log.info("Emitting objects ");
log("Emitting objects", Project.MSG_DEBUG);
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
log.info("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops");
log("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops");
private final void emitObjects(NativeStream os, VmArchitecture arch, Object skipMe) throws BuildException { log.info("Emitting objects "); PrintWriter debugOut = null; try { if (debug) { debugOut = new PrintWriter(new FileWriter(debugFile)); } final ObjectEmitter emitter = new ObjectEmitter(clsMgr, os, deb...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
log.info("Done.");
log("Done.");
public final void execute() throws BuildException { final long lmJar = jarFile.lastModified(); final long lmKernel = kernelFile.lastModified(); final long lmDest = destFile.lastModified(); final long lmPIL = getPluginListFile().lastModified(); final PluginList piList; final long lmPI; try { piList = getPlugin...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
add(new BootClassInfo("org.jnode.vm.MemoryBlockManager", core));
protected void setupBootClasses() { final int core = BootClassInfo.F_ALL; //final int core = BootClassInfo.F_RESOLVEALL; final int nonCore = BootClassInfo.F_RESOLVEALL; //int nonCore = BootClassInfo.F_ALL; add(new BootClassInfo("java.lang.Class", true, core)); add(new BootClassInfo("java.lang.Object", true, core...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
log.info("Creating image");
log("Creating image");
protected void storeImage(NativeStream os) throws BuildException { try { log.info("Creating image"); FileOutputStream fos = new FileOutputStream(destFile); fos.write(os.getBytes(), 0, os.getLength()); fos.close(); } catch (IOException ex) { throw new BuildException(ex); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d974d9b7c8007292fb3bf35e9f401b7489394db3/AbstractBootImageBuilder.java/clean/builder/src/builder/org/jnode/build/AbstractBootImageBuilder.java
public void removeLayoutComponent(Component c) { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/MetalInternalFrameTitlePane.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value;
IntItem(ItemFactory factory) { super(factory);
private IntItem(int kind, Register reg, int value, int local) { super(kind, reg, local); this.value = value; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/IntItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java
return createConst(getValue());
return factory.createIConst(getValue());
protected WordItem cloneConstant() { return createConst(getValue()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e304bedac9ab86f88bdb27ffd782a9777505c449/IntItem.java/clean/core/src/core/org/jnode/vm/x86/compiler/l1a/IntItem.java
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static LifespanPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e3ea509d80974dab547c4d1cf8c070d32bac86/LifespanPolicyValue.java/clean/core/src/classpath/org/org/omg/PortableServer/LifespanPolicyValue.java
}
}
protected String basicXMLWriter ( Writer outputWriter, String indent, boolean dontCloseNode, String newNodeNameString, String noChildObjectNodeName ...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/b357b1e9530facb16fd5e03bc66bcef62fde1673/DocumentType.java/buggy/src/gov/nasa/gsfc/adc/xdf/DocumentType.java
return KeyPairCodecFactory.getEncodingShortName(defaultFormat);
return FormatUtil.getEncodingShortName(defaultFormat);
public String getFormat() { return KeyPairCodecFactory.getEncodingShortName(defaultFormat); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/b9aa2b76c5fb6ec27c94f7eecf71cb3bc137fe2f/GnuRSAKey.java/buggy/core/src/classpath/gnu/gnu/java/security/key/rsa/GnuRSAKey.java
/* Updates the selected item only if the given object * is null or in the list (this is how the JDK behaves). */
public void setSelectedItem(Object object) { /* Updates the selected item only if the given object * is null or in the list (this is how the JDK behaves). */ if(object == null || list.contains(object)) { selectedItem = object; fireContentsChanged(this, -1, -1); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/159638d634951eb718c5e3a0917ef516d5a44797/DefaultComboBoxModel.java/clean/core/src/classpath/javax/javax/swing/DefaultComboBoxModel.java
if (key != null)
if (key != null && key.isValid())
public final SelectionKey register(Selector selin, int ops, Object att) throws ClosedChannelException { if (! isOpen()) throw new ClosedChannelException(); if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null; AbstractSelector selector = (AbstractSe...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/cdb624bf4a3742cc4374523f5c6856a06dcd8f92/AbstractSelectableChannel.java/clean/core/src/classpath/java/java/nio/channels/spi/AbstractSelectableChannel.java
wnd.add(sb, BorderLayout.SOUTH);
System.out.println(wnd.getFont().getName()); System.out.println(wnd.getFont().getClass().getName()); System.out.println(wnd.getFontMetrics(wnd.getFont()).getClass().getName());
public static void main(String[] args) throws InterruptedException { boolean useDoubleBuffer = (args.length > 0) && args[0].equals("buffer"); final Frame wnd = new Frame("AWTTest"); try { //wnd.setSize(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().ge...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/d64552ee2bc6ad50a696471b75cf8d30fdc5c266/AWTTest.java/clean/gui/src/test/org/jnode/test/gui/AWTTest.java
AccessController.doPrivileged(this.new GetHTTPPropertiesAction());
proxyHostname = SystemProperties.getProperty("http.proxyHost"); if (proxyHostname != null && proxyHostname.length() > 0) { String port = SystemProperties.getProperty("http.proxyPort"); if (port != null && port.length() > 0) { proxyPort = Integer.parseInt(port); } else { proxyHostname = null; proxyPort = -1; } } agent =...
public HTTPURLConnection(URL url) throws IOException { super(url); requestHeaders = new Headers(); AccessController.doPrivileged(this.new GetHTTPPropertiesAction()); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); }
requestHeaders.addValue(key, value);
public void addRequestProperty(String key, String value) { super.addRequestProperty(key, value); String old = requestHeaders.getValue(key); if (old == null) { requestHeaders.put(key, value); } else { requestHeaders.put(key, old + "," + value); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
Iterator i = response.getHeaders().entrySet().iterator(); Map.Entry entry; int count = 1; do { if (!i.hasNext()) { return null; } entry = (Map.Entry) i.next(); count++; } while (count <= index); return (String) entry.getValue();
return response.getHeaders().getHeaderValue(index - 1);
public String getHeaderField(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return getStatusLine(response); } Iterator i = response.getHeaders().en...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterator(); Map.Entry entry; int count = 1; do { if (!i.hasNext()) { return null; } entry = (Map.Entry) i.next(); count++; } while (count <= index); return (String) entry.getKey();
return response.getHeaders().getHeaderName(index - 1);
public String getHeaderFieldKey(int index) { if (!connected) { try { connect(); } catch (IOException e) { return null; } } if (index == 0) { return null; } Iterator i = response.getHeaders().entrySet().iterato...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.singletonList(getStatusLine(response))); for (Iterator i = headers.entrySet().iterator(); i.hasNext(); ) { Map.Entry entry = (Map.Entry) i.next(); String key = (String) entry.getKey(); String value = (String) ent...
Map m = response.getHeaders().getAsMap(); m.put(null, Collections.singletonList(getStatusLine(response))); return Collections.unmodifiableMap(m);
public Map getHeaderFields() { if (!connected) { try { connect(); } catch (IOException e) { return null; } } Headers headers = response.getHeaders(); LinkedHashMap ret = new LinkedHashMap(); ret.put(null, Collections.single...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
return requestHeaders;
Map m = requestHeaders.getAsMap(); return Collections.unmodifiableMap(m);
public Map getRequestProperties() { if (connected) throw new IllegalStateException("Already connected"); return requestHeaders; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
if (key == null) return null;
public String getRequestProperty(String key) { if (key == null) return null; return requestHeaders.getValue(key); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/eea27f084742358ddb097f7118c05cd257029453/HTTPURLConnection.java/clean/core/src/classpath/gnu/gnu/java/net/protocol/http/HTTPURLConnection.java
result.buffer = (byte[])this.buffer.clone();
result.buffer = (byte[]) this.buffer.clone();
public Object clone() throws CloneNotSupportedException { BasePRNG result = (BasePRNG) super.clone(); if (this.buffer != null) result.buffer = (byte[])this.buffer.clone(); return result; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/8d798e21ea9e711563d557b9684e4c872138a713/BasePRNG.java/clean/core/src/classpath/gnu/gnu/java/security/prng/BasePRNG.java
SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getDot(), " ", atts); } catch (BadLocationException ex) { AssertionError err = new Asser...
MutableAttributeSet inputAtts = getInputAttributes(); inputAtts.removeAttributes(inputAtts); StyleConstants.setIcon(inputAtts, icon); replaceSelection(" "); inputAtts.removeAttributes(inputAtts);
public void insertIcon(Icon icon) { SimpleAttributeSet atts = new SimpleAttributeSet(); atts.addAttribute(StyleConstants.IconAttribute, icon); atts.addAttribute(StyleConstants.NameAttribute, StyleConstants.IconElementName); try { getDocument().insertString(getCaret().getD...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/ff4d557efcee4a2c3a25a9cac2252bc626fb10fe/JTextPane.java/buggy/core/src/classpath/javax/javax/swing/JTextPane.java
Runtime.getRuntime().load(filename);
Runtime.getRuntime().load(filename, VMStackWalker.getCallingClassLoader());
public static void load(String filename) { Runtime.getRuntime().load(filename); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/System.java/buggy/core/src/classpath/java/java/lang/System.java
Runtime.getRuntime().loadLibrary(libname);
Runtime.getRuntime().loadLibrary(libname, VMStackWalker.getCallingClassLoader());
public static void loadLibrary(String libname) { Runtime.getRuntime().loadLibrary(libname); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/83a7a3853dc85765487a87b5a791a0d7b225f70f/System.java/buggy/core/src/classpath/java/java/lang/System.java
return new Position() { int off = offset;
if (offset < 0 || offset > length()) throw new BadLocationException("The offset was out of the bounds of this" + " buffer", offset);
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
public int getOffset() { return off; } };
int mark = offset; if (offset > gapStart) mark += gapEnd - gapStart; GapContentPosition pos = new GapContentPosition(mark); int index = Collections.binarySearch(positions, pos); if (index < 0) index = -(index + 1); positions.add(index, pos); return pos;
public Position createPosition(final int offset) throws BadLocationException { return new Position() { int off = offset; public int getOffset() { return off; } }; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
+ " than the content length", len + where);
+ " than the content length", len + where);
public void getChars(int where, int len, Segment txt) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if (...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
public UndoableEdit remove(int where, int nitems) throws BadLocationException
public UndoableEdit remove(int where, int nitems) throws BadLocationException
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
+ " than the content length", where + nitems);
+ " than the content length", where + nitems);
public UndoableEdit remove(int where, int nitems) throws BadLocationException { // check arguments int length = length(); if (where >= length) throw new BadLocationException("the where argument cannot be greater" + " than the content length", where); if ((whe...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
protected void replace(int position, int rmSize, Object addItems, int addSize)
protected void replace(int position, int rmSize, Object addItems, int addSize)
protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); gapEnd += rmSize; // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) < addSize) shiftEnd(addSize); // Add new items to the buffer. Sys...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd);
System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd);
protected void shiftEnd(int newSize) { char[] newBuf = (char[]) allocateArray(length() + newSize); System.arraycopy(buffer, 0, newBuf, 0, gapStart); System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd); gapEnd = gapStart + newSize; buffer = newBuf; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
int index = Collections.binarySearch(positions, new GapContentPosition( gapEnd)); if (index < 0) { index = -(index + 1); } for (ListIterator i = positions.listIterator(index); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark += delta; }
protected void shiftEnd(int newSize) { char[] newBuf = (char[]) allocateArray(length() + newSize); System.arraycopy(buffer, 0, newBuf, 0, gapStart); System.arraycopy(buffer, gapEnd, newBuf, gapStart + newSize, buffer.length - gapEnd); gapEnd = gapStart + newSize; buffer = newBuf; ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart);
System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart);
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart);
System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart);
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
}
protected void shiftGap(int newGapStart) { int newGapEnd = newGapStart + (gapEnd - gapStart); if (newGapStart == gapStart) return; else if (newGapStart < gapStart) { System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart - newGapStart); gapStart = n...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/GapContent.java/buggy/core/src/classpath/javax/javax/swing/text/GapContent.java
String className = (String)registerMap.get(type);
String className = (String) registerMap.get(type);
public static EditorKit createEditorKitForContentType(String type) { // TODO: Have to handle the case where a ClassLoader was specified // when the EditorKit was registered EditorKit e = null; String className = (String)registerMap.get(type); if (className != null) { try { ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/7a2e92fd1a70a7ebb674875e63bf471ea5bca540/JEditorPane.java/buggy/core/src/classpath/javax/javax/swing/JEditorPane.java
throw new UnsupportedOperationException("Can't compute PPQ based lengths yet");
throw new UnsupportedOperationException("Can't compute PPQ based lengths yet");
public long getMicrosecondLength() { long tickLength = getTickLength(); if (divisionType == PPQ) { // FIXME // How can this possible be computed? PPQ is pulses per quarter-note, // which is dependent on the tempo of the Sequencer. throw new UnsupportedOperationException("Can't compu...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/5edad632205aa44aca51004923ae52d754cced11/Sequence.java/clean/core/src/classpath/javax/javax/sound/midi/Sequence.java
public boolean addValueList (ValueListInterface valueListObj)
public boolean addValueList (ValueList valueListObj)
public boolean addValueList (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(); ...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/Parameter.java/clean/src/gov/nasa/gsfc/adc/xdf/Parameter.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/BaseObjectWithValueList.java/buggy/src/gov/nasa/gsfc/adc/xdf/BaseObjectWithValueList.java
cloneObj.valueListObjects.add( ((ValueListInterface) this.valueListObjects.get(i)).clone());
cloneObj.valueListObjects.add( ((ValueList) this.valueListObjects.get(i)).clone());
public Object clone() throws CloneNotSupportedException { BaseObjectWithValueList cloneObj = (BaseObjectWithValueList) super.clone(); cloneObj.valueListObjects = Collections.synchronizedList(new ArrayList()); int stop = this.valueListObjects.size(); for (int i = 0; i < stop; i++) { clone...
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/BaseObjectWithValueList.java/buggy/src/gov/nasa/gsfc/adc/xdf/BaseObjectWithValueList.java
public JRadioButton(String text)
public JRadioButton()
public JRadioButton(String text) { this(text, null, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JRadioButton.java/buggy/core/src/classpath/javax/javax/swing/JRadioButton.java
this(text, null, false);
this(null, null, false);
public JRadioButton(String text) { this(text, null, false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/50cfc3ee73e2e377b07c91f0e40a2f172b10fd27/JRadioButton.java/buggy/core/src/classpath/javax/javax/swing/JRadioButton.java
instance = new MetalTreeUI(); instances.put(component, instance);
instance = new MetalTreeUI(); instances.put(component, instance);
public static ComponentUI createUI(JComponent component) { if (instances == null) instances = new HashMap(); Object o = instances.get(component); MetalTreeUI instance; if (o == null) { instance = new MetalTreeUI(); instances.put(component, instance); } else instance = (MetalTr...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/MetalTreeUI.java/clean/core/src/classpath/javax/javax/swing/plaf/metal/MetalTreeUI.java
public CertificateException(String msg)
public CertificateException()
public CertificateException(String msg) { super(msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/CertificateException.java/buggy/core/src/classpath/java/java/security/cert/CertificateException.java
super(msg);
public CertificateException(String msg) { super(msg); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/CertificateException.java/buggy/core/src/classpath/java/java/security/cert/CertificateException.java
if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY))
if (e.getPropertyName().equals("enabled"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicComboBoxUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY))
else if (e.getPropertyName().equals("editable"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicComboBoxUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY))
else if (e.getPropertyName().equals("dataModel"))
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(JComboBox.ENABLED_CHANGED_PROPERTY)) { arrowButton.setEnabled(comboBox.isEnabled()); if (comboBox.isEditable()) comboBox.getEditor().getEditorComponent().setEnabled(comboBox ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/BasicComboBoxUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicComboBoxUI.java
if (isSpecified("-sslType")) sesProps.put(TN5250jConstants.SSL_TYPE,getParameter("-sslType"));
private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); if (isSpecified("-L")) LangTool.init(parseLocale(getParameter("-L"))); else LangTool.init(); //Let's check some permissions try { System.getProperty(".java.policy"); } catch (SecurityExcep...
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/3d7ef96190bb6c412f768ba9c0eebbb5657cd342/My5250App.java/buggy/tn5250j/src/org/tn5250j/My5250App.java
menuBar.getMenu(i).setSelected(false);
{ JMenu menu = menuBar.getMenu(i); if (menu != null) menu.setSelected(false); }
public void mouseClicked(MouseEvent e) { MenuElement[] me = menuBar.getSubElements(); for (int i = 0; i < me.length; i++) menuBar.getMenu(i).setSelected(false); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicMenuBarUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
menuBar.repaint();
menuBar.repaint();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicMenuBarUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
menuBar.repaint();
menuBar.repaint();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("borderPainted")) menuBar.repaint(); if (e.getPropertyName().equals("margin")) menuBar.repaint(); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/BasicMenuBarUI.java/buggy/core/src/classpath/javax/javax/swing/plaf/basic/BasicMenuBarUI.java
if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));
if (!SwingUtilities.isRightMouseButton(e)) { if (!isSomethingBounded) start(canvas.translateStart(e.getPoint())); else { if (isSomethingBounded) { erase(); notifyRubberBandCanvas(); reset(); start(canvas.translateStart(e.getPoint())); } } }
public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java
}
}
public void mousePressed(MouseEvent e) { if (!SwingUtilities.isRightMouseButton(e) && !isSomethingBounded) start(canvas.translateStart(e.getPoint()));// System.out.println("mouse pressed rb"); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java
erase(); }
erase(); }
public void mouseReleased(MouseEvent e) { erase(); }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java
if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) {
if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) {
public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java
erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } }
erase(); stop(canvas.translateEnd(e.getPoint())); notifyRubberBandCanvas(); draw(); notifyRubberBandCanvas(); } }
public void mouseDragged(MouseEvent e) { if(!SwingUtilities.isRightMouseButton(e) && getCanvas().canDrawRubberBand(RubberBand.this)) { erase(); stop(canvas.translateEnd(e.getPoint())); draw(); notifyRubberBandCanvas(); } }
1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/e95e8529e0583c40804063baff9fc99787c4f55b/RubberBand.java/buggy/tn5250j/src/org/tn5250j/RubberBand.java
firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder,
firePropertyChange("borderPainted", ! paintBorder,
public void setBorderPainted(boolean painted) { if (painted != paintBorder) { paintBorder = painted; firePropertyChange(BORDER_PAINTED_CHANGED_PROPERTY, ! paintBorder, paintBorder); repaint(); } } // setBorderPainted()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JToolBar.java/clean/core/src/classpath/javax/javax/swing/JToolBar.java
firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable);
firePropertyChange("floatable", ! floatable, floatable);
public void setFloatable(boolean floatable) { if (floatable != this.floatable) { this.floatable = floatable; firePropertyChange(FLOATABLE_CHANGED_PROPERTY, ! floatable, floatable); } } // setFloatable()
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JToolBar.java/clean/core/src/classpath/javax/javax/swing/JToolBar.java
firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, this.margin);
firePropertyChange("margin", oldMargin, this.margin);
public void setMargin(Insets margin) { if ((this.margin != null && margin == null) || (this.margin == null && margin != null) || (margin != null && this.margin != null && (margin.left != this.margin.left || margin.right != this.margin.right || margin.top != this.margin.top || ma...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JToolBar.java/clean/core/src/classpath/javax/javax/swing/JToolBar.java
firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation, this.orientation);
firePropertyChange("orientation", oldOrientation, this.orientation);
public void setOrientation(int orientation) { if (orientation != HORIZONTAL && orientation != VERTICAL) throw new IllegalArgumentException(orientation + " is not a legal orientation"); if (orientation != this.orientation) { int oldOrientation = this.orientation;...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JToolBar.java/clean/core/src/classpath/javax/javax/swing/JToolBar.java
firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover);
firePropertyChange("rollover", ! rollover, rollover);
public void setRollover(boolean b) { if (b != rollover) { rollover = b; firePropertyChange(ROLLOVER_CHANGED_PROPERTY, ! rollover, rollover); revalidate(); repaint(); } }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/53b78dd1e4587254262f4618d2aa7551de8e0cbf/JToolBar.java/clean/core/src/classpath/javax/javax/swing/JToolBar.java
void dump()
protected void dump()
void dump() { // Climb up the hierarchy to the parent. View parent = getParent(); if (parent != null) parent.dump(); else dump(0); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/View.java/clean/core/src/classpath/javax/javax/swing/text/View.java
int startIndex = getViewIndex(startOffset, Position.Bias.Forward);
int startIndex = getViewIndex(startOffset, Position.Bias.Backward);
protected void forwardUpdate(DocumentEvent.ElementChange ec, DocumentEvent ev, Shape shape, ViewFactory vf) { int count = getViewCount(); if (count > 0) { int startOffset = ev.getOffset(); int endOffset = startOffset + ev.getLength(); // FIXME: What about...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/e8834e60eedea5a65712de1e0c0fa2d875e22b9c/View.java/clean/core/src/classpath/javax/javax/swing/text/View.java
protected static boolean isFree(byte data, int index) {
protected static boolean isFree(byte[] data, int index) { int byteIndex = index / 8; byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << bitIndex);
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/FSBitmap.java/buggy/fs/src/fs/org/jnode/fs/ext2/FSBitmap.java
byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false;
return ((data[byteIndex] & mask) == 0)? true : false;
protected static boolean isFree(byte data, int index) { //byte bitIndex = (byte) (index % 8); byte mask = (byte) (1 << index); return ((data & mask) == 0)? true : false; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/51e4aed2205f326c2698e2154ea7f83ae5dfc2b6/FSBitmap.java/buggy/fs/src/fs/org/jnode/fs/ext2/FSBitmap.java
Rectangle oldClip = g.getClipBounds (); g.setClip (oldClip.intersection (viewBounds));
Rectangle oldClip = g.getClipBounds(); g.setClip(portBounds);
private void paintSimple(Graphics g, JViewport v, Component view, Point pos, Rectangle viewBounds, Rectangle portBounds) { Rectangle oldClip = g.getClipBounds (); g.setClip (ol...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/72da40e5e4e3a49848a07aeb7fb7c8735af24ae0/BasicViewportUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicViewportUI.java
public BasicCaret() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
public BasicHighlighter() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
public BasicTextUI() { }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
textComponent.setSelectedTextColor(UIManager.getColor(prefix + ".selectionForeground"));
protected void installDefaults() { Caret caret = textComponent.getCaret(); if (caret == null) { caret = createCaret(); textComponent.setCaret(caret); } Highlighter highlighter = textComponent.getHighlighter(); if (highlighter == null) textComponent.setHighlighter(createHighli...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
protected void paintBackground(Graphics g) { // This method does nothing. All the background filling is done by the // ComponentUI update method. However, the method is called by paint // to provide a way for subclasses to draw something different (e.g. background // images etc) on the background. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/963ae61676e8c35a9e0998e0b7de1f942db82a26/BasicTextUI.java/clean/core/src/classpath/javax/javax/swing/plaf/basic/BasicTextUI.java
}
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Boolean boolValue = (B...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
JCheckBox box = new BooleanCellRenderer().getCheckBox(); setDefaultEditor(Boolean.class, new DefaultCellEditor(box));
protected void createDefaultEditors() { //FIXME: Create the editor object. }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
if (editorComp!=null) moveToCellBeingEdited(editorComp); repaint();
public void doLayout() { TableColumn resizingColumn = null; int ncols = getColumnCount(); if (ncols < 1) return; int[] pref = new int[ncols]; int prefSum = 0; int rCol = -1; if (tableHeader != null) resizingColumn = tableHeader.getResizingColumn(); for (int i = 0; i < ncols; ++i) ...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
oldCellValue = getValueAt(row, column);
if (isEditing()) editingStopped(new ChangeEvent("editingStopped")); editingRow = row; editingColumn = column;
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorComp, row, column); ((JTextField)editorComp).requestFocusInWindow(false); editorTimer.start();
removeAll(); add(editorComp); moveToCellBeingEdited(editorComp); scrollRectToVisible(editorComp.getBounds()); editorComp.requestFocusInWindow();
public boolean editCellAt (int row, int column) { oldCellValue = getValueAt(row, column); setCellEditor(getCellEditor(row, column)); editorComp = prepareEditor(cellEditor, row, column); cellEditor.addCellEditorListener(this); rowBeingEdited = row; columnBeingEdited = column; setValueAt(editorCom...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField)
if (editorComp!=null)
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1;
remove(editorComp); repaint(editorComp.getBounds()); editorComp = null;
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint();
public void editingCanceled (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove ((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(oldCellValue, r...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField)
if (editorComp!=null)
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)editorComp).getText(), rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1;
remove(editorComp); setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn); repaint(editorComp.getBounds()); editorComp = null;
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint();
requestFocusInWindow();
public void editingStopped (ChangeEvent event) { if (rowBeingEdited > -1 && columnBeingEdited > -1) { if (getValueAt(rowBeingEdited, columnBeingEdited) instanceof JTextField) { remove((Component)getValueAt(rowBeingEdited, columnBeingEdited)); setValueAt(((JTextField)edit...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
TableCellEditor r = new DefaultCellEditor(new JTextField());
JTextField t = new TableTextField(); TableCellEditor r = new DefaultCellEditor(t);
public TableCellEditor getDefaultEditor(Class columnClass) { if (defaultEditorsByColumnClass.containsKey(columnClass)) return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass); else { // FIXME: We have at least an editor for Object.class in our defaults. TableCellEditor r = new De...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
int height = getRowHeight();
int height = getRowHeight() + getRowMargin();
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; }
int r = y / height; if (r < 0 || r > nrows) return -1; else return r;
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
else
public int rowAtPoint(Point point) { if (point != null) { int nrows = getRowCount(); int height = getRowHeight(); int y = point.y; for (int i = 0; i < nrows; ++i) { if (0 <= y && y < height) return i; y -= height; } } re...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
if (value instanceof Component) add((Component)value);
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
repaint(getCellRect(row, column, true));
public void setValueAt(Object value, int row, int column) { if (!isCellEditable(row, column)) return; if (value instanceof Component) add((Component)value); dataModel.setValueAt(value, row, convertColumnIndexToModel(column)); }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/fd7e81b5c6d5963539719dfde9d197c68890c201/JTable.java/clean/core/src/classpath/javax/javax/swing/JTable.java
return -1;
return 1;
public int getHeight(ImageObserver observer) { return -1; }
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java
HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>();
Set<ImageConsumer> consumers = new HashSet<ImageConsumer>();
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java
public void addConsumer(ImageConsumer ic) {
synchronized public void addConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java
public boolean isConsumer(ImageConsumer ic) {
synchronized public boolean isConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java
public void removeConsumer(ImageConsumer ic) {
synchronized public void removeConsumer(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java
public void startProduction(ImageConsumer ic) {
synchronized public void startProduction(ImageConsumer ic) {
public ImageProducer getSource() { return new ImageProducer() { HashSet<ImageConsumer> consumers = new HashSet<ImageConsumer>(); public void addConsumer(ImageConsumer ic) { consumers.add(ic); } public boolean isConsumer(Im...
1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/366de835b47a9e4d33bcb1512684f2561b1dad5f/JNodeToolkit.java/buggy/gui/src/awt/org/jnode/awt/JNodeToolkit.java