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, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white); } else { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white); } }
|
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(MetalLookAndFeel.getControl()); g.drawLine(trackX + 1, y + 1, trackX + trackW - 3, y + 1); g.drawLine(trackX + 1, y + 1, trackX + 1, y + h - 3); }
|
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, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white); } else { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white); } }
|
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, getTrackWidth(), Color.darkGray, Color.gray, Color.darkGray, Color.white); } else { if (filledSlider) { // TODO: fill the track } BasicGraphicsUtils.drawEtchedRect(g, trackRect.x + (trackRect.width - getTrackWidth()) / 2, trackRect.y, getTrackWidth(), trackRect.height - 1, Color.darkGray, Color.gray, Color.darkGray, Color.white); } }
|
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, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (skipMe != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log.info("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } 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
|
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, debugOut, legalInstanceClasses); final long start = System.currentTimeMillis(); int cnt = 0; int lastUnresolved = -1; int loops = 0; while (true) { loops++; compileClasses(os, arch); final Collection objectRefs = new ArrayList(os.getObjectRefs()); int unresolved = 0; // Number of unresolved references found in the following loop int emitted = 0; // Number of emitted objects in the following loop for (Iterator i = objectRefs.iterator(); i.hasNext();) { X86Stream.ObjectRef ref = (X86Stream.ObjectRef) i.next(); if (!ref.isResolved()) { final Object obj = ref.getObject(); if (!(obj instanceof Label)) { unresolved++; if (obj instanceof VmType) { ((VmType) obj).link(); } if (obj != skipMe) { emitter.emitObject(obj); emitted++; X86Stream.ObjectRef newRef = os.getObjectRef(obj); if (ref != newRef) { throw new RuntimeException("Object has changed during emitObject! type=" + obj.getClass().getName()); } if (!ref.isResolved()) { throw new RuntimeException("Unresolved reference to object " + ((obj == null) ? "null" : obj.getClass().getName())); } } } } } if (unresolved == lastUnresolved) { if ((unresolved == 0) || (skipMe != null)) { break; } } lastUnresolved = unresolved; cnt += emitted; } final long end = System.currentTimeMillis(); log.info("Emitted " + cnt + " objects, took " + (end - start) + "ms in " + loops + " loops"); if (debugOut != null) { debugOut.close(); debugOut = null; } } catch (ClassNotFoundException ex) { throw new BuildException(ex); } 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
|
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 = getPluginList(); lmPI = piList.lastModified(); } catch (PluginException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } if ((lmJar < lmDest) && (lmKernel < lmDest) && (lmPIL < lmDest) && (lmPI < lmDest)) { // No need to do anything, skip return; } try { System.getProperties().setProperty(BUILDTIME_PROPERTY, "1"); // Load the plugin descriptors final PluginRegistry piRegistry; piRegistry = new PluginRegistryModel(piList.getDescriptorUrlList()); testPluginPrerequisites(piRegistry); /* Now create the processor */ final VmProcessor proc = createProcessor(); final VmArchitecture arch = proc.getArchitecture(); log("Building for " + proc.getCPUID()); clsMgr = new VmClassLoader(classesURL, proc.getArchitecture()); final NativeStream os = createNativeStream(); final Object clInitCaller = new Label("$$clInitCaller"); VmType systemClasses[] = VmType.initializeForBootImage(clsMgr); for (int i = 0; i < systemClasses.length; i++) { clsMgr.addLoadedClass(systemClasses[i].getName(), systemClasses[i]); } // First copy the native kernel file copyKernel(os); os.setObjectRef(bootHeapStart); // Setup a call to our first java method initImageHeader(os, clInitCaller, piRegistry); // Create the initial stack createInitialStack(os, initialStack, initialStackPtr); /* Now load the classes */ loadClass(VmMethodCode.class); loadClass(Unsafe.class); loadClass(VmClassLoader.class); loadClass(VmType[].class); /* Now emit the processor */ os.getObjectRef(proc); /* Let the compilers load its native symbol offsets */ final NativeCodeCompiler[] cmps = arch.getCompilers(); for (int i = 0; i < cmps.length; i++) { final NativeCodeCompiler cmp = cmps[i]; cmp.initialize(clsMgr); os.getObjectRef(cmp); } for (Iterator i = BootClasses.values().iterator(); i.hasNext();) { BootClassInfo bci = (BootClassInfo) i.next(); if (!bci.isPackage()) { clsMgr.loadClass(bci.getName(), true); } } // Load the jarfile as byte-array copyJarFile(os); // Now emit all object images to the actual image emitObjects(os, arch, clsMgr); /* Set the bootclasses */ VmType bootClasses[] = clsMgr.prepareAfterBootstrap(); os.getObjectRef(bootClasses); emitObjects(os, arch, clsMgr); // Disallow the loading of new classes clsMgr.setFailOnNewLoad(true); // Turn auto-compilation on clsMgr.setCompileRequired(); // Emit the remaining objects emitObjects(os, arch, null); /* Write static initializer code */ emitStaticInitializerCalls(os, bootClasses, clInitCaller); // This is the end of the image X86Stream.ObjectInfo dummyObjectAtEnd = os.startObject(loadClass(VmMethodCode.class)); pageAlign(os); dummyObjectAtEnd.markEnd(); os.setObjectRef(imageEnd); os.setObjectRef(bootHeapEnd); /* Link all native symbols */ linkNativeSymbols(os); // Patch multiboot header patchHeader(os); // Store the image storeImage(os); // Generate the listfile printLabels(os, bootClasses); for (int i = 0; i < cmps.length; i++) { cmps[i].dumpStatistics(); } log.info("Done."); } catch (Throwable ex) { ex.printStackTrace(); 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
|
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)); add(new BootClassInfo("java.lang.String", true, core)); add(new BootClassInfo("java.lang", true, nonCore)); add(new BootClassInfo("java.lang.reflect", true, nonCore)); add(new BootClassInfo("java.lang.ref", true, nonCore)); add(new BootClassInfo("org.jnode.boot", true, nonCore)); add(new BootClassInfo("org.jnode.vm.Monitor", core)); add(new BootClassInfo("org.jnode.vm.MonitorManager", core)); add(new BootClassInfo("org.jnode.vm", true, core)); add(new BootClassInfo("org.jnode.vm.classmgr", true, core)); add(new BootClassInfo("org.jnode.vm.compiler", true, nonCore)); add(new BootClassInfo("org.jnode.util", true, nonCore)); add(new BootClassInfo("java.io", true, nonCore)); add(new BootClassInfo("java.util", true, nonCore)); add(new BootClassInfo("java.util.jar", true, nonCore)); add(new BootClassInfo("java.util.zip", true, nonCore)); add(new BootClassInfo("gnu.java.io", true, nonCore)); add(new BootClassInfo("gnu.java.nio", true, nonCore)); add(new BootClassInfo("gnu.java.io.decode", true, nonCore)); add(new BootClassInfo("gnu.java.io.encode", true, nonCore)); add(new BootClassInfo("gnu.java.io.decode.Decoder8859_1", nonCore)); add(new BootClassInfo("gnu.java.io.encode.Encoder8859_1", nonCore)); }
|
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 ) throws java.io.IOException { if (Specification.getInstance().isPrettyXDFOutput()) outputWriter.write(indent); String sysId = getSystemId(); String pubId = getPublicId(); outputWriter.write("<"+DOCTYPE_NODE_NAME+" "+getName()); if (pubId != null) outputWriter.write(" PUBLIC \"" + getPublicId() +"\""); if (sysId != null) outputWriter.write(" SYSTEM \"" + getSystemId() +"\""); else outputWriter.write(" SYSTEM \"" + Constants.XDF_DTD_NAME +"\""); // any entities and notations need to now be written. List entityObjList = getEntities(); List notationObjList = getNotations(); String newindent = indent + Specification.getInstance().getPrettyXDFOutputIndentation(); // if we have any, then we must print out if (entityObjList.size() > 0) { outputWriter.write(" ["); if (Specification.getInstance().isPrettyXDFOutput()) outputWriter.write(Constants.NEW_LINE); // whip thru the list of entity objects synchronized (entityObjList) { Iterator iter = entityObjList.iterator(); // Must be in synchronized block while (iter.hasNext()) { Entity entityObj = (Entity) iter.next(); entityObj.toXMLWriter(outputWriter, newindent); } } } if (notationObjList.size() > 0) { if (entityObjList.size() == 0) { outputWriter.write(" ["); if (Specification.getInstance().isPrettyXDFOutput()) outputWriter.write(Constants.NEW_LINE); } synchronized (notationObjList) { Iterator iter = notationObjList.iterator(); // Must be in synchronized block while (iter.hasNext()) { NotationNode obj = (NotationNode) iter.next(); obj.toXMLWriter(outputWriter, newindent); } } } if (entityObjList.size() > 0 || notationObjList.size() > 0) outputWriter.write("]"); outputWriter.write(">"); return DOCTYPE_NODE_NAME; }
|
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 = (AbstractSelector) selin; synchronized (blockingLock()) { key = locate(selector); if (key != null) { if (att != null) key.attach(att); } else { key = selector.register(this, ops, att); if (key != null) addSelectionKey(key); } } return key; }
|
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().getSize()); wnd.setSize(600, 400); wnd.setLayout(new BorderLayout()); //wnd.setLocation(75, 50); wnd.setBackground(Color.GREEN); final List l = new List(); l.add("Item 1"); l.add("Item 2"); l.add("Item 3"); //wnd.add(l, BorderLayout.NORTH); final Button b = new Button("Hello world"); b.addActionListener(new ActionListener() { int i =0; public void actionPerformed(ActionEvent e) { System.out.println("Action performed " + e); switch(i){ case 0:{ wnd.add(new Button(String.valueOf(i)), BorderLayout.WEST); break; } case 1:{ wnd.add(new Button(String.valueOf(i)), BorderLayout.SOUTH); break; } case 2:{ wnd.add(new Button(String.valueOf(i)), BorderLayout.EAST); break; } default: b.setLabel(String.valueOf(i)); wnd.setVisible(false); } i++; wnd.validate(); } }); wnd.add(b, BorderLayout.CENTER); b.setBackground(Color.YELLOW); final Button b2 = new Button("Left"); final Scrollbar sb = new Scrollbar(Scrollbar.HORIZONTAL); final JCheckBox cb1 = new JCheckBox("Right"); wnd.add(b2, BorderLayout.WEST); b2.setBackground(Color.RED); b2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("Action on b2"); if (sb.getValue() + sb.getBlockIncrement() <= sb.getMaximum()) { sb.setValue(sb.getValue() + sb.getBlockIncrement()); } else { Frame f2 = new Frame("New frame"); f2.setSize(200, 100); f2.show(); } } }); wnd.add(cb1, BorderLayout.EAST); cb1.setBackground(Color.WHITE); wnd.add(sb, BorderLayout.SOUTH); wnd.show(); while (wnd.isVisible()) { Thread.sleep(500); } // Font f = wnd.getFont();// System.out.println(f.getName());// wnd.getFontMetrics(f);// for (int i = 0; i < 30; i++) {// wnd.setLocation(wnd.getX() + 5, wnd.getY() + 4);// if ((i % 10) == 0) {// cb1.setState(!cb1.getState());// Thread.sleep(2500);// } else {// if ((i % 5) == 0) {// // Intended mixing of width & height, just for the fun of the test// wnd.setSize(wnd.getHeight(), wnd.getWidth());// }// Thread.sleep(100);// }// } Thread.sleep(5000); wnd.hide(); }catch(Throwable t){ t.printStackTrace(); } finally { wnd.dispose(); } }
|
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 = SystemProperties.getProperty("http.agent"); String ka = SystemProperties.getProperty("http.keepAlive"); keepAlive = !(ka != null && "false".equals(ka));
|
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().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(); }
|
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().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(); }
|
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) entry.getValue(); ret.put(key, Collections.singletonList(value)); } return Collections.unmodifiableMap(ret);
|
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.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) entry.getValue(); ret.put(key, Collections.singletonList(value)); } return Collections.unmodifiableMap(ret); }
|
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 AssertionError("Unexpected bad location"); err.initCause(ex); throw err; }
|
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().getDot(), " ", atts); } catch (BadLocationException ex) { AssertionError err = new AssertionError("Unexpected bad location"); err.initCause(ex); throw err; } }
|
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 ((where + len) > length) throw new BadLocationException("len plus where cannot be greater" + " than the content length", len + where); // check if requested segment is contiguous if ((where < gapStart) && ((gapStart - where) < len)) { // requested segment is not contiguous -> copy the pieces together char[] copy = new char[len]; int lenFirst = gapStart - where; // the length of the first segment System.arraycopy(buffer, where, copy, 0, lenFirst); System.arraycopy(buffer, gapEnd, copy, lenFirst, len - lenFirst); txt.array = copy; txt.offset = 0; txt.count = len; } else { // requested segment is contiguous -> we can simply return the // actual content txt.array = buffer; if (where < gapStart) txt.offset = where; else txt.offset = where + (gapEnd - gapStart); txt.count = len; } }
|
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 ((where + nitems) > length) throw new BadLocationException("where + nitems cannot be greater" + " than the content length", where + nitems); // check if we are at the gap boundary if (where != gapStart) shiftGap(where); // now we simply have to enlarge the gap gapEnd += nitems; return null; }
|
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 ((where + nitems) > length) throw new BadLocationException("where + nitems cannot be greater" + " than the content length", where + nitems); // check if we are at the gap boundary if (where != gapStart) shiftGap(where); // now we simply have to enlarge the gap gapEnd += nitems; return null; }
|
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. System.arraycopy(addItems, 0, buffer, gapStart, addSize); gapStart += addSize; }
|
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 = newGapStart; gapEnd = newGapEnd; } else { System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart); gapStart = newGapStart; gapEnd = newGapEnd; } }
|
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 = newGapStart; gapEnd = newGapEnd; } else { System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart); gapStart = newGapStart; gapEnd = newGapEnd; } }
|
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 = newGapStart; gapEnd = newGapEnd; } else { System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart - gapStart); gapStart = newGapStart; gapEnd = newGapEnd; } }
|
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 { e = (EditorKit) Class.forName(className).newInstance(); } catch (Exception e2) { // TODO: Not sure what to do here. } } return e; }
|
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 compute PPQ based lengths yet"); } else { // This is a fixed tick per frame computation return (long) ((tickLength * 1000000) / (divisionType * resolution)); } }
|
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(); while (iter.hasNext()) { Value thisValue = ((Value) iter.next()); internalAddValue(thisValue); } return true; } else { // safety, needed? hasValueListCompactDescription = false; Log.warnln("Warning: no Values appended, ValueList empty. Parameter unchanged."); return false; } }
|
4483 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4483/e92f58e5a11bd766546510f1fd24a8e2eb2b17a7/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++) { cloneObj.valueListObjects.add( ((ValueListInterface) this.valueListObjects.get(i)).clone()); } return cloneObj; }
|
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 = (MetalTreeUI) o; return instance; }
|
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 .isEnabled()); } else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY)) { if (comboBox.isEditable()) { configureEditor(); addEditor(); } else { unconfigureEditor(); removeEditor(); } comboBox.revalidate(); comboBox.repaint(); } else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { // remove ListDataListener from old model and add it to new model ComboBoxModel oldModel = (ComboBoxModel) e.getOldValue(); if (oldModel != null) oldModel.removeListDataListener(listDataListener); if ((ComboBoxModel) e.getNewValue() != null) comboBox.getModel().addListDataListener(listDataListener); } // FIXME: Need to handle changes in other bound properties. }
|
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 .isEnabled()); } else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY)) { if (comboBox.isEditable()) { configureEditor(); addEditor(); } else { unconfigureEditor(); removeEditor(); } comboBox.revalidate(); comboBox.repaint(); } else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { // remove ListDataListener from old model and add it to new model ComboBoxModel oldModel = (ComboBoxModel) e.getOldValue(); if (oldModel != null) oldModel.removeListDataListener(listDataListener); if ((ComboBoxModel) e.getNewValue() != null) comboBox.getModel().addListDataListener(listDataListener); } // FIXME: Need to handle changes in other bound properties. }
|
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 .isEnabled()); } else if (e.getPropertyName().equals(JComboBox.EDITABLE_CHANGED_PROPERTY)) { if (comboBox.isEditable()) { configureEditor(); addEditor(); } else { unconfigureEditor(); removeEditor(); } comboBox.revalidate(); comboBox.repaint(); } else if (e.getPropertyName().equals(JComboBox.MODEL_CHANGED_PROPERTY)) { // remove ListDataListener from old model and add it to new model ComboBoxModel oldModel = (ComboBoxModel) e.getOldValue(); if (oldModel != null) oldModel.removeListDataListener(listDataListener); if ((ComboBoxModel) e.getNewValue() != null) comboBox.getModel().addListDataListener(listDataListener); } // FIXME: Need to handle changes in other bound properties. }
|
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 (SecurityException e) { e.printStackTrace(); TN5250jSecurityAccessDialog.showErrorMessage(e); return; } log = TN5250jLogFactory.getLogger (this.getClass()); Properties sesProps = new Properties(); log.info(" We have loaded a new one"); // Start loading properties - Host must exist sesProps.put(SESSION_HOST,getParameter("host")); if (isSpecified("-e")) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p")) { sesProps.put(SESSION_HOST_PORT,getParameter("-p")); }// if (isSpecified("-f",args))// propFileName = getParm("-f",args); if (isSpecified("-cp")) sesProps.put(SESSION_CODE_PAGE ,getParameter("-cp")); if (isSpecified("-gui")) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132")) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // socks proxy host argument if (isSpecified("-sph")) { sesProps.put(SESSION_PROXY_HOST ,getParameter("-sph")); } // socks proxy port argument if (isSpecified("-spp")) sesProps.put(SESSION_PROXY_PORT ,getParameter("-spp")); // check if device name is specified if (isSpecified("-dn")) sesProps.put(SESSION_DEVICE_NAME ,getParameter("-dn")); loadSystemProperty("SESSION_CONNECT_USER"); loadSystemProperty("SESSION_CONNECT_PASSWORD"); loadSystemProperty("SESSION_CONNECT_PROGRAM"); loadSystemProperty("SESSION_CONNECT_LIBRARY"); loadSystemProperty("SESSION_CONNECT_MENU"); manager = SessionManager.instance(); final Session5250 s = manager.openSession(sesProps,"","Test Applet"); final SessionGUI gui = new SessionGUI(s);// final JTerminal jt = new JTerminal(s); this.getContentPane().add(gui); s.connect(); SwingUtilities.invokeLater(new Runnable() { public void run() {// jt.grabFocus(); gui.grabFocus(); } }); }
|
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 || margin.bottom != this.margin.bottom))) { Insets oldMargin = this.margin; this.margin = margin; firePropertyChange(MARGIN_CHANGED_PROPERTY, oldMargin, this.margin); revalidate(); repaint(); } } // setMargin()
|
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; this.orientation = orientation; firePropertyChange(ORIENTATION_CHANGED_PROPERTY, oldOrientation, this.orientation); revalidate(); repaint(); } } // setOrientation()
|
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 this bias stuff? int startIndex = getViewIndex(startOffset, Position.Bias.Forward); int endIndex = getViewIndex(endOffset, Position.Bias.Forward); int index = -1; int addLength = -1; if (ec != null) { index = ec.getIndex(); addLength = ec.getChildrenAdded().length; } if (startIndex >= 0 && endIndex >= 0) { for (int i = startIndex; i <= endIndex; i++) { // Skip newly added child views. if (index >= 0 && i >= index && i < (index+addLength)) continue; View child = getView(i); forwardUpdateToView(child, ev, shape, vf); } } } }
|
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 (oldClip.intersection (viewBounds)); g.translate (-pos.x, -pos.y); try { view.paint(g); } finally { g.translate (pos.x, pos.y); g.setClip (oldClip); } }
|
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(createHighlighter()); String prefix = getPropertyPrefix(); LookAndFeel.installColorsAndFont(textComponent, prefix + ".background", prefix + ".foreground", prefix + ".font"); LookAndFeel.installBorder(textComponent, prefix + ".border"); textComponent.setMargin(UIManager.getInsets(prefix + ".margin")); caret.setBlinkRate(UIManager.getInt(prefix + ".caretBlinkRate")); // Fetch the colors for enabled/disabled text components. inactiveBackground = UIManager.getColor(prefix + ".inactiveBackground"); textComponent.setDisabledTextColor (UIManager.getColor(prefix + ".inactiveForeground")); }
|
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 = (Boolean) value; checkBox.setSelected(boolValue.booleanValue()); return checkBox; }
|
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) { TableColumn col = columnModel.getColumn(i); int p = col.getWidth(); pref[i] = p; prefSum += p; if (resizingColumn == col) rCol = i; } int spill = getWidth() - prefSum; if (resizingColumn != null) { TableColumn col; TableColumn [] cols; switch (getAutoResizeMode()) { case AUTO_RESIZE_LAST_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_NEXT_COLUMN: col = columnModel.getColumn(ncols-1); col.setWidth(col.getPreferredWidth() + spill); break; case AUTO_RESIZE_ALL_COLUMNS: cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_SUBSEQUENT_COLUMNS: cols = new TableColumn[ncols]; for (int i = rCol; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); break; case AUTO_RESIZE_OFF: default: int prefWidth = resizingColumn.getPreferredWidth(); resizingColumn.setWidth(prefWidth); } } else { TableColumn [] cols = new TableColumn[ncols]; for (int i = 0; i < ncols; ++i) cols[i] = columnModel.getColumn(i); distributeSpill(cols, spill); } }
|
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(editorComp, row, column); ((JTextField)editorComp).requestFocusInWindow(false); editorTimer.start(); return true; }
|
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(editorComp, row, column); ((JTextField)editorComp).requestFocusInWindow(false); editorTimer.start(); return true; }
|
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, rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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, rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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, rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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)editorComp).getText(), rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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)editorComp).getText(), rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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)editorComp).getText(), rowBeingEdited, columnBeingEdited); } rowBeingEdited = -1; columnBeingEdited = -1; } editorTimer.stop(); editorComp = null; cellEditor = null; requestFocusInWindow(false); repaint(); }
|
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 DefaultCellEditor(new JTextField()); defaultEditorsByColumnClass.put(columnClass, r); return 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
|
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; } } return -1; }
|
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; } } return -1; }
|
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; } } return -1; }
|
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(ImageConsumer ic) { return consumers.contains(ic); } public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } public void requestTopDownLeftRightResend(ImageConsumer ic) { startProduction(ic); } }; }
|
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(ImageConsumer ic) { return consumers.contains(ic); } public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } public void requestTopDownLeftRightResend(ImageConsumer ic) { startProduction(ic); } }; }
|
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(ImageConsumer ic) { return consumers.contains(ic); } public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } public void requestTopDownLeftRightResend(ImageConsumer ic) { startProduction(ic); } }; }
|
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(ImageConsumer ic) { return consumers.contains(ic); } public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } public void requestTopDownLeftRightResend(ImageConsumer ic) { startProduction(ic); } }; }
|
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(ImageConsumer ic) { return consumers.contains(ic); } public void removeConsumer(ImageConsumer ic) { consumers.remove(ic); } public void startProduction(ImageConsumer ic) { consumers.add(ic); for (ImageConsumer c : consumers) { c.imageComplete(ImageConsumer.IMAGEERROR); } } public void requestTopDownLeftRightResend(ImageConsumer ic) { startProduction(ic); } }; }
|
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.